@novu/api 0.0.1-alpha.155 → 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 +14 -1
- package/docs/sdks/admin/README.md +161 -0
- 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/novu/README.md +211 -1
- 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 +11 -0
- package/funcs/adminTestingControllerIdempotency.d.ts.map +1 -0
- package/funcs/adminTestingControllerIdempotency.js +115 -0
- package/funcs/adminTestingControllerIdempotency.js.map +1 -0
- package/funcs/adminTestingControllerIdempotencyGet.d.ts +10 -0
- package/funcs/adminTestingControllerIdempotencyGet.d.ts.map +1 -0
- package/funcs/adminTestingControllerIdempotencyGet.js +108 -0
- package/funcs/adminTestingControllerIdempotencyGet.js.map +1 -0
- 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/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.d.ts +8 -0
- package/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.d.ts.map +1 -0
- package/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.js +91 -0
- package/funcs/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.js.map +1 -0
- package/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.d.ts +8 -0
- package/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.d.ts.map +1 -0
- package/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.js +91 -0
- package/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.js.map +1 -0
- package/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.d.ts +8 -0
- package/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.d.ts.map +1 -0
- package/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.js +91 -0
- package/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.js.map +1 -0
- 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/idempotencybodydto.d.ts +29 -0
- package/models/components/idempotencybodydto.d.ts.map +1 -0
- package/models/components/idempotencybodydto.js +59 -0
- package/models/components/idempotencybodydto.js.map +1 -0
- 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 +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/testingcontrolleridempotency.d.ts +66 -0
- package/models/operations/testingcontrolleridempotency.d.ts.map +1 -0
- package/models/operations/testingcontrolleridempotency.js +112 -0
- package/models/operations/testingcontrolleridempotency.js.map +1 -0
- package/models/operations/testingcontrolleridempotencyget.d.ts +64 -0
- package/models/operations/testingcontrolleridempotencyget.d.ts.map +1 -0
- package/models/operations/testingcontrolleridempotencyget.js +108 -0
- package/models/operations/testingcontrolleridempotencyget.js.map +1 -0
- package/package.json +1 -1
- package/sdk/admin.d.ts +8 -0
- package/sdk/admin.d.ts.map +1 -0
- package/sdk/admin.js +20 -0
- package/sdk/admin.js.map +1 -0
- 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/sdk.d.ts +6 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +16 -0
- package/sdk/sdk.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 +160 -0
- package/src/funcs/adminTestingControllerIdempotencyGet.ts +155 -0
- 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/testApiRateLimitBulkControllerGlobalCategoryNoCostOverride.ts +114 -0
- package/src/funcs/testApiRateLimitBulkControllerNoCategoryNoCostOverride.ts +114 -0
- package/src/funcs/testApiRateLimitBulkControllerNoCategorySingleCostOverride.ts +114 -0
- 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/idempotencybodydto.ts +66 -0
- package/src/models/components/idempotencyresponse.ts +58 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/testingcontrolleridempotency.ts +167 -0
- package/src/models/operations/testingcontrolleridempotencyget.ts +168 -0
- package/src/sdk/admin.ts +36 -0
- 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/sdk.ts +40 -0
- package/src/sdk/subscribers.ts +18 -6
- package/src/sdk/topics.ts +6 -2
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { NovuCore } from "../core.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import {
|
|
12
|
+
ConnectionError,
|
|
13
|
+
InvalidRequestError,
|
|
14
|
+
RequestAbortedError,
|
|
15
|
+
RequestTimeoutError,
|
|
16
|
+
UnexpectedClientError,
|
|
17
|
+
} from "../models/errors/httpclienterrors.js";
|
|
18
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
19
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
20
|
+
import { Result } from "../types/fp.js";
|
|
21
|
+
|
|
22
|
+
export async function testApiRateLimitBulkControllerGlobalCategoryNoCostOverride(
|
|
23
|
+
client: NovuCore,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): Promise<
|
|
26
|
+
Result<
|
|
27
|
+
boolean,
|
|
28
|
+
| SDKError
|
|
29
|
+
| SDKValidationError
|
|
30
|
+
| UnexpectedClientError
|
|
31
|
+
| InvalidRequestError
|
|
32
|
+
| RequestAbortedError
|
|
33
|
+
| RequestTimeoutError
|
|
34
|
+
| ConnectionError
|
|
35
|
+
>
|
|
36
|
+
> {
|
|
37
|
+
const path = pathToFunc(
|
|
38
|
+
"/v1/rate-limiting-trigger-bulk/global-category-no-cost-override",
|
|
39
|
+
)();
|
|
40
|
+
|
|
41
|
+
const headers = new Headers({
|
|
42
|
+
Accept: "application/json",
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
46
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
47
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
48
|
+
|
|
49
|
+
const context = {
|
|
50
|
+
operationID: "TestApiRateLimitBulkController_globalCategoryNoCostOverride",
|
|
51
|
+
oAuth2Scopes: [],
|
|
52
|
+
|
|
53
|
+
resolvedSecurity: requestSecurity,
|
|
54
|
+
|
|
55
|
+
securitySource: client._options.apiKey,
|
|
56
|
+
retryConfig: options?.retries
|
|
57
|
+
|| client._options.retryConfig
|
|
58
|
+
|| {
|
|
59
|
+
strategy: "backoff",
|
|
60
|
+
backoff: {
|
|
61
|
+
initialInterval: 1000,
|
|
62
|
+
maxInterval: 30000,
|
|
63
|
+
exponent: 1.5,
|
|
64
|
+
maxElapsedTime: 3600000,
|
|
65
|
+
},
|
|
66
|
+
retryConnectionErrors: true,
|
|
67
|
+
}
|
|
68
|
+
|| { strategy: "none" },
|
|
69
|
+
retryCodes: options?.retryCodes || ["408", "422", "429", "5XX"],
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const requestRes = client._createRequest(context, {
|
|
73
|
+
security: requestSecurity,
|
|
74
|
+
method: "GET",
|
|
75
|
+
baseURL: options?.serverURL,
|
|
76
|
+
path: path,
|
|
77
|
+
headers: headers,
|
|
78
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
79
|
+
}, options);
|
|
80
|
+
if (!requestRes.ok) {
|
|
81
|
+
return requestRes;
|
|
82
|
+
}
|
|
83
|
+
const req = requestRes.value;
|
|
84
|
+
|
|
85
|
+
const doResult = await client._do(req, {
|
|
86
|
+
context,
|
|
87
|
+
errorCodes: ["4XX", "5XX"],
|
|
88
|
+
retryConfig: context.retryConfig,
|
|
89
|
+
retryCodes: context.retryCodes,
|
|
90
|
+
});
|
|
91
|
+
if (!doResult.ok) {
|
|
92
|
+
return doResult;
|
|
93
|
+
}
|
|
94
|
+
const response = doResult.value;
|
|
95
|
+
|
|
96
|
+
const [result] = await M.match<
|
|
97
|
+
boolean,
|
|
98
|
+
| SDKError
|
|
99
|
+
| SDKValidationError
|
|
100
|
+
| UnexpectedClientError
|
|
101
|
+
| InvalidRequestError
|
|
102
|
+
| RequestAbortedError
|
|
103
|
+
| RequestTimeoutError
|
|
104
|
+
| ConnectionError
|
|
105
|
+
>(
|
|
106
|
+
M.json(200, z.boolean()),
|
|
107
|
+
M.fail(["4XX", "5XX"]),
|
|
108
|
+
)(response);
|
|
109
|
+
if (!result.ok) {
|
|
110
|
+
return result;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { NovuCore } from "../core.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import {
|
|
12
|
+
ConnectionError,
|
|
13
|
+
InvalidRequestError,
|
|
14
|
+
RequestAbortedError,
|
|
15
|
+
RequestTimeoutError,
|
|
16
|
+
UnexpectedClientError,
|
|
17
|
+
} from "../models/errors/httpclienterrors.js";
|
|
18
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
19
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
20
|
+
import { Result } from "../types/fp.js";
|
|
21
|
+
|
|
22
|
+
export async function testApiRateLimitBulkControllerNoCategoryNoCostOverride(
|
|
23
|
+
client: NovuCore,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): Promise<
|
|
26
|
+
Result<
|
|
27
|
+
boolean,
|
|
28
|
+
| SDKError
|
|
29
|
+
| SDKValidationError
|
|
30
|
+
| UnexpectedClientError
|
|
31
|
+
| InvalidRequestError
|
|
32
|
+
| RequestAbortedError
|
|
33
|
+
| RequestTimeoutError
|
|
34
|
+
| ConnectionError
|
|
35
|
+
>
|
|
36
|
+
> {
|
|
37
|
+
const path = pathToFunc(
|
|
38
|
+
"/v1/rate-limiting-trigger-bulk/no-category-no-cost-override",
|
|
39
|
+
)();
|
|
40
|
+
|
|
41
|
+
const headers = new Headers({
|
|
42
|
+
Accept: "application/json",
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
46
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
47
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
48
|
+
|
|
49
|
+
const context = {
|
|
50
|
+
operationID: "TestApiRateLimitBulkController_noCategoryNoCostOverride",
|
|
51
|
+
oAuth2Scopes: [],
|
|
52
|
+
|
|
53
|
+
resolvedSecurity: requestSecurity,
|
|
54
|
+
|
|
55
|
+
securitySource: client._options.apiKey,
|
|
56
|
+
retryConfig: options?.retries
|
|
57
|
+
|| client._options.retryConfig
|
|
58
|
+
|| {
|
|
59
|
+
strategy: "backoff",
|
|
60
|
+
backoff: {
|
|
61
|
+
initialInterval: 1000,
|
|
62
|
+
maxInterval: 30000,
|
|
63
|
+
exponent: 1.5,
|
|
64
|
+
maxElapsedTime: 3600000,
|
|
65
|
+
},
|
|
66
|
+
retryConnectionErrors: true,
|
|
67
|
+
}
|
|
68
|
+
|| { strategy: "none" },
|
|
69
|
+
retryCodes: options?.retryCodes || ["408", "422", "429", "5XX"],
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const requestRes = client._createRequest(context, {
|
|
73
|
+
security: requestSecurity,
|
|
74
|
+
method: "GET",
|
|
75
|
+
baseURL: options?.serverURL,
|
|
76
|
+
path: path,
|
|
77
|
+
headers: headers,
|
|
78
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
79
|
+
}, options);
|
|
80
|
+
if (!requestRes.ok) {
|
|
81
|
+
return requestRes;
|
|
82
|
+
}
|
|
83
|
+
const req = requestRes.value;
|
|
84
|
+
|
|
85
|
+
const doResult = await client._do(req, {
|
|
86
|
+
context,
|
|
87
|
+
errorCodes: ["4XX", "5XX"],
|
|
88
|
+
retryConfig: context.retryConfig,
|
|
89
|
+
retryCodes: context.retryCodes,
|
|
90
|
+
});
|
|
91
|
+
if (!doResult.ok) {
|
|
92
|
+
return doResult;
|
|
93
|
+
}
|
|
94
|
+
const response = doResult.value;
|
|
95
|
+
|
|
96
|
+
const [result] = await M.match<
|
|
97
|
+
boolean,
|
|
98
|
+
| SDKError
|
|
99
|
+
| SDKValidationError
|
|
100
|
+
| UnexpectedClientError
|
|
101
|
+
| InvalidRequestError
|
|
102
|
+
| RequestAbortedError
|
|
103
|
+
| RequestTimeoutError
|
|
104
|
+
| ConnectionError
|
|
105
|
+
>(
|
|
106
|
+
M.json(200, z.boolean()),
|
|
107
|
+
M.fail(["4XX", "5XX"]),
|
|
108
|
+
)(response);
|
|
109
|
+
if (!result.ok) {
|
|
110
|
+
return result;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { NovuCore } from "../core.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import {
|
|
12
|
+
ConnectionError,
|
|
13
|
+
InvalidRequestError,
|
|
14
|
+
RequestAbortedError,
|
|
15
|
+
RequestTimeoutError,
|
|
16
|
+
UnexpectedClientError,
|
|
17
|
+
} from "../models/errors/httpclienterrors.js";
|
|
18
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
19
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
20
|
+
import { Result } from "../types/fp.js";
|
|
21
|
+
|
|
22
|
+
export async function testApiRateLimitBulkControllerNoCategorySingleCostOverride(
|
|
23
|
+
client: NovuCore,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): Promise<
|
|
26
|
+
Result<
|
|
27
|
+
boolean,
|
|
28
|
+
| SDKError
|
|
29
|
+
| SDKValidationError
|
|
30
|
+
| UnexpectedClientError
|
|
31
|
+
| InvalidRequestError
|
|
32
|
+
| RequestAbortedError
|
|
33
|
+
| RequestTimeoutError
|
|
34
|
+
| ConnectionError
|
|
35
|
+
>
|
|
36
|
+
> {
|
|
37
|
+
const path = pathToFunc(
|
|
38
|
+
"/v1/rate-limiting-trigger-bulk/no-category-single-cost-override",
|
|
39
|
+
)();
|
|
40
|
+
|
|
41
|
+
const headers = new Headers({
|
|
42
|
+
Accept: "application/json",
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
46
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
47
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
48
|
+
|
|
49
|
+
const context = {
|
|
50
|
+
operationID: "TestApiRateLimitBulkController_noCategorySingleCostOverride",
|
|
51
|
+
oAuth2Scopes: [],
|
|
52
|
+
|
|
53
|
+
resolvedSecurity: requestSecurity,
|
|
54
|
+
|
|
55
|
+
securitySource: client._options.apiKey,
|
|
56
|
+
retryConfig: options?.retries
|
|
57
|
+
|| client._options.retryConfig
|
|
58
|
+
|| {
|
|
59
|
+
strategy: "backoff",
|
|
60
|
+
backoff: {
|
|
61
|
+
initialInterval: 1000,
|
|
62
|
+
maxInterval: 30000,
|
|
63
|
+
exponent: 1.5,
|
|
64
|
+
maxElapsedTime: 3600000,
|
|
65
|
+
},
|
|
66
|
+
retryConnectionErrors: true,
|
|
67
|
+
}
|
|
68
|
+
|| { strategy: "none" },
|
|
69
|
+
retryCodes: options?.retryCodes || ["408", "422", "429", "5XX"],
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const requestRes = client._createRequest(context, {
|
|
73
|
+
security: requestSecurity,
|
|
74
|
+
method: "GET",
|
|
75
|
+
baseURL: options?.serverURL,
|
|
76
|
+
path: path,
|
|
77
|
+
headers: headers,
|
|
78
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
79
|
+
}, options);
|
|
80
|
+
if (!requestRes.ok) {
|
|
81
|
+
return requestRes;
|
|
82
|
+
}
|
|
83
|
+
const req = requestRes.value;
|
|
84
|
+
|
|
85
|
+
const doResult = await client._do(req, {
|
|
86
|
+
context,
|
|
87
|
+
errorCodes: ["4XX", "5XX"],
|
|
88
|
+
retryConfig: context.retryConfig,
|
|
89
|
+
retryCodes: context.retryCodes,
|
|
90
|
+
});
|
|
91
|
+
if (!doResult.ok) {
|
|
92
|
+
return doResult;
|
|
93
|
+
}
|
|
94
|
+
const response = doResult.value;
|
|
95
|
+
|
|
96
|
+
const [result] = await M.match<
|
|
97
|
+
boolean,
|
|
98
|
+
| SDKError
|
|
99
|
+
| SDKValidationError
|
|
100
|
+
| UnexpectedClientError
|
|
101
|
+
| InvalidRequestError
|
|
102
|
+
| RequestAbortedError
|
|
103
|
+
| RequestTimeoutError
|
|
104
|
+
| ConnectionError
|
|
105
|
+
>(
|
|
106
|
+
M.json(200, z.boolean()),
|
|
107
|
+
M.fail(["4XX", "5XX"]),
|
|
108
|
+
)(response);
|
|
109
|
+
if (!result.ok) {
|
|
110
|
+
return result;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
@@ -9,6 +9,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
9
9
|
import { RequestOptions } from "../lib/sdks.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as components from "../models/components/index.js";
|
|
12
13
|
import {
|
|
13
14
|
ConnectionError,
|
|
14
15
|
InvalidRequestError,
|
|
@@ -30,7 +31,9 @@ import { Result } from "../types/fp.js";
|
|
|
30
31
|
*/
|
|
31
32
|
export async function topicsRename(
|
|
32
33
|
client: NovuCore,
|
|
33
|
-
|
|
34
|
+
renameTopicRequestDto: components.RenameTopicRequestDto,
|
|
35
|
+
topicKey: string,
|
|
36
|
+
idempotencyKey?: string | undefined,
|
|
34
37
|
options?: RequestOptions,
|
|
35
38
|
): Promise<
|
|
36
39
|
Result<
|
|
@@ -46,8 +49,14 @@ export async function topicsRename(
|
|
|
46
49
|
| ConnectionError
|
|
47
50
|
>
|
|
48
51
|
> {
|
|
52
|
+
const input: operations.TopicsControllerRenameTopicRequest = {
|
|
53
|
+
renameTopicRequestDto: renameTopicRequestDto,
|
|
54
|
+
topicKey: topicKey,
|
|
55
|
+
idempotencyKey: idempotencyKey,
|
|
56
|
+
};
|
|
57
|
+
|
|
49
58
|
const parsed = safeParse(
|
|
50
|
-
|
|
59
|
+
input,
|
|
51
60
|
(value) =>
|
|
52
61
|
operations.TopicsControllerRenameTopicRequest$outboundSchema.parse(value),
|
|
53
62
|
"Input validation failed",
|
|
@@ -9,6 +9,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
9
9
|
import { RequestOptions } from "../lib/sdks.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as components from "../models/components/index.js";
|
|
12
13
|
import {
|
|
13
14
|
ConnectionError,
|
|
14
15
|
InvalidRequestError,
|
|
@@ -30,7 +31,9 @@ import { Result } from "../types/fp.js";
|
|
|
30
31
|
*/
|
|
31
32
|
export async function topicsSubscribersAssign(
|
|
32
33
|
client: NovuCore,
|
|
33
|
-
|
|
34
|
+
addSubscribersRequestDto: components.AddSubscribersRequestDto,
|
|
35
|
+
topicKey: string,
|
|
36
|
+
idempotencyKey?: string | undefined,
|
|
34
37
|
options?: RequestOptions,
|
|
35
38
|
): Promise<
|
|
36
39
|
Result<
|
|
@@ -46,8 +49,14 @@ export async function topicsSubscribersAssign(
|
|
|
46
49
|
| ConnectionError
|
|
47
50
|
>
|
|
48
51
|
> {
|
|
52
|
+
const input: operations.TopicsControllerAssignRequest = {
|
|
53
|
+
addSubscribersRequestDto: addSubscribersRequestDto,
|
|
54
|
+
topicKey: topicKey,
|
|
55
|
+
idempotencyKey: idempotencyKey,
|
|
56
|
+
};
|
|
57
|
+
|
|
49
58
|
const parsed = safeParse(
|
|
50
|
-
|
|
59
|
+
input,
|
|
51
60
|
(value) =>
|
|
52
61
|
operations.TopicsControllerAssignRequest$outboundSchema.parse(value),
|
|
53
62
|
"Input validation failed",
|
|
@@ -9,6 +9,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
9
9
|
import { RequestOptions } from "../lib/sdks.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as components from "../models/components/index.js";
|
|
12
13
|
import {
|
|
13
14
|
ConnectionError,
|
|
14
15
|
InvalidRequestError,
|
|
@@ -30,7 +31,9 @@ import { Result } from "../types/fp.js";
|
|
|
30
31
|
*/
|
|
31
32
|
export async function topicsSubscribersRemove(
|
|
32
33
|
client: NovuCore,
|
|
33
|
-
|
|
34
|
+
removeSubscribersRequestDto: components.RemoveSubscribersRequestDto,
|
|
35
|
+
topicKey: string,
|
|
36
|
+
idempotencyKey?: string | undefined,
|
|
34
37
|
options?: RequestOptions,
|
|
35
38
|
): Promise<
|
|
36
39
|
Result<
|
|
@@ -46,8 +49,14 @@ export async function topicsSubscribersRemove(
|
|
|
46
49
|
| ConnectionError
|
|
47
50
|
>
|
|
48
51
|
> {
|
|
52
|
+
const input: operations.TopicsControllerRemoveSubscribersRequest = {
|
|
53
|
+
removeSubscribersRequestDto: removeSubscribersRequestDto,
|
|
54
|
+
topicKey: topicKey,
|
|
55
|
+
idempotencyKey: idempotencyKey,
|
|
56
|
+
};
|
|
57
|
+
|
|
49
58
|
const parsed = safeParse(
|
|
50
|
-
|
|
59
|
+
input,
|
|
51
60
|
(value) =>
|
|
52
61
|
operations.TopicsControllerRemoveSubscribersRequest$outboundSchema.parse(
|
|
53
62
|
value,
|
|
@@ -30,7 +30,9 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*/
|
|
31
31
|
export async function topicsSubscribersRetrieve(
|
|
32
32
|
client: NovuCore,
|
|
33
|
-
|
|
33
|
+
externalSubscriberId: string,
|
|
34
|
+
topicKey: string,
|
|
35
|
+
idempotencyKey?: string | undefined,
|
|
34
36
|
options?: RequestOptions,
|
|
35
37
|
): Promise<
|
|
36
38
|
Result<
|
|
@@ -46,8 +48,14 @@ export async function topicsSubscribersRetrieve(
|
|
|
46
48
|
| ConnectionError
|
|
47
49
|
>
|
|
48
50
|
> {
|
|
51
|
+
const input: operations.TopicsControllerGetTopicSubscriberRequest = {
|
|
52
|
+
externalSubscriberId: externalSubscriberId,
|
|
53
|
+
topicKey: topicKey,
|
|
54
|
+
idempotencyKey: idempotencyKey,
|
|
55
|
+
};
|
|
56
|
+
|
|
49
57
|
const parsed = safeParse(
|
|
50
|
-
|
|
58
|
+
input,
|
|
51
59
|
(value) =>
|
|
52
60
|
operations.TopicsControllerGetTopicSubscriberRequest$outboundSchema.parse(
|
|
53
61
|
value,
|
package/src/lib/config.ts
CHANGED
|
@@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
55
55
|
export const SDK_METADATA = {
|
|
56
56
|
language: "typescript",
|
|
57
57
|
openapiDocVersion: "1.0",
|
|
58
|
-
sdkVersion: "0.0.1-alpha.
|
|
58
|
+
sdkVersion: "0.0.1-alpha.161",
|
|
59
59
|
genVersion: "2.483.6",
|
|
60
|
-
userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.
|
|
60
|
+
userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.161 2.483.6 1.0 @novu/api",
|
|
61
61
|
} as const;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type IdempotencyBodyDto = {
|
|
11
|
+
data: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const IdempotencyBodyDto$inboundSchema: z.ZodType<
|
|
16
|
+
IdempotencyBodyDto,
|
|
17
|
+
z.ZodTypeDef,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({
|
|
20
|
+
data: z.number(),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type IdempotencyBodyDto$Outbound = {
|
|
25
|
+
data: number;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const IdempotencyBodyDto$outboundSchema: z.ZodType<
|
|
30
|
+
IdempotencyBodyDto$Outbound,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
IdempotencyBodyDto
|
|
33
|
+
> = z.object({
|
|
34
|
+
data: z.number(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
40
|
+
*/
|
|
41
|
+
export namespace IdempotencyBodyDto$ {
|
|
42
|
+
/** @deprecated use `IdempotencyBodyDto$inboundSchema` instead. */
|
|
43
|
+
export const inboundSchema = IdempotencyBodyDto$inboundSchema;
|
|
44
|
+
/** @deprecated use `IdempotencyBodyDto$outboundSchema` instead. */
|
|
45
|
+
export const outboundSchema = IdempotencyBodyDto$outboundSchema;
|
|
46
|
+
/** @deprecated use `IdempotencyBodyDto$Outbound` instead. */
|
|
47
|
+
export type Outbound = IdempotencyBodyDto$Outbound;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function idempotencyBodyDtoToJSON(
|
|
51
|
+
idempotencyBodyDto: IdempotencyBodyDto,
|
|
52
|
+
): string {
|
|
53
|
+
return JSON.stringify(
|
|
54
|
+
IdempotencyBodyDto$outboundSchema.parse(idempotencyBodyDto),
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function idempotencyBodyDtoFromJSON(
|
|
59
|
+
jsonString: string,
|
|
60
|
+
): SafeParseResult<IdempotencyBodyDto, SDKValidationError> {
|
|
61
|
+
return safeParse(
|
|
62
|
+
jsonString,
|
|
63
|
+
(x) => IdempotencyBodyDto$inboundSchema.parse(JSON.parse(x)),
|
|
64
|
+
`Failed to parse 'IdempotencyBodyDto' from JSON`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type IdempotencyResponse = {};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const IdempotencyResponse$inboundSchema: z.ZodType<
|
|
14
|
+
IdempotencyResponse,
|
|
15
|
+
z.ZodTypeDef,
|
|
16
|
+
unknown
|
|
17
|
+
> = z.object({});
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type IdempotencyResponse$Outbound = {};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const IdempotencyResponse$outboundSchema: z.ZodType<
|
|
24
|
+
IdempotencyResponse$Outbound,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
IdempotencyResponse
|
|
27
|
+
> = z.object({});
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
32
|
+
*/
|
|
33
|
+
export namespace IdempotencyResponse$ {
|
|
34
|
+
/** @deprecated use `IdempotencyResponse$inboundSchema` instead. */
|
|
35
|
+
export const inboundSchema = IdempotencyResponse$inboundSchema;
|
|
36
|
+
/** @deprecated use `IdempotencyResponse$outboundSchema` instead. */
|
|
37
|
+
export const outboundSchema = IdempotencyResponse$outboundSchema;
|
|
38
|
+
/** @deprecated use `IdempotencyResponse$Outbound` instead. */
|
|
39
|
+
export type Outbound = IdempotencyResponse$Outbound;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function idempotencyResponseToJSON(
|
|
43
|
+
idempotencyResponse: IdempotencyResponse,
|
|
44
|
+
): string {
|
|
45
|
+
return JSON.stringify(
|
|
46
|
+
IdempotencyResponse$outboundSchema.parse(idempotencyResponse),
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function idempotencyResponseFromJSON(
|
|
51
|
+
jsonString: string,
|
|
52
|
+
): SafeParseResult<IdempotencyResponse, SDKValidationError> {
|
|
53
|
+
return safeParse(
|
|
54
|
+
jsonString,
|
|
55
|
+
(x) => IdempotencyResponse$inboundSchema.parse(JSON.parse(x)),
|
|
56
|
+
`Failed to parse 'IdempotencyResponse' from JSON`,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -50,6 +50,8 @@ export * from "./fieldfilterpartdto.js";
|
|
|
50
50
|
export * from "./filtertopicsresponsedto.js";
|
|
51
51
|
export * from "./getsubscriberpreferencesresponsedto.js";
|
|
52
52
|
export * from "./gettopicresponsedto.js";
|
|
53
|
+
export * from "./idempotencybodydto.js";
|
|
54
|
+
export * from "./idempotencyresponse.js";
|
|
53
55
|
export * from "./integrationresponsedto.js";
|
|
54
56
|
export * from "./markallmessageasrequestdto.js";
|
|
55
57
|
export * from "./markmessageactionasseendto.js";
|
|
@@ -41,6 +41,8 @@ export * from "./subscriberscontrollerupdatesubscriberchannel.js";
|
|
|
41
41
|
export * from "./subscriberscontrollerupdatesubscriberglobalpreferences.js";
|
|
42
42
|
export * from "./subscriberscontrollerupdatesubscriberonlineflag.js";
|
|
43
43
|
export * from "./subscriberscontrollerupdatesubscriberpreference.js";
|
|
44
|
+
export * from "./testingcontrolleridempotency.js";
|
|
45
|
+
export * from "./testingcontrolleridempotencyget.js";
|
|
44
46
|
export * from "./topicscontrollerassign.js";
|
|
45
47
|
export * from "./topicscontrollercreatetopic.js";
|
|
46
48
|
export * from "./topicscontrollerdeletetopic.js";
|