@unified-api/typescript-sdk 2.9.8 → 2.9.10
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 +33 -31
- package/docs/sdks/commerce/README.md +0 -494
- package/docs/sdks/metadata/README.md +42 -42
- package/funcs/{commerceCreateCommerceMetadata.d.ts → metadataCreateMetadataMetadata.d.ts} +2 -2
- package/funcs/{metadataUpdateCommerceMetadata.d.ts.map → metadataCreateMetadataMetadata.d.ts.map} +1 -1
- package/funcs/{commerceCreateCommerceMetadata.js → metadataCreateMetadataMetadata.js} +8 -8
- package/funcs/{metadataCreateCommerceMetadata.js.map → metadataCreateMetadataMetadata.js.map} +1 -1
- package/funcs/{metadataGetCommerceMetadata.d.ts → metadataGetMetadataMetadata.d.ts} +2 -2
- package/funcs/{commerceGetCommerceMetadata.d.ts.map → metadataGetMetadataMetadata.d.ts.map} +1 -1
- package/funcs/{commerceGetCommerceMetadata.js → metadataGetMetadataMetadata.js} +7 -7
- package/funcs/{commerceGetCommerceMetadata.js.map → metadataGetMetadataMetadata.js.map} +1 -1
- package/funcs/{metadataListCommerceMetadatas.d.ts → metadataListMetadataMetadatas.d.ts} +2 -2
- package/funcs/{commerceListCommerceMetadatas.d.ts.map → metadataListMetadataMetadatas.d.ts.map} +1 -1
- package/funcs/{commerceListCommerceMetadatas.js → metadataListMetadataMetadatas.js} +8 -7
- package/funcs/metadataListMetadataMetadatas.js.map +1 -0
- package/funcs/{metadataPatchCommerceMetadata.d.ts → metadataPatchMetadataMetadata.d.ts} +2 -2
- package/funcs/{commercePatchCommerceMetadata.d.ts.map → metadataPatchMetadataMetadata.d.ts.map} +1 -1
- package/funcs/{metadataPatchCommerceMetadata.js → metadataPatchMetadataMetadata.js} +8 -8
- package/funcs/{commercePatchCommerceMetadata.js.map → metadataPatchMetadataMetadata.js.map} +1 -1
- package/funcs/{commerceRemoveCommerceMetadata.d.ts → metadataRemoveMetadataMetadata.d.ts} +2 -2
- package/funcs/{commerceRemoveCommerceMetadata.d.ts.map → metadataRemoveMetadataMetadata.d.ts.map} +1 -1
- package/funcs/{commerceRemoveCommerceMetadata.js → metadataRemoveMetadataMetadata.js} +7 -7
- package/funcs/{commerceRemoveCommerceMetadata.js.map → metadataRemoveMetadataMetadata.js.map} +1 -1
- package/funcs/{commerceUpdateCommerceMetadata.d.ts → metadataUpdateMetadataMetadata.d.ts} +2 -2
- package/funcs/{commerceCreateCommerceMetadata.d.ts.map → metadataUpdateMetadataMetadata.d.ts.map} +1 -1
- package/funcs/{commerceUpdateCommerceMetadata.js → metadataUpdateMetadataMetadata.js} +8 -8
- package/funcs/{metadataUpdateCommerceMetadata.js.map → metadataUpdateMetadataMetadata.js.map} +1 -1
- package/funcs/passthroughCreatePassthroughJson.d.ts +1 -1
- package/funcs/passthroughCreatePassthroughJson.d.ts.map +1 -1
- package/funcs/passthroughCreatePassthroughJson.js +1 -1
- package/funcs/passthroughCreatePassthroughJson.js.map +1 -1
- package/funcs/passthroughCreatePassthroughRaw.d.ts +1 -1
- package/funcs/passthroughCreatePassthroughRaw.d.ts.map +1 -1
- package/funcs/passthroughCreatePassthroughRaw.js +1 -1
- package/funcs/passthroughCreatePassthroughRaw.js.map +1 -1
- package/funcs/passthroughListPassthroughs.d.ts +1 -1
- package/funcs/passthroughListPassthroughs.d.ts.map +1 -1
- package/funcs/passthroughListPassthroughs.js +1 -1
- package/funcs/passthroughListPassthroughs.js.map +1 -1
- package/funcs/passthroughPatchPassthroughJson.d.ts +1 -1
- package/funcs/passthroughPatchPassthroughJson.d.ts.map +1 -1
- package/funcs/passthroughPatchPassthroughJson.js +1 -1
- package/funcs/passthroughPatchPassthroughJson.js.map +1 -1
- package/funcs/passthroughPatchPassthroughRaw.d.ts +1 -1
- package/funcs/passthroughPatchPassthroughRaw.d.ts.map +1 -1
- package/funcs/passthroughPatchPassthroughRaw.js +1 -1
- package/funcs/passthroughPatchPassthroughRaw.js.map +1 -1
- package/funcs/passthroughRemovePassthrough.d.ts +1 -1
- package/funcs/passthroughRemovePassthrough.d.ts.map +1 -1
- package/funcs/passthroughRemovePassthrough.js +1 -1
- package/funcs/passthroughRemovePassthrough.js.map +1 -1
- package/funcs/passthroughUpdatePassthroughJson.d.ts +1 -1
- package/funcs/passthroughUpdatePassthroughJson.d.ts.map +1 -1
- package/funcs/passthroughUpdatePassthroughJson.js +1 -1
- package/funcs/passthroughUpdatePassthroughJson.js.map +1 -1
- package/funcs/passthroughUpdatePassthroughRaw.d.ts +1 -1
- package/funcs/passthroughUpdatePassthroughRaw.d.ts.map +1 -1
- package/funcs/passthroughUpdatePassthroughRaw.js +1 -1
- package/funcs/passthroughUpdatePassthroughRaw.js.map +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/package.json +1 -1
- package/sdk/commerce.d.ts +0 -24
- package/sdk/commerce.d.ts.map +1 -1
- package/sdk/commerce.js +0 -42
- package/sdk/commerce.js.map +1 -1
- package/sdk/metadata.d.ts +6 -6
- package/sdk/metadata.js +18 -18
- package/sdk/models/operations/createmetadatametadata.d.ts +40 -0
- package/sdk/models/operations/{createcommercemetadata.d.ts.map → createmetadatametadata.d.ts.map} +1 -1
- package/sdk/models/operations/{createcommercemetadata.js → createmetadatametadata.js} +21 -21
- package/sdk/models/operations/{createcommercemetadata.js.map → createmetadatametadata.js.map} +1 -1
- package/sdk/models/operations/getmetadatametadata.d.ts +42 -0
- package/sdk/models/operations/{getcommercemetadata.d.ts.map → getmetadatametadata.d.ts.map} +1 -1
- package/sdk/models/operations/{getcommercemetadata.js → getmetadatametadata.js} +17 -17
- package/sdk/models/operations/{getcommercemetadata.js.map → getmetadatametadata.js.map} +1 -1
- package/sdk/models/operations/getunifiedintegrationauth.d.ts +6 -6
- package/sdk/models/operations/getunifiedintegrationauth.js +2 -2
- package/sdk/models/operations/getunifiedintegrationauth.js.map +1 -1
- package/sdk/models/operations/index.d.ts +6 -6
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +6 -6
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/{listcommercemetadatas.d.ts → listmetadatametadatas.d.ts} +16 -14
- package/sdk/models/operations/listmetadatametadatas.d.ts.map +1 -0
- package/sdk/models/operations/{listcommercemetadatas.js → listmetadatametadatas.js} +19 -17
- package/sdk/models/operations/listmetadatametadatas.js.map +1 -0
- package/sdk/models/operations/listunifiedconnections.d.ts +3 -0
- package/sdk/models/operations/listunifiedconnections.d.ts.map +1 -1
- package/sdk/models/operations/listunifiedconnections.js +1 -0
- package/sdk/models/operations/listunifiedconnections.js.map +1 -1
- package/sdk/models/operations/listunifiedintegrations.d.ts +3 -0
- package/sdk/models/operations/listunifiedintegrations.d.ts.map +1 -1
- package/sdk/models/operations/listunifiedintegrations.js +1 -0
- package/sdk/models/operations/listunifiedintegrations.js.map +1 -1
- package/sdk/models/operations/listunifiedintegrationworkspaces.d.ts +3 -0
- package/sdk/models/operations/listunifiedintegrationworkspaces.d.ts.map +1 -1
- package/sdk/models/operations/listunifiedintegrationworkspaces.js +1 -0
- package/sdk/models/operations/listunifiedintegrationworkspaces.js.map +1 -1
- package/sdk/models/operations/patchmetadatametadata.d.ts +45 -0
- package/sdk/models/operations/{patchcommercemetadata.d.ts.map → patchmetadatametadata.d.ts.map} +1 -1
- package/sdk/models/operations/{patchcommercemetadata.js → patchmetadatametadata.js} +21 -21
- package/sdk/models/operations/{patchcommercemetadata.js.map → patchmetadatametadata.js.map} +1 -1
- package/sdk/models/operations/removemetadatametadata.d.ts +66 -0
- package/sdk/models/operations/{removecommercemetadata.d.ts.map → removemetadatametadata.d.ts.map} +1 -1
- package/sdk/models/operations/removemetadatametadata.js +105 -0
- package/sdk/models/operations/{removecommercemetadata.js.map → removemetadatametadata.js.map} +1 -1
- package/sdk/models/operations/updatemetadatametadata.d.ts +45 -0
- package/sdk/models/operations/{updatecommercemetadata.d.ts.map → updatemetadatametadata.d.ts.map} +1 -1
- package/sdk/models/operations/{updatecommercemetadata.js → updatemetadatametadata.js} +21 -21
- package/sdk/models/operations/{updatecommercemetadata.js.map → updatemetadatametadata.js.map} +1 -1
- package/sdk/models/shared/index.d.ts +1 -1
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +1 -1
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/messagingattachment.d.ts +2 -0
- package/sdk/models/shared/messagingattachment.d.ts.map +1 -1
- package/sdk/models/shared/messagingattachment.js +4 -0
- package/sdk/models/shared/messagingattachment.js.map +1 -1
- package/sdk/models/shared/metadatametadata.d.ts +51 -0
- package/sdk/models/shared/metadatametadata.d.ts.map +1 -0
- package/sdk/models/shared/metadatametadata.js +88 -0
- package/sdk/models/shared/metadatametadata.js.map +1 -0
- package/sdk/models/shared/propertyconnectioncategories.d.ts +3 -0
- package/sdk/models/shared/propertyconnectioncategories.d.ts.map +1 -1
- package/sdk/models/shared/propertyconnectioncategories.js +1 -0
- package/sdk/models/shared/propertyconnectioncategories.js.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.d.ts +6 -6
- package/sdk/models/shared/propertyconnectionpermissions.js +2 -2
- package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
- package/sdk/models/shared/propertyintegrationcategories.d.ts +3 -0
- package/sdk/models/shared/propertyintegrationcategories.d.ts.map +1 -1
- package/sdk/models/shared/propertyintegrationcategories.js +1 -0
- package/sdk/models/shared/propertyintegrationcategories.js.map +1 -1
- package/sdk/models/shared/webhook.d.ts +3 -3
- package/sdk/models/shared/webhook.js +1 -1
- package/sdk/models/shared/webhook.js.map +1 -1
- package/sdk/sdk.d.ts +2 -2
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -4
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/{metadataCreateCommerceMetadata.ts → metadataCreateMetadataMetadata.ts} +9 -9
- package/src/funcs/{commerceGetCommerceMetadata.ts → metadataGetMetadataMetadata.ts} +8 -8
- package/src/funcs/{commerceListCommerceMetadatas.ts → metadataListMetadataMetadatas.ts} +9 -8
- package/src/funcs/{metadataPatchCommerceMetadata.ts → metadataPatchMetadataMetadata.ts} +9 -9
- package/src/funcs/{metadataRemoveCommerceMetadata.ts → metadataRemoveMetadataMetadata.ts} +9 -9
- package/src/funcs/{commerceUpdateCommerceMetadata.ts → metadataUpdateMetadataMetadata.ts} +9 -9
- package/src/funcs/passthroughCreatePassthroughJson.ts +1 -1
- package/src/funcs/passthroughCreatePassthroughRaw.ts +1 -1
- package/src/funcs/passthroughListPassthroughs.ts +1 -1
- package/src/funcs/passthroughPatchPassthroughJson.ts +1 -1
- package/src/funcs/passthroughPatchPassthroughRaw.ts +1 -1
- package/src/funcs/passthroughRemovePassthrough.ts +1 -1
- package/src/funcs/passthroughUpdatePassthroughJson.ts +1 -1
- package/src/funcs/passthroughUpdatePassthroughRaw.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/sdk/commerce.ts +0 -90
- package/src/sdk/metadata.ts +30 -30
- package/src/sdk/models/operations/createmetadatametadata.ts +94 -0
- package/src/sdk/models/operations/{getcommercemetadata.ts → getmetadatametadata.ts} +21 -21
- package/src/sdk/models/operations/getunifiedintegrationauth.ts +2 -2
- package/src/sdk/models/operations/index.ts +6 -6
- package/src/sdk/models/operations/{listcommercemetadatas.ts → listmetadatametadatas.ts} +26 -22
- package/src/sdk/models/operations/listunifiedconnections.ts +1 -0
- package/src/sdk/models/operations/listunifiedintegrations.ts +1 -0
- package/src/sdk/models/operations/listunifiedintegrationworkspaces.ts +1 -0
- package/src/sdk/models/operations/patchmetadatametadata.ts +101 -0
- package/src/sdk/models/operations/removemetadatametadata.ts +155 -0
- package/src/sdk/models/operations/updatemetadatametadata.ts +101 -0
- package/src/sdk/models/shared/index.ts +1 -1
- package/src/sdk/models/shared/messagingattachment.ts +6 -0
- package/src/sdk/models/shared/metadatametadata.ts +109 -0
- package/src/sdk/models/shared/propertyconnectioncategories.ts +1 -0
- package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -2
- package/src/sdk/models/shared/propertyintegrationcategories.ts +1 -0
- package/src/sdk/models/shared/webhook.ts +1 -1
- package/src/sdk/sdk.ts +5 -5
- package/funcs/commerceCreateCommerceMetadata.js.map +0 -1
- package/funcs/commerceGetCommerceMetadata.d.ts +0 -13
- package/funcs/commerceListCommerceMetadatas.d.ts +0 -13
- package/funcs/commerceListCommerceMetadatas.js.map +0 -1
- package/funcs/commercePatchCommerceMetadata.d.ts +0 -13
- package/funcs/commercePatchCommerceMetadata.js +0 -106
- package/funcs/commerceUpdateCommerceMetadata.d.ts.map +0 -1
- package/funcs/commerceUpdateCommerceMetadata.js.map +0 -1
- package/funcs/metadataCreateCommerceMetadata.d.ts +0 -13
- package/funcs/metadataCreateCommerceMetadata.d.ts.map +0 -1
- package/funcs/metadataCreateCommerceMetadata.js +0 -102
- package/funcs/metadataGetCommerceMetadata.d.ts.map +0 -1
- package/funcs/metadataGetCommerceMetadata.js +0 -105
- package/funcs/metadataGetCommerceMetadata.js.map +0 -1
- package/funcs/metadataListCommerceMetadatas.d.ts.map +0 -1
- package/funcs/metadataListCommerceMetadatas.js +0 -108
- package/funcs/metadataListCommerceMetadatas.js.map +0 -1
- package/funcs/metadataPatchCommerceMetadata.d.ts.map +0 -1
- package/funcs/metadataPatchCommerceMetadata.js.map +0 -1
- package/funcs/metadataRemoveCommerceMetadata.d.ts +0 -12
- package/funcs/metadataRemoveCommerceMetadata.d.ts.map +0 -1
- package/funcs/metadataRemoveCommerceMetadata.js +0 -103
- package/funcs/metadataRemoveCommerceMetadata.js.map +0 -1
- package/funcs/metadataUpdateCommerceMetadata.d.ts +0 -13
- package/funcs/metadataUpdateCommerceMetadata.js +0 -106
- package/sdk/models/operations/createcommercemetadata.d.ts +0 -40
- package/sdk/models/operations/getcommercemetadata.d.ts +0 -42
- package/sdk/models/operations/listcommercemetadatas.d.ts.map +0 -1
- package/sdk/models/operations/listcommercemetadatas.js.map +0 -1
- package/sdk/models/operations/patchcommercemetadata.d.ts +0 -45
- package/sdk/models/operations/removecommercemetadata.d.ts +0 -66
- package/sdk/models/operations/removecommercemetadata.js +0 -105
- package/sdk/models/operations/updatecommercemetadata.d.ts +0 -45
- package/sdk/models/shared/commercemetadata.d.ts +0 -25
- package/sdk/models/shared/commercemetadata.d.ts.map +0 -1
- package/sdk/models/shared/commercemetadata.js +0 -55
- package/sdk/models/shared/commercemetadata.js.map +0 -1
- package/src/funcs/commerceCreateCommerceMetadata.ts +0 -133
- package/src/funcs/commercePatchCommerceMetadata.ts +0 -139
- package/src/funcs/commerceRemoveCommerceMetadata.ts +0 -144
- package/src/funcs/metadataGetCommerceMetadata.ts +0 -138
- package/src/funcs/metadataListCommerceMetadatas.ts +0 -139
- package/src/funcs/metadataUpdateCommerceMetadata.ts +0 -139
- package/src/sdk/models/operations/createcommercemetadata.ts +0 -94
- package/src/sdk/models/operations/patchcommercemetadata.ts +0 -101
- package/src/sdk/models/operations/removecommercemetadata.ts +0 -155
- package/src/sdk/models/operations/updatecommercemetadata.ts +0 -101
- package/src/sdk/models/shared/commercemetadata.ts +0 -58
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { UnifiedToCore } from "../core.js";
|
|
7
|
-
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
8
|
-
import * as M from "../lib/matchers.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../sdk/models/errors/httpclienterrors.js";
|
|
20
|
-
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
|
21
|
-
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
22
|
-
import * as operations from "../sdk/models/operations/index.js";
|
|
23
|
-
import * as shared from "../sdk/models/shared/index.js";
|
|
24
|
-
import { Result } from "../sdk/types/fp.js";
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* List all metadatas
|
|
28
|
-
*/
|
|
29
|
-
export async function metadataListCommerceMetadatas(
|
|
30
|
-
client: UnifiedToCore,
|
|
31
|
-
request: operations.ListCommerceMetadatasRequest,
|
|
32
|
-
options?: RequestOptions,
|
|
33
|
-
): Promise<
|
|
34
|
-
Result<
|
|
35
|
-
Array<shared.CommerceMetadata>,
|
|
36
|
-
| SDKError
|
|
37
|
-
| SDKValidationError
|
|
38
|
-
| UnexpectedClientError
|
|
39
|
-
| InvalidRequestError
|
|
40
|
-
| RequestAbortedError
|
|
41
|
-
| RequestTimeoutError
|
|
42
|
-
| ConnectionError
|
|
43
|
-
>
|
|
44
|
-
> {
|
|
45
|
-
const parsed = safeParse(
|
|
46
|
-
request,
|
|
47
|
-
(value) =>
|
|
48
|
-
operations.ListCommerceMetadatasRequest$outboundSchema.parse(value),
|
|
49
|
-
"Input validation failed",
|
|
50
|
-
);
|
|
51
|
-
if (!parsed.ok) {
|
|
52
|
-
return parsed;
|
|
53
|
-
}
|
|
54
|
-
const payload = parsed.value;
|
|
55
|
-
const body = null;
|
|
56
|
-
|
|
57
|
-
const pathParams = {
|
|
58
|
-
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
59
|
-
explode: false,
|
|
60
|
-
charEncoding: "percent",
|
|
61
|
-
}),
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
const path = pathToFunc("/commerce/{connection_id}/metadata")(pathParams);
|
|
65
|
-
|
|
66
|
-
const query = encodeFormQuery({
|
|
67
|
-
"fields": payload.fields,
|
|
68
|
-
"limit": payload.limit,
|
|
69
|
-
"offset": payload.offset,
|
|
70
|
-
"order": payload.order,
|
|
71
|
-
"query": payload.query,
|
|
72
|
-
"sort": payload.sort,
|
|
73
|
-
"updated_gte": payload.updated_gte,
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
const headers = new Headers({
|
|
77
|
-
Accept: "application/json",
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
const securityInput = await extractSecurity(client._options.security);
|
|
81
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
82
|
-
|
|
83
|
-
const context = {
|
|
84
|
-
operationID: "listCommerceMetadatas",
|
|
85
|
-
oAuth2Scopes: [],
|
|
86
|
-
|
|
87
|
-
resolvedSecurity: requestSecurity,
|
|
88
|
-
|
|
89
|
-
securitySource: client._options.security,
|
|
90
|
-
retryConfig: options?.retries
|
|
91
|
-
|| client._options.retryConfig
|
|
92
|
-
|| { strategy: "none" },
|
|
93
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
const requestRes = client._createRequest(context, {
|
|
97
|
-
security: requestSecurity,
|
|
98
|
-
method: "GET",
|
|
99
|
-
path: path,
|
|
100
|
-
headers: headers,
|
|
101
|
-
query: query,
|
|
102
|
-
body: body,
|
|
103
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
104
|
-
}, options);
|
|
105
|
-
if (!requestRes.ok) {
|
|
106
|
-
return requestRes;
|
|
107
|
-
}
|
|
108
|
-
const req = requestRes.value;
|
|
109
|
-
|
|
110
|
-
const doResult = await client._do(req, {
|
|
111
|
-
context,
|
|
112
|
-
errorCodes: ["4XX", "5XX"],
|
|
113
|
-
retryConfig: context.retryConfig,
|
|
114
|
-
retryCodes: context.retryCodes,
|
|
115
|
-
});
|
|
116
|
-
if (!doResult.ok) {
|
|
117
|
-
return doResult;
|
|
118
|
-
}
|
|
119
|
-
const response = doResult.value;
|
|
120
|
-
|
|
121
|
-
const [result] = await M.match<
|
|
122
|
-
Array<shared.CommerceMetadata>,
|
|
123
|
-
| SDKError
|
|
124
|
-
| SDKValidationError
|
|
125
|
-
| UnexpectedClientError
|
|
126
|
-
| InvalidRequestError
|
|
127
|
-
| RequestAbortedError
|
|
128
|
-
| RequestTimeoutError
|
|
129
|
-
| ConnectionError
|
|
130
|
-
>(
|
|
131
|
-
M.json(200, z.array(shared.CommerceMetadata$inboundSchema)),
|
|
132
|
-
M.fail(["4XX", "5XX"]),
|
|
133
|
-
)(response);
|
|
134
|
-
if (!result.ok) {
|
|
135
|
-
return result;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
return result;
|
|
139
|
-
}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { UnifiedToCore } from "../core.js";
|
|
6
|
-
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { safeParse } from "../lib/schemas.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 { SDKError } from "../sdk/models/errors/sdkerror.js";
|
|
20
|
-
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
21
|
-
import * as operations from "../sdk/models/operations/index.js";
|
|
22
|
-
import * as shared from "../sdk/models/shared/index.js";
|
|
23
|
-
import { Result } from "../sdk/types/fp.js";
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Update a metadata
|
|
27
|
-
*/
|
|
28
|
-
export async function metadataUpdateCommerceMetadata(
|
|
29
|
-
client: UnifiedToCore,
|
|
30
|
-
request: operations.UpdateCommerceMetadataRequest,
|
|
31
|
-
options?: RequestOptions,
|
|
32
|
-
): Promise<
|
|
33
|
-
Result<
|
|
34
|
-
shared.CommerceMetadata,
|
|
35
|
-
| SDKError
|
|
36
|
-
| SDKValidationError
|
|
37
|
-
| UnexpectedClientError
|
|
38
|
-
| InvalidRequestError
|
|
39
|
-
| RequestAbortedError
|
|
40
|
-
| RequestTimeoutError
|
|
41
|
-
| ConnectionError
|
|
42
|
-
>
|
|
43
|
-
> {
|
|
44
|
-
const parsed = safeParse(
|
|
45
|
-
request,
|
|
46
|
-
(value) =>
|
|
47
|
-
operations.UpdateCommerceMetadataRequest$outboundSchema.parse(value),
|
|
48
|
-
"Input validation failed",
|
|
49
|
-
);
|
|
50
|
-
if (!parsed.ok) {
|
|
51
|
-
return parsed;
|
|
52
|
-
}
|
|
53
|
-
const payload = parsed.value;
|
|
54
|
-
const body = encodeJSON("body", payload.CommerceMetadata, { explode: true });
|
|
55
|
-
|
|
56
|
-
const pathParams = {
|
|
57
|
-
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
58
|
-
explode: false,
|
|
59
|
-
charEncoding: "percent",
|
|
60
|
-
}),
|
|
61
|
-
id: encodeSimple("id", payload.id, {
|
|
62
|
-
explode: false,
|
|
63
|
-
charEncoding: "percent",
|
|
64
|
-
}),
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
const path = pathToFunc("/commerce/{connection_id}/metadata/{id}")(
|
|
68
|
-
pathParams,
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
const query = encodeFormQuery({
|
|
72
|
-
"fields": payload.fields,
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
const headers = new Headers({
|
|
76
|
-
"Content-Type": "application/json",
|
|
77
|
-
Accept: "application/json",
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
const securityInput = await extractSecurity(client._options.security);
|
|
81
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
82
|
-
|
|
83
|
-
const context = {
|
|
84
|
-
operationID: "updateCommerceMetadata",
|
|
85
|
-
oAuth2Scopes: [],
|
|
86
|
-
|
|
87
|
-
resolvedSecurity: requestSecurity,
|
|
88
|
-
|
|
89
|
-
securitySource: client._options.security,
|
|
90
|
-
retryConfig: options?.retries
|
|
91
|
-
|| client._options.retryConfig
|
|
92
|
-
|| { strategy: "none" },
|
|
93
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
const requestRes = client._createRequest(context, {
|
|
97
|
-
security: requestSecurity,
|
|
98
|
-
method: "PUT",
|
|
99
|
-
path: path,
|
|
100
|
-
headers: headers,
|
|
101
|
-
query: query,
|
|
102
|
-
body: body,
|
|
103
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
104
|
-
}, options);
|
|
105
|
-
if (!requestRes.ok) {
|
|
106
|
-
return requestRes;
|
|
107
|
-
}
|
|
108
|
-
const req = requestRes.value;
|
|
109
|
-
|
|
110
|
-
const doResult = await client._do(req, {
|
|
111
|
-
context,
|
|
112
|
-
errorCodes: ["4XX", "5XX"],
|
|
113
|
-
retryConfig: context.retryConfig,
|
|
114
|
-
retryCodes: context.retryCodes,
|
|
115
|
-
});
|
|
116
|
-
if (!doResult.ok) {
|
|
117
|
-
return doResult;
|
|
118
|
-
}
|
|
119
|
-
const response = doResult.value;
|
|
120
|
-
|
|
121
|
-
const [result] = await M.match<
|
|
122
|
-
shared.CommerceMetadata,
|
|
123
|
-
| SDKError
|
|
124
|
-
| SDKValidationError
|
|
125
|
-
| UnexpectedClientError
|
|
126
|
-
| InvalidRequestError
|
|
127
|
-
| RequestAbortedError
|
|
128
|
-
| RequestTimeoutError
|
|
129
|
-
| ConnectionError
|
|
130
|
-
>(
|
|
131
|
-
M.json(200, shared.CommerceMetadata$inboundSchema),
|
|
132
|
-
M.fail(["4XX", "5XX"]),
|
|
133
|
-
)(response);
|
|
134
|
-
if (!result.ok) {
|
|
135
|
-
return result;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
return result;
|
|
139
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
import * as shared from "../shared/index.js";
|
|
11
|
-
|
|
12
|
-
export type CreateCommerceMetadataRequest = {
|
|
13
|
-
commerceMetadata?: shared.CommerceMetadata | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* ID of the connection
|
|
16
|
-
*/
|
|
17
|
-
connectionId: string;
|
|
18
|
-
/**
|
|
19
|
-
* Comma-delimited fields to return
|
|
20
|
-
*/
|
|
21
|
-
fields?: Array<string> | undefined;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
/** @internal */
|
|
25
|
-
export const CreateCommerceMetadataRequest$inboundSchema: z.ZodType<
|
|
26
|
-
CreateCommerceMetadataRequest,
|
|
27
|
-
z.ZodTypeDef,
|
|
28
|
-
unknown
|
|
29
|
-
> = z.object({
|
|
30
|
-
CommerceMetadata: shared.CommerceMetadata$inboundSchema.optional(),
|
|
31
|
-
connection_id: z.string(),
|
|
32
|
-
fields: z.array(z.string()).optional(),
|
|
33
|
-
}).transform((v) => {
|
|
34
|
-
return remap$(v, {
|
|
35
|
-
"CommerceMetadata": "commerceMetadata",
|
|
36
|
-
"connection_id": "connectionId",
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
/** @internal */
|
|
41
|
-
export type CreateCommerceMetadataRequest$Outbound = {
|
|
42
|
-
CommerceMetadata?: shared.CommerceMetadata$Outbound | undefined;
|
|
43
|
-
connection_id: string;
|
|
44
|
-
fields?: Array<string> | undefined;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
/** @internal */
|
|
48
|
-
export const CreateCommerceMetadataRequest$outboundSchema: z.ZodType<
|
|
49
|
-
CreateCommerceMetadataRequest$Outbound,
|
|
50
|
-
z.ZodTypeDef,
|
|
51
|
-
CreateCommerceMetadataRequest
|
|
52
|
-
> = z.object({
|
|
53
|
-
commerceMetadata: shared.CommerceMetadata$outboundSchema.optional(),
|
|
54
|
-
connectionId: z.string(),
|
|
55
|
-
fields: z.array(z.string()).optional(),
|
|
56
|
-
}).transform((v) => {
|
|
57
|
-
return remap$(v, {
|
|
58
|
-
commerceMetadata: "CommerceMetadata",
|
|
59
|
-
connectionId: "connection_id",
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @internal
|
|
65
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
-
*/
|
|
67
|
-
export namespace CreateCommerceMetadataRequest$ {
|
|
68
|
-
/** @deprecated use `CreateCommerceMetadataRequest$inboundSchema` instead. */
|
|
69
|
-
export const inboundSchema = CreateCommerceMetadataRequest$inboundSchema;
|
|
70
|
-
/** @deprecated use `CreateCommerceMetadataRequest$outboundSchema` instead. */
|
|
71
|
-
export const outboundSchema = CreateCommerceMetadataRequest$outboundSchema;
|
|
72
|
-
/** @deprecated use `CreateCommerceMetadataRequest$Outbound` instead. */
|
|
73
|
-
export type Outbound = CreateCommerceMetadataRequest$Outbound;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export function createCommerceMetadataRequestToJSON(
|
|
77
|
-
createCommerceMetadataRequest: CreateCommerceMetadataRequest,
|
|
78
|
-
): string {
|
|
79
|
-
return JSON.stringify(
|
|
80
|
-
CreateCommerceMetadataRequest$outboundSchema.parse(
|
|
81
|
-
createCommerceMetadataRequest,
|
|
82
|
-
),
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export function createCommerceMetadataRequestFromJSON(
|
|
87
|
-
jsonString: string,
|
|
88
|
-
): SafeParseResult<CreateCommerceMetadataRequest, SDKValidationError> {
|
|
89
|
-
return safeParse(
|
|
90
|
-
jsonString,
|
|
91
|
-
(x) => CreateCommerceMetadataRequest$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
-
`Failed to parse 'CreateCommerceMetadataRequest' from JSON`,
|
|
93
|
-
);
|
|
94
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
import * as shared from "../shared/index.js";
|
|
11
|
-
|
|
12
|
-
export type PatchCommerceMetadataRequest = {
|
|
13
|
-
commerceMetadata?: shared.CommerceMetadata | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* ID of the connection
|
|
16
|
-
*/
|
|
17
|
-
connectionId: string;
|
|
18
|
-
/**
|
|
19
|
-
* Comma-delimited fields to return
|
|
20
|
-
*/
|
|
21
|
-
fields?: Array<string> | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* ID of the Metadata
|
|
24
|
-
*/
|
|
25
|
-
id: string;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/** @internal */
|
|
29
|
-
export const PatchCommerceMetadataRequest$inboundSchema: z.ZodType<
|
|
30
|
-
PatchCommerceMetadataRequest,
|
|
31
|
-
z.ZodTypeDef,
|
|
32
|
-
unknown
|
|
33
|
-
> = z.object({
|
|
34
|
-
CommerceMetadata: shared.CommerceMetadata$inboundSchema.optional(),
|
|
35
|
-
connection_id: z.string(),
|
|
36
|
-
fields: z.array(z.string()).optional(),
|
|
37
|
-
id: z.string(),
|
|
38
|
-
}).transform((v) => {
|
|
39
|
-
return remap$(v, {
|
|
40
|
-
"CommerceMetadata": "commerceMetadata",
|
|
41
|
-
"connection_id": "connectionId",
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
/** @internal */
|
|
46
|
-
export type PatchCommerceMetadataRequest$Outbound = {
|
|
47
|
-
CommerceMetadata?: shared.CommerceMetadata$Outbound | undefined;
|
|
48
|
-
connection_id: string;
|
|
49
|
-
fields?: Array<string> | undefined;
|
|
50
|
-
id: string;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
/** @internal */
|
|
54
|
-
export const PatchCommerceMetadataRequest$outboundSchema: z.ZodType<
|
|
55
|
-
PatchCommerceMetadataRequest$Outbound,
|
|
56
|
-
z.ZodTypeDef,
|
|
57
|
-
PatchCommerceMetadataRequest
|
|
58
|
-
> = z.object({
|
|
59
|
-
commerceMetadata: shared.CommerceMetadata$outboundSchema.optional(),
|
|
60
|
-
connectionId: z.string(),
|
|
61
|
-
fields: z.array(z.string()).optional(),
|
|
62
|
-
id: z.string(),
|
|
63
|
-
}).transform((v) => {
|
|
64
|
-
return remap$(v, {
|
|
65
|
-
commerceMetadata: "CommerceMetadata",
|
|
66
|
-
connectionId: "connection_id",
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @internal
|
|
72
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
73
|
-
*/
|
|
74
|
-
export namespace PatchCommerceMetadataRequest$ {
|
|
75
|
-
/** @deprecated use `PatchCommerceMetadataRequest$inboundSchema` instead. */
|
|
76
|
-
export const inboundSchema = PatchCommerceMetadataRequest$inboundSchema;
|
|
77
|
-
/** @deprecated use `PatchCommerceMetadataRequest$outboundSchema` instead. */
|
|
78
|
-
export const outboundSchema = PatchCommerceMetadataRequest$outboundSchema;
|
|
79
|
-
/** @deprecated use `PatchCommerceMetadataRequest$Outbound` instead. */
|
|
80
|
-
export type Outbound = PatchCommerceMetadataRequest$Outbound;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function patchCommerceMetadataRequestToJSON(
|
|
84
|
-
patchCommerceMetadataRequest: PatchCommerceMetadataRequest,
|
|
85
|
-
): string {
|
|
86
|
-
return JSON.stringify(
|
|
87
|
-
PatchCommerceMetadataRequest$outboundSchema.parse(
|
|
88
|
-
patchCommerceMetadataRequest,
|
|
89
|
-
),
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export function patchCommerceMetadataRequestFromJSON(
|
|
94
|
-
jsonString: string,
|
|
95
|
-
): SafeParseResult<PatchCommerceMetadataRequest, SDKValidationError> {
|
|
96
|
-
return safeParse(
|
|
97
|
-
jsonString,
|
|
98
|
-
(x) => PatchCommerceMetadataRequest$inboundSchema.parse(JSON.parse(x)),
|
|
99
|
-
`Failed to parse 'PatchCommerceMetadataRequest' from JSON`,
|
|
100
|
-
);
|
|
101
|
-
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
|
|
11
|
-
export type RemoveCommerceMetadataRequest = {
|
|
12
|
-
/**
|
|
13
|
-
* ID of the connection
|
|
14
|
-
*/
|
|
15
|
-
connectionId: string;
|
|
16
|
-
/**
|
|
17
|
-
* ID of the Metadata
|
|
18
|
-
*/
|
|
19
|
-
id: string;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export type RemoveCommerceMetadataResponse = {
|
|
23
|
-
headers: { [k: string]: Array<string> };
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/** @internal */
|
|
27
|
-
export const RemoveCommerceMetadataRequest$inboundSchema: z.ZodType<
|
|
28
|
-
RemoveCommerceMetadataRequest,
|
|
29
|
-
z.ZodTypeDef,
|
|
30
|
-
unknown
|
|
31
|
-
> = z.object({
|
|
32
|
-
connection_id: z.string(),
|
|
33
|
-
id: z.string(),
|
|
34
|
-
}).transform((v) => {
|
|
35
|
-
return remap$(v, {
|
|
36
|
-
"connection_id": "connectionId",
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
/** @internal */
|
|
41
|
-
export type RemoveCommerceMetadataRequest$Outbound = {
|
|
42
|
-
connection_id: string;
|
|
43
|
-
id: string;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/** @internal */
|
|
47
|
-
export const RemoveCommerceMetadataRequest$outboundSchema: z.ZodType<
|
|
48
|
-
RemoveCommerceMetadataRequest$Outbound,
|
|
49
|
-
z.ZodTypeDef,
|
|
50
|
-
RemoveCommerceMetadataRequest
|
|
51
|
-
> = z.object({
|
|
52
|
-
connectionId: z.string(),
|
|
53
|
-
id: z.string(),
|
|
54
|
-
}).transform((v) => {
|
|
55
|
-
return remap$(v, {
|
|
56
|
-
connectionId: "connection_id",
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* @internal
|
|
62
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
-
*/
|
|
64
|
-
export namespace RemoveCommerceMetadataRequest$ {
|
|
65
|
-
/** @deprecated use `RemoveCommerceMetadataRequest$inboundSchema` instead. */
|
|
66
|
-
export const inboundSchema = RemoveCommerceMetadataRequest$inboundSchema;
|
|
67
|
-
/** @deprecated use `RemoveCommerceMetadataRequest$outboundSchema` instead. */
|
|
68
|
-
export const outboundSchema = RemoveCommerceMetadataRequest$outboundSchema;
|
|
69
|
-
/** @deprecated use `RemoveCommerceMetadataRequest$Outbound` instead. */
|
|
70
|
-
export type Outbound = RemoveCommerceMetadataRequest$Outbound;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function removeCommerceMetadataRequestToJSON(
|
|
74
|
-
removeCommerceMetadataRequest: RemoveCommerceMetadataRequest,
|
|
75
|
-
): string {
|
|
76
|
-
return JSON.stringify(
|
|
77
|
-
RemoveCommerceMetadataRequest$outboundSchema.parse(
|
|
78
|
-
removeCommerceMetadataRequest,
|
|
79
|
-
),
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function removeCommerceMetadataRequestFromJSON(
|
|
84
|
-
jsonString: string,
|
|
85
|
-
): SafeParseResult<RemoveCommerceMetadataRequest, SDKValidationError> {
|
|
86
|
-
return safeParse(
|
|
87
|
-
jsonString,
|
|
88
|
-
(x) => RemoveCommerceMetadataRequest$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
-
`Failed to parse 'RemoveCommerceMetadataRequest' from JSON`,
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/** @internal */
|
|
94
|
-
export const RemoveCommerceMetadataResponse$inboundSchema: z.ZodType<
|
|
95
|
-
RemoveCommerceMetadataResponse,
|
|
96
|
-
z.ZodTypeDef,
|
|
97
|
-
unknown
|
|
98
|
-
> = z.object({
|
|
99
|
-
Headers: z.record(z.array(z.string())),
|
|
100
|
-
}).transform((v) => {
|
|
101
|
-
return remap$(v, {
|
|
102
|
-
"Headers": "headers",
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
/** @internal */
|
|
107
|
-
export type RemoveCommerceMetadataResponse$Outbound = {
|
|
108
|
-
Headers: { [k: string]: Array<string> };
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
/** @internal */
|
|
112
|
-
export const RemoveCommerceMetadataResponse$outboundSchema: z.ZodType<
|
|
113
|
-
RemoveCommerceMetadataResponse$Outbound,
|
|
114
|
-
z.ZodTypeDef,
|
|
115
|
-
RemoveCommerceMetadataResponse
|
|
116
|
-
> = z.object({
|
|
117
|
-
headers: z.record(z.array(z.string())),
|
|
118
|
-
}).transform((v) => {
|
|
119
|
-
return remap$(v, {
|
|
120
|
-
headers: "Headers",
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* @internal
|
|
126
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
127
|
-
*/
|
|
128
|
-
export namespace RemoveCommerceMetadataResponse$ {
|
|
129
|
-
/** @deprecated use `RemoveCommerceMetadataResponse$inboundSchema` instead. */
|
|
130
|
-
export const inboundSchema = RemoveCommerceMetadataResponse$inboundSchema;
|
|
131
|
-
/** @deprecated use `RemoveCommerceMetadataResponse$outboundSchema` instead. */
|
|
132
|
-
export const outboundSchema = RemoveCommerceMetadataResponse$outboundSchema;
|
|
133
|
-
/** @deprecated use `RemoveCommerceMetadataResponse$Outbound` instead. */
|
|
134
|
-
export type Outbound = RemoveCommerceMetadataResponse$Outbound;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export function removeCommerceMetadataResponseToJSON(
|
|
138
|
-
removeCommerceMetadataResponse: RemoveCommerceMetadataResponse,
|
|
139
|
-
): string {
|
|
140
|
-
return JSON.stringify(
|
|
141
|
-
RemoveCommerceMetadataResponse$outboundSchema.parse(
|
|
142
|
-
removeCommerceMetadataResponse,
|
|
143
|
-
),
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export function removeCommerceMetadataResponseFromJSON(
|
|
148
|
-
jsonString: string,
|
|
149
|
-
): SafeParseResult<RemoveCommerceMetadataResponse, SDKValidationError> {
|
|
150
|
-
return safeParse(
|
|
151
|
-
jsonString,
|
|
152
|
-
(x) => RemoveCommerceMetadataResponse$inboundSchema.parse(JSON.parse(x)),
|
|
153
|
-
`Failed to parse 'RemoveCommerceMetadataResponse' from JSON`,
|
|
154
|
-
);
|
|
155
|
-
}
|