@corti/sdk 1.2.0-templates-beta.1 → 1.2.0-templates-beta.2

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.
Files changed (127) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +6 -0
  3. package/dist/cjs/Client.js +26 -16
  4. package/dist/cjs/api/resources/index.d.ts +4 -1
  5. package/dist/cjs/api/resources/index.js +5 -2
  6. package/dist/cjs/api/resources/newSections/client/Client.d.ts +26 -0
  7. package/dist/cjs/api/resources/newSections/client/Client.js +124 -0
  8. package/dist/cjs/api/resources/newTemplates/client/Client.d.ts +26 -0
  9. package/dist/cjs/api/resources/newTemplates/client/Client.js +124 -0
  10. package/dist/cjs/api/resources/newTemplates/client/requests/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/newTemplates/client/requests/index.js +2 -0
  12. package/dist/cjs/api/resources/sections/client/Client.d.ts +0 -13
  13. package/dist/cjs/api/resources/sections/client/Client.js +0 -65
  14. package/dist/cjs/api/resources/sections/client/index.d.ts +1 -1
  15. package/dist/cjs/api/resources/sections/client/index.js +0 -15
  16. package/dist/cjs/api/resources/templates/client/Client.d.ts +0 -13
  17. package/dist/cjs/api/resources/templates/client/Client.js +0 -65
  18. package/dist/cjs/api/resources/templates/client/requests/index.d.ts +0 -1
  19. package/dist/cjs/api/types/StreamConfig.d.ts +3 -1
  20. package/dist/cjs/api/types/index.d.ts +0 -2
  21. package/dist/cjs/api/types/index.js +0 -2
  22. package/dist/cjs/serialization/resources/index.d.ts +4 -4
  23. package/dist/cjs/serialization/resources/index.js +5 -5
  24. package/dist/cjs/serialization/resources/newSections/client/index.d.ts +1 -0
  25. package/dist/cjs/serialization/resources/newSections/client/index.js +17 -0
  26. package/dist/cjs/serialization/resources/newSections/index.d.ts +1 -0
  27. package/dist/cjs/serialization/resources/newSections/index.js +17 -0
  28. package/dist/cjs/serialization/resources/newTemplates/client/index.d.ts +1 -0
  29. package/dist/cjs/serialization/resources/newTemplates/client/index.js +17 -0
  30. package/dist/cjs/serialization/resources/newTemplates/index.d.ts +1 -0
  31. package/dist/cjs/serialization/resources/newTemplates/index.js +17 -0
  32. package/dist/cjs/serialization/types/StreamConfig.d.ts +3 -2
  33. package/dist/cjs/serialization/types/StreamConfig.js +3 -2
  34. package/dist/cjs/serialization/types/index.d.ts +0 -2
  35. package/dist/cjs/serialization/types/index.js +0 -2
  36. package/dist/cjs/version.d.ts +1 -1
  37. package/dist/cjs/version.js +1 -1
  38. package/dist/esm/BaseClient.mjs +2 -2
  39. package/dist/esm/Client.d.mts +6 -0
  40. package/dist/esm/Client.mjs +10 -0
  41. package/dist/esm/api/resources/index.d.mts +4 -1
  42. package/dist/esm/api/resources/index.mjs +4 -1
  43. package/dist/esm/api/resources/newSections/client/Client.d.mts +26 -0
  44. package/dist/esm/api/resources/newSections/client/Client.mjs +87 -0
  45. package/dist/esm/api/resources/newTemplates/client/Client.d.mts +26 -0
  46. package/dist/esm/api/resources/newTemplates/client/Client.mjs +87 -0
  47. package/dist/esm/api/resources/newTemplates/client/requests/index.d.mts +1 -0
  48. package/dist/esm/api/resources/newTemplates/client/requests/index.mjs +1 -0
  49. package/dist/esm/api/resources/sections/client/Client.d.mts +0 -13
  50. package/dist/esm/api/resources/sections/client/Client.mjs +0 -65
  51. package/dist/esm/api/resources/sections/client/index.d.mts +1 -1
  52. package/dist/esm/api/resources/sections/client/index.mjs +1 -1
  53. package/dist/esm/api/resources/templates/client/Client.d.mts +0 -13
  54. package/dist/esm/api/resources/templates/client/Client.mjs +0 -65
  55. package/dist/esm/api/resources/templates/client/requests/index.d.mts +0 -1
  56. package/dist/esm/api/types/StreamConfig.d.mts +3 -1
  57. package/dist/esm/api/types/index.d.mts +0 -2
  58. package/dist/esm/api/types/index.mjs +0 -2
  59. package/dist/esm/serialization/resources/index.d.mts +4 -4
  60. package/dist/esm/serialization/resources/index.mjs +4 -4
  61. package/dist/esm/serialization/resources/newSections/client/index.d.mts +1 -0
  62. package/dist/esm/serialization/resources/newSections/client/index.mjs +1 -0
  63. package/dist/esm/serialization/resources/newSections/index.d.mts +1 -0
  64. package/dist/esm/serialization/resources/newSections/index.mjs +1 -0
  65. package/dist/esm/serialization/resources/newTemplates/client/index.d.mts +1 -0
  66. package/dist/esm/serialization/resources/newTemplates/client/index.mjs +1 -0
  67. package/dist/esm/serialization/resources/newTemplates/index.d.mts +1 -0
  68. package/dist/esm/serialization/resources/newTemplates/index.mjs +1 -0
  69. package/dist/esm/serialization/types/StreamConfig.d.mts +3 -2
  70. package/dist/esm/serialization/types/StreamConfig.mjs +3 -2
  71. package/dist/esm/serialization/types/index.d.mts +0 -2
  72. package/dist/esm/serialization/types/index.mjs +0 -2
  73. package/dist/esm/version.d.mts +1 -1
  74. package/dist/esm/version.mjs +1 -1
  75. package/package.json +1 -1
  76. package/dist/cjs/api/types/StreamConfigXCortiRetentionPolicy.d.ts +0 -6
  77. package/dist/cjs/api/types/StreamConfigXCortiRetentionPolicy.js +0 -9
  78. package/dist/cjs/serialization/types/StreamConfigXCortiRetentionPolicy.d.ts +0 -7
  79. package/dist/cjs/serialization/types/StreamConfigXCortiRetentionPolicy.js +0 -39
  80. package/dist/esm/api/types/StreamConfigXCortiRetentionPolicy.d.mts +0 -6
  81. package/dist/esm/api/types/StreamConfigXCortiRetentionPolicy.mjs +0 -6
  82. package/dist/esm/serialization/types/StreamConfigXCortiRetentionPolicy.d.mts +0 -7
  83. package/dist/esm/serialization/types/StreamConfigXCortiRetentionPolicy.mjs +0 -3
  84. /package/dist/cjs/{serialization/resources/sections → api/resources/newSections}/client/index.d.ts +0 -0
  85. /package/dist/cjs/{serialization/resources/sections → api/resources/newSections}/client/index.js +0 -0
  86. /package/dist/cjs/api/resources/{sections → newSections}/client/requests/UpdateSectionRequest.d.ts +0 -0
  87. /package/dist/cjs/api/resources/{sections → newSections}/client/requests/UpdateSectionRequest.js +0 -0
  88. /package/dist/cjs/api/resources/{sections → newSections}/client/requests/index.d.ts +0 -0
  89. /package/dist/cjs/api/resources/{sections → newSections}/client/requests/index.js +0 -0
  90. /package/dist/cjs/{serialization/resources/sections → api/resources/newSections}/index.d.ts +0 -0
  91. /package/dist/cjs/{serialization/resources/sections → api/resources/newSections}/index.js +0 -0
  92. /package/dist/cjs/{serialization/resources/templates → api/resources/newTemplates}/client/index.d.ts +0 -0
  93. /package/dist/cjs/{serialization/resources/templates → api/resources/newTemplates}/client/index.js +0 -0
  94. /package/dist/cjs/api/resources/{templates → newTemplates}/client/requests/UpdateTemplateRequest.d.ts +0 -0
  95. /package/dist/cjs/api/resources/{templates → newTemplates}/client/requests/UpdateTemplateRequest.js +0 -0
  96. /package/dist/cjs/{serialization/resources/templates → api/resources/newTemplates}/index.d.ts +0 -0
  97. /package/dist/cjs/{serialization/resources/templates → api/resources/newTemplates}/index.js +0 -0
  98. /package/dist/cjs/serialization/resources/{sections → newSections}/client/requests/UpdateSectionRequest.d.ts +0 -0
  99. /package/dist/cjs/serialization/resources/{sections → newSections}/client/requests/UpdateSectionRequest.js +0 -0
  100. /package/dist/cjs/serialization/resources/{sections → newSections}/client/requests/index.d.ts +0 -0
  101. /package/dist/cjs/serialization/resources/{sections → newSections}/client/requests/index.js +0 -0
  102. /package/dist/cjs/serialization/resources/{templates → newTemplates}/client/requests/UpdateTemplateRequest.d.ts +0 -0
  103. /package/dist/cjs/serialization/resources/{templates → newTemplates}/client/requests/UpdateTemplateRequest.js +0 -0
  104. /package/dist/cjs/serialization/resources/{templates → newTemplates}/client/requests/index.d.ts +0 -0
  105. /package/dist/cjs/serialization/resources/{templates → newTemplates}/client/requests/index.js +0 -0
  106. /package/dist/esm/{serialization/resources/sections → api/resources/newSections}/client/index.d.mts +0 -0
  107. /package/dist/esm/{serialization/resources/sections → api/resources/newSections}/client/index.mjs +0 -0
  108. /package/dist/esm/api/resources/{sections → newSections}/client/requests/UpdateSectionRequest.d.mts +0 -0
  109. /package/dist/esm/api/resources/{sections → newSections}/client/requests/UpdateSectionRequest.mjs +0 -0
  110. /package/dist/esm/api/resources/{sections → newSections}/client/requests/index.d.mts +0 -0
  111. /package/dist/esm/api/resources/{sections → newSections}/client/requests/index.mjs +0 -0
  112. /package/dist/esm/{serialization/resources/sections → api/resources/newSections}/index.d.mts +0 -0
  113. /package/dist/esm/{serialization/resources/sections → api/resources/newSections}/index.mjs +0 -0
  114. /package/dist/esm/{serialization/resources/templates → api/resources/newTemplates}/client/index.d.mts +0 -0
  115. /package/dist/esm/{serialization/resources/templates → api/resources/newTemplates}/client/index.mjs +0 -0
  116. /package/dist/esm/api/resources/{templates → newTemplates}/client/requests/UpdateTemplateRequest.d.mts +0 -0
  117. /package/dist/esm/api/resources/{templates → newTemplates}/client/requests/UpdateTemplateRequest.mjs +0 -0
  118. /package/dist/esm/{serialization/resources/templates → api/resources/newTemplates}/index.d.mts +0 -0
  119. /package/dist/esm/{serialization/resources/templates → api/resources/newTemplates}/index.mjs +0 -0
  120. /package/dist/esm/serialization/resources/{sections → newSections}/client/requests/UpdateSectionRequest.d.mts +0 -0
  121. /package/dist/esm/serialization/resources/{sections → newSections}/client/requests/UpdateSectionRequest.mjs +0 -0
  122. /package/dist/esm/serialization/resources/{sections → newSections}/client/requests/index.d.mts +0 -0
  123. /package/dist/esm/serialization/resources/{sections → newSections}/client/requests/index.mjs +0 -0
  124. /package/dist/esm/serialization/resources/{templates → newTemplates}/client/requests/UpdateTemplateRequest.d.mts +0 -0
  125. /package/dist/esm/serialization/resources/{templates → newTemplates}/client/requests/UpdateTemplateRequest.mjs +0 -0
  126. /package/dist/esm/serialization/resources/{templates → newTemplates}/client/requests/index.d.mts +0 -0
  127. /package/dist/esm/serialization/resources/{templates → newTemplates}/client/requests/index.mjs +0 -0
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@corti/sdk",
46
- "X-Fern-SDK-Version": "1.2.0-templates-beta.1",
47
- "User-Agent": "@corti/sdk/1.2.0-templates-beta.1",
46
+ "X-Fern-SDK-Version": "1.2.0-templates-beta.2",
47
+ "User-Agent": "@corti/sdk/1.2.0-templates-beta.2",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  "Tenant-Name": options === null || options === void 0 ? void 0 : options.tenantName,
@@ -4,6 +4,8 @@ import { CodesClient } from "./api/resources/codes/client/Client.js";
4
4
  import { DocumentsClient } from "./api/resources/documents/client/Client.js";
5
5
  import { FactsClient } from "./api/resources/facts/client/Client.js";
6
6
  import { InteractionsClient } from "./api/resources/interactions/client/Client.js";
7
+ import { NewSectionsClient } from "./api/resources/newSections/client/Client.js";
8
+ import { NewTemplatesClient } from "./api/resources/newTemplates/client/Client.js";
7
9
  import { RecordingsClient } from "./api/resources/recordings/client/Client.js";
8
10
  import { SectionsClient } from "./api/resources/sections/client/Client.js";
9
11
  import { SectionVersionsClient } from "./api/resources/sectionVersions/client/Client.js";
@@ -30,8 +32,10 @@ export declare class CortiClient {
30
32
  protected _documents: DocumentsClient | undefined;
31
33
  protected _templates: TemplatesClient | undefined;
32
34
  protected _codes: CodesClient | undefined;
35
+ protected _newTemplates: NewTemplatesClient | undefined;
33
36
  protected _templateVersions: TemplateVersionsClient | undefined;
34
37
  protected _sections: SectionsClient | undefined;
38
+ protected _newSections: NewSectionsClient | undefined;
35
39
  protected _sectionVersions: SectionVersionsClient | undefined;
36
40
  protected _agents: AgentsClient | undefined;
37
41
  protected _stream: StreamClient | undefined;
@@ -45,8 +49,10 @@ export declare class CortiClient {
45
49
  get documents(): DocumentsClient;
46
50
  get templates(): TemplatesClient;
47
51
  get codes(): CodesClient;
52
+ get newTemplates(): NewTemplatesClient;
48
53
  get templateVersions(): TemplateVersionsClient;
49
54
  get sections(): SectionsClient;
55
+ get newSections(): NewSectionsClient;
50
56
  get sectionVersions(): SectionVersionsClient;
51
57
  get agents(): AgentsClient;
52
58
  get stream(): StreamClient;
@@ -50,14 +50,16 @@ const Client_js_3 = require("./api/resources/codes/client/Client.js");
50
50
  const Client_js_4 = require("./api/resources/documents/client/Client.js");
51
51
  const Client_js_5 = require("./api/resources/facts/client/Client.js");
52
52
  const Client_js_6 = require("./api/resources/interactions/client/Client.js");
53
- const Client_js_7 = require("./api/resources/recordings/client/Client.js");
54
- const Client_js_8 = require("./api/resources/sections/client/Client.js");
55
- const Client_js_9 = require("./api/resources/sectionVersions/client/Client.js");
56
- const Client_js_10 = require("./api/resources/stream/client/Client.js");
57
- const Client_js_11 = require("./api/resources/templates/client/Client.js");
58
- const Client_js_12 = require("./api/resources/templateVersions/client/Client.js");
59
- const Client_js_13 = require("./api/resources/transcribe/client/Client.js");
60
- const Client_js_14 = require("./api/resources/transcripts/client/Client.js");
53
+ const Client_js_7 = require("./api/resources/newSections/client/Client.js");
54
+ const Client_js_8 = require("./api/resources/newTemplates/client/Client.js");
55
+ const Client_js_9 = require("./api/resources/recordings/client/Client.js");
56
+ const Client_js_10 = require("./api/resources/sections/client/Client.js");
57
+ const Client_js_11 = require("./api/resources/sectionVersions/client/Client.js");
58
+ const Client_js_12 = require("./api/resources/stream/client/Client.js");
59
+ const Client_js_13 = require("./api/resources/templates/client/Client.js");
60
+ const Client_js_14 = require("./api/resources/templateVersions/client/Client.js");
61
+ const Client_js_15 = require("./api/resources/transcribe/client/Client.js");
62
+ const Client_js_16 = require("./api/resources/transcripts/client/Client.js");
61
63
  const BaseClient_js_1 = require("./BaseClient.js");
62
64
  const headers_js_1 = require("./core/headers.js");
63
65
  const core = __importStar(require("./core/index.js"));
@@ -77,11 +79,11 @@ class CortiClient {
77
79
  }
78
80
  get recordings() {
79
81
  var _a;
80
- return ((_a = this._recordings) !== null && _a !== void 0 ? _a : (this._recordings = new Client_js_7.RecordingsClient(this._options)));
82
+ return ((_a = this._recordings) !== null && _a !== void 0 ? _a : (this._recordings = new Client_js_9.RecordingsClient(this._options)));
81
83
  }
82
84
  get transcripts() {
83
85
  var _a;
84
- return ((_a = this._transcripts) !== null && _a !== void 0 ? _a : (this._transcripts = new Client_js_14.TranscriptsClient(this._options)));
86
+ return ((_a = this._transcripts) !== null && _a !== void 0 ? _a : (this._transcripts = new Client_js_16.TranscriptsClient(this._options)));
85
87
  }
86
88
  get facts() {
87
89
  var _a;
@@ -93,23 +95,31 @@ class CortiClient {
93
95
  }
94
96
  get templates() {
95
97
  var _a;
96
- return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_js_11.TemplatesClient(this._options)));
98
+ return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_js_13.TemplatesClient(this._options)));
97
99
  }
98
100
  get codes() {
99
101
  var _a;
100
102
  return ((_a = this._codes) !== null && _a !== void 0 ? _a : (this._codes = new Client_js_3.CodesClient(this._options)));
101
103
  }
104
+ get newTemplates() {
105
+ var _a;
106
+ return ((_a = this._newTemplates) !== null && _a !== void 0 ? _a : (this._newTemplates = new Client_js_8.NewTemplatesClient(this._options)));
107
+ }
102
108
  get templateVersions() {
103
109
  var _a;
104
- return ((_a = this._templateVersions) !== null && _a !== void 0 ? _a : (this._templateVersions = new Client_js_12.TemplateVersionsClient(this._options)));
110
+ return ((_a = this._templateVersions) !== null && _a !== void 0 ? _a : (this._templateVersions = new Client_js_14.TemplateVersionsClient(this._options)));
105
111
  }
106
112
  get sections() {
107
113
  var _a;
108
- return ((_a = this._sections) !== null && _a !== void 0 ? _a : (this._sections = new Client_js_8.SectionsClient(this._options)));
114
+ return ((_a = this._sections) !== null && _a !== void 0 ? _a : (this._sections = new Client_js_10.SectionsClient(this._options)));
115
+ }
116
+ get newSections() {
117
+ var _a;
118
+ return ((_a = this._newSections) !== null && _a !== void 0 ? _a : (this._newSections = new Client_js_7.NewSectionsClient(this._options)));
109
119
  }
110
120
  get sectionVersions() {
111
121
  var _a;
112
- return ((_a = this._sectionVersions) !== null && _a !== void 0 ? _a : (this._sectionVersions = new Client_js_9.SectionVersionsClient(this._options)));
122
+ return ((_a = this._sectionVersions) !== null && _a !== void 0 ? _a : (this._sectionVersions = new Client_js_11.SectionVersionsClient(this._options)));
113
123
  }
114
124
  get agents() {
115
125
  var _a;
@@ -117,11 +127,11 @@ class CortiClient {
117
127
  }
118
128
  get stream() {
119
129
  var _a;
120
- return ((_a = this._stream) !== null && _a !== void 0 ? _a : (this._stream = new Client_js_10.StreamClient(this._options)));
130
+ return ((_a = this._stream) !== null && _a !== void 0 ? _a : (this._stream = new Client_js_12.StreamClient(this._options)));
121
131
  }
122
132
  get transcribe() {
123
133
  var _a;
124
- return ((_a = this._transcribe) !== null && _a !== void 0 ? _a : (this._transcribe = new Client_js_13.TranscribeClient(this._options)));
134
+ return ((_a = this._transcribe) !== null && _a !== void 0 ? _a : (this._transcribe = new Client_js_15.TranscribeClient(this._options)));
125
135
  }
126
136
  /**
127
137
  * @param {CortiClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -12,8 +12,11 @@ export * as facts from "./facts/index.js";
12
12
  export * from "./interactions/client/requests/index.js";
13
13
  export * as interactions from "./interactions/index.js";
14
14
  export * from "./interactions/types/index.js";
15
+ export * from "./newSections/client/requests/index.js";
16
+ export * as newSections from "./newSections/index.js";
17
+ export * from "./newTemplates/client/requests/index.js";
18
+ export * as newTemplates from "./newTemplates/index.js";
15
19
  export * as recordings from "./recordings/index.js";
16
- export * from "./sections/client/requests/index.js";
17
20
  export * as sections from "./sections/index.js";
18
21
  export * as sectionVersions from "./sectionVersions/index.js";
19
22
  export * as stream from "./stream/index.js";
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.transcripts = exports.transcribe = exports.templateVersions = exports.templates = exports.stream = exports.sectionVersions = exports.sections = exports.recordings = exports.interactions = exports.facts = exports.documents = exports.codes = exports.auth = exports.agents = void 0;
39
+ exports.transcripts = exports.transcribe = exports.templateVersions = exports.templates = exports.stream = exports.sectionVersions = exports.sections = exports.recordings = exports.newTemplates = exports.newSections = exports.interactions = exports.facts = exports.documents = exports.codes = exports.auth = exports.agents = void 0;
40
40
  __exportStar(require("./agents/client/requests/index.js"), exports);
41
41
  exports.agents = __importStar(require("./agents/index.js"));
42
42
  __exportStar(require("./agents/types/index.js"), exports);
@@ -51,8 +51,11 @@ exports.facts = __importStar(require("./facts/index.js"));
51
51
  __exportStar(require("./interactions/client/requests/index.js"), exports);
52
52
  exports.interactions = __importStar(require("./interactions/index.js"));
53
53
  __exportStar(require("./interactions/types/index.js"), exports);
54
+ __exportStar(require("./newSections/client/requests/index.js"), exports);
55
+ exports.newSections = __importStar(require("./newSections/index.js"));
56
+ __exportStar(require("./newTemplates/client/requests/index.js"), exports);
57
+ exports.newTemplates = __importStar(require("./newTemplates/index.js"));
54
58
  exports.recordings = __importStar(require("./recordings/index.js"));
55
- __exportStar(require("./sections/client/requests/index.js"), exports);
56
59
  exports.sections = __importStar(require("./sections/index.js"));
57
60
  exports.sectionVersions = __importStar(require("./sectionVersions/index.js"));
58
61
  exports.stream = __importStar(require("./stream/index.js"));
@@ -0,0 +1,26 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as Corti from "../../../index.js";
5
+ export declare namespace NewSectionsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class NewSectionsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<NewSectionsClient.Options>;
12
+ constructor(options: NewSectionsClient.Options);
13
+ /**
14
+ * @param {string} sectionID
15
+ * @param {Corti.UpdateSectionRequest} request
16
+ * @param {NewSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
17
+ *
18
+ * @throws {@link Corti.BadRequestError}
19
+ * @throws {@link Corti.NotFoundError}
20
+ *
21
+ * @example
22
+ * await client.newSections.update("sectionID")
23
+ */
24
+ update(sectionID: string, request?: Corti.UpdateSectionRequest, requestOptions?: NewSectionsClient.RequestOptions): core.HttpResponsePromise<Corti.Section>;
25
+ private __update;
26
+ }
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.NewSectionsClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../core/index.js"));
50
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
51
+ const errors = __importStar(require("../../../../errors/index.js"));
52
+ const serializers = __importStar(require("../../../../serialization/index.js"));
53
+ const Corti = __importStar(require("../../../index.js"));
54
+ class NewSectionsClient {
55
+ constructor(options) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * @param {string} sectionID
60
+ * @param {Corti.UpdateSectionRequest} request
61
+ * @param {NewSectionsClient.RequestOptions} requestOptions - Request-specific configuration.
62
+ *
63
+ * @throws {@link Corti.BadRequestError}
64
+ * @throws {@link Corti.NotFoundError}
65
+ *
66
+ * @example
67
+ * await client.newSections.update("sectionID")
68
+ */
69
+ update(sectionID, request = {}, requestOptions) {
70
+ return core.HttpResponsePromise.fromPromise(this.__update(sectionID, request, requestOptions));
71
+ }
72
+ __update(sectionID_1) {
73
+ return __awaiter(this, arguments, void 0, function* (sectionID, request = {}, requestOptions) {
74
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
75
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
76
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Tenant-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.tenantName }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
77
+ const _response = yield core.fetcher({
78
+ url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment)).base, `new/sections/${core.url.encodePathParam(sectionID)}`),
79
+ method: "PATCH",
80
+ headers: _headers,
81
+ contentType: "application/json",
82
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
83
+ requestType: "json",
84
+ body: serializers.UpdateSectionRequest.jsonOrThrow(request, {
85
+ unrecognizedObjectKeys: "strip",
86
+ omitUndefined: true,
87
+ }),
88
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
89
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
90
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
91
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
92
+ logging: this._options.logging,
93
+ });
94
+ if (_response.ok) {
95
+ return {
96
+ data: serializers.Section.parseOrThrow(_response.body, {
97
+ unrecognizedObjectKeys: "passthrough",
98
+ allowUnrecognizedUnionMembers: true,
99
+ allowUnrecognizedEnumValues: true,
100
+ skipValidation: true,
101
+ breadcrumbsPrefix: ["response"],
102
+ }),
103
+ rawResponse: _response.rawResponse,
104
+ };
105
+ }
106
+ if (_response.error.reason === "status-code") {
107
+ switch (_response.error.statusCode) {
108
+ case 400:
109
+ throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
110
+ case 404:
111
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
112
+ default:
113
+ throw new errors.CortiError({
114
+ statusCode: _response.error.statusCode,
115
+ body: _response.error.body,
116
+ rawResponse: _response.rawResponse,
117
+ });
118
+ }
119
+ }
120
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/new/sections/{sectionID}");
121
+ });
122
+ }
123
+ }
124
+ exports.NewSectionsClient = NewSectionsClient;
@@ -0,0 +1,26 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as Corti from "../../../index.js";
5
+ export declare namespace NewTemplatesClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class NewTemplatesClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<NewTemplatesClient.Options>;
12
+ constructor(options: NewTemplatesClient.Options);
13
+ /**
14
+ * @param {string} templateId
15
+ * @param {Corti.UpdateTemplateRequest} request
16
+ * @param {NewTemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
17
+ *
18
+ * @throws {@link Corti.BadRequestError}
19
+ * @throws {@link Corti.NotFoundError}
20
+ *
21
+ * @example
22
+ * await client.newTemplates.update("templateId")
23
+ */
24
+ update(templateId: string, request?: Corti.UpdateTemplateRequest, requestOptions?: NewTemplatesClient.RequestOptions): core.HttpResponsePromise<Corti.Template>;
25
+ private __update;
26
+ }
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.NewTemplatesClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../core/index.js"));
50
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
51
+ const errors = __importStar(require("../../../../errors/index.js"));
52
+ const serializers = __importStar(require("../../../../serialization/index.js"));
53
+ const Corti = __importStar(require("../../../index.js"));
54
+ class NewTemplatesClient {
55
+ constructor(options) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * @param {string} templateId
60
+ * @param {Corti.UpdateTemplateRequest} request
61
+ * @param {NewTemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
62
+ *
63
+ * @throws {@link Corti.BadRequestError}
64
+ * @throws {@link Corti.NotFoundError}
65
+ *
66
+ * @example
67
+ * await client.newTemplates.update("templateId")
68
+ */
69
+ update(templateId, request = {}, requestOptions) {
70
+ return core.HttpResponsePromise.fromPromise(this.__update(templateId, request, requestOptions));
71
+ }
72
+ __update(templateId_1) {
73
+ return __awaiter(this, arguments, void 0, function* (templateId, request = {}, requestOptions) {
74
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
75
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
76
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Tenant-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.tenantName }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
77
+ const _response = yield core.fetcher({
78
+ url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment)).base, `new/templates/${core.url.encodePathParam(templateId)}`),
79
+ method: "PATCH",
80
+ headers: _headers,
81
+ contentType: "application/json",
82
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
83
+ requestType: "json",
84
+ body: serializers.UpdateTemplateRequest.jsonOrThrow(request, {
85
+ unrecognizedObjectKeys: "strip",
86
+ omitUndefined: true,
87
+ }),
88
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
89
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
90
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
91
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
92
+ logging: this._options.logging,
93
+ });
94
+ if (_response.ok) {
95
+ return {
96
+ data: serializers.Template.parseOrThrow(_response.body, {
97
+ unrecognizedObjectKeys: "passthrough",
98
+ allowUnrecognizedUnionMembers: true,
99
+ allowUnrecognizedEnumValues: true,
100
+ skipValidation: true,
101
+ breadcrumbsPrefix: ["response"],
102
+ }),
103
+ rawResponse: _response.rawResponse,
104
+ };
105
+ }
106
+ if (_response.error.reason === "status-code") {
107
+ switch (_response.error.statusCode) {
108
+ case 400:
109
+ throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
110
+ case 404:
111
+ throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
112
+ default:
113
+ throw new errors.CortiError({
114
+ statusCode: _response.error.statusCode,
115
+ body: _response.error.body,
116
+ rawResponse: _response.rawResponse,
117
+ });
118
+ }
119
+ }
120
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/new/templates/{templateId}");
121
+ });
122
+ }
123
+ }
124
+ exports.NewTemplatesClient = NewTemplatesClient;
@@ -0,0 +1 @@
1
+ export type { UpdateTemplateRequest } from "./UpdateTemplateRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -32,17 +32,4 @@ export declare class SectionsClient {
32
32
  */
33
33
  delete(sectionID: string, requestOptions?: SectionsClient.RequestOptions): core.HttpResponsePromise<void>;
34
34
  private __delete;
35
- /**
36
- * @param {string} sectionID
37
- * @param {Corti.UpdateSectionRequest} request
38
- * @param {SectionsClient.RequestOptions} requestOptions - Request-specific configuration.
39
- *
40
- * @throws {@link Corti.BadRequestError}
41
- * @throws {@link Corti.NotFoundError}
42
- *
43
- * @example
44
- * await client.sections.patch("sectionID")
45
- */
46
- patch(sectionID: string, request?: Corti.UpdateSectionRequest, requestOptions?: SectionsClient.RequestOptions): core.HttpResponsePromise<Corti.Section>;
47
- private __patch;
48
35
  }
@@ -156,70 +156,5 @@ class SectionsClient {
156
156
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/new/sections/{sectionID}");
157
157
  });
158
158
  }
159
- /**
160
- * @param {string} sectionID
161
- * @param {Corti.UpdateSectionRequest} request
162
- * @param {SectionsClient.RequestOptions} requestOptions - Request-specific configuration.
163
- *
164
- * @throws {@link Corti.BadRequestError}
165
- * @throws {@link Corti.NotFoundError}
166
- *
167
- * @example
168
- * await client.sections.patch("sectionID")
169
- */
170
- patch(sectionID, request = {}, requestOptions) {
171
- return core.HttpResponsePromise.fromPromise(this.__patch(sectionID, request, requestOptions));
172
- }
173
- __patch(sectionID_1) {
174
- return __awaiter(this, arguments, void 0, function* (sectionID, request = {}, requestOptions) {
175
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
176
- const _authRequest = yield this._options.authProvider.getAuthRequest();
177
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Tenant-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.tenantName }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
178
- const _response = yield core.fetcher({
179
- url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment)).base, `new/sections/${core.url.encodePathParam(sectionID)}`),
180
- method: "PATCH",
181
- headers: _headers,
182
- contentType: "application/json",
183
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
184
- requestType: "json",
185
- body: serializers.UpdateSectionRequest.jsonOrThrow(request, {
186
- unrecognizedObjectKeys: "strip",
187
- omitUndefined: true,
188
- }),
189
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
190
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
191
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
192
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
193
- logging: this._options.logging,
194
- });
195
- if (_response.ok) {
196
- return {
197
- data: serializers.Section.parseOrThrow(_response.body, {
198
- unrecognizedObjectKeys: "passthrough",
199
- allowUnrecognizedUnionMembers: true,
200
- allowUnrecognizedEnumValues: true,
201
- skipValidation: true,
202
- breadcrumbsPrefix: ["response"],
203
- }),
204
- rawResponse: _response.rawResponse,
205
- };
206
- }
207
- if (_response.error.reason === "status-code") {
208
- switch (_response.error.statusCode) {
209
- case 400:
210
- throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
211
- case 404:
212
- throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
213
- default:
214
- throw new errors.CortiError({
215
- statusCode: _response.error.statusCode,
216
- body: _response.error.body,
217
- rawResponse: _response.rawResponse,
218
- });
219
- }
220
- }
221
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/new/sections/{sectionID}");
222
- });
223
- }
224
159
  }
225
160
  exports.SectionsClient = SectionsClient;
@@ -1 +1 @@
1
- export * from "./requests/index.js";
1
+ export {};
@@ -1,17 +1,2 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./requests/index.js"), exports);
@@ -74,17 +74,4 @@ export declare class TemplatesClient {
74
74
  */
75
75
  newTemplatesDelete(templateId: string, requestOptions?: TemplatesClient.RequestOptions): core.HttpResponsePromise<void>;
76
76
  private __newTemplatesDelete;
77
- /**
78
- * @param {string} templateId
79
- * @param {Corti.UpdateTemplateRequest} request
80
- * @param {TemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
81
- *
82
- * @throws {@link Corti.BadRequestError}
83
- * @throws {@link Corti.NotFoundError}
84
- *
85
- * @example
86
- * await client.templates.newTemplatesPatch("templateId")
87
- */
88
- newTemplatesPatch(templateId: string, request?: Corti.UpdateTemplateRequest, requestOptions?: TemplatesClient.RequestOptions): core.HttpResponsePromise<Corti.Template>;
89
- private __newTemplatesPatch;
90
77
  }