@wix/notifications 1.0.12 → 1.0.14
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/index.d.ts +1 -1
- package/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +24 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.http.d.ts +13 -0
- package/build/cjs/src/{ping-notifications-v3-notification.http.js → ping-notifications-v1-public-notification.http.js} +15 -24
- package/build/cjs/src/ping-notifications-v1-public-notification.http.js.map +1 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.public.d.ts +8 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.public.js +16 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.public.js.map +1 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.types.d.ts +77 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.types.js +28 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.types.js.map +1 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.universal.d.ts +155 -0
- package/build/cjs/src/{ping-notifications-v3-notification.universal.js → ping-notifications-v1-public-notification.universal.js} +64 -41
- package/build/cjs/src/ping-notifications-v1-public-notification.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -1
- package/build/es/index.js +1 -1
- package/build/es/index.js.map +1 -1
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/src/ping-notifications-v1-public-notification.http.d.ts +13 -0
- package/build/es/src/ping-notifications-v1-public-notification.http.js +74 -0
- package/build/es/src/ping-notifications-v1-public-notification.http.js.map +1 -0
- package/build/es/src/ping-notifications-v1-public-notification.public.d.ts +8 -0
- package/build/es/src/ping-notifications-v1-public-notification.public.js +9 -0
- package/build/es/src/ping-notifications-v1-public-notification.public.js.map +1 -0
- package/build/es/src/ping-notifications-v1-public-notification.types.d.ts +77 -0
- package/build/es/src/ping-notifications-v1-public-notification.types.js +25 -0
- package/build/es/src/ping-notifications-v1-public-notification.types.js.map +1 -0
- package/build/es/src/ping-notifications-v1-public-notification.universal.d.ts +155 -0
- package/build/es/src/ping-notifications-v1-public-notification.universal.js +132 -0
- package/build/es/src/ping-notifications-v1-public-notification.universal.js.map +1 -0
- package/package.json +4 -4
- package/build/cjs/src/ping-notifications-v3-notification.http.d.ts +0 -15
- 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.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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
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
|
+
*/
|
|
13
|
+
export declare function notify(payload: PublicNotifyRequest): RequestOptionsFactory<Empty>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { serializer } from '@wix/metro-runtime/ambassador';
|
|
2
|
+
import { resolveUrl } from '@wix/metro-runtime';
|
|
3
|
+
const _empty = {};
|
|
4
|
+
const _publicNotifyRequest = {};
|
|
5
|
+
function resolveComWixpressPingHubApiPublicNotificationsServiceUrl(opts) {
|
|
6
|
+
const domainToMappings = {
|
|
7
|
+
'api._api_base_domain_': [
|
|
8
|
+
{
|
|
9
|
+
srcPath: '/notifications-hub-server',
|
|
10
|
+
destPath: '',
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
'www._base_domain_': [
|
|
14
|
+
{
|
|
15
|
+
srcPath: '/_api/ping/hub',
|
|
16
|
+
destPath: '',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
srcPath: '/_api/ping/notifications',
|
|
20
|
+
destPath: '',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
'manage._base_domain_': [
|
|
24
|
+
{
|
|
25
|
+
srcPath: '/_api/ping/hub',
|
|
26
|
+
destPath: '',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
srcPath: '/_api/ping/notifications',
|
|
30
|
+
destPath: '',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
'www.wixapis.com': [
|
|
34
|
+
{
|
|
35
|
+
srcPath: '/notifications/v3/notify',
|
|
36
|
+
destPath: '/v3/notify',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
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
|
+
*/
|
|
52
|
+
export function notify(payload) {
|
|
53
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_publicNotifyRequest, {});
|
|
54
|
+
const { fromJSON: fromRes } = serializer(_empty, {});
|
|
55
|
+
function __notify({ host }) {
|
|
56
|
+
const serializedData = toReq(payload);
|
|
57
|
+
const metadata = {
|
|
58
|
+
entityFqdn: 'wix.ping.notifications.v1.public_notification',
|
|
59
|
+
method: 'POST',
|
|
60
|
+
methodFqn: 'com.wixpress.ping.hub.api.PublicNotificationsService.Notify',
|
|
61
|
+
url: resolveComWixpressPingHubApiPublicNotificationsServiceUrl({
|
|
62
|
+
protoPath: '/api/v1/notify',
|
|
63
|
+
data: serializedData,
|
|
64
|
+
host,
|
|
65
|
+
}),
|
|
66
|
+
data: serializedData,
|
|
67
|
+
transformResponse: fromRes,
|
|
68
|
+
};
|
|
69
|
+
return metadata;
|
|
70
|
+
}
|
|
71
|
+
__notify.fromReq = fromReq;
|
|
72
|
+
return __notify;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=ping-notifications-v1-public-notification.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.http.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-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ACtC,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,8 @@
|
|
|
1
|
+
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { Channel, NotifyOptions } from './ping-notifications-v1-public-notification.universal';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function notify(httpClient: HttpClient): (body: string | null, channels: Channel[], options?: NotifyOptions | undefined) => Promise<void>;
|
|
7
|
+
export { Role, Channel, DashboardPages, } from './ping-notifications-v1-public-notification.universal';
|
|
8
|
+
export { Public_notification, PublicNotifyRequest, PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf, ToSiteContributors, ToContacts, ToTopicsSubscribers, Empty, NotifyOptions, } from './ping-notifications-v1-public-notification.universal';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { notify as universalNotify, } from './ping-notifications-v1-public-notification.universal';
|
|
2
|
+
export const __metadata = { PACKAGE_NAME: '@wix/notifications' };
|
|
3
|
+
export function notify(httpClient) {
|
|
4
|
+
return (body, channels, options) => universalNotify(body, channels, options,
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
{ httpClient });
|
|
7
|
+
}
|
|
8
|
+
export { Role, Channel, DashboardPages, } from './ping-notifications-v1-public-notification.universal';
|
|
9
|
+
//# sourceMappingURL=ping-notifications-v1-public-notification.public.js.map
|
|
@@ -0,0 +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,EAEL,MAAM,IAAI,eAAe,GAE1B,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"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export interface Public_notification {
|
|
2
|
+
/** id */
|
|
3
|
+
id?: string | null;
|
|
4
|
+
}
|
|
5
|
+
export interface PublicNotifyRequest extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
|
|
6
|
+
/** Send to site contributors */
|
|
7
|
+
toSiteContributors?: ToSiteContributors;
|
|
8
|
+
/** Send to contacts */
|
|
9
|
+
toContacts?: ToContacts;
|
|
10
|
+
/** Send to topic subscribers */
|
|
11
|
+
toTopicsSubscribers?: ToTopicsSubscribers;
|
|
12
|
+
/** an open url as an action target */
|
|
13
|
+
targetUrl?: string | null;
|
|
14
|
+
/** target_dashboard_page */
|
|
15
|
+
targetDashboardPage?: DashboardPages;
|
|
16
|
+
/** The title of the notification */
|
|
17
|
+
title?: string | null;
|
|
18
|
+
/** The body of the notification */
|
|
19
|
+
body?: string | null;
|
|
20
|
+
/** The Action of the notification */
|
|
21
|
+
action?: string | null;
|
|
22
|
+
/** The channel to which send the notification */
|
|
23
|
+
channels?: Channel[];
|
|
24
|
+
}
|
|
25
|
+
/** @oneof */
|
|
26
|
+
export interface PublicNotifyRequestRecipientsFilterOneOf {
|
|
27
|
+
/** Send to site contributors */
|
|
28
|
+
toSiteContributors?: ToSiteContributors;
|
|
29
|
+
/** Send to contacts */
|
|
30
|
+
toContacts?: ToContacts;
|
|
31
|
+
/** Send to topic subscribers */
|
|
32
|
+
toTopicsSubscribers?: ToTopicsSubscribers;
|
|
33
|
+
}
|
|
34
|
+
/** @oneof */
|
|
35
|
+
export interface PublicNotifyRequestActionTargetOneOf {
|
|
36
|
+
/** an open url as an action target */
|
|
37
|
+
targetUrl?: string | null;
|
|
38
|
+
/** target_dashboard_page */
|
|
39
|
+
targetDashboardPage?: DashboardPages;
|
|
40
|
+
}
|
|
41
|
+
export interface ToSiteContributors {
|
|
42
|
+
/** with_role */
|
|
43
|
+
withRole?: Role;
|
|
44
|
+
}
|
|
45
|
+
export declare enum Role {
|
|
46
|
+
/** All contributors with any role */
|
|
47
|
+
All_Contributors = "All_Contributors",
|
|
48
|
+
/** Only the owner */
|
|
49
|
+
Owner = "Owner"
|
|
50
|
+
}
|
|
51
|
+
export interface ToContacts {
|
|
52
|
+
/** contact_ids */
|
|
53
|
+
contactIds?: string[];
|
|
54
|
+
}
|
|
55
|
+
export interface ToTopicsSubscribers {
|
|
56
|
+
/** topics */
|
|
57
|
+
topics?: string[];
|
|
58
|
+
/** excluded_contact_ids */
|
|
59
|
+
excludedContactIds?: string[];
|
|
60
|
+
}
|
|
61
|
+
export declare enum Channel {
|
|
62
|
+
/** No Default Channel - need to expilicitly decide on channel */
|
|
63
|
+
Undefined = "Undefined",
|
|
64
|
+
/** The widget inside Wix */
|
|
65
|
+
Dashboard = "Dashboard",
|
|
66
|
+
/** Mobile push to WixApp */
|
|
67
|
+
Mobile = "Mobile",
|
|
68
|
+
/** Browser push to the active browser (Chrome/Safari only) */
|
|
69
|
+
Browser = "Browser"
|
|
70
|
+
}
|
|
71
|
+
export declare enum DashboardPages {
|
|
72
|
+
Undefined_Page = "Undefined_Page",
|
|
73
|
+
/** goes to business manager home */
|
|
74
|
+
Home = "Home"
|
|
75
|
+
}
|
|
76
|
+
export interface Empty {
|
|
77
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export var Role;
|
|
2
|
+
(function (Role) {
|
|
3
|
+
/** All contributors with any role */
|
|
4
|
+
Role["All_Contributors"] = "All_Contributors";
|
|
5
|
+
/** Only the owner */
|
|
6
|
+
Role["Owner"] = "Owner";
|
|
7
|
+
})(Role || (Role = {}));
|
|
8
|
+
export var Channel;
|
|
9
|
+
(function (Channel) {
|
|
10
|
+
/** No Default Channel - need to expilicitly decide on channel */
|
|
11
|
+
Channel["Undefined"] = "Undefined";
|
|
12
|
+
/** The widget inside Wix */
|
|
13
|
+
Channel["Dashboard"] = "Dashboard";
|
|
14
|
+
/** Mobile push to WixApp */
|
|
15
|
+
Channel["Mobile"] = "Mobile";
|
|
16
|
+
/** Browser push to the active browser (Chrome/Safari only) */
|
|
17
|
+
Channel["Browser"] = "Browser";
|
|
18
|
+
})(Channel || (Channel = {}));
|
|
19
|
+
export var DashboardPages;
|
|
20
|
+
(function (DashboardPages) {
|
|
21
|
+
DashboardPages["Undefined_Page"] = "Undefined_Page";
|
|
22
|
+
/** goes to business manager home */
|
|
23
|
+
DashboardPages["Home"] = "Home";
|
|
24
|
+
})(DashboardPages || (DashboardPages = {}));
|
|
25
|
+
//# sourceMappingURL=ping-notifications-v1-public-notification.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.types.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.types.ts"],"names":[],"mappings":"AAmDA,MAAM,CAAN,IAAY,IAKX;AALD,WAAY,IAAI;IACd,qCAAqC;IACrC,6CAAqC,CAAA;IACrC,qBAAqB;IACrB,uBAAe,CAAA;AACjB,CAAC,EALW,IAAI,KAAJ,IAAI,QAKf;AAcD,MAAM,CAAN,IAAY,OASX;AATD,WAAY,OAAO;IACjB,iEAAiE;IACjE,kCAAuB,CAAA;IACvB,4BAA4B;IAC5B,kCAAuB,CAAA;IACvB,4BAA4B;IAC5B,4BAAiB,CAAA;IACjB,8DAA8D;IAC9D,8BAAmB,CAAA;AACrB,CAAC,EATW,OAAO,KAAP,OAAO,QASlB;AAED,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,mDAAiC,CAAA;IACjC,oCAAoC;IACpC,+BAAa,CAAA;AACf,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
export declare const __debug: {
|
|
2
|
+
verboseLogging: {
|
|
3
|
+
on: () => boolean;
|
|
4
|
+
off: () => boolean;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export interface Public_notification {
|
|
8
|
+
/** id */
|
|
9
|
+
_id?: string | null;
|
|
10
|
+
}
|
|
11
|
+
export interface PublicNotifyRequest extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
|
|
12
|
+
/** List of site contributors to notify. */
|
|
13
|
+
toSiteContributors?: ToSiteContributors;
|
|
14
|
+
/** List of contacts to notify. */
|
|
15
|
+
toContacts?: ToContacts;
|
|
16
|
+
/** Notify contacts who are subscribed to specific topics. */
|
|
17
|
+
toTopicsSubscribers?: ToTopicsSubscribers;
|
|
18
|
+
/** URL to navigate to when the `action` text is clicked. */
|
|
19
|
+
targetUrl?: string | null;
|
|
20
|
+
/** URL of Dashboard page to navigate to when the `action` text is clicked. */
|
|
21
|
+
targetDashboardPage?: DashboardPages;
|
|
22
|
+
/**
|
|
23
|
+
* Notification title. Only displayed on mobile and browser notifications.
|
|
24
|
+
*
|
|
25
|
+
* Max: 512 characters
|
|
26
|
+
*/
|
|
27
|
+
title?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Contents of the notification.
|
|
30
|
+
*
|
|
31
|
+
* Max: 512 characters
|
|
32
|
+
*/
|
|
33
|
+
body?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Clickable text that links to the `targetUrl` or `targetDashboardPage`. For example, "Click this!".
|
|
36
|
+
*
|
|
37
|
+
* Max: 512 characters
|
|
38
|
+
*/
|
|
39
|
+
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
|
+
*/
|
|
47
|
+
channels?: Channel[];
|
|
48
|
+
}
|
|
49
|
+
/** @oneof */
|
|
50
|
+
export interface PublicNotifyRequestRecipientsFilterOneOf {
|
|
51
|
+
/** List of site contributors to notify. */
|
|
52
|
+
toSiteContributors?: ToSiteContributors;
|
|
53
|
+
/** List of contacts to notify. */
|
|
54
|
+
toContacts?: ToContacts;
|
|
55
|
+
/** Notify contacts who are subscribed to specific topics. */
|
|
56
|
+
toTopicsSubscribers?: ToTopicsSubscribers;
|
|
57
|
+
}
|
|
58
|
+
/** @oneof */
|
|
59
|
+
export interface PublicNotifyRequestActionTargetOneOf {
|
|
60
|
+
/** URL to navigate to when the `action` text is clicked. */
|
|
61
|
+
targetUrl?: string | null;
|
|
62
|
+
/** URL of Dashboard page to navigate to when the `action` text is clicked. */
|
|
63
|
+
targetDashboardPage?: DashboardPages;
|
|
64
|
+
}
|
|
65
|
+
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
|
+
*/
|
|
72
|
+
withRole?: Role;
|
|
73
|
+
}
|
|
74
|
+
export declare enum Role {
|
|
75
|
+
/** All contributors with any role */
|
|
76
|
+
All_Contributors = "All_Contributors",
|
|
77
|
+
/** Only the owner */
|
|
78
|
+
Owner = "Owner"
|
|
79
|
+
}
|
|
80
|
+
export interface ToContacts {
|
|
81
|
+
/** List of contact IDs. */
|
|
82
|
+
contactIds?: string[];
|
|
83
|
+
}
|
|
84
|
+
export interface ToTopicsSubscribers {
|
|
85
|
+
/** List of topics. */
|
|
86
|
+
topics?: string[];
|
|
87
|
+
/** List of contact IDs to exclude from notification. */
|
|
88
|
+
excludedContactIds?: string[];
|
|
89
|
+
}
|
|
90
|
+
export declare enum Channel {
|
|
91
|
+
/** No Default Channel - need to expilicitly decide on channel */
|
|
92
|
+
Undefined = "Undefined",
|
|
93
|
+
/** The widget inside Wix */
|
|
94
|
+
Dashboard = "Dashboard",
|
|
95
|
+
/** Mobile push to WixApp */
|
|
96
|
+
Mobile = "Mobile",
|
|
97
|
+
/** Browser push to the active browser (Chrome/Safari only) */
|
|
98
|
+
Browser = "Browser"
|
|
99
|
+
}
|
|
100
|
+
export declare enum DashboardPages {
|
|
101
|
+
Undefined_Page = "Undefined_Page",
|
|
102
|
+
/** goes to business manager home */
|
|
103
|
+
Home = "Home"
|
|
104
|
+
}
|
|
105
|
+
export interface Empty {
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Sends a notification.
|
|
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.
|
|
116
|
+
* @public
|
|
117
|
+
* @documentationMaturity preview
|
|
118
|
+
* @requiredField body
|
|
119
|
+
* @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
|
+
*/
|
|
131
|
+
export declare function notify(body: string | null, channels: Channel[], options?: NotifyOptions): Promise<void>;
|
|
132
|
+
export interface NotifyOptions extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf {
|
|
133
|
+
/** List of site contributors to notify. */
|
|
134
|
+
toSiteContributors?: ToSiteContributors;
|
|
135
|
+
/** List of contacts to notify. */
|
|
136
|
+
toContacts?: ToContacts;
|
|
137
|
+
/** Notify contacts who are subscribed to specific topics. */
|
|
138
|
+
toTopicsSubscribers?: ToTopicsSubscribers;
|
|
139
|
+
/**
|
|
140
|
+
* Notification title. Only displayed on mobile and browser notifications.
|
|
141
|
+
*
|
|
142
|
+
* Max: 512 characters
|
|
143
|
+
*/
|
|
144
|
+
title?: string | null;
|
|
145
|
+
/**
|
|
146
|
+
* Clickable text that links to the `targetUrl` or `targetDashboardPage`. For example, "Click this!".
|
|
147
|
+
*
|
|
148
|
+
* Max: 512 characters
|
|
149
|
+
*/
|
|
150
|
+
action?: string | null;
|
|
151
|
+
/** URL to navigate to when the `action` text is clicked. */
|
|
152
|
+
targetUrl?: string | null;
|
|
153
|
+
/** URL of Dashboard page to navigate to when the `action` text is clicked. */
|
|
154
|
+
targetDashboardPage?: DashboardPages;
|
|
155
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { serializer, transformError } from '@wix/metro-runtime/velo';
|
|
11
|
+
import * as ambassadorWixPingNotificationsV1PublicNotification from './ping-notifications-v1-public-notification.http';
|
|
12
|
+
let __verbose = false;
|
|
13
|
+
function __log(...args) {
|
|
14
|
+
__verbose && console.log(...args);
|
|
15
|
+
}
|
|
16
|
+
function __inspect(obj) {
|
|
17
|
+
return obj;
|
|
18
|
+
}
|
|
19
|
+
export const __debug = {
|
|
20
|
+
verboseLogging: {
|
|
21
|
+
on: () => (__verbose = true),
|
|
22
|
+
off: () => (__verbose = false),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
const _toVeloEntity = '$';
|
|
26
|
+
const _fromVeloEntity = '$';
|
|
27
|
+
export var Role;
|
|
28
|
+
(function (Role) {
|
|
29
|
+
/** All contributors with any role */
|
|
30
|
+
Role["All_Contributors"] = "All_Contributors";
|
|
31
|
+
/** Only the owner */
|
|
32
|
+
Role["Owner"] = "Owner";
|
|
33
|
+
})(Role || (Role = {}));
|
|
34
|
+
export var Channel;
|
|
35
|
+
(function (Channel) {
|
|
36
|
+
/** No Default Channel - need to expilicitly decide on channel */
|
|
37
|
+
Channel["Undefined"] = "Undefined";
|
|
38
|
+
/** The widget inside Wix */
|
|
39
|
+
Channel["Dashboard"] = "Dashboard";
|
|
40
|
+
/** Mobile push to WixApp */
|
|
41
|
+
Channel["Mobile"] = "Mobile";
|
|
42
|
+
/** Browser push to the active browser (Chrome/Safari only) */
|
|
43
|
+
Channel["Browser"] = "Browser";
|
|
44
|
+
})(Channel || (Channel = {}));
|
|
45
|
+
export var DashboardPages;
|
|
46
|
+
(function (DashboardPages) {
|
|
47
|
+
DashboardPages["Undefined_Page"] = "Undefined_Page";
|
|
48
|
+
/** goes to business manager home */
|
|
49
|
+
DashboardPages["Home"] = "Home";
|
|
50
|
+
})(DashboardPages || (DashboardPages = {}));
|
|
51
|
+
const _empty = {};
|
|
52
|
+
const _publicNotifyRequest = {};
|
|
53
|
+
/**
|
|
54
|
+
* Sends a notification.
|
|
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.
|
|
62
|
+
* @public
|
|
63
|
+
* @documentationMaturity preview
|
|
64
|
+
* @requiredField body
|
|
65
|
+
* @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
|
+
*/
|
|
77
|
+
export function notify(body, channels, options) {
|
|
78
|
+
var _a, _b, _c;
|
|
79
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
80
|
+
const requestTransformation = {
|
|
81
|
+
body: '$[0]',
|
|
82
|
+
channels: '$[1]',
|
|
83
|
+
toSiteContributors: '$[2].toSiteContributors',
|
|
84
|
+
toContacts: '$[2].toContacts',
|
|
85
|
+
toTopicsSubscribers: '$[2].toTopicsSubscribers',
|
|
86
|
+
title: '$[2].title',
|
|
87
|
+
action: '$[2].action',
|
|
88
|
+
targetUrl: '$[2].targetUrl',
|
|
89
|
+
targetDashboardPage: '$[2].targetDashboardPage',
|
|
90
|
+
};
|
|
91
|
+
const responseTransformation = '$';
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
94
|
+
const { toAmbassadorRequest } = serializer({
|
|
95
|
+
rootSchema: _publicNotifyRequest,
|
|
96
|
+
depSchemas: {},
|
|
97
|
+
fqdnTransformation: {
|
|
98
|
+
paths: [],
|
|
99
|
+
transformation: _fromVeloEntity,
|
|
100
|
+
},
|
|
101
|
+
customTransformation: requestTransformation,
|
|
102
|
+
});
|
|
103
|
+
const { fromJSON } = serializer({
|
|
104
|
+
rootSchema: _empty,
|
|
105
|
+
depSchemas: {},
|
|
106
|
+
fqdnTransformation: {
|
|
107
|
+
paths: [],
|
|
108
|
+
transformation: _toVeloEntity,
|
|
109
|
+
},
|
|
110
|
+
customTransformation: responseTransformation,
|
|
111
|
+
});
|
|
112
|
+
const payload = toAmbassadorRequest([body, channels, options]);
|
|
113
|
+
const reqOpts = ambassadorWixPingNotificationsV1PublicNotification.notify(payload);
|
|
114
|
+
__log(`"Notify" sending request with: ${__inspect(reqOpts)}`);
|
|
115
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
116
|
+
try {
|
|
117
|
+
const result = yield httpClient.request(reqOpts);
|
|
118
|
+
(_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
|
+
}
|
|
121
|
+
catch (err) {
|
|
122
|
+
const transformedError = transformError(err, requestTransformation, [
|
|
123
|
+
'body',
|
|
124
|
+
'channels',
|
|
125
|
+
'options',
|
|
126
|
+
]);
|
|
127
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
128
|
+
throw transformedError;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=ping-notifications-v1-public-notification.universal.js.map
|
|
@@ -0,0 +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;AA4E5B,MAAM,CAAN,IAAY,IAKX;AALD,WAAY,IAAI;IACd,qCAAqC;IACrC,6CAAqC,CAAA;IACrC,qBAAqB;IACrB,uBAAe,CAAA;AACjB,CAAC,EALW,IAAI,KAAJ,IAAI,QAKf;AAcD,MAAM,CAAN,IAAY,OASX;AATD,WAAY,OAAO;IACjB,iEAAiE;IACjE,kCAAuB,CAAA;IACvB,4BAA4B;IAC5B,kCAAuB,CAAA;IACvB,4BAA4B;IAC5B,4BAAiB,CAAA;IACjB,8DAA8D;IAC9D,8BAAmB,CAAA;AACrB,CAAC,EATW,OAAO,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AAC,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;QAE/D,MAAM,OAAO,GACX,kDAAkD,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAErE,KAAK,CAAC,kCAAkC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAE9D,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,+CAAvB,WAAW,CAAgB,CAAC;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;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;SACrC;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.14",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@wix/metro-runtime": "^1.0.0",
|
|
18
|
-
"@wix/
|
|
19
|
-
"@wix/
|
|
18
|
+
"@wix/sdk-types": "^1.0.0",
|
|
19
|
+
"@wix/motion-edm-autogen-query-wrapper": "^1.0.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@wix/typescript-to-service-json": "^1.0.0"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"groupId": "com.wixpress.public-sdk-autogen"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"falconPackageHash": "
|
|
36
|
+
"falconPackageHash": "f901c572d66a1dd32299e56c0774e7466bc8c347c760ad40831e3f15"
|
|
37
37
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
import { NotifyRequest, NotifyResponse } from './ping-notifications-v3-notification.types';
|
|
3
|
-
/**
|
|
4
|
-
* Sends notifications based on the template and dynamic values provided.
|
|
5
|
-
*
|
|
6
|
-
* > This feature is not yet available to all users.
|
|
7
|
-
*
|
|
8
|
-
* An app can call this endpoint up to 100,000 times per month for each site.
|
|
9
|
-
*
|
|
10
|
-
* 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.
|
|
11
|
-
* Call the Notify endpoint with this ID as `notificationTemplateID` to trigger notifications based on the notification template.
|
|
12
|
-
* If the notification template contains placeholders for dynamic values, provide those values as key-value pairs in the `dynamicValues` array.
|
|
13
|
-
* The values you specify are incorporated seamlessly in the notifications sent out.
|
|
14
|
-
*/
|
|
15
|
-
export declare function notify(payload: NotifyRequest): RequestOptionsFactory<NotifyResponse>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ping-notifications-v3-notification.http.js","sourceRoot":"","sources":["../../../src/ping-notifications-v3-notification.http.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAC3D,sDAAgD;AAQhD,MAAM,kBAAkB,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;AACtD,MAAM,aAAa,GAAG,EAAE,GAAG,EAAE,kBAAkB,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;AAC/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AAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,wCAAwC;YACpD,MAAM,EAAE,MAAa;YACrB,SAAS,EAAE,4DAA4D;YACvE,GAAG,EAAE,uDAAuD,CAAC;gBAC3D,SAAS,EAAE,YAAY;gBACvB,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;AA/BD,wBA+BC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import { NotifyOptions } from './ping-notifications-v3-notification.universal';
|
|
3
|
-
export declare const __metadata: {
|
|
4
|
-
PACKAGE_NAME: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function notify(httpClient: HttpClient): (notificationTemplateId: string, options?: NotifyOptions | undefined) => Promise<import("./ping-notifications-v3-notification.universal").NotifyResponse>;
|
|
7
|
-
export { TemplateChannel } from './ping-notifications-v3-notification.universal';
|
|
8
|
-
export { Notification, NotifyRequest, DynamicValue, DynamicValueOfTypeOneOf, Money, MapDynamicValue, ArrayDynamicValue, AttachmentDynamicValue, NotifyResponse, NotifyByAppRequest, Overrides, ExcludedAudiences, ChannelsContent, MobileContent, ChannelsData, EmailData, NotifyByAppResponse, NotifyOptions, } from './ping-notifications-v3-notification.universal';
|
|
@@ -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/notifications' };
|
|
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,oBAAoB,EAAE,CAAC;AAEjE,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"}
|