@unified-api/typescript-sdk 2.80.8 → 2.80.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 +12 -0
- package/examples/package-lock.json +1 -1
- package/funcs/commerceCreateCommerceSaleschannel.d.ts +15 -0
- package/funcs/commerceCreateCommerceSaleschannel.d.ts.map +1 -0
- package/funcs/commerceCreateCommerceSaleschannel.js +124 -0
- package/funcs/commerceCreateCommerceSaleschannel.js.map +1 -0
- package/funcs/commerceGetCommerceSaleschannel.d.ts +15 -0
- package/funcs/commerceGetCommerceSaleschannel.d.ts.map +1 -0
- package/funcs/commerceGetCommerceSaleschannel.js +125 -0
- package/funcs/commerceGetCommerceSaleschannel.js.map +1 -0
- package/funcs/commerceListCommerceCollections.js +1 -0
- package/funcs/commerceListCommerceCollections.js.map +1 -1
- package/funcs/commerceListCommerceSaleschannels.d.ts +15 -0
- package/funcs/commerceListCommerceSaleschannels.d.ts.map +1 -0
- package/funcs/commerceListCommerceSaleschannels.js +128 -0
- package/funcs/commerceListCommerceSaleschannels.js.map +1 -0
- package/funcs/commercePatchCommerceSaleschannel.d.ts +15 -0
- package/funcs/commercePatchCommerceSaleschannel.d.ts.map +1 -0
- package/funcs/commercePatchCommerceSaleschannel.js +128 -0
- package/funcs/commercePatchCommerceSaleschannel.js.map +1 -0
- package/funcs/commerceRemoveCommerceSaleschannel.d.ts +14 -0
- package/funcs/commerceRemoveCommerceSaleschannel.d.ts.map +1 -0
- package/funcs/commerceRemoveCommerceSaleschannel.js +122 -0
- package/funcs/commerceRemoveCommerceSaleschannel.js.map +1 -0
- package/funcs/commerceUpdateCommerceSaleschannel.d.ts +15 -0
- package/funcs/commerceUpdateCommerceSaleschannel.d.ts.map +1 -0
- package/funcs/commerceUpdateCommerceSaleschannel.js +128 -0
- package/funcs/commerceUpdateCommerceSaleschannel.js.map +1 -0
- 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/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/package.json +1 -1
- package/sdk/commerce.d.ts +24 -0
- package/sdk/commerce.d.ts.map +1 -1
- package/sdk/commerce.js +42 -0
- package/sdk/commerce.js.map +1 -1
- package/sdk/models/operations/createcommercesaleschannel.d.ts +28 -0
- package/sdk/models/operations/createcommercesaleschannel.d.ts.map +1 -0
- package/sdk/models/operations/createcommercesaleschannel.js +59 -0
- package/sdk/models/operations/createcommercesaleschannel.js.map +1 -0
- package/sdk/models/operations/getcommercesaleschannel.d.ts +30 -0
- package/sdk/models/operations/getcommercesaleschannel.d.ts.map +1 -0
- package/sdk/models/operations/getcommercesaleschannel.js +57 -0
- package/sdk/models/operations/getcommercesaleschannel.js.map +1 -0
- package/sdk/models/operations/index.d.ts +6 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +6 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listcommercecollections.d.ts +5 -0
- package/sdk/models/operations/listcommercecollections.d.ts.map +1 -1
- package/sdk/models/operations/listcommercecollections.js +2 -0
- package/sdk/models/operations/listcommercecollections.js.map +1 -1
- package/sdk/models/operations/listcommercesaleschannels.d.ts +43 -0
- package/sdk/models/operations/listcommercesaleschannels.d.ts.map +1 -0
- package/sdk/models/operations/listcommercesaleschannels.js +63 -0
- package/sdk/models/operations/listcommercesaleschannels.js.map +1 -0
- 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/patchcommercesaleschannel.d.ts +33 -0
- package/sdk/models/operations/patchcommercesaleschannel.d.ts.map +1 -0
- package/sdk/models/operations/patchcommercesaleschannel.js +60 -0
- package/sdk/models/operations/patchcommercesaleschannel.js.map +1 -0
- package/sdk/models/operations/removecommercesaleschannel.d.ts +30 -0
- package/sdk/models/operations/removecommercesaleschannel.d.ts.map +1 -0
- package/sdk/models/operations/removecommercesaleschannel.js +68 -0
- package/sdk/models/operations/removecommercesaleschannel.js.map +1 -0
- package/sdk/models/operations/updatecommercesaleschannel.d.ts +33 -0
- package/sdk/models/operations/updatecommercesaleschannel.d.ts.map +1 -0
- package/sdk/models/operations/updatecommercesaleschannel.js +60 -0
- package/sdk/models/operations/updatecommercesaleschannel.js.map +1 -0
- package/sdk/models/shared/commercecollection.d.ts +0 -3
- package/sdk/models/shared/commercecollection.d.ts.map +1 -1
- package/sdk/models/shared/commercecollection.js.map +1 -1
- package/sdk/models/shared/commercemetadata.d.ts +2 -2
- package/sdk/models/shared/commercemetadata.d.ts.map +1 -1
- package/sdk/models/shared/commercemetadata.js +4 -2
- package/sdk/models/shared/commercemetadata.js.map +1 -1
- package/sdk/models/shared/commercereference.d.ts +19 -0
- package/sdk/models/shared/commercereference.d.ts.map +1 -0
- package/sdk/models/shared/commercereference.js +60 -0
- package/sdk/models/shared/commercereference.js.map +1 -0
- package/sdk/models/shared/commercesaleschannel.d.ts +39 -0
- package/sdk/models/shared/commercesaleschannel.d.ts.map +1 -0
- package/sdk/models/shared/commercesaleschannel.js +88 -0
- package/sdk/models/shared/commercesaleschannel.js.map +1 -0
- package/sdk/models/shared/index.d.ts +2 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +2 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/integrationsupport.d.ts +27 -0
- package/sdk/models/shared/integrationsupport.d.ts.map +1 -1
- package/sdk/models/shared/integrationsupport.js +33 -5
- package/sdk/models/shared/integrationsupport.js.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.d.ts +2 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.js +2 -0
- package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
- package/sdk/models/shared/webhook.d.ts +1 -0
- package/sdk/models/shared/webhook.d.ts.map +1 -1
- package/sdk/models/shared/webhook.js +1 -0
- package/sdk/models/shared/webhook.js.map +1 -1
- package/sdk/saleschannel.d.ts +30 -0
- package/sdk/saleschannel.d.ts.map +1 -0
- package/sdk/saleschannel.js +54 -0
- package/sdk/saleschannel.js.map +1 -0
- 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/src/funcs/commerceCreateCommerceSaleschannel.ts +173 -0
- package/src/funcs/commerceGetCommerceSaleschannel.ts +176 -0
- package/src/funcs/commerceListCommerceCollections.ts +1 -0
- package/src/funcs/commerceListCommerceSaleschannels.ts +177 -0
- package/src/funcs/commercePatchCommerceSaleschannel.ts +179 -0
- package/src/funcs/commerceRemoveCommerceSaleschannel.ts +181 -0
- package/src/funcs/commerceUpdateCommerceSaleschannel.ts +179 -0
- package/src/funcs/messagingListMessagingChannels.ts +1 -0
- package/src/funcs/messagingListMessagingMessages.ts +1 -0
- package/src/lib/config.ts +2 -2
- package/src/sdk/commerce.ts +90 -0
- package/src/sdk/models/operations/createcommercesaleschannel.ts +58 -0
- package/src/sdk/models/operations/getcommercesaleschannel.ts +59 -0
- package/src/sdk/models/operations/index.ts +6 -0
- package/src/sdk/models/operations/listcommercecollections.ts +7 -0
- package/src/sdk/models/operations/listcommercesaleschannels.ts +78 -0
- package/src/sdk/models/operations/listmessagingchannels.ts +3 -0
- package/src/sdk/models/operations/listmessagingmessages.ts +3 -0
- package/src/sdk/models/operations/patchcommercesaleschannel.ts +64 -0
- package/src/sdk/models/operations/removecommercesaleschannel.ts +78 -0
- package/src/sdk/models/operations/updatecommercesaleschannel.ts +64 -0
- package/src/sdk/models/shared/commercecollection.ts +0 -3
- package/src/sdk/models/shared/commercemetadata.ts +6 -4
- package/src/sdk/models/shared/commercereference.ts +55 -0
- package/src/sdk/models/shared/commercesaleschannel.ts +103 -0
- package/src/sdk/models/shared/index.ts +2 -0
- package/src/sdk/models/shared/integrationsupport.ts +54 -0
- package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
- package/src/sdk/models/shared/webhook.ts +1 -0
- package/src/sdk/saleschannel.ts +100 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import * as shared from "../shared/index.js";
|
|
8
|
+
|
|
9
|
+
export type UpdateCommerceSaleschannelRequest = {
|
|
10
|
+
commerceSaleschannel: shared.CommerceSaleschannel;
|
|
11
|
+
/**
|
|
12
|
+
* ID of the connection
|
|
13
|
+
*/
|
|
14
|
+
connectionId: string;
|
|
15
|
+
/**
|
|
16
|
+
* Comma-delimited fields to return
|
|
17
|
+
*/
|
|
18
|
+
fields?: Array<string> | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* ID of the Saleschannel
|
|
21
|
+
*/
|
|
22
|
+
id: string;
|
|
23
|
+
/**
|
|
24
|
+
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
25
|
+
*/
|
|
26
|
+
raw?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type UpdateCommerceSaleschannelRequest$Outbound = {
|
|
31
|
+
CommerceSaleschannel: shared.CommerceSaleschannel$Outbound;
|
|
32
|
+
connection_id: string;
|
|
33
|
+
fields?: Array<string> | undefined;
|
|
34
|
+
id: string;
|
|
35
|
+
raw?: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const UpdateCommerceSaleschannelRequest$outboundSchema: z.ZodType<
|
|
40
|
+
UpdateCommerceSaleschannelRequest$Outbound,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
UpdateCommerceSaleschannelRequest
|
|
43
|
+
> = z.object({
|
|
44
|
+
commerceSaleschannel: shared.CommerceSaleschannel$outboundSchema,
|
|
45
|
+
connectionId: z.string(),
|
|
46
|
+
fields: z.array(z.string()).optional(),
|
|
47
|
+
id: z.string(),
|
|
48
|
+
raw: z.string().optional(),
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
commerceSaleschannel: "CommerceSaleschannel",
|
|
52
|
+
connectionId: "connection_id",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export function updateCommerceSaleschannelRequestToJSON(
|
|
57
|
+
updateCommerceSaleschannelRequest: UpdateCommerceSaleschannelRequest,
|
|
58
|
+
): string {
|
|
59
|
+
return JSON.stringify(
|
|
60
|
+
UpdateCommerceSaleschannelRequest$outboundSchema.parse(
|
|
61
|
+
updateCommerceSaleschannelRequest,
|
|
62
|
+
),
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -39,9 +39,6 @@ export type CommerceCollection = {
|
|
|
39
39
|
isActive?: boolean | undefined;
|
|
40
40
|
isFeatured?: boolean | undefined;
|
|
41
41
|
isVisible?: boolean | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* includes the list of metadata_metadata required to create a commerce_item under the respective commerce_collection
|
|
44
|
-
*/
|
|
45
42
|
itemMetadata?: Array<CommerceMetadata> | undefined;
|
|
46
43
|
media?: Array<CommerceItemMedia> | undefined;
|
|
47
44
|
metadata?: Array<CommerceMetadata> | undefined;
|
|
@@ -64,9 +64,9 @@ export type CommerceMetadata = {
|
|
|
64
64
|
| undefined;
|
|
65
65
|
format?: CommerceMetadataFormat | undefined;
|
|
66
66
|
id?: string | undefined;
|
|
67
|
+
isRequired?: boolean | undefined;
|
|
67
68
|
key?: string | undefined;
|
|
68
69
|
namespace?: string | undefined;
|
|
69
|
-
required?: boolean | undefined;
|
|
70
70
|
slug?: string | undefined;
|
|
71
71
|
type?: string | undefined;
|
|
72
72
|
value?:
|
|
@@ -402,9 +402,9 @@ export const CommerceMetadata$inboundSchema: z.ZodType<
|
|
|
402
402
|
]).optional(),
|
|
403
403
|
format: CommerceMetadataFormat$inboundSchema.optional(),
|
|
404
404
|
id: z.string().optional(),
|
|
405
|
+
is_required: z.boolean().optional(),
|
|
405
406
|
key: z.string().optional(),
|
|
406
407
|
namespace: z.string().optional(),
|
|
407
|
-
required: z.boolean().optional(),
|
|
408
408
|
slug: z.string().optional(),
|
|
409
409
|
type: z.string().optional(),
|
|
410
410
|
value: z.union([
|
|
@@ -424,6 +424,7 @@ export const CommerceMetadata$inboundSchema: z.ZodType<
|
|
|
424
424
|
}).transform((v) => {
|
|
425
425
|
return remap$(v, {
|
|
426
426
|
"extra_data": "extraData",
|
|
427
|
+
"is_required": "isRequired",
|
|
427
428
|
});
|
|
428
429
|
});
|
|
429
430
|
/** @internal */
|
|
@@ -438,9 +439,9 @@ export type CommerceMetadata$Outbound = {
|
|
|
438
439
|
| undefined;
|
|
439
440
|
format?: string | undefined;
|
|
440
441
|
id?: string | undefined;
|
|
442
|
+
is_required?: boolean | undefined;
|
|
441
443
|
key?: string | undefined;
|
|
442
444
|
namespace?: string | undefined;
|
|
443
|
-
required?: boolean | undefined;
|
|
444
445
|
slug?: string | undefined;
|
|
445
446
|
type?: string | undefined;
|
|
446
447
|
value?:
|
|
@@ -475,9 +476,9 @@ export const CommerceMetadata$outboundSchema: z.ZodType<
|
|
|
475
476
|
]).optional(),
|
|
476
477
|
format: CommerceMetadataFormat$outboundSchema.optional(),
|
|
477
478
|
id: z.string().optional(),
|
|
479
|
+
isRequired: z.boolean().optional(),
|
|
478
480
|
key: z.string().optional(),
|
|
479
481
|
namespace: z.string().optional(),
|
|
480
|
-
required: z.boolean().optional(),
|
|
481
482
|
slug: z.string().optional(),
|
|
482
483
|
type: z.string().optional(),
|
|
483
484
|
value: z.union([
|
|
@@ -497,6 +498,7 @@ export const CommerceMetadata$outboundSchema: z.ZodType<
|
|
|
497
498
|
}).transform((v) => {
|
|
498
499
|
return remap$(v, {
|
|
499
500
|
extraData: "extra_data",
|
|
501
|
+
isRequired: "is_required",
|
|
500
502
|
});
|
|
501
503
|
});
|
|
502
504
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type CommerceReference = {
|
|
11
|
+
id?: string | undefined;
|
|
12
|
+
name?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const CommerceReference$inboundSchema: z.ZodType<
|
|
17
|
+
CommerceReference,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
id: z.string().optional(),
|
|
22
|
+
name: z.string().optional(),
|
|
23
|
+
});
|
|
24
|
+
/** @internal */
|
|
25
|
+
export type CommerceReference$Outbound = {
|
|
26
|
+
id?: string | undefined;
|
|
27
|
+
name?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const CommerceReference$outboundSchema: z.ZodType<
|
|
32
|
+
CommerceReference$Outbound,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
CommerceReference
|
|
35
|
+
> = z.object({
|
|
36
|
+
id: z.string().optional(),
|
|
37
|
+
name: z.string().optional(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export function commerceReferenceToJSON(
|
|
41
|
+
commerceReference: CommerceReference,
|
|
42
|
+
): string {
|
|
43
|
+
return JSON.stringify(
|
|
44
|
+
CommerceReference$outboundSchema.parse(commerceReference),
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
export function commerceReferenceFromJSON(
|
|
48
|
+
jsonString: string,
|
|
49
|
+
): SafeParseResult<CommerceReference, SDKValidationError> {
|
|
50
|
+
return safeParse(
|
|
51
|
+
jsonString,
|
|
52
|
+
(x) => CommerceReference$inboundSchema.parse(JSON.parse(x)),
|
|
53
|
+
`Failed to parse 'CommerceReference' from JSON`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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 {
|
|
11
|
+
CommerceReference,
|
|
12
|
+
CommerceReference$inboundSchema,
|
|
13
|
+
CommerceReference$Outbound,
|
|
14
|
+
CommerceReference$outboundSchema,
|
|
15
|
+
} from "./commercereference.js";
|
|
16
|
+
|
|
17
|
+
export type CommerceSaleschannel = {
|
|
18
|
+
/**
|
|
19
|
+
* points to a CommerceCollection
|
|
20
|
+
*/
|
|
21
|
+
collections?: Array<CommerceReference> | undefined;
|
|
22
|
+
createdAt?: Date | undefined;
|
|
23
|
+
description?: string | undefined;
|
|
24
|
+
id?: string | undefined;
|
|
25
|
+
isActive?: boolean | undefined;
|
|
26
|
+
raw?: { [k: string]: any } | undefined;
|
|
27
|
+
slug?: string | undefined;
|
|
28
|
+
updatedAt?: Date | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const CommerceSaleschannel$inboundSchema: z.ZodType<
|
|
33
|
+
CommerceSaleschannel,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
collections: z.array(CommerceReference$inboundSchema).optional(),
|
|
38
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
39
|
+
.optional(),
|
|
40
|
+
description: z.string().optional(),
|
|
41
|
+
id: z.string().optional(),
|
|
42
|
+
is_active: z.boolean().optional(),
|
|
43
|
+
raw: z.record(z.any()).optional(),
|
|
44
|
+
slug: z.string().optional(),
|
|
45
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
46
|
+
.optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
"created_at": "createdAt",
|
|
50
|
+
"is_active": "isActive",
|
|
51
|
+
"updated_at": "updatedAt",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type CommerceSaleschannel$Outbound = {
|
|
56
|
+
collections?: Array<CommerceReference$Outbound> | undefined;
|
|
57
|
+
created_at?: string | undefined;
|
|
58
|
+
description?: string | undefined;
|
|
59
|
+
id?: string | undefined;
|
|
60
|
+
is_active?: boolean | undefined;
|
|
61
|
+
raw?: { [k: string]: any } | undefined;
|
|
62
|
+
slug?: string | undefined;
|
|
63
|
+
updated_at?: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const CommerceSaleschannel$outboundSchema: z.ZodType<
|
|
68
|
+
CommerceSaleschannel$Outbound,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
CommerceSaleschannel
|
|
71
|
+
> = z.object({
|
|
72
|
+
collections: z.array(CommerceReference$outboundSchema).optional(),
|
|
73
|
+
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
74
|
+
description: z.string().optional(),
|
|
75
|
+
id: z.string().optional(),
|
|
76
|
+
isActive: z.boolean().optional(),
|
|
77
|
+
raw: z.record(z.any()).optional(),
|
|
78
|
+
slug: z.string().optional(),
|
|
79
|
+
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
80
|
+
}).transform((v) => {
|
|
81
|
+
return remap$(v, {
|
|
82
|
+
createdAt: "created_at",
|
|
83
|
+
isActive: "is_active",
|
|
84
|
+
updatedAt: "updated_at",
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export function commerceSaleschannelToJSON(
|
|
89
|
+
commerceSaleschannel: CommerceSaleschannel,
|
|
90
|
+
): string {
|
|
91
|
+
return JSON.stringify(
|
|
92
|
+
CommerceSaleschannel$outboundSchema.parse(commerceSaleschannel),
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
export function commerceSaleschannelFromJSON(
|
|
96
|
+
jsonString: string,
|
|
97
|
+
): SafeParseResult<CommerceSaleschannel, SDKValidationError> {
|
|
98
|
+
return safeParse(
|
|
99
|
+
jsonString,
|
|
100
|
+
(x) => CommerceSaleschannel$inboundSchema.parse(JSON.parse(x)),
|
|
101
|
+
`Failed to parse 'CommerceSaleschannel' from JSON`,
|
|
102
|
+
);
|
|
103
|
+
}
|
|
@@ -83,8 +83,10 @@ export * from "./commerceitemprice.js";
|
|
|
83
83
|
export * from "./commerceitemvariant.js";
|
|
84
84
|
export * from "./commercelocation.js";
|
|
85
85
|
export * from "./commercemetadata.js";
|
|
86
|
+
export * from "./commercereference.js";
|
|
86
87
|
export * from "./commercereview.js";
|
|
87
88
|
export * from "./commercereviewcomment.js";
|
|
89
|
+
export * from "./commercesaleschannel.js";
|
|
88
90
|
export * from "./connection.js";
|
|
89
91
|
export * from "./crmcompany.js";
|
|
90
92
|
export * from "./crmcontact.js";
|
|
@@ -35,6 +35,13 @@ export const ListApplicationId = {
|
|
|
35
35
|
} as const;
|
|
36
36
|
export type ListApplicationId = OpenEnum<typeof ListApplicationId>;
|
|
37
37
|
|
|
38
|
+
export const ListBenefitId = {
|
|
39
|
+
SupportedRequired: "supported-required",
|
|
40
|
+
Supported: "supported",
|
|
41
|
+
NotSupported: "not-supported",
|
|
42
|
+
} as const;
|
|
43
|
+
export type ListBenefitId = OpenEnum<typeof ListBenefitId>;
|
|
44
|
+
|
|
38
45
|
export const ListBranchId = {
|
|
39
46
|
SupportedRequired: "supported-required",
|
|
40
47
|
Supported: "supported",
|
|
@@ -345,6 +352,13 @@ export const ListRootId = {
|
|
|
345
352
|
} as const;
|
|
346
353
|
export type ListRootId = OpenEnum<typeof ListRootId>;
|
|
347
354
|
|
|
355
|
+
export const ListSaleschannelId = {
|
|
356
|
+
SupportedRequired: "supported-required",
|
|
357
|
+
Supported: "supported",
|
|
358
|
+
NotSupported: "not-supported",
|
|
359
|
+
} as const;
|
|
360
|
+
export type ListSaleschannelId = OpenEnum<typeof ListSaleschannelId>;
|
|
361
|
+
|
|
348
362
|
export const ListSortByCreatedAt = {
|
|
349
363
|
SupportedRequired: "supported-required",
|
|
350
364
|
Supported: "supported",
|
|
@@ -746,6 +760,15 @@ export const VirtualWebhookRepoId = {
|
|
|
746
760
|
} as const;
|
|
747
761
|
export type VirtualWebhookRepoId = OpenEnum<typeof VirtualWebhookRepoId>;
|
|
748
762
|
|
|
763
|
+
export const VirtualWebhookSaleschannelId = {
|
|
764
|
+
SupportedRequired: "supported-required",
|
|
765
|
+
Supported: "supported",
|
|
766
|
+
NotSupported: "not-supported",
|
|
767
|
+
} as const;
|
|
768
|
+
export type VirtualWebhookSaleschannelId = OpenEnum<
|
|
769
|
+
typeof VirtualWebhookSaleschannelId
|
|
770
|
+
>;
|
|
771
|
+
|
|
749
772
|
export const VirtualWebhookSpaceId = {
|
|
750
773
|
SupportedRequired: "supported-required",
|
|
751
774
|
Supported: "supported",
|
|
@@ -818,6 +841,7 @@ export type IntegrationSupport = {
|
|
|
818
841
|
inboundFields?: { [k: string]: string } | undefined;
|
|
819
842
|
listAccountId?: ListAccountId | undefined;
|
|
820
843
|
listApplicationId?: ListApplicationId | undefined;
|
|
844
|
+
listBenefitId?: ListBenefitId | undefined;
|
|
821
845
|
listBranchId?: ListBranchId | undefined;
|
|
822
846
|
listCalendarId?: ListCalendarId | undefined;
|
|
823
847
|
listCallId?: ListCallId | undefined;
|
|
@@ -862,6 +886,7 @@ export type IntegrationSupport = {
|
|
|
862
886
|
listRawFields?: ListRawFields | undefined;
|
|
863
887
|
listRepoId?: ListRepoId | undefined;
|
|
864
888
|
listRootId?: ListRootId | undefined;
|
|
889
|
+
listSaleschannelId?: ListSaleschannelId | undefined;
|
|
865
890
|
listSortByCreatedAt?: ListSortByCreatedAt | undefined;
|
|
866
891
|
listSortByName?: ListSortByName | undefined;
|
|
867
892
|
listSortByUpdatedAt?: ListSortByUpdatedAt | undefined;
|
|
@@ -924,6 +949,7 @@ export type IntegrationSupport = {
|
|
|
924
949
|
virtualWebhookPipelineId?: VirtualWebhookPipelineId | undefined;
|
|
925
950
|
virtualWebhookProjectId?: VirtualWebhookProjectId | undefined;
|
|
926
951
|
virtualWebhookRepoId?: VirtualWebhookRepoId | undefined;
|
|
952
|
+
virtualWebhookSaleschannelId?: VirtualWebhookSaleschannelId | undefined;
|
|
927
953
|
virtualWebhookSpaceId?: VirtualWebhookSpaceId | undefined;
|
|
928
954
|
virtualWebhookStartGte?: VirtualWebhookStartGte | undefined;
|
|
929
955
|
virtualWebhookStatus?: VirtualWebhookStatus | undefined;
|
|
@@ -957,6 +983,13 @@ export const ListApplicationId$inboundSchema: z.ZodType<
|
|
|
957
983
|
unknown
|
|
958
984
|
> = openEnums.inboundSchema(ListApplicationId);
|
|
959
985
|
|
|
986
|
+
/** @internal */
|
|
987
|
+
export const ListBenefitId$inboundSchema: z.ZodType<
|
|
988
|
+
ListBenefitId,
|
|
989
|
+
z.ZodTypeDef,
|
|
990
|
+
unknown
|
|
991
|
+
> = openEnums.inboundSchema(ListBenefitId);
|
|
992
|
+
|
|
960
993
|
/** @internal */
|
|
961
994
|
export const ListBranchId$inboundSchema: z.ZodType<
|
|
962
995
|
ListBranchId,
|
|
@@ -1265,6 +1298,13 @@ export const ListRootId$inboundSchema: z.ZodType<
|
|
|
1265
1298
|
unknown
|
|
1266
1299
|
> = openEnums.inboundSchema(ListRootId);
|
|
1267
1300
|
|
|
1301
|
+
/** @internal */
|
|
1302
|
+
export const ListSaleschannelId$inboundSchema: z.ZodType<
|
|
1303
|
+
ListSaleschannelId,
|
|
1304
|
+
z.ZodTypeDef,
|
|
1305
|
+
unknown
|
|
1306
|
+
> = openEnums.inboundSchema(ListSaleschannelId);
|
|
1307
|
+
|
|
1268
1308
|
/** @internal */
|
|
1269
1309
|
export const ListSortByCreatedAt$inboundSchema: z.ZodType<
|
|
1270
1310
|
ListSortByCreatedAt,
|
|
@@ -1650,6 +1690,13 @@ export const VirtualWebhookRepoId$inboundSchema: z.ZodType<
|
|
|
1650
1690
|
unknown
|
|
1651
1691
|
> = openEnums.inboundSchema(VirtualWebhookRepoId);
|
|
1652
1692
|
|
|
1693
|
+
/** @internal */
|
|
1694
|
+
export const VirtualWebhookSaleschannelId$inboundSchema: z.ZodType<
|
|
1695
|
+
VirtualWebhookSaleschannelId,
|
|
1696
|
+
z.ZodTypeDef,
|
|
1697
|
+
unknown
|
|
1698
|
+
> = openEnums.inboundSchema(VirtualWebhookSaleschannelId);
|
|
1699
|
+
|
|
1653
1700
|
/** @internal */
|
|
1654
1701
|
export const VirtualWebhookSpaceId$inboundSchema: z.ZodType<
|
|
1655
1702
|
VirtualWebhookSpaceId,
|
|
@@ -1723,6 +1770,7 @@ export const IntegrationSupport$inboundSchema: z.ZodType<
|
|
|
1723
1770
|
inbound_fields: z.record(z.string()).optional(),
|
|
1724
1771
|
list_account_id: ListAccountId$inboundSchema.optional(),
|
|
1725
1772
|
list_application_id: ListApplicationId$inboundSchema.optional(),
|
|
1773
|
+
list_benefit_id: ListBenefitId$inboundSchema.optional(),
|
|
1726
1774
|
list_branch_id: ListBranchId$inboundSchema.optional(),
|
|
1727
1775
|
list_calendar_id: ListCalendarId$inboundSchema.optional(),
|
|
1728
1776
|
list_call_id: ListCallId$inboundSchema.optional(),
|
|
@@ -1768,6 +1816,7 @@ export const IntegrationSupport$inboundSchema: z.ZodType<
|
|
|
1768
1816
|
list_raw_fields: ListRawFields$inboundSchema.optional(),
|
|
1769
1817
|
list_repo_id: ListRepoId$inboundSchema.optional(),
|
|
1770
1818
|
list_root_id: ListRootId$inboundSchema.optional(),
|
|
1819
|
+
list_saleschannel_id: ListSaleschannelId$inboundSchema.optional(),
|
|
1771
1820
|
list_sort_by_created_at: ListSortByCreatedAt$inboundSchema.optional(),
|
|
1772
1821
|
list_sort_by_name: ListSortByName$inboundSchema.optional(),
|
|
1773
1822
|
list_sort_by_updated_at: ListSortByUpdatedAt$inboundSchema.optional(),
|
|
@@ -1835,6 +1884,8 @@ export const IntegrationSupport$inboundSchema: z.ZodType<
|
|
|
1835
1884
|
.optional(),
|
|
1836
1885
|
virtual_webhook_project_id: VirtualWebhookProjectId$inboundSchema.optional(),
|
|
1837
1886
|
virtual_webhook_repo_id: VirtualWebhookRepoId$inboundSchema.optional(),
|
|
1887
|
+
virtual_webhook_saleschannel_id: VirtualWebhookSaleschannelId$inboundSchema
|
|
1888
|
+
.optional(),
|
|
1838
1889
|
virtual_webhook_space_id: VirtualWebhookSpaceId$inboundSchema.optional(),
|
|
1839
1890
|
virtual_webhook_start_gte: VirtualWebhookStartGte$inboundSchema.optional(),
|
|
1840
1891
|
virtual_webhook_status: VirtualWebhookStatus$inboundSchema.optional(),
|
|
@@ -1854,6 +1905,7 @@ export const IntegrationSupport$inboundSchema: z.ZodType<
|
|
|
1854
1905
|
"inbound_fields": "inboundFields",
|
|
1855
1906
|
"list_account_id": "listAccountId",
|
|
1856
1907
|
"list_application_id": "listApplicationId",
|
|
1908
|
+
"list_benefit_id": "listBenefitId",
|
|
1857
1909
|
"list_branch_id": "listBranchId",
|
|
1858
1910
|
"list_calendar_id": "listCalendarId",
|
|
1859
1911
|
"list_call_id": "listCallId",
|
|
@@ -1898,6 +1950,7 @@ export const IntegrationSupport$inboundSchema: z.ZodType<
|
|
|
1898
1950
|
"list_raw_fields": "listRawFields",
|
|
1899
1951
|
"list_repo_id": "listRepoId",
|
|
1900
1952
|
"list_root_id": "listRootId",
|
|
1953
|
+
"list_saleschannel_id": "listSaleschannelId",
|
|
1901
1954
|
"list_sort_by_created_at": "listSortByCreatedAt",
|
|
1902
1955
|
"list_sort_by_name": "listSortByName",
|
|
1903
1956
|
"list_sort_by_updated_at": "listSortByUpdatedAt",
|
|
@@ -1956,6 +2009,7 @@ export const IntegrationSupport$inboundSchema: z.ZodType<
|
|
|
1956
2009
|
"virtual_webhook_pipeline_id": "virtualWebhookPipelineId",
|
|
1957
2010
|
"virtual_webhook_project_id": "virtualWebhookProjectId",
|
|
1958
2011
|
"virtual_webhook_repo_id": "virtualWebhookRepoId",
|
|
2012
|
+
"virtual_webhook_saleschannel_id": "virtualWebhookSaleschannelId",
|
|
1959
2013
|
"virtual_webhook_space_id": "virtualWebhookSpaceId",
|
|
1960
2014
|
"virtual_webhook_start_gte": "virtualWebhookStartGte",
|
|
1961
2015
|
"virtual_webhook_status": "virtualWebhookStatus",
|
|
@@ -62,6 +62,8 @@ export const PropertyConnectionPermissions = {
|
|
|
62
62
|
CommerceLocationWrite: "commerce_location_write",
|
|
63
63
|
CommerceReviewRead: "commerce_review_read",
|
|
64
64
|
CommerceReviewWrite: "commerce_review_write",
|
|
65
|
+
CommerceSaleschannelRead: "commerce_saleschannel_read",
|
|
66
|
+
CommerceSaleschannelWrite: "commerce_saleschannel_write",
|
|
65
67
|
VerificationPackageRead: "verification_package_read",
|
|
66
68
|
VerificationRequestRead: "verification_request_read",
|
|
67
69
|
VerificationRequestWrite: "verification_request_write",
|
|
@@ -56,6 +56,7 @@ export const ObjectType = {
|
|
|
56
56
|
CommerceInventory: "commerce_inventory",
|
|
57
57
|
CommerceLocation: "commerce_location",
|
|
58
58
|
CommerceReview: "commerce_review",
|
|
59
|
+
CommerceSaleschannel: "commerce_saleschannel",
|
|
59
60
|
VerificationPackage: "verification_package",
|
|
60
61
|
VerificationRequest: "verification_request",
|
|
61
62
|
AtsActivity: "ats_activity",
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { commerceCreateCommerceSaleschannel } from "../funcs/commerceCreateCommerceSaleschannel.js";
|
|
6
|
+
import { commerceGetCommerceSaleschannel } from "../funcs/commerceGetCommerceSaleschannel.js";
|
|
7
|
+
import { commerceListCommerceSaleschannels } from "../funcs/commerceListCommerceSaleschannels.js";
|
|
8
|
+
import { commercePatchCommerceSaleschannel } from "../funcs/commercePatchCommerceSaleschannel.js";
|
|
9
|
+
import { commerceRemoveCommerceSaleschannel } from "../funcs/commerceRemoveCommerceSaleschannel.js";
|
|
10
|
+
import { commerceUpdateCommerceSaleschannel } from "../funcs/commerceUpdateCommerceSaleschannel.js";
|
|
11
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import * as operations from "./models/operations/index.js";
|
|
13
|
+
import * as shared from "./models/shared/index.js";
|
|
14
|
+
import { unwrapAsync } from "./types/fp.js";
|
|
15
|
+
|
|
16
|
+
export class Saleschannel extends ClientSDK {
|
|
17
|
+
/**
|
|
18
|
+
* Create a saleschannel
|
|
19
|
+
*/
|
|
20
|
+
async createCommerceSaleschannel(
|
|
21
|
+
request: operations.CreateCommerceSaleschannelRequest,
|
|
22
|
+
options?: RequestOptions,
|
|
23
|
+
): Promise<shared.CommerceSaleschannel> {
|
|
24
|
+
return unwrapAsync(commerceCreateCommerceSaleschannel(
|
|
25
|
+
this,
|
|
26
|
+
request,
|
|
27
|
+
options,
|
|
28
|
+
));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Retrieve a saleschannel
|
|
33
|
+
*/
|
|
34
|
+
async getCommerceSaleschannel(
|
|
35
|
+
request: operations.GetCommerceSaleschannelRequest,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): Promise<shared.CommerceSaleschannel> {
|
|
38
|
+
return unwrapAsync(commerceGetCommerceSaleschannel(
|
|
39
|
+
this,
|
|
40
|
+
request,
|
|
41
|
+
options,
|
|
42
|
+
));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* List all saleschannels
|
|
47
|
+
*/
|
|
48
|
+
async listCommerceSaleschannels(
|
|
49
|
+
request: operations.ListCommerceSaleschannelsRequest,
|
|
50
|
+
options?: RequestOptions,
|
|
51
|
+
): Promise<Array<shared.CommerceSaleschannel>> {
|
|
52
|
+
return unwrapAsync(commerceListCommerceSaleschannels(
|
|
53
|
+
this,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Update a saleschannel
|
|
61
|
+
*/
|
|
62
|
+
async patchCommerceSaleschannel(
|
|
63
|
+
request: operations.PatchCommerceSaleschannelRequest,
|
|
64
|
+
options?: RequestOptions,
|
|
65
|
+
): Promise<shared.CommerceSaleschannel> {
|
|
66
|
+
return unwrapAsync(commercePatchCommerceSaleschannel(
|
|
67
|
+
this,
|
|
68
|
+
request,
|
|
69
|
+
options,
|
|
70
|
+
));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Remove a saleschannel
|
|
75
|
+
*/
|
|
76
|
+
async removeCommerceSaleschannel(
|
|
77
|
+
request: operations.RemoveCommerceSaleschannelRequest,
|
|
78
|
+
options?: RequestOptions,
|
|
79
|
+
): Promise<operations.RemoveCommerceSaleschannelResponse | undefined> {
|
|
80
|
+
return unwrapAsync(commerceRemoveCommerceSaleschannel(
|
|
81
|
+
this,
|
|
82
|
+
request,
|
|
83
|
+
options,
|
|
84
|
+
));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Update a saleschannel
|
|
89
|
+
*/
|
|
90
|
+
async updateCommerceSaleschannel(
|
|
91
|
+
request: operations.UpdateCommerceSaleschannelRequest,
|
|
92
|
+
options?: RequestOptions,
|
|
93
|
+
): Promise<shared.CommerceSaleschannel> {
|
|
94
|
+
return unwrapAsync(commerceUpdateCommerceSaleschannel(
|
|
95
|
+
this,
|
|
96
|
+
request,
|
|
97
|
+
options,
|
|
98
|
+
));
|
|
99
|
+
}
|
|
100
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -93,6 +93,7 @@ import { Report } from "./report.js";
|
|
|
93
93
|
import { Repository } from "./repository.js";
|
|
94
94
|
import { RequestT } from "./request.js";
|
|
95
95
|
import { Review } from "./review.js";
|
|
96
|
+
import { Saleschannel } from "./saleschannel.js";
|
|
96
97
|
import { Salesorder } from "./salesorder.js";
|
|
97
98
|
import { Scim } from "./scim.js";
|
|
98
99
|
import { Scorecard } from "./scorecard.js";
|
|
@@ -320,6 +321,11 @@ export class UnifiedTo extends ClientSDK {
|
|
|
320
321
|
return (this._review ??= new Review(this._options));
|
|
321
322
|
}
|
|
322
323
|
|
|
324
|
+
private _saleschannel?: Saleschannel;
|
|
325
|
+
get saleschannel(): Saleschannel {
|
|
326
|
+
return (this._saleschannel ??= new Saleschannel(this._options));
|
|
327
|
+
}
|
|
328
|
+
|
|
323
329
|
private _crm?: Crm;
|
|
324
330
|
get crm(): Crm {
|
|
325
331
|
return (this._crm ??= new Crm(this._options));
|