@deliverart/sdk-js-integration-types

中文文档
3.0.1发布于 2026/11/11TypeScriptESM + CJS近 30 天下载 3869

Deliverart JavaScript SDK shared integration types and schemas

原始使用文档
文档目录4 节
  1. Tilby Product Channels
  2. CassaInCloud Contracts
  3. Elephant Contracts
  4. Tilby amended-order remote deletion

@deliverart/sdk-js-integration-types

Ecommerce activation data accepts the optional boolean showProductImages. Omitting it keeps the API default enabled; explicit false hides product photos in editorial and grid layouts. Compact menus remain text-only.

Shared integration type and Zod schema package for the DeliverArt JavaScript SDK.

Tilby Product Channels

integrationTilbySyncSettingsSchema defaults respectDeliverartChannel to true and removeProductsWithoutDeliverartChannel to false. Filtering suspends unassigned products unless local removal is enabled; removal requires a concrete Tilby mapping and preserves unmapped manual products. With filtering disabled, the removal flag is ignored. Sale availability remains independent. The editable schema preserves omitted channel settings in merge patches.

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.

providerCredentialSchema(requiredMessage) applies the native CassaInCloud/Tilby 32,768 UTF-8 byte bound while retaining input cleanup and required-field messages. Use this shared schema for activation and ordinary native credential writes. pnpm --filter @deliverart/sdk-js-integration-types test:provider-credentials:coverage checks the helper at 100% statements, branches, functions and lines. The workspace lockfile includes the coverage provider for reproducible frozen installs.

Tilby mapping failures include conflicting_component_prices: one canonical shared ingredient has different raw optional prices across products. Consumers must show a menu-price review explanation rather than retrying orders or choosing one price. The native catalog worker can recheck this price-only refusal after correction; identity failures remain separate. Release compatible SDK consumers before enabling the API's mapped ingredient writer.

catalog_write_outcome_unknown means a native catalog send has an unfinished durable guard. A nested group/value creation may already have happened; consumers must show verification guidance without offering a blind retry or clearing the guard through a generic mapping edit. The internal guard metadata is not an API field. Publish compatible consumers before enabling this writer.

版本与发布记录

@deliverart/sdk-js-integration-types 共发布 88 个版本,首次发布于 2026/05/27;过去 12 个月发布了 88 个版本。

版本发布日期距今
3.0.1latest2026/11/111 天前
3.0.02026/11/092 天前
3.0.0-dev.1dev2026/11/092 天前
2.48.12026/10/2518 天前
2.48.02026/10/2319 天前
2.47.02026/10/2319 天前

关于 @deliverart/sdk-js-integration-types 的常见问题

@deliverart/sdk-js-integration-types 是什么?

Deliverart JavaScript SDK shared integration types and schemas

如何安装 @deliverart/sdk-js-integration-types?

在项目目录运行 npm install @deliverart/sdk-js-integration-types,或使用 pnpm add / yarn add / bun add。

@deliverart/sdk-js-integration-types 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@deliverart/sdk-js-integration-types 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@deliverart/sdk-js-integration-types 可以商用吗?

@deliverart/sdk-js-integration-types 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@deliverart/sdk-js-integration-types 的下载量有多少?

根据 npm 官方下载统计,@deliverart/sdk-js-integration-types 在 2026/10/12 – 2026/11/10 这 30 天内被下载 3,869 次,日均约 129 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@deliverart/sdk-js-integration-types 还在维护吗?

最新版本 3.0.1 发布于 2026/11/11(1 天前);至今共发布 88 个版本,其中过去 12 个月发布了 88 个;首次发布于 2026/05/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。