@novu/api 0.2.0 → 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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +13 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +13 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +20 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -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 +12 -7
- package/funcs/triggerBulk.js.map +1 -1
- package/hooks/types.d.ts +1 -0
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js.map +1 -1
- 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 +41 -7
- package/src/funcs/integrationsCreate.ts +41 -7
- package/src/funcs/integrationsDelete.ts +41 -7
- package/src/funcs/integrationsList.ts +39 -7
- package/src/funcs/integrationsListActive.ts +39 -7
- package/src/funcs/integrationsSetAsPrimary.ts +41 -7
- package/src/funcs/integrationsUpdate.ts +43 -7
- package/src/funcs/integrationsWebhooksRetrieve.ts +41 -7
- package/src/funcs/messagesDelete.ts +41 -7
- package/src/funcs/messagesDeleteByTransactionId.ts +44 -7
- package/src/funcs/messagesRetrieve.ts +39 -7
- package/src/funcs/notificationsList.ts +40 -7
- package/src/funcs/notificationsRetrieve.ts +41 -7
- package/src/funcs/notificationsStatsGraph.ts +41 -7
- package/src/funcs/notificationsStatsRetrieve.ts +39 -7
- package/src/funcs/subscribersAuthenticationChatAccessOauth.ts +39 -7
- package/src/funcs/subscribersAuthenticationChatAccessOauthCallBack.ts +41 -7
- package/src/funcs/subscribersCreate.ts +42 -8
- package/src/funcs/subscribersCreateBulk.ts +41 -7
- package/src/funcs/subscribersCredentialsAppend.ts +44 -7
- package/src/funcs/subscribersCredentialsDelete.ts +44 -7
- package/src/funcs/subscribersCredentialsUpdate.ts +44 -7
- package/src/funcs/subscribersDelete.ts +41 -7
- package/src/funcs/subscribersList.ts +54 -7
- package/src/funcs/subscribersMessagesMarkAll.ts +43 -7
- package/src/funcs/subscribersMessagesMarkAllAs.ts +43 -7
- package/src/funcs/subscribersMessagesUpdateAsSeen.ts +39 -7
- package/src/funcs/subscribersNotificationsFeed.ts +39 -7
- package/src/funcs/subscribersNotificationsUnseenCount.ts +39 -7
- package/src/funcs/subscribersPatch.ts +43 -7
- package/src/funcs/subscribersPreferencesList.ts +41 -7
- package/src/funcs/subscribersPreferencesUpdate.ts +43 -7
- package/src/funcs/subscribersPropertiesUpdateOnlineFlag.ts +44 -7
- package/src/funcs/subscribersRetrieve.ts +41 -7
- package/src/funcs/subscribersSearch.ts +39 -7
- package/src/funcs/topicsCreate.ts +41 -7
- package/src/funcs/topicsDelete.ts +41 -7
- package/src/funcs/topicsList.ts +39 -7
- package/src/funcs/topicsRename.ts +43 -7
- package/src/funcs/topicsRetrieve.ts +41 -7
- package/src/funcs/topicsSubscribersAssign.ts +43 -7
- package/src/funcs/topicsSubscribersRemove.ts +43 -7
- package/src/funcs/topicsSubscribersRetrieve.ts +43 -7
- package/src/funcs/trigger.ts +41 -7
- package/src/funcs/triggerBroadcast.ts +41 -7
- package/src/funcs/triggerBulk.ts +41 -7
- package/src/hooks/types.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +0 -1
- 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
|
/**
|
|
@@ -29,11 +30,11 @@ import { Result } from "../types/fp.js";
|
|
|
29
30
|
* @remarks
|
|
30
31
|
* Returns a list of messages, could paginate using the `page` query parameter
|
|
31
32
|
*/
|
|
32
|
-
export
|
|
33
|
+
export function messagesRetrieve(
|
|
33
34
|
client: NovuCore,
|
|
34
35
|
request: operations.MessagesControllerGetMessagesRequest,
|
|
35
36
|
options?: RequestOptions,
|
|
36
|
-
):
|
|
37
|
+
): APIPromise<
|
|
37
38
|
Result<
|
|
38
39
|
operations.MessagesControllerGetMessagesResponse,
|
|
39
40
|
| errors.ErrorDto
|
|
@@ -48,6 +49,36 @@ export async function messagesRetrieve(
|
|
|
48
49
|
| RequestTimeoutError
|
|
49
50
|
| ConnectionError
|
|
50
51
|
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function $do(
|
|
61
|
+
client: NovuCore,
|
|
62
|
+
request: operations.MessagesControllerGetMessagesRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
operations.MessagesControllerGetMessagesResponse,
|
|
68
|
+
| errors.ErrorDto
|
|
69
|
+
| errors.ErrorDto
|
|
70
|
+
| errors.ValidationErrorDto
|
|
71
|
+
| errors.ErrorDto
|
|
72
|
+
| SDKError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| InvalidRequestError
|
|
76
|
+
| RequestAbortedError
|
|
77
|
+
| RequestTimeoutError
|
|
78
|
+
| ConnectionError
|
|
79
|
+
>,
|
|
80
|
+
APICall,
|
|
81
|
+
]
|
|
51
82
|
> {
|
|
52
83
|
const parsed = safeParse(
|
|
53
84
|
request,
|
|
@@ -58,7 +89,7 @@ export async function messagesRetrieve(
|
|
|
58
89
|
"Input validation failed",
|
|
59
90
|
);
|
|
60
91
|
if (!parsed.ok) {
|
|
61
|
-
return parsed;
|
|
92
|
+
return [parsed, { status: "invalid" }];
|
|
62
93
|
}
|
|
63
94
|
const payload = parsed.value;
|
|
64
95
|
const body = null;
|
|
@@ -87,6 +118,7 @@ export async function messagesRetrieve(
|
|
|
87
118
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
88
119
|
|
|
89
120
|
const context = {
|
|
121
|
+
baseURL: options?.serverURL ?? "",
|
|
90
122
|
operationID: "MessagesController_getMessages",
|
|
91
123
|
oAuth2Scopes: [],
|
|
92
124
|
|
|
@@ -120,7 +152,7 @@ export async function messagesRetrieve(
|
|
|
120
152
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
121
153
|
}, options);
|
|
122
154
|
if (!requestRes.ok) {
|
|
123
|
-
return requestRes;
|
|
155
|
+
return [requestRes, { status: "invalid" }];
|
|
124
156
|
}
|
|
125
157
|
const req = requestRes.value;
|
|
126
158
|
|
|
@@ -147,7 +179,7 @@ export async function messagesRetrieve(
|
|
|
147
179
|
retryCodes: context.retryCodes,
|
|
148
180
|
});
|
|
149
181
|
if (!doResult.ok) {
|
|
150
|
-
return doResult;
|
|
182
|
+
return [doResult, { status: "request-error", request: req }];
|
|
151
183
|
}
|
|
152
184
|
const response = doResult.value;
|
|
153
185
|
|
|
@@ -188,8 +220,8 @@ export async function messagesRetrieve(
|
|
|
188
220
|
M.fail("5XX"),
|
|
189
221
|
)(response, { extraFields: responseFields });
|
|
190
222
|
if (!result.ok) {
|
|
191
|
-
return result;
|
|
223
|
+
return [result, { status: "complete", request: req, response }];
|
|
192
224
|
}
|
|
193
225
|
|
|
194
|
-
return result;
|
|
226
|
+
return [result, { status: "complete", request: req, response }];
|
|
195
227
|
}
|
|
@@ -21,16 +21,17 @@ 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
|
/**
|
|
27
28
|
* Get notifications
|
|
28
29
|
*/
|
|
29
|
-
export
|
|
30
|
+
export function notificationsList(
|
|
30
31
|
client: NovuCore,
|
|
31
32
|
request: operations.NotificationsControllerListNotificationsRequest,
|
|
32
33
|
options?: RequestOptions,
|
|
33
|
-
):
|
|
34
|
+
): APIPromise<
|
|
34
35
|
Result<
|
|
35
36
|
operations.NotificationsControllerListNotificationsResponse,
|
|
36
37
|
| errors.ErrorDto
|
|
@@ -45,6 +46,36 @@ export async function notificationsList(
|
|
|
45
46
|
| RequestTimeoutError
|
|
46
47
|
| ConnectionError
|
|
47
48
|
>
|
|
49
|
+
> {
|
|
50
|
+
return new APIPromise($do(
|
|
51
|
+
client,
|
|
52
|
+
request,
|
|
53
|
+
options,
|
|
54
|
+
));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function $do(
|
|
58
|
+
client: NovuCore,
|
|
59
|
+
request: operations.NotificationsControllerListNotificationsRequest,
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): Promise<
|
|
62
|
+
[
|
|
63
|
+
Result<
|
|
64
|
+
operations.NotificationsControllerListNotificationsResponse,
|
|
65
|
+
| errors.ErrorDto
|
|
66
|
+
| errors.ErrorDto
|
|
67
|
+
| errors.ValidationErrorDto
|
|
68
|
+
| errors.ErrorDto
|
|
69
|
+
| SDKError
|
|
70
|
+
| SDKValidationError
|
|
71
|
+
| UnexpectedClientError
|
|
72
|
+
| InvalidRequestError
|
|
73
|
+
| RequestAbortedError
|
|
74
|
+
| RequestTimeoutError
|
|
75
|
+
| ConnectionError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
48
79
|
> {
|
|
49
80
|
const parsed = safeParse(
|
|
50
81
|
request,
|
|
@@ -54,7 +85,7 @@ export async function notificationsList(
|
|
|
54
85
|
"Input validation failed",
|
|
55
86
|
);
|
|
56
87
|
if (!parsed.ok) {
|
|
57
|
-
return parsed;
|
|
88
|
+
return [parsed, { status: "invalid" }];
|
|
58
89
|
}
|
|
59
90
|
const payload = parsed.value;
|
|
60
91
|
const body = null;
|
|
@@ -66,6 +97,7 @@ export async function notificationsList(
|
|
|
66
97
|
"before": payload.before,
|
|
67
98
|
"channels": payload.channels,
|
|
68
99
|
"emails": payload.emails,
|
|
100
|
+
"limit": payload.limit,
|
|
69
101
|
"page": payload.page,
|
|
70
102
|
"search": payload.search,
|
|
71
103
|
"subscriberIds": payload.subscriberIds,
|
|
@@ -87,6 +119,7 @@ export async function notificationsList(
|
|
|
87
119
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
88
120
|
|
|
89
121
|
const context = {
|
|
122
|
+
baseURL: options?.serverURL ?? "",
|
|
90
123
|
operationID: "NotificationsController_listNotifications",
|
|
91
124
|
oAuth2Scopes: [],
|
|
92
125
|
|
|
@@ -120,7 +153,7 @@ export async function notificationsList(
|
|
|
120
153
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
121
154
|
}, options);
|
|
122
155
|
if (!requestRes.ok) {
|
|
123
|
-
return requestRes;
|
|
156
|
+
return [requestRes, { status: "invalid" }];
|
|
124
157
|
}
|
|
125
158
|
const req = requestRes.value;
|
|
126
159
|
|
|
@@ -147,7 +180,7 @@ export async function notificationsList(
|
|
|
147
180
|
retryCodes: context.retryCodes,
|
|
148
181
|
});
|
|
149
182
|
if (!doResult.ok) {
|
|
150
|
-
return doResult;
|
|
183
|
+
return [doResult, { status: "request-error", request: req }];
|
|
151
184
|
}
|
|
152
185
|
const response = doResult.value;
|
|
153
186
|
|
|
@@ -188,8 +221,8 @@ export async function notificationsList(
|
|
|
188
221
|
M.fail("5XX"),
|
|
189
222
|
)(response, { extraFields: responseFields });
|
|
190
223
|
if (!result.ok) {
|
|
191
|
-
return result;
|
|
224
|
+
return [result, { status: "complete", request: req, response }];
|
|
192
225
|
}
|
|
193
226
|
|
|
194
|
-
return result;
|
|
227
|
+
return [result, { status: "complete", request: req, response }];
|
|
195
228
|
}
|
|
@@ -21,17 +21,18 @@ 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
|
/**
|
|
27
28
|
* Get notification
|
|
28
29
|
*/
|
|
29
|
-
export
|
|
30
|
+
export function notificationsRetrieve(
|
|
30
31
|
client: NovuCore,
|
|
31
32
|
notificationId: string,
|
|
32
33
|
idempotencyKey?: string | undefined,
|
|
33
34
|
options?: RequestOptions,
|
|
34
|
-
):
|
|
35
|
+
): APIPromise<
|
|
35
36
|
Result<
|
|
36
37
|
operations.NotificationsControllerGetNotificationResponse,
|
|
37
38
|
| errors.ErrorDto
|
|
@@ -46,6 +47,38 @@ export async function notificationsRetrieve(
|
|
|
46
47
|
| RequestTimeoutError
|
|
47
48
|
| ConnectionError
|
|
48
49
|
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
notificationId,
|
|
54
|
+
idempotencyKey,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: NovuCore,
|
|
61
|
+
notificationId: string,
|
|
62
|
+
idempotencyKey?: string | undefined,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
operations.NotificationsControllerGetNotificationResponse,
|
|
68
|
+
| errors.ErrorDto
|
|
69
|
+
| errors.ErrorDto
|
|
70
|
+
| errors.ValidationErrorDto
|
|
71
|
+
| errors.ErrorDto
|
|
72
|
+
| SDKError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| InvalidRequestError
|
|
76
|
+
| RequestAbortedError
|
|
77
|
+
| RequestTimeoutError
|
|
78
|
+
| ConnectionError
|
|
79
|
+
>,
|
|
80
|
+
APICall,
|
|
81
|
+
]
|
|
49
82
|
> {
|
|
50
83
|
const input: operations.NotificationsControllerGetNotificationRequest = {
|
|
51
84
|
notificationId: notificationId,
|
|
@@ -60,7 +93,7 @@ export async function notificationsRetrieve(
|
|
|
60
93
|
"Input validation failed",
|
|
61
94
|
);
|
|
62
95
|
if (!parsed.ok) {
|
|
63
|
-
return parsed;
|
|
96
|
+
return [parsed, { status: "invalid" }];
|
|
64
97
|
}
|
|
65
98
|
const payload = parsed.value;
|
|
66
99
|
const body = null;
|
|
@@ -88,6 +121,7 @@ export async function notificationsRetrieve(
|
|
|
88
121
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
89
122
|
|
|
90
123
|
const context = {
|
|
124
|
+
baseURL: options?.serverURL ?? "",
|
|
91
125
|
operationID: "NotificationsController_getNotification",
|
|
92
126
|
oAuth2Scopes: [],
|
|
93
127
|
|
|
@@ -120,7 +154,7 @@ export async function notificationsRetrieve(
|
|
|
120
154
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
121
155
|
}, options);
|
|
122
156
|
if (!requestRes.ok) {
|
|
123
|
-
return requestRes;
|
|
157
|
+
return [requestRes, { status: "invalid" }];
|
|
124
158
|
}
|
|
125
159
|
const req = requestRes.value;
|
|
126
160
|
|
|
@@ -147,7 +181,7 @@ export async function notificationsRetrieve(
|
|
|
147
181
|
retryCodes: context.retryCodes,
|
|
148
182
|
});
|
|
149
183
|
if (!doResult.ok) {
|
|
150
|
-
return doResult;
|
|
184
|
+
return [doResult, { status: "request-error", request: req }];
|
|
151
185
|
}
|
|
152
186
|
const response = doResult.value;
|
|
153
187
|
|
|
@@ -188,8 +222,8 @@ export async function notificationsRetrieve(
|
|
|
188
222
|
M.fail("5XX"),
|
|
189
223
|
)(response, { extraFields: responseFields });
|
|
190
224
|
if (!result.ok) {
|
|
191
|
-
return result;
|
|
225
|
+
return [result, { status: "complete", request: req, response }];
|
|
192
226
|
}
|
|
193
227
|
|
|
194
|
-
return result;
|
|
228
|
+
return [result, { status: "complete", request: req, response }];
|
|
195
229
|
}
|
|
@@ -21,17 +21,18 @@ 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
|
/**
|
|
27
28
|
* Get notification graph statistics
|
|
28
29
|
*/
|
|
29
|
-
export
|
|
30
|
+
export function notificationsStatsGraph(
|
|
30
31
|
client: NovuCore,
|
|
31
32
|
days?: number | undefined,
|
|
32
33
|
idempotencyKey?: string | undefined,
|
|
33
34
|
options?: RequestOptions,
|
|
34
|
-
):
|
|
35
|
+
): APIPromise<
|
|
35
36
|
Result<
|
|
36
37
|
operations.NotificationsControllerGetActivityGraphStatsResponse,
|
|
37
38
|
| errors.ErrorDto
|
|
@@ -46,6 +47,38 @@ export async function notificationsStatsGraph(
|
|
|
46
47
|
| RequestTimeoutError
|
|
47
48
|
| ConnectionError
|
|
48
49
|
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
days,
|
|
54
|
+
idempotencyKey,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: NovuCore,
|
|
61
|
+
days?: number | undefined,
|
|
62
|
+
idempotencyKey?: string | undefined,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
operations.NotificationsControllerGetActivityGraphStatsResponse,
|
|
68
|
+
| errors.ErrorDto
|
|
69
|
+
| errors.ErrorDto
|
|
70
|
+
| errors.ValidationErrorDto
|
|
71
|
+
| errors.ErrorDto
|
|
72
|
+
| SDKError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| InvalidRequestError
|
|
76
|
+
| RequestAbortedError
|
|
77
|
+
| RequestTimeoutError
|
|
78
|
+
| ConnectionError
|
|
79
|
+
>,
|
|
80
|
+
APICall,
|
|
81
|
+
]
|
|
49
82
|
> {
|
|
50
83
|
const input: operations.NotificationsControllerGetActivityGraphStatsRequest =
|
|
51
84
|
{
|
|
@@ -62,7 +95,7 @@ export async function notificationsStatsGraph(
|
|
|
62
95
|
"Input validation failed",
|
|
63
96
|
);
|
|
64
97
|
if (!parsed.ok) {
|
|
65
|
-
return parsed;
|
|
98
|
+
return [parsed, { status: "invalid" }];
|
|
66
99
|
}
|
|
67
100
|
const payload = parsed.value;
|
|
68
101
|
const body = null;
|
|
@@ -87,6 +120,7 @@ export async function notificationsStatsGraph(
|
|
|
87
120
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
88
121
|
|
|
89
122
|
const context = {
|
|
123
|
+
baseURL: options?.serverURL ?? "",
|
|
90
124
|
operationID: "NotificationsController_getActivityGraphStats",
|
|
91
125
|
oAuth2Scopes: [],
|
|
92
126
|
|
|
@@ -120,7 +154,7 @@ export async function notificationsStatsGraph(
|
|
|
120
154
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
121
155
|
}, options);
|
|
122
156
|
if (!requestRes.ok) {
|
|
123
|
-
return requestRes;
|
|
157
|
+
return [requestRes, { status: "invalid" }];
|
|
124
158
|
}
|
|
125
159
|
const req = requestRes.value;
|
|
126
160
|
|
|
@@ -147,7 +181,7 @@ export async function notificationsStatsGraph(
|
|
|
147
181
|
retryCodes: context.retryCodes,
|
|
148
182
|
});
|
|
149
183
|
if (!doResult.ok) {
|
|
150
|
-
return doResult;
|
|
184
|
+
return [doResult, { status: "request-error", request: req }];
|
|
151
185
|
}
|
|
152
186
|
const response = doResult.value;
|
|
153
187
|
|
|
@@ -189,8 +223,8 @@ export async function notificationsStatsGraph(
|
|
|
189
223
|
M.fail("5XX"),
|
|
190
224
|
)(response, { extraFields: responseFields });
|
|
191
225
|
if (!result.ok) {
|
|
192
|
-
return result;
|
|
226
|
+
return [result, { status: "complete", request: req, response }];
|
|
193
227
|
}
|
|
194
228
|
|
|
195
|
-
return result;
|
|
229
|
+
return [result, { status: "complete", request: req, response }];
|
|
196
230
|
}
|
|
@@ -21,16 +21,17 @@ 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
|
/**
|
|
27
28
|
* Get notification statistics
|
|
28
29
|
*/
|
|
29
|
-
export
|
|
30
|
+
export function notificationsStatsRetrieve(
|
|
30
31
|
client: NovuCore,
|
|
31
32
|
idempotencyKey?: string | undefined,
|
|
32
33
|
options?: RequestOptions,
|
|
33
|
-
):
|
|
34
|
+
): APIPromise<
|
|
34
35
|
Result<
|
|
35
36
|
operations.NotificationsControllerGetActivityStatsResponse,
|
|
36
37
|
| errors.ErrorDto
|
|
@@ -45,6 +46,36 @@ export async function notificationsStatsRetrieve(
|
|
|
45
46
|
| RequestTimeoutError
|
|
46
47
|
| ConnectionError
|
|
47
48
|
>
|
|
49
|
+
> {
|
|
50
|
+
return new APIPromise($do(
|
|
51
|
+
client,
|
|
52
|
+
idempotencyKey,
|
|
53
|
+
options,
|
|
54
|
+
));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function $do(
|
|
58
|
+
client: NovuCore,
|
|
59
|
+
idempotencyKey?: string | undefined,
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): Promise<
|
|
62
|
+
[
|
|
63
|
+
Result<
|
|
64
|
+
operations.NotificationsControllerGetActivityStatsResponse,
|
|
65
|
+
| errors.ErrorDto
|
|
66
|
+
| errors.ErrorDto
|
|
67
|
+
| errors.ValidationErrorDto
|
|
68
|
+
| errors.ErrorDto
|
|
69
|
+
| SDKError
|
|
70
|
+
| SDKValidationError
|
|
71
|
+
| UnexpectedClientError
|
|
72
|
+
| InvalidRequestError
|
|
73
|
+
| RequestAbortedError
|
|
74
|
+
| RequestTimeoutError
|
|
75
|
+
| ConnectionError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
48
79
|
> {
|
|
49
80
|
const input: operations.NotificationsControllerGetActivityStatsRequest = {
|
|
50
81
|
idempotencyKey: idempotencyKey,
|
|
@@ -58,7 +89,7 @@ export async function notificationsStatsRetrieve(
|
|
|
58
89
|
"Input validation failed",
|
|
59
90
|
);
|
|
60
91
|
if (!parsed.ok) {
|
|
61
|
-
return parsed;
|
|
92
|
+
return [parsed, { status: "invalid" }];
|
|
62
93
|
}
|
|
63
94
|
const payload = parsed.value;
|
|
64
95
|
const body = null;
|
|
@@ -79,6 +110,7 @@ export async function notificationsStatsRetrieve(
|
|
|
79
110
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
80
111
|
|
|
81
112
|
const context = {
|
|
113
|
+
baseURL: options?.serverURL ?? "",
|
|
82
114
|
operationID: "NotificationsController_getActivityStats",
|
|
83
115
|
oAuth2Scopes: [],
|
|
84
116
|
|
|
@@ -111,7 +143,7 @@ export async function notificationsStatsRetrieve(
|
|
|
111
143
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
112
144
|
}, options);
|
|
113
145
|
if (!requestRes.ok) {
|
|
114
|
-
return requestRes;
|
|
146
|
+
return [requestRes, { status: "invalid" }];
|
|
115
147
|
}
|
|
116
148
|
const req = requestRes.value;
|
|
117
149
|
|
|
@@ -138,7 +170,7 @@ export async function notificationsStatsRetrieve(
|
|
|
138
170
|
retryCodes: context.retryCodes,
|
|
139
171
|
});
|
|
140
172
|
if (!doResult.ok) {
|
|
141
|
-
return doResult;
|
|
173
|
+
return [doResult, { status: "request-error", request: req }];
|
|
142
174
|
}
|
|
143
175
|
const response = doResult.value;
|
|
144
176
|
|
|
@@ -179,8 +211,8 @@ export async function notificationsStatsRetrieve(
|
|
|
179
211
|
M.fail("5XX"),
|
|
180
212
|
)(response, { extraFields: responseFields });
|
|
181
213
|
if (!result.ok) {
|
|
182
|
-
return result;
|
|
214
|
+
return [result, { status: "complete", request: req, response }];
|
|
183
215
|
}
|
|
184
216
|
|
|
185
|
-
return result;
|
|
217
|
+
return [result, { status: "complete", request: req, response }];
|
|
186
218
|
}
|
|
@@ -21,16 +21,17 @@ 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
|
/**
|
|
27
28
|
* Handle chat oauth
|
|
28
29
|
*/
|
|
29
|
-
export
|
|
30
|
+
export function subscribersAuthenticationChatAccessOauth(
|
|
30
31
|
client: NovuCore,
|
|
31
32
|
request: operations.SubscribersV1ControllerChatAccessOauthRequest,
|
|
32
33
|
options?: RequestOptions,
|
|
33
|
-
):
|
|
34
|
+
): APIPromise<
|
|
34
35
|
Result<
|
|
35
36
|
operations.SubscribersV1ControllerChatAccessOauthResponse | undefined,
|
|
36
37
|
| errors.ErrorDto
|
|
@@ -45,6 +46,36 @@ export async function subscribersAuthenticationChatAccessOauth(
|
|
|
45
46
|
| RequestTimeoutError
|
|
46
47
|
| ConnectionError
|
|
47
48
|
>
|
|
49
|
+
> {
|
|
50
|
+
return new APIPromise($do(
|
|
51
|
+
client,
|
|
52
|
+
request,
|
|
53
|
+
options,
|
|
54
|
+
));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function $do(
|
|
58
|
+
client: NovuCore,
|
|
59
|
+
request: operations.SubscribersV1ControllerChatAccessOauthRequest,
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): Promise<
|
|
62
|
+
[
|
|
63
|
+
Result<
|
|
64
|
+
operations.SubscribersV1ControllerChatAccessOauthResponse | undefined,
|
|
65
|
+
| errors.ErrorDto
|
|
66
|
+
| errors.ErrorDto
|
|
67
|
+
| errors.ValidationErrorDto
|
|
68
|
+
| errors.ErrorDto
|
|
69
|
+
| SDKError
|
|
70
|
+
| SDKValidationError
|
|
71
|
+
| UnexpectedClientError
|
|
72
|
+
| InvalidRequestError
|
|
73
|
+
| RequestAbortedError
|
|
74
|
+
| RequestTimeoutError
|
|
75
|
+
| ConnectionError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
48
79
|
> {
|
|
49
80
|
const parsed = safeParse(
|
|
50
81
|
request,
|
|
@@ -54,7 +85,7 @@ export async function subscribersAuthenticationChatAccessOauth(
|
|
|
54
85
|
"Input validation failed",
|
|
55
86
|
);
|
|
56
87
|
if (!parsed.ok) {
|
|
57
|
-
return parsed;
|
|
88
|
+
return [parsed, { status: "invalid" }];
|
|
58
89
|
}
|
|
59
90
|
const payload = parsed.value;
|
|
60
91
|
const body = null;
|
|
@@ -94,6 +125,7 @@ export async function subscribersAuthenticationChatAccessOauth(
|
|
|
94
125
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
95
126
|
|
|
96
127
|
const context = {
|
|
128
|
+
baseURL: options?.serverURL ?? "",
|
|
97
129
|
operationID: "SubscribersV1Controller_chatAccessOauth",
|
|
98
130
|
oAuth2Scopes: [],
|
|
99
131
|
|
|
@@ -127,7 +159,7 @@ export async function subscribersAuthenticationChatAccessOauth(
|
|
|
127
159
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
128
160
|
}, options);
|
|
129
161
|
if (!requestRes.ok) {
|
|
130
|
-
return requestRes;
|
|
162
|
+
return [requestRes, { status: "invalid" }];
|
|
131
163
|
}
|
|
132
164
|
const req = requestRes.value;
|
|
133
165
|
|
|
@@ -154,7 +186,7 @@ export async function subscribersAuthenticationChatAccessOauth(
|
|
|
154
186
|
retryCodes: context.retryCodes,
|
|
155
187
|
});
|
|
156
188
|
if (!doResult.ok) {
|
|
157
|
-
return doResult;
|
|
189
|
+
return [doResult, { status: "request-error", request: req }];
|
|
158
190
|
}
|
|
159
191
|
const response = doResult.value;
|
|
160
192
|
|
|
@@ -195,8 +227,8 @@ export async function subscribersAuthenticationChatAccessOauth(
|
|
|
195
227
|
M.fail("5XX"),
|
|
196
228
|
)(response, { extraFields: responseFields });
|
|
197
229
|
if (!result.ok) {
|
|
198
|
-
return result;
|
|
230
|
+
return [result, { status: "complete", request: req, response }];
|
|
199
231
|
}
|
|
200
232
|
|
|
201
|
-
return result;
|
|
233
|
+
return [result, { status: "complete", request: req, response }];
|
|
202
234
|
}
|