@novu/api 0.0.1-alpha.160 → 0.0.1-alpha.161
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/README.md +1 -1
- package/docs/sdks/credentials/README.md +27 -39
- package/docs/sdks/integrations/README.md +5 -9
- package/docs/sdks/messages/README.md +5 -7
- package/docs/sdks/novumessages/README.md +16 -24
- package/docs/sdks/novusubscribers/README.md +33 -45
- package/docs/sdks/preferences/README.md +10 -16
- package/docs/sdks/properties/README.md +7 -11
- package/docs/sdks/subscribers/README.md +43 -47
- package/docs/sdks/topics/README.md +7 -11
- package/funcs/adminTestingControllerIdempotency.d.ts +1 -1
- package/funcs/adminTestingControllerIdempotency.d.ts.map +1 -1
- package/funcs/adminTestingControllerIdempotency.js +4 -1
- package/funcs/adminTestingControllerIdempotency.js.map +1 -1
- package/funcs/adminTestingControllerIdempotencyGet.d.ts +1 -1
- package/funcs/adminTestingControllerIdempotencyGet.d.ts.map +1 -1
- package/funcs/adminTestingControllerIdempotencyGet.js +1 -2
- package/funcs/adminTestingControllerIdempotencyGet.js.map +1 -1
- package/funcs/integrationsUpdate.d.ts +2 -1
- package/funcs/integrationsUpdate.d.ts.map +1 -1
- package/funcs/integrationsUpdate.js +7 -2
- package/funcs/integrationsUpdate.js.map +1 -1
- package/funcs/messagesDeleteByTransactionId.d.ts +1 -1
- package/funcs/messagesDeleteByTransactionId.d.ts.map +1 -1
- package/funcs/messagesDeleteByTransactionId.js +7 -2
- package/funcs/messagesDeleteByTransactionId.js.map +1 -1
- package/funcs/subscribersCredentialsAppend.d.ts +2 -1
- package/funcs/subscribersCredentialsAppend.d.ts.map +1 -1
- package/funcs/subscribersCredentialsAppend.js +7 -2
- package/funcs/subscribersCredentialsAppend.js.map +1 -1
- package/funcs/subscribersCredentialsDelete.d.ts +1 -1
- package/funcs/subscribersCredentialsDelete.d.ts.map +1 -1
- package/funcs/subscribersCredentialsDelete.js +7 -2
- package/funcs/subscribersCredentialsDelete.js.map +1 -1
- package/funcs/subscribersCredentialsUpdate.d.ts +2 -1
- package/funcs/subscribersCredentialsUpdate.d.ts.map +1 -1
- package/funcs/subscribersCredentialsUpdate.js +7 -2
- package/funcs/subscribersCredentialsUpdate.js.map +1 -1
- package/funcs/subscribersList.d.ts +1 -1
- package/funcs/subscribersList.d.ts.map +1 -1
- package/funcs/subscribersList.js +12 -10
- package/funcs/subscribersList.js.map +1 -1
- package/funcs/subscribersMessagesMarkAll.d.ts +2 -1
- package/funcs/subscribersMessagesMarkAll.d.ts.map +1 -1
- package/funcs/subscribersMessagesMarkAll.js +7 -2
- package/funcs/subscribersMessagesMarkAll.js.map +1 -1
- package/funcs/subscribersMessagesMarkAllAs.d.ts +2 -1
- package/funcs/subscribersMessagesMarkAllAs.d.ts.map +1 -1
- package/funcs/subscribersMessagesMarkAllAs.js +7 -2
- package/funcs/subscribersMessagesMarkAllAs.js.map +1 -1
- package/funcs/subscribersPreferencesList.d.ts +1 -1
- package/funcs/subscribersPreferencesList.d.ts.map +1 -1
- package/funcs/subscribersPreferencesList.js +7 -2
- package/funcs/subscribersPreferencesList.js.map +1 -1
- package/funcs/subscribersPreferencesUpdateGlobal.d.ts +2 -1
- package/funcs/subscribersPreferencesUpdateGlobal.d.ts.map +1 -1
- package/funcs/subscribersPreferencesUpdateGlobal.js +7 -2
- package/funcs/subscribersPreferencesUpdateGlobal.js.map +1 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.d.ts +2 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.d.ts.map +1 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.js +7 -2
- package/funcs/subscribersPropertiesUpdateOnlineFlag.js.map +1 -1
- package/funcs/subscribersRetrieve.d.ts +1 -1
- package/funcs/subscribersRetrieve.d.ts.map +1 -1
- package/funcs/subscribersRetrieve.js +7 -2
- package/funcs/subscribersRetrieve.js.map +1 -1
- package/funcs/subscribersUpdate.d.ts +2 -1
- package/funcs/subscribersUpdate.d.ts.map +1 -1
- package/funcs/subscribersUpdate.js +7 -2
- package/funcs/subscribersUpdate.js.map +1 -1
- package/funcs/topicsRename.d.ts +2 -1
- package/funcs/topicsRename.d.ts.map +1 -1
- package/funcs/topicsRename.js +7 -2
- package/funcs/topicsRename.js.map +1 -1
- package/funcs/topicsSubscribersAssign.d.ts +2 -1
- package/funcs/topicsSubscribersAssign.d.ts.map +1 -1
- package/funcs/topicsSubscribersAssign.js +7 -2
- package/funcs/topicsSubscribersAssign.js.map +1 -1
- package/funcs/topicsSubscribersRemove.d.ts +2 -1
- package/funcs/topicsSubscribersRemove.d.ts.map +1 -1
- package/funcs/topicsSubscribersRemove.js +7 -2
- package/funcs/topicsSubscribersRemove.js.map +1 -1
- package/funcs/topicsSubscribersRetrieve.d.ts +1 -1
- package/funcs/topicsSubscribersRetrieve.d.ts.map +1 -1
- package/funcs/topicsSubscribersRetrieve.js +7 -2
- package/funcs/topicsSubscribersRetrieve.js.map +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/idempotencyresponse.d.ts +25 -0
- package/models/components/idempotencyresponse.d.ts.map +1 -0
- package/models/components/idempotencyresponse.js +55 -0
- package/models/components/idempotencyresponse.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/operations/testingcontrolleridempotency.d.ts +2 -0
- package/models/operations/testingcontrolleridempotency.d.ts.map +1 -1
- package/models/operations/testingcontrolleridempotency.js +4 -0
- package/models/operations/testingcontrolleridempotency.js.map +1 -1
- package/models/operations/testingcontrolleridempotencyget.d.ts +3 -0
- package/models/operations/testingcontrolleridempotencyget.d.ts.map +1 -1
- package/models/operations/testingcontrolleridempotencyget.js +5 -0
- package/models/operations/testingcontrolleridempotencyget.js.map +1 -1
- package/package.json +1 -1
- package/sdk/admin.d.ts +2 -2
- package/sdk/admin.d.ts.map +1 -1
- package/sdk/credentials.d.ts +4 -3
- package/sdk/credentials.d.ts.map +1 -1
- package/sdk/credentials.js +6 -6
- package/sdk/credentials.js.map +1 -1
- package/sdk/integrations.d.ts +1 -1
- package/sdk/integrations.d.ts.map +1 -1
- package/sdk/integrations.js +2 -2
- package/sdk/integrations.js.map +1 -1
- package/sdk/messages.d.ts +1 -1
- package/sdk/messages.d.ts.map +1 -1
- package/sdk/messages.js +2 -2
- package/sdk/messages.js.map +1 -1
- package/sdk/novumessages.d.ts +3 -2
- package/sdk/novumessages.d.ts.map +1 -1
- package/sdk/novumessages.js +4 -4
- package/sdk/novumessages.js.map +1 -1
- package/sdk/novusubscribers.d.ts +4 -3
- package/sdk/novusubscribers.d.ts.map +1 -1
- package/sdk/novusubscribers.js +6 -6
- package/sdk/novusubscribers.js.map +1 -1
- package/sdk/preferences.d.ts +3 -2
- package/sdk/preferences.d.ts.map +1 -1
- package/sdk/preferences.js +4 -4
- package/sdk/preferences.js.map +1 -1
- package/sdk/properties.d.ts +2 -1
- package/sdk/properties.d.ts.map +1 -1
- package/sdk/properties.js +2 -2
- package/sdk/properties.js.map +1 -1
- package/sdk/subscribers.d.ts +3 -3
- package/sdk/subscribers.d.ts.map +1 -1
- package/sdk/subscribers.js +6 -6
- package/sdk/subscribers.js.map +1 -1
- package/sdk/topics.d.ts +1 -1
- package/sdk/topics.d.ts.map +1 -1
- package/sdk/topics.js +2 -2
- package/sdk/topics.js.map +1 -1
- package/src/funcs/adminTestingControllerIdempotency.ts +6 -6
- package/src/funcs/adminTestingControllerIdempotencyGet.ts +5 -5
- package/src/funcs/integrationsUpdate.ts +11 -2
- package/src/funcs/messagesDeleteByTransactionId.ts +11 -2
- package/src/funcs/subscribersCredentialsAppend.ts +13 -2
- package/src/funcs/subscribersCredentialsDelete.ts +11 -2
- package/src/funcs/subscribersCredentialsUpdate.ts +13 -2
- package/src/funcs/subscribersList.ts +17 -10
- package/src/funcs/subscribersMessagesMarkAll.ts +11 -2
- package/src/funcs/subscribersMessagesMarkAllAs.ts +11 -2
- package/src/funcs/subscribersPreferencesList.ts +11 -2
- package/src/funcs/subscribersPreferencesUpdateGlobal.ts +14 -3
- package/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts +14 -2
- package/src/funcs/subscribersRetrieve.ts +10 -2
- package/src/funcs/subscribersUpdate.ts +11 -2
- package/src/funcs/topicsRename.ts +11 -2
- package/src/funcs/topicsSubscribersAssign.ts +11 -2
- package/src/funcs/topicsSubscribersRemove.ts +11 -2
- package/src/funcs/topicsSubscribersRetrieve.ts +10 -2
- package/src/lib/config.ts +2 -2
- package/src/models/components/idempotencyresponse.ts +58 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/testingcontrolleridempotency.ts +6 -0
- package/src/models/operations/testingcontrolleridempotencyget.ts +7 -0
- package/src/sdk/admin.ts +2 -2
- package/src/sdk/credentials.ts +21 -6
- package/src/sdk/integrations.ts +6 -2
- package/src/sdk/messages.ts +6 -2
- package/src/sdk/novumessages.ts +13 -4
- package/src/sdk/novusubscribers.ts +19 -6
- package/src/sdk/preferences.ts +14 -5
- package/src/sdk/properties.ts +8 -2
- package/src/sdk/subscribers.ts +18 -6
- package/src/sdk/topics.ts +6 -2
|
@@ -51,6 +51,7 @@ export * from "./filtertopicsresponsedto.js";
|
|
|
51
51
|
export * from "./getsubscriberpreferencesresponsedto.js";
|
|
52
52
|
export * from "./gettopicresponsedto.js";
|
|
53
53
|
export * from "./idempotencybodydto.js";
|
|
54
|
+
export * from "./idempotencyresponse.js";
|
|
54
55
|
export * from "./integrationresponsedto.js";
|
|
55
56
|
export * from "./markallmessageasrequestdto.js";
|
|
56
57
|
export * from "./markmessageactionasseendto.js";
|
|
@@ -19,6 +19,7 @@ export type TestingControllerIdempotencyRequest = {
|
|
|
19
19
|
|
|
20
20
|
export type TestingControllerIdempotencyResponse = {
|
|
21
21
|
headers: { [k: string]: Array<string> };
|
|
22
|
+
result: components.IdempotencyResponse;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
/** @internal */
|
|
@@ -100,15 +101,18 @@ export const TestingControllerIdempotencyResponse$inboundSchema: z.ZodType<
|
|
|
100
101
|
unknown
|
|
101
102
|
> = z.object({
|
|
102
103
|
Headers: z.record(z.array(z.string())),
|
|
104
|
+
Result: components.IdempotencyResponse$inboundSchema,
|
|
103
105
|
}).transform((v) => {
|
|
104
106
|
return remap$(v, {
|
|
105
107
|
"Headers": "headers",
|
|
108
|
+
"Result": "result",
|
|
106
109
|
});
|
|
107
110
|
});
|
|
108
111
|
|
|
109
112
|
/** @internal */
|
|
110
113
|
export type TestingControllerIdempotencyResponse$Outbound = {
|
|
111
114
|
Headers: { [k: string]: Array<string> };
|
|
115
|
+
Result: components.IdempotencyResponse$Outbound;
|
|
112
116
|
};
|
|
113
117
|
|
|
114
118
|
/** @internal */
|
|
@@ -118,9 +122,11 @@ export const TestingControllerIdempotencyResponse$outboundSchema: z.ZodType<
|
|
|
118
122
|
TestingControllerIdempotencyResponse
|
|
119
123
|
> = z.object({
|
|
120
124
|
headers: z.record(z.array(z.string())),
|
|
125
|
+
result: components.IdempotencyResponse$outboundSchema,
|
|
121
126
|
}).transform((v) => {
|
|
122
127
|
return remap$(v, {
|
|
123
128
|
headers: "Headers",
|
|
129
|
+
result: "Result",
|
|
124
130
|
});
|
|
125
131
|
});
|
|
126
132
|
|
|
@@ -6,6 +6,7 @@ import * as z from "zod";
|
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
|
|
11
12
|
export type TestingControllerIdempotencyGetRequest = {
|
|
@@ -17,6 +18,7 @@ export type TestingControllerIdempotencyGetRequest = {
|
|
|
17
18
|
|
|
18
19
|
export type TestingControllerIdempotencyGetResponse = {
|
|
19
20
|
headers: { [k: string]: Array<string> };
|
|
21
|
+
result: components.IdempotencyResponse;
|
|
20
22
|
};
|
|
21
23
|
|
|
22
24
|
/** @internal */
|
|
@@ -94,15 +96,18 @@ export const TestingControllerIdempotencyGetResponse$inboundSchema: z.ZodType<
|
|
|
94
96
|
unknown
|
|
95
97
|
> = z.object({
|
|
96
98
|
Headers: z.record(z.array(z.string())),
|
|
99
|
+
Result: components.IdempotencyResponse$inboundSchema,
|
|
97
100
|
}).transform((v) => {
|
|
98
101
|
return remap$(v, {
|
|
99
102
|
"Headers": "headers",
|
|
103
|
+
"Result": "result",
|
|
100
104
|
});
|
|
101
105
|
});
|
|
102
106
|
|
|
103
107
|
/** @internal */
|
|
104
108
|
export type TestingControllerIdempotencyGetResponse$Outbound = {
|
|
105
109
|
Headers: { [k: string]: Array<string> };
|
|
110
|
+
Result: components.IdempotencyResponse$Outbound;
|
|
106
111
|
};
|
|
107
112
|
|
|
108
113
|
/** @internal */
|
|
@@ -112,9 +117,11 @@ export const TestingControllerIdempotencyGetResponse$outboundSchema: z.ZodType<
|
|
|
112
117
|
TestingControllerIdempotencyGetResponse
|
|
113
118
|
> = z.object({
|
|
114
119
|
headers: z.record(z.array(z.string())),
|
|
120
|
+
result: components.IdempotencyResponse$outboundSchema,
|
|
115
121
|
}).transform((v) => {
|
|
116
122
|
return remap$(v, {
|
|
117
123
|
headers: "Headers",
|
|
124
|
+
result: "Result",
|
|
118
125
|
});
|
|
119
126
|
});
|
|
120
127
|
|
package/src/sdk/admin.ts
CHANGED
|
@@ -14,7 +14,7 @@ export class Admin extends ClientSDK {
|
|
|
14
14
|
idempotencyBodyDto: components.IdempotencyBodyDto,
|
|
15
15
|
idempotencyKey?: string | undefined,
|
|
16
16
|
options?: RequestOptions,
|
|
17
|
-
): Promise<operations.TestingControllerIdempotencyResponse
|
|
17
|
+
): Promise<operations.TestingControllerIdempotencyResponse> {
|
|
18
18
|
return unwrapAsync(adminTestingControllerIdempotency(
|
|
19
19
|
this,
|
|
20
20
|
idempotencyBodyDto,
|
|
@@ -26,7 +26,7 @@ export class Admin extends ClientSDK {
|
|
|
26
26
|
async testingControllerIdempotencyGet(
|
|
27
27
|
idempotencyKey?: string | undefined,
|
|
28
28
|
options?: RequestOptions,
|
|
29
|
-
): Promise<operations.TestingControllerIdempotencyGetResponse
|
|
29
|
+
): Promise<operations.TestingControllerIdempotencyGetResponse> {
|
|
30
30
|
return unwrapAsync(adminTestingControllerIdempotencyGet(
|
|
31
31
|
this,
|
|
32
32
|
idempotencyKey,
|
package/src/sdk/credentials.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { subscribersCredentialsAppend } from "../funcs/subscribersCredentialsApp
|
|
|
6
6
|
import { subscribersCredentialsDelete } from "../funcs/subscribersCredentialsDelete.js";
|
|
7
7
|
import { subscribersCredentialsUpdate } from "../funcs/subscribersCredentialsUpdate.js";
|
|
8
8
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import * as components from "../models/components/index.js";
|
|
9
10
|
import * as operations from "../models/operations/index.js";
|
|
10
11
|
import { unwrapAsync } from "../types/fp.js";
|
|
11
12
|
|
|
@@ -17,12 +18,17 @@ export class Credentials extends ClientSDK {
|
|
|
17
18
|
* Subscriber credentials associated to the delivery methods such as slack and push tokens.
|
|
18
19
|
*/
|
|
19
20
|
async update(
|
|
20
|
-
|
|
21
|
+
updateSubscriberChannelRequestDto:
|
|
22
|
+
components.UpdateSubscriberChannelRequestDto,
|
|
23
|
+
subscriberId: string,
|
|
24
|
+
idempotencyKey?: string | undefined,
|
|
21
25
|
options?: RequestOptions,
|
|
22
26
|
): Promise<operations.SubscribersControllerUpdateSubscriberChannelResponse> {
|
|
23
27
|
return unwrapAsync(subscribersCredentialsUpdate(
|
|
24
28
|
this,
|
|
25
|
-
|
|
29
|
+
updateSubscriberChannelRequestDto,
|
|
30
|
+
subscriberId,
|
|
31
|
+
idempotencyKey,
|
|
26
32
|
options,
|
|
27
33
|
));
|
|
28
34
|
}
|
|
@@ -36,12 +42,17 @@ export class Credentials extends ClientSDK {
|
|
|
36
42
|
* This endpoint appends provided credentials and deviceTokens to the existing ones.
|
|
37
43
|
*/
|
|
38
44
|
async append(
|
|
39
|
-
|
|
45
|
+
updateSubscriberChannelRequestDto:
|
|
46
|
+
components.UpdateSubscriberChannelRequestDto,
|
|
47
|
+
subscriberId: string,
|
|
48
|
+
idempotencyKey?: string | undefined,
|
|
40
49
|
options?: RequestOptions,
|
|
41
50
|
): Promise<operations.SubscribersControllerModifySubscriberChannelResponse> {
|
|
42
51
|
return unwrapAsync(subscribersCredentialsAppend(
|
|
43
52
|
this,
|
|
44
|
-
|
|
53
|
+
updateSubscriberChannelRequestDto,
|
|
54
|
+
subscriberId,
|
|
55
|
+
idempotencyKey,
|
|
45
56
|
options,
|
|
46
57
|
));
|
|
47
58
|
}
|
|
@@ -53,7 +64,9 @@ export class Credentials extends ClientSDK {
|
|
|
53
64
|
* Delete subscriber credentials such as slack and expo tokens.
|
|
54
65
|
*/
|
|
55
66
|
async delete(
|
|
56
|
-
|
|
67
|
+
subscriberId: string,
|
|
68
|
+
providerId: string,
|
|
69
|
+
idempotencyKey?: string | undefined,
|
|
57
70
|
options?: RequestOptions,
|
|
58
71
|
): Promise<
|
|
59
72
|
| operations.SubscribersControllerDeleteSubscriberCredentialsResponse
|
|
@@ -61,7 +74,9 @@ export class Credentials extends ClientSDK {
|
|
|
61
74
|
> {
|
|
62
75
|
return unwrapAsync(subscribersCredentialsDelete(
|
|
63
76
|
this,
|
|
64
|
-
|
|
77
|
+
subscriberId,
|
|
78
|
+
providerId,
|
|
79
|
+
idempotencyKey,
|
|
65
80
|
options,
|
|
66
81
|
));
|
|
67
82
|
}
|
package/src/sdk/integrations.ts
CHANGED
|
@@ -77,12 +77,16 @@ export class Integrations extends ClientSDK {
|
|
|
77
77
|
* Update integration
|
|
78
78
|
*/
|
|
79
79
|
async update(
|
|
80
|
-
|
|
80
|
+
updateIntegrationRequestDto: components.UpdateIntegrationRequestDto,
|
|
81
|
+
integrationId: string,
|
|
82
|
+
idempotencyKey?: string | undefined,
|
|
81
83
|
options?: RequestOptions,
|
|
82
84
|
): Promise<operations.IntegrationsControllerUpdateIntegrationByIdResponse> {
|
|
83
85
|
return unwrapAsync(integrationsUpdate(
|
|
84
86
|
this,
|
|
85
|
-
|
|
87
|
+
updateIntegrationRequestDto,
|
|
88
|
+
integrationId,
|
|
89
|
+
idempotencyKey,
|
|
86
90
|
options,
|
|
87
91
|
));
|
|
88
92
|
}
|
package/src/sdk/messages.ts
CHANGED
|
@@ -53,7 +53,9 @@ export class Messages extends ClientSDK {
|
|
|
53
53
|
* Deletes messages entity from the Novu platform using TransactionId of message
|
|
54
54
|
*/
|
|
55
55
|
async deleteByTransactionId(
|
|
56
|
-
|
|
56
|
+
transactionId: string,
|
|
57
|
+
idempotencyKey?: string | undefined,
|
|
58
|
+
channel?: operations.Channel | undefined,
|
|
57
59
|
options?: RequestOptions,
|
|
58
60
|
): Promise<
|
|
59
61
|
| operations.MessagesControllerDeleteMessagesByTransactionIdResponse
|
|
@@ -61,7 +63,9 @@ export class Messages extends ClientSDK {
|
|
|
61
63
|
> {
|
|
62
64
|
return unwrapAsync(messagesDeleteByTransactionId(
|
|
63
65
|
this,
|
|
64
|
-
|
|
66
|
+
transactionId,
|
|
67
|
+
idempotencyKey,
|
|
68
|
+
channel,
|
|
65
69
|
options,
|
|
66
70
|
));
|
|
67
71
|
}
|
package/src/sdk/novumessages.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { subscribersMessagesMarkAll } from "../funcs/subscribersMessagesMarkAll.
|
|
|
6
6
|
import { subscribersMessagesMarkAllAs } from "../funcs/subscribersMessagesMarkAllAs.js";
|
|
7
7
|
import { subscribersMessagesUpdateAsSeen } from "../funcs/subscribersMessagesUpdateAsSeen.js";
|
|
8
8
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import * as components from "../models/components/index.js";
|
|
9
10
|
import * as operations from "../models/operations/index.js";
|
|
10
11
|
import { unwrapAsync } from "../types/fp.js";
|
|
11
12
|
|
|
@@ -14,12 +15,16 @@ export class NovuMessages extends ClientSDK {
|
|
|
14
15
|
* Mark a subscriber messages as seen, read, unseen or unread
|
|
15
16
|
*/
|
|
16
17
|
async markAllAs(
|
|
17
|
-
|
|
18
|
+
messageMarkAsRequestDto: components.MessageMarkAsRequestDto,
|
|
19
|
+
subscriberId: string,
|
|
20
|
+
idempotencyKey?: string | undefined,
|
|
18
21
|
options?: RequestOptions,
|
|
19
22
|
): Promise<operations.SubscribersControllerMarkMessagesAsResponse> {
|
|
20
23
|
return unwrapAsync(subscribersMessagesMarkAllAs(
|
|
21
24
|
this,
|
|
22
|
-
|
|
25
|
+
messageMarkAsRequestDto,
|
|
26
|
+
subscriberId,
|
|
27
|
+
idempotencyKey,
|
|
23
28
|
options,
|
|
24
29
|
));
|
|
25
30
|
}
|
|
@@ -28,12 +33,16 @@ export class NovuMessages extends ClientSDK {
|
|
|
28
33
|
* Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.
|
|
29
34
|
*/
|
|
30
35
|
async markAll(
|
|
31
|
-
|
|
36
|
+
markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto,
|
|
37
|
+
subscriberId: string,
|
|
38
|
+
idempotencyKey?: string | undefined,
|
|
32
39
|
options?: RequestOptions,
|
|
33
40
|
): Promise<operations.SubscribersControllerMarkAllUnreadAsReadResponse> {
|
|
34
41
|
return unwrapAsync(subscribersMessagesMarkAll(
|
|
35
42
|
this,
|
|
36
|
-
|
|
43
|
+
markAllMessageAsRequestDto,
|
|
44
|
+
subscriberId,
|
|
45
|
+
idempotencyKey,
|
|
37
46
|
options,
|
|
38
47
|
));
|
|
39
48
|
}
|
|
@@ -6,6 +6,7 @@ import { topicsSubscribersAssign } from "../funcs/topicsSubscribersAssign.js";
|
|
|
6
6
|
import { topicsSubscribersRemove } from "../funcs/topicsSubscribersRemove.js";
|
|
7
7
|
import { topicsSubscribersRetrieve } from "../funcs/topicsSubscribersRetrieve.js";
|
|
8
8
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import * as components from "../models/components/index.js";
|
|
9
10
|
import * as operations from "../models/operations/index.js";
|
|
10
11
|
import { unwrapAsync } from "../types/fp.js";
|
|
11
12
|
|
|
@@ -17,12 +18,16 @@ export class NovuSubscribers extends ClientSDK {
|
|
|
17
18
|
* Add subscribers to a topic by key
|
|
18
19
|
*/
|
|
19
20
|
async assign(
|
|
20
|
-
|
|
21
|
+
addSubscribersRequestDto: components.AddSubscribersRequestDto,
|
|
22
|
+
topicKey: string,
|
|
23
|
+
idempotencyKey?: string | undefined,
|
|
21
24
|
options?: RequestOptions,
|
|
22
25
|
): Promise<operations.TopicsControllerAssignResponse> {
|
|
23
26
|
return unwrapAsync(topicsSubscribersAssign(
|
|
24
27
|
this,
|
|
25
|
-
|
|
28
|
+
addSubscribersRequestDto,
|
|
29
|
+
topicKey,
|
|
30
|
+
idempotencyKey,
|
|
26
31
|
options,
|
|
27
32
|
));
|
|
28
33
|
}
|
|
@@ -34,12 +39,16 @@ export class NovuSubscribers extends ClientSDK {
|
|
|
34
39
|
* Check if a subscriber belongs to a certain topic
|
|
35
40
|
*/
|
|
36
41
|
async retrieve(
|
|
37
|
-
|
|
42
|
+
externalSubscriberId: string,
|
|
43
|
+
topicKey: string,
|
|
44
|
+
idempotencyKey?: string | undefined,
|
|
38
45
|
options?: RequestOptions,
|
|
39
46
|
): Promise<operations.TopicsControllerGetTopicSubscriberResponse> {
|
|
40
47
|
return unwrapAsync(topicsSubscribersRetrieve(
|
|
41
48
|
this,
|
|
42
|
-
|
|
49
|
+
externalSubscriberId,
|
|
50
|
+
topicKey,
|
|
51
|
+
idempotencyKey,
|
|
43
52
|
options,
|
|
44
53
|
));
|
|
45
54
|
}
|
|
@@ -51,12 +60,16 @@ export class NovuSubscribers extends ClientSDK {
|
|
|
51
60
|
* Remove subscribers from a topic
|
|
52
61
|
*/
|
|
53
62
|
async remove(
|
|
54
|
-
|
|
63
|
+
removeSubscribersRequestDto: components.RemoveSubscribersRequestDto,
|
|
64
|
+
topicKey: string,
|
|
65
|
+
idempotencyKey?: string | undefined,
|
|
55
66
|
options?: RequestOptions,
|
|
56
67
|
): Promise<operations.TopicsControllerRemoveSubscribersResponse | undefined> {
|
|
57
68
|
return unwrapAsync(topicsSubscribersRemove(
|
|
58
69
|
this,
|
|
59
|
-
|
|
70
|
+
removeSubscribersRequestDto,
|
|
71
|
+
topicKey,
|
|
72
|
+
idempotencyKey,
|
|
60
73
|
options,
|
|
61
74
|
));
|
|
62
75
|
}
|
package/src/sdk/preferences.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { subscribersPreferencesRetrieveByLevel } from "../funcs/subscribersPrefe
|
|
|
7
7
|
import { subscribersPreferencesUpdate } from "../funcs/subscribersPreferencesUpdate.js";
|
|
8
8
|
import { subscribersPreferencesUpdateGlobal } from "../funcs/subscribersPreferencesUpdateGlobal.js";
|
|
9
9
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import * as components from "../models/components/index.js";
|
|
10
11
|
import * as operations from "../models/operations/index.js";
|
|
11
12
|
import { unwrapAsync } from "../types/fp.js";
|
|
12
13
|
|
|
@@ -15,14 +16,18 @@ export class Preferences extends ClientSDK {
|
|
|
15
16
|
* Get subscriber preferences
|
|
16
17
|
*/
|
|
17
18
|
async list(
|
|
18
|
-
|
|
19
|
+
subscriberId: string,
|
|
20
|
+
idempotencyKey?: string | undefined,
|
|
21
|
+
includeInactiveChannels?: boolean | undefined,
|
|
19
22
|
options?: RequestOptions,
|
|
20
23
|
): Promise<
|
|
21
24
|
operations.SubscribersControllerListSubscriberPreferencesResponse
|
|
22
25
|
> {
|
|
23
26
|
return unwrapAsync(subscribersPreferencesList(
|
|
24
27
|
this,
|
|
25
|
-
|
|
28
|
+
subscriberId,
|
|
29
|
+
idempotencyKey,
|
|
30
|
+
includeInactiveChannels,
|
|
26
31
|
options,
|
|
27
32
|
));
|
|
28
33
|
}
|
|
@@ -31,15 +36,19 @@ export class Preferences extends ClientSDK {
|
|
|
31
36
|
* Update subscriber global preferences
|
|
32
37
|
*/
|
|
33
38
|
async updateGlobal(
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
updateSubscriberGlobalPreferencesRequestDto:
|
|
40
|
+
components.UpdateSubscriberGlobalPreferencesRequestDto,
|
|
41
|
+
subscriberId: string,
|
|
42
|
+
idempotencyKey?: string | undefined,
|
|
36
43
|
options?: RequestOptions,
|
|
37
44
|
): Promise<
|
|
38
45
|
operations.SubscribersControllerUpdateSubscriberGlobalPreferencesResponse
|
|
39
46
|
> {
|
|
40
47
|
return unwrapAsync(subscribersPreferencesUpdateGlobal(
|
|
41
48
|
this,
|
|
42
|
-
|
|
49
|
+
updateSubscriberGlobalPreferencesRequestDto,
|
|
50
|
+
subscriberId,
|
|
51
|
+
idempotencyKey,
|
|
43
52
|
options,
|
|
44
53
|
));
|
|
45
54
|
}
|
package/src/sdk/properties.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { subscribersPropertiesUpdateOnlineFlag } from "../funcs/subscribersPropertiesUpdateOnlineFlag.js";
|
|
6
6
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as components from "../models/components/index.js";
|
|
7
8
|
import * as operations from "../models/operations/index.js";
|
|
8
9
|
import { unwrapAsync } from "../types/fp.js";
|
|
9
10
|
|
|
@@ -15,14 +16,19 @@ export class Properties extends ClientSDK {
|
|
|
15
16
|
* Used to update the subscriber isOnline flag.
|
|
16
17
|
*/
|
|
17
18
|
async updateOnlineFlag(
|
|
18
|
-
|
|
19
|
+
updateSubscriberOnlineFlagRequestDto:
|
|
20
|
+
components.UpdateSubscriberOnlineFlagRequestDto,
|
|
21
|
+
subscriberId: string,
|
|
22
|
+
idempotencyKey?: string | undefined,
|
|
19
23
|
options?: RequestOptions,
|
|
20
24
|
): Promise<
|
|
21
25
|
operations.SubscribersControllerUpdateSubscriberOnlineFlagResponse
|
|
22
26
|
> {
|
|
23
27
|
return unwrapAsync(subscribersPropertiesUpdateOnlineFlag(
|
|
24
28
|
this,
|
|
25
|
-
|
|
29
|
+
updateSubscriberOnlineFlagRequestDto,
|
|
30
|
+
subscriberId,
|
|
31
|
+
idempotencyKey,
|
|
26
32
|
options,
|
|
27
33
|
));
|
|
28
34
|
}
|
package/src/sdk/subscribers.ts
CHANGED
|
@@ -58,7 +58,9 @@ export class Subscribers extends ClientSDK {
|
|
|
58
58
|
* Returns a list of subscribers, could paginated using the `page` and `limit` query parameter
|
|
59
59
|
*/
|
|
60
60
|
async list(
|
|
61
|
-
|
|
61
|
+
idempotencyKey?: string | undefined,
|
|
62
|
+
page?: number | undefined,
|
|
63
|
+
limit?: number | undefined,
|
|
62
64
|
options?: RequestOptions,
|
|
63
65
|
): Promise<
|
|
64
66
|
PageIterator<
|
|
@@ -68,7 +70,9 @@ export class Subscribers extends ClientSDK {
|
|
|
68
70
|
> {
|
|
69
71
|
return unwrapResultIterator(subscribersList(
|
|
70
72
|
this,
|
|
71
|
-
|
|
73
|
+
idempotencyKey,
|
|
74
|
+
page,
|
|
75
|
+
limit,
|
|
72
76
|
options,
|
|
73
77
|
));
|
|
74
78
|
}
|
|
@@ -99,12 +103,16 @@ export class Subscribers extends ClientSDK {
|
|
|
99
103
|
* Get subscriber by your internal id used to identify the subscriber
|
|
100
104
|
*/
|
|
101
105
|
async retrieve(
|
|
102
|
-
|
|
106
|
+
subscriberId: string,
|
|
107
|
+
idempotencyKey?: string | undefined,
|
|
108
|
+
includeTopics?: boolean | undefined,
|
|
103
109
|
options?: RequestOptions,
|
|
104
110
|
): Promise<operations.SubscribersControllerGetSubscriberResponse> {
|
|
105
111
|
return unwrapAsync(subscribersRetrieve(
|
|
106
112
|
this,
|
|
107
|
-
|
|
113
|
+
subscriberId,
|
|
114
|
+
idempotencyKey,
|
|
115
|
+
includeTopics,
|
|
108
116
|
options,
|
|
109
117
|
));
|
|
110
118
|
}
|
|
@@ -116,12 +124,16 @@ export class Subscribers extends ClientSDK {
|
|
|
116
124
|
* Used to update the subscriber entity with new information
|
|
117
125
|
*/
|
|
118
126
|
async update(
|
|
119
|
-
|
|
127
|
+
updateSubscriberRequestDto: components.UpdateSubscriberRequestDto,
|
|
128
|
+
subscriberId: string,
|
|
129
|
+
idempotencyKey?: string | undefined,
|
|
120
130
|
options?: RequestOptions,
|
|
121
131
|
): Promise<operations.SubscribersControllerUpdateSubscriberResponse> {
|
|
122
132
|
return unwrapAsync(subscribersUpdate(
|
|
123
133
|
this,
|
|
124
|
-
|
|
134
|
+
updateSubscriberRequestDto,
|
|
135
|
+
subscriberId,
|
|
136
|
+
idempotencyKey,
|
|
125
137
|
options,
|
|
126
138
|
));
|
|
127
139
|
}
|
package/src/sdk/topics.ts
CHANGED
|
@@ -100,12 +100,16 @@ export class Topics extends ClientSDK {
|
|
|
100
100
|
* Rename a topic by providing a new name
|
|
101
101
|
*/
|
|
102
102
|
async rename(
|
|
103
|
-
|
|
103
|
+
renameTopicRequestDto: components.RenameTopicRequestDto,
|
|
104
|
+
topicKey: string,
|
|
105
|
+
idempotencyKey?: string | undefined,
|
|
104
106
|
options?: RequestOptions,
|
|
105
107
|
): Promise<operations.TopicsControllerRenameTopicResponse> {
|
|
106
108
|
return unwrapAsync(topicsRename(
|
|
107
109
|
this,
|
|
108
|
-
|
|
110
|
+
renameTopicRequestDto,
|
|
111
|
+
topicKey,
|
|
112
|
+
idempotencyKey,
|
|
109
113
|
options,
|
|
110
114
|
));
|
|
111
115
|
}
|