@wix/notifications 1.0.29 → 1.0.31

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.
@@ -1 +1,2 @@
1
1
  export * as notifications from '@wix/notifications_notifications/context';
2
+ export * as notificationsV3 from '@wix/notifications_notifications-v-3/context';
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.notifications = void 0;
26
+ exports.notificationsV3 = exports.notifications = void 0;
27
27
  exports.notifications = __importStar(require("@wix/notifications_notifications/context"));
28
+ exports.notificationsV3 = __importStar(require("@wix/notifications_notifications-v-3/context"));
28
29
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0FAA0E"}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0FAA0E;AAC1E,gGAAgF"}
@@ -1 +1,3 @@
1
- export * as notifications from '@wix/notifications_notifications';
1
+ import * as notifications from '@wix/notifications_notifications';
2
+ import * as notificationsV3 from '@wix/notifications_notifications-v-3';
3
+ export { notifications, notificationsV3 };
@@ -23,6 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.notifications = void 0;
27
- exports.notifications = __importStar(require("@wix/notifications_notifications"));
26
+ exports.notificationsV3 = exports.notifications = void 0;
27
+ const notifications = __importStar(require("@wix/notifications_notifications"));
28
+ exports.notifications = notifications;
29
+ const notificationsV3 = __importStar(require("@wix/notifications_notifications-v-3"));
30
+ exports.notificationsV3 = notificationsV3;
28
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAAkE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gFAAkE;AAGzD,sCAAa;AAFtB,sFAAwE;AAEhD,0CAAe"}
@@ -1 +1,2 @@
1
1
  export * as notifications from '@wix/notifications_notifications/meta';
2
+ export * as notificationsV3 from '@wix/notifications_notifications-v-3/meta';
package/build/cjs/meta.js CHANGED
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.notifications = void 0;
26
+ exports.notificationsV3 = exports.notifications = void 0;
27
27
  exports.notifications = __importStar(require("@wix/notifications_notifications/meta"));
28
+ exports.notificationsV3 = __importStar(require("@wix/notifications_notifications-v-3/meta"));
28
29
  //# sourceMappingURL=meta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uFAAuE"}
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uFAAuE;AACvE,6FAA6E"}
@@ -1 +1,2 @@
1
1
  export * as notifications from '@wix/notifications_notifications/context';
2
+ export * as notificationsV3 from '@wix/notifications_notifications-v-3/context';
@@ -1,2 +1,3 @@
1
1
  export * as notifications from '@wix/notifications_notifications/context';
2
+ export * as notificationsV3 from '@wix/notifications_notifications-v-3/context';
2
3
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,0CAA0C,CAAC"}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,0CAA0C,CAAC;AAC1E,OAAO,KAAK,eAAe,MAAM,8CAA8C,CAAC"}
@@ -1 +1,3 @@
1
- export * as notifications from '@wix/notifications_notifications';
1
+ import * as notifications from '@wix/notifications_notifications';
2
+ import * as notificationsV3 from '@wix/notifications_notifications-v-3';
3
+ export { notifications, notificationsV3 };
package/build/es/index.js CHANGED
@@ -1,2 +1,4 @@
1
- export * as notifications from '@wix/notifications_notifications';
1
+ import * as notifications from '@wix/notifications_notifications';
2
+ import * as notificationsV3 from '@wix/notifications_notifications-v-3';
3
+ export { notifications, notificationsV3 };
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,eAAe,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC"}
@@ -1 +1,2 @@
1
1
  export * as notifications from '@wix/notifications_notifications/meta';
2
+ export * as notificationsV3 from '@wix/notifications_notifications-v-3/meta';
package/build/es/meta.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * as notifications from '@wix/notifications_notifications/meta';
2
+ export * as notificationsV3 from '@wix/notifications_notifications-v-3/meta';
2
3
  //# sourceMappingURL=meta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,uCAAuC,CAAC"}
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,uCAAuC,CAAC;AACvE,OAAO,KAAK,eAAe,MAAM,2CAA2C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/notifications",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,7 +18,8 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/notifications_notifications": "1.0.16"
21
+ "@wix/notifications_notifications": "1.0.18",
22
+ "@wix/notifications_notifications-v-3": "1.0.1"
22
23
  },
23
24
  "devDependencies": {
24
25
  "glob": "^10.4.1",
@@ -43,5 +44,5 @@
43
44
  "fqdn": ""
44
45
  }
45
46
  },
46
- "falconPackageHash": "74f15a82abb9e534193d8ff1923b8536b66242d7448b50132c5f1fdd"
47
+ "falconPackageHash": "a1acd9577b448ce43f2c13b4025948b3d56ae2110c0e6fa34a8eca01"
47
48
  }
@@ -109,7 +109,7 @@ declare enum DashboardPages {
109
109
  }
110
110
  interface Empty {
111
111
  }
112
- interface NotifyOptions extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
112
+ interface NotifyOptions$1 extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
113
113
  /** Send to site contributors. This includes admins, managers, and assistants. */
114
114
  toSiteContributors?: ToSiteContributors;
115
115
  /** Send to contacts. */
@@ -126,32 +126,215 @@ interface NotifyOptions extends PublicNotifyRequestRecipientsFilterOneOf, Public
126
126
  targetDashboardPage?: DashboardPages;
127
127
  }
128
128
 
129
- declare function notify$1(httpClient: HttpClient): (body: string | null, channels: Channel[], options?: NotifyOptions) => Promise<void>;
129
+ declare function notify$3(httpClient: HttpClient): NotifySignature$1;
130
+ interface NotifySignature$1 {
131
+ /**
132
+ * Sends notifications to recipients.
133
+ * @param - Notification body.
134
+ * @param - The channel to which send the notification
135
+ */
136
+ (body: string | null, channels: Channel[], options?: NotifyOptions$1 | undefined): Promise<void>;
137
+ }
138
+
139
+ declare const notify$2: BuildRESTFunction<typeof notify$3> & typeof notify$3;
140
+
141
+ type context$1_Channel = Channel;
142
+ declare const context$1_Channel: typeof Channel;
143
+ type context$1_DashboardPages = DashboardPages;
144
+ declare const context$1_DashboardPages: typeof DashboardPages;
145
+ type context$1_Empty = Empty;
146
+ type context$1_PublicNotifyRequest = PublicNotifyRequest;
147
+ type context$1_PublicNotifyRequestActionTargetOneOf = PublicNotifyRequestActionTargetOneOf;
148
+ type context$1_PublicNotifyRequestRecipientsFilterOneOf = PublicNotifyRequestRecipientsFilterOneOf;
149
+ type context$1_Public_notification = Public_notification;
150
+ type context$1_Role = Role;
151
+ declare const context$1_Role: typeof Role;
152
+ type context$1_ToContacts = ToContacts;
153
+ type context$1_ToSiteContributors = ToSiteContributors;
154
+ type context$1_ToTopicsSubscribers = ToTopicsSubscribers;
155
+ declare namespace context$1 {
156
+ export { context$1_Channel as Channel, context$1_DashboardPages as DashboardPages, type context$1_Empty as Empty, type NotifyOptions$1 as NotifyOptions, type context$1_PublicNotifyRequest as PublicNotifyRequest, type context$1_PublicNotifyRequestActionTargetOneOf as PublicNotifyRequestActionTargetOneOf, type context$1_PublicNotifyRequestRecipientsFilterOneOf as PublicNotifyRequestRecipientsFilterOneOf, type context$1_Public_notification as Public_notification, context$1_Role as Role, type context$1_ToContacts as ToContacts, type context$1_ToSiteContributors as ToSiteContributors, type context$1_ToTopicsSubscribers as ToTopicsSubscribers, notify$2 as notify };
157
+ }
130
158
 
131
- declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
159
+ interface Notification {
160
+ /** The id of the notification */
161
+ _id?: string;
162
+ }
163
+ interface NotifyRequest {
164
+ /**
165
+ * Notification template ID. A notification template specifies the text and recipients for notifications.
166
+ * To obtain a notification template ID, [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center.
167
+ */
168
+ notificationTemplateId: string;
169
+ /**
170
+ * Each key is a placeholder name you specify when [creating a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template).
171
+ * The value is an object containing the text to replace the placeholder in the notifications.
172
+ */
173
+ dynamicValues?: Record<string, DynamicValue>;
174
+ }
175
+ interface DynamicValue extends DynamicValueOfTypeOneOf {
176
+ /** Text to be integrated into the notification. */
177
+ text?: string;
178
+ }
179
+ /** @oneof */
180
+ interface DynamicValueOfTypeOneOf {
181
+ /** Text to be integrated into the notification. */
182
+ text?: string;
183
+ }
184
+ /**
185
+ * Money.
186
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
187
+ */
188
+ interface Money {
189
+ /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. */
190
+ value?: string;
191
+ /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
192
+ currency?: string;
193
+ /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
194
+ formattedValue?: string | null;
195
+ }
196
+ interface MapDynamicValue {
197
+ /** items */
198
+ items?: Record<string, DynamicValue>;
199
+ }
200
+ interface ArrayDynamicValue {
201
+ /** items */
202
+ items?: DynamicValue[];
203
+ }
204
+ interface AttachmentDynamicValue {
205
+ /** file name */
206
+ fileName?: string;
207
+ /** download url */
208
+ downloadUrl?: string;
209
+ }
210
+ interface NotifyResponse {
211
+ /** ID of the batch of notifications triggered by one request. */
212
+ notificationBatchId?: string;
213
+ }
214
+ interface NotifyByAppRequest {
215
+ /** notification_template_id */
216
+ notificationTemplateId?: string;
217
+ /** app_def_id */
218
+ appDefId?: string;
219
+ /** dynamic_values */
220
+ dynamicValues?: Record<string, DynamicValue>;
221
+ /** template tenant */
222
+ templateTenant?: string | null;
223
+ /** overrides */
224
+ overrides?: Overrides;
225
+ /** channels content */
226
+ channelsData?: ChannelsData;
227
+ }
228
+ interface Overrides {
229
+ /** excluded_channels */
230
+ excludedChannels?: TemplateChannel[];
231
+ /** excluded_audiences */
232
+ excludedAudiences?: ExcludedAudiences;
233
+ /** content overrides */
234
+ content?: ChannelsContent;
235
+ }
236
+ declare enum TemplateChannel {
237
+ WEB_FEED = "WEB_FEED",
238
+ MOBILE_FEED = "MOBILE_FEED",
239
+ MOBILE_PUSH = "MOBILE_PUSH",
240
+ BROWSER = "BROWSER",
241
+ SMS = "SMS",
242
+ EMAIL = "EMAIL",
243
+ KAFKA = "KAFKA",
244
+ VOICE = "VOICE"
245
+ }
246
+ interface ExcludedAudiences {
247
+ /** audience_key */
248
+ audienceKey?: string[];
249
+ }
250
+ interface ChannelsContent {
251
+ /** mobile push override */
252
+ mobileContent?: MobileContent;
253
+ }
254
+ interface MobileContent {
255
+ /** title override of mobile push content */
256
+ title?: string;
257
+ /** body override of mobile push content */
258
+ body?: string;
259
+ }
260
+ interface ChannelsData {
261
+ /** email data */
262
+ emailData?: EmailData;
263
+ }
264
+ interface EmailData {
265
+ /** shoutout action config */
266
+ shoutoutActionConfig?: Record<string, any> | null;
267
+ }
268
+ interface NotifyByAppResponse {
269
+ /** notification_batch_id */
270
+ notificationBatchId?: string;
271
+ }
272
+ interface ResolveRequest {
273
+ /** template id */
274
+ notificationTemplateId?: string;
275
+ /** values */
276
+ dynamicValues?: Record<string, DynamicValue>;
277
+ }
278
+ interface ResolveResponse {
279
+ }
280
+ interface NotifyResponseNonNullableFields {
281
+ notificationBatchId: string;
282
+ }
283
+ interface NotifyOptions {
284
+ /**
285
+ * Each key is a placeholder name you specify when [creating a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template).
286
+ * The value is an object containing the text to replace the placeholder in the notifications.
287
+ */
288
+ dynamicValues?: Record<string, DynamicValue>;
289
+ }
290
+
291
+ declare function notify$1(httpClient: HttpClient): NotifySignature;
292
+ interface NotifySignature {
293
+ /**
294
+ * Sends notifications based on the template and dynamic values provided.
295
+ *
296
+ * > This feature is not yet available to all users.
297
+ *
298
+ * An app can call this endpoint up to 100,000 times per month for each site.
299
+ *
300
+ * When you [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center, you are given a notification template ID.
301
+ * Call the Notify endpoint with this ID as `notificationTemplateID` to trigger notifications based on the notification template.
302
+ * If the notification template contains placeholders for dynamic values, provide those values as key-value pairs in the `dynamicValues` array.
303
+ * The values you specify are incorporated seamlessly in the notifications sent out.
304
+ * @param - Notification template ID. A notification template specifies the text and recipients for notifications.
305
+ * To obtain a notification template ID, [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center.
306
+ */
307
+ (notificationTemplateId: string, options?: NotifyOptions | undefined): Promise<NotifyResponse & NotifyResponseNonNullableFields>;
308
+ }
132
309
 
133
- type _publicNotifyType = typeof notify$1;
134
- declare const notify: ReturnType<typeof createRESTModule<_publicNotifyType>>;
310
+ declare const notify: BuildRESTFunction<typeof notify$1> & typeof notify$1;
135
311
 
136
- type context_Channel = Channel;
137
- declare const context_Channel: typeof Channel;
138
- type context_DashboardPages = DashboardPages;
139
- declare const context_DashboardPages: typeof DashboardPages;
140
- type context_Empty = Empty;
312
+ type context_ArrayDynamicValue = ArrayDynamicValue;
313
+ type context_AttachmentDynamicValue = AttachmentDynamicValue;
314
+ type context_ChannelsContent = ChannelsContent;
315
+ type context_ChannelsData = ChannelsData;
316
+ type context_DynamicValue = DynamicValue;
317
+ type context_DynamicValueOfTypeOneOf = DynamicValueOfTypeOneOf;
318
+ type context_EmailData = EmailData;
319
+ type context_ExcludedAudiences = ExcludedAudiences;
320
+ type context_MapDynamicValue = MapDynamicValue;
321
+ type context_MobileContent = MobileContent;
322
+ type context_Money = Money;
323
+ type context_Notification = Notification;
324
+ type context_NotifyByAppRequest = NotifyByAppRequest;
325
+ type context_NotifyByAppResponse = NotifyByAppResponse;
141
326
  type context_NotifyOptions = NotifyOptions;
142
- type context_PublicNotifyRequest = PublicNotifyRequest;
143
- type context_PublicNotifyRequestActionTargetOneOf = PublicNotifyRequestActionTargetOneOf;
144
- type context_PublicNotifyRequestRecipientsFilterOneOf = PublicNotifyRequestRecipientsFilterOneOf;
145
- type context_Public_notification = Public_notification;
146
- type context_Role = Role;
147
- declare const context_Role: typeof Role;
148
- type context_ToContacts = ToContacts;
149
- type context_ToSiteContributors = ToSiteContributors;
150
- type context_ToTopicsSubscribers = ToTopicsSubscribers;
151
- type context__publicNotifyType = _publicNotifyType;
327
+ type context_NotifyRequest = NotifyRequest;
328
+ type context_NotifyResponse = NotifyResponse;
329
+ type context_NotifyResponseNonNullableFields = NotifyResponseNonNullableFields;
330
+ type context_Overrides = Overrides;
331
+ type context_ResolveRequest = ResolveRequest;
332
+ type context_ResolveResponse = ResolveResponse;
333
+ type context_TemplateChannel = TemplateChannel;
334
+ declare const context_TemplateChannel: typeof TemplateChannel;
152
335
  declare const context_notify: typeof notify;
153
336
  declare namespace context {
154
- export { context_Channel as Channel, context_DashboardPages as DashboardPages, type context_Empty as Empty, type context_NotifyOptions as NotifyOptions, type context_PublicNotifyRequest as PublicNotifyRequest, type context_PublicNotifyRequestActionTargetOneOf as PublicNotifyRequestActionTargetOneOf, type context_PublicNotifyRequestRecipientsFilterOneOf as PublicNotifyRequestRecipientsFilterOneOf, type context_Public_notification as Public_notification, context_Role as Role, type context_ToContacts as ToContacts, type context_ToSiteContributors as ToSiteContributors, type context_ToTopicsSubscribers as ToTopicsSubscribers, type context__publicNotifyType as _publicNotifyType, context_notify as notify };
337
+ export { type context_ArrayDynamicValue as ArrayDynamicValue, type context_AttachmentDynamicValue as AttachmentDynamicValue, type context_ChannelsContent as ChannelsContent, type context_ChannelsData as ChannelsData, type context_DynamicValue as DynamicValue, type context_DynamicValueOfTypeOneOf as DynamicValueOfTypeOneOf, type context_EmailData as EmailData, type context_ExcludedAudiences as ExcludedAudiences, type context_MapDynamicValue as MapDynamicValue, type context_MobileContent as MobileContent, type context_Money as Money, type context_Notification as Notification, type context_NotifyByAppRequest as NotifyByAppRequest, type context_NotifyByAppResponse as NotifyByAppResponse, type context_NotifyOptions as NotifyOptions, type context_NotifyRequest as NotifyRequest, type context_NotifyResponse as NotifyResponse, type context_NotifyResponseNonNullableFields as NotifyResponseNonNullableFields, type context_Overrides as Overrides, type context_ResolveRequest as ResolveRequest, type context_ResolveResponse as ResolveResponse, context_TemplateChannel as TemplateChannel, context_notify as notify };
155
338
  }
156
339
 
157
- export { context as notifications };
340
+ export { context$1 as notifications, context as notificationsV3 };
@@ -109,7 +109,7 @@ declare enum DashboardPages {
109
109
  }
110
110
  interface Empty {
111
111
  }
112
- interface NotifyOptions extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
112
+ interface NotifyOptions$1 extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
113
113
  /** Send to site contributors. This includes admins, managers, and assistants. */
114
114
  toSiteContributors?: ToSiteContributors;
115
115
  /** Send to contacts. */
@@ -126,32 +126,215 @@ interface NotifyOptions extends PublicNotifyRequestRecipientsFilterOneOf, Public
126
126
  targetDashboardPage?: DashboardPages;
127
127
  }
128
128
 
129
- declare function notify$1(httpClient: HttpClient): (body: string | null, channels: Channel[], options?: NotifyOptions) => Promise<void>;
129
+ declare function notify$3(httpClient: HttpClient): NotifySignature$1;
130
+ interface NotifySignature$1 {
131
+ /**
132
+ * Sends notifications to recipients.
133
+ * @param - Notification body.
134
+ * @param - The channel to which send the notification
135
+ */
136
+ (body: string | null, channels: Channel[], options?: NotifyOptions$1 | undefined): Promise<void>;
137
+ }
138
+
139
+ declare const notify$2: BuildRESTFunction<typeof notify$3> & typeof notify$3;
140
+
141
+ type index_d$1_Channel = Channel;
142
+ declare const index_d$1_Channel: typeof Channel;
143
+ type index_d$1_DashboardPages = DashboardPages;
144
+ declare const index_d$1_DashboardPages: typeof DashboardPages;
145
+ type index_d$1_Empty = Empty;
146
+ type index_d$1_PublicNotifyRequest = PublicNotifyRequest;
147
+ type index_d$1_PublicNotifyRequestActionTargetOneOf = PublicNotifyRequestActionTargetOneOf;
148
+ type index_d$1_PublicNotifyRequestRecipientsFilterOneOf = PublicNotifyRequestRecipientsFilterOneOf;
149
+ type index_d$1_Public_notification = Public_notification;
150
+ type index_d$1_Role = Role;
151
+ declare const index_d$1_Role: typeof Role;
152
+ type index_d$1_ToContacts = ToContacts;
153
+ type index_d$1_ToSiteContributors = ToSiteContributors;
154
+ type index_d$1_ToTopicsSubscribers = ToTopicsSubscribers;
155
+ declare namespace index_d$1 {
156
+ export { index_d$1_Channel as Channel, index_d$1_DashboardPages as DashboardPages, type index_d$1_Empty as Empty, type NotifyOptions$1 as NotifyOptions, type index_d$1_PublicNotifyRequest as PublicNotifyRequest, type index_d$1_PublicNotifyRequestActionTargetOneOf as PublicNotifyRequestActionTargetOneOf, type index_d$1_PublicNotifyRequestRecipientsFilterOneOf as PublicNotifyRequestRecipientsFilterOneOf, type index_d$1_Public_notification as Public_notification, index_d$1_Role as Role, type index_d$1_ToContacts as ToContacts, type index_d$1_ToSiteContributors as ToSiteContributors, type index_d$1_ToTopicsSubscribers as ToTopicsSubscribers, notify$2 as notify };
157
+ }
130
158
 
131
- declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
159
+ interface Notification {
160
+ /** The id of the notification */
161
+ _id?: string;
162
+ }
163
+ interface NotifyRequest {
164
+ /**
165
+ * Notification template ID. A notification template specifies the text and recipients for notifications.
166
+ * To obtain a notification template ID, [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center.
167
+ */
168
+ notificationTemplateId: string;
169
+ /**
170
+ * Each key is a placeholder name you specify when [creating a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template).
171
+ * The value is an object containing the text to replace the placeholder in the notifications.
172
+ */
173
+ dynamicValues?: Record<string, DynamicValue>;
174
+ }
175
+ interface DynamicValue extends DynamicValueOfTypeOneOf {
176
+ /** Text to be integrated into the notification. */
177
+ text?: string;
178
+ }
179
+ /** @oneof */
180
+ interface DynamicValueOfTypeOneOf {
181
+ /** Text to be integrated into the notification. */
182
+ text?: string;
183
+ }
184
+ /**
185
+ * Money.
186
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
187
+ */
188
+ interface Money {
189
+ /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. */
190
+ value?: string;
191
+ /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
192
+ currency?: string;
193
+ /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
194
+ formattedValue?: string | null;
195
+ }
196
+ interface MapDynamicValue {
197
+ /** items */
198
+ items?: Record<string, DynamicValue>;
199
+ }
200
+ interface ArrayDynamicValue {
201
+ /** items */
202
+ items?: DynamicValue[];
203
+ }
204
+ interface AttachmentDynamicValue {
205
+ /** file name */
206
+ fileName?: string;
207
+ /** download url */
208
+ downloadUrl?: string;
209
+ }
210
+ interface NotifyResponse {
211
+ /** ID of the batch of notifications triggered by one request. */
212
+ notificationBatchId?: string;
213
+ }
214
+ interface NotifyByAppRequest {
215
+ /** notification_template_id */
216
+ notificationTemplateId?: string;
217
+ /** app_def_id */
218
+ appDefId?: string;
219
+ /** dynamic_values */
220
+ dynamicValues?: Record<string, DynamicValue>;
221
+ /** template tenant */
222
+ templateTenant?: string | null;
223
+ /** overrides */
224
+ overrides?: Overrides;
225
+ /** channels content */
226
+ channelsData?: ChannelsData;
227
+ }
228
+ interface Overrides {
229
+ /** excluded_channels */
230
+ excludedChannels?: TemplateChannel[];
231
+ /** excluded_audiences */
232
+ excludedAudiences?: ExcludedAudiences;
233
+ /** content overrides */
234
+ content?: ChannelsContent;
235
+ }
236
+ declare enum TemplateChannel {
237
+ WEB_FEED = "WEB_FEED",
238
+ MOBILE_FEED = "MOBILE_FEED",
239
+ MOBILE_PUSH = "MOBILE_PUSH",
240
+ BROWSER = "BROWSER",
241
+ SMS = "SMS",
242
+ EMAIL = "EMAIL",
243
+ KAFKA = "KAFKA",
244
+ VOICE = "VOICE"
245
+ }
246
+ interface ExcludedAudiences {
247
+ /** audience_key */
248
+ audienceKey?: string[];
249
+ }
250
+ interface ChannelsContent {
251
+ /** mobile push override */
252
+ mobileContent?: MobileContent;
253
+ }
254
+ interface MobileContent {
255
+ /** title override of mobile push content */
256
+ title?: string;
257
+ /** body override of mobile push content */
258
+ body?: string;
259
+ }
260
+ interface ChannelsData {
261
+ /** email data */
262
+ emailData?: EmailData;
263
+ }
264
+ interface EmailData {
265
+ /** shoutout action config */
266
+ shoutoutActionConfig?: Record<string, any> | null;
267
+ }
268
+ interface NotifyByAppResponse {
269
+ /** notification_batch_id */
270
+ notificationBatchId?: string;
271
+ }
272
+ interface ResolveRequest {
273
+ /** template id */
274
+ notificationTemplateId?: string;
275
+ /** values */
276
+ dynamicValues?: Record<string, DynamicValue>;
277
+ }
278
+ interface ResolveResponse {
279
+ }
280
+ interface NotifyResponseNonNullableFields {
281
+ notificationBatchId: string;
282
+ }
283
+ interface NotifyOptions {
284
+ /**
285
+ * Each key is a placeholder name you specify when [creating a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template).
286
+ * The value is an object containing the text to replace the placeholder in the notifications.
287
+ */
288
+ dynamicValues?: Record<string, DynamicValue>;
289
+ }
290
+
291
+ declare function notify$1(httpClient: HttpClient): NotifySignature;
292
+ interface NotifySignature {
293
+ /**
294
+ * Sends notifications based on the template and dynamic values provided.
295
+ *
296
+ * > This feature is not yet available to all users.
297
+ *
298
+ * An app can call this endpoint up to 100,000 times per month for each site.
299
+ *
300
+ * When you [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center, you are given a notification template ID.
301
+ * Call the Notify endpoint with this ID as `notificationTemplateID` to trigger notifications based on the notification template.
302
+ * If the notification template contains placeholders for dynamic values, provide those values as key-value pairs in the `dynamicValues` array.
303
+ * The values you specify are incorporated seamlessly in the notifications sent out.
304
+ * @param - Notification template ID. A notification template specifies the text and recipients for notifications.
305
+ * To obtain a notification template ID, [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center.
306
+ */
307
+ (notificationTemplateId: string, options?: NotifyOptions | undefined): Promise<NotifyResponse & NotifyResponseNonNullableFields>;
308
+ }
132
309
 
133
- type _publicNotifyType = typeof notify$1;
134
- declare const notify: ReturnType<typeof createRESTModule<_publicNotifyType>>;
310
+ declare const notify: BuildRESTFunction<typeof notify$1> & typeof notify$1;
135
311
 
136
- type index_d_Channel = Channel;
137
- declare const index_d_Channel: typeof Channel;
138
- type index_d_DashboardPages = DashboardPages;
139
- declare const index_d_DashboardPages: typeof DashboardPages;
140
- type index_d_Empty = Empty;
312
+ type index_d_ArrayDynamicValue = ArrayDynamicValue;
313
+ type index_d_AttachmentDynamicValue = AttachmentDynamicValue;
314
+ type index_d_ChannelsContent = ChannelsContent;
315
+ type index_d_ChannelsData = ChannelsData;
316
+ type index_d_DynamicValue = DynamicValue;
317
+ type index_d_DynamicValueOfTypeOneOf = DynamicValueOfTypeOneOf;
318
+ type index_d_EmailData = EmailData;
319
+ type index_d_ExcludedAudiences = ExcludedAudiences;
320
+ type index_d_MapDynamicValue = MapDynamicValue;
321
+ type index_d_MobileContent = MobileContent;
322
+ type index_d_Money = Money;
323
+ type index_d_Notification = Notification;
324
+ type index_d_NotifyByAppRequest = NotifyByAppRequest;
325
+ type index_d_NotifyByAppResponse = NotifyByAppResponse;
141
326
  type index_d_NotifyOptions = NotifyOptions;
142
- type index_d_PublicNotifyRequest = PublicNotifyRequest;
143
- type index_d_PublicNotifyRequestActionTargetOneOf = PublicNotifyRequestActionTargetOneOf;
144
- type index_d_PublicNotifyRequestRecipientsFilterOneOf = PublicNotifyRequestRecipientsFilterOneOf;
145
- type index_d_Public_notification = Public_notification;
146
- type index_d_Role = Role;
147
- declare const index_d_Role: typeof Role;
148
- type index_d_ToContacts = ToContacts;
149
- type index_d_ToSiteContributors = ToSiteContributors;
150
- type index_d_ToTopicsSubscribers = ToTopicsSubscribers;
151
- type index_d__publicNotifyType = _publicNotifyType;
327
+ type index_d_NotifyRequest = NotifyRequest;
328
+ type index_d_NotifyResponse = NotifyResponse;
329
+ type index_d_NotifyResponseNonNullableFields = NotifyResponseNonNullableFields;
330
+ type index_d_Overrides = Overrides;
331
+ type index_d_ResolveRequest = ResolveRequest;
332
+ type index_d_ResolveResponse = ResolveResponse;
333
+ type index_d_TemplateChannel = TemplateChannel;
334
+ declare const index_d_TemplateChannel: typeof TemplateChannel;
152
335
  declare const index_d_notify: typeof notify;
153
336
  declare namespace index_d {
154
- export { index_d_Channel as Channel, index_d_DashboardPages as DashboardPages, type index_d_Empty as Empty, type index_d_NotifyOptions as NotifyOptions, type index_d_PublicNotifyRequest as PublicNotifyRequest, type index_d_PublicNotifyRequestActionTargetOneOf as PublicNotifyRequestActionTargetOneOf, type index_d_PublicNotifyRequestRecipientsFilterOneOf as PublicNotifyRequestRecipientsFilterOneOf, type index_d_Public_notification as Public_notification, index_d_Role as Role, type index_d_ToContacts as ToContacts, type index_d_ToSiteContributors as ToSiteContributors, type index_d_ToTopicsSubscribers as ToTopicsSubscribers, type index_d__publicNotifyType as _publicNotifyType, index_d_notify as notify };
337
+ export { type index_d_ArrayDynamicValue as ArrayDynamicValue, type index_d_AttachmentDynamicValue as AttachmentDynamicValue, type index_d_ChannelsContent as ChannelsContent, type index_d_ChannelsData as ChannelsData, type index_d_DynamicValue as DynamicValue, type index_d_DynamicValueOfTypeOneOf as DynamicValueOfTypeOneOf, type index_d_EmailData as EmailData, type index_d_ExcludedAudiences as ExcludedAudiences, type index_d_MapDynamicValue as MapDynamicValue, type index_d_MobileContent as MobileContent, type index_d_Money as Money, type index_d_Notification as Notification, type index_d_NotifyByAppRequest as NotifyByAppRequest, type index_d_NotifyByAppResponse as NotifyByAppResponse, type index_d_NotifyOptions as NotifyOptions, type index_d_NotifyRequest as NotifyRequest, type index_d_NotifyResponse as NotifyResponse, type index_d_NotifyResponseNonNullableFields as NotifyResponseNonNullableFields, type index_d_Overrides as Overrides, type index_d_ResolveRequest as ResolveRequest, type index_d_ResolveResponse as ResolveResponse, index_d_TemplateChannel as TemplateChannel, index_d_notify as notify };
155
338
  }
156
339
 
157
- export { index_d as notifications };
340
+ export { index_d$1 as notifications, index_d as notificationsV3 };
@@ -146,6 +146,80 @@ declare enum DashboardPages {
146
146
  interface Empty {
147
147
  }
148
148
 
149
+ type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
150
+ getUrl: (context: any) => string;
151
+ httpMethod: K;
152
+ path: string;
153
+ pathParams: M;
154
+ __requestType: T;
155
+ __originalRequestType: S;
156
+ __responseType: Q;
157
+ __originalResponseType: R;
158
+ };
159
+ declare function notify$1(): __PublicMethodMetaInfo$1<'POST', {}, PublicNotifyRequest, PublicNotifyRequest$1, Empty, Empty$1>;
160
+
161
+ declare namespace meta$1 {
162
+ export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, notify$1 as notify };
163
+ }
164
+
165
+ interface NotifyRequest$1 {
166
+ /**
167
+ * Notification template ID. A notification template specifies the text and recipients for notifications.
168
+ * To obtain a notification template ID, [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center.
169
+ */
170
+ notificationTemplateId: string;
171
+ /**
172
+ * Each key is a placeholder name you specify when [creating a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template).
173
+ * The value is an object containing the text to replace the placeholder in the notifications.
174
+ */
175
+ dynamicValues?: Record<string, DynamicValue$1>;
176
+ }
177
+ interface DynamicValue$1 extends DynamicValueOfTypeOneOf$1 {
178
+ /** Text to be integrated into the notification. */
179
+ text?: string;
180
+ }
181
+ /** @oneof */
182
+ interface DynamicValueOfTypeOneOf$1 {
183
+ /** Text to be integrated into the notification. */
184
+ text?: string;
185
+ }
186
+ interface NotifyResponse$1 {
187
+ /** ID of the batch of notifications triggered by one request. */
188
+ notificationBatchId?: string;
189
+ }
190
+ interface NotifyResponseNonNullableFields$1 {
191
+ notificationBatchId: string;
192
+ }
193
+
194
+ interface NotifyRequest {
195
+ /**
196
+ * Notification template ID. A notification template specifies the text and recipients for notifications.
197
+ * To obtain a notification template ID, [create a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template) in the Wix Dev Center.
198
+ */
199
+ notificationTemplateId: string;
200
+ /**
201
+ * Each key is a placeholder name you specify when [creating a notification template](https://dev.wix.com/api/rest/wix-notifications/notifications/creating-a-notification-template).
202
+ * The value is an object containing the text to replace the placeholder in the notifications.
203
+ */
204
+ dynamicValues?: Record<string, DynamicValue>;
205
+ }
206
+ interface DynamicValue extends DynamicValueOfTypeOneOf {
207
+ /** Text to be integrated into the notification. */
208
+ text?: string;
209
+ }
210
+ /** @oneof */
211
+ interface DynamicValueOfTypeOneOf {
212
+ /** Text to be integrated into the notification. */
213
+ text?: string;
214
+ }
215
+ interface NotifyResponse {
216
+ /** ID of the batch of notifications triggered by one request. */
217
+ notificationBatchId?: string;
218
+ }
219
+ interface NotifyResponseNonNullableFields {
220
+ notificationBatchId: string;
221
+ }
222
+
149
223
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
150
224
  getUrl: (context: any) => string;
151
225
  httpMethod: K;
@@ -156,7 +230,7 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
156
230
  __responseType: Q;
157
231
  __originalResponseType: R;
158
232
  };
159
- declare function notify(): __PublicMethodMetaInfo<'POST', {}, PublicNotifyRequest, PublicNotifyRequest$1, Empty, Empty$1>;
233
+ declare function notify(): __PublicMethodMetaInfo<'POST', {}, NotifyRequest, NotifyRequest$1, NotifyResponse & NotifyResponseNonNullableFields, NotifyResponse$1 & NotifyResponseNonNullableFields$1>;
160
234
 
161
235
  type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
162
236
  declare const meta_notify: typeof notify;
@@ -164,4 +238,4 @@ declare namespace meta {
164
238
  export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_notify as notify };
165
239
  }
166
240
 
167
- export { meta as notifications };
241
+ export { meta$1 as notifications, meta as notificationsV3 };