@wix/notifications 1.0.18 → 1.0.20
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 +1 -0
- package/build/cjs/context.js +28 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.js +5 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +5 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +28 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.context.d.ts +3 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.context.js +16 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.context.js.map +1 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.http.js +2 -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 +47 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.meta.js.map +1 -0
- package/build/cjs/src/ping-notifications-v1-public-notification.public.d.ts +1 -1
- package/build/cjs/src/ping-notifications-v1-public-notification.types.js +3 -3
- package/build/cjs/src/ping-notifications-v1-public-notification.types.js.map +1 -1
- package/build/cjs/src/ping-notifications-v1-public-notification.universal.js +24 -10
- package/build/cjs/src/ping-notifications-v1-public-notification.universal.js.map +1 -1
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +2 -0
- package/build/es/context.js.map +1 -0
- 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.context.d.ts +3 -0
- package/build/es/src/ping-notifications-v1-public-notification.context.js +12 -0
- package/build/es/src/ping-notifications-v1-public-notification.context.js.map +1 -0
- package/build/es/src/ping-notifications-v1-public-notification.http.js +2 -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.d.ts +1 -1
- package/build/es/src/ping-notifications-v1-public-notification.public.js.map +1 -1
- package/build/es/src/ping-notifications-v1-public-notification.universal.js +17 -7
- package/build/es/src/ping-notifications-v1-public-notification.universal.js.map +1 -1
- package/context/package.json +6 -0
- package/meta/package.json +6 -0
- package/package.json +13 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as notifications from './src/ping-notifications-v1-public-notification.context';
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.notifications = void 0;
|
|
27
|
+
exports.notifications = __importStar(require("./src/ping-notifications-v1-public-notification.context"));
|
|
28
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yGAAyF"}
|
package/build/cjs/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wGAAwF"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2GAA2F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as notifications from './src/ping-notifications-v1-public-notification.meta';
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.notifications = void 0;
|
|
27
|
+
exports.notifications = __importStar(require("./src/ping-notifications-v1-public-notification.meta"));
|
|
28
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sGAAsF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.notify = void 0;
|
|
4
|
+
const ping_notifications_v1_public_notification_public_1 = require("./ping-notifications-v1-public-notification.public");
|
|
5
|
+
const notify = (...args) => {
|
|
6
|
+
// @ts-expect-error
|
|
7
|
+
if (!globalThis.__wix_context__) {
|
|
8
|
+
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
9
|
+
}
|
|
10
|
+
// @ts-expect-error
|
|
11
|
+
return globalThis.__wix_context__
|
|
12
|
+
.initWixModules(ping_notifications_v1_public_notification_public_1.notify)
|
|
13
|
+
.apply(undefined, args);
|
|
14
|
+
};
|
|
15
|
+
exports.notify = notify;
|
|
16
|
+
//# sourceMappingURL=ping-notifications-v1-public-notification.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.context.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.context.ts"],"names":[],"mappings":";;;AAAA,yHAA4F;AAGrF,MAAM,MAAM,GAA2C,CAC5D,GAAG,IAAS,EACZ,EAAE;IACF,mBAAmB;IACnB,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAC;IACJ,CAAC;IACD,mBAAmB;IACnB,OAAO,UAAU,CAAC,eAAe;SAC9B,cAAc,CAAC,yDAAY,CAAC;SAC5B,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC;AAbW,QAAA,MAAM,UAajB"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.notify = void 0;
|
|
4
|
-
const ambassador_1 = require("@wix/metro-runtime/ambassador");
|
|
5
4
|
const metro_runtime_1 = require("@wix/metro-runtime");
|
|
6
|
-
const _empty = {};
|
|
7
|
-
const _publicNotifyRequest = {};
|
|
8
5
|
function resolveComWixpressPingHubApiPublicNotificationsServiceUrl(opts) {
|
|
9
6
|
const domainToMappings = {
|
|
10
7
|
'api._api_base_domain_': [
|
|
@@ -53,25 +50,20 @@ function resolveComWixpressPingHubApiPublicNotificationsServiceUrl(opts) {
|
|
|
53
50
|
* List the recipients for the notification in the `toContacts`, `toSiteContributors`, and `toTopicsSubscribers` parameters.
|
|
54
51
|
*/
|
|
55
52
|
function notify(payload) {
|
|
56
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_publicNotifyRequest, {});
|
|
57
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_empty, {});
|
|
58
53
|
function __notify({ host }) {
|
|
59
|
-
const serializedData = toReq(payload);
|
|
60
54
|
const metadata = {
|
|
61
55
|
entityFqdn: 'wix.ping.notifications.v1.public_notification',
|
|
62
56
|
method: 'POST',
|
|
63
57
|
methodFqn: 'com.wixpress.ping.hub.api.PublicNotificationsService.Notify',
|
|
64
58
|
url: resolveComWixpressPingHubApiPublicNotificationsServiceUrl({
|
|
65
59
|
protoPath: '/api/v1/notify',
|
|
66
|
-
data:
|
|
60
|
+
data: payload,
|
|
67
61
|
host,
|
|
68
62
|
}),
|
|
69
|
-
data:
|
|
70
|
-
transformResponse: fromRes,
|
|
63
|
+
data: payload,
|
|
71
64
|
};
|
|
72
65
|
return metadata;
|
|
73
66
|
}
|
|
74
|
-
__notify.fromReq = fromReq;
|
|
75
67
|
return __notify;
|
|
76
68
|
}
|
|
77
69
|
exports.notify = notify;
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.http.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.http.ts"],"names":[],"mappings":";;;AAAA,sDAAgD;AAQhD,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;;;;;;;;;GASG;AACH,SAAgB,MAAM,CACpB,OAA4B;IAE5B,SAAS,QAAQ,CAAC,EAAE,IAAI,EAAO;QAC7B,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,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AApBD,wBAoBC"}
|
|
@@ -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 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,47 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.notify = void 0;
|
|
27
|
+
const ambassadorWixPingNotificationsV1PublicNotification = __importStar(require("./ping-notifications-v1-public-notification.http"));
|
|
28
|
+
function notify() {
|
|
29
|
+
const payload = {};
|
|
30
|
+
const getRequestOptions = ambassadorWixPingNotificationsV1PublicNotification.notify(payload);
|
|
31
|
+
const getUrl = (context) => {
|
|
32
|
+
const { url } = getRequestOptions(context);
|
|
33
|
+
return url;
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
getUrl,
|
|
37
|
+
httpMethod: 'POST',
|
|
38
|
+
path: '/api/v1/notify',
|
|
39
|
+
pathParams: {},
|
|
40
|
+
__requestType: null,
|
|
41
|
+
__originalRequestType: null,
|
|
42
|
+
__responseType: null,
|
|
43
|
+
__originalResponseType: null,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.notify = notify;
|
|
47
|
+
//# 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"}
|
|
@@ -3,6 +3,6 @@ import { Channel, NotifyOptions } from './ping-notifications-v1-public-notificat
|
|
|
3
3
|
export declare const __metadata: {
|
|
4
4
|
PACKAGE_NAME: string;
|
|
5
5
|
};
|
|
6
|
-
export declare function notify(httpClient: HttpClient): (body: string | null, channels: Channel[], options?: NotifyOptions
|
|
6
|
+
export declare function notify(httpClient: HttpClient): (body: string | null, channels: Channel[], options?: NotifyOptions) => Promise<void>;
|
|
7
7
|
export { Role, Channel, DashboardPages, } from './ping-notifications-v1-public-notification.universal';
|
|
8
8
|
export { Public_notification, PublicNotifyRequest, PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf, ToSiteContributors, ToContacts, ToTopicsSubscribers, Empty, NotifyOptions, } from './ping-notifications-v1-public-notification.universal';
|
|
@@ -7,7 +7,7 @@ var Role;
|
|
|
7
7
|
Role["All_Contributors"] = "All_Contributors";
|
|
8
8
|
/** Only the owner */
|
|
9
9
|
Role["Owner"] = "Owner";
|
|
10
|
-
})(Role
|
|
10
|
+
})(Role || (exports.Role = Role = {}));
|
|
11
11
|
var Channel;
|
|
12
12
|
(function (Channel) {
|
|
13
13
|
/** No Default Channel - need to expilicitly decide on channel */
|
|
@@ -18,11 +18,11 @@ var Channel;
|
|
|
18
18
|
Channel["Mobile"] = "Mobile";
|
|
19
19
|
/** Browser push to the active browser (Chrome/Safari only) */
|
|
20
20
|
Channel["Browser"] = "Browser";
|
|
21
|
-
})(Channel
|
|
21
|
+
})(Channel || (exports.Channel = Channel = {}));
|
|
22
22
|
var DashboardPages;
|
|
23
23
|
(function (DashboardPages) {
|
|
24
24
|
DashboardPages["Undefined_Page"] = "Undefined_Page";
|
|
25
25
|
/** goes to business manager home */
|
|
26
26
|
DashboardPages["Home"] = "Home";
|
|
27
|
-
})(DashboardPages
|
|
27
|
+
})(DashboardPages || (exports.DashboardPages = DashboardPages = {}));
|
|
28
28
|
//# sourceMappingURL=ping-notifications-v1-public-notification.types.js.map
|
|
@@ -1 +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,IAAY,IAKX;AALD,WAAY,IAAI;IACd,qCAAqC;IACrC,6CAAqC,CAAA;IACrC,qBAAqB;IACrB,uBAAe,CAAA;AACjB,CAAC,EALW,IAAI,
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.types.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.types.ts"],"names":[],"mappings":";;;AAmDA,IAAY,IAKX;AALD,WAAY,IAAI;IACd,qCAAqC;IACrC,6CAAqC,CAAA;IACrC,qBAAqB;IACrB,uBAAe,CAAA;AACjB,CAAC,EALW,IAAI,oBAAJ,IAAI,QAKf;AAcD,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,uBAAP,OAAO,QASlB;AAED,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,mDAAiC,CAAA;IACjC,oCAAoC;IACpC,+BAAa,CAAA;AACf,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -30,6 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
30
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
35
|
exports.notify = exports.DashboardPages = exports.Channel = exports.Role = exports.__debug = void 0;
|
|
32
36
|
const velo_1 = require("@wix/metro-runtime/velo");
|
|
37
|
+
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
33
38
|
const ambassadorWixPingNotificationsV1PublicNotification = __importStar(require("./ping-notifications-v1-public-notification.http"));
|
|
34
39
|
let __verbose = false;
|
|
35
40
|
function __log(...args) {
|
|
@@ -52,7 +57,7 @@ var Role;
|
|
|
52
57
|
Role["All_Contributors"] = "All_Contributors";
|
|
53
58
|
/** Only the owner */
|
|
54
59
|
Role["Owner"] = "Owner";
|
|
55
|
-
})(Role
|
|
60
|
+
})(Role || (exports.Role = Role = {}));
|
|
56
61
|
var Channel;
|
|
57
62
|
(function (Channel) {
|
|
58
63
|
/** No Default Channel - need to expilicitly decide on channel */
|
|
@@ -63,13 +68,13 @@ var Channel;
|
|
|
63
68
|
Channel["Mobile"] = "Mobile";
|
|
64
69
|
/** Browser push to the active browser (Chrome/Safari only) */
|
|
65
70
|
Channel["Browser"] = "Browser";
|
|
66
|
-
})(Channel
|
|
71
|
+
})(Channel || (exports.Channel = Channel = {}));
|
|
67
72
|
var DashboardPages;
|
|
68
73
|
(function (DashboardPages) {
|
|
69
74
|
DashboardPages["Undefined_Page"] = "Undefined_Page";
|
|
70
75
|
/** goes to business manager home */
|
|
71
76
|
DashboardPages["Home"] = "Home";
|
|
72
|
-
})(DashboardPages
|
|
77
|
+
})(DashboardPages || (exports.DashboardPages = DashboardPages = {}));
|
|
73
78
|
const _empty = {};
|
|
74
79
|
const _publicNotifyRequest = {};
|
|
75
80
|
/**
|
|
@@ -138,14 +143,23 @@ function notify(body, channels, options) {
|
|
|
138
143
|
try {
|
|
139
144
|
const result = yield httpClient.request(reqOpts);
|
|
140
145
|
(_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
146
|
}
|
|
143
147
|
catch (err) {
|
|
144
|
-
const transformedError = (0,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
149
|
+
spreadPathsToArguments: {},
|
|
150
|
+
explicitPathsToArguments: {
|
|
151
|
+
body: '$[0]',
|
|
152
|
+
channels: '$[1]',
|
|
153
|
+
toSiteContributors: '$[2].toSiteContributors',
|
|
154
|
+
toContacts: '$[2].toContacts',
|
|
155
|
+
toTopicsSubscribers: '$[2].toTopicsSubscribers',
|
|
156
|
+
title: '$[2].title',
|
|
157
|
+
action: '$[2].action',
|
|
158
|
+
targetUrl: '$[2].targetUrl',
|
|
159
|
+
targetDashboardPage: '$[2].targetDashboardPage',
|
|
160
|
+
},
|
|
161
|
+
singleArgumentUnchanged: false,
|
|
162
|
+
}, ['body', 'channels', 'options']);
|
|
149
163
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
150
164
|
throw transformedError;
|
|
151
165
|
}
|
|
@@ -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":"
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.universal.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqD;AACrD,sEAAuF;AAEvF,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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D,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,CAChC,CAAC;YACF,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,4DAAG,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;QACzB,CAAC;;CACF;AA/ED,wBA+EC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as notifications from './src/ping-notifications-v1-public-notification.context';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,yDAAyD,CAAC"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { notify as publicNotify } from './ping-notifications-v1-public-notification.public';
|
|
2
|
+
export const notify = (...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(publicNotify)
|
|
10
|
+
.apply(undefined, args);
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=ping-notifications-v1-public-notification.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ping-notifications-v1-public-notification.context.js","sourceRoot":"","sources":["../../../src/ping-notifications-v1-public-notification.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oDAAoD,CAAC;AAG5F,MAAM,CAAC,MAAM,MAAM,GAA2C,CAC5D,GAAG,IAAS,EACZ,EAAE;IACF,mBAAmB;IACnB,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAC;IACJ,CAAC;IACD,mBAAmB;IACnB,OAAO,UAAU,CAAC,eAAe;SAC9B,cAAc,CAAC,YAAY,CAAC;SAC5B,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { serializer } from '@wix/metro-runtime/ambassador';
|
|
2
1
|
import { resolveUrl } from '@wix/metro-runtime';
|
|
3
|
-
const _empty = {};
|
|
4
|
-
const _publicNotifyRequest = {};
|
|
5
2
|
function resolveComWixpressPingHubApiPublicNotificationsServiceUrl(opts) {
|
|
6
3
|
const domainToMappings = {
|
|
7
4
|
'api._api_base_domain_': [
|
|
@@ -50,25 +47,20 @@ function resolveComWixpressPingHubApiPublicNotificationsServiceUrl(opts) {
|
|
|
50
47
|
* List the recipients for the notification in the `toContacts`, `toSiteContributors`, and `toTopicsSubscribers` parameters.
|
|
51
48
|
*/
|
|
52
49
|
export function notify(payload) {
|
|
53
|
-
const { toJSON: toReq, fromJSON: fromReq } = serializer(_publicNotifyRequest, {});
|
|
54
|
-
const { fromJSON: fromRes } = serializer(_empty, {});
|
|
55
50
|
function __notify({ host }) {
|
|
56
|
-
const serializedData = toReq(payload);
|
|
57
51
|
const metadata = {
|
|
58
52
|
entityFqdn: 'wix.ping.notifications.v1.public_notification',
|
|
59
53
|
method: 'POST',
|
|
60
54
|
methodFqn: 'com.wixpress.ping.hub.api.PublicNotificationsService.Notify',
|
|
61
55
|
url: resolveComWixpressPingHubApiPublicNotificationsServiceUrl({
|
|
62
56
|
protoPath: '/api/v1/notify',
|
|
63
|
-
data:
|
|
57
|
+
data: payload,
|
|
64
58
|
host,
|
|
65
59
|
}),
|
|
66
|
-
data:
|
|
67
|
-
transformResponse: fromRes,
|
|
60
|
+
data: payload,
|
|
68
61
|
};
|
|
69
62
|
return metadata;
|
|
70
63
|
}
|
|
71
|
-
__notify.fromReq = fromReq;
|
|
72
64
|
return __notify;
|
|
73
65
|
}
|
|
74
66
|
//# sourceMappingURL=ping-notifications-v1-public-notification.http.js.map
|
|
@@ -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
|
|
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,oBAAoB,CAAC;AAQhD,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;;;;;;;;;GASG;AACH,MAAM,UAAU,MAAM,CACpB,OAA4B;IAE5B,SAAS,QAAQ,CAAC,EAAE,IAAI,EAAO;QAC7B,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,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,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 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"}
|
|
@@ -3,6 +3,6 @@ import { Channel, NotifyOptions } from './ping-notifications-v1-public-notificat
|
|
|
3
3
|
export declare const __metadata: {
|
|
4
4
|
PACKAGE_NAME: string;
|
|
5
5
|
};
|
|
6
|
-
export declare function notify(httpClient: HttpClient): (body: string | null, channels: Channel[], options?: NotifyOptions
|
|
6
|
+
export declare function notify(httpClient: HttpClient): (body: string | null, channels: Channel[], options?: NotifyOptions) => Promise<void>;
|
|
7
7
|
export { Role, Channel, DashboardPages, } from './ping-notifications-v1-public-notification.universal';
|
|
8
8
|
export { Public_notification, PublicNotifyRequest, PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf, ToSiteContributors, ToContacts, ToTopicsSubscribers, Empty, NotifyOptions, } from './ping-notifications-v1-public-notification.universal';
|
|
@@ -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"}
|
|
@@ -7,7 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { serializer
|
|
10
|
+
import { serializer } from '@wix/metro-runtime/velo';
|
|
11
|
+
import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
|
|
11
12
|
import * as ambassadorWixPingNotificationsV1PublicNotification from './ping-notifications-v1-public-notification.http';
|
|
12
13
|
let __verbose = false;
|
|
13
14
|
function __log(...args) {
|
|
@@ -116,14 +117,23 @@ export function notify(body, channels, options) {
|
|
|
116
117
|
try {
|
|
117
118
|
const result = yield httpClient.request(reqOpts);
|
|
118
119
|
(_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
120
|
}
|
|
121
121
|
catch (err) {
|
|
122
|
-
const transformedError =
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
const transformedError = sdkTransformError(err, {
|
|
123
|
+
spreadPathsToArguments: {},
|
|
124
|
+
explicitPathsToArguments: {
|
|
125
|
+
body: '$[0]',
|
|
126
|
+
channels: '$[1]',
|
|
127
|
+
toSiteContributors: '$[2].toSiteContributors',
|
|
128
|
+
toContacts: '$[2].toContacts',
|
|
129
|
+
toTopicsSubscribers: '$[2].toTopicsSubscribers',
|
|
130
|
+
title: '$[2].title',
|
|
131
|
+
action: '$[2].action',
|
|
132
|
+
targetUrl: '$[2].targetUrl',
|
|
133
|
+
targetDashboardPage: '$[2].targetDashboardPage',
|
|
134
|
+
},
|
|
135
|
+
singleArgumentUnchanged: false,
|
|
136
|
+
}, ['body', 'channels', 'options']);
|
|
127
137
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
128
138
|
throw transformedError;
|
|
129
139
|
}
|
|
@@ -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,
|
|
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,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAEvF,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,KAAP,OAAO,QASlB;AAED,MAAM,CAAN,IAAY,cAIX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C,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,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;QACnC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,gBAAgB,GAAG,iBAAiB,CACxC,GAAG,EACH;gBACE,sBAAsB,EAAE,EAAE;gBAC1B,wBAAwB,EAAE;oBACxB,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,MAAM;oBAChB,kBAAkB,EAAE,yBAAyB;oBAC7C,UAAU,EAAE,iBAAiB;oBAC7B,mBAAmB,EAAE,0BAA0B;oBAC/C,KAAK,EAAE,YAAY;oBACnB,MAAM,EAAE,aAAa;oBACrB,SAAS,EAAE,gBAAgB;oBAC3B,mBAAmB,EAAE,0BAA0B;iBAChD;gBACD,uBAAuB,EAAE,KAAK;aAC/B,EACD,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,CAChC,CAAC;YACF,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,4DAAG,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;QACzB,CAAC;;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/notifications",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -11,12 +11,19 @@
|
|
|
11
11
|
"typings": "./build/cjs/index.d.ts",
|
|
12
12
|
"files": [
|
|
13
13
|
"build",
|
|
14
|
-
"frontend/package.json"
|
|
14
|
+
"frontend/package.json",
|
|
15
|
+
"meta",
|
|
16
|
+
"context"
|
|
15
17
|
],
|
|
16
18
|
"dependencies": {
|
|
17
|
-
"@wix/metro-runtime": "^1.
|
|
18
|
-
"@wix/
|
|
19
|
-
"@wix/sdk-
|
|
19
|
+
"@wix/metro-runtime": "^1.1528.0",
|
|
20
|
+
"@wix/sdk-types": "^1.5.3",
|
|
21
|
+
"@wix/sdk-runtime": "^0.2.7",
|
|
22
|
+
"@wix/motion-edm-autogen-query-wrapper": "^1.0.37"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "^5.3.2",
|
|
26
|
+
"@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz"
|
|
20
27
|
},
|
|
21
28
|
"scripts": {
|
|
22
29
|
"build": "tsc -b tsconfig.json tsconfig.esm.json",
|
|
@@ -28,5 +35,5 @@
|
|
|
28
35
|
"groupId": "com.wixpress.public-sdk-autogen"
|
|
29
36
|
}
|
|
30
37
|
},
|
|
31
|
-
"falconPackageHash": "
|
|
38
|
+
"falconPackageHash": "4595bd0be8aa35a2c3bae9e199ac95f747bdf0e72c799914516cf9d8"
|
|
32
39
|
}
|