@prezly/sdk 10.4.0 → 11.0.0
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/dist/api/constants.js +1 -1
- package/dist/endpoints/NotificationSubscriptions/Client.d.ts +2 -2
- package/dist/endpoints/NotificationSubscriptions/types.d.ts +3 -5
- package/dist/types/NotificationSubscription.d.ts +14 -2
- package/dist/types/NotificationSubscription.js +10 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.js +1 -3
- package/package.json +1 -1
- package/dist/types/NotificationType.d.ts +0 -7
- package/dist/types/NotificationType.js +0 -1
- package/dist/types/NotificationTypeArea.d.ts +0 -5
- package/dist/types/NotificationTypeArea.js +0 -6
package/dist/api/constants.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { DeferredJobsApiClient } from '../../api';
|
|
2
2
|
import type { NotificationSubscription } from '../../types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { UpdateRequest } from './types';
|
|
4
4
|
export declare class Client {
|
|
5
5
|
private readonly apiClient;
|
|
6
6
|
constructor(apiClient: DeferredJobsApiClient);
|
|
7
7
|
list(): Promise<NotificationSubscription[]>;
|
|
8
|
-
update(payload:
|
|
8
|
+
update(payload: UpdateRequest): Promise<NotificationSubscription[]>;
|
|
9
9
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
is_email_subscribed: boolean;
|
|
5
|
-
}[];
|
|
1
|
+
import type { NotificationSubscription } from '../../types';
|
|
2
|
+
export interface UpdateRequest {
|
|
3
|
+
subscriptions: Pick<NotificationSubscription, 'notification_type' | 'is_email_subscribed'>[];
|
|
6
4
|
}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
import type { NotificationType } from './NotificationType';
|
|
2
1
|
export interface NotificationSubscription {
|
|
3
|
-
notification_type:
|
|
2
|
+
notification_type: NotificationSubscription.Type;
|
|
4
3
|
is_email_subscribed: boolean;
|
|
5
4
|
is_receiving: boolean;
|
|
6
5
|
missing_permissions: string[];
|
|
7
6
|
missing_features: string[];
|
|
8
7
|
}
|
|
8
|
+
export declare namespace NotificationSubscription {
|
|
9
|
+
interface Type {
|
|
10
|
+
id: string;
|
|
11
|
+
title: string;
|
|
12
|
+
description: string | null;
|
|
13
|
+
area: Area;
|
|
14
|
+
}
|
|
15
|
+
enum Area {
|
|
16
|
+
CAMPAIGNS = "Campaigns",
|
|
17
|
+
CONTACTS = "Contacts",
|
|
18
|
+
BILLING_AND_LEGAL = "Billing & Legal"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
export
|
|
1
|
+
export let NotificationSubscription;
|
|
2
|
+
(function (_NotificationSubscription) {
|
|
3
|
+
let Area;
|
|
4
|
+
(function (Area) {
|
|
5
|
+
Area["CAMPAIGNS"] = "Campaigns";
|
|
6
|
+
Area["CONTACTS"] = "Contacts";
|
|
7
|
+
Area["BILLING_AND_LEGAL"] = "Billing & Legal";
|
|
8
|
+
})(Area || (Area = {}));
|
|
9
|
+
_NotificationSubscription.Area = Area;
|
|
10
|
+
})(NotificationSubscription || (NotificationSubscription = {}));
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -28,6 +28,4 @@ export * from "./Snippet.js";
|
|
|
28
28
|
export * from "./Story.js";
|
|
29
29
|
export * from "./User.js";
|
|
30
30
|
export * from "./UserAccount.js";
|
|
31
|
-
export * from "./NotificationSubscription.js";
|
|
32
|
-
export * from "./NotificationType.js";
|
|
33
|
-
export * from "./NotificationTypeArea.js";
|
|
31
|
+
export * from "./NotificationSubscription.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export let NotificationTypeArea;
|
|
2
|
-
(function (NotificationTypeArea) {
|
|
3
|
-
NotificationTypeArea["CAMPAIGNS"] = "Campaigns";
|
|
4
|
-
NotificationTypeArea["CONTACTS"] = "Contacts";
|
|
5
|
-
NotificationTypeArea["BILLING_AND_LEGAL"] = "Billing & Legal";
|
|
6
|
-
})(NotificationTypeArea || (NotificationTypeArea = {}));
|