@wix/crm 1.0.84 → 1.0.86
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/build/cjs/context.d.ts +5 -5
- package/build/cjs/context.js +5 -5
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +5 -5
- package/build/cjs/index.js +5 -5
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +5 -5
- package/build/cjs/meta.js +5 -5
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +5 -5
- package/build/es/context.js +5 -5
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +5 -5
- package/build/es/index.js +5 -5
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +5 -5
- package/build/es/meta.js +5 -5
- package/build/es/meta.js.map +1 -1
- package/package.json +15 -9
- package/build/cjs/index.typings.d.ts +0 -5
- package/build/cjs/index.typings.js +0 -32
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact.context.d.ts +0 -9
- package/build/cjs/src/contacts-v4-contact.context.js +0 -82
- package/build/cjs/src/contacts-v4-contact.context.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact.http.d.ts +0 -95
- package/build/cjs/src/contacts-v4-contact.http.js +0 -485
- package/build/cjs/src/contacts-v4-contact.http.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact.meta.d.ts +0 -31
- package/build/cjs/src/contacts-v4-contact.meta.js +0 -161
- package/build/cjs/src/contacts-v4-contact.meta.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact.public.d.ts +0 -49
- package/build/cjs/src/contacts-v4-contact.public.js +0 -76
- package/build/cjs/src/contacts-v4-contact.public.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact.types.d.ts +0 -2185
- package/build/cjs/src/contacts-v4-contact.types.js +0 -270
- package/build/cjs/src/contacts-v4-contact.types.js.map +0 -1
- package/build/cjs/src/contacts-v4-contact.universal.d.ts +0 -2055
- package/build/cjs/src/contacts-v4-contact.universal.js +0 -930
- package/build/cjs/src/contacts-v4-contact.universal.js.map +0 -1
- package/build/cjs/src/contacts-v4-extended-field.context.d.ts +0 -7
- package/build/cjs/src/contacts-v4-extended-field.context.js +0 -60
- package/build/cjs/src/contacts-v4-extended-field.context.js.map +0 -1
- package/build/cjs/src/contacts-v4-extended-field.http.d.ts +0 -53
- package/build/cjs/src/contacts-v4-extended-field.http.js +0 -234
- package/build/cjs/src/contacts-v4-extended-field.http.js.map +0 -1
- package/build/cjs/src/contacts-v4-extended-field.meta.d.ts +0 -23
- package/build/cjs/src/contacts-v4-extended-field.meta.js +0 -123
- package/build/cjs/src/contacts-v4-extended-field.meta.js.map +0 -1
- package/build/cjs/src/contacts-v4-extended-field.public.d.ts +0 -23
- package/build/cjs/src/contacts-v4-extended-field.public.js +0 -44
- package/build/cjs/src/contacts-v4-extended-field.public.js.map +0 -1
- package/build/cjs/src/contacts-v4-extended-field.types.d.ts +0 -357
- package/build/cjs/src/contacts-v4-extended-field.types.js +0 -23
- package/build/cjs/src/contacts-v4-extended-field.types.js.map +0 -1
- package/build/cjs/src/contacts-v4-extended-field.universal.d.ts +0 -623
- package/build/cjs/src/contacts-v4-extended-field.universal.js +0 -434
- package/build/cjs/src/contacts-v4-extended-field.universal.js.map +0 -1
- package/build/cjs/src/contacts-v4-label.context.d.ts +0 -7
- package/build/cjs/src/contacts-v4-label.context.js +0 -60
- package/build/cjs/src/contacts-v4-label.context.js.map +0 -1
- package/build/cjs/src/contacts-v4-label.http.d.ts +0 -54
- package/build/cjs/src/contacts-v4-label.http.js +0 -235
- package/build/cjs/src/contacts-v4-label.http.js.map +0 -1
- package/build/cjs/src/contacts-v4-label.meta.d.ts +0 -23
- package/build/cjs/src/contacts-v4-label.meta.js +0 -123
- package/build/cjs/src/contacts-v4-label.meta.js.map +0 -1
- package/build/cjs/src/contacts-v4-label.public.d.ts +0 -21
- package/build/cjs/src/contacts-v4-label.public.js +0 -43
- package/build/cjs/src/contacts-v4-label.public.js.map +0 -1
- package/build/cjs/src/contacts-v4-label.types.d.ts +0 -349
- package/build/cjs/src/contacts-v4-label.types.js +0 -17
- package/build/cjs/src/contacts-v4-label.types.js.map +0 -1
- package/build/cjs/src/contacts-v4-label.universal.d.ts +0 -627
- package/build/cjs/src/contacts-v4-label.universal.js +0 -428
- package/build/cjs/src/contacts-v4-label.universal.js.map +0 -1
- package/build/cjs/src/contacts-v4-submit-contact.context.d.ts +0 -3
- package/build/cjs/src/contacts-v4-submit-contact.context.js +0 -16
- package/build/cjs/src/contacts-v4-submit-contact.context.js.map +0 -1
- package/build/cjs/src/contacts-v4-submit-contact.http.d.ts +0 -9
- package/build/cjs/src/contacts-v4-submit-contact.http.js +0 -90
- package/build/cjs/src/contacts-v4-submit-contact.http.js.map +0 -1
- package/build/cjs/src/contacts-v4-submit-contact.meta.d.ts +0 -13
- package/build/cjs/src/contacts-v4-submit-contact.meta.js +0 -47
- package/build/cjs/src/contacts-v4-submit-contact.meta.js.map +0 -1
- package/build/cjs/src/contacts-v4-submit-contact.public.d.ts +0 -8
- package/build/cjs/src/contacts-v4-submit-contact.public.js +0 -22
- package/build/cjs/src/contacts-v4-submit-contact.public.js.map +0 -1
- package/build/cjs/src/contacts-v4-submit-contact.types.d.ts +0 -541
- package/build/cjs/src/contacts-v4-submit-contact.types.js +0 -174
- package/build/cjs/src/contacts-v4-submit-contact.types.js.map +0 -1
- package/build/cjs/src/contacts-v4-submit-contact.universal.d.ts +0 -555
- package/build/cjs/src/contacts-v4-submit-contact.universal.js +0 -288
- package/build/cjs/src/contacts-v4-submit-contact.universal.js.map +0 -1
- package/build/cjs/src/crm-tasks-v2-task.context.d.ts +0 -9
- package/build/cjs/src/crm-tasks-v2-task.context.js +0 -82
- package/build/cjs/src/crm-tasks-v2-task.context.js.map +0 -1
- package/build/cjs/src/crm-tasks-v2-task.http.d.ts +0 -60
- package/build/cjs/src/crm-tasks-v2-task.http.js +0 -268
- package/build/cjs/src/crm-tasks-v2-task.http.js.map +0 -1
- package/build/cjs/src/crm-tasks-v2-task.meta.d.ts +0 -27
- package/build/cjs/src/crm-tasks-v2-task.meta.js +0 -161
- package/build/cjs/src/crm-tasks-v2-task.meta.js.map +0 -1
- package/build/cjs/src/crm-tasks-v2-task.public.d.ts +0 -30
- package/build/cjs/src/crm-tasks-v2-task.public.js +0 -58
- package/build/cjs/src/crm-tasks-v2-task.public.js.map +0 -1
- package/build/cjs/src/crm-tasks-v2-task.types.d.ts +0 -430
- package/build/cjs/src/crm-tasks-v2-task.types.js +0 -29
- package/build/cjs/src/crm-tasks-v2-task.types.js.map +0 -1
- package/build/cjs/src/crm-tasks-v2-task.universal.d.ts +0 -678
- package/build/cjs/src/crm-tasks-v2-task.universal.js +0 -520
- package/build/cjs/src/crm-tasks-v2-task.universal.js.map +0 -1
- package/build/cjs/src/ping-notifications-v3-notification.http.d.ts +0 -15
- package/build/cjs/src/ping-notifications-v3-notification.http.js +0 -87
- package/build/cjs/src/ping-notifications-v3-notification.http.js.map +0 -1
- package/build/cjs/src/ping-notifications-v3-notification.public.d.ts +0 -8
- package/build/cjs/src/ping-notifications-v3-notification.public.js +0 -14
- package/build/cjs/src/ping-notifications-v3-notification.public.js.map +0 -1
- package/build/cjs/src/ping-notifications-v3-notification.types.d.ts +0 -113
- package/build/cjs/src/ping-notifications-v3-notification.types.js +0 -15
- package/build/cjs/src/ping-notifications-v3-notification.types.js.map +0 -1
- package/build/cjs/src/ping-notifications-v3-notification.universal.d.ts +0 -146
- package/build/cjs/src/ping-notifications-v3-notification.universal.js +0 -136
- package/build/cjs/src/ping-notifications-v3-notification.universal.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -5
- package/build/es/index.typings.js +0 -6
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/contacts-v4-contact.context.d.ts +0 -9
- package/build/es/src/contacts-v4-contact.context.js +0 -72
- package/build/es/src/contacts-v4-contact.context.js.map +0 -1
- package/build/es/src/contacts-v4-contact.http.d.ts +0 -95
- package/build/es/src/contacts-v4-contact.http.js +0 -475
- package/build/es/src/contacts-v4-contact.http.js.map +0 -1
- package/build/es/src/contacts-v4-contact.meta.d.ts +0 -31
- package/build/es/src/contacts-v4-contact.meta.js +0 -128
- package/build/es/src/contacts-v4-contact.meta.js.map +0 -1
- package/build/es/src/contacts-v4-contact.public.d.ts +0 -49
- package/build/es/src/contacts-v4-contact.public.js +0 -40
- package/build/es/src/contacts-v4-contact.public.js.map +0 -1
- package/build/es/src/contacts-v4-contact.types.d.ts +0 -2185
- package/build/es/src/contacts-v4-contact.types.js +0 -267
- package/build/es/src/contacts-v4-contact.types.js.map +0 -1
- package/build/es/src/contacts-v4-contact.universal.d.ts +0 -2055
- package/build/es/src/contacts-v4-contact.universal.js +0 -897
- package/build/es/src/contacts-v4-contact.universal.js.map +0 -1
- package/build/es/src/contacts-v4-extended-field.context.d.ts +0 -7
- package/build/es/src/contacts-v4-extended-field.context.js +0 -52
- package/build/es/src/contacts-v4-extended-field.context.js.map +0 -1
- package/build/es/src/contacts-v4-extended-field.http.d.ts +0 -53
- package/build/es/src/contacts-v4-extended-field.http.js +0 -226
- package/build/es/src/contacts-v4-extended-field.http.js.map +0 -1
- package/build/es/src/contacts-v4-extended-field.meta.d.ts +0 -23
- package/build/es/src/contacts-v4-extended-field.meta.js +0 -92
- package/build/es/src/contacts-v4-extended-field.meta.js.map +0 -1
- package/build/es/src/contacts-v4-extended-field.public.d.ts +0 -23
- package/build/es/src/contacts-v4-extended-field.public.js +0 -30
- package/build/es/src/contacts-v4-extended-field.public.js.map +0 -1
- package/build/es/src/contacts-v4-extended-field.types.d.ts +0 -357
- package/build/es/src/contacts-v4-extended-field.types.js +0 -20
- package/build/es/src/contacts-v4-extended-field.types.js.map +0 -1
- package/build/es/src/contacts-v4-extended-field.universal.d.ts +0 -623
- package/build/es/src/contacts-v4-extended-field.universal.js +0 -403
- package/build/es/src/contacts-v4-extended-field.universal.js.map +0 -1
- package/build/es/src/contacts-v4-label.context.d.ts +0 -7
- package/build/es/src/contacts-v4-label.context.js +0 -52
- package/build/es/src/contacts-v4-label.context.js.map +0 -1
- package/build/es/src/contacts-v4-label.http.d.ts +0 -54
- package/build/es/src/contacts-v4-label.http.js +0 -227
- package/build/es/src/contacts-v4-label.http.js.map +0 -1
- package/build/es/src/contacts-v4-label.meta.d.ts +0 -23
- package/build/es/src/contacts-v4-label.meta.js +0 -92
- package/build/es/src/contacts-v4-label.meta.js.map +0 -1
- package/build/es/src/contacts-v4-label.public.d.ts +0 -21
- package/build/es/src/contacts-v4-label.public.js +0 -30
- package/build/es/src/contacts-v4-label.public.js.map +0 -1
- package/build/es/src/contacts-v4-label.types.d.ts +0 -349
- package/build/es/src/contacts-v4-label.types.js +0 -14
- package/build/es/src/contacts-v4-label.types.js.map +0 -1
- package/build/es/src/contacts-v4-label.universal.d.ts +0 -627
- package/build/es/src/contacts-v4-label.universal.js +0 -397
- package/build/es/src/contacts-v4-label.universal.js.map +0 -1
- package/build/es/src/contacts-v4-submit-contact.context.d.ts +0 -3
- package/build/es/src/contacts-v4-submit-contact.context.js +0 -12
- package/build/es/src/contacts-v4-submit-contact.context.js.map +0 -1
- package/build/es/src/contacts-v4-submit-contact.http.d.ts +0 -9
- package/build/es/src/contacts-v4-submit-contact.http.js +0 -86
- package/build/es/src/contacts-v4-submit-contact.http.js.map +0 -1
- package/build/es/src/contacts-v4-submit-contact.meta.d.ts +0 -13
- package/build/es/src/contacts-v4-submit-contact.meta.js +0 -20
- package/build/es/src/contacts-v4-submit-contact.meta.js.map +0 -1
- package/build/es/src/contacts-v4-submit-contact.public.d.ts +0 -8
- package/build/es/src/contacts-v4-submit-contact.public.js +0 -9
- package/build/es/src/contacts-v4-submit-contact.public.js.map +0 -1
- package/build/es/src/contacts-v4-submit-contact.types.d.ts +0 -541
- package/build/es/src/contacts-v4-submit-contact.types.js +0 -171
- package/build/es/src/contacts-v4-submit-contact.types.js.map +0 -1
- package/build/es/src/contacts-v4-submit-contact.universal.d.ts +0 -555
- package/build/es/src/contacts-v4-submit-contact.universal.js +0 -261
- package/build/es/src/contacts-v4-submit-contact.universal.js.map +0 -1
- package/build/es/src/crm-tasks-v2-task.context.d.ts +0 -9
- package/build/es/src/crm-tasks-v2-task.context.js +0 -72
- package/build/es/src/crm-tasks-v2-task.context.js.map +0 -1
- package/build/es/src/crm-tasks-v2-task.http.d.ts +0 -60
- package/build/es/src/crm-tasks-v2-task.http.js +0 -258
- package/build/es/src/crm-tasks-v2-task.http.js.map +0 -1
- package/build/es/src/crm-tasks-v2-task.meta.d.ts +0 -27
- package/build/es/src/crm-tasks-v2-task.meta.js +0 -128
- package/build/es/src/crm-tasks-v2-task.meta.js.map +0 -1
- package/build/es/src/crm-tasks-v2-task.public.d.ts +0 -30
- package/build/es/src/crm-tasks-v2-task.public.js +0 -40
- package/build/es/src/crm-tasks-v2-task.public.js.map +0 -1
- package/build/es/src/crm-tasks-v2-task.types.d.ts +0 -430
- package/build/es/src/crm-tasks-v2-task.types.js +0 -26
- package/build/es/src/crm-tasks-v2-task.types.js.map +0 -1
- package/build/es/src/crm-tasks-v2-task.universal.d.ts +0 -678
- package/build/es/src/crm-tasks-v2-task.universal.js +0 -487
- package/build/es/src/crm-tasks-v2-task.universal.js.map +0 -1
- package/build/es/src/ping-notifications-v3-notification.http.d.ts +0 -15
- package/build/es/src/ping-notifications-v3-notification.http.js +0 -83
- package/build/es/src/ping-notifications-v3-notification.http.js.map +0 -1
- package/build/es/src/ping-notifications-v3-notification.public.d.ts +0 -8
- package/build/es/src/ping-notifications-v3-notification.public.js +0 -9
- package/build/es/src/ping-notifications-v3-notification.public.js.map +0 -1
- package/build/es/src/ping-notifications-v3-notification.types.d.ts +0 -113
- package/build/es/src/ping-notifications-v3-notification.types.js +0 -12
- package/build/es/src/ping-notifications-v3-notification.types.js.map +0 -1
- package/build/es/src/ping-notifications-v3-notification.universal.d.ts +0 -146
- package/build/es/src/ping-notifications-v3-notification.universal.js +0 -109
- package/build/es/src/ping-notifications-v3-notification.universal.js.map +0 -1
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TemplateChannel = exports.notify = exports.__metadata = void 0;
|
|
4
|
-
const ping_notifications_v3_notification_universal_1 = require("./ping-notifications-v3-notification.universal");
|
|
5
|
-
exports.__metadata = { PACKAGE_NAME: '@wix/crm' };
|
|
6
|
-
function notify(httpClient) {
|
|
7
|
-
return (notificationTemplateId, options) => (0, ping_notifications_v3_notification_universal_1.notify)(notificationTemplateId, options,
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
{ httpClient });
|
|
10
|
-
}
|
|
11
|
-
exports.notify = notify;
|
|
12
|
-
var ping_notifications_v3_notification_universal_2 = require("./ping-notifications-v3-notification.universal");
|
|
13
|
-
Object.defineProperty(exports, "TemplateChannel", { enumerable: true, get: function () { return ping_notifications_v3_notification_universal_2.TemplateChannel; } });
|
|
14
|
-
//# sourceMappingURL=ping-notifications-v3-notification.public.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ping-notifications-v3-notification.public.js","sourceRoot":"","sources":["../../../src/ping-notifications-v3-notification.public.ts"],"names":[],"mappings":";;;AACA,iHAGwD;AAE3C,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AAEvD,SAAgB,MAAM,CAAC,UAAsB;IAC3C,OAAO,CAAC,sBAA8B,EAAE,OAAuB,EAAE,EAAE,CACjE,IAAA,qDAAe,EACb,sBAAsB,EACtB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,wBAQC;AAED,+GAAiF;AAAxE,+IAAA,eAAe,OAAA"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
export interface Notification {
|
|
2
|
-
/** The id of the notification */
|
|
3
|
-
id?: string;
|
|
4
|
-
}
|
|
5
|
-
export interface NotifyRequest {
|
|
6
|
-
/**
|
|
7
|
-
* Notification template ID. A notification template specifies the text and recipients for notifications.
|
|
8
|
-
* 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.
|
|
9
|
-
*/
|
|
10
|
-
notificationTemplateId: string;
|
|
11
|
-
/**
|
|
12
|
-
* 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).
|
|
13
|
-
* The value is an object containing the text to replace the placeholder in the notifications.
|
|
14
|
-
*/
|
|
15
|
-
dynamicValues?: Record<string, DynamicValue>;
|
|
16
|
-
}
|
|
17
|
-
export interface DynamicValue extends DynamicValueOfTypeOneOf {
|
|
18
|
-
/** Text to be integrated into the notification. */
|
|
19
|
-
text?: string;
|
|
20
|
-
}
|
|
21
|
-
/** @oneof */
|
|
22
|
-
export interface DynamicValueOfTypeOneOf {
|
|
23
|
-
/** Text to be integrated into the notification. */
|
|
24
|
-
text?: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Money.
|
|
28
|
-
* Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
|
|
29
|
-
*/
|
|
30
|
-
export interface Money {
|
|
31
|
-
/** 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. */
|
|
32
|
-
value?: string;
|
|
33
|
-
/** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
|
|
34
|
-
currency?: string;
|
|
35
|
-
/** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
|
|
36
|
-
formattedValue?: string | null;
|
|
37
|
-
}
|
|
38
|
-
export interface MapDynamicValue {
|
|
39
|
-
/** items */
|
|
40
|
-
items?: Record<string, DynamicValue>;
|
|
41
|
-
}
|
|
42
|
-
export interface ArrayDynamicValue {
|
|
43
|
-
/** items */
|
|
44
|
-
items?: DynamicValue[];
|
|
45
|
-
}
|
|
46
|
-
export interface AttachmentDynamicValue {
|
|
47
|
-
/** file name */
|
|
48
|
-
fileName?: string;
|
|
49
|
-
/** download url */
|
|
50
|
-
downloadUrl?: string;
|
|
51
|
-
}
|
|
52
|
-
export interface NotifyResponse {
|
|
53
|
-
/** ID of the batch of notifications triggered by one request. */
|
|
54
|
-
notificationBatchId?: string;
|
|
55
|
-
}
|
|
56
|
-
export interface NotifyByAppRequest {
|
|
57
|
-
/** notification_template_id */
|
|
58
|
-
notificationTemplateId?: string;
|
|
59
|
-
/** app_def_id */
|
|
60
|
-
appDefId?: string;
|
|
61
|
-
/** dynamic_values */
|
|
62
|
-
dynamicValues?: Record<string, DynamicValue>;
|
|
63
|
-
/** template tenant */
|
|
64
|
-
templateTenant?: string | null;
|
|
65
|
-
/** overrides */
|
|
66
|
-
overrides?: Overrides;
|
|
67
|
-
/** channels content */
|
|
68
|
-
channelsData?: ChannelsData;
|
|
69
|
-
}
|
|
70
|
-
export interface Overrides {
|
|
71
|
-
/** excluded_channels */
|
|
72
|
-
excludedChannels?: TemplateChannel[];
|
|
73
|
-
/** excluded_audiences */
|
|
74
|
-
excludedAudiences?: ExcludedAudiences;
|
|
75
|
-
/** content overrides */
|
|
76
|
-
content?: ChannelsContent;
|
|
77
|
-
}
|
|
78
|
-
export declare enum TemplateChannel {
|
|
79
|
-
WEB_FEED = "WEB_FEED",
|
|
80
|
-
MOBILE_FEED = "MOBILE_FEED",
|
|
81
|
-
MOBILE_PUSH = "MOBILE_PUSH",
|
|
82
|
-
BROWSER = "BROWSER",
|
|
83
|
-
SMS = "SMS",
|
|
84
|
-
EMAIL = "EMAIL",
|
|
85
|
-
KAFKA = "KAFKA",
|
|
86
|
-
VOICE = "VOICE"
|
|
87
|
-
}
|
|
88
|
-
export interface ExcludedAudiences {
|
|
89
|
-
/** audience_key */
|
|
90
|
-
audienceKey?: string[];
|
|
91
|
-
}
|
|
92
|
-
export interface ChannelsContent {
|
|
93
|
-
/** mobile push override */
|
|
94
|
-
mobileContent?: MobileContent;
|
|
95
|
-
}
|
|
96
|
-
export interface MobileContent {
|
|
97
|
-
/** title override of mobile push content */
|
|
98
|
-
title?: string;
|
|
99
|
-
/** body override of mobile push content */
|
|
100
|
-
body?: string;
|
|
101
|
-
}
|
|
102
|
-
export interface ChannelsData {
|
|
103
|
-
/** email data */
|
|
104
|
-
emailData?: EmailData;
|
|
105
|
-
}
|
|
106
|
-
export interface EmailData {
|
|
107
|
-
/** shoutout action config */
|
|
108
|
-
shoutoutActionConfig?: Record<string, any> | null;
|
|
109
|
-
}
|
|
110
|
-
export interface NotifyByAppResponse {
|
|
111
|
-
/** notification_batch_id */
|
|
112
|
-
notificationBatchId?: string;
|
|
113
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TemplateChannel = void 0;
|
|
4
|
-
var TemplateChannel;
|
|
5
|
-
(function (TemplateChannel) {
|
|
6
|
-
TemplateChannel["WEB_FEED"] = "WEB_FEED";
|
|
7
|
-
TemplateChannel["MOBILE_FEED"] = "MOBILE_FEED";
|
|
8
|
-
TemplateChannel["MOBILE_PUSH"] = "MOBILE_PUSH";
|
|
9
|
-
TemplateChannel["BROWSER"] = "BROWSER";
|
|
10
|
-
TemplateChannel["SMS"] = "SMS";
|
|
11
|
-
TemplateChannel["EMAIL"] = "EMAIL";
|
|
12
|
-
TemplateChannel["KAFKA"] = "KAFKA";
|
|
13
|
-
TemplateChannel["VOICE"] = "VOICE";
|
|
14
|
-
})(TemplateChannel || (exports.TemplateChannel = TemplateChannel = {}));
|
|
15
|
-
//# sourceMappingURL=ping-notifications-v3-notification.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ping-notifications-v3-notification.types.js","sourceRoot":"","sources":["../../../src/ping-notifications-v3-notification.types.ts"],"names":[],"mappings":";;;AAwFA,IAAY,eASX;AATD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,8CAA2B,CAAA;IAC3B,8CAA2B,CAAA;IAC3B,sCAAmB,CAAA;IACnB,8BAAW,CAAA;IACX,kCAAe,CAAA;IACf,kCAAe,CAAA;IACf,kCAAe,CAAA;AACjB,CAAC,EATW,eAAe,+BAAf,eAAe,QAS1B"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
export declare const __debug: {
|
|
2
|
-
verboseLogging: {
|
|
3
|
-
on: () => boolean;
|
|
4
|
-
off: () => boolean;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
export interface Notification {
|
|
8
|
-
/** The id of the notification */
|
|
9
|
-
_id?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface NotifyRequest {
|
|
12
|
-
/**
|
|
13
|
-
* Notification template ID. A notification template specifies the text and recipients for notifications.
|
|
14
|
-
* 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.
|
|
15
|
-
*/
|
|
16
|
-
notificationTemplateId: string;
|
|
17
|
-
/**
|
|
18
|
-
* 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).
|
|
19
|
-
* The value is an object containing the text to replace the placeholder in the notifications.
|
|
20
|
-
*/
|
|
21
|
-
dynamicValues?: Record<string, DynamicValue>;
|
|
22
|
-
}
|
|
23
|
-
export interface DynamicValue extends DynamicValueOfTypeOneOf {
|
|
24
|
-
/** Text to be integrated into the notification. */
|
|
25
|
-
text?: string;
|
|
26
|
-
}
|
|
27
|
-
/** @oneof */
|
|
28
|
-
export interface DynamicValueOfTypeOneOf {
|
|
29
|
-
/** Text to be integrated into the notification. */
|
|
30
|
-
text?: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Money.
|
|
34
|
-
* Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
|
|
35
|
-
*/
|
|
36
|
-
export interface Money {
|
|
37
|
-
/** 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. */
|
|
38
|
-
value?: string;
|
|
39
|
-
/** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
|
|
40
|
-
currency?: string;
|
|
41
|
-
/** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */
|
|
42
|
-
formattedValue?: string | null;
|
|
43
|
-
}
|
|
44
|
-
export interface MapDynamicValue {
|
|
45
|
-
/** items */
|
|
46
|
-
items?: Record<string, DynamicValue>;
|
|
47
|
-
}
|
|
48
|
-
export interface ArrayDynamicValue {
|
|
49
|
-
/** items */
|
|
50
|
-
items?: DynamicValue[];
|
|
51
|
-
}
|
|
52
|
-
export interface AttachmentDynamicValue {
|
|
53
|
-
/** file name */
|
|
54
|
-
fileName?: string;
|
|
55
|
-
/** download url */
|
|
56
|
-
downloadUrl?: string;
|
|
57
|
-
}
|
|
58
|
-
export interface NotifyResponse {
|
|
59
|
-
/** ID of the batch of notifications triggered by one request. */
|
|
60
|
-
notificationBatchId?: string;
|
|
61
|
-
}
|
|
62
|
-
export interface NotifyByAppRequest {
|
|
63
|
-
/** notification_template_id */
|
|
64
|
-
notificationTemplateId?: string;
|
|
65
|
-
/** app_def_id */
|
|
66
|
-
appDefId?: string;
|
|
67
|
-
/** dynamic_values */
|
|
68
|
-
dynamicValues?: Record<string, DynamicValue>;
|
|
69
|
-
/** template tenant */
|
|
70
|
-
templateTenant?: string | null;
|
|
71
|
-
/** overrides */
|
|
72
|
-
overrides?: Overrides;
|
|
73
|
-
/** channels content */
|
|
74
|
-
channelsData?: ChannelsData;
|
|
75
|
-
}
|
|
76
|
-
export interface Overrides {
|
|
77
|
-
/** excluded_channels */
|
|
78
|
-
excludedChannels?: TemplateChannel[];
|
|
79
|
-
/** excluded_audiences */
|
|
80
|
-
excludedAudiences?: ExcludedAudiences;
|
|
81
|
-
/** content overrides */
|
|
82
|
-
content?: ChannelsContent;
|
|
83
|
-
}
|
|
84
|
-
export declare enum TemplateChannel {
|
|
85
|
-
WEB_FEED = "WEB_FEED",
|
|
86
|
-
MOBILE_FEED = "MOBILE_FEED",
|
|
87
|
-
MOBILE_PUSH = "MOBILE_PUSH",
|
|
88
|
-
BROWSER = "BROWSER",
|
|
89
|
-
SMS = "SMS",
|
|
90
|
-
EMAIL = "EMAIL",
|
|
91
|
-
KAFKA = "KAFKA",
|
|
92
|
-
VOICE = "VOICE"
|
|
93
|
-
}
|
|
94
|
-
export interface ExcludedAudiences {
|
|
95
|
-
/** audience_key */
|
|
96
|
-
audienceKey?: string[];
|
|
97
|
-
}
|
|
98
|
-
export interface ChannelsContent {
|
|
99
|
-
/** mobile push override */
|
|
100
|
-
mobileContent?: MobileContent;
|
|
101
|
-
}
|
|
102
|
-
export interface MobileContent {
|
|
103
|
-
/** title override of mobile push content */
|
|
104
|
-
title?: string;
|
|
105
|
-
/** body override of mobile push content */
|
|
106
|
-
body?: string;
|
|
107
|
-
}
|
|
108
|
-
export interface ChannelsData {
|
|
109
|
-
/** email data */
|
|
110
|
-
emailData?: EmailData;
|
|
111
|
-
}
|
|
112
|
-
export interface EmailData {
|
|
113
|
-
/** shoutout action config */
|
|
114
|
-
shoutoutActionConfig?: Record<string, any> | null;
|
|
115
|
-
}
|
|
116
|
-
export interface NotifyByAppResponse {
|
|
117
|
-
/** notification_batch_id */
|
|
118
|
-
notificationBatchId?: string;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Sends notifications based on the template and dynamic values provided.
|
|
122
|
-
*
|
|
123
|
-
* > This feature is not yet available to all users.
|
|
124
|
-
*
|
|
125
|
-
* An app can call this endpoint up to 100,000 times per month for each site.
|
|
126
|
-
*
|
|
127
|
-
* 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.
|
|
128
|
-
* Call the Notify endpoint with this ID as `notificationTemplateID` to trigger notifications based on the notification template.
|
|
129
|
-
* If the notification template contains placeholders for dynamic values, provide those values as key-value pairs in the `dynamicValues` array.
|
|
130
|
-
* The values you specify are incorporated seamlessly in the notifications sent out.
|
|
131
|
-
* @param notificationTemplateId - Notification template ID. A notification template specifies the text and recipients for notifications.
|
|
132
|
-
* 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.
|
|
133
|
-
* @public
|
|
134
|
-
* @documentationMaturity preview
|
|
135
|
-
* @requiredField notificationTemplateId
|
|
136
|
-
* @permissionScope Manage Notifications
|
|
137
|
-
* @applicableIdentity APP
|
|
138
|
-
*/
|
|
139
|
-
export declare function notify(notificationTemplateId: string, options?: NotifyOptions): Promise<NotifyResponse>;
|
|
140
|
-
export interface NotifyOptions {
|
|
141
|
-
/**
|
|
142
|
-
* 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).
|
|
143
|
-
* The value is an object containing the text to replace the placeholder in the notifications.
|
|
144
|
-
*/
|
|
145
|
-
dynamicValues?: Record<string, DynamicValue>;
|
|
146
|
-
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.notify = exports.TemplateChannel = exports.__debug = void 0;
|
|
36
|
-
const velo_1 = require("@wix/metro-runtime/velo");
|
|
37
|
-
const ambassadorWixPingNotificationsV3Notification = __importStar(require("./ping-notifications-v3-notification.http"));
|
|
38
|
-
let __verbose = false;
|
|
39
|
-
function __log(...args) {
|
|
40
|
-
__verbose && console.log(...args);
|
|
41
|
-
}
|
|
42
|
-
function __inspect(obj) {
|
|
43
|
-
return obj;
|
|
44
|
-
}
|
|
45
|
-
exports.__debug = {
|
|
46
|
-
verboseLogging: {
|
|
47
|
-
on: () => (__verbose = true),
|
|
48
|
-
off: () => (__verbose = false),
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
const _toVeloEntity = '$';
|
|
52
|
-
const _fromVeloEntity = '$';
|
|
53
|
-
var TemplateChannel;
|
|
54
|
-
(function (TemplateChannel) {
|
|
55
|
-
TemplateChannel["WEB_FEED"] = "WEB_FEED";
|
|
56
|
-
TemplateChannel["MOBILE_FEED"] = "MOBILE_FEED";
|
|
57
|
-
TemplateChannel["MOBILE_PUSH"] = "MOBILE_PUSH";
|
|
58
|
-
TemplateChannel["BROWSER"] = "BROWSER";
|
|
59
|
-
TemplateChannel["SMS"] = "SMS";
|
|
60
|
-
TemplateChannel["EMAIL"] = "EMAIL";
|
|
61
|
-
TemplateChannel["KAFKA"] = "KAFKA";
|
|
62
|
-
TemplateChannel["VOICE"] = "VOICE";
|
|
63
|
-
})(TemplateChannel || (exports.TemplateChannel = TemplateChannel = {}));
|
|
64
|
-
const _arrayDynamicValue = { items: '_dynamicValue' };
|
|
65
|
-
const _dynamicValue = { map: '_mapDynamicValue', array: '_arrayDynamicValue' };
|
|
66
|
-
const _mapDynamicValue = { items: 'Map#_dynamicValue' };
|
|
67
|
-
const _notifyRequest = { dynamicValues: 'Map#_dynamicValue' };
|
|
68
|
-
const _notifyResponse = {};
|
|
69
|
-
/**
|
|
70
|
-
* Sends notifications based on the template and dynamic values provided.
|
|
71
|
-
*
|
|
72
|
-
* > This feature is not yet available to all users.
|
|
73
|
-
*
|
|
74
|
-
* An app can call this endpoint up to 100,000 times per month for each site.
|
|
75
|
-
*
|
|
76
|
-
* 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.
|
|
77
|
-
* Call the Notify endpoint with this ID as `notificationTemplateID` to trigger notifications based on the notification template.
|
|
78
|
-
* If the notification template contains placeholders for dynamic values, provide those values as key-value pairs in the `dynamicValues` array.
|
|
79
|
-
* The values you specify are incorporated seamlessly in the notifications sent out.
|
|
80
|
-
* @param notificationTemplateId - Notification template ID. A notification template specifies the text and recipients for notifications.
|
|
81
|
-
* 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.
|
|
82
|
-
* @public
|
|
83
|
-
* @documentationMaturity preview
|
|
84
|
-
* @requiredField notificationTemplateId
|
|
85
|
-
* @permissionScope Manage Notifications
|
|
86
|
-
* @applicableIdentity APP
|
|
87
|
-
*/
|
|
88
|
-
function notify(notificationTemplateId, options) {
|
|
89
|
-
var _a, _b, _c;
|
|
90
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
91
|
-
const requestTransformation = {
|
|
92
|
-
notificationTemplateId: '$[0]',
|
|
93
|
-
dynamicValues: '$[1].dynamicValues',
|
|
94
|
-
};
|
|
95
|
-
const responseTransformation = '$';
|
|
96
|
-
// @ts-ignore
|
|
97
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
98
|
-
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
99
|
-
rootSchema: _notifyRequest,
|
|
100
|
-
depSchemas: { _arrayDynamicValue, _dynamicValue, _mapDynamicValue },
|
|
101
|
-
fqdnTransformation: {
|
|
102
|
-
paths: [],
|
|
103
|
-
transformation: _fromVeloEntity,
|
|
104
|
-
},
|
|
105
|
-
customTransformation: requestTransformation,
|
|
106
|
-
});
|
|
107
|
-
const { fromJSON } = (0, velo_1.serializer)({
|
|
108
|
-
rootSchema: _notifyResponse,
|
|
109
|
-
depSchemas: {},
|
|
110
|
-
fqdnTransformation: {
|
|
111
|
-
paths: [],
|
|
112
|
-
transformation: _toVeloEntity,
|
|
113
|
-
},
|
|
114
|
-
customTransformation: responseTransformation,
|
|
115
|
-
});
|
|
116
|
-
const payload = toAmbassadorRequest([notificationTemplateId, options]);
|
|
117
|
-
const reqOpts = ambassadorWixPingNotificationsV3Notification.notify(payload);
|
|
118
|
-
__log(`"Notify" sending request with: ${__inspect(reqOpts)}`);
|
|
119
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
120
|
-
try {
|
|
121
|
-
const result = yield httpClient.request(reqOpts);
|
|
122
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
123
|
-
return fromJSON(result.data);
|
|
124
|
-
}
|
|
125
|
-
catch (err) {
|
|
126
|
-
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
127
|
-
'notificationTemplateId',
|
|
128
|
-
'options',
|
|
129
|
-
]);
|
|
130
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
131
|
-
throw transformedError;
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
exports.notify = notify;
|
|
136
|
-
//# sourceMappingURL=ping-notifications-v3-notification.universal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ping-notifications-v3-notification.universal.js","sourceRoot":"","sources":["../../../src/ping-notifications-v3-notification.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,wHAA0G;AAE1G,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AA0F5B,IAAY,eASX;AATD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,8CAA2B,CAAA;IAC3B,8CAA2B,CAAA;IAC3B,sCAAmB,CAAA;IACnB,8BAAW,CAAA;IACX,kCAAe,CAAA;IACf,kCAAe,CAAA;IACf,kCAAe,CAAA;AACjB,CAAC,EATW,eAAe,+BAAf,eAAe,QAS1B;AAkCD,MAAM,kBAAkB,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;AACtD,MAAM,aAAa,GAAG,EAAE,GAAG,EAAE,kBAAkB,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;AAC/E,MAAM,gBAAgB,GAAG,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC;AACxD,MAAM,cAAc,GAAG,EAAE,aAAa,EAAE,mBAAmB,EAAE,CAAC;AAC9D,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAsB,MAAM,CAC1B,sBAA8B,EAC9B,OAAuB;;;QAEvB,MAAM,qBAAqB,GAAG;YAC5B,sBAAsB,EAAE,MAAM;YAC9B,aAAa,EAAE,oBAAoB;SACpC,CAAC;QACF,MAAM,sBAAsB,GAAG,GAAG,CAAC;QAEnC,aAAa;QACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;QAEF,MAAM,EAAE,mBAAmB,EAAE,GAAG,IAAA,iBAAU,EAAC;YACzC,UAAU,EAAE,cAAc;YAC1B,UAAU,EAAE,EAAE,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,EAAE;YACnE,kBAAkB,EAAE;gBAClB,KAAK,EAAE,EAAE;gBACT,cAAc,EAAE,eAAe;aAChC;YACD,oBAAoB,EAAE,qBAAqB;SAC5C,CAAC,CAAC;QAEH,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,iBAAU,EAAC;YAC9B,UAAU,EAAE,eAAe;YAC3B,UAAU,EAAE,EAAE;YACd,kBAAkB,EAAE;gBAClB,KAAK,EAAE,EAAE;gBACT,cAAc,EAAE,aAAa;aAC9B;YACD,oBAAoB,EAAE,sBAAsB;SAC7C,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,mBAAmB,CAAC,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC,CAAC;QAEvE,MAAM,OAAO,GAAG,4CAA4C,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAE7E,KAAK,CAAC,kCAAkC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAE9D,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,2DAAI,CAAC;QAC5B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,4DAAG,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;QACtC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,wBAAwB;gBACxB,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,4DAAG,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;QACzB,CAAC;;CACF;AAzDD,wBAyDC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export * as contacts from './src/contacts-v4-contact.universal';
|
|
2
|
-
export * as extendedFields from './src/contacts-v4-extended-field.universal';
|
|
3
|
-
export * as labels from './src/contacts-v4-label.universal';
|
|
4
|
-
export * as submittedContact from './src/contacts-v4-submit-contact.universal';
|
|
5
|
-
export * as tasks from './src/crm-tasks-v2-task.universal';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * as contacts from './src/contacts-v4-contact.universal';
|
|
2
|
-
export * as extendedFields from './src/contacts-v4-extended-field.universal';
|
|
3
|
-
export * as labels from './src/contacts-v4-label.universal';
|
|
4
|
-
export * as submittedContact from './src/contacts-v4-submit-contact.universal';
|
|
5
|
-
export * as tasks from './src/crm-tasks-v2-task.universal';
|
|
6
|
-
//# sourceMappingURL=index.typings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,qCAAqC,CAAC;AAChE,OAAO,KAAK,cAAc,MAAM,4CAA4C,CAAC;AAC7E,OAAO,KAAK,MAAM,MAAM,mCAAmC,CAAC;AAC5D,OAAO,KAAK,gBAAgB,MAAM,4CAA4C,CAAC;AAC/E,OAAO,KAAK,KAAK,MAAM,mCAAmC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createContact as publicCreateContact, updateContact as publicUpdateContact, mergeContacts as publicMergeContacts, deleteContact as publicDeleteContact, labelContact as publicLabelContact, unlabelContact as publicUnlabelContact, getContact as publicGetContact } from './contacts-v4-contact.public';
|
|
2
|
-
import { BuildRESTFunction } from '@wix/sdk-types';
|
|
3
|
-
export declare const createContact: BuildRESTFunction<typeof publicCreateContact>;
|
|
4
|
-
export declare const updateContact: BuildRESTFunction<typeof publicUpdateContact>;
|
|
5
|
-
export declare const mergeContacts: BuildRESTFunction<typeof publicMergeContacts>;
|
|
6
|
-
export declare const deleteContact: BuildRESTFunction<typeof publicDeleteContact>;
|
|
7
|
-
export declare const labelContact: BuildRESTFunction<typeof publicLabelContact>;
|
|
8
|
-
export declare const unlabelContact: BuildRESTFunction<typeof publicUnlabelContact>;
|
|
9
|
-
export declare const getContact: BuildRESTFunction<typeof publicGetContact>;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { createContact as publicCreateContact, updateContact as publicUpdateContact, mergeContacts as publicMergeContacts, deleteContact as publicDeleteContact, labelContact as publicLabelContact, unlabelContact as publicUnlabelContact, getContact as publicGetContact, } from './contacts-v4-contact.public';
|
|
2
|
-
export const createContact = (...args) => {
|
|
3
|
-
// @ts-expect-error
|
|
4
|
-
if (!globalThis.__wix_context__) {
|
|
5
|
-
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
6
|
-
}
|
|
7
|
-
// @ts-expect-error
|
|
8
|
-
return globalThis.__wix_context__
|
|
9
|
-
.initWixModules(publicCreateContact)
|
|
10
|
-
.apply(undefined, args);
|
|
11
|
-
};
|
|
12
|
-
export const updateContact = (...args) => {
|
|
13
|
-
// @ts-expect-error
|
|
14
|
-
if (!globalThis.__wix_context__) {
|
|
15
|
-
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
16
|
-
}
|
|
17
|
-
// @ts-expect-error
|
|
18
|
-
return globalThis.__wix_context__
|
|
19
|
-
.initWixModules(publicUpdateContact)
|
|
20
|
-
.apply(undefined, args);
|
|
21
|
-
};
|
|
22
|
-
export const mergeContacts = (...args) => {
|
|
23
|
-
// @ts-expect-error
|
|
24
|
-
if (!globalThis.__wix_context__) {
|
|
25
|
-
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
26
|
-
}
|
|
27
|
-
// @ts-expect-error
|
|
28
|
-
return globalThis.__wix_context__
|
|
29
|
-
.initWixModules(publicMergeContacts)
|
|
30
|
-
.apply(undefined, args);
|
|
31
|
-
};
|
|
32
|
-
export const deleteContact = (...args) => {
|
|
33
|
-
// @ts-expect-error
|
|
34
|
-
if (!globalThis.__wix_context__) {
|
|
35
|
-
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
36
|
-
}
|
|
37
|
-
// @ts-expect-error
|
|
38
|
-
return globalThis.__wix_context__
|
|
39
|
-
.initWixModules(publicDeleteContact)
|
|
40
|
-
.apply(undefined, args);
|
|
41
|
-
};
|
|
42
|
-
export const labelContact = (...args) => {
|
|
43
|
-
// @ts-expect-error
|
|
44
|
-
if (!globalThis.__wix_context__) {
|
|
45
|
-
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
46
|
-
}
|
|
47
|
-
// @ts-expect-error
|
|
48
|
-
return globalThis.__wix_context__
|
|
49
|
-
.initWixModules(publicLabelContact)
|
|
50
|
-
.apply(undefined, args);
|
|
51
|
-
};
|
|
52
|
-
export const unlabelContact = (...args) => {
|
|
53
|
-
// @ts-expect-error
|
|
54
|
-
if (!globalThis.__wix_context__) {
|
|
55
|
-
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
56
|
-
}
|
|
57
|
-
// @ts-expect-error
|
|
58
|
-
return globalThis.__wix_context__
|
|
59
|
-
.initWixModules(publicUnlabelContact)
|
|
60
|
-
.apply(undefined, args);
|
|
61
|
-
};
|
|
62
|
-
export const getContact = (...args) => {
|
|
63
|
-
// @ts-expect-error
|
|
64
|
-
if (!globalThis.__wix_context__) {
|
|
65
|
-
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
66
|
-
}
|
|
67
|
-
// @ts-expect-error
|
|
68
|
-
return globalThis.__wix_context__
|
|
69
|
-
.initWixModules(publicGetContact)
|
|
70
|
-
.apply(undefined, args);
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=contacts-v4-contact.context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contacts-v4-contact.context.js","sourceRoot":"","sources":["../../../src/contacts-v4-contact.context.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
import { CreateContactRequest, CreateContactResponse, DeleteContactRequest, DeleteContactResponse, GetContactRequest, GetContactResponse, LabelContactRequest, LabelContactResponse, MergeContactsRequest, MergeContactsResponse, UnlabelContactRequest, UnlabelContactResponse, UpdateContactRequest, UpdateContactResponse, CreateContactResponseNonNullableFields, UpdateContactResponseNonNullableFields, MergeContactsResponseNonNullableFields, LabelContactResponseNonNullableFields, UnlabelContactResponseNonNullableFields, GetContactResponseNonNullableFields } from './contacts-v4-contact.types';
|
|
3
|
-
/**
|
|
4
|
-
* Creates a new contact.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* The `createContact()` function returns a Promise
|
|
8
|
-
* that resolves to the new contact when it is created.
|
|
9
|
-
*
|
|
10
|
-
* The `info` parameter object must include a name, phone number, or email address.
|
|
11
|
-
* If all 3 of these parameters are missing,
|
|
12
|
-
* the contact won't be created.
|
|
13
|
-
*
|
|
14
|
-
* By default, if the call contains an email already in use by another contact, the new contact won't be created. To override this behavior, set `allowDuplicates` in the `options` object to `true`.
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
export declare function createContact(payload: CreateContactRequest): RequestOptionsFactory<CreateContactResponse & CreateContactResponseNonNullableFields>;
|
|
18
|
-
/**
|
|
19
|
-
* Updates a contact's properties.
|
|
20
|
-
*
|
|
21
|
-
* The `updateContact()` function returns a Promise that resolves
|
|
22
|
-
* when the specified contact's information is updated.
|
|
23
|
-
*
|
|
24
|
-
* Each time the contact is updated, `revision` increments by 1. The existing `revision` must be included when updating the contact. This ensures you're working with the latest contact information, and prevents unintended overwrites.
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
export declare function updateContact(payload: UpdateContactRequest): RequestOptionsFactory<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
28
|
-
/**
|
|
29
|
-
* Merges source contacts into a target contact.
|
|
30
|
-
*
|
|
31
|
-
* Merging contacts has these effects on the target contact:
|
|
32
|
-
*
|
|
33
|
-
* - No target contact data is overwritten or deleted.
|
|
34
|
-
* - Arrays (emails, phones, addresses, and labels) are merged from the source contacts into the target contact.
|
|
35
|
-
* - If merging more than one source contact, the 1st source is given precedence, then the 2nd, and so on.
|
|
36
|
-
*
|
|
37
|
-
* Source contacts are deleted when merging.
|
|
38
|
-
* However, if a source contact is a site member or collaborator,
|
|
39
|
-
* the `mergeContacts()` function fails because site collaborators and members can't be deleted.
|
|
40
|
-
* Site members and collaborators can only be target contacts.
|
|
41
|
-
*
|
|
42
|
-
* After merging, if you call the `getContact()` function with a deleted source contact ID, the target contact ID is returned. This is only supported when calling `getContact()`. Previously deleted source contact IDs can't be passed in any other function.
|
|
43
|
-
*
|
|
44
|
-
*/
|
|
45
|
-
export declare function mergeContacts(payload: MergeContactsRequest): RequestOptionsFactory<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
|
|
46
|
-
/**
|
|
47
|
-
* Deletes a contact who is not a site member or contributor.
|
|
48
|
-
*
|
|
49
|
-
* The `deleteContact()` function returns a Promise
|
|
50
|
-
* that resolves when the specified contact is deleted.
|
|
51
|
-
*
|
|
52
|
-
* Deleting a contact permanently removes them from your Contact List.
|
|
53
|
-
*
|
|
54
|
-
* If the contact is also a site member,
|
|
55
|
-
* the member must be deleted first,
|
|
56
|
-
* and then the contact can be deleted.
|
|
57
|
-
*
|
|
58
|
-
*/
|
|
59
|
-
export declare function deleteContact(payload: DeleteContactRequest): RequestOptionsFactory<DeleteContactResponse>;
|
|
60
|
-
/**
|
|
61
|
-
* Adds labels to a contact.
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* The `labelContact()` function returns a Promise
|
|
65
|
-
* that resolves when the specified labels are added to the contact.
|
|
66
|
-
* - **To create new labels:** Use `findOrCreateLabel()`.
|
|
67
|
-
* - **To find labels:** Use `findOrCreateLabel()`, `getLabel()`, or `queryLabels()`.
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
export declare function labelContact(payload: LabelContactRequest): RequestOptionsFactory<LabelContactResponse & LabelContactResponseNonNullableFields>;
|
|
71
|
-
/**
|
|
72
|
-
* Removes labels from a contact.
|
|
73
|
-
*
|
|
74
|
-
* The `unlabelContact()` function returns a Promise
|
|
75
|
-
* that resolves when the specified labels are removed from the contact.
|
|
76
|
-
*
|
|
77
|
-
* If a label is no longer needed and you want to remove it from all contacts, you can remove it with the Labels `deleteLabel()` function.
|
|
78
|
-
*
|
|
79
|
-
*/
|
|
80
|
-
export declare function unlabelContact(payload: UnlabelContactRequest): RequestOptionsFactory<UnlabelContactResponse & UnlabelContactResponseNonNullableFields>;
|
|
81
|
-
/**
|
|
82
|
-
* Retrieves a contact.
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* The `getContact()` function returns a Promise
|
|
86
|
-
* that resolves when the contact is found.
|
|
87
|
-
*
|
|
88
|
-
* #### Getting Merged Contacts
|
|
89
|
-
* When a source contact is merged into a target contact, the source contact is deleted. When calling `getContact()` for a merged contact,
|
|
90
|
-
* you can use the source or target contact ID. In both cases, the target contact is returned.
|
|
91
|
-
*
|
|
92
|
-
* This is supported only when calling `getContact()`on merged contacts. Previously deleted source contact IDs can't be passed to any other function.
|
|
93
|
-
*
|
|
94
|
-
*/
|
|
95
|
-
export declare function getContact(payload: GetContactRequest): RequestOptionsFactory<GetContactResponse & GetContactResponseNonNullableFields>;
|