@deliverart/sdk-js-integration-types
v2.38.0
Published
Deliverart JavaScript SDK shared integration types and schemas
Readme
@deliverart/sdk-js-integration-types
Shared integration type and Zod schema package for the DeliverArt JavaScript SDK.
Use this package when another SDK package needs integration enum values, IRI schemas,
activatable integration schemas, or service-specific integration data schemas without
depending on @deliverart/sdk-js-integration.
CassaInCloud Contracts
The package exports the remote ProductChannel values, separate inbound and initial outbound
channel policy types, and the operation, scope, status, issue-type, and IRI contracts used by
asynchronous CassaInCloud catalog mapping processes. productChannels remains a deprecated
alias for inboundProductChannels for one compatibility release.
Elephant Contracts
The package exports Elephant service, lifecycle, health, catalog, credential-mode, and
Restaurant-membership enums together with typed IRIs. It also exports
integrationElephantDataSchema for lead and activation request payloads.
Catalog import status, step, and resource-error enums are exported for consumers that
render the asynchronous manual import without depending on the request package.
Managed provisioning requires one or more Restaurant definitions and strips client-supplied
tenantId, appId, and personalAccessToken values because Deliverart resolves them.
Provided provisioning requires all three fields. Every Restaurant
must use delivery or collection and include both the application and elephant
catalog channels. Supported platforms are migros_yemek, trendyol_go_meal, fuudy,
getir, and yemeksepeti; when platform credentials are supplied, the selected
platform's complete authentication object is required.
salesModeId and categoryId are required. Elephant validates both connection
identifiers before test and production order delivery.
import { integrationElephantDataSchema } from '@deliverart/sdk-js-integration-types'
const payload = integrationElephantDataSchema.parse({
credentialMode: 'managed',
restaurants: [
{
name: 'Restaurant Centre',
platform: 'migros_yemek',
platformRestaurantId: 'restaurant-123',
platformChainId: 'group-456',
authentication: {
secret_key: '12345678901234567890123456789012',
x_api_key: 'write-only-platform-key',
store_id: 'restaurant-123',
store_group_id: 'group-456',
},
salesModeId: 'a1538842-0931-4e23-8aaf-5bda59198581',
categoryId: '20c71a6a-c924-42e0-9078-e3f672704dbb',
defaultTaxRate: 10,
// Omit to enable every menu channel for items created by Elephant.
channels: ['application', 'elephant'],
orderType: 'delivery',
defaultPreparationTime: 15,
acceptanceTimeout: 5,
},
],
})Tilby amended-order remote deletion
MappingSyncFailureCode.AMENDED_ORDER_REMOTE_DELETED serializes as
amended_order_remote_deleted. It accompanies manual resolution after confirmed
remote deletion of an order protected by amendment history or a neighbor intent.
The canonical order and payment history are retained. Clients must describe
register review separately from correction completion or confirmed refund.
