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

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 ADDED
@@ -0,0 +1,117 @@
1
+ # @deliverart/sdk-js-email-notification-configuration
2
+
3
+ Email notification configuration management package for the DeliverArt JavaScript SDK.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @deliverart/sdk-js-email-notification-configuration @deliverart/sdk-js-core
9
+ ```
10
+
11
+ ## Exported Types
12
+
13
+ ### Core Types
14
+ - `EmailNotificationConfiguration` - Email notification configuration
15
+ - `EmailNotificationConfigConfig` - Configuration object containing notification settings
16
+
17
+ ### Template Keys
18
+ Available email template keys:
19
+ - `delivery_started` - Notification when delivery starts
20
+ - `delivery_taken_over` - Notification when delivery is taken over
21
+ - `order_created` - Notification when order is created
22
+ - `order_delivered` - Notification when order is delivered
23
+ - `order_in_preparation` - Notification when order enters preparation
24
+ - `order_preparation_done` - Notification when order preparation is complete
25
+
26
+ ### IRI Types
27
+ - `EmailNotificationConfigurationIri` - Email notification configuration IRI (`/email_notification_configurations/:id`)
28
+
29
+ ## Configuration
30
+
31
+ Each email notification configuration contains a `config` object with template-specific settings:
32
+
33
+ ```typescript
34
+ {
35
+ sourcesEnabled: string[] // Array of enabled order sources: 'application', 'ecommerce', 'partner'
36
+ }
37
+ ```
38
+
39
+ ## Available Requests
40
+
41
+ ### CreateEmailNotificationConfiguration
42
+ ```typescript
43
+ import { CreateEmailNotificationConfiguration } from '@deliverart/sdk-js-email-notification-configuration';
44
+
45
+ const config = await sdk.call(new CreateEmailNotificationConfiguration({
46
+ pointOfSale: '/point_of_sales/123',
47
+ templateKey: 'order_created',
48
+ isActive: true,
49
+ config: {
50
+ sourcesEnabled: ['application', 'ecommerce']
51
+ }
52
+ }));
53
+ ```
54
+
55
+ **Input Parameters:**
56
+ - `pointOfSale: string` (required) - Point of sale IRI
57
+ - `templateKey: string` (required) - Email template key
58
+ - `isActive: boolean` (required) - Enable/disable this notification
59
+ - `config: object` (required) - Configuration settings
60
+ - `sourcesEnabled: string[]` (required) - Array of enabled order sources
61
+
62
+ ---
63
+
64
+ ### GetEmailNotificationConfigurations
65
+ ```typescript
66
+ import { GetEmailNotificationConfigurations } from '@deliverart/sdk-js-email-notification-configuration';
67
+
68
+ const configs = await sdk.call(new GetEmailNotificationConfigurations({
69
+ query: {
70
+ pointOfSale: '/point_of_sales/123',
71
+ page: 1
72
+ }
73
+ }));
74
+ ```
75
+
76
+ **Query Parameters:**
77
+ - `pointOfSale?: string` - Filter by point of sale
78
+ - `templateKey?: string` - Filter by template key
79
+ - `page?: number` - Page number
80
+
81
+ ---
82
+
83
+ ### GetEmailNotificationConfigurationDetails
84
+ ```typescript
85
+ import { GetEmailNotificationConfigurationDetails } from '@deliverart/sdk-js-email-notification-configuration';
86
+
87
+ const config = await sdk.call(new GetEmailNotificationConfigurationDetails('config-123'));
88
+ ```
89
+
90
+ ---
91
+
92
+ ### UpdateEmailNotificationConfiguration
93
+ ```typescript
94
+ import { UpdateEmailNotificationConfiguration } from '@deliverart/sdk-js-email-notification-configuration';
95
+
96
+ const updated = await sdk.call(new UpdateEmailNotificationConfiguration('config-123', {
97
+ isActive: false,
98
+ config: {
99
+ sourcesEnabled: ['partner']
100
+ }
101
+ }));
102
+ ```
103
+
104
+ ---
105
+
106
+ ### DeleteEmailNotificationConfiguration
107
+ ```typescript
108
+ import { DeleteEmailNotificationConfiguration } from '@deliverart/sdk-js-email-notification-configuration';
109
+
110
+ await sdk.call(new DeleteEmailNotificationConfiguration('config-123'));
111
+ ```
112
+
113
+ ---
114
+
115
+ ## License
116
+
117
+ This package is part of the DeliverArt JavaScript SDK.