@superdoc-dev/sdk 1.15.0-next.20 → 1.15.0-next.21

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;
@@ -18622,6 +18640,64 @@ export type DocStylesApplyResult = {
18622
18640
  tabStops?: Array<unknown> | "inherit";
18623
18641
  };
18624
18642
  };
18643
+ export type DocTemplatesApplyResult = {
18644
+ success: true;
18645
+ changed: boolean;
18646
+ dryRun: boolean;
18647
+ bodyPolicy: "preserve";
18648
+ source: {
18649
+ kind: "path" | "base64";
18650
+ fingerprint: string;
18651
+ partCount: number;
18652
+ };
18653
+ detectedScopes: Array<{
18654
+ scope: "styles" | "numbering" | "settings" | "theme" | "fontTable" | "webSettings" | "headersFooters" | "sectionDefaults";
18655
+ part: string;
18656
+ detail?: string;
18657
+ }>;
18658
+ appliedScopes: Array<{
18659
+ scope: "styles" | "numbering" | "settings" | "theme" | "fontTable" | "webSettings" | "headersFooters" | "sectionDefaults";
18660
+ part: string;
18661
+ detail?: string;
18662
+ }>;
18663
+ skippedScopes: Array<{
18664
+ scope: string;
18665
+ part?: string;
18666
+ reason: "NOT_PRESENT_IN_SOURCE" | "OUT_OF_SCOPE" | "NO_CHANGE" | "CAPABILITY_UNAVAILABLE";
18667
+ message: string;
18668
+ }>;
18669
+ unsupportedItems: Array<{
18670
+ part: string;
18671
+ category: string;
18672
+ reason: string;
18673
+ }>;
18674
+ changedParts: Array<{
18675
+ part: string;
18676
+ scope: "styles" | "numbering" | "settings" | "theme" | "fontTable" | "webSettings" | "headersFooters" | "sectionDefaults" | "package";
18677
+ change: "created" | "replaced" | "merged" | "imported";
18678
+ }>;
18679
+ idMappings: {
18680
+ styles?: Array<{
18681
+ kind: "style" | "numbering" | "relationship";
18682
+ from: string;
18683
+ to: string;
18684
+ }>;
18685
+ numbering?: Array<{
18686
+ kind: "style" | "numbering" | "relationship";
18687
+ from: string;
18688
+ to: string;
18689
+ }>;
18690
+ relationships?: Array<{
18691
+ kind: "style" | "numbering" | "relationship";
18692
+ from: string;
18693
+ to: string;
18694
+ }>;
18695
+ };
18696
+ warnings: Array<{
18697
+ code: string;
18698
+ message: string;
18699
+ }>;
18700
+ };
18625
18701
  export type DocCreateParagraphResult = {
18626
18702
  success: true;
18627
18703
  paragraph: {
@@ -21774,6 +21850,12 @@ export type DocCapabilitiesGetResult = {
21774
21850
  dryRun: boolean;
21775
21851
  reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
21776
21852
  };
21853
+ "templates.apply": {
21854
+ available: boolean;
21855
+ tracked: boolean;
21856
+ dryRun: boolean;
21857
+ reasons?: Array<"COMMAND_UNAVAILABLE" | "HELPER_UNAVAILABLE" | "OPERATION_UNAVAILABLE" | "TRACKED_MODE_UNAVAILABLE" | "DRY_RUN_UNAVAILABLE" | "NAMESPACE_UNAVAILABLE" | "STYLES_PART_MISSING" | "COLLABORATION_ACTIVE">;
21858
+ };
21777
21859
  "create.paragraph": {
21778
21860
  available: boolean;
21779
21861
  tracked: boolean;
@@ -30550,6 +30632,22 @@ export interface DocStylesApplyBoundParams {
30550
30632
  }>;
30551
30633
  });
30552
30634
  }
30635
+ export interface DocTemplatesApplyBoundParams {
30636
+ out?: string;
30637
+ force?: boolean;
30638
+ expectedRevision?: number;
30639
+ changeMode?: string;
30640
+ dryRun?: boolean;
30641
+ source: ({
30642
+ kind: "path";
30643
+ path: string;
30644
+ }) | ({
30645
+ kind: "base64";
30646
+ data: string;
30647
+ filename?: string;
30648
+ });
30649
+ bodyPolicy?: "preserve";
30650
+ }
30553
30651
  export interface DocCreateParagraphBoundParams {
30554
30652
  out?: string;
30555
30653
  force?: boolean;
@@ -37482,6 +37580,9 @@ export declare function createDocApi(runtime: RuntimeInvoker): {
37482
37580
  clearStyle: (params: DocStylesParagraphClearStyleParams, options?: InvokeOptions) => Promise<DocStylesParagraphClearStyleResult>;
37483
37581
  };
37484
37582
  };
37583
+ templates: {
37584
+ apply: (params: DocTemplatesApplyParams, options?: InvokeOptions) => Promise<DocTemplatesApplyResult>;
37585
+ };
37485
37586
  create: {
37486
37587
  paragraph: (params?: DocCreateParagraphParams, options?: InvokeOptions) => Promise<DocCreateParagraphResult>;
37487
37588
  heading: (params?: DocCreateHeadingParams, options?: InvokeOptions) => Promise<DocCreateHeadingResult>;
@@ -38000,6 +38101,9 @@ export declare function createBoundDocApi(runtime: RuntimeInvoker): {
38000
38101
  clearStyle: (params: DocStylesParagraphClearStyleBoundParams, options?: InvokeOptions) => Promise<DocStylesParagraphClearStyleResult>;
38001
38102
  };
38002
38103
  };
38104
+ templates: {
38105
+ apply: (params: DocTemplatesApplyBoundParams, options?: InvokeOptions) => Promise<DocTemplatesApplyResult>;
38106
+ };
38003
38107
  create: {
38004
38108
  paragraph: (params?: DocCreateParagraphBoundParams, options?: InvokeOptions) => Promise<DocCreateParagraphResult>;
38005
38109
  heading: (params?: DocCreateHeadingBoundParams, options?: InvokeOptions) => Promise<DocCreateHeadingResult>;