@deliverart/sdk-js-integration-types 0.0.0-dev-20260722145222 → 0.0.0-dev-20260902175359
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 +11 -2
- package/dist/index.cjs +82 -3
- package/dist/index.d.cts +165 -110
- package/dist/index.d.ts +165 -110
- package/dist/index.js +74 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -6,6 +6,13 @@ Use this package when another SDK package needs integration enum values, IRI sch
|
|
|
6
6
|
activatable integration schemas, or service-specific integration data schemas without
|
|
7
7
|
depending on `@deliverart/sdk-js-integration`.
|
|
8
8
|
|
|
9
|
+
## CassaInCloud Contracts
|
|
10
|
+
|
|
11
|
+
The package exports the remote `ProductChannel` values, separate inbound and initial outbound
|
|
12
|
+
channel policy types, and the operation, scope, status, issue-type, and IRI contracts used by
|
|
13
|
+
asynchronous CassaInCloud catalog mapping processes. `productChannels` remains a deprecated
|
|
14
|
+
alias for `inboundProductChannels` for one compatibility release.
|
|
15
|
+
|
|
9
16
|
## Elephant Contracts
|
|
10
17
|
|
|
11
18
|
The package exports Elephant service, lifecycle, health, catalog, credential-mode, and
|
|
@@ -22,8 +29,8 @@ catalog channels. Supported platforms are `migros_yemek`, `trendyol_go_meal`, `f
|
|
|
22
29
|
`getir`, and `yemeksepeti`; when platform credentials are supplied, the selected
|
|
23
30
|
platform's complete authentication object is required.
|
|
24
31
|
|
|
25
|
-
`salesModeId`
|
|
26
|
-
|
|
32
|
+
`salesModeId` and `categoryId` are required. Elephant validates both connection
|
|
33
|
+
identifiers before test and production order delivery.
|
|
27
34
|
|
|
28
35
|
```typescript
|
|
29
36
|
import { integrationElephantDataSchema } from '@deliverart/sdk-js-integration-types'
|
|
@@ -42,8 +49,10 @@ const payload = integrationElephantDataSchema.parse({
|
|
|
42
49
|
store_id: 'restaurant-123',
|
|
43
50
|
store_group_id: 'group-456',
|
|
44
51
|
},
|
|
52
|
+
salesModeId: 'a1538842-0931-4e23-8aaf-5bda59198581',
|
|
45
53
|
categoryId: '20c71a6a-c924-42e0-9078-e3f672704dbb',
|
|
46
54
|
defaultTaxRate: 10,
|
|
55
|
+
// Omit to enable every menu channel for items created by Elephant.
|
|
47
56
|
channels: ['application', 'elephant'],
|
|
48
57
|
orderType: 'delivery',
|
|
49
58
|
defaultPreparationTime: 15,
|
package/dist/index.cjs
CHANGED
|
@@ -28,6 +28,15 @@ __export(index_exports, {
|
|
|
28
28
|
activatableIntegrationStatuses: () => activatableIntegrationStatuses,
|
|
29
29
|
exclusiveIntegrationServiceSchema: () => exclusiveIntegrationServiceSchema,
|
|
30
30
|
exclusiveIntegrationServices: () => exclusiveIntegrationServices,
|
|
31
|
+
integrationCassaInCloudCatalogMappingIssueTypeSchema: () => integrationCassaInCloudCatalogMappingIssueTypeSchema,
|
|
32
|
+
integrationCassaInCloudCatalogMappingIssueTypes: () => integrationCassaInCloudCatalogMappingIssueTypes,
|
|
33
|
+
integrationCassaInCloudCatalogMappingProcessIriSchema: () => integrationCassaInCloudCatalogMappingProcessIriSchema,
|
|
34
|
+
integrationCassaInCloudCatalogMappingProcessOperationSchema: () => integrationCassaInCloudCatalogMappingProcessOperationSchema,
|
|
35
|
+
integrationCassaInCloudCatalogMappingProcessOperations: () => integrationCassaInCloudCatalogMappingProcessOperations,
|
|
36
|
+
integrationCassaInCloudCatalogMappingProcessScopeSchema: () => integrationCassaInCloudCatalogMappingProcessScopeSchema,
|
|
37
|
+
integrationCassaInCloudCatalogMappingProcessScopes: () => integrationCassaInCloudCatalogMappingProcessScopes,
|
|
38
|
+
integrationCassaInCloudCatalogMappingProcessStatusSchema: () => integrationCassaInCloudCatalogMappingProcessStatusSchema,
|
|
39
|
+
integrationCassaInCloudCatalogMappingProcessStatuses: () => integrationCassaInCloudCatalogMappingProcessStatuses,
|
|
31
40
|
integrationCassaInCloudCategoryMappingIriSchema: () => integrationCassaInCloudCategoryMappingIriSchema,
|
|
32
41
|
integrationCassaInCloudCategoryMappingNullableIriSchema: () => integrationCassaInCloudCategoryMappingNullableIriSchema,
|
|
33
42
|
integrationCassaInCloudCategoryModifierValueMappingIriSchema: () => integrationCassaInCloudCategoryModifierValueMappingIriSchema,
|
|
@@ -173,6 +182,10 @@ __export(index_exports, {
|
|
|
173
182
|
integrationIssueIriSchema: () => integrationIssueIriSchema,
|
|
174
183
|
integrationIssueScopeSchema: () => integrationIssueScopeSchema,
|
|
175
184
|
integrationIssueScopes: () => integrationIssueScopes,
|
|
185
|
+
integrationIssueSeverities: () => integrationIssueSeverities,
|
|
186
|
+
integrationIssueSeveritySchema: () => integrationIssueSeveritySchema,
|
|
187
|
+
integrationIssueStatusSchema: () => integrationIssueStatusSchema,
|
|
188
|
+
integrationIssueStatuses: () => integrationIssueStatuses,
|
|
176
189
|
integrationJustEatDataSchema: () => integrationJustEatDataSchema,
|
|
177
190
|
integrationJustEatIriSchema: () => integrationJustEatIriSchema,
|
|
178
191
|
integrationJustEatMenuTypeSchema: () => integrationJustEatMenuTypeSchema,
|
|
@@ -285,6 +298,7 @@ var integrationTilbySyncSettingsSchema = import_zod.z.object({
|
|
|
285
298
|
syncOutboundCustomers: import_zod.z.boolean().default(true),
|
|
286
299
|
syncInboundOrders: import_zod.z.boolean().default(false),
|
|
287
300
|
syncOutboundOrders: import_zod.z.boolean().default(true),
|
|
301
|
+
createMissingMenuItemsDuringOrderExport: import_zod.z.boolean().default(false),
|
|
288
302
|
syncInboundStock: import_zod.z.boolean().default(false),
|
|
289
303
|
syncOutboundStock: import_zod.z.boolean().default(false),
|
|
290
304
|
syncWebhooks: import_zod.z.boolean().default(true),
|
|
@@ -465,8 +479,25 @@ var integrationDeliveryErrors = [
|
|
|
465
479
|
"invalid_menu"
|
|
466
480
|
];
|
|
467
481
|
var integrationDeliveryErrorSchema = import_zod2.z.enum(integrationDeliveryErrors);
|
|
468
|
-
var integrationIssueScopes = [
|
|
482
|
+
var integrationIssueScopes = [
|
|
483
|
+
"menu_sync",
|
|
484
|
+
"store_status",
|
|
485
|
+
"opening_hours_sync",
|
|
486
|
+
"availability_sync",
|
|
487
|
+
"order_ingress",
|
|
488
|
+
"order_export"
|
|
489
|
+
];
|
|
469
490
|
var integrationIssueScopeSchema = import_zod2.z.enum(integrationIssueScopes);
|
|
491
|
+
var integrationIssueStatuses = [
|
|
492
|
+
"observing",
|
|
493
|
+
"attention_required",
|
|
494
|
+
"investigating",
|
|
495
|
+
"resolved",
|
|
496
|
+
"suppressed"
|
|
497
|
+
];
|
|
498
|
+
var integrationIssueStatusSchema = import_zod2.z.enum(integrationIssueStatuses);
|
|
499
|
+
var integrationIssueSeverities = ["warning", "error", "critical"];
|
|
500
|
+
var integrationIssueSeveritySchema = import_zod2.z.enum(integrationIssueSeverities);
|
|
470
501
|
var integrationIssueCodes = [
|
|
471
502
|
"unauthorized",
|
|
472
503
|
"forbidden",
|
|
@@ -563,6 +594,38 @@ var integrationCassaInCloudProductChannels = [
|
|
|
563
594
|
var integrationCassaInCloudProductChannelSchema = import_zod2.z.enum(
|
|
564
595
|
integrationCassaInCloudProductChannels
|
|
565
596
|
);
|
|
597
|
+
var integrationCassaInCloudCatalogMappingProcessOperations = [
|
|
598
|
+
"audit",
|
|
599
|
+
"reconcile_channels"
|
|
600
|
+
];
|
|
601
|
+
var integrationCassaInCloudCatalogMappingProcessOperationSchema = import_zod2.z.enum(
|
|
602
|
+
integrationCassaInCloudCatalogMappingProcessOperations
|
|
603
|
+
);
|
|
604
|
+
var integrationCassaInCloudCatalogMappingProcessScopes = [
|
|
605
|
+
"categories",
|
|
606
|
+
"products"
|
|
607
|
+
];
|
|
608
|
+
var integrationCassaInCloudCatalogMappingProcessScopeSchema = import_zod2.z.enum(
|
|
609
|
+
integrationCassaInCloudCatalogMappingProcessScopes
|
|
610
|
+
);
|
|
611
|
+
var integrationCassaInCloudCatalogMappingProcessStatuses = [
|
|
612
|
+
"pending",
|
|
613
|
+
"running",
|
|
614
|
+
"completed",
|
|
615
|
+
"completed_with_errors",
|
|
616
|
+
"failed"
|
|
617
|
+
];
|
|
618
|
+
var integrationCassaInCloudCatalogMappingProcessStatusSchema = import_zod2.z.enum(
|
|
619
|
+
integrationCassaInCloudCatalogMappingProcessStatuses
|
|
620
|
+
);
|
|
621
|
+
var integrationCassaInCloudCatalogMappingIssueTypes = [
|
|
622
|
+
"stale_remote_mapping",
|
|
623
|
+
"unmapped_local_resource",
|
|
624
|
+
"remote_request_failed"
|
|
625
|
+
];
|
|
626
|
+
var integrationCassaInCloudCatalogMappingIssueTypeSchema = import_zod2.z.enum(
|
|
627
|
+
integrationCassaInCloudCatalogMappingIssueTypes
|
|
628
|
+
);
|
|
566
629
|
var integrationCassaInCloudWebHookEventEntities = [
|
|
567
630
|
"BILL",
|
|
568
631
|
"RECEIPT",
|
|
@@ -782,6 +845,9 @@ var integrationJustEatOrderIriSchema = (0, import_sdk_js_global_types2.iriSchema
|
|
|
782
845
|
var integrationCassaInCloudSyncMenuProcessIriSchema = (0, import_sdk_js_global_types2.iriSchema)(
|
|
783
846
|
"/integrations/cassa_in_cloud/:id/sync_menu_processes/:processId"
|
|
784
847
|
);
|
|
848
|
+
var integrationCassaInCloudCatalogMappingProcessIriSchema = (0, import_sdk_js_global_types2.iriSchema)(
|
|
849
|
+
"/integrations/cassa_in_cloud/:id/catalog_mapping_processes/:processId"
|
|
850
|
+
);
|
|
785
851
|
var integrationCassaInCloudSyncCustomersProcessIriSchema = (0, import_sdk_js_global_types2.iriSchema)(
|
|
786
852
|
"/integrations/cassa_in_cloud/:id/sync_customers_processes/:processId"
|
|
787
853
|
);
|
|
@@ -1062,10 +1128,10 @@ var integrationElephantRestaurantCommonSchema = import_zod3.z.object({
|
|
|
1062
1128
|
name: import_zod3.z.string().trim().min(1, "name.required").max(255),
|
|
1063
1129
|
platformRestaurantId: import_zod3.z.string().trim().min(1, "platformRestaurantId.required").max(255),
|
|
1064
1130
|
platformChainId: optionalCleanField(import_zod3.z.string().trim().max(255)),
|
|
1065
|
-
salesModeId:
|
|
1131
|
+
salesModeId: import_zod3.z.string().trim().min(1, "salesModeId.required"),
|
|
1066
1132
|
categoryId: import_zod3.z.string().trim().min(1, "categoryId.required"),
|
|
1067
1133
|
defaultTaxRate: import_zod3.z.coerce.number().min(0).max(100),
|
|
1068
|
-
channels: import_zod3.z.array(import_sdk_js_global_types3.menuChannelSchema).min(2),
|
|
1134
|
+
channels: import_zod3.z.array(import_sdk_js_global_types3.menuChannelSchema).min(2).default([...import_sdk_js_global_types3.menuChannels]),
|
|
1069
1135
|
orderType: import_sdk_js_global_types3.orderTypeSchema.refine((value) => value !== "kitchen", "orderType.invalid"),
|
|
1070
1136
|
defaultPreparationTime: import_zod3.z.coerce.number().int().min(0).max(240),
|
|
1071
1137
|
acceptanceTimeout: import_zod3.z.coerce.number().int().min(0).max(120)
|
|
@@ -1267,6 +1333,15 @@ var activatableIntegrationSchema = import_zod5.z.discriminatedUnion("service", [
|
|
|
1267
1333
|
activatableIntegrationStatuses,
|
|
1268
1334
|
exclusiveIntegrationServiceSchema,
|
|
1269
1335
|
exclusiveIntegrationServices,
|
|
1336
|
+
integrationCassaInCloudCatalogMappingIssueTypeSchema,
|
|
1337
|
+
integrationCassaInCloudCatalogMappingIssueTypes,
|
|
1338
|
+
integrationCassaInCloudCatalogMappingProcessIriSchema,
|
|
1339
|
+
integrationCassaInCloudCatalogMappingProcessOperationSchema,
|
|
1340
|
+
integrationCassaInCloudCatalogMappingProcessOperations,
|
|
1341
|
+
integrationCassaInCloudCatalogMappingProcessScopeSchema,
|
|
1342
|
+
integrationCassaInCloudCatalogMappingProcessScopes,
|
|
1343
|
+
integrationCassaInCloudCatalogMappingProcessStatusSchema,
|
|
1344
|
+
integrationCassaInCloudCatalogMappingProcessStatuses,
|
|
1270
1345
|
integrationCassaInCloudCategoryMappingIriSchema,
|
|
1271
1346
|
integrationCassaInCloudCategoryMappingNullableIriSchema,
|
|
1272
1347
|
integrationCassaInCloudCategoryModifierValueMappingIriSchema,
|
|
@@ -1412,6 +1487,10 @@ var activatableIntegrationSchema = import_zod5.z.discriminatedUnion("service", [
|
|
|
1412
1487
|
integrationIssueIriSchema,
|
|
1413
1488
|
integrationIssueScopeSchema,
|
|
1414
1489
|
integrationIssueScopes,
|
|
1490
|
+
integrationIssueSeverities,
|
|
1491
|
+
integrationIssueSeveritySchema,
|
|
1492
|
+
integrationIssueStatusSchema,
|
|
1493
|
+
integrationIssueStatuses,
|
|
1415
1494
|
integrationJustEatDataSchema,
|
|
1416
1495
|
integrationJustEatIriSchema,
|
|
1417
1496
|
integrationJustEatMenuTypeSchema,
|