syllable-sdk 0.1.0-alpha.2 → 0.1.0-alpha.3

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.
package/README.md CHANGED
@@ -196,12 +196,6 @@ run();
196
196
  * [list](docs/sdks/tools/README.md#list) - Tool List
197
197
  * [getByName](docs/sdks/tools/README.md#getbyname) - Tool Info
198
198
 
199
- ### [v1](docs/sdks/v1/README.md)
200
-
201
- * [getById](docs/sdks/v1/README.md#getbyid) - Get Label By Id
202
- * [create](docs/sdks/v1/README.md#create) - Create Label
203
- * [list](docs/sdks/v1/README.md#list) - Session Labels List
204
-
205
199
  </details>
206
200
  <!-- End Available Resources and Operations [operations] -->
207
201
 
@@ -260,9 +254,6 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
260
254
  - [`sessionsTranscriptGetById`](docs/sdks/transcript/README.md#getbyid) - Get Session Transcript By Id
261
255
  - [`toolsGetByName`](docs/sdks/tools/README.md#getbyname) - Tool Info
262
256
  - [`toolsList`](docs/sdks/tools/README.md#list) - Tool List
263
- - [`v1Create`](docs/sdks/v1/README.md#create) - Create Label
264
- - [`v1GetById`](docs/sdks/v1/README.md#getbyid) - Get Label By Id
265
- - [`v1List`](docs/sdks/v1/README.md#list) - Session Labels List
266
257
 
267
258
  </details>
268
259
  <!-- End Standalone functions [standalone-funcs] -->
package/lib/config.d.ts CHANGED
@@ -27,8 +27,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
27
27
  export declare const SDK_METADATA: {
28
28
  readonly language: "typescript";
29
29
  readonly openapiDocVersion: "0.0.2";
30
- readonly sdkVersion: "0.1.0-alpha.2";
30
+ readonly sdkVersion: "0.1.0-alpha.3";
31
31
  readonly genVersion: "2.457.2";
32
- readonly userAgent: "speakeasy-sdk/typescript 0.1.0-alpha.2 2.457.2 0.0.2 syllable-sdk";
32
+ readonly userAgent: "speakeasy-sdk/typescript 0.1.0-alpha.3 2.457.2 0.0.2 syllable-sdk";
33
33
  };
34
34
  //# sourceMappingURL=config.d.ts.map
package/lib/config.js CHANGED
@@ -36,8 +36,8 @@ function serverURLFromOptions(options) {
36
36
  exports.SDK_METADATA = {
37
37
  language: "typescript",
38
38
  openapiDocVersion: "0.0.2",
39
- sdkVersion: "0.1.0-alpha.2",
39
+ sdkVersion: "0.1.0-alpha.3",
40
40
  genVersion: "2.457.2",
41
- userAgent: "speakeasy-sdk/typescript 0.1.0-alpha.2 2.457.2 0.0.2 syllable-sdk",
41
+ userAgent: "speakeasy-sdk/typescript 0.1.0-alpha.3 2.457.2 0.0.2 syllable-sdk",
42
42
  };
43
43
  //# sourceMappingURL=config.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "syllable-sdk",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.3",
4
4
  "author": "Speakeasy",
5
5
  "main": "./index.js",
6
6
  "sideEffects": false,
package/sdk/sdk.d.ts CHANGED
@@ -9,7 +9,6 @@ import { Prompts } from "./prompts.js";
9
9
  import { SessionLabels } from "./sessionlabels.js";
10
10
  import { Sessions } from "./sessions.js";
11
11
  import { Tools } from "./tools.js";
12
- import { V1 } from "./v1.js";
13
12
  export declare class SyllableSDK extends ClientSDK {
14
13
  private _agents?;
15
14
  get agents(): Agents;
@@ -27,8 +26,6 @@ export declare class SyllableSDK extends ClientSDK {
27
26
  get prompts(): Prompts;
28
27
  private _sessionLabels?;
29
28
  get sessionLabels(): SessionLabels;
30
- private _v1?;
31
- get v1(): V1;
32
29
  private _sessions?;
33
30
  get sessions(): Sessions;
34
31
  private _tools?;
package/sdk/sdk.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAA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IAC3B,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,OAAO,CAAC,cAAc,CAAC,CAAgB;IACvC,IAAI,aAAa,IAAI,aAAa,CAEjC;IAED,OAAO,CAAC,SAAS,CAAC,CAAW;IAC7B,IAAI,QAAQ,IAAI,QAAQ,CAEvB;IAED,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,IAAI,KAAK,IAAI,KAAK,CAEjB;CACF"}
package/sdk/sdk.js CHANGED
@@ -15,7 +15,6 @@ const prompts_js_1 = require("./prompts.js");
15
15
  const sessionlabels_js_1 = require("./sessionlabels.js");
16
16
  const sessions_js_1 = require("./sessions.js");
17
17
  const tools_js_1 = require("./tools.js");
18
- const v1_js_1 = require("./v1.js");
19
18
  class SyllableSDK extends sdks_js_1.ClientSDK {
20
19
  get agents() {
21
20
  var _a;
@@ -49,10 +48,6 @@ class SyllableSDK extends sdks_js_1.ClientSDK {
49
48
  var _a;
50
49
  return ((_a = this._sessionLabels) !== null && _a !== void 0 ? _a : (this._sessionLabels = new sessionlabels_js_1.SessionLabels(this._options)));
51
50
  }
52
- get v1() {
53
- var _a;
54
- return ((_a = this._v1) !== null && _a !== void 0 ? _a : (this._v1 = new v1_js_1.V1(this._options)));
55
- }
56
51
  get sessions() {
57
52
  var _a;
58
53
  return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new sessions_js_1.Sessions(this._options)));
package/sdk/sdk.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,2CAAqC;AACrC,+CAAyC;AACzC,yDAAmD;AACnD,2DAAqD;AACrD,mDAA6C;AAC7C,2CAAqC;AACrC,6CAAuC;AACvC,yDAAmD;AACnD,+CAAyC;AACzC,yCAAmC;AACnC,mCAA6B;AAE7B,MAAa,WAAY,SAAQ,mBAAS;IAExC,IAAI,MAAM;;QACR,OAAO,OAAC,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AAU;;QACZ,OAAO,OAAC,IAAI,CAAC,WAAW,oCAAhB,IAAI,CAAC,WAAW,GAAK,IAAI,0BAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC9D,CAAC;IAGD,IAAI,MAAM;;QACR,OAAO,OAAC,IAAI,CAAC,OAAO,oCAAZ,IAAI,CAAC,OAAO,GAAK,IAAI,kBAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACtD,CAAC;IAGD,IAAI,cAAc;;QAChB,OAAO,OAAC,IAAI,CAAC,eAAe,oCAApB,IAAI,CAAC,eAAe,GAAK,IAAI,kCAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACtE,CAAC;IAGD,IAAI,OAAO;;QACT,OAAO,OAAC,IAAI,CAAC,QAAQ,oCAAb,IAAI,CAAC,QAAQ,GAAK,IAAI,oBAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACxD,CAAC;IAGD,IAAI,aAAa;;QACf,OAAO,OAAC,IAAI,CAAC,cAAc,oCAAnB,IAAI,CAAC,cAAc,GAAK,IAAI,gCAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpE,CAAC;IAGD,IAAI,QAAQ;;QACV,OAAO,OAAC,IAAI,CAAC,SAAS,oCAAd,IAAI,CAAC,SAAS,GAAK,IAAI,sBAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC1D,CAAC;IAGD,IAAI,KAAK;;QACP,OAAO,OAAC,IAAI,CAAC,MAAM,oCAAX,IAAI,CAAC,MAAM,GAAK,IAAI,gBAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpD,CAAC;CACF;AAlDD,kCAkDC"}
package/src/lib/config.ts CHANGED
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.0.2",
64
- sdkVersion: "0.1.0-alpha.2",
64
+ sdkVersion: "0.1.0-alpha.3",
65
65
  genVersion: "2.457.2",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 0.1.0-alpha.2 2.457.2 0.0.2 syllable-sdk",
67
+ "speakeasy-sdk/typescript 0.1.0-alpha.3 2.457.2 0.0.2 syllable-sdk",
68
68
  } as const;
package/src/sdk/sdk.ts CHANGED
@@ -13,7 +13,6 @@ import { Prompts } from "./prompts.js";
13
13
  import { SessionLabels } from "./sessionlabels.js";
14
14
  import { Sessions } from "./sessions.js";
15
15
  import { Tools } from "./tools.js";
16
- import { V1 } from "./v1.js";
17
16
 
18
17
  export class SyllableSDK extends ClientSDK {
19
18
  private _agents?: Agents;
@@ -56,11 +55,6 @@ export class SyllableSDK extends ClientSDK {
56
55
  return (this._sessionLabels ??= new SessionLabels(this._options));
57
56
  }
58
57
 
59
- private _v1?: V1;
60
- get v1(): V1 {
61
- return (this._v1 ??= new V1(this._options));
62
- }
63
-
64
58
  private _sessions?: Sessions;
65
59
  get sessions(): Sessions {
66
60
  return (this._sessions ??= new Sessions(this._options));
@@ -1,243 +0,0 @@
1
- # V1
2
- (*v1*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [getById](#getbyid) - Get Label By Id
9
- * [create](#create) - Create Label
10
- * [list](#list) - Session Labels List
11
-
12
- ## getById
13
-
14
- Get Label By Id
15
-
16
- ### Example Usage
17
-
18
- ```typescript
19
- import { SyllableSDK } from "syllable-sdk";
20
-
21
- const syllableSDK = new SyllableSDK({
22
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
23
- });
24
-
25
- async function run() {
26
- const result = await syllableSDK.v1.getById({
27
- sessionLabelId: 931598,
28
- });
29
-
30
- // Handle the result
31
- console.log(result);
32
- }
33
-
34
- run();
35
- ```
36
-
37
- ### Standalone function
38
-
39
- The standalone function version of this method:
40
-
41
- ```typescript
42
- import { SyllableSDKCore } from "syllable-sdk/core.js";
43
- import { v1GetById } from "syllable-sdk/funcs/v1GetById.js";
44
-
45
- // Use `SyllableSDKCore` for best tree-shaking performance.
46
- // You can create one instance of it to use across an application.
47
- const syllableSDK = new SyllableSDKCore({
48
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
49
- });
50
-
51
- async function run() {
52
- const res = await v1GetById(syllableSDK, {
53
- sessionLabelId: 931598,
54
- });
55
-
56
- if (!res.ok) {
57
- throw res.error;
58
- }
59
-
60
- const { value: result } = res;
61
-
62
- // Handle the result
63
- console.log(result);
64
- }
65
-
66
- run();
67
- ```
68
-
69
- ### Parameters
70
-
71
- | Parameter | Type | Required | Description |
72
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
73
- | `request` | [operations.SessionLabelGetByIdRequest](../../models/operations/sessionlabelgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
74
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
75
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
76
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
77
-
78
- ### Response
79
-
80
- **Promise\<[components.SessionLabel](../../models/components/sessionlabel.md)\>**
81
-
82
- ### Errors
83
-
84
- | Error Type | Status Code | Content Type |
85
- | -------------------------- | -------------------------- | -------------------------- |
86
- | errors.HTTPValidationError | 422 | application/json |
87
- | errors.SDKError | 4XX, 5XX | \*/\* |
88
-
89
- ## create
90
-
91
- Create a new label
92
-
93
- ### Example Usage
94
-
95
- ```typescript
96
- import { SyllableSDK } from "syllable-sdk";
97
-
98
- const syllableSDK = new SyllableSDK({
99
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
100
- });
101
-
102
- async function run() {
103
- const result = await syllableSDK.v1.create({
104
- sessionId: 486589,
105
- type: "<value>",
106
- code: "<value>",
107
- userEmail: "<value>",
108
- });
109
-
110
- // Handle the result
111
- console.log(result);
112
- }
113
-
114
- run();
115
- ```
116
-
117
- ### Standalone function
118
-
119
- The standalone function version of this method:
120
-
121
- ```typescript
122
- import { SyllableSDKCore } from "syllable-sdk/core.js";
123
- import { v1Create } from "syllable-sdk/funcs/v1Create.js";
124
-
125
- // Use `SyllableSDKCore` for best tree-shaking performance.
126
- // You can create one instance of it to use across an application.
127
- const syllableSDK = new SyllableSDKCore({
128
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
129
- });
130
-
131
- async function run() {
132
- const res = await v1Create(syllableSDK, {
133
- sessionId: 486589,
134
- type: "<value>",
135
- code: "<value>",
136
- userEmail: "<value>",
137
- });
138
-
139
- if (!res.ok) {
140
- throw res.error;
141
- }
142
-
143
- const { value: result } = res;
144
-
145
- // Handle the result
146
- console.log(result);
147
- }
148
-
149
- run();
150
- ```
151
-
152
- ### Parameters
153
-
154
- | Parameter | Type | Required | Description |
155
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
156
- | `request` | [components.SessionLabelCreate](../../models/components/sessionlabelcreate.md) | :heavy_check_mark: | The request object to use for the request. |
157
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
158
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
159
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
160
-
161
- ### Response
162
-
163
- **Promise\<[components.SessionLabel](../../models/components/sessionlabel.md)\>**
164
-
165
- ### Errors
166
-
167
- | Error Type | Status Code | Content Type |
168
- | -------------------------- | -------------------------- | -------------------------- |
169
- | errors.HTTPValidationError | 422 | application/json |
170
- | errors.SDKError | 4XX, 5XX | \*/\* |
171
-
172
- ## list
173
-
174
- Session Labels List
175
-
176
- ### Example Usage
177
-
178
- ```typescript
179
- import { SyllableSDK } from "syllable-sdk";
180
-
181
- const syllableSDK = new SyllableSDK({
182
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
183
- });
184
-
185
- async function run() {
186
- const result = await syllableSDK.v1.list({});
187
-
188
- // Handle the result
189
- console.log(result);
190
- }
191
-
192
- run();
193
- ```
194
-
195
- ### Standalone function
196
-
197
- The standalone function version of this method:
198
-
199
- ```typescript
200
- import { SyllableSDKCore } from "syllable-sdk/core.js";
201
- import { v1List } from "syllable-sdk/funcs/v1List.js";
202
-
203
- // Use `SyllableSDKCore` for best tree-shaking performance.
204
- // You can create one instance of it to use across an application.
205
- const syllableSDK = new SyllableSDKCore({
206
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
207
- });
208
-
209
- async function run() {
210
- const res = await v1List(syllableSDK, {});
211
-
212
- if (!res.ok) {
213
- throw res.error;
214
- }
215
-
216
- const { value: result } = res;
217
-
218
- // Handle the result
219
- console.log(result);
220
- }
221
-
222
- run();
223
- ```
224
-
225
- ### Parameters
226
-
227
- | Parameter | Type | Required | Description |
228
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
229
- | `request` | [operations.SessionLabelsListRequest](../../models/operations/sessionlabelslistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
230
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
231
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
232
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
233
-
234
- ### Response
235
-
236
- **Promise\<[components.ListResponseSessionLabel](../../models/components/listresponsesessionlabel.md)\>**
237
-
238
- ### Errors
239
-
240
- | Error Type | Status Code | Content Type |
241
- | -------------------------- | -------------------------- | -------------------------- |
242
- | errors.HTTPValidationError | 422 | application/json |
243
- | errors.SDKError | 4XX, 5XX | \*/\* |
@@ -1,16 +0,0 @@
1
- import { SyllableSDKCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import * as components from "../models/components/index.js";
4
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
- import * as errors from "../models/errors/index.js";
6
- import { SDKError } from "../models/errors/sdkerror.js";
7
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
- import { Result } from "../types/fp.js";
9
- /**
10
- * Create Label
11
- *
12
- * @remarks
13
- * Create a new label
14
- */
15
- export declare function v1Create(client: SyllableSDKCore, request: components.SessionLabelCreate, options?: RequestOptions): Promise<Result<components.SessionLabel, errors.HTTPValidationError | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
16
- //# sourceMappingURL=v1Create.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"v1Create.d.ts","sourceRoot":"","sources":["../src/funcs/v1Create.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAI7C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,YAAY,EACrB,MAAM,CAAC,mBAAmB,GAC1B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAoFA"}
package/funcs/v1Create.js DELETED
@@ -1,99 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.v1Create = v1Create;
30
- const encodings_js_1 = require("../lib/encodings.js");
31
- const M = __importStar(require("../lib/matchers.js"));
32
- const schemas_js_1 = require("../lib/schemas.js");
33
- const security_js_1 = require("../lib/security.js");
34
- const url_js_1 = require("../lib/url.js");
35
- const components = __importStar(require("../models/components/index.js"));
36
- const errors = __importStar(require("../models/errors/index.js"));
37
- /**
38
- * Create Label
39
- *
40
- * @remarks
41
- * Create a new label
42
- */
43
- async function v1Create(client, request, options) {
44
- const parsed = (0, schemas_js_1.safeParse)(request, (value) => components.SessionLabelCreate$outboundSchema.parse(value), "Input validation failed");
45
- if (!parsed.ok) {
46
- return parsed;
47
- }
48
- const payload = parsed.value;
49
- const body = (0, encodings_js_1.encodeJSON)("body", payload, { explode: true });
50
- const path = (0, url_js_1.pathToFunc)("/api/v1/session_labels/")();
51
- const headers = new Headers({
52
- "Content-Type": "application/json",
53
- Accept: "application/json",
54
- });
55
- const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKeyHeader);
56
- const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
57
- const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
58
- const context = {
59
- operationID: "session_label_create",
60
- oAuth2Scopes: [],
61
- resolvedSecurity: requestSecurity,
62
- securitySource: client._options.apiKeyHeader,
63
- retryConfig: (options === null || options === void 0 ? void 0 : options.retries)
64
- || client._options.retryConfig
65
- || { strategy: "none" },
66
- retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
67
- };
68
- const requestRes = client._createRequest(context, {
69
- security: requestSecurity,
70
- method: "POST",
71
- path: path,
72
- headers: headers,
73
- body: body,
74
- timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client._options.timeoutMs || -1,
75
- }, options);
76
- if (!requestRes.ok) {
77
- return requestRes;
78
- }
79
- const req = requestRes.value;
80
- const doResult = await client._do(req, {
81
- context,
82
- errorCodes: ["422", "4XX", "5XX"],
83
- retryConfig: context.retryConfig,
84
- retryCodes: context.retryCodes,
85
- });
86
- if (!doResult.ok) {
87
- return doResult;
88
- }
89
- const response = doResult.value;
90
- const responseFields = {
91
- HttpMeta: { Response: response, Request: req },
92
- };
93
- const [result] = await M.match(M.json(200, components.SessionLabel$inboundSchema), M.jsonErr(422, errors.HTTPValidationError$inboundSchema), M.fail(["4XX", "5XX"]))(response, { extraFields: responseFields });
94
- if (!result.ok) {
95
- return result;
96
- }
97
- return result;
98
- }
99
- //# sourceMappingURL=v1Create.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"v1Create.js","sourceRoot":"","sources":["../src/funcs/v1Create.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AA4BH,4BAoGC;AA7HD,sDAAiD;AACjD,sDAAwC;AACxC,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAQ5D,kEAAoD;AAKpD;;;;;GAKG;AACI,KAAK,UAAU,QAAQ,CAC5B,MAAuB,EACvB,OAAsC,EACtC,OAAwB;IAcxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,iCAAiC,CAAC,KAAK,CAAC,KAAK,CAAC,EACpE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;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
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import * as components from "../models/components/index.js";
4
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
- import * as errors from "../models/errors/index.js";
6
- import { SDKError } from "../models/errors/sdkerror.js";
7
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
- import * as operations from "../models/operations/index.js";
9
- import { Result } from "../types/fp.js";
10
- /**
11
- * Get Label By Id
12
- */
13
- export declare function v1GetById(client: SyllableSDKCore, request: operations.SessionLabelGetByIdRequest, options?: RequestOptions): Promise<Result<components.SessionLabel, errors.HTTPValidationError | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
14
- //# sourceMappingURL=v1GetById.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"v1GetById.d.ts","sourceRoot":"","sources":["../src/funcs/v1GetById.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAI7C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;GAEG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,YAAY,EACrB,MAAM,CAAC,mBAAmB,GAC1B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CA8FA"}
@@ -1,99 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.v1GetById = v1GetById;
30
- const encodings_js_1 = require("../lib/encodings.js");
31
- const M = __importStar(require("../lib/matchers.js"));
32
- const schemas_js_1 = require("../lib/schemas.js");
33
- const security_js_1 = require("../lib/security.js");
34
- const url_js_1 = require("../lib/url.js");
35
- const components = __importStar(require("../models/components/index.js"));
36
- const errors = __importStar(require("../models/errors/index.js"));
37
- const operations = __importStar(require("../models/operations/index.js"));
38
- /**
39
- * Get Label By Id
40
- */
41
- async function v1GetById(client, request, options) {
42
- const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.SessionLabelGetByIdRequest$outboundSchema.parse(value), "Input validation failed");
43
- if (!parsed.ok) {
44
- return parsed;
45
- }
46
- const payload = parsed.value;
47
- const body = null;
48
- const pathParams = {
49
- session_label_id: (0, encodings_js_1.encodeSimple)("session_label_id", payload.session_label_id, { explode: false, charEncoding: "percent" }),
50
- };
51
- const path = (0, url_js_1.pathToFunc)("/api/v1/session_labels/{session_label_id}")(pathParams);
52
- const headers = new Headers({
53
- Accept: "application/json",
54
- });
55
- const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKeyHeader);
56
- const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
57
- const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
58
- const context = {
59
- operationID: "session_label_get_by_id",
60
- oAuth2Scopes: [],
61
- resolvedSecurity: requestSecurity,
62
- securitySource: client._options.apiKeyHeader,
63
- retryConfig: (options === null || options === void 0 ? void 0 : options.retries)
64
- || client._options.retryConfig
65
- || { strategy: "none" },
66
- retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
67
- };
68
- const requestRes = client._createRequest(context, {
69
- security: requestSecurity,
70
- method: "GET",
71
- path: path,
72
- headers: headers,
73
- body: body,
74
- timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client._options.timeoutMs || -1,
75
- }, options);
76
- if (!requestRes.ok) {
77
- return requestRes;
78
- }
79
- const req = requestRes.value;
80
- const doResult = await client._do(req, {
81
- context,
82
- errorCodes: ["422", "4XX", "5XX"],
83
- retryConfig: context.retryConfig,
84
- retryCodes: context.retryCodes,
85
- });
86
- if (!doResult.ok) {
87
- return doResult;
88
- }
89
- const response = doResult.value;
90
- const responseFields = {
91
- HttpMeta: { Response: response, Request: req },
92
- };
93
- const [result] = await M.match(M.json(200, components.SessionLabel$inboundSchema), M.jsonErr(422, errors.HTTPValidationError$inboundSchema), M.fail(["4XX", "5XX"]))(response, { extraFields: responseFields });
94
- if (!result.ok) {
95
- return result;
96
- }
97
- return result;
98
- }
99
- //# sourceMappingURL=v1GetById.js.map