import { IUpdateable, IAddable, IGetById, IDeleteable } from "../decorators.js"; import { _GraphCollection, _GraphInstance, IGraphQueryable } from "../graphqueryable.js"; import { Workbook as WorkbookType, WorkbookWorksheet as WorksheetType, WorkbookTable as WorkbookTableType, WorkbookTableRow as WorkbookTableRowType, WorkbookTableColumn as WorkbookTableColumnType, WorkbookRange as WorkbookRangeType, WorkbookRangeFormat as WorkbookRangeFormatType, WorkbookRangeBorder as WorkbookRangeBorderType, WorkbookRangeFont as WorkbookRangeFontType, WorkbookRangeFill as WorkbookRangeFillType, WorkbookRangeSort as WorkbookRangeSortType, WorkbookRangeView as WorkbookRangeViewType, WorkbookFormatProtection as WorkbookFormatProtectionType, WorkbookTableSort as WorkbookTableSortType, WorkbookFilter as WorkbookFilterType, WorkbookWorksheetProtection as WorkbookWorksheetProtectionType, WorkbookPivotTable as WorkbookPivotTableType, WorkbookNamedItem as WorkbookNamedItemType, WorkbookSortField as WorkbookSortFieldType, WorkbookOperation as WorkbookOperationType, WorkbookWorksheetProtectionOptions, WorkbookIcon as WorkbookIconType, WorkbookComment as WorkbookCommentType, WorkbookCommentReply as WorkbookCommentReplyType, WorkbookApplication as WorkbookApplicationType } from "@microsoft/microsoft-graph-types"; export declare class _Workbook extends _GraphInstance { get worksheets(): IWorksheets; get tables(): ITables; get comments(): IComments; get names(): INamedItems; get operations(): IOperations; get application(): IApplication; } export interface IWorkbook extends _Workbook { } export declare const Workbook: import("@pnp/graph").IGraphInvokableFactory; export declare class _WorkbookWithSession extends _Workbook { closeSession(): Promise; refreshSession(): Promise; } export interface IWorkbookWithSession extends _WorkbookWithSession { } export declare const WorkbookWithSession: import("@pnp/graph").IGraphInvokableFactory; export declare class _Range extends _GraphInstance { get format(): IRangeFormat; get sort(): IRangeSort; cell(row: number, column: number): IRange; column(column: number): IRange; columnsAfter(count?: number): IRange; columnsBefore(count?: number): IRange; row(row: number): IRange; rowsAbove(count?: number): IRange; rowsBelow(count?: number): IRange; get entireColumn(): IRange; get entireRow(): IRange; intersection(anotherRange: string): IRange; boundingRect(anotherRange: string): IRange; get lastCell(): IRange; get lastColumn(): IRange; get lastRow(): IRange; offsetRange(rowOffset: number, columnOffset: number): IRange; resizedRange(deltaRows: number, deltaColumns: number): IRange; usedRange(valuesOnly: boolean): IRange; get visibleView(): IRangeView; insert(shift: "Down" | "Right"): Promise; merge(across: boolean): Promise; unmerge(): Promise; clear(applyTo: "All" | "Formats" | "Contents"): Promise; delete(shift: "Up" | "Left"): Promise; } export interface IRange extends _Range, IUpdateable { } export declare const Range: import("@pnp/graph").IGraphInvokableFactory; export declare class _RangeView extends _GraphInstance { get rows(): IRangeViews; get range(): IRange; } export interface IRangeView extends _RangeView { } export declare class _RangeViews extends _GraphCollection { } export interface IRangeViews extends _RangeViews, IGetItemAt { } export interface RangeSortParameters { fields: WorkbookSortFieldType[]; matchCase?: boolean; hasHeaders?: boolean; orientation?: "Rows" | "Columns"; method?: "PinYin" | "StrokeCount"; } export declare class _RangeSort extends _GraphInstance { apply(params: RangeSortParameters): Promise; } export interface IRangeSort extends _RangeSort { } export declare class _RangeFormat extends _GraphInstance { get borders(): IRangeBorders; get font(): IRangeFont; get fill(): IRangeFill; get protection(): IRangeFormatProtection; autofitColumns(): Promise; autofitRows(): Promise; } export interface IRangeFormat extends _RangeFormat, IUpdateable { } export declare const RangeFormat: import("@pnp/graph").IGraphInvokableFactory; export declare class _RangeFont extends _GraphInstance { } export interface IRangeFont extends _RangeFont, IUpdateable { } export declare const RangeFont: import("@pnp/graph").IGraphInvokableFactory; export declare class _RangeFill extends _GraphInstance { clear(): Promise; } export interface IRangeFill extends _RangeFill, IUpdateable { } export declare const RangeFill: import("@pnp/graph").IGraphInvokableFactory; export declare class _RangeFormatProtection extends _GraphInstance { } export interface IRangeFormatProtection extends _RangeFormatProtection, IUpdateable { } export declare const RangeFormatProtection: import("@pnp/graph").IGraphInvokableFactory; export declare class _RangeBorder extends _GraphInstance { } /** * NOTE: When updating RangeBorder, there are some combinations of style * and weight that silently fail. * For example, setting "Dash - Thick" always sets "Continuous - Thick". * This isn't documented, but it's also not really a bug. When you * try to manually set border styles in Excel, it's not possible to select * a thick dashed line. */ export interface IRangeBorder extends _RangeBorder, IUpdateable { } export declare const RangeBorder: import("@pnp/graph").IGraphInvokableFactory; export declare class _RangeBorders extends _GraphCollection { getBySideIndex(sideIndex: RangeBorderSideIndex): IRangeBorder & import("@pnp/queryable/queryable.js").IInvokable; } export interface IRangeBorders extends _RangeBorders, IGetItemAt { } export declare const RangeBorders: import("@pnp/graph").IGraphInvokableFactory; export type RangeBorderSideIndex = "EdgeTop" | "EdgeBottom" | "EdgeLeft" | "EdgeRight" | "InsideVertical" | "InsideHorizontal" | "DiagonalDown" | "DiagonalUp"; export declare class _Worksheet extends _GraphInstance { /** * Get a range of cells within the worksheet. * * @param address (Optional) An A1-notation address of a range within this worksheet. * If omitted, a range containing the entire worksheet is returned. */ getRange(address?: string): IRange; getUsedRange(valuesOnly?: boolean): IRange; get tables(): ITables; get pivotTables(): IPivotTables; get names(): INamedItems; get protection(): IWorksheetProtection; } export interface IWorksheet extends _Worksheet, IUpdateable, IDeleteable { } export declare const Worksheet: import("@pnp/graph").IGraphInvokableFactory; export interface IAddWorksheet { name?: string; } export declare class _Worksheets extends _GraphCollection { } export interface IWorksheets extends _Worksheets, IAddable, IGetById { } export declare const Worksheets: import("@pnp/graph").IGraphInvokableFactory; export declare class _WorksheetProtection extends _GraphInstance { protect(options?: WorkbookWorksheetProtectionOptions): Promise; unprotect(): Promise; } export interface IWorksheetProtection extends _WorksheetProtection { } export declare const WorksheetProtection: import("@pnp/graph").IGraphInvokableFactory; export declare class _Table extends _GraphInstance { get rows(): ITableRows; get columns(): ITableColumns; get worksheet(): IWorksheet; get range(): IRange; get headerRowRange(): IRange; get dataBodyRange(): IRange; get totalRowRange(): IRange; get sort(): ITableSort; clearFilters(): Promise; reapplyFilters(): Promise; convertToRange(): Promise; } export interface ITable extends _Table, IUpdateable, IDeleteable, IGetRange { } export declare const Table: import("@pnp/graph").IGraphInvokableFactory; export declare class _Tables extends _GraphCollection { getByName(name: string): ITable; add(address: string, hasHeaders: boolean): Promise; } export interface ITables extends _Tables, IGetById { } export declare const Tables: import("@pnp/graph").IGraphInvokableFactory; export declare class _TableRow extends _GraphInstance { } export interface ITableRow extends _TableRow, IUpdateable, IDeleteable, IGetRange { } export declare const TableRow: import("@pnp/graph").IGraphInvokableFactory; export interface IAddRow { index?: number; values?: any[][]; } export declare class _TableRows extends _GraphCollection { } export interface ITableRows extends _TableRows, IAddable, IGetItemAt { } export declare const TableRows: import("@pnp/graph").IGraphInvokableFactory; export declare class _TableColumn extends _GraphInstance { get filter(): IWorkbookFilter; get headerRowRange(): IRange; get dataBodyRange(): IRange; get totalRowRange(): IRange; } export interface ITableColumn extends _TableColumn, IUpdateable, IDeleteable, IGetRange { } export declare const TableColumn: import("@pnp/graph").IGraphInvokableFactory; export interface IAddColumn { name?: string; index?: number; values?: any[][]; } export declare class _TableColumns extends _GraphCollection { getByName(name: string): ITableColumn; } export interface ITableColumns extends _TableColumns, IAddable, IGetItemAt { } export declare const TableColumns: import("@pnp/graph").IGraphInvokableFactory; export declare class _WorkbookFilter extends _GraphInstance { apply(filter: WorkbookFilterType): Promise; clear(): Promise; } export interface IWorkbookFilter extends _WorkbookFilter { } export declare const WorkbookFilter: import("@pnp/graph").IGraphInvokableFactory; export declare class _TableSort extends _GraphInstance { apply(fields: WorkbookSortFieldType[], matchCase?: boolean, method?: string): Promise; clear(): Promise; reapply(): Promise; } export declare class ITableSort extends _TableSort { } export declare const TableSort: import("@pnp/graph").IGraphInvokableFactory; export declare class _PivotTable extends _GraphInstance { refresh(): Promise; } export interface IPivotTable extends _PivotTable { } export declare const PivotTable: import("@pnp/graph").IGraphInvokableFactory; export declare class _PivotTables extends _GraphCollection { refreshAll(): Promise; } export interface IPivotTables extends _PivotTables, IGetById { } export declare const PivotTables: import("@pnp/graph").IGraphInvokableFactory; interface IUpdateNamedItem { comment?: string; visible?: boolean; } export declare class _NamedItem extends _GraphInstance { get range(): IRange; } export interface INamedItem extends _NamedItem, IUpdateable { } export declare const NamedItem: import("@pnp/graph").IGraphInvokableFactory; interface IAddNamedItem { name: string; reference: string; comment: string; } export declare class _NamedItems extends _GraphCollection { /** * The NamedItem object contains string property named "value". * This causes an issue with the DefaultParse * parser (namely parseODataJSON), because it's set up to throw away * the rest of the object if it contains a field "value". * * Below I'm manually replacing the parser with JSONParse. This works, * but is unideal because it would replace any custom parser a user * may have set up earlier. * * I know the docs caution against making changes in the * core classes - my suggestion would be to change * the check in parseODataJSON from `hasOwnProperty` to something like * `typeof json["value"] === "object"`. Thoughts? */ add(item: IAddNamedItem): Promise; getByName(name: string): INamedItem; } export interface INamedItems extends _NamedItems { } export declare const NamedItems: import("@pnp/graph").IGraphInvokableFactory; export declare class _Comment extends _GraphInstance { get replies(): ICommentReplies; } export interface IComment extends _Comment { } export declare const Comment: import("@pnp/graph").IGraphInvokableFactory; export declare class _Comments extends _GraphCollection { } export interface IComments extends _Comments, IGetById { } export declare const Comments: import("@pnp/graph").IGraphInvokableFactory; export declare class _CommentReply extends _GraphInstance { } export interface ICommentReply extends _CommentReply { } export declare const CommentReply: import("@pnp/graph").IGraphInvokableFactory; export declare class _CommentReplies extends _GraphInstance { } export interface ICommentReplies extends _CommentReplies, IGetById, IAddable { } export declare const CommentReplies: import("@pnp/graph").IGraphInvokableFactory; export declare class _Application extends _GraphInstance { calculate(calculationType: "Recalculate" | "Full" | "FullRebuild"): Promise; } export interface IApplication extends _Application { } export declare const Application: import("@pnp/graph").IGraphInvokableFactory; export declare class _Operation extends _GraphInstance { } export interface IOperation extends _Operation { } export declare const Operation: import("@pnp/graph").IGraphInvokableFactory; export declare class _Operations extends _GraphCollection { } export interface IOperations extends _Operations, IGetById { } export declare const Operations: import("@pnp/graph").IGraphInvokableFactory; export declare class _Icon extends _GraphInstance { } export interface IIcon extends _Icon, IUpdateable { } export declare const Icon: import("@pnp/graph").IGraphInvokableFactory; export declare function getItemAt(factory: (...args: any[]) => R): any>(target: T) => { new (...args: any[]): { [x: string]: any; getItemAt(this: IGraphQueryable, index: number): R; }; } & T; export interface IGetItemAt { /** * Get an item based on its position in the collection. * @param index Index of the item to be retrieved. Zero-indexed. */ getItemAt(index: T): R; } /** * Adds the getRange method to the tagged class */ export declare function getRange(): {}>(target: T) => { new (...args: any[]): { getRange(this: IGraphQueryable): IRange; }; } & T; export interface IGetRange { /** * Get the range of cells contained by this element. */ getRange(): IRange; } export {}; //# sourceMappingURL=types.d.ts.map