@deliverart/sdk-js-integration-types 2.25.2 → 2.27.0
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 +54 -0
- package/dist/index.cjs +378 -8
- package/dist/index.d.cts +1442 -21
- package/dist/index.d.ts +1442 -21
- package/dist/index.js +329 -5
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -5,3 +5,57 @@ Shared integration type and Zod schema package for the DeliverArt JavaScript SDK
|
|
|
5
5
|
Use this package when another SDK package needs integration enum values, IRI schemas,
|
|
6
6
|
activatable integration schemas, or service-specific integration data schemas without
|
|
7
7
|
depending on `@deliverart/sdk-js-integration`.
|
|
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
|
+
|
|
16
|
+
## Elephant Contracts
|
|
17
|
+
|
|
18
|
+
The package exports Elephant service, lifecycle, health, catalog, credential-mode, and
|
|
19
|
+
Restaurant-membership enums together with typed IRIs. It also exports
|
|
20
|
+
`integrationElephantDataSchema` for lead and activation request payloads.
|
|
21
|
+
Catalog import status, step, and resource-error enums are exported for consumers that
|
|
22
|
+
render the asynchronous manual import without depending on the request package.
|
|
23
|
+
|
|
24
|
+
Managed provisioning requires one or more Restaurant definitions and strips client-supplied
|
|
25
|
+
`tenantId`, `appId`, and `personalAccessToken` values because Deliverart resolves them.
|
|
26
|
+
Provided provisioning requires all three fields. Every Restaurant
|
|
27
|
+
must use `delivery` or `collection` and include both the `application` and `elephant`
|
|
28
|
+
catalog channels. Supported platforms are `migros_yemek`, `trendyol_go_meal`, `fuudy`,
|
|
29
|
+
`getir`, and `yemeksepeti`; when platform credentials are supplied, the selected
|
|
30
|
+
platform's complete authentication object is required.
|
|
31
|
+
|
|
32
|
+
`salesModeId` is optional. Omit it when the Restaurant should use Deliverart base
|
|
33
|
+
catalog prices; `categoryId` remains required for runtime creation of unmapped items.
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { integrationElephantDataSchema } from '@deliverart/sdk-js-integration-types'
|
|
37
|
+
|
|
38
|
+
const payload = integrationElephantDataSchema.parse({
|
|
39
|
+
credentialMode: 'managed',
|
|
40
|
+
restaurants: [
|
|
41
|
+
{
|
|
42
|
+
name: 'Restaurant Centre',
|
|
43
|
+
platform: 'migros_yemek',
|
|
44
|
+
platformRestaurantId: 'restaurant-123',
|
|
45
|
+
platformChainId: 'group-456',
|
|
46
|
+
authentication: {
|
|
47
|
+
secret_key: '12345678901234567890123456789012',
|
|
48
|
+
x_api_key: 'write-only-platform-key',
|
|
49
|
+
store_id: 'restaurant-123',
|
|
50
|
+
store_group_id: 'group-456',
|
|
51
|
+
},
|
|
52
|
+
categoryId: '20c71a6a-c924-42e0-9078-e3f672704dbb',
|
|
53
|
+
defaultTaxRate: 10,
|
|
54
|
+
channels: ['application', 'elephant'],
|
|
55
|
+
orderType: 'delivery',
|
|
56
|
+
defaultPreparationTime: 15,
|
|
57
|
+
acceptanceTimeout: 5,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
})
|
|
61
|
+
```
|
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,
|
|
@@ -114,6 +123,39 @@ __export(index_exports, {
|
|
|
114
123
|
integrationEcommerceOrderingModeSchema: () => integrationEcommerceOrderingModeSchema,
|
|
115
124
|
integrationEcommerceOrderingModes: () => integrationEcommerceOrderingModes,
|
|
116
125
|
integrationEcommerceThemeSchema: () => integrationEcommerceThemeSchema,
|
|
126
|
+
integrationElephantCatalogImportResourceTypeSchema: () => integrationElephantCatalogImportResourceTypeSchema,
|
|
127
|
+
integrationElephantCatalogImportResourceTypes: () => integrationElephantCatalogImportResourceTypes,
|
|
128
|
+
integrationElephantCatalogImportStatusSchema: () => integrationElephantCatalogImportStatusSchema,
|
|
129
|
+
integrationElephantCatalogImportStatuses: () => integrationElephantCatalogImportStatuses,
|
|
130
|
+
integrationElephantCatalogImportStepSchema: () => integrationElephantCatalogImportStepSchema,
|
|
131
|
+
integrationElephantCatalogImportSteps: () => integrationElephantCatalogImportSteps,
|
|
132
|
+
integrationElephantCatalogRoleSchema: () => integrationElephantCatalogRoleSchema,
|
|
133
|
+
integrationElephantCatalogRoles: () => integrationElephantCatalogRoles,
|
|
134
|
+
integrationElephantCatalogSideSchema: () => integrationElephantCatalogSideSchema,
|
|
135
|
+
integrationElephantCatalogSides: () => integrationElephantCatalogSides,
|
|
136
|
+
integrationElephantCatalogStatusSchema: () => integrationElephantCatalogStatusSchema,
|
|
137
|
+
integrationElephantCatalogStatuses: () => integrationElephantCatalogStatuses,
|
|
138
|
+
integrationElephantCredentialModeSchema: () => integrationElephantCredentialModeSchema,
|
|
139
|
+
integrationElephantCredentialModes: () => integrationElephantCredentialModes,
|
|
140
|
+
integrationElephantDataSchema: () => integrationElephantDataSchema,
|
|
141
|
+
integrationElephantFuudyAuthenticationSchema: () => integrationElephantFuudyAuthenticationSchema,
|
|
142
|
+
integrationElephantGetirAuthenticationSchema: () => integrationElephantGetirAuthenticationSchema,
|
|
143
|
+
integrationElephantIriSchema: () => integrationElephantIriSchema,
|
|
144
|
+
integrationElephantMigrosYemekAuthenticationSchema: () => integrationElephantMigrosYemekAuthenticationSchema,
|
|
145
|
+
integrationElephantNullableIriSchema: () => integrationElephantNullableIriSchema,
|
|
146
|
+
integrationElephantOrderReleaseStatusSchema: () => integrationElephantOrderReleaseStatusSchema,
|
|
147
|
+
integrationElephantOrderReleaseStatuses: () => integrationElephantOrderReleaseStatuses,
|
|
148
|
+
integrationElephantPlatformSchema: () => integrationElephantPlatformSchema,
|
|
149
|
+
integrationElephantProvisioningStepSchema: () => integrationElephantProvisioningStepSchema,
|
|
150
|
+
integrationElephantProvisioningSteps: () => integrationElephantProvisioningSteps,
|
|
151
|
+
integrationElephantRestaurantAuthenticationSchema: () => integrationElephantRestaurantAuthenticationSchema,
|
|
152
|
+
integrationElephantRestaurantDataSchema: () => integrationElephantRestaurantDataSchema,
|
|
153
|
+
integrationElephantRestaurantIriSchema: () => integrationElephantRestaurantIriSchema,
|
|
154
|
+
integrationElephantRestaurantNullableIriSchema: () => integrationElephantRestaurantNullableIriSchema,
|
|
155
|
+
integrationElephantRestaurantStatusSchema: () => integrationElephantRestaurantStatusSchema,
|
|
156
|
+
integrationElephantRestaurantStatuses: () => integrationElephantRestaurantStatuses,
|
|
157
|
+
integrationElephantTrendyolGoMealAuthenticationSchema: () => integrationElephantTrendyolGoMealAuthenticationSchema,
|
|
158
|
+
integrationElephantYemeksepetiAuthenticationSchema: () => integrationElephantYemeksepetiAuthenticationSchema,
|
|
117
159
|
integrationGlovoBulkUpdateIriSchema: () => integrationGlovoBulkUpdateIriSchema,
|
|
118
160
|
integrationGlovoBulkUpdateStatusSchema: () => integrationGlovoBulkUpdateStatusSchema,
|
|
119
161
|
integrationGlovoBulkUpdateStatuses: () => integrationGlovoBulkUpdateStatuses,
|
|
@@ -132,6 +174,8 @@ __export(index_exports, {
|
|
|
132
174
|
integrationGlovoSyncStatuses: () => integrationGlovoSyncStatuses,
|
|
133
175
|
integrationGlovoWebhookEventTypeSchema: () => integrationGlovoWebhookEventTypeSchema,
|
|
134
176
|
integrationGlovoWebhookEventTypes: () => integrationGlovoWebhookEventTypes,
|
|
177
|
+
integrationHealthStatusSchema: () => integrationHealthStatusSchema,
|
|
178
|
+
integrationHealthStatuses: () => integrationHealthStatuses,
|
|
135
179
|
integrationIriSchema: () => integrationIriSchema,
|
|
136
180
|
integrationIssueCodeSchema: () => integrationIssueCodeSchema,
|
|
137
181
|
integrationIssueCodes: () => integrationIssueCodes,
|
|
@@ -162,6 +206,8 @@ __export(index_exports, {
|
|
|
162
206
|
integrationPathSchemas: () => integrationPathSchemas,
|
|
163
207
|
integrationProviderSchema: () => integrationProviderSchema,
|
|
164
208
|
integrationProviders: () => integrationProviders,
|
|
209
|
+
integrationRequestLogOutcomeSchema: () => integrationRequestLogOutcomeSchema,
|
|
210
|
+
integrationRequestLogOutcomes: () => integrationRequestLogOutcomes,
|
|
165
211
|
integrationServiceDataSchema: () => integrationServiceDataSchema,
|
|
166
212
|
integrationServiceSchema: () => integrationServiceSchema,
|
|
167
213
|
integrationServices: () => integrationServices,
|
|
@@ -222,10 +268,11 @@ __export(index_exports, {
|
|
|
222
268
|
module.exports = __toCommonJS(index_exports);
|
|
223
269
|
|
|
224
270
|
// src/activatable-integration.ts
|
|
225
|
-
var
|
|
271
|
+
var import_sdk_js_global_types4 = require("@deliverart/sdk-js-global-types");
|
|
226
272
|
var import_zod5 = require("zod");
|
|
227
273
|
|
|
228
274
|
// src/activatable-integration-data-schemas.ts
|
|
275
|
+
var import_sdk_js_global_types3 = require("@deliverart/sdk-js-global-types");
|
|
229
276
|
var import_zod3 = require("zod");
|
|
230
277
|
|
|
231
278
|
// src/tilby-sync-settings.ts
|
|
@@ -260,8 +307,16 @@ var integrationTilbyEditableSyncSettingsSchema = integrationTilbySyncSettingsSch
|
|
|
260
307
|
// src/types.ts
|
|
261
308
|
var import_sdk_js_global_types2 = require("@deliverart/sdk-js-global-types");
|
|
262
309
|
var import_zod2 = require("zod");
|
|
263
|
-
var integrationStatuses = [
|
|
310
|
+
var integrationStatuses = [
|
|
311
|
+
"pending",
|
|
312
|
+
"provisioning",
|
|
313
|
+
"paused",
|
|
314
|
+
"active",
|
|
315
|
+
"deleting"
|
|
316
|
+
];
|
|
264
317
|
var integrationStatusSchema = import_zod2.z.enum(integrationStatuses);
|
|
318
|
+
var integrationHealthStatuses = ["unknown", "healthy", "degraded", "failed"];
|
|
319
|
+
var integrationHealthStatusSchema = import_zod2.z.enum(integrationHealthStatuses);
|
|
265
320
|
var integrationProviders = ["deliverart", "cassa_in_cloud"];
|
|
266
321
|
var integrationProviderSchema = import_zod2.z.enum(integrationProviders);
|
|
267
322
|
var integrationServices = [
|
|
@@ -271,11 +326,99 @@ var integrationServices = [
|
|
|
271
326
|
"cassa_in_cloud",
|
|
272
327
|
"tilby",
|
|
273
328
|
"kitchen",
|
|
274
|
-
"ecommerce"
|
|
329
|
+
"ecommerce",
|
|
330
|
+
"elephant"
|
|
275
331
|
];
|
|
276
332
|
var integrationServiceSchema = import_zod2.z.enum(integrationServices);
|
|
277
|
-
var exclusiveIntegrationServices = [
|
|
333
|
+
var exclusiveIntegrationServices = [
|
|
334
|
+
"kitchen",
|
|
335
|
+
"cassa_in_cloud",
|
|
336
|
+
"tilby",
|
|
337
|
+
"ecommerce",
|
|
338
|
+
"elephant"
|
|
339
|
+
];
|
|
278
340
|
var exclusiveIntegrationServiceSchema = import_zod2.z.enum(exclusiveIntegrationServices);
|
|
341
|
+
var integrationElephantCredentialModes = ["managed", "provided"];
|
|
342
|
+
var integrationElephantCredentialModeSchema = import_zod2.z.enum(integrationElephantCredentialModes);
|
|
343
|
+
var integrationElephantRestaurantStatuses = [
|
|
344
|
+
"pending",
|
|
345
|
+
"provisioning",
|
|
346
|
+
"active",
|
|
347
|
+
"paused",
|
|
348
|
+
"removing"
|
|
349
|
+
];
|
|
350
|
+
var integrationElephantRestaurantStatusSchema = import_zod2.z.enum(
|
|
351
|
+
integrationElephantRestaurantStatuses
|
|
352
|
+
);
|
|
353
|
+
var integrationElephantCatalogStatuses = [
|
|
354
|
+
"unknown",
|
|
355
|
+
"refreshing",
|
|
356
|
+
"ready",
|
|
357
|
+
"stale",
|
|
358
|
+
"unsupported",
|
|
359
|
+
"failed"
|
|
360
|
+
];
|
|
361
|
+
var integrationElephantCatalogStatusSchema = import_zod2.z.enum(integrationElephantCatalogStatuses);
|
|
362
|
+
var integrationElephantCatalogImportStatuses = [
|
|
363
|
+
"pending",
|
|
364
|
+
"running",
|
|
365
|
+
"completed",
|
|
366
|
+
"completed_with_errors",
|
|
367
|
+
"failed"
|
|
368
|
+
];
|
|
369
|
+
var integrationElephantCatalogImportStatusSchema = import_zod2.z.enum(
|
|
370
|
+
integrationElephantCatalogImportStatuses
|
|
371
|
+
);
|
|
372
|
+
var integrationElephantCatalogImportSteps = [
|
|
373
|
+
"queued",
|
|
374
|
+
"refreshing_snapshot",
|
|
375
|
+
"importing_products",
|
|
376
|
+
"completed"
|
|
377
|
+
];
|
|
378
|
+
var integrationElephantCatalogImportStepSchema = import_zod2.z.enum(
|
|
379
|
+
integrationElephantCatalogImportSteps
|
|
380
|
+
);
|
|
381
|
+
var integrationElephantCatalogImportResourceTypes = [
|
|
382
|
+
"process",
|
|
383
|
+
"product",
|
|
384
|
+
"option_group",
|
|
385
|
+
"option",
|
|
386
|
+
"variant"
|
|
387
|
+
];
|
|
388
|
+
var integrationElephantCatalogImportResourceTypeSchema = import_zod2.z.enum(
|
|
389
|
+
integrationElephantCatalogImportResourceTypes
|
|
390
|
+
);
|
|
391
|
+
var integrationElephantProvisioningSteps = [
|
|
392
|
+
"pending",
|
|
393
|
+
"credentials",
|
|
394
|
+
"tenant",
|
|
395
|
+
"app",
|
|
396
|
+
"api_token",
|
|
397
|
+
"app_configuration",
|
|
398
|
+
"app_connection_test",
|
|
399
|
+
"restaurants",
|
|
400
|
+
"catalog",
|
|
401
|
+
"complete",
|
|
402
|
+
"deprovisioning"
|
|
403
|
+
];
|
|
404
|
+
var integrationElephantProvisioningStepSchema = import_zod2.z.enum(
|
|
405
|
+
integrationElephantProvisioningSteps
|
|
406
|
+
);
|
|
407
|
+
var integrationElephantCatalogRoles = ["product", "option", "variant"];
|
|
408
|
+
var integrationElephantCatalogRoleSchema = import_zod2.z.enum(integrationElephantCatalogRoles);
|
|
409
|
+
var integrationElephantCatalogSides = ["platform", "app"];
|
|
410
|
+
var integrationElephantCatalogSideSchema = import_zod2.z.enum(integrationElephantCatalogSides);
|
|
411
|
+
var integrationElephantOrderReleaseStatuses = [
|
|
412
|
+
"preparing",
|
|
413
|
+
"ready",
|
|
414
|
+
"released",
|
|
415
|
+
"failed"
|
|
416
|
+
];
|
|
417
|
+
var integrationElephantOrderReleaseStatusSchema = import_zod2.z.enum(
|
|
418
|
+
integrationElephantOrderReleaseStatuses
|
|
419
|
+
);
|
|
420
|
+
var integrationRequestLogOutcomes = ["success", "client_error", "server_error"];
|
|
421
|
+
var integrationRequestLogOutcomeSchema = import_zod2.z.enum(integrationRequestLogOutcomes);
|
|
279
422
|
var integrationClientLogRequestMethods = ["DELETE", "GET", "PATCH", "POST", "PUT"];
|
|
280
423
|
var integrationClientLogRequestMethodSchema = import_zod2.z.enum(integrationClientLogRequestMethods);
|
|
281
424
|
var integrationKitchenViewModes = ["column"];
|
|
@@ -429,6 +572,38 @@ var integrationCassaInCloudProductChannels = [
|
|
|
429
572
|
var integrationCassaInCloudProductChannelSchema = import_zod2.z.enum(
|
|
430
573
|
integrationCassaInCloudProductChannels
|
|
431
574
|
);
|
|
575
|
+
var integrationCassaInCloudCatalogMappingProcessOperations = [
|
|
576
|
+
"audit",
|
|
577
|
+
"reconcile_channels"
|
|
578
|
+
];
|
|
579
|
+
var integrationCassaInCloudCatalogMappingProcessOperationSchema = import_zod2.z.enum(
|
|
580
|
+
integrationCassaInCloudCatalogMappingProcessOperations
|
|
581
|
+
);
|
|
582
|
+
var integrationCassaInCloudCatalogMappingProcessScopes = [
|
|
583
|
+
"categories",
|
|
584
|
+
"products"
|
|
585
|
+
];
|
|
586
|
+
var integrationCassaInCloudCatalogMappingProcessScopeSchema = import_zod2.z.enum(
|
|
587
|
+
integrationCassaInCloudCatalogMappingProcessScopes
|
|
588
|
+
);
|
|
589
|
+
var integrationCassaInCloudCatalogMappingProcessStatuses = [
|
|
590
|
+
"pending",
|
|
591
|
+
"running",
|
|
592
|
+
"completed",
|
|
593
|
+
"completed_with_errors",
|
|
594
|
+
"failed"
|
|
595
|
+
];
|
|
596
|
+
var integrationCassaInCloudCatalogMappingProcessStatusSchema = import_zod2.z.enum(
|
|
597
|
+
integrationCassaInCloudCatalogMappingProcessStatuses
|
|
598
|
+
);
|
|
599
|
+
var integrationCassaInCloudCatalogMappingIssueTypes = [
|
|
600
|
+
"stale_remote_mapping",
|
|
601
|
+
"unmapped_local_resource",
|
|
602
|
+
"remote_request_failed"
|
|
603
|
+
];
|
|
604
|
+
var integrationCassaInCloudCatalogMappingIssueTypeSchema = import_zod2.z.enum(
|
|
605
|
+
integrationCassaInCloudCatalogMappingIssueTypes
|
|
606
|
+
);
|
|
432
607
|
var integrationCassaInCloudWebHookEventEntities = [
|
|
433
608
|
"BILL",
|
|
434
609
|
"RECEIPT",
|
|
@@ -612,6 +787,14 @@ var integrationTilbyIriSchema = integrationPathSchemas.tilby.iriSchema;
|
|
|
612
787
|
var integrationTilbyNullableIriSchema = integrationPathSchemas.tilby.iriNullableSchema;
|
|
613
788
|
var integrationEcommerceIriSchema = integrationPathSchemas.ecommerce.iriSchema;
|
|
614
789
|
var integrationEcommerceNullableIriSchema = integrationPathSchemas.ecommerce.iriNullableSchema;
|
|
790
|
+
var integrationElephantIriSchema = integrationPathSchemas.elephant.iriSchema;
|
|
791
|
+
var integrationElephantNullableIriSchema = integrationPathSchemas.elephant.iriNullableSchema;
|
|
792
|
+
var integrationElephantRestaurantIriSchema = (0, import_sdk_js_global_types2.iriSchema)(
|
|
793
|
+
"/integrations/elephant/:id/restaurants/:membershipId"
|
|
794
|
+
);
|
|
795
|
+
var integrationElephantRestaurantNullableIriSchema = (0, import_sdk_js_global_types2.iriNullableSchema)(
|
|
796
|
+
"/integrations/elephant/:id/restaurants/:membershipId"
|
|
797
|
+
);
|
|
615
798
|
var integrationIriSchema = (0, import_sdk_js_global_types2.iriSchema)("/integrations/:id");
|
|
616
799
|
var integrationNullableIriSchema = (0, import_sdk_js_global_types2.iriNullableSchema)("/integrations/:id");
|
|
617
800
|
var integrationDetailsPathPatterns = [
|
|
@@ -640,6 +823,9 @@ var integrationJustEatOrderIriSchema = (0, import_sdk_js_global_types2.iriSchema
|
|
|
640
823
|
var integrationCassaInCloudSyncMenuProcessIriSchema = (0, import_sdk_js_global_types2.iriSchema)(
|
|
641
824
|
"/integrations/cassa_in_cloud/:id/sync_menu_processes/:processId"
|
|
642
825
|
);
|
|
826
|
+
var integrationCassaInCloudCatalogMappingProcessIriSchema = (0, import_sdk_js_global_types2.iriSchema)(
|
|
827
|
+
"/integrations/cassa_in_cloud/:id/catalog_mapping_processes/:processId"
|
|
828
|
+
);
|
|
643
829
|
var integrationCassaInCloudSyncCustomersProcessIriSchema = (0, import_sdk_js_global_types2.iriSchema)(
|
|
644
830
|
"/integrations/cassa_in_cloud/:id/sync_customers_processes/:processId"
|
|
645
831
|
);
|
|
@@ -868,6 +1054,133 @@ var integrationEcommerceDataSchema = import_zod3.z.object({
|
|
|
868
1054
|
heroImage: optionalCleanField(import_zod3.z.string().trim().min(1).max(80)),
|
|
869
1055
|
theme: optionalCleanField(integrationEcommerceThemeSchema)
|
|
870
1056
|
});
|
|
1057
|
+
var integrationElephantPlatformSchema = import_zod3.z.enum([
|
|
1058
|
+
"migros_yemek",
|
|
1059
|
+
"yemeksepeti",
|
|
1060
|
+
"getir",
|
|
1061
|
+
"trendyol_go_meal",
|
|
1062
|
+
"fuudy"
|
|
1063
|
+
]);
|
|
1064
|
+
var elephantPlatformIdentifierSchema = import_zod3.z.union([import_zod3.z.string().trim().min(1), import_zod3.z.number().int()]);
|
|
1065
|
+
var elephantPlatformBaseUrlSchema = import_zod3.z.url().optional();
|
|
1066
|
+
var integrationElephantMigrosYemekAuthenticationSchema = import_zod3.z.object({
|
|
1067
|
+
secret_key: import_zod3.z.string().length(32, "authentication.secret_key.length"),
|
|
1068
|
+
x_api_key: import_zod3.z.string().trim().min(1, "authentication.x_api_key.required"),
|
|
1069
|
+
store_id: elephantPlatformIdentifierSchema,
|
|
1070
|
+
store_group_id: elephantPlatformIdentifierSchema,
|
|
1071
|
+
base_url: elephantPlatformBaseUrlSchema
|
|
1072
|
+
}).strict();
|
|
1073
|
+
var integrationElephantTrendyolGoMealAuthenticationSchema = import_zod3.z.object({
|
|
1074
|
+
api_key: import_zod3.z.string().trim().min(1, "authentication.api_key.required"),
|
|
1075
|
+
api_secret: import_zod3.z.string().trim().min(1, "authentication.api_secret.required"),
|
|
1076
|
+
shop_id: elephantPlatformIdentifierSchema,
|
|
1077
|
+
seller_id: elephantPlatformIdentifierSchema,
|
|
1078
|
+
base_url: elephantPlatformBaseUrlSchema
|
|
1079
|
+
}).strict();
|
|
1080
|
+
var integrationElephantFuudyAuthenticationSchema = import_zod3.z.object({
|
|
1081
|
+
app_secret_key: import_zod3.z.string().trim().min(1, "authentication.app_secret_key.required"),
|
|
1082
|
+
rest_secret_key: import_zod3.z.string().trim().min(1, "authentication.rest_secret_key.required"),
|
|
1083
|
+
base_url: elephantPlatformBaseUrlSchema
|
|
1084
|
+
}).strict();
|
|
1085
|
+
var integrationElephantGetirAuthenticationSchema = import_zod3.z.object({
|
|
1086
|
+
app_secret_key: import_zod3.z.string().trim().min(1, "authentication.app_secret_key.required"),
|
|
1087
|
+
restaurant_secret_key: import_zod3.z.string().trim().min(1, "authentication.restaurant_secret_key.required"),
|
|
1088
|
+
base_url: elephantPlatformBaseUrlSchema
|
|
1089
|
+
}).strict();
|
|
1090
|
+
var integrationElephantYemeksepetiAuthenticationSchema = import_zod3.z.object({
|
|
1091
|
+
username: import_zod3.z.string().trim().min(1, "authentication.username.required"),
|
|
1092
|
+
password: import_zod3.z.string().min(1, "authentication.password.required"),
|
|
1093
|
+
chain_code: import_zod3.z.string().trim().min(1, "authentication.chain_code.required"),
|
|
1094
|
+
remote_id: import_zod3.z.string().trim().min(1, "authentication.remote_id.required"),
|
|
1095
|
+
webhook_token: optionalCleanField(import_zod3.z.string().trim().min(1)),
|
|
1096
|
+
base_url: elephantPlatformBaseUrlSchema
|
|
1097
|
+
}).strict();
|
|
1098
|
+
var integrationElephantRestaurantAuthenticationSchema = import_zod3.z.union([
|
|
1099
|
+
integrationElephantMigrosYemekAuthenticationSchema,
|
|
1100
|
+
integrationElephantTrendyolGoMealAuthenticationSchema,
|
|
1101
|
+
integrationElephantFuudyAuthenticationSchema,
|
|
1102
|
+
integrationElephantGetirAuthenticationSchema,
|
|
1103
|
+
integrationElephantYemeksepetiAuthenticationSchema
|
|
1104
|
+
]);
|
|
1105
|
+
var integrationElephantRestaurantCommonSchema = import_zod3.z.object({
|
|
1106
|
+
name: import_zod3.z.string().trim().min(1, "name.required").max(255),
|
|
1107
|
+
platformRestaurantId: import_zod3.z.string().trim().min(1, "platformRestaurantId.required").max(255),
|
|
1108
|
+
platformChainId: optionalCleanField(import_zod3.z.string().trim().max(255)),
|
|
1109
|
+
salesModeId: optionalCleanField(import_zod3.z.string().trim().min(1, "salesModeId.required")),
|
|
1110
|
+
categoryId: import_zod3.z.string().trim().min(1, "categoryId.required"),
|
|
1111
|
+
defaultTaxRate: import_zod3.z.coerce.number().min(0).max(100),
|
|
1112
|
+
channels: import_zod3.z.array(import_sdk_js_global_types3.menuChannelSchema).min(2),
|
|
1113
|
+
orderType: import_sdk_js_global_types3.orderTypeSchema.refine((value) => value !== "kitchen", "orderType.invalid"),
|
|
1114
|
+
defaultPreparationTime: import_zod3.z.coerce.number().int().min(0).max(240),
|
|
1115
|
+
acceptanceTimeout: import_zod3.z.coerce.number().int().min(0).max(120)
|
|
1116
|
+
});
|
|
1117
|
+
var integrationElephantRestaurantDataSchema = import_zod3.z.discriminatedUnion("platform", [
|
|
1118
|
+
integrationElephantRestaurantCommonSchema.extend({
|
|
1119
|
+
platform: import_zod3.z.literal("migros_yemek"),
|
|
1120
|
+
authentication: integrationElephantMigrosYemekAuthenticationSchema.nullish()
|
|
1121
|
+
}),
|
|
1122
|
+
integrationElephantRestaurantCommonSchema.extend({
|
|
1123
|
+
platform: import_zod3.z.literal("trendyol_go_meal"),
|
|
1124
|
+
authentication: integrationElephantTrendyolGoMealAuthenticationSchema.nullish()
|
|
1125
|
+
}),
|
|
1126
|
+
integrationElephantRestaurantCommonSchema.extend({
|
|
1127
|
+
platform: import_zod3.z.literal("fuudy"),
|
|
1128
|
+
authentication: integrationElephantFuudyAuthenticationSchema.nullish()
|
|
1129
|
+
}),
|
|
1130
|
+
integrationElephantRestaurantCommonSchema.extend({
|
|
1131
|
+
platform: import_zod3.z.literal("getir"),
|
|
1132
|
+
authentication: integrationElephantGetirAuthenticationSchema.nullish()
|
|
1133
|
+
}),
|
|
1134
|
+
integrationElephantRestaurantCommonSchema.extend({
|
|
1135
|
+
platform: import_zod3.z.literal("yemeksepeti"),
|
|
1136
|
+
authentication: integrationElephantYemeksepetiAuthenticationSchema.nullish()
|
|
1137
|
+
})
|
|
1138
|
+
]).superRefine((value, context) => {
|
|
1139
|
+
for (const requiredChannel of ["application", "elephant"]) {
|
|
1140
|
+
if (!value.channels.includes(requiredChannel)) {
|
|
1141
|
+
context.addIssue({
|
|
1142
|
+
code: "custom",
|
|
1143
|
+
message: `channels.${requiredChannel}.required`,
|
|
1144
|
+
path: ["channels"],
|
|
1145
|
+
input: value.channels
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
if (!value.authentication) return;
|
|
1150
|
+
const authentication = value.authentication;
|
|
1151
|
+
const restaurantAuthenticationField = value.platform === "migros_yemek" ? "store_id" : value.platform === "trendyol_go_meal" ? "shop_id" : value.platform === "yemeksepeti" ? "remote_id" : null;
|
|
1152
|
+
const chainAuthenticationField = value.platform === "migros_yemek" ? "store_group_id" : value.platform === "yemeksepeti" ? "chain_code" : null;
|
|
1153
|
+
if (restaurantAuthenticationField && String(authentication[restaurantAuthenticationField]) !== value.platformRestaurantId) {
|
|
1154
|
+
context.addIssue({
|
|
1155
|
+
code: "custom",
|
|
1156
|
+
message: `authentication.${restaurantAuthenticationField}.mismatch`,
|
|
1157
|
+
path: ["authentication", restaurantAuthenticationField],
|
|
1158
|
+
input: authentication[restaurantAuthenticationField]
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
1161
|
+
if (chainAuthenticationField && value.platformChainId && String(authentication[chainAuthenticationField]) !== value.platformChainId) {
|
|
1162
|
+
context.addIssue({
|
|
1163
|
+
code: "custom",
|
|
1164
|
+
message: `authentication.${chainAuthenticationField}.mismatch`,
|
|
1165
|
+
path: ["authentication", chainAuthenticationField],
|
|
1166
|
+
input: authentication[chainAuthenticationField]
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
});
|
|
1170
|
+
var integrationElephantDataCommonSchema = import_zod3.z.object({
|
|
1171
|
+
restaurants: import_zod3.z.array(integrationElephantRestaurantDataSchema).min(1, "restaurants.required")
|
|
1172
|
+
});
|
|
1173
|
+
var integrationElephantDataSchema = import_zod3.z.discriminatedUnion("credentialMode", [
|
|
1174
|
+
integrationElephantDataCommonSchema.extend({
|
|
1175
|
+
credentialMode: integrationElephantCredentialModeSchema.extract(["managed"])
|
|
1176
|
+
}),
|
|
1177
|
+
integrationElephantDataCommonSchema.extend({
|
|
1178
|
+
credentialMode: integrationElephantCredentialModeSchema.extract(["provided"]),
|
|
1179
|
+
tenantId: import_zod3.z.string().trim().min(1, "tenantId.required").max(36),
|
|
1180
|
+
appId: import_zod3.z.string().trim().min(1, "appId.required").max(36),
|
|
1181
|
+
personalAccessToken: import_zod3.z.string().trim().min(1, "personalAccessToken.required")
|
|
1182
|
+
})
|
|
1183
|
+
]);
|
|
871
1184
|
var integrationServiceDataSchema = import_zod3.z.discriminatedUnion("service", [
|
|
872
1185
|
import_zod3.z.object({
|
|
873
1186
|
service: import_zod3.z.literal("kitchen"),
|
|
@@ -896,6 +1209,10 @@ var integrationServiceDataSchema = import_zod3.z.discriminatedUnion("service", [
|
|
|
896
1209
|
import_zod3.z.object({
|
|
897
1210
|
service: import_zod3.z.literal("ecommerce"),
|
|
898
1211
|
data: integrationEcommerceDataSchema
|
|
1212
|
+
}),
|
|
1213
|
+
import_zod3.z.object({
|
|
1214
|
+
service: import_zod3.z.literal("elephant"),
|
|
1215
|
+
data: integrationElephantDataSchema
|
|
899
1216
|
})
|
|
900
1217
|
]);
|
|
901
1218
|
|
|
@@ -905,6 +1222,7 @@ var activatableIntegrationStatuses = [
|
|
|
905
1222
|
"waiting_for_user",
|
|
906
1223
|
"waiting_for_admin",
|
|
907
1224
|
"request_sent_partner",
|
|
1225
|
+
"provisioning",
|
|
908
1226
|
"active",
|
|
909
1227
|
"failed"
|
|
910
1228
|
];
|
|
@@ -923,7 +1241,8 @@ var activatableIntegrationBaseSchema = import_zod5.z.object({
|
|
|
923
1241
|
integrationJustEatIriSchema,
|
|
924
1242
|
integrationCassaInCloudIriSchema,
|
|
925
1243
|
integrationTilbyIriSchema,
|
|
926
|
-
integrationEcommerceIriSchema
|
|
1244
|
+
integrationEcommerceIriSchema,
|
|
1245
|
+
integrationElephantIriSchema
|
|
927
1246
|
]).nullable(),
|
|
928
1247
|
status: activatableIntegrationStatusSchema,
|
|
929
1248
|
healthStatus: activatableIntegrationHealthStatusSchema,
|
|
@@ -931,13 +1250,13 @@ var activatableIntegrationBaseSchema = import_zod5.z.object({
|
|
|
931
1250
|
name: import_zod5.z.string(),
|
|
932
1251
|
message: import_zod5.z.string().nullable(),
|
|
933
1252
|
internalNotes: import_zod5.z.string().nullish(),
|
|
934
|
-
createdAt:
|
|
935
|
-
updatedAt:
|
|
1253
|
+
createdAt: import_sdk_js_global_types4.datetimeSchema,
|
|
1254
|
+
updatedAt: import_sdk_js_global_types4.datetimeSchema,
|
|
936
1255
|
updates: import_zod5.z.array(
|
|
937
1256
|
import_zod5.z.object({
|
|
938
1257
|
status: activatableIntegrationStatusSchema,
|
|
939
1258
|
message: import_zod5.z.string().nullable(),
|
|
940
|
-
updatedAt:
|
|
1259
|
+
updatedAt: import_sdk_js_global_types4.datetimeSchema
|
|
941
1260
|
})
|
|
942
1261
|
).optional().default([])
|
|
943
1262
|
});
|
|
@@ -975,6 +1294,11 @@ var activatableIntegrationSchema = import_zod5.z.discriminatedUnion("service", [
|
|
|
975
1294
|
"ecommerce",
|
|
976
1295
|
integrationEcommerceDataSchema,
|
|
977
1296
|
integrationEcommerceNullableIriSchema
|
|
1297
|
+
),
|
|
1298
|
+
createIntegrationSchema(
|
|
1299
|
+
"elephant",
|
|
1300
|
+
integrationElephantDataSchema,
|
|
1301
|
+
integrationElephantNullableIriSchema
|
|
978
1302
|
)
|
|
979
1303
|
]);
|
|
980
1304
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -987,6 +1311,15 @@ var activatableIntegrationSchema = import_zod5.z.discriminatedUnion("service", [
|
|
|
987
1311
|
activatableIntegrationStatuses,
|
|
988
1312
|
exclusiveIntegrationServiceSchema,
|
|
989
1313
|
exclusiveIntegrationServices,
|
|
1314
|
+
integrationCassaInCloudCatalogMappingIssueTypeSchema,
|
|
1315
|
+
integrationCassaInCloudCatalogMappingIssueTypes,
|
|
1316
|
+
integrationCassaInCloudCatalogMappingProcessIriSchema,
|
|
1317
|
+
integrationCassaInCloudCatalogMappingProcessOperationSchema,
|
|
1318
|
+
integrationCassaInCloudCatalogMappingProcessOperations,
|
|
1319
|
+
integrationCassaInCloudCatalogMappingProcessScopeSchema,
|
|
1320
|
+
integrationCassaInCloudCatalogMappingProcessScopes,
|
|
1321
|
+
integrationCassaInCloudCatalogMappingProcessStatusSchema,
|
|
1322
|
+
integrationCassaInCloudCatalogMappingProcessStatuses,
|
|
990
1323
|
integrationCassaInCloudCategoryMappingIriSchema,
|
|
991
1324
|
integrationCassaInCloudCategoryMappingNullableIriSchema,
|
|
992
1325
|
integrationCassaInCloudCategoryModifierValueMappingIriSchema,
|
|
@@ -1073,6 +1406,39 @@ var activatableIntegrationSchema = import_zod5.z.discriminatedUnion("service", [
|
|
|
1073
1406
|
integrationEcommerceOrderingModeSchema,
|
|
1074
1407
|
integrationEcommerceOrderingModes,
|
|
1075
1408
|
integrationEcommerceThemeSchema,
|
|
1409
|
+
integrationElephantCatalogImportResourceTypeSchema,
|
|
1410
|
+
integrationElephantCatalogImportResourceTypes,
|
|
1411
|
+
integrationElephantCatalogImportStatusSchema,
|
|
1412
|
+
integrationElephantCatalogImportStatuses,
|
|
1413
|
+
integrationElephantCatalogImportStepSchema,
|
|
1414
|
+
integrationElephantCatalogImportSteps,
|
|
1415
|
+
integrationElephantCatalogRoleSchema,
|
|
1416
|
+
integrationElephantCatalogRoles,
|
|
1417
|
+
integrationElephantCatalogSideSchema,
|
|
1418
|
+
integrationElephantCatalogSides,
|
|
1419
|
+
integrationElephantCatalogStatusSchema,
|
|
1420
|
+
integrationElephantCatalogStatuses,
|
|
1421
|
+
integrationElephantCredentialModeSchema,
|
|
1422
|
+
integrationElephantCredentialModes,
|
|
1423
|
+
integrationElephantDataSchema,
|
|
1424
|
+
integrationElephantFuudyAuthenticationSchema,
|
|
1425
|
+
integrationElephantGetirAuthenticationSchema,
|
|
1426
|
+
integrationElephantIriSchema,
|
|
1427
|
+
integrationElephantMigrosYemekAuthenticationSchema,
|
|
1428
|
+
integrationElephantNullableIriSchema,
|
|
1429
|
+
integrationElephantOrderReleaseStatusSchema,
|
|
1430
|
+
integrationElephantOrderReleaseStatuses,
|
|
1431
|
+
integrationElephantPlatformSchema,
|
|
1432
|
+
integrationElephantProvisioningStepSchema,
|
|
1433
|
+
integrationElephantProvisioningSteps,
|
|
1434
|
+
integrationElephantRestaurantAuthenticationSchema,
|
|
1435
|
+
integrationElephantRestaurantDataSchema,
|
|
1436
|
+
integrationElephantRestaurantIriSchema,
|
|
1437
|
+
integrationElephantRestaurantNullableIriSchema,
|
|
1438
|
+
integrationElephantRestaurantStatusSchema,
|
|
1439
|
+
integrationElephantRestaurantStatuses,
|
|
1440
|
+
integrationElephantTrendyolGoMealAuthenticationSchema,
|
|
1441
|
+
integrationElephantYemeksepetiAuthenticationSchema,
|
|
1076
1442
|
integrationGlovoBulkUpdateIriSchema,
|
|
1077
1443
|
integrationGlovoBulkUpdateStatusSchema,
|
|
1078
1444
|
integrationGlovoBulkUpdateStatuses,
|
|
@@ -1091,6 +1457,8 @@ var activatableIntegrationSchema = import_zod5.z.discriminatedUnion("service", [
|
|
|
1091
1457
|
integrationGlovoSyncStatuses,
|
|
1092
1458
|
integrationGlovoWebhookEventTypeSchema,
|
|
1093
1459
|
integrationGlovoWebhookEventTypes,
|
|
1460
|
+
integrationHealthStatusSchema,
|
|
1461
|
+
integrationHealthStatuses,
|
|
1094
1462
|
integrationIriSchema,
|
|
1095
1463
|
integrationIssueCodeSchema,
|
|
1096
1464
|
integrationIssueCodes,
|
|
@@ -1121,6 +1489,8 @@ var activatableIntegrationSchema = import_zod5.z.discriminatedUnion("service", [
|
|
|
1121
1489
|
integrationPathSchemas,
|
|
1122
1490
|
integrationProviderSchema,
|
|
1123
1491
|
integrationProviders,
|
|
1492
|
+
integrationRequestLogOutcomeSchema,
|
|
1493
|
+
integrationRequestLogOutcomes,
|
|
1124
1494
|
integrationServiceDataSchema,
|
|
1125
1495
|
integrationServiceSchema,
|
|
1126
1496
|
integrationServices,
|