@arrowsphere/api-client 3.27.0 → 3.28.0-rc.fdi.1
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/CHANGELOG.md +8 -0
- package/build/abstractClient.d.ts +5 -0
- package/build/abstractClient.js +8 -0
- package/build/campaign/index.d.ts +1 -0
- package/build/campaign/index.js +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/notifications/entities/details/notificationDetails.d.ts +31 -0
- package/build/notifications/entities/details/notificationDetails.js +82 -0
- package/build/notifications/entities/notification.d.ts +14 -0
- package/build/notifications/entities/notification.js +41 -0
- package/build/notifications/entities/notifications.d.ts +14 -0
- package/build/notifications/entities/notifications.js +41 -0
- package/build/notifications/entities/total.d.ts +13 -0
- package/build/notifications/entities/total.js +40 -0
- package/build/notifications/index.d.ts +5 -0
- package/build/notifications/index.js +18 -0
- package/build/notifications/notificationsClient.d.ts +39 -0
- package/build/notifications/notificationsClient.js +60 -0
- package/build/publicApiClient.d.ts +2 -0
- package/build/publicApiClient.js +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,8 +3,16 @@
|
|
|
3
3
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
4
4
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
5
|
|
|
6
|
+
## [3.28.0] - 2023-05-10
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- add notification endpoint
|
|
11
|
+
|
|
6
12
|
## [3.27.0] - 2023-05-10
|
|
7
13
|
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
8
16
|
- update create order client to add attributes for injection scenario
|
|
9
17
|
|
|
10
18
|
## [3.26.0] - 2023-04-20
|
|
@@ -57,6 +57,10 @@ export declare abstract class AbstractClient {
|
|
|
57
57
|
* ArrowSphere API key
|
|
58
58
|
*/
|
|
59
59
|
protected apiKey: string;
|
|
60
|
+
/**
|
|
61
|
+
* ArrowSphere token
|
|
62
|
+
*/
|
|
63
|
+
protected token: string;
|
|
60
64
|
/**
|
|
61
65
|
* Current pagination page number
|
|
62
66
|
*/
|
|
@@ -84,6 +88,7 @@ export declare abstract class AbstractClient {
|
|
|
84
88
|
* @returns this
|
|
85
89
|
*/
|
|
86
90
|
setApiKey(key: string): this;
|
|
91
|
+
setToken(apiKey: string): this;
|
|
87
92
|
/**
|
|
88
93
|
* Sets the client ArrowSphere API url
|
|
89
94
|
* @param url - API url
|
package/build/abstractClient.js
CHANGED
|
@@ -50,6 +50,10 @@ class AbstractClient {
|
|
|
50
50
|
* ArrowSphere API key
|
|
51
51
|
*/
|
|
52
52
|
this.apiKey = '';
|
|
53
|
+
/**
|
|
54
|
+
* ArrowSphere token
|
|
55
|
+
*/
|
|
56
|
+
this.token = '';
|
|
53
57
|
/**
|
|
54
58
|
* Current pagination page number
|
|
55
59
|
*/
|
|
@@ -80,6 +84,10 @@ class AbstractClient {
|
|
|
80
84
|
this.apiKey = key;
|
|
81
85
|
return this;
|
|
82
86
|
}
|
|
87
|
+
setToken(apiKey) {
|
|
88
|
+
this.token = apiKey;
|
|
89
|
+
return this;
|
|
90
|
+
}
|
|
83
91
|
/**
|
|
84
92
|
* Sets the client ArrowSphere API url
|
|
85
93
|
* @param url - API url
|
|
@@ -14,6 +14,7 @@ export * from './entities/v2/campaign/landingPage/landingPageFooter/landingPageF
|
|
|
14
14
|
export * from './entities/v2/campaign/landingPage/landingPage';
|
|
15
15
|
export * from './entities/v2/campaign/landingPage/landingPageHeader';
|
|
16
16
|
export * from './entities/v2/campaign/campaign';
|
|
17
|
+
export * from './entities/v2/campaignList';
|
|
17
18
|
export { AssetsCampaignAssets };
|
|
18
19
|
export * from './entities/campaignAssets/campaignAssets';
|
|
19
20
|
export * from './campaignClient';
|
package/build/campaign/index.js
CHANGED
|
@@ -40,6 +40,7 @@ __exportStar(require("./entities/v2/campaign/landingPage/landingPageFooter/landi
|
|
|
40
40
|
__exportStar(require("./entities/v2/campaign/landingPage/landingPage"), exports);
|
|
41
41
|
__exportStar(require("./entities/v2/campaign/landingPage/landingPageHeader"), exports);
|
|
42
42
|
__exportStar(require("./entities/v2/campaign/campaign"), exports);
|
|
43
|
+
__exportStar(require("./entities/v2/campaignList"), exports);
|
|
43
44
|
__exportStar(require("./entities/campaignAssets/campaignAssets"), exports);
|
|
44
45
|
__exportStar(require("./campaignClient"), exports);
|
|
45
46
|
//# sourceMappingURL=index.js.map
|
package/build/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './general/';
|
|
|
12
12
|
export * from './getResult';
|
|
13
13
|
export * from './pagination';
|
|
14
14
|
export * from './licenses/';
|
|
15
|
+
export * from './notifications/';
|
|
15
16
|
export * from './orders/';
|
|
16
17
|
export * from './publicApiClient';
|
|
17
18
|
export * from './publicGraphQLClient';
|
package/build/index.js
CHANGED
|
@@ -37,6 +37,7 @@ __exportStar(require("./general/"), exports);
|
|
|
37
37
|
__exportStar(require("./getResult"), exports);
|
|
38
38
|
__exportStar(require("./pagination"), exports);
|
|
39
39
|
__exportStar(require("./licenses/"), exports);
|
|
40
|
+
__exportStar(require("./notifications/"), exports);
|
|
40
41
|
__exportStar(require("./orders/"), exports);
|
|
41
42
|
__exportStar(require("./publicApiClient"), exports);
|
|
42
43
|
__exportStar(require("./publicGraphQLClient"), exports);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
export declare enum NotificationDetailsFields {
|
|
3
|
+
COLUMN_ID = "id",
|
|
4
|
+
COLUMN_USERNAME = "userName",
|
|
5
|
+
COLUMN_CREATED = "created",
|
|
6
|
+
COLUMN_EXPIRES = "expires",
|
|
7
|
+
COLUMN_SUBJECT = "subject",
|
|
8
|
+
COLUMN_CONTENT = "content",
|
|
9
|
+
COLUMN_HAS_BEEN_READ = "hasBeenRead"
|
|
10
|
+
}
|
|
11
|
+
export declare type NotificationDetailsType = {
|
|
12
|
+
[NotificationDetailsFields.COLUMN_ID]: string;
|
|
13
|
+
[NotificationDetailsFields.COLUMN_USERNAME]: string;
|
|
14
|
+
[NotificationDetailsFields.COLUMN_CREATED]: number;
|
|
15
|
+
[NotificationDetailsFields.COLUMN_EXPIRES]: number;
|
|
16
|
+
[NotificationDetailsFields.COLUMN_SUBJECT]: string;
|
|
17
|
+
[NotificationDetailsFields.COLUMN_CONTENT]: string;
|
|
18
|
+
[NotificationDetailsFields.COLUMN_HAS_BEEN_READ]: number;
|
|
19
|
+
};
|
|
20
|
+
export declare class NotificationDetails extends AbstractEntity<NotificationDetailsType> {
|
|
21
|
+
#private;
|
|
22
|
+
constructor(notification: NotificationDetailsType);
|
|
23
|
+
get id(): string;
|
|
24
|
+
get userName(): string;
|
|
25
|
+
get created(): number;
|
|
26
|
+
get expires(): number;
|
|
27
|
+
get subject(): string;
|
|
28
|
+
get content(): string;
|
|
29
|
+
get hasBeenRead(): number;
|
|
30
|
+
toJSON(): NotificationDetailsType;
|
|
31
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _id, _userName, _created, _expires, _subject, _content, _hasBeenRead;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.NotificationDetails = exports.NotificationDetailsFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
19
|
+
var NotificationDetailsFields;
|
|
20
|
+
(function (NotificationDetailsFields) {
|
|
21
|
+
NotificationDetailsFields["COLUMN_ID"] = "id";
|
|
22
|
+
NotificationDetailsFields["COLUMN_USERNAME"] = "userName";
|
|
23
|
+
NotificationDetailsFields["COLUMN_CREATED"] = "created";
|
|
24
|
+
NotificationDetailsFields["COLUMN_EXPIRES"] = "expires";
|
|
25
|
+
NotificationDetailsFields["COLUMN_SUBJECT"] = "subject";
|
|
26
|
+
NotificationDetailsFields["COLUMN_CONTENT"] = "content";
|
|
27
|
+
NotificationDetailsFields["COLUMN_HAS_BEEN_READ"] = "hasBeenRead";
|
|
28
|
+
})(NotificationDetailsFields = exports.NotificationDetailsFields || (exports.NotificationDetailsFields = {}));
|
|
29
|
+
class NotificationDetails extends abstractEntity_1.AbstractEntity {
|
|
30
|
+
constructor(notification) {
|
|
31
|
+
super(notification);
|
|
32
|
+
_id.set(this, void 0);
|
|
33
|
+
_userName.set(this, void 0);
|
|
34
|
+
_created.set(this, void 0);
|
|
35
|
+
_expires.set(this, void 0);
|
|
36
|
+
_subject.set(this, void 0);
|
|
37
|
+
_content.set(this, void 0);
|
|
38
|
+
_hasBeenRead.set(this, void 0);
|
|
39
|
+
__classPrivateFieldSet(this, _id, notification[NotificationDetailsFields.COLUMN_ID]);
|
|
40
|
+
__classPrivateFieldSet(this, _userName, notification[NotificationDetailsFields.COLUMN_USERNAME]);
|
|
41
|
+
__classPrivateFieldSet(this, _created, notification[NotificationDetailsFields.COLUMN_CREATED]);
|
|
42
|
+
__classPrivateFieldSet(this, _expires, notification[NotificationDetailsFields.COLUMN_EXPIRES]);
|
|
43
|
+
__classPrivateFieldSet(this, _subject, notification[NotificationDetailsFields.COLUMN_SUBJECT]);
|
|
44
|
+
__classPrivateFieldSet(this, _content, notification[NotificationDetailsFields.COLUMN_CONTENT]);
|
|
45
|
+
__classPrivateFieldSet(this, _hasBeenRead, notification[NotificationDetailsFields.COLUMN_HAS_BEEN_READ]);
|
|
46
|
+
}
|
|
47
|
+
get id() {
|
|
48
|
+
return __classPrivateFieldGet(this, _id);
|
|
49
|
+
}
|
|
50
|
+
get userName() {
|
|
51
|
+
return __classPrivateFieldGet(this, _userName);
|
|
52
|
+
}
|
|
53
|
+
get created() {
|
|
54
|
+
return __classPrivateFieldGet(this, _created);
|
|
55
|
+
}
|
|
56
|
+
get expires() {
|
|
57
|
+
return __classPrivateFieldGet(this, _expires);
|
|
58
|
+
}
|
|
59
|
+
get subject() {
|
|
60
|
+
return __classPrivateFieldGet(this, _subject);
|
|
61
|
+
}
|
|
62
|
+
get content() {
|
|
63
|
+
return __classPrivateFieldGet(this, _content);
|
|
64
|
+
}
|
|
65
|
+
get hasBeenRead() {
|
|
66
|
+
return __classPrivateFieldGet(this, _hasBeenRead);
|
|
67
|
+
}
|
|
68
|
+
toJSON() {
|
|
69
|
+
return {
|
|
70
|
+
[NotificationDetailsFields.COLUMN_ID]: this.id,
|
|
71
|
+
[NotificationDetailsFields.COLUMN_USERNAME]: this.userName,
|
|
72
|
+
[NotificationDetailsFields.COLUMN_CREATED]: this.created,
|
|
73
|
+
[NotificationDetailsFields.COLUMN_EXPIRES]: this.expires,
|
|
74
|
+
[NotificationDetailsFields.COLUMN_SUBJECT]: this.subject,
|
|
75
|
+
[NotificationDetailsFields.COLUMN_CONTENT]: this.content,
|
|
76
|
+
[NotificationDetailsFields.COLUMN_HAS_BEEN_READ]: this.hasBeenRead,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.NotificationDetails = NotificationDetails;
|
|
81
|
+
_id = new WeakMap(), _userName = new WeakMap(), _created = new WeakMap(), _expires = new WeakMap(), _subject = new WeakMap(), _content = new WeakMap(), _hasBeenRead = new WeakMap();
|
|
82
|
+
//# sourceMappingURL=notificationDetails.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NotificationDetails, NotificationDetailsType } from './details/notificationDetails';
|
|
2
|
+
import { AbstractEntity } from '../../abstractEntity';
|
|
3
|
+
export declare enum NotificationFields {
|
|
4
|
+
COLUMN_NOTIFICATION = "notification"
|
|
5
|
+
}
|
|
6
|
+
export declare type NotificationType = {
|
|
7
|
+
[NotificationFields.COLUMN_NOTIFICATION]: NotificationDetailsType;
|
|
8
|
+
};
|
|
9
|
+
export declare class Notification extends AbstractEntity<NotificationType> {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(notification: NotificationType);
|
|
12
|
+
get notification(): NotificationDetails;
|
|
13
|
+
toJSON(): NotificationType;
|
|
14
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _notification;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Notification = exports.NotificationFields = void 0;
|
|
18
|
+
const notificationDetails_1 = require("./details/notificationDetails");
|
|
19
|
+
const abstractEntity_1 = require("../../abstractEntity");
|
|
20
|
+
var NotificationFields;
|
|
21
|
+
(function (NotificationFields) {
|
|
22
|
+
NotificationFields["COLUMN_NOTIFICATION"] = "notification";
|
|
23
|
+
})(NotificationFields = exports.NotificationFields || (exports.NotificationFields = {}));
|
|
24
|
+
class Notification extends abstractEntity_1.AbstractEntity {
|
|
25
|
+
constructor(notification) {
|
|
26
|
+
super(notification);
|
|
27
|
+
_notification.set(this, void 0);
|
|
28
|
+
__classPrivateFieldSet(this, _notification, new notificationDetails_1.NotificationDetails(notification[NotificationFields.COLUMN_NOTIFICATION]));
|
|
29
|
+
}
|
|
30
|
+
get notification() {
|
|
31
|
+
return __classPrivateFieldGet(this, _notification);
|
|
32
|
+
}
|
|
33
|
+
toJSON() {
|
|
34
|
+
return {
|
|
35
|
+
[NotificationFields.COLUMN_NOTIFICATION]: this.notification.toJSON(),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.Notification = Notification;
|
|
40
|
+
_notification = new WeakMap();
|
|
41
|
+
//# sourceMappingURL=notification.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NotificationDetails, NotificationDetailsType } from './details/notificationDetails';
|
|
2
|
+
import { AbstractEntity } from '../../abstractEntity';
|
|
3
|
+
export declare enum NotificationsFields {
|
|
4
|
+
COLUMN_NOTIFICATIONS = "notifications"
|
|
5
|
+
}
|
|
6
|
+
export declare type NotificationsType = {
|
|
7
|
+
[NotificationsFields.COLUMN_NOTIFICATIONS]: NotificationDetailsType[];
|
|
8
|
+
};
|
|
9
|
+
export declare class Notifications extends AbstractEntity<NotificationsType> {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(notification: NotificationsType);
|
|
12
|
+
get notifications(): NotificationDetails[];
|
|
13
|
+
toJSON(): NotificationsType;
|
|
14
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _notifications;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Notifications = exports.NotificationsFields = void 0;
|
|
18
|
+
const notificationDetails_1 = require("./details/notificationDetails");
|
|
19
|
+
const abstractEntity_1 = require("../../abstractEntity");
|
|
20
|
+
var NotificationsFields;
|
|
21
|
+
(function (NotificationsFields) {
|
|
22
|
+
NotificationsFields["COLUMN_NOTIFICATIONS"] = "notifications";
|
|
23
|
+
})(NotificationsFields = exports.NotificationsFields || (exports.NotificationsFields = {}));
|
|
24
|
+
class Notifications extends abstractEntity_1.AbstractEntity {
|
|
25
|
+
constructor(notification) {
|
|
26
|
+
super(notification);
|
|
27
|
+
_notifications.set(this, void 0);
|
|
28
|
+
__classPrivateFieldSet(this, _notifications, notification[NotificationsFields.COLUMN_NOTIFICATIONS].map((notification) => new notificationDetails_1.NotificationDetails(notification)));
|
|
29
|
+
}
|
|
30
|
+
get notifications() {
|
|
31
|
+
return __classPrivateFieldGet(this, _notifications);
|
|
32
|
+
}
|
|
33
|
+
toJSON() {
|
|
34
|
+
return {
|
|
35
|
+
[NotificationsFields.COLUMN_NOTIFICATIONS]: this.notifications.map((notification) => notification.toJSON()),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.Notifications = Notifications;
|
|
40
|
+
_notifications = new WeakMap();
|
|
41
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../abstractEntity';
|
|
2
|
+
export declare enum TotalFields {
|
|
3
|
+
COLUMN_TOTAL = "total"
|
|
4
|
+
}
|
|
5
|
+
export declare type TotalType = {
|
|
6
|
+
[TotalFields.COLUMN_TOTAL]: number;
|
|
7
|
+
};
|
|
8
|
+
export declare class Total extends AbstractEntity<TotalType> {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(total: TotalType);
|
|
11
|
+
get total(): number;
|
|
12
|
+
toJSON(): TotalType;
|
|
13
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _total;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Total = exports.TotalFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../abstractEntity");
|
|
19
|
+
var TotalFields;
|
|
20
|
+
(function (TotalFields) {
|
|
21
|
+
TotalFields["COLUMN_TOTAL"] = "total";
|
|
22
|
+
})(TotalFields = exports.TotalFields || (exports.TotalFields = {}));
|
|
23
|
+
class Total extends abstractEntity_1.AbstractEntity {
|
|
24
|
+
constructor(total) {
|
|
25
|
+
super(total);
|
|
26
|
+
_total.set(this, void 0);
|
|
27
|
+
__classPrivateFieldSet(this, _total, total[TotalFields.COLUMN_TOTAL]);
|
|
28
|
+
}
|
|
29
|
+
get total() {
|
|
30
|
+
return __classPrivateFieldGet(this, _total);
|
|
31
|
+
}
|
|
32
|
+
toJSON() {
|
|
33
|
+
return {
|
|
34
|
+
[TotalFields.COLUMN_TOTAL]: this.total,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.Total = Total;
|
|
39
|
+
_total = new WeakMap();
|
|
40
|
+
//# sourceMappingURL=total.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./entities/details/notificationDetails"), exports);
|
|
14
|
+
__exportStar(require("./entities/notifications"), exports);
|
|
15
|
+
__exportStar(require("./entities/notification"), exports);
|
|
16
|
+
__exportStar(require("./entities/total"), exports);
|
|
17
|
+
__exportStar(require("./notificationsClient"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AbstractClient, Parameters, ParametersWithPaginationType, Payload } from '../abstractClient';
|
|
2
|
+
import { GetResult } from '../getResult';
|
|
3
|
+
import { Notifications } from './entities/notifications';
|
|
4
|
+
import { Notification } from './entities/notification';
|
|
5
|
+
import { Total } from './entities/total';
|
|
6
|
+
export declare enum ListParametersFields {
|
|
7
|
+
COLUMN_CREATED = "created",
|
|
8
|
+
COLUMN_HAS_BEEN_READ = "hasBeenRead",
|
|
9
|
+
COLUMN_SEARCH_AFTER = "searchAfter"
|
|
10
|
+
}
|
|
11
|
+
export declare type ListParametersType = ParametersWithPaginationType & {
|
|
12
|
+
[ListParametersFields.COLUMN_CREATED]?: string;
|
|
13
|
+
[ListParametersFields.COLUMN_HAS_BEEN_READ]?: string;
|
|
14
|
+
[ListParametersFields.COLUMN_SEARCH_AFTER]?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare enum CreatePayloadFields {
|
|
17
|
+
COLUMN_USERNAME = "username",
|
|
18
|
+
COLUMN_SUBJECT = "subject",
|
|
19
|
+
COLUMN_CONTENT = "content"
|
|
20
|
+
}
|
|
21
|
+
export declare type CreatePayloadType = {
|
|
22
|
+
[CreatePayloadFields.COLUMN_USERNAME]: string;
|
|
23
|
+
[CreatePayloadFields.COLUMN_SUBJECT]: string;
|
|
24
|
+
[CreatePayloadFields.COLUMN_CONTENT]: string;
|
|
25
|
+
};
|
|
26
|
+
export declare class NotificationsClient extends AbstractClient {
|
|
27
|
+
/**
|
|
28
|
+
* The base path of the API
|
|
29
|
+
*/
|
|
30
|
+
protected basePath: string;
|
|
31
|
+
list(parameters?: ListParametersType): Promise<GetResult<Notifications>>;
|
|
32
|
+
create(payload: CreatePayloadType, parameters?: Parameters): Promise<GetResult<Notification>>;
|
|
33
|
+
deleteAll(parameters?: Parameters): Promise<void>;
|
|
34
|
+
getNotification(notificationId: string, parameters?: Parameters): Promise<GetResult<Notification>>;
|
|
35
|
+
deleteNotification(notificationId: string, parameters?: Parameters): Promise<void>;
|
|
36
|
+
readAll(payload?: Payload, parameters?: Parameters): Promise<void>;
|
|
37
|
+
read(notificationId: string, payload?: Payload, parameters?: Parameters): Promise<void>;
|
|
38
|
+
count(parameters?: Parameters): Promise<GetResult<Total>>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationsClient = exports.CreatePayloadFields = exports.ListParametersFields = void 0;
|
|
4
|
+
const abstractClient_1 = require("../abstractClient");
|
|
5
|
+
const getResult_1 = require("../getResult");
|
|
6
|
+
const notifications_1 = require("./entities/notifications");
|
|
7
|
+
const notification_1 = require("./entities/notification");
|
|
8
|
+
const total_1 = require("./entities/total");
|
|
9
|
+
var ListParametersFields;
|
|
10
|
+
(function (ListParametersFields) {
|
|
11
|
+
ListParametersFields["COLUMN_CREATED"] = "created";
|
|
12
|
+
ListParametersFields["COLUMN_HAS_BEEN_READ"] = "hasBeenRead";
|
|
13
|
+
ListParametersFields["COLUMN_SEARCH_AFTER"] = "searchAfter";
|
|
14
|
+
})(ListParametersFields = exports.ListParametersFields || (exports.ListParametersFields = {}));
|
|
15
|
+
var CreatePayloadFields;
|
|
16
|
+
(function (CreatePayloadFields) {
|
|
17
|
+
CreatePayloadFields["COLUMN_USERNAME"] = "username";
|
|
18
|
+
CreatePayloadFields["COLUMN_SUBJECT"] = "subject";
|
|
19
|
+
CreatePayloadFields["COLUMN_CONTENT"] = "content";
|
|
20
|
+
})(CreatePayloadFields = exports.CreatePayloadFields || (exports.CreatePayloadFields = {}));
|
|
21
|
+
class NotificationsClient extends abstractClient_1.AbstractClient {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
/**
|
|
25
|
+
* The base path of the API
|
|
26
|
+
*/
|
|
27
|
+
this.basePath = '/notification';
|
|
28
|
+
}
|
|
29
|
+
async list(parameters = {}) {
|
|
30
|
+
return new getResult_1.GetResult(notifications_1.Notifications, await this.get(parameters));
|
|
31
|
+
}
|
|
32
|
+
async create(payload, parameters = {}) {
|
|
33
|
+
return new getResult_1.GetResult(notification_1.Notification, await this.post(payload, parameters));
|
|
34
|
+
}
|
|
35
|
+
async deleteAll(parameters = {}) {
|
|
36
|
+
return await this.delete(parameters);
|
|
37
|
+
}
|
|
38
|
+
async getNotification(notificationId, parameters = {}) {
|
|
39
|
+
this.path = `${notificationId}`;
|
|
40
|
+
return new getResult_1.GetResult(notification_1.Notification, await this.get(parameters));
|
|
41
|
+
}
|
|
42
|
+
async deleteNotification(notificationId, parameters = {}) {
|
|
43
|
+
this.path = `${notificationId}`;
|
|
44
|
+
return await this.delete(parameters);
|
|
45
|
+
}
|
|
46
|
+
async readAll(payload = {}, parameters = {}) {
|
|
47
|
+
this.path = '/read';
|
|
48
|
+
return await this.patch(payload, parameters);
|
|
49
|
+
}
|
|
50
|
+
async read(notificationId, payload = {}, parameters = {}) {
|
|
51
|
+
this.path = `/${notificationId}/read`;
|
|
52
|
+
return await this.patch(payload, parameters);
|
|
53
|
+
}
|
|
54
|
+
async count(parameters = {}) {
|
|
55
|
+
this.path = '/count';
|
|
56
|
+
return new getResult_1.GetResult(total_1.Total, await this.get(parameters));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.NotificationsClient = NotificationsClient;
|
|
60
|
+
//# sourceMappingURL=notificationsClient.js.map
|
|
@@ -11,6 +11,7 @@ import { StandardsClient } from './security/standards/standardsClient';
|
|
|
11
11
|
import { RegisterClient } from './security';
|
|
12
12
|
import { CartClient } from './cart/cartClient';
|
|
13
13
|
import { SupportCenterClient } from './supportCenter';
|
|
14
|
+
import { NotificationsClient } from './notifications';
|
|
14
15
|
/**
|
|
15
16
|
* Public API Client class, should be the main entry point for your calls
|
|
16
17
|
*/
|
|
@@ -61,5 +62,6 @@ export declare class PublicApiClient extends AbstractClient {
|
|
|
61
62
|
getSecurityRegisterClient(): RegisterClient;
|
|
62
63
|
getCartClient(): CartClient;
|
|
63
64
|
getSupportCenterClient(): SupportCenterClient;
|
|
65
|
+
getNotificationsClient(): NotificationsClient;
|
|
64
66
|
}
|
|
65
67
|
export default PublicApiClient;
|
package/build/publicApiClient.js
CHANGED
|
@@ -14,6 +14,7 @@ const standardsClient_1 = require("./security/standards/standardsClient");
|
|
|
14
14
|
const security_1 = require("./security");
|
|
15
15
|
const cartClient_1 = require("./cart/cartClient");
|
|
16
16
|
const supportCenter_1 = require("./supportCenter");
|
|
17
|
+
const notifications_1 = require("./notifications");
|
|
17
18
|
/**
|
|
18
19
|
* Public API Client class, should be the main entry point for your calls
|
|
19
20
|
*/
|
|
@@ -131,6 +132,12 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
131
132
|
.setApiKey(this.apiKey)
|
|
132
133
|
.setHeaders(this.headers);
|
|
133
134
|
}
|
|
135
|
+
getNotificationsClient() {
|
|
136
|
+
return new notifications_1.NotificationsClient()
|
|
137
|
+
.setUrl(this.url)
|
|
138
|
+
.setToken(this.token)
|
|
139
|
+
.setHeaders(this.headers);
|
|
140
|
+
}
|
|
134
141
|
}
|
|
135
142
|
exports.PublicApiClient = PublicApiClient;
|
|
136
143
|
exports.default = PublicApiClient;
|
package/package.json
CHANGED