@superdoc-dev/sdk 1.15.0-next.9 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -120,6 +120,9 @@ function createDocApi(runtime) {
120
120
  clearStyle: async (params, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.styles.paragraph.clearStyle"], params, options), "result"),
121
121
  },
122
122
  },
123
+ templates: {
124
+ apply: async (params, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.templates.apply"], params, options), "receipt"),
125
+ },
123
126
  create: {
124
127
  paragraph: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.create.paragraph"], params, options), "result"),
125
128
  heading: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.create.heading"], params, options), "result"),
@@ -642,6 +645,9 @@ function createBoundDocApi(runtime) {
642
645
  clearStyle: async (params, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.styles.paragraph.clearStyle"], params, options), "result"),
643
646
  },
644
647
  },
648
+ templates: {
649
+ apply: async (params, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.templates.apply"], params, options), "receipt"),
650
+ },
645
651
  create: {
646
652
  paragraph: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.create.paragraph"], params, options), "result"),
647
653
  heading: async (params = {}, options) => unwrapEnvelope(await runtime.invoke(contract.CONTRACT.operations["doc.create.heading"], params, options), "result"),
@@ -2962,6 +2962,24 @@ export interface DocStylesApplyParams {
2962
2962
  }>;
2963
2963
  });
2964
2964
  }
2965
+ export interface DocTemplatesApplyParams {
2966
+ doc?: string;
2967
+ sessionId?: string;
2968
+ out?: string;
2969
+ force?: boolean;
2970
+ expectedRevision?: number;
2971
+ changeMode?: string;
2972
+ dryRun?: boolean;
2973
+ source: ({
2974
+ kind: "path";
2975
+ path: string;
2976
+ }) | ({
2977
+ kind: "base64";
2978
+ data: string;
2979
+ filename?: string;
2980
+ });
2981
+ bodyPolicy?: "preserve";
2982
+ }
2965
2983
  export interface DocCreateParagraphParams {
2966
2984
  doc?: string;
2967
2985
  sessionId?: string;
@@ -3243,6 +3261,8 @@ export interface DocSectionsSetPageNumberingParams {
3243
3261
  };
3244
3262
  start?: number;
3245
3263
  format?: string;
3264
+ chapterStyle?: number;
3265
+ chapterSeparator?: string;
3246
3266
  }
3247
3267
  export interface DocSectionsSetTitlePageParams {
3248
3268
  doc?: string;
@@ -4989,6 +5009,7 @@ export interface DocTrackChangesDecideParams {
4989
5009
  storyType: "endnote";
4990
5010
  noteId: string;
4991
5011
  });
5012
+ range?: Record<string, unknown>;
4992
5013
  }) | ({
4993
5014
  kind: "range";
4994
5015
  range: {
@@ -18620,6 +18641,64 @@ export type DocStylesApplyResult = {
18620
18641
  tabStops?: Array<unknown> | "inherit";
18621
18642
  };
18622
18643
  };
18644
+ export type DocTemplatesApplyResult = {
18645
+ success: true;
18646
+ changed: boolean;
18647
+ dryRun: boolean;
18648
+ bodyPolicy: "preserve";
18649
+ source: {
18650
+ kind: "path" | "base64";
18651
+ fingerprint: string;
18652
+ partCount: number;
18653
+ };
18654
+ detectedScopes: Array<{
18655
+ scope: "styles" | "numbering" | "settings" | "theme" | "fontTable" | "webSettings" | "headersFooters" | "sectionDefaults";
18656
+ part: string;
18657
+ detail?: string;
18658
+ }>;
18659
+ appliedScopes: Array<{
18660
+ scope: "styles" | "numbering" | "settings" | "theme" | "fontTable" | "webSettings" | "headersFooters" | "sectionDefaults";
18661
+ part: string;
18662
+ detail?: string;
18663
+ }>;
18664
+ skippedScopes: Array<{
18665
+ scope: string;
18666
+ part?: string;
18667
+ reason: "NOT_PRESENT_IN_SOURCE" | "OUT_OF_SCOPE" | "NO_CHANGE" | "CAPABILITY_UNAVAILABLE";
18668
+ message: string;
18669
+ }>;
18670
+ unsupportedItems: Array<{
18671
+ part: string;
18672
+ category: string;
18673
+ reason: string;
18674
+ }>;
18675
+ changedParts: Array<{
18676
+ part: string;
18677
+ scope: "styles" | "numbering" | "settings" | "theme" | "fontTable" | "webSettings" | "headersFooters" | "sectionDefaults" | "package";
18678
+ change: "created" | "replaced" | "merged" | "imported";
18679
+ }>;
18680
+ idMappings: {
18681
+ styles?: Array<{
18682
+ kind: "style" | "numbering" | "relationship";
18683
+ from: string;
18684
+ to: string;
18685
+ }>;
18686
+ numbering?: Array<{
18687
+ kind: "style" | "numbering" | "relationship";
18688
+ from: string;
18689
+ to: string;
18690
+ }>;
18691
+ relationships?: Array<{
18692
+ kind: "style" | "numbering" | "relationship";
18693
+ from: string;
18694
+ to: string;
18695
+ }>;
18696
+ };
18697
+ warnings: Array<{
18698
+ code: string;
18699
+ message: string;
18700
+ }>;
18701
+ };
18623
18702
  export type DocCreateParagraphResult = {
18624
18703
  success: true;
18625
18704
  paragraph: {
@@ -18782,6 +18861,8 @@ export type DocSectionsListResult = {
18782
18861
  pageNumbering?: {
18783
18862
  start?: number;
18784
18863
  format?: "decimal" | "lowerLetter" | "upperLetter" | "lowerRoman" | "upperRoman" | "numberInDash";
18864
+ chapterStyle?: number;
18865
+ chapterSeparator?: "hyphen" | "period" | "colon" | "emDash" | "enDash";
18785
18866
  };
18786
18867
  titlePage?: boolean;
18787
18868
  oddEvenHeadersFooters?: boolean;
@@ -18848,6 +18929,8 @@ export type DocSectionsGetResult = {
18848
18929
  pageNumbering?: {
18849
18930
  start?: number;
18850
18931
  format?: "decimal" | "lowerLetter" | "upperLetter" | "lowerRoman" | "upperRoman" | "numberInDash";
18932
+ chapterStyle?: number;
18933
+ chapterSeparator?: "hyphen" | "period" | "colon" | "emDash" | "enDash";
18851
18934
  };
18852
18935
  titlePage?: boolean;
18853
18936
  oddEvenHeadersFooters?: boolean;
@@ -21768,6 +21851,12 @@ export type DocCapabilitiesGetResult = {
21768
21851
  dryRun: boolean;
21769
21852
  reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
21770
21853
  };
21854
+ "templates.apply": {
21855
+ available: boolean;
21856
+ tracked: boolean;
21857
+ dryRun: boolean;
21858
+ reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
21859
+ };
21771
21860
  "create.paragraph": {
21772
21861
  available: boolean;
21773
21862
  tracked: boolean;
@@ -30544,6 +30633,22 @@ export interface DocStylesApplyBoundParams {
30544
30633
  }>;
30545
30634
  });
30546
30635
  }
30636
+ export interface DocTemplatesApplyBoundParams {
30637
+ out?: string;
30638
+ force?: boolean;
30639
+ expectedRevision?: number;
30640
+ changeMode?: string;
30641
+ dryRun?: boolean;
30642
+ source: ({
30643
+ kind: "path";
30644
+ path: string;
30645
+ }) | ({
30646
+ kind: "base64";
30647
+ data: string;
30648
+ filename?: string;
30649
+ });
30650
+ bodyPolicy?: "preserve";
30651
+ }
30547
30652
  export interface DocCreateParagraphBoundParams {
30548
30653
  out?: string;
30549
30654
  force?: boolean;
@@ -30801,6 +30906,8 @@ export interface DocSectionsSetPageNumberingBoundParams {
30801
30906
  };
30802
30907
  start?: number;
30803
30908
  format?: string;
30909
+ chapterStyle?: number;
30910
+ chapterSeparator?: string;
30804
30911
  }
30805
30912
  export interface DocSectionsSetTitlePageBoundParams {
30806
30913
  out?: string;
@@ -32393,6 +32500,7 @@ export interface DocTrackChangesDecideBoundParams {
32393
32500
  storyType: "endnote";
32394
32501
  noteId: string;
32395
32502
  });
32503
+ range?: Record<string, unknown>;
32396
32504
  }) | ({
32397
32505
  kind: "range";
32398
32506
  range: {
@@ -37474,6 +37582,9 @@ export declare function createDocApi(runtime: RuntimeInvoker): {
37474
37582
  clearStyle: (params: DocStylesParagraphClearStyleParams, options?: InvokeOptions) => Promise<DocStylesParagraphClearStyleResult>;
37475
37583
  };
37476
37584
  };
37585
+ templates: {
37586
+ apply: (params: DocTemplatesApplyParams, options?: InvokeOptions) => Promise<DocTemplatesApplyResult>;
37587
+ };
37477
37588
  create: {
37478
37589
  paragraph: (params?: DocCreateParagraphParams, options?: InvokeOptions) => Promise<DocCreateParagraphResult>;
37479
37590
  heading: (params?: DocCreateHeadingParams, options?: InvokeOptions) => Promise<DocCreateHeadingResult>;
@@ -37992,6 +38103,9 @@ export declare function createBoundDocApi(runtime: RuntimeInvoker): {
37992
38103
  clearStyle: (params: DocStylesParagraphClearStyleBoundParams, options?: InvokeOptions) => Promise<DocStylesParagraphClearStyleResult>;
37993
38104
  };
37994
38105
  };
38106
+ templates: {
38107
+ apply: (params: DocTemplatesApplyBoundParams, options?: InvokeOptions) => Promise<DocTemplatesApplyResult>;
38108
+ };
37995
38109
  create: {
37996
38110
  paragraph: (params?: DocCreateParagraphBoundParams, options?: InvokeOptions) => Promise<DocCreateParagraphResult>;
37997
38111
  heading: (params?: DocCreateHeadingBoundParams, options?: InvokeOptions) => Promise<DocCreateHeadingResult>;