@novu/api 0.2.1 → 0.3.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/README.md +4 -4
- package/funcs/cancel.d.ts +2 -1
- package/funcs/cancel.d.ts.map +1 -1
- package/funcs/cancel.js +11 -7
- package/funcs/cancel.js.map +1 -1
- package/funcs/integrationsCreate.d.ts +2 -1
- package/funcs/integrationsCreate.d.ts.map +1 -1
- package/funcs/integrationsCreate.js +11 -7
- package/funcs/integrationsCreate.js.map +1 -1
- package/funcs/integrationsDelete.d.ts +2 -1
- package/funcs/integrationsDelete.d.ts.map +1 -1
- package/funcs/integrationsDelete.js +11 -7
- package/funcs/integrationsDelete.js.map +1 -1
- package/funcs/integrationsList.d.ts +2 -1
- package/funcs/integrationsList.d.ts.map +1 -1
- package/funcs/integrationsList.js +11 -7
- package/funcs/integrationsList.js.map +1 -1
- package/funcs/integrationsListActive.d.ts +2 -1
- package/funcs/integrationsListActive.d.ts.map +1 -1
- package/funcs/integrationsListActive.js +11 -7
- package/funcs/integrationsListActive.js.map +1 -1
- package/funcs/integrationsSetAsPrimary.d.ts +2 -1
- package/funcs/integrationsSetAsPrimary.d.ts.map +1 -1
- package/funcs/integrationsSetAsPrimary.js +11 -7
- package/funcs/integrationsSetAsPrimary.js.map +1 -1
- package/funcs/integrationsUpdate.d.ts +2 -1
- package/funcs/integrationsUpdate.d.ts.map +1 -1
- package/funcs/integrationsUpdate.js +11 -7
- package/funcs/integrationsUpdate.js.map +1 -1
- package/funcs/integrationsWebhooksRetrieve.d.ts +2 -1
- package/funcs/integrationsWebhooksRetrieve.d.ts.map +1 -1
- package/funcs/integrationsWebhooksRetrieve.js +11 -7
- package/funcs/integrationsWebhooksRetrieve.js.map +1 -1
- package/funcs/messagesDelete.d.ts +2 -1
- package/funcs/messagesDelete.d.ts.map +1 -1
- package/funcs/messagesDelete.js +11 -7
- package/funcs/messagesDelete.js.map +1 -1
- package/funcs/messagesDeleteByTransactionId.d.ts +2 -1
- package/funcs/messagesDeleteByTransactionId.d.ts.map +1 -1
- package/funcs/messagesDeleteByTransactionId.js +11 -7
- package/funcs/messagesDeleteByTransactionId.js.map +1 -1
- package/funcs/messagesRetrieve.d.ts +2 -1
- package/funcs/messagesRetrieve.d.ts.map +1 -1
- package/funcs/messagesRetrieve.js +11 -7
- package/funcs/messagesRetrieve.js.map +1 -1
- package/funcs/notificationsList.d.ts +2 -1
- package/funcs/notificationsList.d.ts.map +1 -1
- package/funcs/notificationsList.js +12 -7
- package/funcs/notificationsList.js.map +1 -1
- package/funcs/notificationsRetrieve.d.ts +2 -1
- package/funcs/notificationsRetrieve.d.ts.map +1 -1
- package/funcs/notificationsRetrieve.js +11 -7
- package/funcs/notificationsRetrieve.js.map +1 -1
- package/funcs/notificationsStatsGraph.d.ts +2 -1
- package/funcs/notificationsStatsGraph.d.ts.map +1 -1
- package/funcs/notificationsStatsGraph.js +11 -7
- package/funcs/notificationsStatsGraph.js.map +1 -1
- package/funcs/notificationsStatsRetrieve.d.ts +2 -1
- package/funcs/notificationsStatsRetrieve.d.ts.map +1 -1
- package/funcs/notificationsStatsRetrieve.js +11 -7
- package/funcs/notificationsStatsRetrieve.js.map +1 -1
- package/funcs/subscribersAuthenticationChatAccessOauth.d.ts +2 -1
- package/funcs/subscribersAuthenticationChatAccessOauth.d.ts.map +1 -1
- package/funcs/subscribersAuthenticationChatAccessOauth.js +11 -7
- package/funcs/subscribersAuthenticationChatAccessOauth.js.map +1 -1
- package/funcs/subscribersAuthenticationChatAccessOauthCallBack.d.ts +2 -1
- package/funcs/subscribersAuthenticationChatAccessOauthCallBack.d.ts.map +1 -1
- package/funcs/subscribersAuthenticationChatAccessOauthCallBack.js +11 -7
- package/funcs/subscribersAuthenticationChatAccessOauthCallBack.js.map +1 -1
- package/funcs/subscribersCreate.d.ts +2 -1
- package/funcs/subscribersCreate.d.ts.map +1 -1
- package/funcs/subscribersCreate.js +12 -8
- package/funcs/subscribersCreate.js.map +1 -1
- package/funcs/subscribersCreateBulk.d.ts +2 -1
- package/funcs/subscribersCreateBulk.d.ts.map +1 -1
- package/funcs/subscribersCreateBulk.js +11 -7
- package/funcs/subscribersCreateBulk.js.map +1 -1
- package/funcs/subscribersCredentialsAppend.d.ts +2 -1
- package/funcs/subscribersCredentialsAppend.d.ts.map +1 -1
- package/funcs/subscribersCredentialsAppend.js +11 -7
- package/funcs/subscribersCredentialsAppend.js.map +1 -1
- package/funcs/subscribersCredentialsDelete.d.ts +2 -1
- package/funcs/subscribersCredentialsDelete.d.ts.map +1 -1
- package/funcs/subscribersCredentialsDelete.js +11 -7
- 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 +11 -7
- package/funcs/subscribersCredentialsUpdate.js.map +1 -1
- package/funcs/subscribersDelete.d.ts +2 -1
- package/funcs/subscribersDelete.d.ts.map +1 -1
- package/funcs/subscribersDelete.js +11 -7
- package/funcs/subscribersDelete.js.map +1 -1
- package/funcs/subscribersList.d.ts +2 -1
- package/funcs/subscribersList.d.ts.map +1 -1
- package/funcs/subscribersList.js +19 -7
- 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 +11 -7
- 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 +11 -7
- package/funcs/subscribersMessagesMarkAllAs.js.map +1 -1
- package/funcs/subscribersMessagesUpdateAsSeen.d.ts +2 -1
- package/funcs/subscribersMessagesUpdateAsSeen.d.ts.map +1 -1
- package/funcs/subscribersMessagesUpdateAsSeen.js +11 -7
- package/funcs/subscribersMessagesUpdateAsSeen.js.map +1 -1
- package/funcs/subscribersNotificationsFeed.d.ts +2 -1
- package/funcs/subscribersNotificationsFeed.d.ts.map +1 -1
- package/funcs/subscribersNotificationsFeed.js +11 -7
- package/funcs/subscribersNotificationsFeed.js.map +1 -1
- package/funcs/subscribersNotificationsUnseenCount.d.ts +2 -1
- package/funcs/subscribersNotificationsUnseenCount.d.ts.map +1 -1
- package/funcs/subscribersNotificationsUnseenCount.js +11 -7
- package/funcs/subscribersNotificationsUnseenCount.js.map +1 -1
- package/funcs/subscribersPatch.d.ts +2 -1
- package/funcs/subscribersPatch.d.ts.map +1 -1
- package/funcs/subscribersPatch.js +11 -7
- package/funcs/subscribersPatch.js.map +1 -1
- package/funcs/subscribersPreferencesList.d.ts +2 -1
- package/funcs/subscribersPreferencesList.d.ts.map +1 -1
- package/funcs/subscribersPreferencesList.js +11 -7
- package/funcs/subscribersPreferencesList.js.map +1 -1
- package/funcs/subscribersPreferencesUpdate.d.ts +2 -1
- package/funcs/subscribersPreferencesUpdate.d.ts.map +1 -1
- package/funcs/subscribersPreferencesUpdate.js +11 -7
- package/funcs/subscribersPreferencesUpdate.js.map +1 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.d.ts +2 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.d.ts.map +1 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.js +11 -7
- package/funcs/subscribersPropertiesUpdateOnlineFlag.js.map +1 -1
- package/funcs/subscribersRetrieve.d.ts +2 -1
- package/funcs/subscribersRetrieve.d.ts.map +1 -1
- package/funcs/subscribersRetrieve.js +11 -7
- package/funcs/subscribersRetrieve.js.map +1 -1
- package/funcs/subscribersSearch.d.ts +2 -1
- package/funcs/subscribersSearch.d.ts.map +1 -1
- package/funcs/subscribersSearch.js +11 -7
- package/funcs/subscribersSearch.js.map +1 -1
- package/funcs/topicsCreate.d.ts +2 -1
- package/funcs/topicsCreate.d.ts.map +1 -1
- package/funcs/topicsCreate.js +11 -7
- package/funcs/topicsCreate.js.map +1 -1
- package/funcs/topicsDelete.d.ts +2 -1
- package/funcs/topicsDelete.d.ts.map +1 -1
- package/funcs/topicsDelete.js +11 -7
- package/funcs/topicsDelete.js.map +1 -1
- package/funcs/topicsList.d.ts +2 -1
- package/funcs/topicsList.d.ts.map +1 -1
- package/funcs/topicsList.js +11 -7
- package/funcs/topicsList.js.map +1 -1
- package/funcs/topicsRename.d.ts +2 -1
- package/funcs/topicsRename.d.ts.map +1 -1
- package/funcs/topicsRename.js +11 -7
- package/funcs/topicsRename.js.map +1 -1
- package/funcs/topicsRetrieve.d.ts +2 -1
- package/funcs/topicsRetrieve.d.ts.map +1 -1
- package/funcs/topicsRetrieve.js +11 -7
- package/funcs/topicsRetrieve.js.map +1 -1
- package/funcs/topicsSubscribersAssign.d.ts +2 -1
- package/funcs/topicsSubscribersAssign.d.ts.map +1 -1
- package/funcs/topicsSubscribersAssign.js +11 -7
- 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 +11 -7
- package/funcs/topicsSubscribersRemove.js.map +1 -1
- package/funcs/topicsSubscribersRetrieve.d.ts +2 -1
- package/funcs/topicsSubscribersRetrieve.d.ts.map +1 -1
- package/funcs/topicsSubscribersRetrieve.js +11 -7
- package/funcs/topicsSubscribersRetrieve.js.map +1 -1
- package/funcs/trigger.d.ts +2 -1
- package/funcs/trigger.d.ts.map +1 -1
- package/funcs/trigger.js +11 -7
- package/funcs/trigger.js.map +1 -1
- package/funcs/triggerBroadcast.d.ts +2 -1
- package/funcs/triggerBroadcast.d.ts.map +1 -1
- package/funcs/triggerBroadcast.js +11 -7
- package/funcs/triggerBroadcast.js.map +1 -1
- package/funcs/triggerBulk.d.ts +2 -1
- package/funcs/triggerBulk.d.ts.map +1 -1
- package/funcs/triggerBulk.js +11 -7
- package/funcs/triggerBulk.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/activitynotificationtemplateresponsedto.d.ts +6 -0
- package/models/components/activitynotificationtemplateresponsedto.d.ts.map +1 -1
- package/models/components/activitynotificationtemplateresponsedto.js +3 -0
- package/models/components/activitynotificationtemplateresponsedto.js.map +1 -1
- package/models/components/createsubscriberrequestdto.d.ts +28 -50
- package/models/components/createsubscriberrequestdto.d.ts.map +1 -1
- package/models/components/createsubscriberrequestdto.js +17 -41
- package/models/components/createsubscriberrequestdto.js.map +1 -1
- 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/components/patchsubscriberrequestdto.d.ts +0 -5
- package/models/components/patchsubscriberrequestdto.d.ts.map +1 -1
- package/models/components/patchsubscriberrequestdto.js +0 -2
- package/models/components/patchsubscriberrequestdto.js.map +1 -1
- package/models/components/subscriberpayloaddto.d.ts +5 -0
- package/models/components/subscriberpayloaddto.d.ts.map +1 -1
- package/models/components/subscriberpayloaddto.js +2 -0
- package/models/components/subscriberpayloaddto.js.map +1 -1
- package/models/components/triggereventresponsedto.d.ts +3 -0
- package/models/components/triggereventresponsedto.d.ts.map +1 -1
- package/models/components/triggereventresponsedto.js +1 -0
- package/models/components/triggereventresponsedto.js.map +1 -1
- package/models/components/workfloworiginenum.d.ts +37 -0
- package/models/components/workfloworiginenum.d.ts.map +1 -0
- package/models/components/workfloworiginenum.js +54 -0
- package/models/components/workfloworiginenum.js.map +1 -0
- package/models/operations/notificationscontrollerlistnotifications.d.ts +5 -0
- package/models/operations/notificationscontrollerlistnotifications.d.ts.map +1 -1
- package/models/operations/notificationscontrollerlistnotifications.js +2 -0
- package/models/operations/notificationscontrollerlistnotifications.js.map +1 -1
- package/package.json +1 -1
- package/sources/json-development.json +57 -45
- package/src/funcs/cancel.ts +40 -7
- package/src/funcs/integrationsCreate.ts +40 -7
- package/src/funcs/integrationsDelete.ts +40 -7
- package/src/funcs/integrationsList.ts +38 -7
- package/src/funcs/integrationsListActive.ts +38 -7
- package/src/funcs/integrationsSetAsPrimary.ts +40 -7
- package/src/funcs/integrationsUpdate.ts +42 -7
- package/src/funcs/integrationsWebhooksRetrieve.ts +40 -7
- package/src/funcs/messagesDelete.ts +40 -7
- package/src/funcs/messagesDeleteByTransactionId.ts +43 -7
- package/src/funcs/messagesRetrieve.ts +38 -7
- package/src/funcs/notificationsList.ts +39 -7
- package/src/funcs/notificationsRetrieve.ts +40 -7
- package/src/funcs/notificationsStatsGraph.ts +40 -7
- package/src/funcs/notificationsStatsRetrieve.ts +38 -7
- package/src/funcs/subscribersAuthenticationChatAccessOauth.ts +38 -7
- package/src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts +40 -7
- package/src/funcs/subscribersCreate.ts +41 -8
- package/src/funcs/subscribersCreateBulk.ts +40 -7
- package/src/funcs/subscribersCredentialsAppend.ts +43 -7
- package/src/funcs/subscribersCredentialsDelete.ts +43 -7
- package/src/funcs/subscribersCredentialsUpdate.ts +43 -7
- package/src/funcs/subscribersDelete.ts +40 -7
- package/src/funcs/subscribersList.ts +53 -7
- package/src/funcs/subscribersMessagesMarkAll.ts +42 -7
- package/src/funcs/subscribersMessagesMarkAllAs.ts +42 -7
- package/src/funcs/subscribersMessagesUpdateAsSeen.ts +38 -7
- package/src/funcs/subscribersNotificationsFeed.ts +38 -7
- package/src/funcs/subscribersNotificationsUnseenCount.ts +38 -7
- package/src/funcs/subscribersPatch.ts +42 -7
- package/src/funcs/subscribersPreferencesList.ts +40 -7
- package/src/funcs/subscribersPreferencesUpdate.ts +42 -7
- package/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts +43 -7
- package/src/funcs/subscribersRetrieve.ts +40 -7
- package/src/funcs/subscribersSearch.ts +38 -7
- package/src/funcs/topicsCreate.ts +40 -7
- package/src/funcs/topicsDelete.ts +40 -7
- package/src/funcs/topicsList.ts +38 -7
- package/src/funcs/topicsRename.ts +42 -7
- package/src/funcs/topicsRetrieve.ts +40 -7
- package/src/funcs/topicsSubscribersAssign.ts +42 -7
- package/src/funcs/topicsSubscribersRemove.ts +42 -7
- package/src/funcs/topicsSubscribersRetrieve.ts +42 -7
- package/src/funcs/trigger.ts +40 -7
- package/src/funcs/triggerBroadcast.ts +40 -7
- package/src/funcs/triggerBulk.ts +40 -7
- package/src/lib/config.ts +3 -3
- package/src/models/components/activitynotificationtemplateresponsedto.ts +12 -0
- package/src/models/components/createsubscriberrequestdto.ts +41 -111
- package/src/models/components/index.ts +1 -0
- package/src/models/components/patchsubscriberrequestdto.ts +0 -7
- package/src/models/components/subscriberpayloaddto.ts +7 -0
- package/src/models/components/triggereventresponsedto.ts +1 -0
- package/src/models/components/workfloworiginenum.ts +40 -0
- package/src/models/operations/notificationscontrollerlistnotifications.ts +7 -0
- package/src/types/async.ts +68 -0
- package/types/async.d.ts +23 -0
- package/types/async.d.ts.map +1 -0
- package/types/async.js +44 -0
- package/types/async.js.map +1 -0
|
@@ -21,6 +21,7 @@ import * as errors from "../models/errors/index.js";
|
|
|
21
21
|
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
23
|
import * as operations from "../models/operations/index.js";
|
|
24
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
24
25
|
import { Result } from "../types/fp.js";
|
|
25
26
|
|
|
26
27
|
export enum ChatAccessOauthCallBackAcceptEnum {
|
|
@@ -31,13 +32,13 @@ export enum ChatAccessOauthCallBackAcceptEnum {
|
|
|
31
32
|
/**
|
|
32
33
|
* Handle providers oauth redirect
|
|
33
34
|
*/
|
|
34
|
-
export
|
|
35
|
+
export function subscribersAuthenticationChatAccessOauthCallBack(
|
|
35
36
|
client: NovuCore,
|
|
36
37
|
request: operations.SubscribersV1ControllerChatOauthCallbackRequest,
|
|
37
38
|
options?: RequestOptions & {
|
|
38
39
|
acceptHeaderOverride?: ChatAccessOauthCallBackAcceptEnum;
|
|
39
40
|
},
|
|
40
|
-
):
|
|
41
|
+
): APIPromise<
|
|
41
42
|
Result<
|
|
42
43
|
operations.SubscribersV1ControllerChatOauthCallbackResponse,
|
|
43
44
|
| errors.ErrorDto
|
|
@@ -52,6 +53,38 @@ export async function subscribersAuthenticationChatAccessOauthCallBack(
|
|
|
52
53
|
| RequestTimeoutError
|
|
53
54
|
| ConnectionError
|
|
54
55
|
>
|
|
56
|
+
> {
|
|
57
|
+
return new APIPromise($do(
|
|
58
|
+
client,
|
|
59
|
+
request,
|
|
60
|
+
options,
|
|
61
|
+
));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function $do(
|
|
65
|
+
client: NovuCore,
|
|
66
|
+
request: operations.SubscribersV1ControllerChatOauthCallbackRequest,
|
|
67
|
+
options?: RequestOptions & {
|
|
68
|
+
acceptHeaderOverride?: ChatAccessOauthCallBackAcceptEnum;
|
|
69
|
+
},
|
|
70
|
+
): Promise<
|
|
71
|
+
[
|
|
72
|
+
Result<
|
|
73
|
+
operations.SubscribersV1ControllerChatOauthCallbackResponse,
|
|
74
|
+
| errors.ErrorDto
|
|
75
|
+
| errors.ErrorDto
|
|
76
|
+
| errors.ValidationErrorDto
|
|
77
|
+
| errors.ErrorDto
|
|
78
|
+
| SDKError
|
|
79
|
+
| SDKValidationError
|
|
80
|
+
| UnexpectedClientError
|
|
81
|
+
| InvalidRequestError
|
|
82
|
+
| RequestAbortedError
|
|
83
|
+
| RequestTimeoutError
|
|
84
|
+
| ConnectionError
|
|
85
|
+
>,
|
|
86
|
+
APICall,
|
|
87
|
+
]
|
|
55
88
|
> {
|
|
56
89
|
const parsed = safeParse(
|
|
57
90
|
request,
|
|
@@ -61,7 +94,7 @@ export async function subscribersAuthenticationChatAccessOauthCallBack(
|
|
|
61
94
|
"Input validation failed",
|
|
62
95
|
);
|
|
63
96
|
if (!parsed.ok) {
|
|
64
|
-
return parsed;
|
|
97
|
+
return [parsed, { status: "invalid" }];
|
|
65
98
|
}
|
|
66
99
|
const payload = parsed.value;
|
|
67
100
|
const body = null;
|
|
@@ -137,7 +170,7 @@ export async function subscribersAuthenticationChatAccessOauthCallBack(
|
|
|
137
170
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
138
171
|
}, options);
|
|
139
172
|
if (!requestRes.ok) {
|
|
140
|
-
return requestRes;
|
|
173
|
+
return [requestRes, { status: "invalid" }];
|
|
141
174
|
}
|
|
142
175
|
const req = requestRes.value;
|
|
143
176
|
|
|
@@ -164,7 +197,7 @@ export async function subscribersAuthenticationChatAccessOauthCallBack(
|
|
|
164
197
|
retryCodes: context.retryCodes,
|
|
165
198
|
});
|
|
166
199
|
if (!doResult.ok) {
|
|
167
|
-
return doResult;
|
|
200
|
+
return [doResult, { status: "request-error", request: req }];
|
|
168
201
|
}
|
|
169
202
|
const response = doResult.value;
|
|
170
203
|
|
|
@@ -210,8 +243,8 @@ export async function subscribersAuthenticationChatAccessOauthCallBack(
|
|
|
210
243
|
M.fail("5XX"),
|
|
211
244
|
)(response, { extraFields: responseFields });
|
|
212
245
|
if (!result.ok) {
|
|
213
|
-
return result;
|
|
246
|
+
return [result, { status: "complete", request: req, response }];
|
|
214
247
|
}
|
|
215
248
|
|
|
216
|
-
return result;
|
|
249
|
+
return [result, { status: "complete", request: req, response }];
|
|
217
250
|
}
|
|
@@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js";
|
|
|
22
22
|
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
23
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
24
|
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
26
27
|
|
|
27
28
|
/**
|
|
@@ -30,12 +31,12 @@ import { Result } from "../types/fp.js";
|
|
|
30
31
|
* @remarks
|
|
31
32
|
* Create subscriber with the given data
|
|
32
33
|
*/
|
|
33
|
-
export
|
|
34
|
+
export function subscribersCreate(
|
|
34
35
|
client: NovuCore,
|
|
35
36
|
createSubscriberRequestDto: components.CreateSubscriberRequestDto,
|
|
36
37
|
idempotencyKey?: string | undefined,
|
|
37
38
|
options?: RequestOptions,
|
|
38
|
-
):
|
|
39
|
+
): APIPromise<
|
|
39
40
|
Result<
|
|
40
41
|
operations.SubscribersControllerCreateSubscriberResponse,
|
|
41
42
|
| errors.ErrorDto
|
|
@@ -50,6 +51,38 @@ export async function subscribersCreate(
|
|
|
50
51
|
| RequestTimeoutError
|
|
51
52
|
| ConnectionError
|
|
52
53
|
>
|
|
54
|
+
> {
|
|
55
|
+
return new APIPromise($do(
|
|
56
|
+
client,
|
|
57
|
+
createSubscriberRequestDto,
|
|
58
|
+
idempotencyKey,
|
|
59
|
+
options,
|
|
60
|
+
));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function $do(
|
|
64
|
+
client: NovuCore,
|
|
65
|
+
createSubscriberRequestDto: components.CreateSubscriberRequestDto,
|
|
66
|
+
idempotencyKey?: string | undefined,
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): Promise<
|
|
69
|
+
[
|
|
70
|
+
Result<
|
|
71
|
+
operations.SubscribersControllerCreateSubscriberResponse,
|
|
72
|
+
| errors.ErrorDto
|
|
73
|
+
| errors.ErrorDto
|
|
74
|
+
| errors.ValidationErrorDto
|
|
75
|
+
| errors.ErrorDto
|
|
76
|
+
| SDKError
|
|
77
|
+
| SDKValidationError
|
|
78
|
+
| UnexpectedClientError
|
|
79
|
+
| InvalidRequestError
|
|
80
|
+
| RequestAbortedError
|
|
81
|
+
| RequestTimeoutError
|
|
82
|
+
| ConnectionError
|
|
83
|
+
>,
|
|
84
|
+
APICall,
|
|
85
|
+
]
|
|
53
86
|
> {
|
|
54
87
|
const input: operations.SubscribersControllerCreateSubscriberRequest = {
|
|
55
88
|
createSubscriberRequestDto: createSubscriberRequestDto,
|
|
@@ -64,7 +97,7 @@ export async function subscribersCreate(
|
|
|
64
97
|
"Input validation failed",
|
|
65
98
|
);
|
|
66
99
|
if (!parsed.ok) {
|
|
67
|
-
return parsed;
|
|
100
|
+
return [parsed, { status: "invalid" }];
|
|
68
101
|
}
|
|
69
102
|
const payload = parsed.value;
|
|
70
103
|
const body = encodeJSON("body", payload.CreateSubscriberRequestDto, {
|
|
@@ -121,7 +154,7 @@ export async function subscribersCreate(
|
|
|
121
154
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
122
155
|
}, options);
|
|
123
156
|
if (!requestRes.ok) {
|
|
124
|
-
return requestRes;
|
|
157
|
+
return [requestRes, { status: "invalid" }];
|
|
125
158
|
}
|
|
126
159
|
const req = requestRes.value;
|
|
127
160
|
|
|
@@ -148,7 +181,7 @@ export async function subscribersCreate(
|
|
|
148
181
|
retryCodes: context.retryCodes,
|
|
149
182
|
});
|
|
150
183
|
if (!doResult.ok) {
|
|
151
|
-
return doResult;
|
|
184
|
+
return [doResult, { status: "request-error", request: req }];
|
|
152
185
|
}
|
|
153
186
|
const response = doResult.value;
|
|
154
187
|
|
|
@@ -171,7 +204,7 @@ export async function subscribersCreate(
|
|
|
171
204
|
| ConnectionError
|
|
172
205
|
>(
|
|
173
206
|
M.json(
|
|
174
|
-
|
|
207
|
+
201,
|
|
175
208
|
operations.SubscribersControllerCreateSubscriberResponse$inboundSchema,
|
|
176
209
|
{ hdrs: true, key: "Result" },
|
|
177
210
|
),
|
|
@@ -189,8 +222,8 @@ export async function subscribersCreate(
|
|
|
189
222
|
M.fail("5XX"),
|
|
190
223
|
)(response, { extraFields: responseFields });
|
|
191
224
|
if (!result.ok) {
|
|
192
|
-
return result;
|
|
225
|
+
return [result, { status: "complete", request: req, response }];
|
|
193
226
|
}
|
|
194
227
|
|
|
195
|
-
return result;
|
|
228
|
+
return [result, { status: "complete", request: req, response }];
|
|
196
229
|
}
|
|
@@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js";
|
|
|
22
22
|
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
23
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
24
|
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
26
27
|
|
|
27
28
|
/**
|
|
@@ -32,12 +33,12 @@ import { Result } from "../types/fp.js";
|
|
|
32
33
|
* Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API.
|
|
33
34
|
* The bulk API is limited to 500 subscribers per request.
|
|
34
35
|
*/
|
|
35
|
-
export
|
|
36
|
+
export function subscribersCreateBulk(
|
|
36
37
|
client: NovuCore,
|
|
37
38
|
bulkSubscriberCreateDto: components.BulkSubscriberCreateDto,
|
|
38
39
|
idempotencyKey?: string | undefined,
|
|
39
40
|
options?: RequestOptions,
|
|
40
|
-
):
|
|
41
|
+
): APIPromise<
|
|
41
42
|
Result<
|
|
42
43
|
operations.SubscribersV1ControllerBulkCreateSubscribersResponse,
|
|
43
44
|
| errors.ErrorDto
|
|
@@ -52,6 +53,38 @@ export async function subscribersCreateBulk(
|
|
|
52
53
|
| RequestTimeoutError
|
|
53
54
|
| ConnectionError
|
|
54
55
|
>
|
|
56
|
+
> {
|
|
57
|
+
return new APIPromise($do(
|
|
58
|
+
client,
|
|
59
|
+
bulkSubscriberCreateDto,
|
|
60
|
+
idempotencyKey,
|
|
61
|
+
options,
|
|
62
|
+
));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function $do(
|
|
66
|
+
client: NovuCore,
|
|
67
|
+
bulkSubscriberCreateDto: components.BulkSubscriberCreateDto,
|
|
68
|
+
idempotencyKey?: string | undefined,
|
|
69
|
+
options?: RequestOptions,
|
|
70
|
+
): Promise<
|
|
71
|
+
[
|
|
72
|
+
Result<
|
|
73
|
+
operations.SubscribersV1ControllerBulkCreateSubscribersResponse,
|
|
74
|
+
| errors.ErrorDto
|
|
75
|
+
| errors.ErrorDto
|
|
76
|
+
| errors.ValidationErrorDto
|
|
77
|
+
| errors.ErrorDto
|
|
78
|
+
| SDKError
|
|
79
|
+
| SDKValidationError
|
|
80
|
+
| UnexpectedClientError
|
|
81
|
+
| InvalidRequestError
|
|
82
|
+
| RequestAbortedError
|
|
83
|
+
| RequestTimeoutError
|
|
84
|
+
| ConnectionError
|
|
85
|
+
>,
|
|
86
|
+
APICall,
|
|
87
|
+
]
|
|
55
88
|
> {
|
|
56
89
|
const input: operations.SubscribersV1ControllerBulkCreateSubscribersRequest =
|
|
57
90
|
{
|
|
@@ -68,7 +101,7 @@ export async function subscribersCreateBulk(
|
|
|
68
101
|
"Input validation failed",
|
|
69
102
|
);
|
|
70
103
|
if (!parsed.ok) {
|
|
71
|
-
return parsed;
|
|
104
|
+
return [parsed, { status: "invalid" }];
|
|
72
105
|
}
|
|
73
106
|
const payload = parsed.value;
|
|
74
107
|
const body = encodeJSON("body", payload.BulkSubscriberCreateDto, {
|
|
@@ -125,7 +158,7 @@ export async function subscribersCreateBulk(
|
|
|
125
158
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
126
159
|
}, options);
|
|
127
160
|
if (!requestRes.ok) {
|
|
128
|
-
return requestRes;
|
|
161
|
+
return [requestRes, { status: "invalid" }];
|
|
129
162
|
}
|
|
130
163
|
const req = requestRes.value;
|
|
131
164
|
|
|
@@ -152,7 +185,7 @@ export async function subscribersCreateBulk(
|
|
|
152
185
|
retryCodes: context.retryCodes,
|
|
153
186
|
});
|
|
154
187
|
if (!doResult.ok) {
|
|
155
|
-
return doResult;
|
|
188
|
+
return [doResult, { status: "request-error", request: req }];
|
|
156
189
|
}
|
|
157
190
|
const response = doResult.value;
|
|
158
191
|
|
|
@@ -194,8 +227,8 @@ export async function subscribersCreateBulk(
|
|
|
194
227
|
M.fail("5XX"),
|
|
195
228
|
)(response, { extraFields: responseFields });
|
|
196
229
|
if (!result.ok) {
|
|
197
|
-
return result;
|
|
230
|
+
return [result, { status: "complete", request: req, response }];
|
|
198
231
|
}
|
|
199
232
|
|
|
200
|
-
return result;
|
|
233
|
+
return [result, { status: "complete", request: req, response }];
|
|
201
234
|
}
|
|
@@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js";
|
|
|
22
22
|
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
23
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
24
|
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
26
27
|
|
|
27
28
|
/**
|
|
@@ -31,14 +32,14 @@ import { Result } from "../types/fp.js";
|
|
|
31
32
|
* Subscriber credentials associated to the delivery methods such as slack and push tokens.
|
|
32
33
|
* This endpoint appends provided credentials and deviceTokens to the existing ones.
|
|
33
34
|
*/
|
|
34
|
-
export
|
|
35
|
+
export function subscribersCredentialsAppend(
|
|
35
36
|
client: NovuCore,
|
|
36
37
|
updateSubscriberChannelRequestDto:
|
|
37
38
|
components.UpdateSubscriberChannelRequestDto,
|
|
38
39
|
subscriberId: string,
|
|
39
40
|
idempotencyKey?: string | undefined,
|
|
40
41
|
options?: RequestOptions,
|
|
41
|
-
):
|
|
42
|
+
): APIPromise<
|
|
42
43
|
Result<
|
|
43
44
|
operations.SubscribersV1ControllerModifySubscriberChannelResponse,
|
|
44
45
|
| errors.ErrorDto
|
|
@@ -53,6 +54,41 @@ export async function subscribersCredentialsAppend(
|
|
|
53
54
|
| RequestTimeoutError
|
|
54
55
|
| ConnectionError
|
|
55
56
|
>
|
|
57
|
+
> {
|
|
58
|
+
return new APIPromise($do(
|
|
59
|
+
client,
|
|
60
|
+
updateSubscriberChannelRequestDto,
|
|
61
|
+
subscriberId,
|
|
62
|
+
idempotencyKey,
|
|
63
|
+
options,
|
|
64
|
+
));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async function $do(
|
|
68
|
+
client: NovuCore,
|
|
69
|
+
updateSubscriberChannelRequestDto:
|
|
70
|
+
components.UpdateSubscriberChannelRequestDto,
|
|
71
|
+
subscriberId: string,
|
|
72
|
+
idempotencyKey?: string | undefined,
|
|
73
|
+
options?: RequestOptions,
|
|
74
|
+
): Promise<
|
|
75
|
+
[
|
|
76
|
+
Result<
|
|
77
|
+
operations.SubscribersV1ControllerModifySubscriberChannelResponse,
|
|
78
|
+
| errors.ErrorDto
|
|
79
|
+
| errors.ErrorDto
|
|
80
|
+
| errors.ValidationErrorDto
|
|
81
|
+
| errors.ErrorDto
|
|
82
|
+
| SDKError
|
|
83
|
+
| SDKValidationError
|
|
84
|
+
| UnexpectedClientError
|
|
85
|
+
| InvalidRequestError
|
|
86
|
+
| RequestAbortedError
|
|
87
|
+
| RequestTimeoutError
|
|
88
|
+
| ConnectionError
|
|
89
|
+
>,
|
|
90
|
+
APICall,
|
|
91
|
+
]
|
|
56
92
|
> {
|
|
57
93
|
const input:
|
|
58
94
|
operations.SubscribersV1ControllerModifySubscriberChannelRequest = {
|
|
@@ -70,7 +106,7 @@ export async function subscribersCredentialsAppend(
|
|
|
70
106
|
"Input validation failed",
|
|
71
107
|
);
|
|
72
108
|
if (!parsed.ok) {
|
|
73
|
-
return parsed;
|
|
109
|
+
return [parsed, { status: "invalid" }];
|
|
74
110
|
}
|
|
75
111
|
const payload = parsed.value;
|
|
76
112
|
const body = encodeJSON("body", payload.UpdateSubscriberChannelRequestDto, {
|
|
@@ -136,7 +172,7 @@ export async function subscribersCredentialsAppend(
|
|
|
136
172
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
137
173
|
}, options);
|
|
138
174
|
if (!requestRes.ok) {
|
|
139
|
-
return requestRes;
|
|
175
|
+
return [requestRes, { status: "invalid" }];
|
|
140
176
|
}
|
|
141
177
|
const req = requestRes.value;
|
|
142
178
|
|
|
@@ -163,7 +199,7 @@ export async function subscribersCredentialsAppend(
|
|
|
163
199
|
retryCodes: context.retryCodes,
|
|
164
200
|
});
|
|
165
201
|
if (!doResult.ok) {
|
|
166
|
-
return doResult;
|
|
202
|
+
return [doResult, { status: "request-error", request: req }];
|
|
167
203
|
}
|
|
168
204
|
const response = doResult.value;
|
|
169
205
|
|
|
@@ -205,8 +241,8 @@ export async function subscribersCredentialsAppend(
|
|
|
205
241
|
M.fail("5XX"),
|
|
206
242
|
)(response, { extraFields: responseFields });
|
|
207
243
|
if (!result.ok) {
|
|
208
|
-
return result;
|
|
244
|
+
return [result, { status: "complete", request: req, response }];
|
|
209
245
|
}
|
|
210
246
|
|
|
211
|
-
return result;
|
|
247
|
+
return [result, { status: "complete", request: req, response }];
|
|
212
248
|
}
|
|
@@ -21,6 +21,7 @@ import * as errors from "../models/errors/index.js";
|
|
|
21
21
|
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
23
|
import * as operations from "../models/operations/index.js";
|
|
24
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
24
25
|
import { Result } from "../types/fp.js";
|
|
25
26
|
|
|
26
27
|
/**
|
|
@@ -29,13 +30,13 @@ import { Result } from "../types/fp.js";
|
|
|
29
30
|
* @remarks
|
|
30
31
|
* Delete subscriber credentials such as slack and expo tokens.
|
|
31
32
|
*/
|
|
32
|
-
export
|
|
33
|
+
export function subscribersCredentialsDelete(
|
|
33
34
|
client: NovuCore,
|
|
34
35
|
subscriberId: string,
|
|
35
36
|
providerId: string,
|
|
36
37
|
idempotencyKey?: string | undefined,
|
|
37
38
|
options?: RequestOptions,
|
|
38
|
-
):
|
|
39
|
+
): APIPromise<
|
|
39
40
|
Result<
|
|
40
41
|
| operations.SubscribersV1ControllerDeleteSubscriberCredentialsResponse
|
|
41
42
|
| undefined,
|
|
@@ -51,6 +52,41 @@ export async function subscribersCredentialsDelete(
|
|
|
51
52
|
| RequestTimeoutError
|
|
52
53
|
| ConnectionError
|
|
53
54
|
>
|
|
55
|
+
> {
|
|
56
|
+
return new APIPromise($do(
|
|
57
|
+
client,
|
|
58
|
+
subscriberId,
|
|
59
|
+
providerId,
|
|
60
|
+
idempotencyKey,
|
|
61
|
+
options,
|
|
62
|
+
));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function $do(
|
|
66
|
+
client: NovuCore,
|
|
67
|
+
subscriberId: string,
|
|
68
|
+
providerId: string,
|
|
69
|
+
idempotencyKey?: string | undefined,
|
|
70
|
+
options?: RequestOptions,
|
|
71
|
+
): Promise<
|
|
72
|
+
[
|
|
73
|
+
Result<
|
|
74
|
+
| operations.SubscribersV1ControllerDeleteSubscriberCredentialsResponse
|
|
75
|
+
| undefined,
|
|
76
|
+
| errors.ErrorDto
|
|
77
|
+
| errors.ErrorDto
|
|
78
|
+
| errors.ValidationErrorDto
|
|
79
|
+
| errors.ErrorDto
|
|
80
|
+
| SDKError
|
|
81
|
+
| SDKValidationError
|
|
82
|
+
| UnexpectedClientError
|
|
83
|
+
| InvalidRequestError
|
|
84
|
+
| RequestAbortedError
|
|
85
|
+
| RequestTimeoutError
|
|
86
|
+
| ConnectionError
|
|
87
|
+
>,
|
|
88
|
+
APICall,
|
|
89
|
+
]
|
|
54
90
|
> {
|
|
55
91
|
const input:
|
|
56
92
|
operations.SubscribersV1ControllerDeleteSubscriberCredentialsRequest = {
|
|
@@ -68,7 +104,7 @@ export async function subscribersCredentialsDelete(
|
|
|
68
104
|
"Input validation failed",
|
|
69
105
|
);
|
|
70
106
|
if (!parsed.ok) {
|
|
71
|
-
return parsed;
|
|
107
|
+
return [parsed, { status: "invalid" }];
|
|
72
108
|
}
|
|
73
109
|
const payload = parsed.value;
|
|
74
110
|
const body = null;
|
|
@@ -135,7 +171,7 @@ export async function subscribersCredentialsDelete(
|
|
|
135
171
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
136
172
|
}, options);
|
|
137
173
|
if (!requestRes.ok) {
|
|
138
|
-
return requestRes;
|
|
174
|
+
return [requestRes, { status: "invalid" }];
|
|
139
175
|
}
|
|
140
176
|
const req = requestRes.value;
|
|
141
177
|
|
|
@@ -162,7 +198,7 @@ export async function subscribersCredentialsDelete(
|
|
|
162
198
|
retryCodes: context.retryCodes,
|
|
163
199
|
});
|
|
164
200
|
if (!doResult.ok) {
|
|
165
|
-
return doResult;
|
|
201
|
+
return [doResult, { status: "request-error", request: req }];
|
|
166
202
|
}
|
|
167
203
|
const response = doResult.value;
|
|
168
204
|
|
|
@@ -206,8 +242,8 @@ export async function subscribersCredentialsDelete(
|
|
|
206
242
|
M.fail("5XX"),
|
|
207
243
|
)(response, { extraFields: responseFields });
|
|
208
244
|
if (!result.ok) {
|
|
209
|
-
return result;
|
|
245
|
+
return [result, { status: "complete", request: req, response }];
|
|
210
246
|
}
|
|
211
247
|
|
|
212
|
-
return result;
|
|
248
|
+
return [result, { status: "complete", request: req, response }];
|
|
213
249
|
}
|
|
@@ -22,6 +22,7 @@ import * as errors from "../models/errors/index.js";
|
|
|
22
22
|
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
23
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
24
|
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
26
27
|
|
|
27
28
|
/**
|
|
@@ -30,14 +31,14 @@ import { Result } from "../types/fp.js";
|
|
|
30
31
|
* @remarks
|
|
31
32
|
* Subscriber credentials associated to the delivery methods such as slack and push tokens.
|
|
32
33
|
*/
|
|
33
|
-
export
|
|
34
|
+
export function subscribersCredentialsUpdate(
|
|
34
35
|
client: NovuCore,
|
|
35
36
|
updateSubscriberChannelRequestDto:
|
|
36
37
|
components.UpdateSubscriberChannelRequestDto,
|
|
37
38
|
subscriberId: string,
|
|
38
39
|
idempotencyKey?: string | undefined,
|
|
39
40
|
options?: RequestOptions,
|
|
40
|
-
):
|
|
41
|
+
): APIPromise<
|
|
41
42
|
Result<
|
|
42
43
|
operations.SubscribersV1ControllerUpdateSubscriberChannelResponse,
|
|
43
44
|
| errors.ErrorDto
|
|
@@ -52,6 +53,41 @@ export async function subscribersCredentialsUpdate(
|
|
|
52
53
|
| RequestTimeoutError
|
|
53
54
|
| ConnectionError
|
|
54
55
|
>
|
|
56
|
+
> {
|
|
57
|
+
return new APIPromise($do(
|
|
58
|
+
client,
|
|
59
|
+
updateSubscriberChannelRequestDto,
|
|
60
|
+
subscriberId,
|
|
61
|
+
idempotencyKey,
|
|
62
|
+
options,
|
|
63
|
+
));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async function $do(
|
|
67
|
+
client: NovuCore,
|
|
68
|
+
updateSubscriberChannelRequestDto:
|
|
69
|
+
components.UpdateSubscriberChannelRequestDto,
|
|
70
|
+
subscriberId: string,
|
|
71
|
+
idempotencyKey?: string | undefined,
|
|
72
|
+
options?: RequestOptions,
|
|
73
|
+
): Promise<
|
|
74
|
+
[
|
|
75
|
+
Result<
|
|
76
|
+
operations.SubscribersV1ControllerUpdateSubscriberChannelResponse,
|
|
77
|
+
| errors.ErrorDto
|
|
78
|
+
| errors.ErrorDto
|
|
79
|
+
| errors.ValidationErrorDto
|
|
80
|
+
| errors.ErrorDto
|
|
81
|
+
| SDKError
|
|
82
|
+
| SDKValidationError
|
|
83
|
+
| UnexpectedClientError
|
|
84
|
+
| InvalidRequestError
|
|
85
|
+
| RequestAbortedError
|
|
86
|
+
| RequestTimeoutError
|
|
87
|
+
| ConnectionError
|
|
88
|
+
>,
|
|
89
|
+
APICall,
|
|
90
|
+
]
|
|
55
91
|
> {
|
|
56
92
|
const input:
|
|
57
93
|
operations.SubscribersV1ControllerUpdateSubscriberChannelRequest = {
|
|
@@ -69,7 +105,7 @@ export async function subscribersCredentialsUpdate(
|
|
|
69
105
|
"Input validation failed",
|
|
70
106
|
);
|
|
71
107
|
if (!parsed.ok) {
|
|
72
|
-
return parsed;
|
|
108
|
+
return [parsed, { status: "invalid" }];
|
|
73
109
|
}
|
|
74
110
|
const payload = parsed.value;
|
|
75
111
|
const body = encodeJSON("body", payload.UpdateSubscriberChannelRequestDto, {
|
|
@@ -135,7 +171,7 @@ export async function subscribersCredentialsUpdate(
|
|
|
135
171
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
136
172
|
}, options);
|
|
137
173
|
if (!requestRes.ok) {
|
|
138
|
-
return requestRes;
|
|
174
|
+
return [requestRes, { status: "invalid" }];
|
|
139
175
|
}
|
|
140
176
|
const req = requestRes.value;
|
|
141
177
|
|
|
@@ -162,7 +198,7 @@ export async function subscribersCredentialsUpdate(
|
|
|
162
198
|
retryCodes: context.retryCodes,
|
|
163
199
|
});
|
|
164
200
|
if (!doResult.ok) {
|
|
165
|
-
return doResult;
|
|
201
|
+
return [doResult, { status: "request-error", request: req }];
|
|
166
202
|
}
|
|
167
203
|
const response = doResult.value;
|
|
168
204
|
|
|
@@ -204,8 +240,8 @@ export async function subscribersCredentialsUpdate(
|
|
|
204
240
|
M.fail("5XX"),
|
|
205
241
|
)(response, { extraFields: responseFields });
|
|
206
242
|
if (!result.ok) {
|
|
207
|
-
return result;
|
|
243
|
+
return [result, { status: "complete", request: req, response }];
|
|
208
244
|
}
|
|
209
245
|
|
|
210
|
-
return result;
|
|
246
|
+
return [result, { status: "complete", request: req, response }];
|
|
211
247
|
}
|