@wix/notifications 1.0.28 → 1.0.30

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"}
@@ -2,5 +2,6 @@
2
2
  "sideEffects": false,
3
3
  "module": "../build/es/context.js",
4
4
  "main": "../build/cjs/context.js",
5
- "typings": "../build/cjs/context.d.ts"
5
+ "typings": "../build/cjs/context.d.ts",
6
+ "typesBundle": "../type-bundles/context.bundle.d.ts"
6
7
  }
package/meta/package.json CHANGED
@@ -2,5 +2,6 @@
2
2
  "sideEffects": false,
3
3
  "module": "../build/es/meta.js",
4
4
  "main": "../build/cjs/meta.js",
5
- "typings": "../build/cjs/meta.d.ts"
5
+ "typings": "../build/cjs/meta.d.ts",
6
+ "typesBundle": "../type-bundles/meta.bundle.d.ts"
6
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/notifications",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -9,21 +9,28 @@
9
9
  "module": "build/es/index.js",
10
10
  "main": "build/cjs/index.js",
11
11
  "typings": "./build/cjs/index.d.ts",
12
+ "typesBundle": "./type-bundles/index.bundle.d.ts",
12
13
  "files": [
13
14
  "build",
14
15
  "frontend/package.json",
15
16
  "meta",
16
- "context"
17
+ "context",
18
+ "type-bundles"
17
19
  ],
18
20
  "dependencies": {
19
- "@wix/notifications_notifications": "1.0.15"
21
+ "@wix/notifications_notifications": "1.0.17",
22
+ "@wix/notifications_notifications-v-3": "1.0.0"
20
23
  },
21
24
  "devDependencies": {
22
- "@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
25
+ "glob": "^10.4.1",
26
+ "rollup": "^4.18.0",
27
+ "rollup-plugin-dts": "^6.1.1",
23
28
  "typescript": "^5.3.2"
24
29
  },
25
30
  "scripts": {
26
- "build": "tsc -b tsconfig.json tsconfig.esm.json",
31
+ "build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles && npm run build:validate-dts",
32
+ "build:dts-bundles": "test -f config/rollup-config.js && NODE_OPTIONS=--max-old-space-size=8192 rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
33
+ "build:validate-dts": "tsc type-bundles/*.d.ts --noEmit",
27
34
  "test": ":"
28
35
  },
29
36
  "wix": {
@@ -37,5 +44,5 @@
37
44
  "fqdn": ""
38
45
  }
39
46
  },
40
- "falconPackageHash": "d848d3020647d67681eadcd8c711cc2a4f3831ff60f2181ded9745b8"
47
+ "falconPackageHash": "e98c4f383d4906128930faa463a868a1f1f7181718da521b90dfc1bb"
41
48
  }
@@ -0,0 +1,347 @@
1
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
+ interface HttpClient {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
4
+ fetchWithAuth: typeof fetch;
5
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
+ }
7
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
+ type HttpResponse<T = any> = {
9
+ data: T;
10
+ status: number;
11
+ statusText: string;
12
+ headers: any;
13
+ request?: any;
14
+ };
15
+ type RequestOptions<_TResponse = any, Data = any> = {
16
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
+ url: string;
18
+ data?: Data;
19
+ params?: URLSearchParams;
20
+ } & APIMetadata;
21
+ type APIMetadata = {
22
+ methodFqn?: string;
23
+ entityFqdn?: string;
24
+ packageName?: string;
25
+ };
26
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
+
28
+ declare global {
29
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
30
+ interface SymbolConstructor {
31
+ readonly observable: symbol;
32
+ }
33
+ }
34
+
35
+ interface Public_notification {
36
+ /** id */
37
+ _id?: string | null;
38
+ }
39
+ interface PublicNotifyRequest extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
40
+ /** Send to site contributors. This includes admins, managers, and assistants. */
41
+ toSiteContributors?: ToSiteContributors;
42
+ /** Send to contacts. */
43
+ toContacts?: ToContacts;
44
+ /** Send to site members who subscrined to a particular topic. */
45
+ toTopicsSubscribers?: ToTopicsSubscribers;
46
+ /** an open url as an action target */
47
+ targetUrl?: string | null;
48
+ /** target_dashboard_page */
49
+ targetDashboardPage?: DashboardPages;
50
+ /** Notification title. */
51
+ title?: string | null;
52
+ /** Notification body. */
53
+ body?: string | null;
54
+ /** The Action of the notification */
55
+ action?: string | null;
56
+ /** The channel to which send the notification */
57
+ channels?: Channel[];
58
+ }
59
+ /** @oneof */
60
+ interface PublicNotifyRequestRecipientsFilterOneOf {
61
+ /** Send to site contributors. This includes admins, managers, and assistants. */
62
+ toSiteContributors?: ToSiteContributors;
63
+ /** Send to contacts. */
64
+ toContacts?: ToContacts;
65
+ /** Send to site members who subscrined to a particular topic. */
66
+ toTopicsSubscribers?: ToTopicsSubscribers;
67
+ }
68
+ /** @oneof */
69
+ interface PublicNotifyRequestActionTargetOneOf {
70
+ /** an open url as an action target */
71
+ targetUrl?: string | null;
72
+ /** target_dashboard_page */
73
+ targetDashboardPage?: DashboardPages;
74
+ }
75
+ interface ToSiteContributors {
76
+ /** with_role */
77
+ withRole?: Role;
78
+ }
79
+ declare enum Role {
80
+ /** All contributors with any role */
81
+ All_Contributors = "All_Contributors",
82
+ /** Only the owner */
83
+ Owner = "Owner"
84
+ }
85
+ interface ToContacts {
86
+ /** contact_ids */
87
+ contactIds?: string[];
88
+ }
89
+ interface ToTopicsSubscribers {
90
+ /** topics */
91
+ topics?: string[];
92
+ /** excluded_contact_ids */
93
+ excludedContactIds?: string[];
94
+ }
95
+ declare enum Channel {
96
+ /** No Default Channel - need to expilicitly decide on channel */
97
+ Undefined = "Undefined",
98
+ /** The widget inside Wix */
99
+ Dashboard = "Dashboard",
100
+ /** Mobile push to WixApp */
101
+ Mobile = "Mobile",
102
+ /** Browser push to the active browser (Chrome/Safari only) */
103
+ Browser = "Browser"
104
+ }
105
+ declare enum DashboardPages {
106
+ Undefined_Page = "Undefined_Page",
107
+ /** goes to business manager home */
108
+ Home = "Home"
109
+ }
110
+ interface Empty {
111
+ }
112
+ interface NotifyOptions$1 extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
113
+ /** Send to site contributors. This includes admins, managers, and assistants. */
114
+ toSiteContributors?: ToSiteContributors;
115
+ /** Send to contacts. */
116
+ toContacts?: ToContacts;
117
+ /** Send to site members who subscrined to a particular topic. */
118
+ toTopicsSubscribers?: ToTopicsSubscribers;
119
+ /** Notification title. */
120
+ title?: string | null;
121
+ /** The Action of the notification */
122
+ action?: string | null;
123
+ /** an open url as an action target */
124
+ targetUrl?: string | null;
125
+ /** target_dashboard_page */
126
+ targetDashboardPage?: DashboardPages;
127
+ }
128
+
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 function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
140
+
141
+ type _publicNotifyType$1 = typeof notify$3;
142
+ declare const notify$2: ReturnType<typeof createRESTModule$1<_publicNotifyType>>;
143
+
144
+ type context$1_Channel = Channel;
145
+ declare const context$1_Channel: typeof Channel;
146
+ type context$1_DashboardPages = DashboardPages;
147
+ declare const context$1_DashboardPages: typeof DashboardPages;
148
+ type context$1_Empty = Empty;
149
+ type context$1_PublicNotifyRequest = PublicNotifyRequest;
150
+ type context$1_PublicNotifyRequestActionTargetOneOf = PublicNotifyRequestActionTargetOneOf;
151
+ type context$1_PublicNotifyRequestRecipientsFilterOneOf = PublicNotifyRequestRecipientsFilterOneOf;
152
+ type context$1_Public_notification = Public_notification;
153
+ type context$1_Role = Role;
154
+ declare const context$1_Role: typeof Role;
155
+ type context$1_ToContacts = ToContacts;
156
+ type context$1_ToSiteContributors = ToSiteContributors;
157
+ type context$1_ToTopicsSubscribers = ToTopicsSubscribers;
158
+ declare namespace context$1 {
159
+ 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, type _publicNotifyType$1 as _publicNotifyType, notify$2 as notify };
160
+ }
161
+
162
+ interface Notification {
163
+ /** The id of the notification */
164
+ _id?: string;
165
+ }
166
+ interface NotifyRequest {
167
+ /**
168
+ * Notification template ID. A notification template specifies the text and recipients for notifications.
169
+ * 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.
170
+ */
171
+ notificationTemplateId: string;
172
+ /**
173
+ * 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).
174
+ * The value is an object containing the text to replace the placeholder in the notifications.
175
+ */
176
+ dynamicValues?: Record<string, DynamicValue>;
177
+ }
178
+ interface DynamicValue extends DynamicValueOfTypeOneOf {
179
+ /** Text to be integrated into the notification. */
180
+ text?: string;
181
+ }
182
+ /** @oneof */
183
+ interface DynamicValueOfTypeOneOf {
184
+ /** Text to be integrated into the notification. */
185
+ text?: string;
186
+ }
187
+ /**
188
+ * Money.
189
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
190
+ */
191
+ interface Money {
192
+ /** 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. */
193
+ value?: string;
194
+ /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
195
+ currency?: string;
196
+ /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
197
+ formattedValue?: string | null;
198
+ }
199
+ interface MapDynamicValue {
200
+ /** items */
201
+ items?: Record<string, DynamicValue>;
202
+ }
203
+ interface ArrayDynamicValue {
204
+ /** items */
205
+ items?: DynamicValue[];
206
+ }
207
+ interface AttachmentDynamicValue {
208
+ /** file name */
209
+ fileName?: string;
210
+ /** download url */
211
+ downloadUrl?: string;
212
+ }
213
+ interface NotifyResponse {
214
+ /** ID of the batch of notifications triggered by one request. */
215
+ notificationBatchId?: string;
216
+ }
217
+ interface NotifyByAppRequest {
218
+ /** notification_template_id */
219
+ notificationTemplateId?: string;
220
+ /** app_def_id */
221
+ appDefId?: string;
222
+ /** dynamic_values */
223
+ dynamicValues?: Record<string, DynamicValue>;
224
+ /** template tenant */
225
+ templateTenant?: string | null;
226
+ /** overrides */
227
+ overrides?: Overrides;
228
+ /** channels content */
229
+ channelsData?: ChannelsData;
230
+ }
231
+ interface Overrides {
232
+ /** excluded_channels */
233
+ excludedChannels?: TemplateChannel[];
234
+ /** excluded_audiences */
235
+ excludedAudiences?: ExcludedAudiences;
236
+ /** content overrides */
237
+ content?: ChannelsContent;
238
+ }
239
+ declare enum TemplateChannel {
240
+ WEB_FEED = "WEB_FEED",
241
+ MOBILE_FEED = "MOBILE_FEED",
242
+ MOBILE_PUSH = "MOBILE_PUSH",
243
+ BROWSER = "BROWSER",
244
+ SMS = "SMS",
245
+ EMAIL = "EMAIL",
246
+ KAFKA = "KAFKA",
247
+ VOICE = "VOICE"
248
+ }
249
+ interface ExcludedAudiences {
250
+ /** audience_key */
251
+ audienceKey?: string[];
252
+ }
253
+ interface ChannelsContent {
254
+ /** mobile push override */
255
+ mobileContent?: MobileContent;
256
+ }
257
+ interface MobileContent {
258
+ /** title override of mobile push content */
259
+ title?: string;
260
+ /** body override of mobile push content */
261
+ body?: string;
262
+ }
263
+ interface ChannelsData {
264
+ /** email data */
265
+ emailData?: EmailData;
266
+ }
267
+ interface EmailData {
268
+ /** shoutout action config */
269
+ shoutoutActionConfig?: Record<string, any> | null;
270
+ }
271
+ interface NotifyByAppResponse {
272
+ /** notification_batch_id */
273
+ notificationBatchId?: string;
274
+ }
275
+ interface ResolveRequest {
276
+ /** template id */
277
+ notificationTemplateId?: string;
278
+ /** values */
279
+ dynamicValues?: Record<string, DynamicValue>;
280
+ }
281
+ interface ResolveResponse {
282
+ }
283
+ interface NotifyResponseNonNullableFields {
284
+ notificationBatchId: string;
285
+ }
286
+ interface NotifyOptions {
287
+ /**
288
+ * 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).
289
+ * The value is an object containing the text to replace the placeholder in the notifications.
290
+ */
291
+ dynamicValues?: Record<string, DynamicValue>;
292
+ }
293
+
294
+ declare function notify$1(httpClient: HttpClient): NotifySignature;
295
+ interface NotifySignature {
296
+ /**
297
+ * Sends notifications based on the template and dynamic values provided.
298
+ *
299
+ * > This feature is not yet available to all users.
300
+ *
301
+ * An app can call this endpoint up to 100,000 times per month for each site.
302
+ *
303
+ * 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.
304
+ * Call the Notify endpoint with this ID as `notificationTemplateID` to trigger notifications based on the notification template.
305
+ * If the notification template contains placeholders for dynamic values, provide those values as key-value pairs in the `dynamicValues` array.
306
+ * The values you specify are incorporated seamlessly in the notifications sent out.
307
+ * @param - Notification template ID. A notification template specifies the text and recipients for notifications.
308
+ * 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.
309
+ */
310
+ (notificationTemplateId: string, options?: NotifyOptions | undefined): Promise<NotifyResponse & NotifyResponseNonNullableFields>;
311
+ }
312
+
313
+ declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
314
+
315
+ type _publicNotifyType = typeof notify$1;
316
+ declare const notify: ReturnType<typeof createRESTModule<_publicNotifyType>>;
317
+
318
+ type context_ArrayDynamicValue = ArrayDynamicValue;
319
+ type context_AttachmentDynamicValue = AttachmentDynamicValue;
320
+ type context_ChannelsContent = ChannelsContent;
321
+ type context_ChannelsData = ChannelsData;
322
+ type context_DynamicValue = DynamicValue;
323
+ type context_DynamicValueOfTypeOneOf = DynamicValueOfTypeOneOf;
324
+ type context_EmailData = EmailData;
325
+ type context_ExcludedAudiences = ExcludedAudiences;
326
+ type context_MapDynamicValue = MapDynamicValue;
327
+ type context_MobileContent = MobileContent;
328
+ type context_Money = Money;
329
+ type context_Notification = Notification;
330
+ type context_NotifyByAppRequest = NotifyByAppRequest;
331
+ type context_NotifyByAppResponse = NotifyByAppResponse;
332
+ type context_NotifyOptions = NotifyOptions;
333
+ type context_NotifyRequest = NotifyRequest;
334
+ type context_NotifyResponse = NotifyResponse;
335
+ type context_NotifyResponseNonNullableFields = NotifyResponseNonNullableFields;
336
+ type context_Overrides = Overrides;
337
+ type context_ResolveRequest = ResolveRequest;
338
+ type context_ResolveResponse = ResolveResponse;
339
+ type context_TemplateChannel = TemplateChannel;
340
+ declare const context_TemplateChannel: typeof TemplateChannel;
341
+ type context__publicNotifyType = _publicNotifyType;
342
+ declare const context_notify: typeof notify;
343
+ declare namespace context {
344
+ 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, type context__publicNotifyType as _publicNotifyType, context_notify as notify };
345
+ }
346
+
347
+ export { context$1 as notifications, context as notificationsV3 };
@@ -0,0 +1,347 @@
1
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
+ interface HttpClient {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
4
+ fetchWithAuth: typeof fetch;
5
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
+ }
7
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
+ type HttpResponse<T = any> = {
9
+ data: T;
10
+ status: number;
11
+ statusText: string;
12
+ headers: any;
13
+ request?: any;
14
+ };
15
+ type RequestOptions<_TResponse = any, Data = any> = {
16
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
+ url: string;
18
+ data?: Data;
19
+ params?: URLSearchParams;
20
+ } & APIMetadata;
21
+ type APIMetadata = {
22
+ methodFqn?: string;
23
+ entityFqdn?: string;
24
+ packageName?: string;
25
+ };
26
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
+
28
+ declare global {
29
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
30
+ interface SymbolConstructor {
31
+ readonly observable: symbol;
32
+ }
33
+ }
34
+
35
+ interface Public_notification {
36
+ /** id */
37
+ _id?: string | null;
38
+ }
39
+ interface PublicNotifyRequest extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
40
+ /** Send to site contributors. This includes admins, managers, and assistants. */
41
+ toSiteContributors?: ToSiteContributors;
42
+ /** Send to contacts. */
43
+ toContacts?: ToContacts;
44
+ /** Send to site members who subscrined to a particular topic. */
45
+ toTopicsSubscribers?: ToTopicsSubscribers;
46
+ /** an open url as an action target */
47
+ targetUrl?: string | null;
48
+ /** target_dashboard_page */
49
+ targetDashboardPage?: DashboardPages;
50
+ /** Notification title. */
51
+ title?: string | null;
52
+ /** Notification body. */
53
+ body?: string | null;
54
+ /** The Action of the notification */
55
+ action?: string | null;
56
+ /** The channel to which send the notification */
57
+ channels?: Channel[];
58
+ }
59
+ /** @oneof */
60
+ interface PublicNotifyRequestRecipientsFilterOneOf {
61
+ /** Send to site contributors. This includes admins, managers, and assistants. */
62
+ toSiteContributors?: ToSiteContributors;
63
+ /** Send to contacts. */
64
+ toContacts?: ToContacts;
65
+ /** Send to site members who subscrined to a particular topic. */
66
+ toTopicsSubscribers?: ToTopicsSubscribers;
67
+ }
68
+ /** @oneof */
69
+ interface PublicNotifyRequestActionTargetOneOf {
70
+ /** an open url as an action target */
71
+ targetUrl?: string | null;
72
+ /** target_dashboard_page */
73
+ targetDashboardPage?: DashboardPages;
74
+ }
75
+ interface ToSiteContributors {
76
+ /** with_role */
77
+ withRole?: Role;
78
+ }
79
+ declare enum Role {
80
+ /** All contributors with any role */
81
+ All_Contributors = "All_Contributors",
82
+ /** Only the owner */
83
+ Owner = "Owner"
84
+ }
85
+ interface ToContacts {
86
+ /** contact_ids */
87
+ contactIds?: string[];
88
+ }
89
+ interface ToTopicsSubscribers {
90
+ /** topics */
91
+ topics?: string[];
92
+ /** excluded_contact_ids */
93
+ excludedContactIds?: string[];
94
+ }
95
+ declare enum Channel {
96
+ /** No Default Channel - need to expilicitly decide on channel */
97
+ Undefined = "Undefined",
98
+ /** The widget inside Wix */
99
+ Dashboard = "Dashboard",
100
+ /** Mobile push to WixApp */
101
+ Mobile = "Mobile",
102
+ /** Browser push to the active browser (Chrome/Safari only) */
103
+ Browser = "Browser"
104
+ }
105
+ declare enum DashboardPages {
106
+ Undefined_Page = "Undefined_Page",
107
+ /** goes to business manager home */
108
+ Home = "Home"
109
+ }
110
+ interface Empty {
111
+ }
112
+ interface NotifyOptions$1 extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
113
+ /** Send to site contributors. This includes admins, managers, and assistants. */
114
+ toSiteContributors?: ToSiteContributors;
115
+ /** Send to contacts. */
116
+ toContacts?: ToContacts;
117
+ /** Send to site members who subscrined to a particular topic. */
118
+ toTopicsSubscribers?: ToTopicsSubscribers;
119
+ /** Notification title. */
120
+ title?: string | null;
121
+ /** The Action of the notification */
122
+ action?: string | null;
123
+ /** an open url as an action target */
124
+ targetUrl?: string | null;
125
+ /** target_dashboard_page */
126
+ targetDashboardPage?: DashboardPages;
127
+ }
128
+
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 function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
140
+
141
+ type _publicNotifyType$1 = typeof notify$3;
142
+ declare const notify$2: ReturnType<typeof createRESTModule$1<_publicNotifyType>>;
143
+
144
+ type index_d$1_Channel = Channel;
145
+ declare const index_d$1_Channel: typeof Channel;
146
+ type index_d$1_DashboardPages = DashboardPages;
147
+ declare const index_d$1_DashboardPages: typeof DashboardPages;
148
+ type index_d$1_Empty = Empty;
149
+ type index_d$1_PublicNotifyRequest = PublicNotifyRequest;
150
+ type index_d$1_PublicNotifyRequestActionTargetOneOf = PublicNotifyRequestActionTargetOneOf;
151
+ type index_d$1_PublicNotifyRequestRecipientsFilterOneOf = PublicNotifyRequestRecipientsFilterOneOf;
152
+ type index_d$1_Public_notification = Public_notification;
153
+ type index_d$1_Role = Role;
154
+ declare const index_d$1_Role: typeof Role;
155
+ type index_d$1_ToContacts = ToContacts;
156
+ type index_d$1_ToSiteContributors = ToSiteContributors;
157
+ type index_d$1_ToTopicsSubscribers = ToTopicsSubscribers;
158
+ declare namespace index_d$1 {
159
+ 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, type _publicNotifyType$1 as _publicNotifyType, notify$2 as notify };
160
+ }
161
+
162
+ interface Notification {
163
+ /** The id of the notification */
164
+ _id?: string;
165
+ }
166
+ interface NotifyRequest {
167
+ /**
168
+ * Notification template ID. A notification template specifies the text and recipients for notifications.
169
+ * 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.
170
+ */
171
+ notificationTemplateId: string;
172
+ /**
173
+ * 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).
174
+ * The value is an object containing the text to replace the placeholder in the notifications.
175
+ */
176
+ dynamicValues?: Record<string, DynamicValue>;
177
+ }
178
+ interface DynamicValue extends DynamicValueOfTypeOneOf {
179
+ /** Text to be integrated into the notification. */
180
+ text?: string;
181
+ }
182
+ /** @oneof */
183
+ interface DynamicValueOfTypeOneOf {
184
+ /** Text to be integrated into the notification. */
185
+ text?: string;
186
+ }
187
+ /**
188
+ * Money.
189
+ * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
190
+ */
191
+ interface Money {
192
+ /** 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. */
193
+ value?: string;
194
+ /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
195
+ currency?: string;
196
+ /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
197
+ formattedValue?: string | null;
198
+ }
199
+ interface MapDynamicValue {
200
+ /** items */
201
+ items?: Record<string, DynamicValue>;
202
+ }
203
+ interface ArrayDynamicValue {
204
+ /** items */
205
+ items?: DynamicValue[];
206
+ }
207
+ interface AttachmentDynamicValue {
208
+ /** file name */
209
+ fileName?: string;
210
+ /** download url */
211
+ downloadUrl?: string;
212
+ }
213
+ interface NotifyResponse {
214
+ /** ID of the batch of notifications triggered by one request. */
215
+ notificationBatchId?: string;
216
+ }
217
+ interface NotifyByAppRequest {
218
+ /** notification_template_id */
219
+ notificationTemplateId?: string;
220
+ /** app_def_id */
221
+ appDefId?: string;
222
+ /** dynamic_values */
223
+ dynamicValues?: Record<string, DynamicValue>;
224
+ /** template tenant */
225
+ templateTenant?: string | null;
226
+ /** overrides */
227
+ overrides?: Overrides;
228
+ /** channels content */
229
+ channelsData?: ChannelsData;
230
+ }
231
+ interface Overrides {
232
+ /** excluded_channels */
233
+ excludedChannels?: TemplateChannel[];
234
+ /** excluded_audiences */
235
+ excludedAudiences?: ExcludedAudiences;
236
+ /** content overrides */
237
+ content?: ChannelsContent;
238
+ }
239
+ declare enum TemplateChannel {
240
+ WEB_FEED = "WEB_FEED",
241
+ MOBILE_FEED = "MOBILE_FEED",
242
+ MOBILE_PUSH = "MOBILE_PUSH",
243
+ BROWSER = "BROWSER",
244
+ SMS = "SMS",
245
+ EMAIL = "EMAIL",
246
+ KAFKA = "KAFKA",
247
+ VOICE = "VOICE"
248
+ }
249
+ interface ExcludedAudiences {
250
+ /** audience_key */
251
+ audienceKey?: string[];
252
+ }
253
+ interface ChannelsContent {
254
+ /** mobile push override */
255
+ mobileContent?: MobileContent;
256
+ }
257
+ interface MobileContent {
258
+ /** title override of mobile push content */
259
+ title?: string;
260
+ /** body override of mobile push content */
261
+ body?: string;
262
+ }
263
+ interface ChannelsData {
264
+ /** email data */
265
+ emailData?: EmailData;
266
+ }
267
+ interface EmailData {
268
+ /** shoutout action config */
269
+ shoutoutActionConfig?: Record<string, any> | null;
270
+ }
271
+ interface NotifyByAppResponse {
272
+ /** notification_batch_id */
273
+ notificationBatchId?: string;
274
+ }
275
+ interface ResolveRequest {
276
+ /** template id */
277
+ notificationTemplateId?: string;
278
+ /** values */
279
+ dynamicValues?: Record<string, DynamicValue>;
280
+ }
281
+ interface ResolveResponse {
282
+ }
283
+ interface NotifyResponseNonNullableFields {
284
+ notificationBatchId: string;
285
+ }
286
+ interface NotifyOptions {
287
+ /**
288
+ * 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).
289
+ * The value is an object containing the text to replace the placeholder in the notifications.
290
+ */
291
+ dynamicValues?: Record<string, DynamicValue>;
292
+ }
293
+
294
+ declare function notify$1(httpClient: HttpClient): NotifySignature;
295
+ interface NotifySignature {
296
+ /**
297
+ * Sends notifications based on the template and dynamic values provided.
298
+ *
299
+ * > This feature is not yet available to all users.
300
+ *
301
+ * An app can call this endpoint up to 100,000 times per month for each site.
302
+ *
303
+ * 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.
304
+ * Call the Notify endpoint with this ID as `notificationTemplateID` to trigger notifications based on the notification template.
305
+ * If the notification template contains placeholders for dynamic values, provide those values as key-value pairs in the `dynamicValues` array.
306
+ * The values you specify are incorporated seamlessly in the notifications sent out.
307
+ * @param - Notification template ID. A notification template specifies the text and recipients for notifications.
308
+ * 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.
309
+ */
310
+ (notificationTemplateId: string, options?: NotifyOptions | undefined): Promise<NotifyResponse & NotifyResponseNonNullableFields>;
311
+ }
312
+
313
+ declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
314
+
315
+ type _publicNotifyType = typeof notify$1;
316
+ declare const notify: ReturnType<typeof createRESTModule<_publicNotifyType>>;
317
+
318
+ type index_d_ArrayDynamicValue = ArrayDynamicValue;
319
+ type index_d_AttachmentDynamicValue = AttachmentDynamicValue;
320
+ type index_d_ChannelsContent = ChannelsContent;
321
+ type index_d_ChannelsData = ChannelsData;
322
+ type index_d_DynamicValue = DynamicValue;
323
+ type index_d_DynamicValueOfTypeOneOf = DynamicValueOfTypeOneOf;
324
+ type index_d_EmailData = EmailData;
325
+ type index_d_ExcludedAudiences = ExcludedAudiences;
326
+ type index_d_MapDynamicValue = MapDynamicValue;
327
+ type index_d_MobileContent = MobileContent;
328
+ type index_d_Money = Money;
329
+ type index_d_Notification = Notification;
330
+ type index_d_NotifyByAppRequest = NotifyByAppRequest;
331
+ type index_d_NotifyByAppResponse = NotifyByAppResponse;
332
+ type index_d_NotifyOptions = NotifyOptions;
333
+ type index_d_NotifyRequest = NotifyRequest;
334
+ type index_d_NotifyResponse = NotifyResponse;
335
+ type index_d_NotifyResponseNonNullableFields = NotifyResponseNonNullableFields;
336
+ type index_d_Overrides = Overrides;
337
+ type index_d_ResolveRequest = ResolveRequest;
338
+ type index_d_ResolveResponse = ResolveResponse;
339
+ type index_d_TemplateChannel = TemplateChannel;
340
+ declare const index_d_TemplateChannel: typeof TemplateChannel;
341
+ type index_d__publicNotifyType = _publicNotifyType;
342
+ declare const index_d_notify: typeof notify;
343
+ declare namespace index_d {
344
+ 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, type index_d__publicNotifyType as _publicNotifyType, index_d_notify as notify };
345
+ }
346
+
347
+ export { index_d$1 as notifications, index_d as notificationsV3 };
@@ -0,0 +1,241 @@
1
+ interface PublicNotifyRequest$1 extends PublicNotifyRequestRecipientsFilterOneOf$1, PublicNotifyRequestActionTargetOneOf$1 {
2
+ /** Send to site contributors. This includes admins, managers, and assistants. */
3
+ toSiteContributors?: ToSiteContributors$1;
4
+ /** Send to contacts. */
5
+ toContacts?: ToContacts$1;
6
+ /** Send to site members who subscrined to a particular topic. */
7
+ toTopicsSubscribers?: ToTopicsSubscribers$1;
8
+ /** an open url as an action target */
9
+ targetUrl?: string | null;
10
+ /** target_dashboard_page */
11
+ targetDashboardPage?: DashboardPages$1;
12
+ /** Notification title. */
13
+ title?: string | null;
14
+ /** Notification body. */
15
+ body?: string | null;
16
+ /** The Action of the notification */
17
+ action?: string | null;
18
+ /** The channel to which send the notification */
19
+ channels?: Channel$1[];
20
+ }
21
+ /** @oneof */
22
+ interface PublicNotifyRequestRecipientsFilterOneOf$1 {
23
+ /** Send to site contributors. This includes admins, managers, and assistants. */
24
+ toSiteContributors?: ToSiteContributors$1;
25
+ /** Send to contacts. */
26
+ toContacts?: ToContacts$1;
27
+ /** Send to site members who subscrined to a particular topic. */
28
+ toTopicsSubscribers?: ToTopicsSubscribers$1;
29
+ }
30
+ /** @oneof */
31
+ interface PublicNotifyRequestActionTargetOneOf$1 {
32
+ /** an open url as an action target */
33
+ targetUrl?: string | null;
34
+ /** target_dashboard_page */
35
+ targetDashboardPage?: DashboardPages$1;
36
+ }
37
+ interface ToSiteContributors$1 {
38
+ /** with_role */
39
+ withRole?: Role$1;
40
+ }
41
+ declare enum Role$1 {
42
+ /** All contributors with any role */
43
+ All_Contributors = "All_Contributors",
44
+ /** Only the owner */
45
+ Owner = "Owner"
46
+ }
47
+ interface ToContacts$1 {
48
+ /** contact_ids */
49
+ contactIds?: string[];
50
+ }
51
+ interface ToTopicsSubscribers$1 {
52
+ /** topics */
53
+ topics?: string[];
54
+ /** excluded_contact_ids */
55
+ excludedContactIds?: string[];
56
+ }
57
+ declare enum Channel$1 {
58
+ /** No Default Channel - need to expilicitly decide on channel */
59
+ Undefined = "Undefined",
60
+ /** The widget inside Wix */
61
+ Dashboard = "Dashboard",
62
+ /** Mobile push to WixApp */
63
+ Mobile = "Mobile",
64
+ /** Browser push to the active browser (Chrome/Safari only) */
65
+ Browser = "Browser"
66
+ }
67
+ declare enum DashboardPages$1 {
68
+ Undefined_Page = "Undefined_Page",
69
+ /** goes to business manager home */
70
+ Home = "Home"
71
+ }
72
+ interface Empty$1 {
73
+ }
74
+
75
+ interface PublicNotifyRequest extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
76
+ /** Send to site contributors. This includes admins, managers, and assistants. */
77
+ toSiteContributors?: ToSiteContributors;
78
+ /** Send to contacts. */
79
+ toContacts?: ToContacts;
80
+ /** Send to site members who subscrined to a particular topic. */
81
+ toTopicsSubscribers?: ToTopicsSubscribers;
82
+ /** an open url as an action target */
83
+ targetUrl?: string | null;
84
+ /** target_dashboard_page */
85
+ targetDashboardPage?: DashboardPages;
86
+ /** Notification title. */
87
+ title?: string | null;
88
+ /** Notification body. */
89
+ body?: string | null;
90
+ /** The Action of the notification */
91
+ action?: string | null;
92
+ /** The channel to which send the notification */
93
+ channels?: Channel[];
94
+ }
95
+ /** @oneof */
96
+ interface PublicNotifyRequestRecipientsFilterOneOf {
97
+ /** Send to site contributors. This includes admins, managers, and assistants. */
98
+ toSiteContributors?: ToSiteContributors;
99
+ /** Send to contacts. */
100
+ toContacts?: ToContacts;
101
+ /** Send to site members who subscrined to a particular topic. */
102
+ toTopicsSubscribers?: ToTopicsSubscribers;
103
+ }
104
+ /** @oneof */
105
+ interface PublicNotifyRequestActionTargetOneOf {
106
+ /** an open url as an action target */
107
+ targetUrl?: string | null;
108
+ /** target_dashboard_page */
109
+ targetDashboardPage?: DashboardPages;
110
+ }
111
+ interface ToSiteContributors {
112
+ /** with_role */
113
+ withRole?: Role;
114
+ }
115
+ declare enum Role {
116
+ /** All contributors with any role */
117
+ All_Contributors = "All_Contributors",
118
+ /** Only the owner */
119
+ Owner = "Owner"
120
+ }
121
+ interface ToContacts {
122
+ /** contact_ids */
123
+ contactIds?: string[];
124
+ }
125
+ interface ToTopicsSubscribers {
126
+ /** topics */
127
+ topics?: string[];
128
+ /** excluded_contact_ids */
129
+ excludedContactIds?: string[];
130
+ }
131
+ declare enum Channel {
132
+ /** No Default Channel - need to expilicitly decide on channel */
133
+ Undefined = "Undefined",
134
+ /** The widget inside Wix */
135
+ Dashboard = "Dashboard",
136
+ /** Mobile push to WixApp */
137
+ Mobile = "Mobile",
138
+ /** Browser push to the active browser (Chrome/Safari only) */
139
+ Browser = "Browser"
140
+ }
141
+ declare enum DashboardPages {
142
+ Undefined_Page = "Undefined_Page",
143
+ /** goes to business manager home */
144
+ Home = "Home"
145
+ }
146
+ interface Empty {
147
+ }
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
+
223
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
224
+ getUrl: (context: any) => string;
225
+ httpMethod: K;
226
+ path: string;
227
+ pathParams: M;
228
+ __requestType: T;
229
+ __originalRequestType: S;
230
+ __responseType: Q;
231
+ __originalResponseType: R;
232
+ };
233
+ declare function notify(): __PublicMethodMetaInfo<'POST', {}, NotifyRequest, NotifyRequest$1, NotifyResponse & NotifyResponseNonNullableFields, NotifyResponse$1 & NotifyResponseNonNullableFields$1>;
234
+
235
+ type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
236
+ declare const meta_notify: typeof notify;
237
+ declare namespace meta {
238
+ export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_notify as notify };
239
+ }
240
+
241
+ export { meta$1 as notifications, meta as notificationsV3 };