@wix/notifications 1.0.18 → 1.0.19
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/meta.d.ts +1 -0
- package/build/cjs/meta.js +24 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.http.d.ts +1 -10
- package/build/cjs/src/ping-notifications-v1-public-notification.http.js +1 -10
- package/build/cjs/src/ping-notifications-v1-public-notification.http.js.map +1 -1
- package/build/cjs/src/ping-notifications-v1-public-notification.meta.d.ts +13 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.meta.js +43 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.meta.js.map +1 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.universal.d.ts +28 -74
- package/build/cjs/src/ping-notifications-v1-public-notification.universal.js +3 -19
- package/build/cjs/src/ping-notifications-v1-public-notification.universal.js.map +1 -1
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/src/ping-notifications-v1-public-notification.http.d.ts +1 -10
- package/build/es/src/ping-notifications-v1-public-notification.http.js +1 -10
- package/build/es/src/ping-notifications-v1-public-notification.http.js.map +1 -1
- package/build/es/src/ping-notifications-v1-public-notification.meta.d.ts +13 -0
- package/build/es/src/ping-notifications-v1-public-notification.meta.js +20 -0
- package/build/es/src/ping-notifications-v1-public-notification.meta.js.map +1 -0
- package/build/es/src/ping-notifications-v1-public-notification.public.js.map +1 -1
- package/build/es/src/ping-notifications-v1-public-notification.universal.d.ts +28 -74
- package/build/es/src/ping-notifications-v1-public-notification.universal.js +3 -19
- package/build/es/src/ping-notifications-v1-public-notification.universal.js.map +1 -1
- package/meta/package.json +6 -0
- package/package.json +4 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as notifications from './src/ping-notifications-v1-public-notification.meta';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.notifications = void 0;
|
|
23
|
+
exports.notifications = __importStar(require("./src/ping-notifications-v1-public-notification.meta"));
|
|
24
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,sGAAsF"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
2
|
import { PublicNotifyRequest, Empty } from './ping-notifications-v1-public-notification.types';
|
|
3
|
-
/**
|
|
4
|
-
* Sends a notification.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* The `notify()` function sends a [notification](https://support.wix.com/en/article/about-your-dashboard-notifications) to the specified recipients on the specified channels.
|
|
8
|
-
*
|
|
9
|
-
* List the the channels for the notification in the `channels` parameter .
|
|
10
|
-
*
|
|
11
|
-
* List the recipients for the notification in the `toContacts`, `toSiteContributors`, and `toTopicsSubscribers` parameters.
|
|
12
|
-
*/
|
|
3
|
+
/** This endpoint allows you to send notifications */
|
|
13
4
|
export declare function notify(payload: PublicNotifyRequest): RequestOptionsFactory<Empty>;
|
|
@@ -42,16 +42,7 @@ function resolveComWixpressPingHubApiPublicNotificationsServiceUrl(opts) {
|
|
|
42
42
|
};
|
|
43
43
|
return (0, metro_runtime_1.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
44
44
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Sends a notification.
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* The `notify()` function sends a [notification](https://support.wix.com/en/article/about-your-dashboard-notifications) to the specified recipients on the specified channels.
|
|
50
|
-
*
|
|
51
|
-
* List the the channels for the notification in the `channels` parameter .
|
|
52
|
-
*
|
|
53
|
-
* List the recipients for the notification in the `toContacts`, `toSiteContributors`, and `toTopicsSubscribers` parameters.
|
|
54
|
-
*/
|
|
45
|
+
/** This endpoint allows you to send notifications */
|
|
55
46
|
function notify(payload) {
|
|
56
47
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_publicNotifyRequest, {});
|
|
57
48
|
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_empty, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ping-notifications-v1-public-notification.http.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.http.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAC3D,sDAAgD;AAQhD,MAAM,MAAM,GAAG,EAAE,CAAC;AAClB,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,SAAS,yDAAyD,CAChE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,gBAAgB;gBACzB,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,gBAAgB;gBACzB,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,YAAY;aACvB;SACF;KACF,CAAC;IAEF,OAAO,IAAA,0BAAU,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.http.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.http.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAC3D,sDAAgD;AAQhD,MAAM,MAAM,GAAG,EAAE,CAAC;AAClB,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,SAAS,yDAAyD,CAChE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,gBAAgB;gBACzB,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,gBAAgB;gBACzB,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,YAAY;aACvB;SACF;KACF,CAAC;IAEF,OAAO,IAAA,0BAAU,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,qDAAqD;AACrD,SAAgB,MAAM,CACpB,OAA4B;IAE5B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAU,EACrD,oBAAoB,EACpB,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAU,EAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAErD,SAAS,QAAQ,CAAC,EAAE,IAAI,EAAO;QAC7B,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,+CAA+C;YAC3D,MAAM,EAAE,MAAa;YACrB,SAAS,EAAE,6DAA6D;YACxE,GAAG,EAAE,yDAAyD,CAAC;gBAC7D,SAAS,EAAE,gBAAgB;gBAC3B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;IAE3B,OAAO,QAAQ,CAAC;AAClB,CAAC;AA9BD,wBA8BC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as ambassadorWixPingNotificationsV1PublicNotificationTypes from './ping-notifications-v1-public-notification.types';
|
|
2
|
+
import * as ambassadorWixPingNotificationsV1PublicNotificationUniversalTypes from './ping-notifications-v1-public-notification.universal';
|
|
3
|
+
export declare type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4
|
+
getUrl: (context: any) => string;
|
|
5
|
+
httpMethod: K;
|
|
6
|
+
path: string;
|
|
7
|
+
pathParams: M;
|
|
8
|
+
__requestType: T;
|
|
9
|
+
__originalRequestType: S;
|
|
10
|
+
__responseType: Q;
|
|
11
|
+
__originalResponseType: R;
|
|
12
|
+
};
|
|
13
|
+
export declare function notify(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixPingNotificationsV1PublicNotificationUniversalTypes.PublicNotifyRequest, ambassadorWixPingNotificationsV1PublicNotificationTypes.PublicNotifyRequest, ambassadorWixPingNotificationsV1PublicNotificationUniversalTypes.Empty, ambassadorWixPingNotificationsV1PublicNotificationTypes.Empty>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.notify = void 0;
|
|
23
|
+
const ambassadorWixPingNotificationsV1PublicNotification = __importStar(require("./ping-notifications-v1-public-notification.http"));
|
|
24
|
+
function notify() {
|
|
25
|
+
const payload = {};
|
|
26
|
+
const getRequestOptions = ambassadorWixPingNotificationsV1PublicNotification.notify(payload);
|
|
27
|
+
const getUrl = (context) => {
|
|
28
|
+
const { url } = getRequestOptions(context);
|
|
29
|
+
return url;
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
getUrl,
|
|
33
|
+
httpMethod: 'POST',
|
|
34
|
+
path: '/api/v1/notify',
|
|
35
|
+
pathParams: {},
|
|
36
|
+
__requestType: null,
|
|
37
|
+
__originalRequestType: null,
|
|
38
|
+
__responseType: null,
|
|
39
|
+
__originalResponseType: null,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
exports.notify = notify;
|
|
43
|
+
//# sourceMappingURL=ping-notifications-v1-public-notification.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.meta.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qIAAuH;AAsBvH,SAAgB,MAAM;IAQpB,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,kDAAkD,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAErE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,wBA4BC"}
|
|
@@ -9,66 +9,43 @@ export interface Public_notification {
|
|
|
9
9
|
_id?: string | null;
|
|
10
10
|
}
|
|
11
11
|
export interface PublicNotifyRequest extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
|
|
12
|
-
/**
|
|
12
|
+
/** Send to site contributors */
|
|
13
13
|
toSiteContributors?: ToSiteContributors;
|
|
14
|
-
/**
|
|
14
|
+
/** Send to contacts */
|
|
15
15
|
toContacts?: ToContacts;
|
|
16
|
-
/**
|
|
16
|
+
/** Send to topic subscribers */
|
|
17
17
|
toTopicsSubscribers?: ToTopicsSubscribers;
|
|
18
|
-
/**
|
|
18
|
+
/** an open url as an action target */
|
|
19
19
|
targetUrl?: string | null;
|
|
20
|
-
/**
|
|
20
|
+
/** target_dashboard_page */
|
|
21
21
|
targetDashboardPage?: DashboardPages;
|
|
22
|
-
/**
|
|
23
|
-
* Notification title. Only displayed on mobile and browser notifications.
|
|
24
|
-
*
|
|
25
|
-
* Max: 512 characters
|
|
26
|
-
*/
|
|
22
|
+
/** The title of the notification */
|
|
27
23
|
title?: string | null;
|
|
28
|
-
/**
|
|
29
|
-
* Contents of the notification.
|
|
30
|
-
*
|
|
31
|
-
* Max: 512 characters
|
|
32
|
-
*/
|
|
24
|
+
/** The body of the notification */
|
|
33
25
|
body?: string | null;
|
|
34
|
-
/**
|
|
35
|
-
* Clickable text that links to the `targetUrl` or `targetDashboardPage`. For example, "Click this!".
|
|
36
|
-
*
|
|
37
|
-
* Max: 512 characters
|
|
38
|
-
*/
|
|
26
|
+
/** The Action of the notification */
|
|
39
27
|
action?: string | null;
|
|
40
|
-
/**
|
|
41
|
-
* The channels to send the notification on. One or more of:
|
|
42
|
-
*
|
|
43
|
-
* - `"Mobile"`: Sends the notification to the Wix App.
|
|
44
|
-
* - `"Dashboard"`: Sends the notification to the contributor's Wix Dashboard.
|
|
45
|
-
* - `"Browser"`: Sends the notification to the contributor's browser.
|
|
46
|
-
*/
|
|
28
|
+
/** The channel to which send the notification */
|
|
47
29
|
channels?: Channel[];
|
|
48
30
|
}
|
|
49
31
|
/** @oneof */
|
|
50
32
|
export interface PublicNotifyRequestRecipientsFilterOneOf {
|
|
51
|
-
/**
|
|
33
|
+
/** Send to site contributors */
|
|
52
34
|
toSiteContributors?: ToSiteContributors;
|
|
53
|
-
/**
|
|
35
|
+
/** Send to contacts */
|
|
54
36
|
toContacts?: ToContacts;
|
|
55
|
-
/**
|
|
37
|
+
/** Send to topic subscribers */
|
|
56
38
|
toTopicsSubscribers?: ToTopicsSubscribers;
|
|
57
39
|
}
|
|
58
40
|
/** @oneof */
|
|
59
41
|
export interface PublicNotifyRequestActionTargetOneOf {
|
|
60
|
-
/**
|
|
42
|
+
/** an open url as an action target */
|
|
61
43
|
targetUrl?: string | null;
|
|
62
|
-
/**
|
|
44
|
+
/** target_dashboard_page */
|
|
63
45
|
targetDashboardPage?: DashboardPages;
|
|
64
46
|
}
|
|
65
47
|
export interface ToSiteContributors {
|
|
66
|
-
/**
|
|
67
|
-
* Roles to receive the notification. One of:
|
|
68
|
-
*
|
|
69
|
-
* - `"All_Contributors"`: All site contributors (default).
|
|
70
|
-
* - `"Owner"`: Only the site owner.
|
|
71
|
-
*/
|
|
48
|
+
/** with_role */
|
|
72
49
|
withRole?: Role;
|
|
73
50
|
}
|
|
74
51
|
export declare enum Role {
|
|
@@ -78,13 +55,13 @@ export declare enum Role {
|
|
|
78
55
|
Owner = "Owner"
|
|
79
56
|
}
|
|
80
57
|
export interface ToContacts {
|
|
81
|
-
/**
|
|
58
|
+
/** contact_ids */
|
|
82
59
|
contactIds?: string[];
|
|
83
60
|
}
|
|
84
61
|
export interface ToTopicsSubscribers {
|
|
85
|
-
/**
|
|
62
|
+
/** topics */
|
|
86
63
|
topics?: string[];
|
|
87
|
-
/**
|
|
64
|
+
/** excluded_contact_ids */
|
|
88
65
|
excludedContactIds?: string[];
|
|
89
66
|
}
|
|
90
67
|
export declare enum Channel {
|
|
@@ -105,51 +82,28 @@ export declare enum DashboardPages {
|
|
|
105
82
|
export interface Empty {
|
|
106
83
|
}
|
|
107
84
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* The `notify()` function sends a [notification](https://support.wix.com/en/article/about-your-dashboard-notifications) to the specified recipients on the specified channels.
|
|
112
|
-
*
|
|
113
|
-
* List the the channels for the notification in the `channels` parameter .
|
|
114
|
-
*
|
|
115
|
-
* List the recipients for the notification in the `toContacts`, `toSiteContributors`, and `toTopicsSubscribers` parameters.
|
|
85
|
+
* This endpoint allows you to send notifications
|
|
86
|
+
* @param body - The body of the notification
|
|
87
|
+
* @param channels - The channel to which send the notification
|
|
116
88
|
* @public
|
|
117
89
|
* @documentationMaturity preview
|
|
118
90
|
* @requiredField body
|
|
119
91
|
* @requiredField channels
|
|
120
|
-
* @param options - Notification options.
|
|
121
|
-
* @param body - The body of the notification.
|
|
122
|
-
*
|
|
123
|
-
* Max: 512 characters
|
|
124
|
-
* @param channels - The channels to send the notification on. One or more of:
|
|
125
|
-
*
|
|
126
|
-
* - `"Mobile"`: Sends the notification to the Wix App.
|
|
127
|
-
* - `"Dashboard"`: Sends the notification to the contributor's Wix Dashboard.
|
|
128
|
-
* - `"Browser"`: Sends the notification to the contributor's browser.
|
|
129
|
-
* @returns Fulfilled when the send notification request is received.
|
|
130
92
|
*/
|
|
131
93
|
export declare function notify(body: string | null, channels: Channel[], options?: NotifyOptions): Promise<void>;
|
|
132
94
|
export interface NotifyOptions extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
|
|
133
|
-
/**
|
|
95
|
+
/** Send to site contributors */
|
|
134
96
|
toSiteContributors?: ToSiteContributors;
|
|
135
|
-
/**
|
|
97
|
+
/** Send to contacts */
|
|
136
98
|
toContacts?: ToContacts;
|
|
137
|
-
/**
|
|
99
|
+
/** Send to topic subscribers */
|
|
138
100
|
toTopicsSubscribers?: ToTopicsSubscribers;
|
|
139
|
-
/**
|
|
140
|
-
* Notification title. Only displayed on mobile and browser notifications.
|
|
141
|
-
*
|
|
142
|
-
* Max: 512 characters
|
|
143
|
-
*/
|
|
101
|
+
/** The title of the notification */
|
|
144
102
|
title?: string | null;
|
|
145
|
-
/**
|
|
146
|
-
* Clickable text that links to the `targetUrl` or `targetDashboardPage`. For example, "Click this!".
|
|
147
|
-
*
|
|
148
|
-
* Max: 512 characters
|
|
149
|
-
*/
|
|
103
|
+
/** The Action of the notification */
|
|
150
104
|
action?: string | null;
|
|
151
|
-
/**
|
|
105
|
+
/** an open url as an action target */
|
|
152
106
|
targetUrl?: string | null;
|
|
153
|
-
/**
|
|
107
|
+
/** target_dashboard_page */
|
|
154
108
|
targetDashboardPage?: DashboardPages;
|
|
155
109
|
}
|
|
@@ -73,28 +73,13 @@ var DashboardPages;
|
|
|
73
73
|
const _empty = {};
|
|
74
74
|
const _publicNotifyRequest = {};
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* The `notify()` function sends a [notification](https://support.wix.com/en/article/about-your-dashboard-notifications) to the specified recipients on the specified channels.
|
|
80
|
-
*
|
|
81
|
-
* List the the channels for the notification in the `channels` parameter .
|
|
82
|
-
*
|
|
83
|
-
* List the recipients for the notification in the `toContacts`, `toSiteContributors`, and `toTopicsSubscribers` parameters.
|
|
76
|
+
* This endpoint allows you to send notifications
|
|
77
|
+
* @param body - The body of the notification
|
|
78
|
+
* @param channels - The channel to which send the notification
|
|
84
79
|
* @public
|
|
85
80
|
* @documentationMaturity preview
|
|
86
81
|
* @requiredField body
|
|
87
82
|
* @requiredField channels
|
|
88
|
-
* @param options - Notification options.
|
|
89
|
-
* @param body - The body of the notification.
|
|
90
|
-
*
|
|
91
|
-
* Max: 512 characters
|
|
92
|
-
* @param channels - The channels to send the notification on. One or more of:
|
|
93
|
-
*
|
|
94
|
-
* - `"Mobile"`: Sends the notification to the Wix App.
|
|
95
|
-
* - `"Dashboard"`: Sends the notification to the contributor's Wix Dashboard.
|
|
96
|
-
* - `"Browser"`: Sends the notification to the contributor's browser.
|
|
97
|
-
* @returns Fulfilled when the send notification request is received.
|
|
98
83
|
*/
|
|
99
84
|
function notify(body, channels, options) {
|
|
100
85
|
var _a, _b, _c;
|
|
@@ -138,7 +123,6 @@ function notify(body, channels, options) {
|
|
|
138
123
|
try {
|
|
139
124
|
const result = yield httpClient.request(reqOpts);
|
|
140
125
|
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
141
|
-
return fromJSON(result.data);
|
|
142
126
|
}
|
|
143
127
|
catch (err) {
|
|
144
128
|
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ping-notifications-v1-public-notification.universal.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,qIAAuH;AAEvH,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;
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.universal.js","sourceRoot":"","sources":["../../../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AC;QAC5B,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;SAClC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,MAAM;gBACN,UAAU;gBACV,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF;AAjED,wBAiEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as notifications from './src/ping-notifications-v1-public-notification.meta';
|
package/build/es/meta.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,sDAAsD,CAAC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
2
|
import { PublicNotifyRequest, Empty } from './ping-notifications-v1-public-notification.types';
|
|
3
|
-
/**
|
|
4
|
-
* Sends a notification.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* The `notify()` function sends a [notification](https://support.wix.com/en/article/about-your-dashboard-notifications) to the specified recipients on the specified channels.
|
|
8
|
-
*
|
|
9
|
-
* List the the channels for the notification in the `channels` parameter .
|
|
10
|
-
*
|
|
11
|
-
* List the recipients for the notification in the `toContacts`, `toSiteContributors`, and `toTopicsSubscribers` parameters.
|
|
12
|
-
*/
|
|
3
|
+
/** This endpoint allows you to send notifications */
|
|
13
4
|
export declare function notify(payload: PublicNotifyRequest): RequestOptionsFactory<Empty>;
|
|
@@ -39,16 +39,7 @@ function resolveComWixpressPingHubApiPublicNotificationsServiceUrl(opts) {
|
|
|
39
39
|
};
|
|
40
40
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
41
41
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Sends a notification.
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* The `notify()` function sends a [notification](https://support.wix.com/en/article/about-your-dashboard-notifications) to the specified recipients on the specified channels.
|
|
47
|
-
*
|
|
48
|
-
* List the the channels for the notification in the `channels` parameter .
|
|
49
|
-
*
|
|
50
|
-
* List the recipients for the notification in the `toContacts`, `toSiteContributors`, and `toTopicsSubscribers` parameters.
|
|
51
|
-
*/
|
|
42
|
+
/** This endpoint allows you to send notifications */
|
|
52
43
|
export function notify(payload) {
|
|
53
44
|
const { toJSON: toReq, fromJSON: fromReq } = serializer(_publicNotifyRequest, {});
|
|
54
45
|
const { fromJSON: fromRes } = serializer(_empty, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ping-notifications-v1-public-notification.http.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAQhD,MAAM,MAAM,GAAG,EAAE,CAAC;AAClB,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,SAAS,yDAAyD,CAChE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,gBAAgB;gBACzB,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,gBAAgB;gBACzB,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,YAAY;aACvB;SACF;KACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.http.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAQhD,MAAM,MAAM,GAAG,EAAE,CAAC;AAClB,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,SAAS,yDAAyD,CAChE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,gBAAgB;gBACzB,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,gBAAgB;gBACzB,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,YAAY;aACvB;SACF;KACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,MAAM,CACpB,OAA4B;IAE5B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CACrD,oBAAoB,EACpB,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAErD,SAAS,QAAQ,CAAC,EAAE,IAAI,EAAO;QAC7B,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,+CAA+C;YAC3D,MAAM,EAAE,MAAa;YACrB,SAAS,EAAE,6DAA6D;YACxE,GAAG,EAAE,yDAAyD,CAAC;gBAC7D,SAAS,EAAE,gBAAgB;gBAC3B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;IAE3B,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as ambassadorWixPingNotificationsV1PublicNotificationTypes from './ping-notifications-v1-public-notification.types';
|
|
2
|
+
import * as ambassadorWixPingNotificationsV1PublicNotificationUniversalTypes from './ping-notifications-v1-public-notification.universal';
|
|
3
|
+
export declare type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4
|
+
getUrl: (context: any) => string;
|
|
5
|
+
httpMethod: K;
|
|
6
|
+
path: string;
|
|
7
|
+
pathParams: M;
|
|
8
|
+
__requestType: T;
|
|
9
|
+
__originalRequestType: S;
|
|
10
|
+
__responseType: Q;
|
|
11
|
+
__originalResponseType: R;
|
|
12
|
+
};
|
|
13
|
+
export declare function notify(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixPingNotificationsV1PublicNotificationUniversalTypes.PublicNotifyRequest, ambassadorWixPingNotificationsV1PublicNotificationTypes.PublicNotifyRequest, ambassadorWixPingNotificationsV1PublicNotificationUniversalTypes.Empty, ambassadorWixPingNotificationsV1PublicNotificationTypes.Empty>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as ambassadorWixPingNotificationsV1PublicNotification from './ping-notifications-v1-public-notification.http';
|
|
2
|
+
export function notify() {
|
|
3
|
+
const payload = {};
|
|
4
|
+
const getRequestOptions = ambassadorWixPingNotificationsV1PublicNotification.notify(payload);
|
|
5
|
+
const getUrl = (context) => {
|
|
6
|
+
const { url } = getRequestOptions(context);
|
|
7
|
+
return url;
|
|
8
|
+
};
|
|
9
|
+
return {
|
|
10
|
+
getUrl,
|
|
11
|
+
httpMethod: 'POST',
|
|
12
|
+
path: '/api/v1/notify',
|
|
13
|
+
pathParams: {},
|
|
14
|
+
__requestType: null,
|
|
15
|
+
__originalRequestType: null,
|
|
16
|
+
__responseType: null,
|
|
17
|
+
__originalResponseType: null,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ping-notifications-v1-public-notification.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.meta.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kDAAkD,MAAM,kDAAkD,CAAC;AAsBvH,MAAM,UAAU,MAAM;IAQpB,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,kDAAkD,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAErE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ping-notifications-v1-public-notification.public.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.public.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.public.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.public.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,MAAM,IAAI,eAAe,GAC1B,MAAM,uDAAuD,CAAC;AAE/D,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC;AAEjE,MAAM,UAAU,MAAM,CAAC,UAAsB;IAC3C,OAAO,CAAC,IAAmB,EAAE,QAAmB,EAAE,OAAuB,EAAE,EAAE,CAC3E,eAAe,CACb,IAAI,EACJ,QAAQ,EACR,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EACL,IAAI,EACJ,OAAO,EACP,cAAc,GACf,MAAM,uDAAuD,CAAC"}
|
|
@@ -9,66 +9,43 @@ export interface Public_notification {
|
|
|
9
9
|
_id?: string | null;
|
|
10
10
|
}
|
|
11
11
|
export interface PublicNotifyRequest extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
|
|
12
|
-
/**
|
|
12
|
+
/** Send to site contributors */
|
|
13
13
|
toSiteContributors?: ToSiteContributors;
|
|
14
|
-
/**
|
|
14
|
+
/** Send to contacts */
|
|
15
15
|
toContacts?: ToContacts;
|
|
16
|
-
/**
|
|
16
|
+
/** Send to topic subscribers */
|
|
17
17
|
toTopicsSubscribers?: ToTopicsSubscribers;
|
|
18
|
-
/**
|
|
18
|
+
/** an open url as an action target */
|
|
19
19
|
targetUrl?: string | null;
|
|
20
|
-
/**
|
|
20
|
+
/** target_dashboard_page */
|
|
21
21
|
targetDashboardPage?: DashboardPages;
|
|
22
|
-
/**
|
|
23
|
-
* Notification title. Only displayed on mobile and browser notifications.
|
|
24
|
-
*
|
|
25
|
-
* Max: 512 characters
|
|
26
|
-
*/
|
|
22
|
+
/** The title of the notification */
|
|
27
23
|
title?: string | null;
|
|
28
|
-
/**
|
|
29
|
-
* Contents of the notification.
|
|
30
|
-
*
|
|
31
|
-
* Max: 512 characters
|
|
32
|
-
*/
|
|
24
|
+
/** The body of the notification */
|
|
33
25
|
body?: string | null;
|
|
34
|
-
/**
|
|
35
|
-
* Clickable text that links to the `targetUrl` or `targetDashboardPage`. For example, "Click this!".
|
|
36
|
-
*
|
|
37
|
-
* Max: 512 characters
|
|
38
|
-
*/
|
|
26
|
+
/** The Action of the notification */
|
|
39
27
|
action?: string | null;
|
|
40
|
-
/**
|
|
41
|
-
* The channels to send the notification on. One or more of:
|
|
42
|
-
*
|
|
43
|
-
* - `"Mobile"`: Sends the notification to the Wix App.
|
|
44
|
-
* - `"Dashboard"`: Sends the notification to the contributor's Wix Dashboard.
|
|
45
|
-
* - `"Browser"`: Sends the notification to the contributor's browser.
|
|
46
|
-
*/
|
|
28
|
+
/** The channel to which send the notification */
|
|
47
29
|
channels?: Channel[];
|
|
48
30
|
}
|
|
49
31
|
/** @oneof */
|
|
50
32
|
export interface PublicNotifyRequestRecipientsFilterOneOf {
|
|
51
|
-
/**
|
|
33
|
+
/** Send to site contributors */
|
|
52
34
|
toSiteContributors?: ToSiteContributors;
|
|
53
|
-
/**
|
|
35
|
+
/** Send to contacts */
|
|
54
36
|
toContacts?: ToContacts;
|
|
55
|
-
/**
|
|
37
|
+
/** Send to topic subscribers */
|
|
56
38
|
toTopicsSubscribers?: ToTopicsSubscribers;
|
|
57
39
|
}
|
|
58
40
|
/** @oneof */
|
|
59
41
|
export interface PublicNotifyRequestActionTargetOneOf {
|
|
60
|
-
/**
|
|
42
|
+
/** an open url as an action target */
|
|
61
43
|
targetUrl?: string | null;
|
|
62
|
-
/**
|
|
44
|
+
/** target_dashboard_page */
|
|
63
45
|
targetDashboardPage?: DashboardPages;
|
|
64
46
|
}
|
|
65
47
|
export interface ToSiteContributors {
|
|
66
|
-
/**
|
|
67
|
-
* Roles to receive the notification. One of:
|
|
68
|
-
*
|
|
69
|
-
* - `"All_Contributors"`: All site contributors (default).
|
|
70
|
-
* - `"Owner"`: Only the site owner.
|
|
71
|
-
*/
|
|
48
|
+
/** with_role */
|
|
72
49
|
withRole?: Role;
|
|
73
50
|
}
|
|
74
51
|
export declare enum Role {
|
|
@@ -78,13 +55,13 @@ export declare enum Role {
|
|
|
78
55
|
Owner = "Owner"
|
|
79
56
|
}
|
|
80
57
|
export interface ToContacts {
|
|
81
|
-
/**
|
|
58
|
+
/** contact_ids */
|
|
82
59
|
contactIds?: string[];
|
|
83
60
|
}
|
|
84
61
|
export interface ToTopicsSubscribers {
|
|
85
|
-
/**
|
|
62
|
+
/** topics */
|
|
86
63
|
topics?: string[];
|
|
87
|
-
/**
|
|
64
|
+
/** excluded_contact_ids */
|
|
88
65
|
excludedContactIds?: string[];
|
|
89
66
|
}
|
|
90
67
|
export declare enum Channel {
|
|
@@ -105,51 +82,28 @@ export declare enum DashboardPages {
|
|
|
105
82
|
export interface Empty {
|
|
106
83
|
}
|
|
107
84
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* The `notify()` function sends a [notification](https://support.wix.com/en/article/about-your-dashboard-notifications) to the specified recipients on the specified channels.
|
|
112
|
-
*
|
|
113
|
-
* List the the channels for the notification in the `channels` parameter .
|
|
114
|
-
*
|
|
115
|
-
* List the recipients for the notification in the `toContacts`, `toSiteContributors`, and `toTopicsSubscribers` parameters.
|
|
85
|
+
* This endpoint allows you to send notifications
|
|
86
|
+
* @param body - The body of the notification
|
|
87
|
+
* @param channels - The channel to which send the notification
|
|
116
88
|
* @public
|
|
117
89
|
* @documentationMaturity preview
|
|
118
90
|
* @requiredField body
|
|
119
91
|
* @requiredField channels
|
|
120
|
-
* @param options - Notification options.
|
|
121
|
-
* @param body - The body of the notification.
|
|
122
|
-
*
|
|
123
|
-
* Max: 512 characters
|
|
124
|
-
* @param channels - The channels to send the notification on. One or more of:
|
|
125
|
-
*
|
|
126
|
-
* - `"Mobile"`: Sends the notification to the Wix App.
|
|
127
|
-
* - `"Dashboard"`: Sends the notification to the contributor's Wix Dashboard.
|
|
128
|
-
* - `"Browser"`: Sends the notification to the contributor's browser.
|
|
129
|
-
* @returns Fulfilled when the send notification request is received.
|
|
130
92
|
*/
|
|
131
93
|
export declare function notify(body: string | null, channels: Channel[], options?: NotifyOptions): Promise<void>;
|
|
132
94
|
export interface NotifyOptions extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
|
|
133
|
-
/**
|
|
95
|
+
/** Send to site contributors */
|
|
134
96
|
toSiteContributors?: ToSiteContributors;
|
|
135
|
-
/**
|
|
97
|
+
/** Send to contacts */
|
|
136
98
|
toContacts?: ToContacts;
|
|
137
|
-
/**
|
|
99
|
+
/** Send to topic subscribers */
|
|
138
100
|
toTopicsSubscribers?: ToTopicsSubscribers;
|
|
139
|
-
/**
|
|
140
|
-
* Notification title. Only displayed on mobile and browser notifications.
|
|
141
|
-
*
|
|
142
|
-
* Max: 512 characters
|
|
143
|
-
*/
|
|
101
|
+
/** The title of the notification */
|
|
144
102
|
title?: string | null;
|
|
145
|
-
/**
|
|
146
|
-
* Clickable text that links to the `targetUrl` or `targetDashboardPage`. For example, "Click this!".
|
|
147
|
-
*
|
|
148
|
-
* Max: 512 characters
|
|
149
|
-
*/
|
|
103
|
+
/** The Action of the notification */
|
|
150
104
|
action?: string | null;
|
|
151
|
-
/**
|
|
105
|
+
/** an open url as an action target */
|
|
152
106
|
targetUrl?: string | null;
|
|
153
|
-
/**
|
|
107
|
+
/** target_dashboard_page */
|
|
154
108
|
targetDashboardPage?: DashboardPages;
|
|
155
109
|
}
|
|
@@ -51,28 +51,13 @@ export var DashboardPages;
|
|
|
51
51
|
const _empty = {};
|
|
52
52
|
const _publicNotifyRequest = {};
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* The `notify()` function sends a [notification](https://support.wix.com/en/article/about-your-dashboard-notifications) to the specified recipients on the specified channels.
|
|
58
|
-
*
|
|
59
|
-
* List the the channels for the notification in the `channels` parameter .
|
|
60
|
-
*
|
|
61
|
-
* List the recipients for the notification in the `toContacts`, `toSiteContributors`, and `toTopicsSubscribers` parameters.
|
|
54
|
+
* This endpoint allows you to send notifications
|
|
55
|
+
* @param body - The body of the notification
|
|
56
|
+
* @param channels - The channel to which send the notification
|
|
62
57
|
* @public
|
|
63
58
|
* @documentationMaturity preview
|
|
64
59
|
* @requiredField body
|
|
65
60
|
* @requiredField channels
|
|
66
|
-
* @param options - Notification options.
|
|
67
|
-
* @param body - The body of the notification.
|
|
68
|
-
*
|
|
69
|
-
* Max: 512 characters
|
|
70
|
-
* @param channels - The channels to send the notification on. One or more of:
|
|
71
|
-
*
|
|
72
|
-
* - `"Mobile"`: Sends the notification to the Wix App.
|
|
73
|
-
* - `"Dashboard"`: Sends the notification to the contributor's Wix Dashboard.
|
|
74
|
-
* - `"Browser"`: Sends the notification to the contributor's browser.
|
|
75
|
-
* @returns Fulfilled when the send notification request is received.
|
|
76
61
|
*/
|
|
77
62
|
export function notify(body, channels, options) {
|
|
78
63
|
var _a, _b, _c;
|
|
@@ -116,7 +101,6 @@ export function notify(body, channels, options) {
|
|
|
116
101
|
try {
|
|
117
102
|
const result = yield httpClient.request(reqOpts);
|
|
118
103
|
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
119
|
-
return fromJSON(result.data);
|
|
120
104
|
}
|
|
121
105
|
catch (err) {
|
|
122
106
|
const transformedError = transformError(err, requestTransformation, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ping-notifications-v1-public-notification.universal.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,kDAAkD,MAAM,kDAAkD,CAAC;AAEvH,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;AAED,MAAM,CAAC,MAAM,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;
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.universal.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,kDAAkD,MAAM,kDAAkD,CAAC;AAEvH,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;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AClC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,cAAc,CAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,MAAM;gBACN,UAAU;gBACV,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/notifications",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"typings": "./build/cjs/index.d.ts",
|
|
12
12
|
"files": [
|
|
13
13
|
"build",
|
|
14
|
-
"frontend/package.json"
|
|
14
|
+
"frontend/package.json",
|
|
15
|
+
"meta"
|
|
15
16
|
],
|
|
16
17
|
"dependencies": {
|
|
17
18
|
"@wix/metro-runtime": "^1.0.0",
|
|
@@ -28,5 +29,5 @@
|
|
|
28
29
|
"groupId": "com.wixpress.public-sdk-autogen"
|
|
29
30
|
}
|
|
30
31
|
},
|
|
31
|
-
"falconPackageHash": "
|
|
32
|
+
"falconPackageHash": "1cf134568a11c401bf514999b183a0c24f7a5a734896845b6aa6bf6e"
|
|
32
33
|
}
|