@kard-financial/sdk 12.3.0 → 13.0.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 +3 -3
- package/dist/cjs/api/resources/transactions/client/Client.js +16 -115
- package/dist/cjs/api/resources/transactions/client/requests/GetEarnedRewardsRequest.d.ts +3 -0
- 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/GetEarnedRewardsMeta.d.ts +4 -0
- package/dist/cjs/api/resources/transactions/types/GetEarnedRewardsMeta.js +3 -0
- package/dist/cjs/api/resources/transactions/types/GetEarnedRewardsResponse.d.ts +50 -2
- 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/RewardedTransactionStatus.d.ts +1 -0
- package/dist/cjs/api/resources/transactions/types/RewardedTransactionStatus.js +1 -0
- package/dist/cjs/api/resources/transactions/types/TransactionsAttributes.d.ts +18 -18
- package/dist/cjs/api/resources/transactions/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/transactions/types/index.js +1 -0
- 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 +3 -3
- package/dist/esm/api/resources/transactions/client/Client.mjs +16 -115
- package/dist/esm/api/resources/transactions/client/requests/GetEarnedRewardsRequest.d.mts +3 -0
- 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/GetEarnedRewardsMeta.d.mts +4 -0
- package/dist/esm/api/resources/transactions/types/GetEarnedRewardsMeta.mjs +2 -0
- package/dist/esm/api/resources/transactions/types/GetEarnedRewardsResponse.d.mts +50 -2
- 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/RewardedTransactionStatus.d.mts +1 -0
- package/dist/esm/api/resources/transactions/types/RewardedTransactionStatus.mjs +1 -0
- package/dist/esm/api/resources/transactions/types/TransactionsAttributes.d.mts +18 -18
- package/dist/esm/api/resources/transactions/types/index.d.mts +1 -0
- package/dist/esm/api/resources/transactions/types/index.mjs +1 -0
- 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 +3 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.FilesClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "FilesClient", { enumerable: true, get: function () { return Client_js_1.FilesClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -2,8 +2,7 @@ import type { BaseClientOptions } from "../../../../BaseClient.js";
|
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
3
|
import { SubscriptionsClient } from "../resources/subscriptions/client/Client.js";
|
|
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>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.NotificationsClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "NotificationsClient", { enumerable: true, get: function () { return Client_js_1.NotificationsClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
22
|
+
__exportStar(require("./resources/index.js"), exports);
|
|
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClie
|
|
|
3
3
|
import * as core from "../../../../../../core/index.js";
|
|
4
4
|
import * as KardApi from "../../../../../index.js";
|
|
5
5
|
export declare namespace SubscriptionsClient {
|
|
6
|
-
|
|
7
|
-
}
|
|
6
|
+
type Options = BaseClientOptions;
|
|
8
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
9
8
|
}
|
|
10
9
|
}
|
|
@@ -48,6 +48,7 @@ const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
|
48
48
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
49
49
|
const core = __importStar(require("../../../../../../core/index.js"));
|
|
50
50
|
const environments = __importStar(require("../../../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
|
|
51
52
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
52
53
|
const KardApi = __importStar(require("../../../../../index.js"));
|
|
53
54
|
class SubscriptionsClient {
|
|
@@ -76,10 +77,9 @@ class SubscriptionsClient {
|
|
|
76
77
|
return __awaiter(this, arguments, void 0, function* (organizationId, request = {}, requestOptions) {
|
|
77
78
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
78
79
|
const { "filter[eventName]": filterEventName } = request;
|
|
79
|
-
const _queryParams = {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
80
|
+
const _queryParams = {
|
|
81
|
+
"filter[eventName]": filterEventName != null ? filterEventName : undefined,
|
|
82
|
+
};
|
|
83
83
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
84
84
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
85
85
|
const _response = yield core.fetcher({
|
|
@@ -115,26 +115,7 @@ class SubscriptionsClient {
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
|
|
119
|
-
case "non-json":
|
|
120
|
-
throw new errors.KardApiError({
|
|
121
|
-
statusCode: _response.error.statusCode,
|
|
122
|
-
body: _response.error.rawBody,
|
|
123
|
-
rawResponse: _response.rawResponse,
|
|
124
|
-
});
|
|
125
|
-
case "body-is-null":
|
|
126
|
-
throw new errors.KardApiError({
|
|
127
|
-
statusCode: _response.error.statusCode,
|
|
128
|
-
rawResponse: _response.rawResponse,
|
|
129
|
-
});
|
|
130
|
-
case "timeout":
|
|
131
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling GET /v2/issuers/{organizationId}/subscriptions.");
|
|
132
|
-
case "unknown":
|
|
133
|
-
throw new errors.KardApiError({
|
|
134
|
-
message: _response.error.errorMessage,
|
|
135
|
-
rawResponse: _response.rawResponse,
|
|
136
|
-
});
|
|
137
|
-
}
|
|
118
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/subscriptions");
|
|
138
119
|
});
|
|
139
120
|
}
|
|
140
121
|
/**
|
|
@@ -208,26 +189,7 @@ class SubscriptionsClient {
|
|
|
208
189
|
});
|
|
209
190
|
}
|
|
210
191
|
}
|
|
211
|
-
|
|
212
|
-
case "non-json":
|
|
213
|
-
throw new errors.KardApiError({
|
|
214
|
-
statusCode: _response.error.statusCode,
|
|
215
|
-
body: _response.error.rawBody,
|
|
216
|
-
rawResponse: _response.rawResponse,
|
|
217
|
-
});
|
|
218
|
-
case "body-is-null":
|
|
219
|
-
throw new errors.KardApiError({
|
|
220
|
-
statusCode: _response.error.statusCode,
|
|
221
|
-
rawResponse: _response.rawResponse,
|
|
222
|
-
});
|
|
223
|
-
case "timeout":
|
|
224
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/subscriptions.");
|
|
225
|
-
case "unknown":
|
|
226
|
-
throw new errors.KardApiError({
|
|
227
|
-
message: _response.error.errorMessage,
|
|
228
|
-
rawResponse: _response.rawResponse,
|
|
229
|
-
});
|
|
230
|
-
}
|
|
192
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/subscriptions");
|
|
231
193
|
});
|
|
232
194
|
}
|
|
233
195
|
/**
|
|
@@ -302,26 +264,7 @@ class SubscriptionsClient {
|
|
|
302
264
|
});
|
|
303
265
|
}
|
|
304
266
|
}
|
|
305
|
-
|
|
306
|
-
case "non-json":
|
|
307
|
-
throw new errors.KardApiError({
|
|
308
|
-
statusCode: _response.error.statusCode,
|
|
309
|
-
body: _response.error.rawBody,
|
|
310
|
-
rawResponse: _response.rawResponse,
|
|
311
|
-
});
|
|
312
|
-
case "body-is-null":
|
|
313
|
-
throw new errors.KardApiError({
|
|
314
|
-
statusCode: _response.error.statusCode,
|
|
315
|
-
rawResponse: _response.rawResponse,
|
|
316
|
-
});
|
|
317
|
-
case "timeout":
|
|
318
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling PATCH /v2/issuers/{organizationId}/subscriptions/{subscriptionId}.");
|
|
319
|
-
case "unknown":
|
|
320
|
-
throw new errors.KardApiError({
|
|
321
|
-
message: _response.error.errorMessage,
|
|
322
|
-
rawResponse: _response.rawResponse,
|
|
323
|
-
});
|
|
324
|
-
}
|
|
267
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v2/issuers/{organizationId}/subscriptions/{subscriptionId}");
|
|
325
268
|
});
|
|
326
269
|
}
|
|
327
270
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.SubscriptionsClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "SubscriptionsClient", { enumerable: true, get: function () { return Client_js_1.SubscriptionsClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type * as KardApi from "../../../../../index.js";
|
|
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.js";
|
|
|
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.js";
|
|
|
3
3
|
import * as core from "../../../../core/index.js";
|
|
4
4
|
import * as KardApi from "../../../index.js";
|
|
5
5
|
export declare namespace PingClient {
|
|
6
|
-
|
|
7
|
-
}
|
|
6
|
+
type Options = BaseClientOptions;
|
|
8
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
9
8
|
}
|
|
10
9
|
}
|
|
@@ -48,6 +48,7 @@ const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
|
48
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
49
|
const core = __importStar(require("../../../../core/index.js"));
|
|
50
50
|
const environments = __importStar(require("../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
51
52
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
52
53
|
const KardApi = __importStar(require("../../../index.js"));
|
|
53
54
|
class PingClient {
|
|
@@ -97,26 +98,7 @@ class PingClient {
|
|
|
97
98
|
});
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
|
-
|
|
101
|
-
case "non-json":
|
|
102
|
-
throw new errors.KardApiError({
|
|
103
|
-
statusCode: _response.error.statusCode,
|
|
104
|
-
body: _response.error.rawBody,
|
|
105
|
-
rawResponse: _response.rawResponse,
|
|
106
|
-
});
|
|
107
|
-
case "body-is-null":
|
|
108
|
-
throw new errors.KardApiError({
|
|
109
|
-
statusCode: _response.error.statusCode,
|
|
110
|
-
rawResponse: _response.rawResponse,
|
|
111
|
-
});
|
|
112
|
-
case "timeout":
|
|
113
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling GET /v2/ping.");
|
|
114
|
-
case "unknown":
|
|
115
|
-
throw new errors.KardApiError({
|
|
116
|
-
message: _response.error.errorMessage,
|
|
117
|
-
rawResponse: _response.rawResponse,
|
|
118
|
-
});
|
|
119
|
-
}
|
|
101
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/ping");
|
|
120
102
|
});
|
|
121
103
|
}
|
|
122
104
|
}
|
|
@@ -44,7 +44,11 @@ class NetworkBlockedError extends errors.KardApiError {
|
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
46
46
|
});
|
|
47
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
exports.NetworkBlockedError = NetworkBlockedError;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PingClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "PingClient", { enumerable: true, get: function () { return Client_js_1.PingClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
|
|
|
3
3
|
import * as core from "../../../../core/index.js";
|
|
4
4
|
import * as KardApi from "../../../index.js";
|
|
5
5
|
export declare namespace TransactionsClient {
|
|
6
|
-
|
|
7
|
-
}
|
|
6
|
+
type Options = BaseClientOptions;
|
|
8
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
9
8
|
}
|
|
10
9
|
}
|
|
@@ -269,7 +268,7 @@ export declare class TransactionsClient {
|
|
|
269
268
|
createBulkTransactionsUploadUrl(organizationId: KardApi.OrganizationId, request: KardApi.CreateFileUploadRequestBody, requestOptions?: TransactionsClient.RequestOptions): core.HttpResponsePromise<KardApi.CreateFileUploadUrlResponse>;
|
|
270
269
|
private __createBulkTransactionsUploadUrl;
|
|
271
270
|
/**
|
|
272
|
-
* Retrieve rewarded transaction history for a specific user.
|
|
271
|
+
* Retrieve rewarded transaction history for a specific user. By default this returns only SETTLED transactions within the last 12 months.
|
|
273
272
|
* <br/>
|
|
274
273
|
* <b>Required scopes:</b> `transaction:read`
|
|
275
274
|
* <br/>
|
|
@@ -288,6 +287,7 @@ export declare class TransactionsClient {
|
|
|
288
287
|
* @example
|
|
289
288
|
* await client.transactions.getEarnedRewards("org-123", "user-456", {
|
|
290
289
|
* "page[size]": 10,
|
|
290
|
+
* "filter[status]": "APPROVED,SETTLED",
|
|
291
291
|
* include: "merchant,offer"
|
|
292
292
|
* })
|
|
293
293
|
*/
|
|
@@ -48,6 +48,7 @@ const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
|
48
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
49
|
const core = __importStar(require("../../../../core/index.js"));
|
|
50
50
|
const environments = __importStar(require("../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
51
52
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
52
53
|
const KardApi = __importStar(require("../../../index.js"));
|
|
53
54
|
class TransactionsClient {
|
|
@@ -261,26 +262,7 @@ class TransactionsClient {
|
|
|
261
262
|
});
|
|
262
263
|
}
|
|
263
264
|
}
|
|
264
|
-
|
|
265
|
-
case "non-json":
|
|
266
|
-
throw new errors.KardApiError({
|
|
267
|
-
statusCode: _response.error.statusCode,
|
|
268
|
-
body: _response.error.rawBody,
|
|
269
|
-
rawResponse: _response.rawResponse,
|
|
270
|
-
});
|
|
271
|
-
case "body-is-null":
|
|
272
|
-
throw new errors.KardApiError({
|
|
273
|
-
statusCode: _response.error.statusCode,
|
|
274
|
-
rawResponse: _response.rawResponse,
|
|
275
|
-
});
|
|
276
|
-
case "timeout":
|
|
277
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/transactions.");
|
|
278
|
-
case "unknown":
|
|
279
|
-
throw new errors.KardApiError({
|
|
280
|
-
message: _response.error.errorMessage,
|
|
281
|
-
rawResponse: _response.rawResponse,
|
|
282
|
-
});
|
|
283
|
-
}
|
|
265
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/transactions");
|
|
284
266
|
});
|
|
285
267
|
}
|
|
286
268
|
/**
|
|
@@ -352,26 +334,7 @@ class TransactionsClient {
|
|
|
352
334
|
});
|
|
353
335
|
}
|
|
354
336
|
}
|
|
355
|
-
|
|
356
|
-
case "non-json":
|
|
357
|
-
throw new errors.KardApiError({
|
|
358
|
-
statusCode: _response.error.statusCode,
|
|
359
|
-
body: _response.error.rawBody,
|
|
360
|
-
rawResponse: _response.rawResponse,
|
|
361
|
-
});
|
|
362
|
-
case "body-is-null":
|
|
363
|
-
throw new errors.KardApiError({
|
|
364
|
-
statusCode: _response.error.statusCode,
|
|
365
|
-
rawResponse: _response.rawResponse,
|
|
366
|
-
});
|
|
367
|
-
case "timeout":
|
|
368
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/fraud.");
|
|
369
|
-
case "unknown":
|
|
370
|
-
throw new errors.KardApiError({
|
|
371
|
-
message: _response.error.errorMessage,
|
|
372
|
-
rawResponse: _response.rawResponse,
|
|
373
|
-
});
|
|
374
|
-
}
|
|
337
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/fraud");
|
|
375
338
|
});
|
|
376
339
|
}
|
|
377
340
|
/**
|
|
@@ -450,26 +413,7 @@ class TransactionsClient {
|
|
|
450
413
|
});
|
|
451
414
|
}
|
|
452
415
|
}
|
|
453
|
-
|
|
454
|
-
case "non-json":
|
|
455
|
-
throw new errors.KardApiError({
|
|
456
|
-
statusCode: _response.error.statusCode,
|
|
457
|
-
body: _response.error.rawBody,
|
|
458
|
-
rawResponse: _response.rawResponse,
|
|
459
|
-
});
|
|
460
|
-
case "body-is-null":
|
|
461
|
-
throw new errors.KardApiError({
|
|
462
|
-
statusCode: _response.error.statusCode,
|
|
463
|
-
rawResponse: _response.rawResponse,
|
|
464
|
-
});
|
|
465
|
-
case "timeout":
|
|
466
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users/{userId}/audits.");
|
|
467
|
-
case "unknown":
|
|
468
|
-
throw new errors.KardApiError({
|
|
469
|
-
message: _response.error.errorMessage,
|
|
470
|
-
rawResponse: _response.rawResponse,
|
|
471
|
-
});
|
|
472
|
-
}
|
|
416
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/users/{userId}/audits");
|
|
473
417
|
});
|
|
474
418
|
}
|
|
475
419
|
/**
|
|
@@ -547,30 +491,11 @@ class TransactionsClient {
|
|
|
547
491
|
});
|
|
548
492
|
}
|
|
549
493
|
}
|
|
550
|
-
|
|
551
|
-
case "non-json":
|
|
552
|
-
throw new errors.KardApiError({
|
|
553
|
-
statusCode: _response.error.statusCode,
|
|
554
|
-
body: _response.error.rawBody,
|
|
555
|
-
rawResponse: _response.rawResponse,
|
|
556
|
-
});
|
|
557
|
-
case "body-is-null":
|
|
558
|
-
throw new errors.KardApiError({
|
|
559
|
-
statusCode: _response.error.statusCode,
|
|
560
|
-
rawResponse: _response.rawResponse,
|
|
561
|
-
});
|
|
562
|
-
case "timeout":
|
|
563
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/transactions/uploads.");
|
|
564
|
-
case "unknown":
|
|
565
|
-
throw new errors.KardApiError({
|
|
566
|
-
message: _response.error.errorMessage,
|
|
567
|
-
rawResponse: _response.rawResponse,
|
|
568
|
-
});
|
|
569
|
-
}
|
|
494
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/transactions/uploads");
|
|
570
495
|
});
|
|
571
496
|
}
|
|
572
497
|
/**
|
|
573
|
-
* Retrieve rewarded transaction history for a specific user.
|
|
498
|
+
* Retrieve rewarded transaction history for a specific user. By default this returns only SETTLED transactions within the last 12 months.
|
|
574
499
|
* <br/>
|
|
575
500
|
* <b>Required scopes:</b> `transaction:read`
|
|
576
501
|
* <br/>
|
|
@@ -589,6 +514,7 @@ class TransactionsClient {
|
|
|
589
514
|
* @example
|
|
590
515
|
* await client.transactions.getEarnedRewards("org-123", "user-456", {
|
|
591
516
|
* "page[size]": 10,
|
|
517
|
+
* "filter[status]": "APPROVED,SETTLED",
|
|
592
518
|
* include: "merchant,offer"
|
|
593
519
|
* })
|
|
594
520
|
*/
|
|
@@ -598,20 +524,14 @@ class TransactionsClient {
|
|
|
598
524
|
__getEarnedRewards(organizationId_1, userId_1) {
|
|
599
525
|
return __awaiter(this, arguments, void 0, function* (organizationId, userId, request = {}, requestOptions) {
|
|
600
526
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
601
|
-
const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize, include } = request;
|
|
602
|
-
const _queryParams = {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
}
|
|
609
|
-
if (pageSize != null) {
|
|
610
|
-
_queryParams["page[size]"] = pageSize.toString();
|
|
611
|
-
}
|
|
612
|
-
if (include != null) {
|
|
613
|
-
_queryParams.include = include;
|
|
614
|
-
}
|
|
527
|
+
const { "page[after]": pageAfter, "page[before]": pageBefore, "page[size]": pageSize, "filter[status]": filterStatus, include, } = request;
|
|
528
|
+
const _queryParams = {
|
|
529
|
+
"page[after]": pageAfter,
|
|
530
|
+
"page[before]": pageBefore,
|
|
531
|
+
"page[size]": pageSize,
|
|
532
|
+
"filter[status]": filterStatus,
|
|
533
|
+
include,
|
|
534
|
+
};
|
|
615
535
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
616
536
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
617
537
|
const _response = yield core.fetcher({
|
|
@@ -646,26 +566,7 @@ class TransactionsClient {
|
|
|
646
566
|
});
|
|
647
567
|
}
|
|
648
568
|
}
|
|
649
|
-
|
|
650
|
-
case "non-json":
|
|
651
|
-
throw new errors.KardApiError({
|
|
652
|
-
statusCode: _response.error.statusCode,
|
|
653
|
-
body: _response.error.rawBody,
|
|
654
|
-
rawResponse: _response.rawResponse,
|
|
655
|
-
});
|
|
656
|
-
case "body-is-null":
|
|
657
|
-
throw new errors.KardApiError({
|
|
658
|
-
statusCode: _response.error.statusCode,
|
|
659
|
-
rawResponse: _response.rawResponse,
|
|
660
|
-
});
|
|
661
|
-
case "timeout":
|
|
662
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling GET /v2/issuers/{organizationId}/users/{userId}/earned-rewards.");
|
|
663
|
-
case "unknown":
|
|
664
|
-
throw new errors.KardApiError({
|
|
665
|
-
message: _response.error.errorMessage,
|
|
666
|
-
rawResponse: _response.rawResponse,
|
|
667
|
-
});
|
|
668
|
-
}
|
|
569
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/users/{userId}/earned-rewards");
|
|
669
570
|
});
|
|
670
571
|
}
|
|
671
572
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* "page[size]": 10,
|
|
5
|
+
* "filter[status]": "APPROVED,SETTLED",
|
|
5
6
|
* include: "merchant,offer"
|
|
6
7
|
* }
|
|
7
8
|
*/
|
|
@@ -12,6 +13,8 @@ export interface GetEarnedRewardsRequest {
|
|
|
12
13
|
"page[before]"?: string;
|
|
13
14
|
/** Number of results per page */
|
|
14
15
|
"page[size]"?: number;
|
|
16
|
+
/** Comma-separated list of transaction statuses to return. Supported values are `APPROVED` and `SETTLED`. Defaults to `SETTLED` when omitted. */
|
|
17
|
+
"filter[status]"?: string;
|
|
15
18
|
/** Comma-separated list of related resources to include in the response. Supported values are `merchant` and `offer`. */
|
|
16
19
|
include?: string;
|
|
17
20
|
}
|
|
@@ -44,7 +44,11 @@ class CreateAuditMultiStatus extends errors.KardApiError {
|
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
46
46
|
});
|
|
47
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
exports.CreateAuditMultiStatus = CreateAuditMultiStatus;
|
|
@@ -44,7 +44,11 @@ class CreateIncomingTransactionsMultiStatus extends errors.KardApiError {
|
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
46
46
|
});
|
|
47
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
exports.CreateIncomingTransactionsMultiStatus = CreateIncomingTransactionsMultiStatus;
|
|
@@ -44,7 +44,11 @@ class FraudMultiStatus extends errors.KardApiError {
|
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
46
46
|
});
|
|
47
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
exports.FraudMultiStatus = FraudMultiStatus;
|