@arrowsphere/api-client 3.32.0 → 3.33.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 CHANGED
@@ -3,6 +3,12 @@
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.33.0] - 2023-05-10
7
+
8
+ ### Changed
9
+
10
+ - add notification endpoint
11
+
6
12
  ## [3.31.0] - 2023-05-26
7
13
 
8
14
  ### Changed
@@ -37,6 +43,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
37
43
 
38
44
  ## [3.27.0] - 2023-05-10
39
45
 
46
+ ### Changed
47
+
40
48
  - update create order client to add attributes for injection scenario
41
49
 
42
50
  ## [3.26.0] - 2023-04-20
@@ -40,22 +40,26 @@ class AxiosSingleton {
40
40
  * @param request - Axios Request
41
41
  */
42
42
  static cleanRequestLog(request) {
43
- var _a;
43
+ var _a, _b;
44
44
  const tempRequest = (0, lodash_1.cloneDeep)(request);
45
- // coverage bug delete undefined element
46
- /* istanbul ignore next */
47
- (_a = tempRequest.headers) === null || _a === void 0 ? true : delete _a.apiKey;
45
+ if ((_a = tempRequest.headers) === null || _a === void 0 ? void 0 : _a.apiKey) {
46
+ const apiKey = (_b = tempRequest.headers) === null || _b === void 0 ? void 0 : _b.apiKey;
47
+ tempRequest.headers.apiKey =
48
+ '****************************' + apiKey.substring(apiKey.length - 4);
49
+ }
48
50
  return tempRequest;
49
51
  }
50
52
  /**
51
53
  * @param response - Axios Response
52
54
  */
53
55
  static cleanResponseLog(response) {
54
- var _a;
56
+ var _a, _b;
55
57
  const tempResponse = (0, lodash_1.cloneDeep)(response);
56
- // coverage bug delete undefined element
57
- /* istanbul ignore next */
58
- (_a = tempResponse.config.headers) === null || _a === void 0 ? true : delete _a.apiKey;
58
+ if ((_a = tempResponse.config.headers) === null || _a === void 0 ? void 0 : _a.apiKey) {
59
+ const apiKey = (_b = tempResponse.config.headers) === null || _b === void 0 ? void 0 : _b.apiKey;
60
+ tempResponse.config.headers.apiKey =
61
+ '****************************' + apiKey.substring(apiKey.length - 4);
62
+ }
59
63
  delete tempResponse.request;
60
64
  return tempResponse;
61
65
  }
@@ -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';
@@ -44,6 +44,7 @@ __exportStar(require("./entities/v2/campaign/landingPage/landingPageFooter/landi
44
44
  __exportStar(require("./entities/v2/campaign/landingPage/landingPage"), exports);
45
45
  __exportStar(require("./entities/v2/campaign/landingPage/landingPageHeader"), exports);
46
46
  __exportStar(require("./entities/v2/campaign/campaign"), exports);
47
+ __exportStar(require("./entities/v2/campaignList"), exports);
47
48
  __exportStar(require("./entities/campaignAssets/campaignAssets"), exports);
48
49
  __exportStar(require("./campaignClient"), exports);
49
50
  //# 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
@@ -41,6 +41,7 @@ __exportStar(require("./general/"), exports);
41
41
  __exportStar(require("./getResult"), exports);
42
42
  __exportStar(require("./pagination"), exports);
43
43
  __exportStar(require("./licenses/"), exports);
44
+ __exportStar(require("./notifications/"), exports);
44
45
  __exportStar(require("./orders/"), exports);
45
46
  __exportStar(require("./publicApiClient"), exports);
46
47
  __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,80 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _NotificationDetails_id, _NotificationDetails_userName, _NotificationDetails_created, _NotificationDetails_expires, _NotificationDetails_subject, _NotificationDetails_content, _NotificationDetails_hasBeenRead;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.NotificationDetails = exports.NotificationDetailsFields = void 0;
16
+ const abstractEntity_1 = require("../../../abstractEntity");
17
+ var NotificationDetailsFields;
18
+ (function (NotificationDetailsFields) {
19
+ NotificationDetailsFields["COLUMN_ID"] = "id";
20
+ NotificationDetailsFields["COLUMN_USERNAME"] = "userName";
21
+ NotificationDetailsFields["COLUMN_CREATED"] = "created";
22
+ NotificationDetailsFields["COLUMN_EXPIRES"] = "expires";
23
+ NotificationDetailsFields["COLUMN_SUBJECT"] = "subject";
24
+ NotificationDetailsFields["COLUMN_CONTENT"] = "content";
25
+ NotificationDetailsFields["COLUMN_HAS_BEEN_READ"] = "hasBeenRead";
26
+ })(NotificationDetailsFields = exports.NotificationDetailsFields || (exports.NotificationDetailsFields = {}));
27
+ class NotificationDetails extends abstractEntity_1.AbstractEntity {
28
+ constructor(notification) {
29
+ super(notification);
30
+ _NotificationDetails_id.set(this, void 0);
31
+ _NotificationDetails_userName.set(this, void 0);
32
+ _NotificationDetails_created.set(this, void 0);
33
+ _NotificationDetails_expires.set(this, void 0);
34
+ _NotificationDetails_subject.set(this, void 0);
35
+ _NotificationDetails_content.set(this, void 0);
36
+ _NotificationDetails_hasBeenRead.set(this, void 0);
37
+ __classPrivateFieldSet(this, _NotificationDetails_id, notification[NotificationDetailsFields.COLUMN_ID], "f");
38
+ __classPrivateFieldSet(this, _NotificationDetails_userName, notification[NotificationDetailsFields.COLUMN_USERNAME], "f");
39
+ __classPrivateFieldSet(this, _NotificationDetails_created, notification[NotificationDetailsFields.COLUMN_CREATED], "f");
40
+ __classPrivateFieldSet(this, _NotificationDetails_expires, notification[NotificationDetailsFields.COLUMN_EXPIRES], "f");
41
+ __classPrivateFieldSet(this, _NotificationDetails_subject, notification[NotificationDetailsFields.COLUMN_SUBJECT], "f");
42
+ __classPrivateFieldSet(this, _NotificationDetails_content, notification[NotificationDetailsFields.COLUMN_CONTENT], "f");
43
+ __classPrivateFieldSet(this, _NotificationDetails_hasBeenRead, notification[NotificationDetailsFields.COLUMN_HAS_BEEN_READ], "f");
44
+ }
45
+ get id() {
46
+ return __classPrivateFieldGet(this, _NotificationDetails_id, "f");
47
+ }
48
+ get userName() {
49
+ return __classPrivateFieldGet(this, _NotificationDetails_userName, "f");
50
+ }
51
+ get created() {
52
+ return __classPrivateFieldGet(this, _NotificationDetails_created, "f");
53
+ }
54
+ get expires() {
55
+ return __classPrivateFieldGet(this, _NotificationDetails_expires, "f");
56
+ }
57
+ get subject() {
58
+ return __classPrivateFieldGet(this, _NotificationDetails_subject, "f");
59
+ }
60
+ get content() {
61
+ return __classPrivateFieldGet(this, _NotificationDetails_content, "f");
62
+ }
63
+ get hasBeenRead() {
64
+ return __classPrivateFieldGet(this, _NotificationDetails_hasBeenRead, "f");
65
+ }
66
+ toJSON() {
67
+ return {
68
+ [NotificationDetailsFields.COLUMN_ID]: this.id,
69
+ [NotificationDetailsFields.COLUMN_USERNAME]: this.userName,
70
+ [NotificationDetailsFields.COLUMN_CREATED]: this.created,
71
+ [NotificationDetailsFields.COLUMN_EXPIRES]: this.expires,
72
+ [NotificationDetailsFields.COLUMN_SUBJECT]: this.subject,
73
+ [NotificationDetailsFields.COLUMN_CONTENT]: this.content,
74
+ [NotificationDetailsFields.COLUMN_HAS_BEEN_READ]: this.hasBeenRead,
75
+ };
76
+ }
77
+ }
78
+ exports.NotificationDetails = NotificationDetails;
79
+ _NotificationDetails_id = new WeakMap(), _NotificationDetails_userName = new WeakMap(), _NotificationDetails_created = new WeakMap(), _NotificationDetails_expires = new WeakMap(), _NotificationDetails_subject = new WeakMap(), _NotificationDetails_content = new WeakMap(), _NotificationDetails_hasBeenRead = new WeakMap();
80
+ //# 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,39 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _Notification_notification;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Notification = exports.NotificationFields = void 0;
16
+ const notificationDetails_1 = require("./details/notificationDetails");
17
+ const abstractEntity_1 = require("../../abstractEntity");
18
+ var NotificationFields;
19
+ (function (NotificationFields) {
20
+ NotificationFields["COLUMN_NOTIFICATION"] = "notification";
21
+ })(NotificationFields = exports.NotificationFields || (exports.NotificationFields = {}));
22
+ class Notification extends abstractEntity_1.AbstractEntity {
23
+ constructor(notification) {
24
+ super(notification);
25
+ _Notification_notification.set(this, void 0);
26
+ __classPrivateFieldSet(this, _Notification_notification, new notificationDetails_1.NotificationDetails(notification[NotificationFields.COLUMN_NOTIFICATION]), "f");
27
+ }
28
+ get notification() {
29
+ return __classPrivateFieldGet(this, _Notification_notification, "f");
30
+ }
31
+ toJSON() {
32
+ return {
33
+ [NotificationFields.COLUMN_NOTIFICATION]: this.notification.toJSON(),
34
+ };
35
+ }
36
+ }
37
+ exports.Notification = Notification;
38
+ _Notification_notification = new WeakMap();
39
+ //# 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,39 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _Notifications_notifications;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Notifications = exports.NotificationsFields = void 0;
16
+ const notificationDetails_1 = require("./details/notificationDetails");
17
+ const abstractEntity_1 = require("../../abstractEntity");
18
+ var NotificationsFields;
19
+ (function (NotificationsFields) {
20
+ NotificationsFields["COLUMN_NOTIFICATIONS"] = "notifications";
21
+ })(NotificationsFields = exports.NotificationsFields || (exports.NotificationsFields = {}));
22
+ class Notifications extends abstractEntity_1.AbstractEntity {
23
+ constructor(notification) {
24
+ super(notification);
25
+ _Notifications_notifications.set(this, void 0);
26
+ __classPrivateFieldSet(this, _Notifications_notifications, notification[NotificationsFields.COLUMN_NOTIFICATIONS].map((notification) => new notificationDetails_1.NotificationDetails(notification)), "f");
27
+ }
28
+ get notifications() {
29
+ return __classPrivateFieldGet(this, _Notifications_notifications, "f");
30
+ }
31
+ toJSON() {
32
+ return {
33
+ [NotificationsFields.COLUMN_NOTIFICATIONS]: this.notifications.map((notification) => notification.toJSON()),
34
+ };
35
+ }
36
+ }
37
+ exports.Notifications = Notifications;
38
+ _Notifications_notifications = new WeakMap();
39
+ //# 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,38 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _Total_total;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Total = exports.TotalFields = void 0;
16
+ const abstractEntity_1 = require("../../abstractEntity");
17
+ var TotalFields;
18
+ (function (TotalFields) {
19
+ TotalFields["COLUMN_TOTAL"] = "total";
20
+ })(TotalFields = exports.TotalFields || (exports.TotalFields = {}));
21
+ class Total extends abstractEntity_1.AbstractEntity {
22
+ constructor(total) {
23
+ super(total);
24
+ _Total_total.set(this, void 0);
25
+ __classPrivateFieldSet(this, _Total_total, total[TotalFields.COLUMN_TOTAL], "f");
26
+ }
27
+ get total() {
28
+ return __classPrivateFieldGet(this, _Total_total, "f");
29
+ }
30
+ toJSON() {
31
+ return {
32
+ [TotalFields.COLUMN_TOTAL]: this.total,
33
+ };
34
+ }
35
+ }
36
+ exports.Total = Total;
37
+ _Total_total = new WeakMap();
38
+ //# sourceMappingURL=total.js.map
@@ -0,0 +1,5 @@
1
+ export * from './entities/details/notificationDetails';
2
+ export * from './entities/notifications';
3
+ export * from './entities/notification';
4
+ export * from './entities/total';
5
+ export * from './notificationsClient';
@@ -0,0 +1,22 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./entities/details/notificationDetails"), exports);
18
+ __exportStar(require("./entities/notifications"), exports);
19
+ __exportStar(require("./entities/notification"), exports);
20
+ __exportStar(require("./entities/total"), exports);
21
+ __exportStar(require("./notificationsClient"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,38 @@
1
+ import { AbstractRestfulClient, Parameters, ParametersWithPaginationType, Payload } from '../abstractRestfulClient';
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 AbstractRestfulClient {
27
+ /**
28
+ * The base path of the API
29
+ */
30
+ protected basePath: string;
31
+ list(parameters?: ListParametersType): Promise<GetResult<Notifications>>;
32
+ deleteAll(parameters?: Parameters): Promise<void>;
33
+ getOne(notificationId: string, parameters?: Parameters): Promise<GetResult<Notification>>;
34
+ deleteOne(notificationId: string, parameters?: Parameters): Promise<void>;
35
+ readAll(payload?: Payload, parameters?: Parameters): Promise<void>;
36
+ readOne(notificationId: string, payload?: Payload, parameters?: Parameters): Promise<void>;
37
+ count(parameters?: Parameters): Promise<GetResult<Total>>;
38
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationsClient = exports.CreatePayloadFields = exports.ListParametersFields = void 0;
4
+ const abstractRestfulClient_1 = require("../abstractRestfulClient");
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 abstractRestfulClient_1.AbstractRestfulClient {
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 deleteAll(parameters = {}) {
33
+ return await this.delete(parameters);
34
+ }
35
+ async getOne(notificationId, parameters = {}) {
36
+ this.path = `${notificationId}`;
37
+ return new getResult_1.GetResult(notification_1.Notification, await this.get(parameters));
38
+ }
39
+ async deleteOne(notificationId, parameters = {}) {
40
+ this.path = `${notificationId}`;
41
+ return await this.delete(parameters);
42
+ }
43
+ async readAll(payload = {}, parameters = {}) {
44
+ this.path = '/read';
45
+ return await this.patch(payload, parameters);
46
+ }
47
+ async readOne(notificationId, payload = {}, parameters = {}) {
48
+ this.path = `/${notificationId}/read`;
49
+ return await this.patch(payload, parameters);
50
+ }
51
+ async count(parameters = {}) {
52
+ this.path = '/count';
53
+ return new getResult_1.GetResult(total_1.Total, await this.get(parameters));
54
+ }
55
+ }
56
+ exports.NotificationsClient = NotificationsClient;
57
+ //# sourceMappingURL=notificationsClient.js.map
@@ -13,6 +13,7 @@ import { CartClient } from './cart/cartClient';
13
13
  import { SupportCenterClient } from './supportCenter';
14
14
  import { CatalogClient } from './catalog';
15
15
  import { UserClient } from './user';
16
+ import { NotificationsClient } from './notifications';
16
17
  /**
17
18
  * Public API Client class, should be the main entry point for your calls
18
19
  */
@@ -65,5 +66,6 @@ export declare class PublicApiClient extends AbstractRestfulClient {
65
66
  getSupportCenterClient(): SupportCenterClient;
66
67
  getCatalogClient(): CatalogClient;
67
68
  getUserClient(): UserClient;
69
+ getNotificationsClient(): NotificationsClient;
68
70
  }
69
71
  export default PublicApiClient;
@@ -16,6 +16,7 @@ const cartClient_1 = require("./cart/cartClient");
16
16
  const supportCenter_1 = require("./supportCenter");
17
17
  const catalog_1 = require("./catalog");
18
18
  const user_1 = require("./user");
19
+ const notifications_1 = require("./notifications");
19
20
  /**
20
21
  * Public API Client class, should be the main entry point for your calls
21
22
  */
@@ -160,6 +161,13 @@ class PublicApiClient extends abstractRestfulClient_1.AbstractRestfulClient {
160
161
  .setHeaders(this.headers)
161
162
  .setHttpExceptionHandlers(this.httpExceptionHandlers);
162
163
  }
164
+ getNotificationsClient() {
165
+ return new notifications_1.NotificationsClient()
166
+ .setUrl(this.url)
167
+ .setToken(this.token)
168
+ .setHeaders(this.headers)
169
+ .setHttpExceptionHandlers(this.httpExceptionHandlers);
170
+ }
163
171
  }
164
172
  exports.PublicApiClient = PublicApiClient;
165
173
  exports.default = PublicApiClient;
package/package.json CHANGED
@@ -4,13 +4,13 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/ArrowSphere/nodejs-api-client.git"
6
6
  },
7
- "version": "3.32.0",
7
+ "version": "3.33.0-rc.fdi.1",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",
11
11
  "scripts": {
12
12
  "build": "tsc --build",
13
- "clean": "rimraf build/",
13
+ "clean": "rm -rf build/",
14
14
  "doc": "typedoc ./src/index.ts ./src/**/index.ts",
15
15
  "lint": "eslint ./{src,tests}/**/*.ts && prettier --list-different ./{src,tests}/**/*.ts",
16
16
  "lint:fix": "eslint ./{src,tests}/**/*.ts --fix && prettier --write ./{src,tests}/**/*.ts",