@kard-financial/sdk 12.3.0 → 12.4.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 +106 -15
- package/dist/cjs/BaseClient.d.ts +7 -8
- package/dist/cjs/BaseClient.js +3 -3
- package/dist/cjs/Client.d.ts +13 -2
- package/dist/cjs/Client.js +67 -0
- package/dist/cjs/api/resources/auth/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/auth/client/Client.js +3 -23
- package/dist/cjs/api/resources/auth/exports.d.ts +2 -0
- package/dist/cjs/api/resources/auth/exports.js +21 -0
- package/dist/cjs/api/resources/commons/errors/ConflictError.js +5 -1
- package/dist/cjs/api/resources/commons/errors/DoesNotExistError.js +5 -1
- package/dist/cjs/api/resources/commons/errors/ForbiddenError.js +5 -1
- package/dist/cjs/api/resources/commons/errors/InternalServerError.js +5 -1
- package/dist/cjs/api/resources/commons/errors/InvalidRequest.js +5 -1
- package/dist/cjs/api/resources/commons/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/resources/commons/exports.d.ts +1 -0
- package/dist/cjs/api/resources/commons/exports.js +18 -0
- package/dist/cjs/api/resources/commons/types/ErrorObject.d.ts +2 -2
- package/dist/cjs/api/resources/commons/types/ErrorSource.d.ts +3 -3
- package/dist/cjs/api/resources/commons/types/Links.d.ts +2 -2
- package/dist/cjs/api/resources/files/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/files/client/Client.js +11 -47
- package/dist/cjs/api/resources/files/exports.d.ts +2 -0
- package/dist/cjs/api/resources/files/exports.js +21 -0
- package/dist/cjs/api/resources/notifications/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/notifications/exports.d.ts +3 -0
- package/dist/cjs/api/resources/notifications/exports.js +22 -0
- package/dist/cjs/api/resources/notifications/resources/subscriptions/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/notifications/resources/subscriptions/client/Client.js +7 -64
- package/dist/cjs/api/resources/notifications/resources/subscriptions/exports.d.ts +2 -0
- package/dist/cjs/api/resources/notifications/resources/subscriptions/exports.js +21 -0
- package/dist/cjs/api/resources/notifications/resources/subscriptions/types/UpdateSubscriptionRequestAttributes.d.ts +3 -3
- package/dist/cjs/api/resources/notifications/types/AuditUpdateAttributes.d.ts +3 -3
- package/dist/cjs/api/resources/notifications/types/FailedTransactionAttributes.d.ts +1 -1
- package/dist/cjs/api/resources/notifications/types/NotificationPayload.d.ts +2 -2
- package/dist/cjs/api/resources/notifications/types/RewardNotificationAttributes.d.ts +2 -2
- package/dist/cjs/api/resources/ping/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/ping/client/Client.js +2 -20
- package/dist/cjs/api/resources/ping/errors/NetworkBlockedError.js +5 -1
- package/dist/cjs/api/resources/ping/exports.d.ts +2 -0
- package/dist/cjs/api/resources/ping/exports.js +21 -0
- package/dist/cjs/api/resources/transactions/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/transactions/client/Client.js +12 -113
- package/dist/cjs/api/resources/transactions/errors/CreateAuditMultiStatus.js +5 -1
- package/dist/cjs/api/resources/transactions/errors/CreateIncomingTransactionsMultiStatus.js +5 -1
- package/dist/cjs/api/resources/transactions/errors/FraudMultiStatus.js +5 -1
- package/dist/cjs/api/resources/transactions/exports.d.ts +2 -0
- package/dist/cjs/api/resources/transactions/exports.js +21 -0
- package/dist/cjs/api/resources/transactions/types/CoreTransactionAttributes.d.ts +3 -3
- package/dist/cjs/api/resources/transactions/types/CreateAuditMultiStatusResponse.d.ts +1 -1
- package/dist/cjs/api/resources/transactions/types/GetEarnedRewardsResponse.d.ts +1 -1
- package/dist/cjs/api/resources/transactions/types/MatchedTransactionsAttributes.d.ts +14 -14
- package/dist/cjs/api/resources/transactions/types/Merchant.d.ts +9 -9
- package/dist/cjs/api/resources/transactions/types/RewardedTransactionAttributes.d.ts +3 -3
- package/dist/cjs/api/resources/transactions/types/TransactionsAttributes.d.ts +18 -18
- package/dist/cjs/api/resources/users/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/users/client/Client.js +5 -80
- package/dist/cjs/api/resources/users/errors/MultiStatus.js +5 -1
- package/dist/cjs/api/resources/users/exports.d.ts +3 -0
- package/dist/cjs/api/resources/users/exports.js +22 -0
- package/dist/cjs/api/resources/users/resources/attributions/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/users/resources/attributions/client/Client.js +20 -94
- package/dist/cjs/api/resources/users/resources/attributions/exports.d.ts +2 -0
- package/dist/cjs/api/resources/users/resources/attributions/exports.js +21 -0
- package/dist/cjs/api/resources/users/resources/attributions/types/ActivateOfferResponse.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/attributions/types/AttributionState.d.ts +2 -2
- package/dist/cjs/api/resources/users/resources/attributions/types/BoostOfferResponse.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/attributions/types/NotificationAttributionAttributes.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/attributions/types/OfferAttributionAttributes.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/auth/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/users/resources/auth/client/Client.js +2 -20
- package/dist/cjs/api/resources/users/resources/auth/exports.d.ts +2 -0
- package/dist/cjs/api/resources/users/resources/auth/exports.js +21 -0
- package/dist/cjs/api/resources/users/resources/rewards/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +39 -144
- package/dist/cjs/api/resources/users/resources/rewards/exports.d.ts +2 -0
- package/dist/cjs/api/resources/users/resources/rewards/exports.js +21 -0
- package/dist/cjs/api/resources/users/resources/rewards/types/CtaComponent.d.ts +2 -2
- package/dist/cjs/api/resources/users/resources/rewards/types/LocationData.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/rewards/types/LocationsResponseObject.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/rewards/types/LogoFlare.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/rewards/types/OfferCommonFields.d.ts +8 -8
- package/dist/cjs/api/resources/users/resources/rewards/types/OfferComponents.d.ts +9 -9
- package/dist/cjs/api/resources/users/resources/rewards/types/OffersMeta.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/rewards/types/OffersResponseObject.d.ts +2 -2
- package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBar.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarLabelPair.d.ts +2 -2
- package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarLabels.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarSegment.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/rewards/types/ProgressBarSegments.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/rewards/types/StandardOffer.d.ts +1 -1
- package/dist/cjs/api/resources/users/resources/uploads/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/users/resources/uploads/client/Client.js +4 -60
- package/dist/cjs/api/resources/users/resources/uploads/errors/UploadPartMultiStatus.js +5 -1
- package/dist/cjs/api/resources/users/resources/uploads/exports.d.ts +2 -0
- package/dist/cjs/api/resources/users/resources/uploads/exports.js +21 -0
- package/dist/cjs/api/resources/users/resources/uploads/types/CreateUploadPartMultiStatusResponse.d.ts +1 -1
- package/dist/cjs/api/resources/users/types/CreateUsersMultiStatusResponse.d.ts +1 -1
- package/dist/cjs/api/resources/users/types/UpdateUserRequestAttributes.d.ts +5 -5
- package/dist/cjs/api/resources/users/types/UserRequestAttributes.d.ts +6 -6
- package/dist/cjs/auth/OAuthAuthProvider.d.ts +36 -14
- package/dist/cjs/auth/OAuthAuthProvider.js +108 -40
- package/dist/cjs/core/auth/BasicAuth.d.ts +2 -2
- package/dist/cjs/core/auth/BasicAuth.js +7 -1
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/cjs/core/fetcher/Fetcher.d.ts +3 -2
- package/dist/cjs/core/fetcher/Fetcher.js +12 -2
- package/dist/cjs/core/fetcher/index.d.ts +2 -0
- package/dist/cjs/core/fetcher/index.js +3 -1
- package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
- package/dist/cjs/core/fetcher/makeRequest.js +30 -9
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/core/runtime/runtime.js +8 -7
- package/dist/cjs/errors/KardApiError.d.ts +3 -1
- package/dist/cjs/errors/KardApiError.js +9 -2
- package/dist/cjs/errors/KardApiTimeoutError.d.ts +4 -1
- package/dist/cjs/errors/KardApiTimeoutError.js +9 -2
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +68 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +7 -8
- package/dist/esm/BaseClient.mjs +3 -3
- package/dist/esm/Client.d.mts +13 -2
- package/dist/esm/Client.mjs +34 -0
- package/dist/esm/api/resources/auth/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/auth/client/Client.mjs +3 -23
- package/dist/esm/api/resources/auth/exports.d.mts +2 -0
- package/dist/esm/api/resources/auth/exports.mjs +3 -0
- package/dist/esm/api/resources/commons/errors/ConflictError.mjs +5 -1
- package/dist/esm/api/resources/commons/errors/DoesNotExistError.mjs +5 -1
- package/dist/esm/api/resources/commons/errors/ForbiddenError.mjs +5 -1
- package/dist/esm/api/resources/commons/errors/InternalServerError.mjs +5 -1
- package/dist/esm/api/resources/commons/errors/InvalidRequest.mjs +5 -1
- package/dist/esm/api/resources/commons/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/resources/commons/exports.d.mts +1 -0
- package/dist/esm/api/resources/commons/exports.mjs +2 -0
- package/dist/esm/api/resources/commons/types/ErrorObject.d.mts +2 -2
- package/dist/esm/api/resources/commons/types/ErrorSource.d.mts +3 -3
- package/dist/esm/api/resources/commons/types/Links.d.mts +2 -2
- package/dist/esm/api/resources/files/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/files/client/Client.mjs +11 -47
- package/dist/esm/api/resources/files/exports.d.mts +2 -0
- package/dist/esm/api/resources/files/exports.mjs +3 -0
- package/dist/esm/api/resources/notifications/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/notifications/exports.d.mts +3 -0
- package/dist/esm/api/resources/notifications/exports.mjs +4 -0
- package/dist/esm/api/resources/notifications/resources/subscriptions/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/notifications/resources/subscriptions/client/Client.mjs +7 -64
- package/dist/esm/api/resources/notifications/resources/subscriptions/exports.d.mts +2 -0
- package/dist/esm/api/resources/notifications/resources/subscriptions/exports.mjs +3 -0
- package/dist/esm/api/resources/notifications/resources/subscriptions/types/UpdateSubscriptionRequestAttributes.d.mts +3 -3
- package/dist/esm/api/resources/notifications/types/AuditUpdateAttributes.d.mts +3 -3
- package/dist/esm/api/resources/notifications/types/FailedTransactionAttributes.d.mts +1 -1
- package/dist/esm/api/resources/notifications/types/NotificationPayload.d.mts +2 -2
- package/dist/esm/api/resources/notifications/types/RewardNotificationAttributes.d.mts +2 -2
- package/dist/esm/api/resources/ping/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/ping/client/Client.mjs +2 -20
- package/dist/esm/api/resources/ping/errors/NetworkBlockedError.mjs +5 -1
- package/dist/esm/api/resources/ping/exports.d.mts +2 -0
- package/dist/esm/api/resources/ping/exports.mjs +3 -0
- package/dist/esm/api/resources/transactions/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/transactions/client/Client.mjs +12 -113
- package/dist/esm/api/resources/transactions/errors/CreateAuditMultiStatus.mjs +5 -1
- package/dist/esm/api/resources/transactions/errors/CreateIncomingTransactionsMultiStatus.mjs +5 -1
- package/dist/esm/api/resources/transactions/errors/FraudMultiStatus.mjs +5 -1
- package/dist/esm/api/resources/transactions/exports.d.mts +2 -0
- package/dist/esm/api/resources/transactions/exports.mjs +3 -0
- package/dist/esm/api/resources/transactions/types/CoreTransactionAttributes.d.mts +3 -3
- package/dist/esm/api/resources/transactions/types/CreateAuditMultiStatusResponse.d.mts +1 -1
- package/dist/esm/api/resources/transactions/types/GetEarnedRewardsResponse.d.mts +1 -1
- package/dist/esm/api/resources/transactions/types/MatchedTransactionsAttributes.d.mts +14 -14
- package/dist/esm/api/resources/transactions/types/Merchant.d.mts +9 -9
- package/dist/esm/api/resources/transactions/types/RewardedTransactionAttributes.d.mts +3 -3
- package/dist/esm/api/resources/transactions/types/TransactionsAttributes.d.mts +18 -18
- package/dist/esm/api/resources/users/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/users/client/Client.mjs +5 -80
- package/dist/esm/api/resources/users/errors/MultiStatus.mjs +5 -1
- package/dist/esm/api/resources/users/exports.d.mts +3 -0
- package/dist/esm/api/resources/users/exports.mjs +4 -0
- package/dist/esm/api/resources/users/resources/attributions/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/users/resources/attributions/client/Client.mjs +20 -94
- package/dist/esm/api/resources/users/resources/attributions/exports.d.mts +2 -0
- package/dist/esm/api/resources/users/resources/attributions/exports.mjs +3 -0
- package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponse.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/attributions/types/AttributionState.d.mts +2 -2
- package/dist/esm/api/resources/users/resources/attributions/types/BoostOfferResponse.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/attributions/types/NotificationAttributionAttributes.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/attributions/types/OfferAttributionAttributes.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/auth/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/users/resources/auth/client/Client.mjs +2 -20
- package/dist/esm/api/resources/users/resources/auth/exports.d.mts +2 -0
- package/dist/esm/api/resources/users/resources/auth/exports.mjs +3 -0
- package/dist/esm/api/resources/users/resources/rewards/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +39 -144
- package/dist/esm/api/resources/users/resources/rewards/exports.d.mts +2 -0
- package/dist/esm/api/resources/users/resources/rewards/exports.mjs +3 -0
- package/dist/esm/api/resources/users/resources/rewards/types/CtaComponent.d.mts +2 -2
- package/dist/esm/api/resources/users/resources/rewards/types/LocationData.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/rewards/types/LocationsResponseObject.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/rewards/types/LogoFlare.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/rewards/types/OfferCommonFields.d.mts +8 -8
- package/dist/esm/api/resources/users/resources/rewards/types/OfferComponents.d.mts +9 -9
- package/dist/esm/api/resources/users/resources/rewards/types/OffersMeta.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/rewards/types/OffersResponseObject.d.mts +2 -2
- package/dist/esm/api/resources/users/resources/rewards/types/ProgressBar.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarLabelPair.d.mts +2 -2
- package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarLabels.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarSegment.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/rewards/types/ProgressBarSegments.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/rewards/types/StandardOffer.d.mts +1 -1
- package/dist/esm/api/resources/users/resources/uploads/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/users/resources/uploads/client/Client.mjs +4 -60
- package/dist/esm/api/resources/users/resources/uploads/errors/UploadPartMultiStatus.mjs +5 -1
- package/dist/esm/api/resources/users/resources/uploads/exports.d.mts +2 -0
- package/dist/esm/api/resources/users/resources/uploads/exports.mjs +3 -0
- package/dist/esm/api/resources/users/resources/uploads/types/CreateUploadPartMultiStatusResponse.d.mts +1 -1
- package/dist/esm/api/resources/users/types/CreateUsersMultiStatusResponse.d.mts +1 -1
- package/dist/esm/api/resources/users/types/UpdateUserRequestAttributes.d.mts +5 -5
- package/dist/esm/api/resources/users/types/UserRequestAttributes.d.mts +6 -6
- package/dist/esm/auth/OAuthAuthProvider.d.mts +36 -14
- package/dist/esm/auth/OAuthAuthProvider.mjs +106 -39
- package/dist/esm/core/auth/BasicAuth.d.mts +2 -2
- package/dist/esm/core/auth/BasicAuth.mjs +7 -1
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
- package/dist/esm/core/fetcher/Fetcher.d.mts +3 -2
- package/dist/esm/core/fetcher/Fetcher.mjs +12 -2
- package/dist/esm/core/fetcher/index.d.mts +2 -0
- package/dist/esm/core/fetcher/index.mjs +1 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/core/runtime/runtime.mjs +8 -7
- package/dist/esm/errors/KardApiError.d.mts +3 -1
- package/dist/esm/errors/KardApiError.mjs +9 -2
- package/dist/esm/errors/KardApiTimeoutError.d.mts +4 -1
- package/dist/esm/errors/KardApiTimeoutError.mjs +9 -2
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +32 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +134 -10
- package/reference.md +1 -0
|
@@ -12,6 +12,7 @@ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
|
12
12
|
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
15
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
16
17
|
import * as KardApi from "../../../index.mjs";
|
|
17
18
|
export class FilesClient {
|
|
@@ -49,33 +50,15 @@ export class FilesClient {
|
|
|
49
50
|
return __awaiter(this, arguments, void 0, function* (organizationId, request = {}, requestOptions) {
|
|
50
51
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
51
52
|
const { "filter[dateFrom]": filterDateFrom, "filter[dateTo]": filterDateTo, "filter[fileType]": filterFileType, "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, sort, } = request;
|
|
52
|
-
const _queryParams = {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
if (pageSize != null) {
|
|
63
|
-
_queryParams["page[size]"] = pageSize.toString();
|
|
64
|
-
}
|
|
65
|
-
if (pageAfter != null) {
|
|
66
|
-
_queryParams["page[after]"] = pageAfter;
|
|
67
|
-
}
|
|
68
|
-
if (pageBefore != null) {
|
|
69
|
-
_queryParams["page[before]"] = pageBefore;
|
|
70
|
-
}
|
|
71
|
-
if (sort != null) {
|
|
72
|
-
if (Array.isArray(sort)) {
|
|
73
|
-
_queryParams.sort = sort.map((item) => item);
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
_queryParams.sort = sort;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
53
|
+
const _queryParams = {
|
|
54
|
+
"filter[dateFrom]": filterDateFrom,
|
|
55
|
+
"filter[dateTo]": filterDateTo,
|
|
56
|
+
"filter[fileType]": filterFileType != null ? filterFileType : undefined,
|
|
57
|
+
"page[size]": pageSize,
|
|
58
|
+
"page[after]": pageAfter,
|
|
59
|
+
"page[before]": pageBefore,
|
|
60
|
+
sort: Array.isArray(sort) ? sort.map((item) => item) : sort != null ? sort : undefined,
|
|
61
|
+
};
|
|
79
62
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
80
63
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
81
64
|
const _response = yield core.fetcher({
|
|
@@ -110,26 +93,7 @@ export class FilesClient {
|
|
|
110
93
|
});
|
|
111
94
|
}
|
|
112
95
|
}
|
|
113
|
-
|
|
114
|
-
case "non-json":
|
|
115
|
-
throw new errors.KardApiError({
|
|
116
|
-
statusCode: _response.error.statusCode,
|
|
117
|
-
body: _response.error.rawBody,
|
|
118
|
-
rawResponse: _response.rawResponse,
|
|
119
|
-
});
|
|
120
|
-
case "body-is-null":
|
|
121
|
-
throw new errors.KardApiError({
|
|
122
|
-
statusCode: _response.error.statusCode,
|
|
123
|
-
rawResponse: _response.rawResponse,
|
|
124
|
-
});
|
|
125
|
-
case "timeout":
|
|
126
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling GET /v2/issuers/{organizationId}/files/metadata.");
|
|
127
|
-
case "unknown":
|
|
128
|
-
throw new errors.KardApiError({
|
|
129
|
-
message: _response.error.errorMessage,
|
|
130
|
-
rawResponse: _response.rawResponse,
|
|
131
|
-
});
|
|
132
|
-
}
|
|
96
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/files/metadata");
|
|
133
97
|
});
|
|
134
98
|
}
|
|
135
99
|
}
|
|
@@ -2,8 +2,7 @@ import type { BaseClientOptions } from "../../../../BaseClient.mjs";
|
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
3
|
import { SubscriptionsClient } from "../resources/subscriptions/client/Client.mjs";
|
|
4
4
|
export declare namespace NotificationsClient {
|
|
5
|
-
|
|
6
|
-
}
|
|
5
|
+
type Options = BaseClientOptions;
|
|
7
6
|
}
|
|
8
7
|
export declare class NotificationsClient {
|
|
9
8
|
protected readonly _options: NormalizedClientOptionsWithAuth<NotificationsClient.Options>;
|
|
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClie
|
|
|
3
3
|
import * as core from "../../../../../../core/index.mjs";
|
|
4
4
|
import * as KardApi from "../../../../../index.mjs";
|
|
5
5
|
export declare namespace SubscriptionsClient {
|
|
6
|
-
|
|
7
|
-
}
|
|
6
|
+
type Options = BaseClientOptions;
|
|
8
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
9
8
|
}
|
|
10
9
|
}
|
|
@@ -12,6 +12,7 @@ import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs
|
|
|
12
12
|
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
15
16
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
16
17
|
import * as KardApi from "../../../../../index.mjs";
|
|
17
18
|
export class SubscriptionsClient {
|
|
@@ -40,10 +41,9 @@ export class SubscriptionsClient {
|
|
|
40
41
|
return __awaiter(this, arguments, void 0, function* (organizationId, request = {}, requestOptions) {
|
|
41
42
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
42
43
|
const { "filter[eventName]": filterEventName } = request;
|
|
43
|
-
const _queryParams = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
44
|
+
const _queryParams = {
|
|
45
|
+
"filter[eventName]": filterEventName != null ? filterEventName : undefined,
|
|
46
|
+
};
|
|
47
47
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
48
48
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
49
49
|
const _response = yield core.fetcher({
|
|
@@ -79,26 +79,7 @@ export class SubscriptionsClient {
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
case "non-json":
|
|
84
|
-
throw new errors.KardApiError({
|
|
85
|
-
statusCode: _response.error.statusCode,
|
|
86
|
-
body: _response.error.rawBody,
|
|
87
|
-
rawResponse: _response.rawResponse,
|
|
88
|
-
});
|
|
89
|
-
case "body-is-null":
|
|
90
|
-
throw new errors.KardApiError({
|
|
91
|
-
statusCode: _response.error.statusCode,
|
|
92
|
-
rawResponse: _response.rawResponse,
|
|
93
|
-
});
|
|
94
|
-
case "timeout":
|
|
95
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling GET /v2/issuers/{organizationId}/subscriptions.");
|
|
96
|
-
case "unknown":
|
|
97
|
-
throw new errors.KardApiError({
|
|
98
|
-
message: _response.error.errorMessage,
|
|
99
|
-
rawResponse: _response.rawResponse,
|
|
100
|
-
});
|
|
101
|
-
}
|
|
82
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/subscriptions");
|
|
102
83
|
});
|
|
103
84
|
}
|
|
104
85
|
/**
|
|
@@ -172,26 +153,7 @@ export class SubscriptionsClient {
|
|
|
172
153
|
});
|
|
173
154
|
}
|
|
174
155
|
}
|
|
175
|
-
|
|
176
|
-
case "non-json":
|
|
177
|
-
throw new errors.KardApiError({
|
|
178
|
-
statusCode: _response.error.statusCode,
|
|
179
|
-
body: _response.error.rawBody,
|
|
180
|
-
rawResponse: _response.rawResponse,
|
|
181
|
-
});
|
|
182
|
-
case "body-is-null":
|
|
183
|
-
throw new errors.KardApiError({
|
|
184
|
-
statusCode: _response.error.statusCode,
|
|
185
|
-
rawResponse: _response.rawResponse,
|
|
186
|
-
});
|
|
187
|
-
case "timeout":
|
|
188
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/subscriptions.");
|
|
189
|
-
case "unknown":
|
|
190
|
-
throw new errors.KardApiError({
|
|
191
|
-
message: _response.error.errorMessage,
|
|
192
|
-
rawResponse: _response.rawResponse,
|
|
193
|
-
});
|
|
194
|
-
}
|
|
156
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/subscriptions");
|
|
195
157
|
});
|
|
196
158
|
}
|
|
197
159
|
/**
|
|
@@ -266,26 +228,7 @@ export class SubscriptionsClient {
|
|
|
266
228
|
});
|
|
267
229
|
}
|
|
268
230
|
}
|
|
269
|
-
|
|
270
|
-
case "non-json":
|
|
271
|
-
throw new errors.KardApiError({
|
|
272
|
-
statusCode: _response.error.statusCode,
|
|
273
|
-
body: _response.error.rawBody,
|
|
274
|
-
rawResponse: _response.rawResponse,
|
|
275
|
-
});
|
|
276
|
-
case "body-is-null":
|
|
277
|
-
throw new errors.KardApiError({
|
|
278
|
-
statusCode: _response.error.statusCode,
|
|
279
|
-
rawResponse: _response.rawResponse,
|
|
280
|
-
});
|
|
281
|
-
case "timeout":
|
|
282
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling PATCH /v2/issuers/{organizationId}/subscriptions/{subscriptionId}.");
|
|
283
|
-
case "unknown":
|
|
284
|
-
throw new errors.KardApiError({
|
|
285
|
-
message: _response.error.errorMessage,
|
|
286
|
-
rawResponse: _response.rawResponse,
|
|
287
|
-
});
|
|
288
|
-
}
|
|
231
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v2/issuers/{organizationId}/subscriptions/{subscriptionId}");
|
|
289
232
|
});
|
|
290
233
|
}
|
|
291
234
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type * as KardApi from "../../../../../index.mjs";
|
|
2
2
|
export interface UpdateSubscriptionRequestAttributes {
|
|
3
3
|
/** The name of the event for the subscription */
|
|
4
|
-
eventName?: KardApi.NotificationType;
|
|
4
|
+
eventName?: KardApi.NotificationType | undefined;
|
|
5
5
|
/** The URL where notifications will be delivered */
|
|
6
|
-
webhookUrl?: string;
|
|
6
|
+
webhookUrl?: string | undefined;
|
|
7
7
|
/** Indicates whether the subscription is active */
|
|
8
|
-
enabled?: boolean;
|
|
8
|
+
enabled?: boolean | undefined;
|
|
9
9
|
}
|
|
@@ -36,9 +36,9 @@ export interface AuditUpdateAttributes {
|
|
|
36
36
|
* <li>`9005` : Transaction not captured</li>
|
|
37
37
|
* </ul>
|
|
38
38
|
*/
|
|
39
|
-
resolutionCode?: number;
|
|
39
|
+
resolutionCode?: number | undefined;
|
|
40
40
|
/** The resolution description; field is available when audit is status CLOSED */
|
|
41
|
-
resolutionDescription?: string;
|
|
41
|
+
resolutionDescription?: string | undefined;
|
|
42
42
|
/** The resolution timestamp of when the audit was marked as status CLOSED in ISO format; available when audit is closed. */
|
|
43
|
-
resolutionTimeStamp?: string;
|
|
43
|
+
resolutionTimeStamp?: string | undefined;
|
|
44
44
|
}
|
|
@@ -252,6 +252,6 @@ import type * as KardApi from "../../../index.mjs";
|
|
|
252
252
|
*/
|
|
253
253
|
export interface NotificationPayload {
|
|
254
254
|
data: KardApi.NotificationDataUnion;
|
|
255
|
-
meta?: KardApi.NotificationMetadata;
|
|
256
|
-
errors?: KardApi.ErrorObject[];
|
|
255
|
+
meta?: KardApi.NotificationMetadata | undefined;
|
|
256
|
+
errors?: KardApi.ErrorObject[] | undefined;
|
|
257
257
|
}
|
|
@@ -6,7 +6,7 @@ export interface RewardNotificationAttributes {
|
|
|
6
6
|
/** The attribution URL to track user's interactions with the notification */
|
|
7
7
|
attributionUrl: string;
|
|
8
8
|
/** Post experience survey URL, if available. This will be present for rewards associated with local offers. */
|
|
9
|
-
surveyUrl?: string;
|
|
9
|
+
surveyUrl?: string | undefined;
|
|
10
10
|
/** The ID of the card product */
|
|
11
|
-
cardProductId?: string;
|
|
11
|
+
cardProductId?: string | undefined;
|
|
12
12
|
}
|
|
@@ -3,8 +3,7 @@ import { type NormalizedClientOptions } from "../../../../BaseClient.mjs";
|
|
|
3
3
|
import * as core from "../../../../core/index.mjs";
|
|
4
4
|
import * as KardApi from "../../../index.mjs";
|
|
5
5
|
export declare namespace PingClient {
|
|
6
|
-
|
|
7
|
-
}
|
|
6
|
+
type Options = BaseClientOptions;
|
|
8
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
9
8
|
}
|
|
10
9
|
}
|
|
@@ -12,6 +12,7 @@ import { normalizeClientOptions } from "../../../../BaseClient.mjs";
|
|
|
12
12
|
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
15
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
16
17
|
import * as KardApi from "../../../index.mjs";
|
|
17
18
|
export class PingClient {
|
|
@@ -61,26 +62,7 @@ export class PingClient {
|
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
-
case "non-json":
|
|
66
|
-
throw new errors.KardApiError({
|
|
67
|
-
statusCode: _response.error.statusCode,
|
|
68
|
-
body: _response.error.rawBody,
|
|
69
|
-
rawResponse: _response.rawResponse,
|
|
70
|
-
});
|
|
71
|
-
case "body-is-null":
|
|
72
|
-
throw new errors.KardApiError({
|
|
73
|
-
statusCode: _response.error.statusCode,
|
|
74
|
-
rawResponse: _response.rawResponse,
|
|
75
|
-
});
|
|
76
|
-
case "timeout":
|
|
77
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling GET /v2/ping.");
|
|
78
|
-
case "unknown":
|
|
79
|
-
throw new errors.KardApiError({
|
|
80
|
-
message: _response.error.errorMessage,
|
|
81
|
-
rawResponse: _response.rawResponse,
|
|
82
|
-
});
|
|
83
|
-
}
|
|
65
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/ping");
|
|
84
66
|
});
|
|
85
67
|
}
|
|
86
68
|
}
|
|
@@ -8,6 +8,10 @@ export class NetworkBlockedError extends errors.KardApiError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
|
|
|
3
3
|
import * as core from "../../../../core/index.mjs";
|
|
4
4
|
import * as KardApi from "../../../index.mjs";
|
|
5
5
|
export declare namespace TransactionsClient {
|
|
6
|
-
|
|
7
|
-
}
|
|
6
|
+
type Options = BaseClientOptions;
|
|
8
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
9
8
|
}
|
|
10
9
|
}
|
|
@@ -12,6 +12,7 @@ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
|
12
12
|
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
15
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
16
17
|
import * as KardApi from "../../../index.mjs";
|
|
17
18
|
export class TransactionsClient {
|
|
@@ -225,26 +226,7 @@ export class TransactionsClient {
|
|
|
225
226
|
});
|
|
226
227
|
}
|
|
227
228
|
}
|
|
228
|
-
|
|
229
|
-
case "non-json":
|
|
230
|
-
throw new errors.KardApiError({
|
|
231
|
-
statusCode: _response.error.statusCode,
|
|
232
|
-
body: _response.error.rawBody,
|
|
233
|
-
rawResponse: _response.rawResponse,
|
|
234
|
-
});
|
|
235
|
-
case "body-is-null":
|
|
236
|
-
throw new errors.KardApiError({
|
|
237
|
-
statusCode: _response.error.statusCode,
|
|
238
|
-
rawResponse: _response.rawResponse,
|
|
239
|
-
});
|
|
240
|
-
case "timeout":
|
|
241
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/transactions.");
|
|
242
|
-
case "unknown":
|
|
243
|
-
throw new errors.KardApiError({
|
|
244
|
-
message: _response.error.errorMessage,
|
|
245
|
-
rawResponse: _response.rawResponse,
|
|
246
|
-
});
|
|
247
|
-
}
|
|
229
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/transactions");
|
|
248
230
|
});
|
|
249
231
|
}
|
|
250
232
|
/**
|
|
@@ -316,26 +298,7 @@ export class TransactionsClient {
|
|
|
316
298
|
});
|
|
317
299
|
}
|
|
318
300
|
}
|
|
319
|
-
|
|
320
|
-
case "non-json":
|
|
321
|
-
throw new errors.KardApiError({
|
|
322
|
-
statusCode: _response.error.statusCode,
|
|
323
|
-
body: _response.error.rawBody,
|
|
324
|
-
rawResponse: _response.rawResponse,
|
|
325
|
-
});
|
|
326
|
-
case "body-is-null":
|
|
327
|
-
throw new errors.KardApiError({
|
|
328
|
-
statusCode: _response.error.statusCode,
|
|
329
|
-
rawResponse: _response.rawResponse,
|
|
330
|
-
});
|
|
331
|
-
case "timeout":
|
|
332
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/fraud.");
|
|
333
|
-
case "unknown":
|
|
334
|
-
throw new errors.KardApiError({
|
|
335
|
-
message: _response.error.errorMessage,
|
|
336
|
-
rawResponse: _response.rawResponse,
|
|
337
|
-
});
|
|
338
|
-
}
|
|
301
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/fraud");
|
|
339
302
|
});
|
|
340
303
|
}
|
|
341
304
|
/**
|
|
@@ -414,26 +377,7 @@ export class TransactionsClient {
|
|
|
414
377
|
});
|
|
415
378
|
}
|
|
416
379
|
}
|
|
417
|
-
|
|
418
|
-
case "non-json":
|
|
419
|
-
throw new errors.KardApiError({
|
|
420
|
-
statusCode: _response.error.statusCode,
|
|
421
|
-
body: _response.error.rawBody,
|
|
422
|
-
rawResponse: _response.rawResponse,
|
|
423
|
-
});
|
|
424
|
-
case "body-is-null":
|
|
425
|
-
throw new errors.KardApiError({
|
|
426
|
-
statusCode: _response.error.statusCode,
|
|
427
|
-
rawResponse: _response.rawResponse,
|
|
428
|
-
});
|
|
429
|
-
case "timeout":
|
|
430
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users/{userId}/audits.");
|
|
431
|
-
case "unknown":
|
|
432
|
-
throw new errors.KardApiError({
|
|
433
|
-
message: _response.error.errorMessage,
|
|
434
|
-
rawResponse: _response.rawResponse,
|
|
435
|
-
});
|
|
436
|
-
}
|
|
380
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/users/{userId}/audits");
|
|
437
381
|
});
|
|
438
382
|
}
|
|
439
383
|
/**
|
|
@@ -511,26 +455,7 @@ export class TransactionsClient {
|
|
|
511
455
|
});
|
|
512
456
|
}
|
|
513
457
|
}
|
|
514
|
-
|
|
515
|
-
case "non-json":
|
|
516
|
-
throw new errors.KardApiError({
|
|
517
|
-
statusCode: _response.error.statusCode,
|
|
518
|
-
body: _response.error.rawBody,
|
|
519
|
-
rawResponse: _response.rawResponse,
|
|
520
|
-
});
|
|
521
|
-
case "body-is-null":
|
|
522
|
-
throw new errors.KardApiError({
|
|
523
|
-
statusCode: _response.error.statusCode,
|
|
524
|
-
rawResponse: _response.rawResponse,
|
|
525
|
-
});
|
|
526
|
-
case "timeout":
|
|
527
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/transactions/uploads.");
|
|
528
|
-
case "unknown":
|
|
529
|
-
throw new errors.KardApiError({
|
|
530
|
-
message: _response.error.errorMessage,
|
|
531
|
-
rawResponse: _response.rawResponse,
|
|
532
|
-
});
|
|
533
|
-
}
|
|
458
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/transactions/uploads");
|
|
534
459
|
});
|
|
535
460
|
}
|
|
536
461
|
/**
|
|
@@ -563,19 +488,12 @@ export class TransactionsClient {
|
|
|
563
488
|
return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
|
|
564
489
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
565
490
|
const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize, include } = request;
|
|
566
|
-
const _queryParams = {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
}
|
|
573
|
-
if (pageSize != null) {
|
|
574
|
-
_queryParams["page[size]"] = pageSize.toString();
|
|
575
|
-
}
|
|
576
|
-
if (include != null) {
|
|
577
|
-
_queryParams.include = include;
|
|
578
|
-
}
|
|
491
|
+
const _queryParams = {
|
|
492
|
+
"page[after]": pageAfter,
|
|
493
|
+
"page[before]": pageBefore,
|
|
494
|
+
"page[size]": pageSize,
|
|
495
|
+
include,
|
|
496
|
+
};
|
|
579
497
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
580
498
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
581
499
|
const _response = yield core.fetcher({
|
|
@@ -610,26 +528,7 @@ export class TransactionsClient {
|
|
|
610
528
|
});
|
|
611
529
|
}
|
|
612
530
|
}
|
|
613
|
-
|
|
614
|
-
case "non-json":
|
|
615
|
-
throw new errors.KardApiError({
|
|
616
|
-
statusCode: _response.error.statusCode,
|
|
617
|
-
body: _response.error.rawBody,
|
|
618
|
-
rawResponse: _response.rawResponse,
|
|
619
|
-
});
|
|
620
|
-
case "body-is-null":
|
|
621
|
-
throw new errors.KardApiError({
|
|
622
|
-
statusCode: _response.error.statusCode,
|
|
623
|
-
rawResponse: _response.rawResponse,
|
|
624
|
-
});
|
|
625
|
-
case "timeout":
|
|
626
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling GET /v2/issuers/{organizationId}/users/{userId}/earned-rewards.");
|
|
627
|
-
case "unknown":
|
|
628
|
-
throw new errors.KardApiError({
|
|
629
|
-
message: _response.error.errorMessage,
|
|
630
|
-
rawResponse: _response.rawResponse,
|
|
631
|
-
});
|
|
632
|
-
}
|
|
531
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/users/{userId}/earned-rewards");
|
|
633
532
|
});
|
|
634
533
|
}
|
|
635
534
|
}
|
|
@@ -8,6 +8,10 @@ export class CreateAuditMultiStatus extends errors.KardApiError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
package/dist/esm/api/resources/transactions/errors/CreateIncomingTransactionsMultiStatus.mjs
CHANGED
|
@@ -8,6 +8,10 @@ export class CreateIncomingTransactionsMultiStatus extends errors.KardApiError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@ export class FraudMultiStatus extends errors.KardApiError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -19,9 +19,9 @@ export interface CoreTransactionAttributes {
|
|
|
19
19
|
/** Timestamp for transaction authorization. Date string should be in ISO 8601 format i.e.'YYYY-MM-DDThh:mm:ss.sTZD' where TZD = time zone designator (Z or +hh:mm or -hh:mm) i.e. 1994-11-05T08:15:30-05:00 OR 1994-11-05T08:15:30Z */
|
|
20
20
|
authorizationDate: string;
|
|
21
21
|
/** Deprecated. Use `financialInstitutionId` instead. Name of the financial institution. */
|
|
22
|
-
financialInstitutionName?: string;
|
|
22
|
+
financialInstitutionName?: string | undefined;
|
|
23
23
|
/** Unique identifier of the financial institution */
|
|
24
|
-
financialInstitutionId?: string;
|
|
24
|
+
financialInstitutionId?: string | undefined;
|
|
25
25
|
/** Last four digits of the card(s) that may have been used for the transaction. When the issuer cannot determine which specific card was used, multiple values are provided as candidates. */
|
|
26
|
-
cardLastFours?: string[];
|
|
26
|
+
cardLastFours?: string[] | undefined;
|
|
27
27
|
}
|
|
@@ -81,5 +81,5 @@ export interface GetEarnedRewardsResponse {
|
|
|
81
81
|
data: KardApi.RewardedTransactionUnion[];
|
|
82
82
|
links: KardApi.Links;
|
|
83
83
|
/** Additional resources referenced in the response */
|
|
84
|
-
included?: KardApi.TransactionIncludedResource[];
|
|
84
|
+
included?: KardApi.TransactionIncludedResource[] | undefined;
|
|
85
85
|
}
|