@unified-api/typescript-sdk 2.80.9 → 2.80.11
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 +6 -0
- package/examples/package-lock.json +1 -1
- package/funcs/messagingListMessagingChannels.js +1 -0
- package/funcs/messagingListMessagingChannels.js.map +1 -1
- package/funcs/messagingListMessagingMessages.js +1 -0
- package/funcs/messagingListMessagingMessages.js.map +1 -1
- package/funcs/unifiedCreateUnifiedEnvironment.d.ts +10 -0
- package/funcs/unifiedCreateUnifiedEnvironment.d.ts.map +1 -0
- package/funcs/unifiedCreateUnifiedEnvironment.js +107 -0
- package/funcs/unifiedCreateUnifiedEnvironment.js.map +1 -0
- package/funcs/unifiedListUnifiedEnvironments.d.ts +10 -0
- package/funcs/unifiedListUnifiedEnvironments.d.ts.map +1 -0
- package/funcs/unifiedListUnifiedEnvironments.js +97 -0
- package/funcs/unifiedListUnifiedEnvironments.js.map +1 -0
- package/funcs/unifiedRemoveUnifiedEnvironment.d.ts +11 -0
- package/funcs/unifiedRemoveUnifiedEnvironment.d.ts.map +1 -0
- package/funcs/unifiedRemoveUnifiedEnvironment.js +113 -0
- package/funcs/unifiedRemoveUnifiedEnvironment.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +3 -1
- package/lib/encodings.js.map +1 -1
- package/package.json +1 -1
- package/sdk/environment.d.ts +8 -0
- package/sdk/environment.d.ts.map +1 -0
- package/sdk/environment.js +24 -0
- package/sdk/environment.js.map +1 -0
- package/sdk/models/operations/index.d.ts +1 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +1 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listmessagingchannels.d.ts +2 -0
- package/sdk/models/operations/listmessagingchannels.d.ts.map +1 -1
- package/sdk/models/operations/listmessagingchannels.js +1 -0
- package/sdk/models/operations/listmessagingchannels.js.map +1 -1
- package/sdk/models/operations/listmessagingmessages.d.ts +2 -0
- package/sdk/models/operations/listmessagingmessages.d.ts.map +1 -1
- package/sdk/models/operations/listmessagingmessages.js +1 -0
- package/sdk/models/operations/listmessagingmessages.js.map +1 -1
- package/sdk/models/operations/removeunifiedenvironment.d.ts +12 -0
- package/sdk/models/operations/removeunifiedenvironment.d.ts.map +1 -0
- package/sdk/models/operations/removeunifiedenvironment.js +49 -0
- package/sdk/models/operations/removeunifiedenvironment.js.map +1 -0
- package/sdk/models/shared/commercecollection.d.ts +2 -0
- package/sdk/models/shared/commercecollection.d.ts.map +1 -1
- package/sdk/models/shared/commercecollection.js +4 -0
- package/sdk/models/shared/commercecollection.js.map +1 -1
- package/sdk/models/shared/commercemetadata.d.ts +4 -0
- package/sdk/models/shared/commercemetadata.d.ts.map +1 -1
- package/sdk/models/shared/commercemetadata.js +6 -0
- package/sdk/models/shared/commercemetadata.js.map +1 -1
- package/sdk/models/shared/commercesaleschannel.d.ts +0 -3
- package/sdk/models/shared/commercesaleschannel.d.ts.map +1 -1
- package/sdk/models/shared/commercesaleschannel.js +0 -5
- package/sdk/models/shared/commercesaleschannel.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/unified.d.ts +3 -0
- package/sdk/unified.d.ts.map +1 -1
- package/sdk/unified.js +12 -0
- package/sdk/unified.js.map +1 -1
- package/src/funcs/messagingListMessagingChannels.ts +1 -0
- package/src/funcs/messagingListMessagingMessages.ts +1 -0
- package/src/funcs/unifiedCreateUnifiedEnvironment.ts +153 -0
- package/src/funcs/unifiedListUnifiedEnvironments.ts +135 -0
- package/src/funcs/unifiedRemoveUnifiedEnvironment.ts +161 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +4 -3
- package/src/sdk/environment.ts +43 -0
- package/src/sdk/models/operations/index.ts +1 -0
- package/src/sdk/models/operations/listmessagingchannels.ts +3 -0
- package/src/sdk/models/operations/listmessagingmessages.ts +3 -0
- package/src/sdk/models/operations/removeunifiedenvironment.ts +33 -0
- package/src/sdk/models/shared/commercecollection.ts +6 -0
- package/src/sdk/models/shared/commercemetadata.ts +10 -0
- package/src/sdk/models/shared/commercesaleschannel.ts +0 -12
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/unified.ts +34 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { UnifiedToCore } from "../core.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
19
|
+
import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
|
|
20
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
21
|
+
import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
|
|
22
|
+
import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
23
|
+
import { Result } from "../sdk/types/fp.js";
|
|
24
|
+
|
|
25
|
+
export function unifiedListUnifiedEnvironments(
|
|
26
|
+
client: UnifiedToCore,
|
|
27
|
+
options?: RequestOptions,
|
|
28
|
+
): APIPromise<
|
|
29
|
+
Result<
|
|
30
|
+
Array<string>,
|
|
31
|
+
| UnifiedToError
|
|
32
|
+
| ResponseValidationError
|
|
33
|
+
| ConnectionError
|
|
34
|
+
| RequestAbortedError
|
|
35
|
+
| RequestTimeoutError
|
|
36
|
+
| InvalidRequestError
|
|
37
|
+
| UnexpectedClientError
|
|
38
|
+
| SDKValidationError
|
|
39
|
+
>
|
|
40
|
+
> {
|
|
41
|
+
return new APIPromise($do(
|
|
42
|
+
client,
|
|
43
|
+
options,
|
|
44
|
+
));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async function $do(
|
|
48
|
+
client: UnifiedToCore,
|
|
49
|
+
options?: RequestOptions,
|
|
50
|
+
): Promise<
|
|
51
|
+
[
|
|
52
|
+
Result<
|
|
53
|
+
Array<string>,
|
|
54
|
+
| UnifiedToError
|
|
55
|
+
| ResponseValidationError
|
|
56
|
+
| ConnectionError
|
|
57
|
+
| RequestAbortedError
|
|
58
|
+
| RequestTimeoutError
|
|
59
|
+
| InvalidRequestError
|
|
60
|
+
| UnexpectedClientError
|
|
61
|
+
| SDKValidationError
|
|
62
|
+
>,
|
|
63
|
+
APICall,
|
|
64
|
+
]
|
|
65
|
+
> {
|
|
66
|
+
const path = pathToFunc("/unified/environment")();
|
|
67
|
+
|
|
68
|
+
const headers = new Headers(compactMap({
|
|
69
|
+
Accept: "application/json",
|
|
70
|
+
}));
|
|
71
|
+
|
|
72
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
73
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
74
|
+
|
|
75
|
+
const context = {
|
|
76
|
+
options: client._options,
|
|
77
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
78
|
+
operationID: "listUnifiedEnvironments",
|
|
79
|
+
oAuth2Scopes: null,
|
|
80
|
+
|
|
81
|
+
resolvedSecurity: requestSecurity,
|
|
82
|
+
|
|
83
|
+
securitySource: client._options.security,
|
|
84
|
+
retryConfig: options?.retries
|
|
85
|
+
|| client._options.retryConfig
|
|
86
|
+
|| { strategy: "none" },
|
|
87
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const requestRes = client._createRequest(context, {
|
|
91
|
+
security: requestSecurity,
|
|
92
|
+
method: "GET",
|
|
93
|
+
baseURL: options?.serverURL,
|
|
94
|
+
path: path,
|
|
95
|
+
headers: headers,
|
|
96
|
+
userAgent: client._options.userAgent,
|
|
97
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
98
|
+
}, options);
|
|
99
|
+
if (!requestRes.ok) {
|
|
100
|
+
return [requestRes, { status: "invalid" }];
|
|
101
|
+
}
|
|
102
|
+
const req = requestRes.value;
|
|
103
|
+
|
|
104
|
+
const doResult = await client._do(req, {
|
|
105
|
+
context,
|
|
106
|
+
errorCodes: ["4XX", "5XX"],
|
|
107
|
+
retryConfig: context.retryConfig,
|
|
108
|
+
retryCodes: context.retryCodes,
|
|
109
|
+
});
|
|
110
|
+
if (!doResult.ok) {
|
|
111
|
+
return [doResult, { status: "request-error", request: req }];
|
|
112
|
+
}
|
|
113
|
+
const response = doResult.value;
|
|
114
|
+
|
|
115
|
+
const [result] = await M.match<
|
|
116
|
+
Array<string>,
|
|
117
|
+
| UnifiedToError
|
|
118
|
+
| ResponseValidationError
|
|
119
|
+
| ConnectionError
|
|
120
|
+
| RequestAbortedError
|
|
121
|
+
| RequestTimeoutError
|
|
122
|
+
| InvalidRequestError
|
|
123
|
+
| UnexpectedClientError
|
|
124
|
+
| SDKValidationError
|
|
125
|
+
>(
|
|
126
|
+
M.json(200, z.array(z.string())),
|
|
127
|
+
M.fail("4XX"),
|
|
128
|
+
M.fail("5XX"),
|
|
129
|
+
)(response, req);
|
|
130
|
+
if (!result.ok) {
|
|
131
|
+
return [result, { status: "complete", request: req, response }];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return [result, { status: "complete", request: req, response }];
|
|
135
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { UnifiedToCore } from "../core.js";
|
|
7
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
|
|
24
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
26
|
+
import { Result } from "../sdk/types/fp.js";
|
|
27
|
+
|
|
28
|
+
export function unifiedRemoveUnifiedEnvironment(
|
|
29
|
+
client: UnifiedToCore,
|
|
30
|
+
request: operations.RemoveUnifiedEnvironmentRequest,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): APIPromise<
|
|
33
|
+
Result<
|
|
34
|
+
Array<string>,
|
|
35
|
+
| UnifiedToError
|
|
36
|
+
| ResponseValidationError
|
|
37
|
+
| ConnectionError
|
|
38
|
+
| RequestAbortedError
|
|
39
|
+
| RequestTimeoutError
|
|
40
|
+
| InvalidRequestError
|
|
41
|
+
| UnexpectedClientError
|
|
42
|
+
| SDKValidationError
|
|
43
|
+
>
|
|
44
|
+
> {
|
|
45
|
+
return new APIPromise($do(
|
|
46
|
+
client,
|
|
47
|
+
request,
|
|
48
|
+
options,
|
|
49
|
+
));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function $do(
|
|
53
|
+
client: UnifiedToCore,
|
|
54
|
+
request: operations.RemoveUnifiedEnvironmentRequest,
|
|
55
|
+
options?: RequestOptions,
|
|
56
|
+
): Promise<
|
|
57
|
+
[
|
|
58
|
+
Result<
|
|
59
|
+
Array<string>,
|
|
60
|
+
| UnifiedToError
|
|
61
|
+
| ResponseValidationError
|
|
62
|
+
| ConnectionError
|
|
63
|
+
| RequestAbortedError
|
|
64
|
+
| RequestTimeoutError
|
|
65
|
+
| InvalidRequestError
|
|
66
|
+
| UnexpectedClientError
|
|
67
|
+
| SDKValidationError
|
|
68
|
+
>,
|
|
69
|
+
APICall,
|
|
70
|
+
]
|
|
71
|
+
> {
|
|
72
|
+
const parsed = safeParse(
|
|
73
|
+
request,
|
|
74
|
+
(value) =>
|
|
75
|
+
operations.RemoveUnifiedEnvironmentRequest$outboundSchema.parse(value),
|
|
76
|
+
"Input validation failed",
|
|
77
|
+
);
|
|
78
|
+
if (!parsed.ok) {
|
|
79
|
+
return [parsed, { status: "invalid" }];
|
|
80
|
+
}
|
|
81
|
+
const payload = parsed.value;
|
|
82
|
+
const body = null;
|
|
83
|
+
|
|
84
|
+
const pathParams = {
|
|
85
|
+
env: encodeSimple("env", payload.env, {
|
|
86
|
+
explode: false,
|
|
87
|
+
charEncoding: "percent",
|
|
88
|
+
}),
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const path = pathToFunc("/unified/environment/{env}")(pathParams);
|
|
92
|
+
|
|
93
|
+
const headers = new Headers(compactMap({
|
|
94
|
+
Accept: "application/json",
|
|
95
|
+
}));
|
|
96
|
+
|
|
97
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
98
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
99
|
+
|
|
100
|
+
const context = {
|
|
101
|
+
options: client._options,
|
|
102
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
103
|
+
operationID: "removeUnifiedEnvironment",
|
|
104
|
+
oAuth2Scopes: null,
|
|
105
|
+
|
|
106
|
+
resolvedSecurity: requestSecurity,
|
|
107
|
+
|
|
108
|
+
securitySource: client._options.security,
|
|
109
|
+
retryConfig: options?.retries
|
|
110
|
+
|| client._options.retryConfig
|
|
111
|
+
|| { strategy: "none" },
|
|
112
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const requestRes = client._createRequest(context, {
|
|
116
|
+
security: requestSecurity,
|
|
117
|
+
method: "DELETE",
|
|
118
|
+
baseURL: options?.serverURL,
|
|
119
|
+
path: path,
|
|
120
|
+
headers: headers,
|
|
121
|
+
body: body,
|
|
122
|
+
userAgent: client._options.userAgent,
|
|
123
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
124
|
+
}, options);
|
|
125
|
+
if (!requestRes.ok) {
|
|
126
|
+
return [requestRes, { status: "invalid" }];
|
|
127
|
+
}
|
|
128
|
+
const req = requestRes.value;
|
|
129
|
+
|
|
130
|
+
const doResult = await client._do(req, {
|
|
131
|
+
context,
|
|
132
|
+
errorCodes: ["4XX", "5XX"],
|
|
133
|
+
retryConfig: context.retryConfig,
|
|
134
|
+
retryCodes: context.retryCodes,
|
|
135
|
+
});
|
|
136
|
+
if (!doResult.ok) {
|
|
137
|
+
return [doResult, { status: "request-error", request: req }];
|
|
138
|
+
}
|
|
139
|
+
const response = doResult.value;
|
|
140
|
+
|
|
141
|
+
const [result] = await M.match<
|
|
142
|
+
Array<string>,
|
|
143
|
+
| UnifiedToError
|
|
144
|
+
| ResponseValidationError
|
|
145
|
+
| ConnectionError
|
|
146
|
+
| RequestAbortedError
|
|
147
|
+
| RequestTimeoutError
|
|
148
|
+
| InvalidRequestError
|
|
149
|
+
| UnexpectedClientError
|
|
150
|
+
| SDKValidationError
|
|
151
|
+
>(
|
|
152
|
+
M.json(200, z.array(z.string())),
|
|
153
|
+
M.fail("4XX"),
|
|
154
|
+
M.fail("5XX"),
|
|
155
|
+
)(response, req);
|
|
156
|
+
if (!result.ok) {
|
|
157
|
+
return [result, { status: "complete", request: req, response }];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return [result, { status: "complete", request: req, response }];
|
|
161
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "1.0",
|
|
76
|
-
sdkVersion: "2.80.
|
|
77
|
-
genVersion: "2.
|
|
76
|
+
sdkVersion: "2.80.11",
|
|
77
|
+
genVersion: "2.763.3",
|
|
78
78
|
userAgent:
|
|
79
|
-
"speakeasy-sdk/typescript 2.80.
|
|
79
|
+
"speakeasy-sdk/typescript 2.80.11 2.763.3 1.0 @unified-api/typescript-sdk",
|
|
80
80
|
} as const;
|
package/src/lib/encodings.ts
CHANGED
|
@@ -102,8 +102,9 @@ export function encodeLabel(
|
|
|
102
102
|
});
|
|
103
103
|
encValue = mapped?.join("").slice(1);
|
|
104
104
|
} else {
|
|
105
|
-
const k =
|
|
106
|
-
|
|
105
|
+
const k = options?.explode && isPlainObject(value)
|
|
106
|
+
? `${encodeString(pk)}=`
|
|
107
|
+
: "";
|
|
107
108
|
encValue = `${k}${encodeValue(pv)}`;
|
|
108
109
|
}
|
|
109
110
|
|
|
@@ -440,7 +441,7 @@ type BulkQueryEncoder = (
|
|
|
440
441
|
) => string;
|
|
441
442
|
|
|
442
443
|
export function queryEncoder(f: QueryEncoder): BulkQueryEncoder {
|
|
443
|
-
const bulkEncode = function
|
|
444
|
+
const bulkEncode = function(
|
|
444
445
|
values: Record<string, unknown>,
|
|
445
446
|
options?: QueryEncoderOptions,
|
|
446
447
|
): string {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { unifiedCreateUnifiedEnvironment } from "../funcs/unifiedCreateUnifiedEnvironment.js";
|
|
6
|
+
import { unifiedListUnifiedEnvironments } from "../funcs/unifiedListUnifiedEnvironments.js";
|
|
7
|
+
import { unifiedRemoveUnifiedEnvironment } from "../funcs/unifiedRemoveUnifiedEnvironment.js";
|
|
8
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import * as operations from "./models/operations/index.js";
|
|
10
|
+
import { unwrapAsync } from "./types/fp.js";
|
|
11
|
+
|
|
12
|
+
export class Environment extends ClientSDK {
|
|
13
|
+
async createUnifiedEnvironment(
|
|
14
|
+
request: Array<string>,
|
|
15
|
+
options?: RequestOptions,
|
|
16
|
+
): Promise<Array<string>> {
|
|
17
|
+
return unwrapAsync(unifiedCreateUnifiedEnvironment(
|
|
18
|
+
this,
|
|
19
|
+
request,
|
|
20
|
+
options,
|
|
21
|
+
));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async listUnifiedEnvironments(
|
|
25
|
+
options?: RequestOptions,
|
|
26
|
+
): Promise<Array<string>> {
|
|
27
|
+
return unwrapAsync(unifiedListUnifiedEnvironments(
|
|
28
|
+
this,
|
|
29
|
+
options,
|
|
30
|
+
));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async removeUnifiedEnvironment(
|
|
34
|
+
request: operations.RemoveUnifiedEnvironmentRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): Promise<Array<string>> {
|
|
37
|
+
return unwrapAsync(unifiedRemoveUnifiedEnvironment(
|
|
38
|
+
this,
|
|
39
|
+
request,
|
|
40
|
+
options,
|
|
41
|
+
));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -447,6 +447,7 @@ export * from "./removeuccomment.js";
|
|
|
447
447
|
export * from "./removeuccontact.js";
|
|
448
448
|
export * from "./removeucrecording.js";
|
|
449
449
|
export * from "./removeunifiedconnection.js";
|
|
450
|
+
export * from "./removeunifiedenvironment.js";
|
|
450
451
|
export * from "./removeunifiedwebhook.js";
|
|
451
452
|
export * from "./removeverificationrequest.js";
|
|
452
453
|
export * from "./updateaccountingaccount.js";
|
|
@@ -30,6 +30,7 @@ export type ListMessagingChannelsRequest = {
|
|
|
30
30
|
*/
|
|
31
31
|
raw?: string | undefined;
|
|
32
32
|
sort?: string | undefined;
|
|
33
|
+
type?: string | undefined;
|
|
33
34
|
/**
|
|
34
35
|
* Return only results whose updated date is equal or greater to this value
|
|
35
36
|
*/
|
|
@@ -47,6 +48,7 @@ export type ListMessagingChannelsRequest$Outbound = {
|
|
|
47
48
|
query?: string | undefined;
|
|
48
49
|
raw?: string | undefined;
|
|
49
50
|
sort?: string | undefined;
|
|
51
|
+
type?: string | undefined;
|
|
50
52
|
updated_gte?: string | undefined;
|
|
51
53
|
};
|
|
52
54
|
|
|
@@ -65,6 +67,7 @@ export const ListMessagingChannelsRequest$outboundSchema: z.ZodType<
|
|
|
65
67
|
query: z.string().optional(),
|
|
66
68
|
raw: z.string().optional(),
|
|
67
69
|
sort: z.string().optional(),
|
|
70
|
+
type: z.string().optional(),
|
|
68
71
|
updatedGte: z.string().optional(),
|
|
69
72
|
}).transform((v) => {
|
|
70
73
|
return remap$(v, {
|
|
@@ -50,6 +50,7 @@ export type ListMessagingMessagesRequest = {
|
|
|
50
50
|
* The start date to filter by
|
|
51
51
|
*/
|
|
52
52
|
startGte?: string | undefined;
|
|
53
|
+
type?: string | undefined;
|
|
53
54
|
/**
|
|
54
55
|
* Return only results whose updated date is equal or greater to this value
|
|
55
56
|
*/
|
|
@@ -80,6 +81,7 @@ export type ListMessagingMessagesRequest$Outbound = {
|
|
|
80
81
|
raw?: string | undefined;
|
|
81
82
|
sort?: string | undefined;
|
|
82
83
|
start_gte?: string | undefined;
|
|
84
|
+
type?: string | undefined;
|
|
83
85
|
updated_gte?: string | undefined;
|
|
84
86
|
user_id?: string | undefined;
|
|
85
87
|
user_mentioned_id?: string | undefined;
|
|
@@ -105,6 +107,7 @@ export const ListMessagingMessagesRequest$outboundSchema: z.ZodType<
|
|
|
105
107
|
raw: z.string().optional(),
|
|
106
108
|
sort: z.string().optional(),
|
|
107
109
|
startGte: z.string().optional(),
|
|
110
|
+
type: z.string().optional(),
|
|
108
111
|
updatedGte: z.string().optional(),
|
|
109
112
|
userId: z.string().optional(),
|
|
110
113
|
userMentionedId: z.string().optional(),
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type RemoveUnifiedEnvironmentRequest = {
|
|
8
|
+
env: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
export type RemoveUnifiedEnvironmentRequest$Outbound = {
|
|
13
|
+
env: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const RemoveUnifiedEnvironmentRequest$outboundSchema: z.ZodType<
|
|
18
|
+
RemoveUnifiedEnvironmentRequest$Outbound,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
RemoveUnifiedEnvironmentRequest
|
|
21
|
+
> = z.object({
|
|
22
|
+
env: z.string(),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export function removeUnifiedEnvironmentRequestToJSON(
|
|
26
|
+
removeUnifiedEnvironmentRequest: RemoveUnifiedEnvironmentRequest,
|
|
27
|
+
): string {
|
|
28
|
+
return JSON.stringify(
|
|
29
|
+
RemoveUnifiedEnvironmentRequest$outboundSchema.parse(
|
|
30
|
+
removeUnifiedEnvironmentRequest,
|
|
31
|
+
),
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -39,6 +39,7 @@ export type CommerceCollection = {
|
|
|
39
39
|
isActive?: boolean | undefined;
|
|
40
40
|
isFeatured?: boolean | undefined;
|
|
41
41
|
isVisible?: boolean | undefined;
|
|
42
|
+
itemMetadata?: Array<CommerceMetadata> | undefined;
|
|
42
43
|
media?: Array<CommerceItemMedia> | undefined;
|
|
43
44
|
metadata?: Array<CommerceMetadata> | undefined;
|
|
44
45
|
name: string;
|
|
@@ -77,6 +78,7 @@ export const CommerceCollection$inboundSchema: z.ZodType<
|
|
|
77
78
|
is_active: z.boolean().optional(),
|
|
78
79
|
is_featured: z.boolean().optional(),
|
|
79
80
|
is_visible: z.boolean().optional(),
|
|
81
|
+
item_metadata: z.array(CommerceMetadata$inboundSchema).optional(),
|
|
80
82
|
media: z.array(CommerceItemMedia$inboundSchema).optional(),
|
|
81
83
|
metadata: z.array(CommerceMetadata$inboundSchema).optional(),
|
|
82
84
|
name: z.string(),
|
|
@@ -94,6 +96,7 @@ export const CommerceCollection$inboundSchema: z.ZodType<
|
|
|
94
96
|
"is_active": "isActive",
|
|
95
97
|
"is_featured": "isFeatured",
|
|
96
98
|
"is_visible": "isVisible",
|
|
99
|
+
"item_metadata": "itemMetadata",
|
|
97
100
|
"parent_id": "parentId",
|
|
98
101
|
"public_description": "publicDescription",
|
|
99
102
|
"public_name": "publicName",
|
|
@@ -108,6 +111,7 @@ export type CommerceCollection$Outbound = {
|
|
|
108
111
|
is_active?: boolean | undefined;
|
|
109
112
|
is_featured?: boolean | undefined;
|
|
110
113
|
is_visible?: boolean | undefined;
|
|
114
|
+
item_metadata?: Array<CommerceMetadata$Outbound> | undefined;
|
|
111
115
|
media?: Array<CommerceItemMedia$Outbound> | undefined;
|
|
112
116
|
metadata?: Array<CommerceMetadata$Outbound> | undefined;
|
|
113
117
|
name: string;
|
|
@@ -132,6 +136,7 @@ export const CommerceCollection$outboundSchema: z.ZodType<
|
|
|
132
136
|
isActive: z.boolean().optional(),
|
|
133
137
|
isFeatured: z.boolean().optional(),
|
|
134
138
|
isVisible: z.boolean().optional(),
|
|
139
|
+
itemMetadata: z.array(CommerceMetadata$outboundSchema).optional(),
|
|
135
140
|
media: z.array(CommerceItemMedia$outboundSchema).optional(),
|
|
136
141
|
metadata: z.array(CommerceMetadata$outboundSchema).optional(),
|
|
137
142
|
name: z.string(),
|
|
@@ -148,6 +153,7 @@ export const CommerceCollection$outboundSchema: z.ZodType<
|
|
|
148
153
|
isActive: "is_active",
|
|
149
154
|
isFeatured: "is_featured",
|
|
150
155
|
isVisible: "is_visible",
|
|
156
|
+
itemMetadata: "item_metadata",
|
|
151
157
|
parentId: "parent_id",
|
|
152
158
|
publicDescription: "public_description",
|
|
153
159
|
publicName: "public_name",
|
|
@@ -54,6 +54,7 @@ export type CommerceMetadataValue =
|
|
|
54
54
|
| Array<CommerceMetadataSchemas1 | string | number | boolean>;
|
|
55
55
|
|
|
56
56
|
export type CommerceMetadata = {
|
|
57
|
+
description?: string | undefined;
|
|
57
58
|
extraData?:
|
|
58
59
|
| { [k: string]: any }
|
|
59
60
|
| string
|
|
@@ -63,6 +64,7 @@ export type CommerceMetadata = {
|
|
|
63
64
|
| undefined;
|
|
64
65
|
format?: CommerceMetadataFormat | undefined;
|
|
65
66
|
id?: string | undefined;
|
|
67
|
+
isRequired?: boolean | undefined;
|
|
66
68
|
key?: string | undefined;
|
|
67
69
|
namespace?: string | undefined;
|
|
68
70
|
slug?: string | undefined;
|
|
@@ -383,6 +385,7 @@ export const CommerceMetadata$inboundSchema: z.ZodType<
|
|
|
383
385
|
z.ZodTypeDef,
|
|
384
386
|
unknown
|
|
385
387
|
> = z.object({
|
|
388
|
+
description: z.string().optional(),
|
|
386
389
|
extra_data: z.union([
|
|
387
390
|
z.record(z.any()),
|
|
388
391
|
z.string(),
|
|
@@ -399,6 +402,7 @@ export const CommerceMetadata$inboundSchema: z.ZodType<
|
|
|
399
402
|
]).optional(),
|
|
400
403
|
format: CommerceMetadataFormat$inboundSchema.optional(),
|
|
401
404
|
id: z.string().optional(),
|
|
405
|
+
is_required: z.boolean().optional(),
|
|
402
406
|
key: z.string().optional(),
|
|
403
407
|
namespace: z.string().optional(),
|
|
404
408
|
slug: z.string().optional(),
|
|
@@ -420,10 +424,12 @@ export const CommerceMetadata$inboundSchema: z.ZodType<
|
|
|
420
424
|
}).transform((v) => {
|
|
421
425
|
return remap$(v, {
|
|
422
426
|
"extra_data": "extraData",
|
|
427
|
+
"is_required": "isRequired",
|
|
423
428
|
});
|
|
424
429
|
});
|
|
425
430
|
/** @internal */
|
|
426
431
|
export type CommerceMetadata$Outbound = {
|
|
432
|
+
description?: string | undefined;
|
|
427
433
|
extra_data?:
|
|
428
434
|
| { [k: string]: any }
|
|
429
435
|
| string
|
|
@@ -433,6 +439,7 @@ export type CommerceMetadata$Outbound = {
|
|
|
433
439
|
| undefined;
|
|
434
440
|
format?: string | undefined;
|
|
435
441
|
id?: string | undefined;
|
|
442
|
+
is_required?: boolean | undefined;
|
|
436
443
|
key?: string | undefined;
|
|
437
444
|
namespace?: string | undefined;
|
|
438
445
|
slug?: string | undefined;
|
|
@@ -452,6 +459,7 @@ export const CommerceMetadata$outboundSchema: z.ZodType<
|
|
|
452
459
|
z.ZodTypeDef,
|
|
453
460
|
CommerceMetadata
|
|
454
461
|
> = z.object({
|
|
462
|
+
description: z.string().optional(),
|
|
455
463
|
extraData: z.union([
|
|
456
464
|
z.record(z.any()),
|
|
457
465
|
z.string(),
|
|
@@ -468,6 +476,7 @@ export const CommerceMetadata$outboundSchema: z.ZodType<
|
|
|
468
476
|
]).optional(),
|
|
469
477
|
format: CommerceMetadataFormat$outboundSchema.optional(),
|
|
470
478
|
id: z.string().optional(),
|
|
479
|
+
isRequired: z.boolean().optional(),
|
|
471
480
|
key: z.string().optional(),
|
|
472
481
|
namespace: z.string().optional(),
|
|
473
482
|
slug: z.string().optional(),
|
|
@@ -489,6 +498,7 @@ export const CommerceMetadata$outboundSchema: z.ZodType<
|
|
|
489
498
|
}).transform((v) => {
|
|
490
499
|
return remap$(v, {
|
|
491
500
|
extraData: "extra_data",
|
|
501
|
+
isRequired: "is_required",
|
|
492
502
|
});
|
|
493
503
|
});
|
|
494
504
|
|
|
@@ -7,12 +7,6 @@ import { remap as remap$ } from "../../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
import {
|
|
11
|
-
CommerceMetadata,
|
|
12
|
-
CommerceMetadata$inboundSchema,
|
|
13
|
-
CommerceMetadata$Outbound,
|
|
14
|
-
CommerceMetadata$outboundSchema,
|
|
15
|
-
} from "./commercemetadata.js";
|
|
16
10
|
import {
|
|
17
11
|
CommerceReference,
|
|
18
12
|
CommerceReference$inboundSchema,
|
|
@@ -29,7 +23,6 @@ export type CommerceSaleschannel = {
|
|
|
29
23
|
description?: string | undefined;
|
|
30
24
|
id?: string | undefined;
|
|
31
25
|
isActive?: boolean | undefined;
|
|
32
|
-
itemMetadata?: Array<CommerceMetadata> | undefined;
|
|
33
26
|
raw?: { [k: string]: any } | undefined;
|
|
34
27
|
slug?: string | undefined;
|
|
35
28
|
updatedAt?: Date | undefined;
|
|
@@ -47,7 +40,6 @@ export const CommerceSaleschannel$inboundSchema: z.ZodType<
|
|
|
47
40
|
description: z.string().optional(),
|
|
48
41
|
id: z.string().optional(),
|
|
49
42
|
is_active: z.boolean().optional(),
|
|
50
|
-
item_metadata: z.array(CommerceMetadata$inboundSchema).optional(),
|
|
51
43
|
raw: z.record(z.any()).optional(),
|
|
52
44
|
slug: z.string().optional(),
|
|
53
45
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
@@ -56,7 +48,6 @@ export const CommerceSaleschannel$inboundSchema: z.ZodType<
|
|
|
56
48
|
return remap$(v, {
|
|
57
49
|
"created_at": "createdAt",
|
|
58
50
|
"is_active": "isActive",
|
|
59
|
-
"item_metadata": "itemMetadata",
|
|
60
51
|
"updated_at": "updatedAt",
|
|
61
52
|
});
|
|
62
53
|
});
|
|
@@ -67,7 +58,6 @@ export type CommerceSaleschannel$Outbound = {
|
|
|
67
58
|
description?: string | undefined;
|
|
68
59
|
id?: string | undefined;
|
|
69
60
|
is_active?: boolean | undefined;
|
|
70
|
-
item_metadata?: Array<CommerceMetadata$Outbound> | undefined;
|
|
71
61
|
raw?: { [k: string]: any } | undefined;
|
|
72
62
|
slug?: string | undefined;
|
|
73
63
|
updated_at?: string | undefined;
|
|
@@ -84,7 +74,6 @@ export const CommerceSaleschannel$outboundSchema: z.ZodType<
|
|
|
84
74
|
description: z.string().optional(),
|
|
85
75
|
id: z.string().optional(),
|
|
86
76
|
isActive: z.boolean().optional(),
|
|
87
|
-
itemMetadata: z.array(CommerceMetadata$outboundSchema).optional(),
|
|
88
77
|
raw: z.record(z.any()).optional(),
|
|
89
78
|
slug: z.string().optional(),
|
|
90
79
|
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
@@ -92,7 +81,6 @@ export const CommerceSaleschannel$outboundSchema: z.ZodType<
|
|
|
92
81
|
return remap$(v, {
|
|
93
82
|
createdAt: "created_at",
|
|
94
83
|
isActive: "is_active",
|
|
95
|
-
itemMetadata: "item_metadata",
|
|
96
84
|
updatedAt: "updated_at",
|
|
97
85
|
});
|
|
98
86
|
});
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -42,6 +42,7 @@ import { Document } from "./document.js";
|
|
|
42
42
|
import { Embedding } from "./embedding.js";
|
|
43
43
|
import { Employee } from "./employee.js";
|
|
44
44
|
import { Enrich } from "./enrich.js";
|
|
45
|
+
import { Environment } from "./environment.js";
|
|
45
46
|
import { Event } from "./event.js";
|
|
46
47
|
import { Expense } from "./expense.js";
|
|
47
48
|
import { FileT } from "./file.js";
|
|
@@ -631,6 +632,11 @@ export class UnifiedTo extends ClientSDK {
|
|
|
631
632
|
return (this._connection ??= new Connection(this._options));
|
|
632
633
|
}
|
|
633
634
|
|
|
635
|
+
private _environment?: Environment;
|
|
636
|
+
get environment(): Environment {
|
|
637
|
+
return (this._environment ??= new Environment(this._options));
|
|
638
|
+
}
|
|
639
|
+
|
|
634
640
|
private _integration?: Integration;
|
|
635
641
|
get integration(): Integration {
|
|
636
642
|
return (this._integration ??= new Integration(this._options));
|