@deliverart/sdk-js-email-notification-configuration

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

Deliverart JavaScript SDK for Email Notification Configuration

原始使用文档
文档目录15 节
  1. Installation
  2. Exported Types
  3. Core Types
  4. Template Keys
  5. Order Sources
  6. IRI Types
  7. Configuration Structure
  8. Config Object
  9. Available Requests
  10. CreateEmailNotificationConfiguration
  11. GetEmailNotificationConfigurations
  12. GetEmailNotificationConfigurationDetails
  13. UpdateEmailNotificationConfiguration
  14. DeleteEmailNotificationConfiguration
  15. License

@deliverart/sdk-js-email-notification-configuration

Email notification configuration management package for the DeliverArt JavaScript SDK.

Installation

npm install @deliverart/sdk-js-email-notification-configuration @deliverart/sdk-js-core

Exported Types

Core Types

  • EmailNotificationConfiguration - Email notification configuration with all details
  • EmailNotificationConfigurationListItem - Email notification configuration list item
  • EmailNotificationConfigurationConfig - Configuration object containing notification settings
  • WritableEmailNotificationConfiguration - Writable email notification configuration
  • WritableCreateEmailNotificationConfiguration - Writable create email notification configuration

Template Keys

Available email template keys:

  • delivery_started - Notification when delivery starts
  • delivery_taken_over - Notification when delivery is taken over
  • order_created - Notification when order is created
  • order_amended - Material amendment notification to the original ecommerce buyer or reviewed Hub contact; source filters apply
  • order_delivered - Notification when order is delivered
  • order_in_preparation - Notification when order enters preparation
  • order_preparation_done - Notification when order preparation is complete
  • subscription_expiring - Reminder when a time-based subscription is close to expiration
  • subscription_low_credits - Reminder when a consumption subscription is low on credits
  • subscription_pending_renewal - Reminder when a subscription has a pending renewal
  • subscription_payment_pending_verification - Notification for subscription payments that require central admin verification

Order Sources

Configuration supports the following order sources:

  • application - Orders from mobile/web application
  • ecommerce - Orders from ecommerce platform
  • partner - Orders from partner integrations

IRI Types

  • EmailNotificationConfigurationIri - Email notification configuration IRI (/email_notification_configurations/:id)

Configuration Structure

Each email notification configuration contains a config object with template-specific settings. The structure depends on the template key.

Config Object

Order and delivery templates use:

{
  sourcesEnabled: string[]
}

Subscription reminder templates use:

{}

The same empty config is also used by subscription billing verification notifications.

Fields:

  • sourcesEnabled?: string[] - Array of order sources for which the notification should be sent on order and delivery templates

Available Requests

CreateEmailNotificationConfiguration

import { CreateEmailNotificationConfiguration } from '@deliverart/sdk-js-email-notification-configuration';

const config = await sdk.call(new CreateEmailNotificationConfiguration({
  pointOfSale: '/point_of_sales/123',
  templateKey: 'order_preparation_done',
  isActive: true,
  config: {
    sourcesEnabled: ['application']
  }
}));

Subscription reminder example:

const config = await sdk.call(new CreateEmailNotificationConfiguration({
  pointOfSale: '/point_of_sales/123',
  templateKey: 'subscription_low_credits',
  isActive: true,
  config: {}
}));

Subscription billing verification example:

const config = await sdk.call(new CreateEmailNotificationConfiguration({
  pointOfSale: '/point_of_sales/123',
  templateKey: 'subscription_payment_pending_verification',
  isActive: true,
  config: {}
}));

Input Parameters:

  • pointOfSale: string (required) - Point of sale IRI
  • templateKey: string (required) - Email template key
  • isActive: boolean (required) - Enable/disable notification
  • config: object (required) - Configuration object with sourcesEnabled

GetEmailNotificationConfigurations

import { GetEmailNotificationConfigurations } from '@deliverart/sdk-js-email-notification-configuration';

const configs = await sdk.call(new GetEmailNotificationConfigurations({
  query: {
    templateKey: 'order_created',
    page: 1
  }
}));

Query Parameters:

  • id?: string | string[] - Filter by configuration ID
  • templateKey?: string | string[] - Filter by template key
  • order[createdAt]?: string - Sort by creation date
  • order[updatedAt]?: string - Sort by update date
  • page?: number - Page number
  • createdAtFrom?: string - Filter by creation date (from)
  • createdAtTo?: string - Filter by creation date (to)
  • updatedAtFrom?: string - Filter by update date (from)
  • updatedAtTo?: string - Filter by update date (to)

GetEmailNotificationConfigurationDetails

import { GetEmailNotificationConfigurationDetails } from '@deliverart/sdk-js-email-notification-configuration';

const config = await sdk.call(new GetEmailNotificationConfigurationDetails('config-123'));

UpdateEmailNotificationConfiguration

import { UpdateEmailNotificationConfiguration } from '@deliverart/sdk-js-email-notification-configuration';

const updated = await sdk.call(new UpdateEmailNotificationConfiguration('config-123', {
  templateKey: 'order_preparation_done',
  isActive: false,
  config: {
    sourcesEnabled: ['application', 'ecommerce']
  }
}));

Input Parameters:

  • templateKey: string (required) - Email template key
  • isActive: boolean (required) - Enable/disable notification
  • config: object (required) - Configuration object
    • order/delivery templates: sourcesEnabled: string[]
    • subscription reminder templates: empty object {}

DeleteEmailNotificationConfiguration

import { DeleteEmailNotificationConfiguration } from '@deliverart/sdk-js-email-notification-configuration';

await sdk.call(new DeleteEmailNotificationConfiguration('config-123'));

License

This package is part of the DeliverArt JavaScript SDK.

版本与发布记录

@deliverart/sdk-js-email-notification-configuration 共发布 152 个版本,首次发布于 2026/01/08;过去 12 个月发布了 152 个版本。

版本发布日期距今
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-email-notification-configuration 的常见问题

@deliverart/sdk-js-email-notification-configuration 是什么?

Deliverart JavaScript SDK for Email Notification Configuration

如何安装 @deliverart/sdk-js-email-notification-configuration?

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

@deliverart/sdk-js-email-notification-configuration 支持 TypeScript 吗?

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

@deliverart/sdk-js-email-notification-configuration 支持 ESM 还是 CommonJS?

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

@deliverart/sdk-js-email-notification-configuration 可以商用吗?

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

@deliverart/sdk-js-email-notification-configuration 的下载量有多少?

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

@deliverart/sdk-js-email-notification-configuration 还在维护吗?

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