@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
|
@@ -5,41 +5,41 @@ export interface MatchedTransactionsAttributes {
|
|
|
5
5
|
/** Transaction amount in cents */
|
|
6
6
|
amount: number;
|
|
7
7
|
/** The base amount in cents excluding additional charges (such as tips, taxes, and other fees). */
|
|
8
|
-
subtotal?: number;
|
|
8
|
+
subtotal?: number | undefined;
|
|
9
9
|
/** Description of transaction - usually includes merchant and other key details on transaction */
|
|
10
10
|
description: string;
|
|
11
11
|
/** Timestamp for transaction event. 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` */
|
|
12
12
|
authorizationDate: string;
|
|
13
13
|
/** The ID of the Kard offer to which the transaction was matched. If this field is omitted, the transaction will be considered unmatched to any Kard offer. This field **must** be omitted when the `paymentType` is `UNKNOWN` and neither an orderId nor a `cardLastFour` is supplied. */
|
|
14
|
-
matchedOfferId?: string;
|
|
14
|
+
matchedOfferId?: string | undefined;
|
|
15
15
|
/** The unique Kard location ID where the transaction took place. This field **must** be omitted when `paymentType` is `UNKNOWN`. */
|
|
16
|
-
matchedLocationId?: string;
|
|
16
|
+
matchedLocationId?: string | undefined;
|
|
17
17
|
/** Merchant details */
|
|
18
|
-
merchant?: KardApi.Merchant;
|
|
18
|
+
merchant?: KardApi.Merchant | undefined;
|
|
19
19
|
/** The type of payment involved in the transaction. */
|
|
20
20
|
paymentType: KardApi.PaymentType;
|
|
21
21
|
/** Bank identification number (BIN). Must be a valid BIN of 6 digits. If over 6 digits, please send first 6. This field **must** be omitted when `paymentType` is `CASH` or `UNKNOWN`. */
|
|
22
|
-
cardBIN?: string;
|
|
22
|
+
cardBIN?: string | undefined;
|
|
23
23
|
/** Card last four digits. This field is **required** when `paymentType` is `CARD` and `matchedOfferId` is provided. It **must** be omitted when `paymentType` is `CASH`. */
|
|
24
|
-
cardLastFour?: string;
|
|
24
|
+
cardLastFour?: string | undefined;
|
|
25
25
|
/** Transaction approval code */
|
|
26
|
-
authorizationCode?: string;
|
|
26
|
+
authorizationCode?: string | undefined;
|
|
27
27
|
/** Retrieval Reference Number */
|
|
28
|
-
retrievalReferenceNumber?: string;
|
|
28
|
+
retrievalReferenceNumber?: string | undefined;
|
|
29
29
|
/** System Trace Audit Number */
|
|
30
|
-
systemTraceAuditNumber?: string;
|
|
30
|
+
systemTraceAuditNumber?: string | undefined;
|
|
31
31
|
/** Acquirer Reference Number */
|
|
32
|
-
acquirerReferenceNumber?: string;
|
|
32
|
+
acquirerReferenceNumber?: string | undefined;
|
|
33
33
|
/** The direction in which the funds flow - DEBIT or CREDIT */
|
|
34
34
|
direction: KardApi.DirectionType;
|
|
35
35
|
/** The card network associated with the transaction. This field **must** be omitted when `paymentType` is `CASH` or `UNKNOWN`. */
|
|
36
|
-
cardNetwork?: KardApi.CardNetwork;
|
|
36
|
+
cardNetwork?: KardApi.CardNetwork | undefined;
|
|
37
37
|
/** The transaction ID */
|
|
38
38
|
transactionId: string;
|
|
39
39
|
/** The card product ID associated with the transaction. This field **must** be omitted when `paymentType` is `CASH` or `UNKNOWN`. */
|
|
40
|
-
cardProductId?: string;
|
|
40
|
+
cardProductId?: string | undefined;
|
|
41
41
|
/** The unique identifier for an online order linked to this transaction. */
|
|
42
|
-
orderId?: string;
|
|
42
|
+
orderId?: string | undefined;
|
|
43
43
|
/** Indicates the format of the receipt from which the transaction is derived. */
|
|
44
|
-
receiptMedium?: KardApi.ReceiptMediumType;
|
|
44
|
+
receiptMedium?: KardApi.ReceiptMediumType | undefined;
|
|
45
45
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import type * as KardApi from "../../../index.mjs";
|
|
2
2
|
export interface Merchant {
|
|
3
3
|
/** Acquirer Merchant Identification Number (MID) — usually a 15 digit numerical identifier code. <b>Note, this field is REQUIRED for local offers. We HIGHLY RECOMMEND sending this field as it will be required in the near future.</b> */
|
|
4
|
-
id?: string;
|
|
4
|
+
id?: string | undefined;
|
|
5
5
|
/** Merchant name associated with transaction */
|
|
6
6
|
name: string;
|
|
7
7
|
/** Merchant street address associated with transaction. */
|
|
8
|
-
addrStreet?: string;
|
|
8
|
+
addrStreet?: string | undefined;
|
|
9
9
|
/** Merchant address city associated with transaction. */
|
|
10
|
-
addrCity?: string;
|
|
10
|
+
addrCity?: string | undefined;
|
|
11
11
|
/** Merchant address state associated with transaction. */
|
|
12
|
-
addrState?: KardApi.States;
|
|
12
|
+
addrState?: KardApi.States | undefined;
|
|
13
13
|
/** Merchant address zip code associated with transaction. */
|
|
14
|
-
addrZipcode?: string;
|
|
14
|
+
addrZipcode?: string | undefined;
|
|
15
15
|
/** Merchant address country associated with transaction. */
|
|
16
|
-
addrCountry?: string;
|
|
16
|
+
addrCountry?: string | undefined;
|
|
17
17
|
/** Merchant latitude geocoordinate associated with transaction. */
|
|
18
|
-
latitude?: string;
|
|
18
|
+
latitude?: string | undefined;
|
|
19
19
|
/** Merchant longitude geocoordinate associated with transaction. */
|
|
20
|
-
longitude?: string;
|
|
20
|
+
longitude?: string | undefined;
|
|
21
21
|
/** Merchant store ID where transaction originated from */
|
|
22
|
-
storeId?: string;
|
|
22
|
+
storeId?: string | undefined;
|
|
23
23
|
}
|
|
@@ -12,9 +12,9 @@ export interface RewardedTransactionAttributes {
|
|
|
12
12
|
paidToIssuer: KardApi.PaymentStatus;
|
|
13
13
|
commissionEarned: KardApi.CommissionEarnedDetails;
|
|
14
14
|
/** Timestamp representing the month when the transaction has been paid out to issuer */
|
|
15
|
-
payoutTimestamp?: string;
|
|
15
|
+
payoutTimestamp?: string | undefined;
|
|
16
16
|
/** Bank identification number (BIN). */
|
|
17
|
-
cardBIN?: string;
|
|
17
|
+
cardBIN?: string | undefined;
|
|
18
18
|
/** Card last four digits. */
|
|
19
|
-
cardLastFour?: string;
|
|
19
|
+
cardLastFour?: string | undefined;
|
|
20
20
|
}
|
|
@@ -5,7 +5,7 @@ export interface TransactionsAttributes {
|
|
|
5
5
|
/** Transaction amount in cents */
|
|
6
6
|
amount: number;
|
|
7
7
|
/** The base amount in cents excluding additional charges (such as tips, taxes, and other fees). */
|
|
8
|
-
subtotal?: number;
|
|
8
|
+
subtotal?: number | undefined;
|
|
9
9
|
/** Transaction status */
|
|
10
10
|
status: KardApi.TransactionStatus;
|
|
11
11
|
/** Currency of transaction */
|
|
@@ -13,47 +13,47 @@ export interface TransactionsAttributes {
|
|
|
13
13
|
/** Description of transaction - usually includes merchant and other key details on transaction */
|
|
14
14
|
description: string;
|
|
15
15
|
/** Description2 of transaction — usually includes other merchant identifying information */
|
|
16
|
-
description2?: string;
|
|
16
|
+
description2?: string | undefined;
|
|
17
17
|
/** Merchant Category Code (usually a 4-digit numerical number). <b>Note, this field is REQUIRED for SOME national offers. We HIGHLY RECOMMEND sending this field as it will be required in the near future.</b> */
|
|
18
|
-
mcc?: string;
|
|
18
|
+
mcc?: string | undefined;
|
|
19
19
|
/** Name of processor associated with transaction */
|
|
20
|
-
coreProviderId?: string;
|
|
20
|
+
coreProviderId?: string | undefined;
|
|
21
21
|
/** Timestamp for <b>REVERSED, RETURNED, DECLINED</b> transaction events; <b>REQUIRED</b> for transactions with <b>REVERSED, RETURNED, DECLINED</b> status. 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` */
|
|
22
|
-
transactionDate?: string;
|
|
22
|
+
transactionDate?: string | undefined;
|
|
23
23
|
/** Timestamp for <b>APPROVED</b> transaction event; <b>REQUIRED</b> for transactions with <b>APPROVED</b> status, and <b>HIGHLY RECOMMENDED</b> to include for transactions with a <b>SETTLED</b> status. 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` */
|
|
24
|
-
authorizationDate?: string;
|
|
24
|
+
authorizationDate?: string | undefined;
|
|
25
25
|
/** Timestamp for <b>SETTLED</b> transaction event, <b>REQUIRED</b> for transactions with <b>SETTLED</b> status. 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` */
|
|
26
|
-
settledDate?: string;
|
|
26
|
+
settledDate?: string | undefined;
|
|
27
27
|
/** Merchant details */
|
|
28
|
-
merchant?: KardApi.Merchant;
|
|
28
|
+
merchant?: KardApi.Merchant | undefined;
|
|
29
29
|
/** Whether card was present at time of transaction */
|
|
30
|
-
cardPresence?: string;
|
|
30
|
+
cardPresence?: string | undefined;
|
|
31
31
|
/** PAN entry mode */
|
|
32
|
-
panEntryMode?: string;
|
|
32
|
+
panEntryMode?: string | undefined;
|
|
33
33
|
/** Bank identification number (BIN). Must be a valid BIN of 6 digits. If over 6 digits, please send first 6. */
|
|
34
34
|
cardBIN: string;
|
|
35
35
|
/** Card last four digits. */
|
|
36
36
|
cardLastFour: string;
|
|
37
37
|
/** Transaction approval code */
|
|
38
|
-
authorizationCode?: string;
|
|
38
|
+
authorizationCode?: string | undefined;
|
|
39
39
|
/** Retrieval Reference Number */
|
|
40
|
-
retrievalReferenceNumber?: string;
|
|
40
|
+
retrievalReferenceNumber?: string | undefined;
|
|
41
41
|
/** System Trace Audit Number */
|
|
42
|
-
systemTraceAuditNumber?: string;
|
|
42
|
+
systemTraceAuditNumber?: string | undefined;
|
|
43
43
|
/** Acquirer Reference Number */
|
|
44
|
-
acquirerReferenceNumber?: string;
|
|
44
|
+
acquirerReferenceNumber?: string | undefined;
|
|
45
45
|
/** The direction in which the funds flow - DEBIT or CREDIT */
|
|
46
46
|
direction: KardApi.DirectionType;
|
|
47
47
|
/** The type of payment involved in the transaction. */
|
|
48
48
|
paymentType: KardApi.TransactionPaymentType;
|
|
49
49
|
/** The card network associated with the transaction */
|
|
50
|
-
cardNetwork?: KardApi.CardNetwork;
|
|
50
|
+
cardNetwork?: KardApi.CardNetwork | undefined;
|
|
51
51
|
/** The transaction ID */
|
|
52
52
|
transactionId: string;
|
|
53
53
|
/** The card product ID associated with the transaction */
|
|
54
|
-
cardProductId?: string;
|
|
54
|
+
cardProductId?: string | undefined;
|
|
55
55
|
/** The zip code of the user who made the transaction */
|
|
56
|
-
userZipCode?: string;
|
|
56
|
+
userZipCode?: string | undefined;
|
|
57
57
|
/** Network specific merchant IDs (MIDs) associated with the transaction */
|
|
58
|
-
processorMids?: KardApi.ProcessorMid;
|
|
58
|
+
processorMids?: KardApi.ProcessorMid | undefined;
|
|
59
59
|
}
|
|
@@ -7,8 +7,7 @@ import { AuthClient } from "../resources/auth/client/Client.mjs";
|
|
|
7
7
|
import { RewardsClient } from "../resources/rewards/client/Client.mjs";
|
|
8
8
|
import { UploadsClient } from "../resources/uploads/client/Client.mjs";
|
|
9
9
|
export declare namespace UsersClient {
|
|
10
|
-
|
|
11
|
-
}
|
|
10
|
+
type Options = BaseClientOptions;
|
|
12
11
|
interface RequestOptions extends BaseRequestOptions {
|
|
13
12
|
}
|
|
14
13
|
}
|
|
@@ -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
|
import { AttributionsClient } from "../resources/attributions/client/Client.mjs";
|
|
@@ -116,26 +117,7 @@ export class UsersClient {
|
|
|
116
117
|
});
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
|
-
|
|
120
|
-
case "non-json":
|
|
121
|
-
throw new errors.KardApiError({
|
|
122
|
-
statusCode: _response.error.statusCode,
|
|
123
|
-
body: _response.error.rawBody,
|
|
124
|
-
rawResponse: _response.rawResponse,
|
|
125
|
-
});
|
|
126
|
-
case "body-is-null":
|
|
127
|
-
throw new errors.KardApiError({
|
|
128
|
-
statusCode: _response.error.statusCode,
|
|
129
|
-
rawResponse: _response.rawResponse,
|
|
130
|
-
});
|
|
131
|
-
case "timeout":
|
|
132
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users.");
|
|
133
|
-
case "unknown":
|
|
134
|
-
throw new errors.KardApiError({
|
|
135
|
-
message: _response.error.errorMessage,
|
|
136
|
-
rawResponse: _response.rawResponse,
|
|
137
|
-
});
|
|
138
|
-
}
|
|
120
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/users");
|
|
139
121
|
});
|
|
140
122
|
}
|
|
141
123
|
/**
|
|
@@ -212,26 +194,7 @@ export class UsersClient {
|
|
|
212
194
|
});
|
|
213
195
|
}
|
|
214
196
|
}
|
|
215
|
-
|
|
216
|
-
case "non-json":
|
|
217
|
-
throw new errors.KardApiError({
|
|
218
|
-
statusCode: _response.error.statusCode,
|
|
219
|
-
body: _response.error.rawBody,
|
|
220
|
-
rawResponse: _response.rawResponse,
|
|
221
|
-
});
|
|
222
|
-
case "body-is-null":
|
|
223
|
-
throw new errors.KardApiError({
|
|
224
|
-
statusCode: _response.error.statusCode,
|
|
225
|
-
rawResponse: _response.rawResponse,
|
|
226
|
-
});
|
|
227
|
-
case "timeout":
|
|
228
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling PUT /v2/issuers/{organizationId}/users/{userId}.");
|
|
229
|
-
case "unknown":
|
|
230
|
-
throw new errors.KardApiError({
|
|
231
|
-
message: _response.error.errorMessage,
|
|
232
|
-
rawResponse: _response.rawResponse,
|
|
233
|
-
});
|
|
234
|
-
}
|
|
197
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v2/issuers/{organizationId}/users/{userId}");
|
|
235
198
|
});
|
|
236
199
|
}
|
|
237
200
|
/**
|
|
@@ -291,26 +254,7 @@ export class UsersClient {
|
|
|
291
254
|
});
|
|
292
255
|
}
|
|
293
256
|
}
|
|
294
|
-
|
|
295
|
-
case "non-json":
|
|
296
|
-
throw new errors.KardApiError({
|
|
297
|
-
statusCode: _response.error.statusCode,
|
|
298
|
-
body: _response.error.rawBody,
|
|
299
|
-
rawResponse: _response.rawResponse,
|
|
300
|
-
});
|
|
301
|
-
case "body-is-null":
|
|
302
|
-
throw new errors.KardApiError({
|
|
303
|
-
statusCode: _response.error.statusCode,
|
|
304
|
-
rawResponse: _response.rawResponse,
|
|
305
|
-
});
|
|
306
|
-
case "timeout":
|
|
307
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling DELETE /v2/issuers/{organizationId}/users/{userId}.");
|
|
308
|
-
case "unknown":
|
|
309
|
-
throw new errors.KardApiError({
|
|
310
|
-
message: _response.error.errorMessage,
|
|
311
|
-
rawResponse: _response.rawResponse,
|
|
312
|
-
});
|
|
313
|
-
}
|
|
257
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v2/issuers/{organizationId}/users/{userId}");
|
|
314
258
|
});
|
|
315
259
|
}
|
|
316
260
|
/**
|
|
@@ -367,26 +311,7 @@ export class UsersClient {
|
|
|
367
311
|
});
|
|
368
312
|
}
|
|
369
313
|
}
|
|
370
|
-
|
|
371
|
-
case "non-json":
|
|
372
|
-
throw new errors.KardApiError({
|
|
373
|
-
statusCode: _response.error.statusCode,
|
|
374
|
-
body: _response.error.rawBody,
|
|
375
|
-
rawResponse: _response.rawResponse,
|
|
376
|
-
});
|
|
377
|
-
case "body-is-null":
|
|
378
|
-
throw new errors.KardApiError({
|
|
379
|
-
statusCode: _response.error.statusCode,
|
|
380
|
-
rawResponse: _response.rawResponse,
|
|
381
|
-
});
|
|
382
|
-
case "timeout":
|
|
383
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling GET /v2/issuers/{organizationId}/users/{userId}.");
|
|
384
|
-
case "unknown":
|
|
385
|
-
throw new errors.KardApiError({
|
|
386
|
-
message: _response.error.errorMessage,
|
|
387
|
-
rawResponse: _response.rawResponse,
|
|
388
|
-
});
|
|
389
|
-
}
|
|
314
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/users/{userId}");
|
|
390
315
|
});
|
|
391
316
|
}
|
|
392
317
|
}
|
|
@@ -8,6 +8,10 @@ export class MultiStatus 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 "../../../../../../BaseClie
|
|
|
3
3
|
import * as core from "../../../../../../core/index.mjs";
|
|
4
4
|
import * as KardApi from "../../../../../index.mjs";
|
|
5
5
|
export declare namespace AttributionsClient {
|
|
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 AttributionsClient {
|
|
@@ -105,26 +106,7 @@ export class AttributionsClient {
|
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
|
-
|
|
109
|
-
case "non-json":
|
|
110
|
-
throw new errors.KardApiError({
|
|
111
|
-
statusCode: _response.error.statusCode,
|
|
112
|
-
body: _response.error.rawBody,
|
|
113
|
-
rawResponse: _response.rawResponse,
|
|
114
|
-
});
|
|
115
|
-
case "body-is-null":
|
|
116
|
-
throw new errors.KardApiError({
|
|
117
|
-
statusCode: _response.error.statusCode,
|
|
118
|
-
rawResponse: _response.rawResponse,
|
|
119
|
-
});
|
|
120
|
-
case "timeout":
|
|
121
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users/{userId}/attributions.");
|
|
122
|
-
case "unknown":
|
|
123
|
-
throw new errors.KardApiError({
|
|
124
|
-
message: _response.error.errorMessage,
|
|
125
|
-
rawResponse: _response.rawResponse,
|
|
126
|
-
});
|
|
127
|
-
}
|
|
109
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/users/{userId}/attributions");
|
|
128
110
|
});
|
|
129
111
|
}
|
|
130
112
|
/**
|
|
@@ -151,23 +133,14 @@ export class AttributionsClient {
|
|
|
151
133
|
return __awaiter(this, arguments, void 0, function* (organizationId, userId, offerId, request = {}, requestOptions) {
|
|
152
134
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
153
135
|
const { supportedComponents, include } = request;
|
|
154
|
-
const _queryParams = {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
if (include != null) {
|
|
164
|
-
if (Array.isArray(include)) {
|
|
165
|
-
_queryParams.include = include.map((item) => item);
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
_queryParams.include = include;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
136
|
+
const _queryParams = {
|
|
137
|
+
supportedComponents: Array.isArray(supportedComponents)
|
|
138
|
+
? supportedComponents.map((item) => item)
|
|
139
|
+
: supportedComponents != null
|
|
140
|
+
? supportedComponents
|
|
141
|
+
: undefined,
|
|
142
|
+
include: Array.isArray(include) ? include.map((item) => item) : include != null ? include : undefined,
|
|
143
|
+
};
|
|
171
144
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
172
145
|
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);
|
|
173
146
|
const _response = yield core.fetcher({
|
|
@@ -200,26 +173,7 @@ export class AttributionsClient {
|
|
|
200
173
|
});
|
|
201
174
|
}
|
|
202
175
|
}
|
|
203
|
-
|
|
204
|
-
case "non-json":
|
|
205
|
-
throw new errors.KardApiError({
|
|
206
|
-
statusCode: _response.error.statusCode,
|
|
207
|
-
body: _response.error.rawBody,
|
|
208
|
-
rawResponse: _response.rawResponse,
|
|
209
|
-
});
|
|
210
|
-
case "body-is-null":
|
|
211
|
-
throw new errors.KardApiError({
|
|
212
|
-
statusCode: _response.error.statusCode,
|
|
213
|
-
rawResponse: _response.rawResponse,
|
|
214
|
-
});
|
|
215
|
-
case "timeout":
|
|
216
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users/{userId}/offers/{offerId}/activate.");
|
|
217
|
-
case "unknown":
|
|
218
|
-
throw new errors.KardApiError({
|
|
219
|
-
message: _response.error.errorMessage,
|
|
220
|
-
rawResponse: _response.rawResponse,
|
|
221
|
-
});
|
|
222
|
-
}
|
|
176
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/users/{userId}/offers/{offerId}/activate");
|
|
223
177
|
});
|
|
224
178
|
}
|
|
225
179
|
/**
|
|
@@ -246,23 +200,14 @@ export class AttributionsClient {
|
|
|
246
200
|
return __awaiter(this, arguments, void 0, function* (organizationId, userId, offerId, request = {}, requestOptions) {
|
|
247
201
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
248
202
|
const { supportedComponents, include } = request;
|
|
249
|
-
const _queryParams = {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
258
|
-
if (include != null) {
|
|
259
|
-
if (Array.isArray(include)) {
|
|
260
|
-
_queryParams.include = include.map((item) => item);
|
|
261
|
-
}
|
|
262
|
-
else {
|
|
263
|
-
_queryParams.include = include;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
203
|
+
const _queryParams = {
|
|
204
|
+
supportedComponents: Array.isArray(supportedComponents)
|
|
205
|
+
? supportedComponents.map((item) => item)
|
|
206
|
+
: supportedComponents != null
|
|
207
|
+
? supportedComponents
|
|
208
|
+
: undefined,
|
|
209
|
+
include: Array.isArray(include) ? include.map((item) => item) : include != null ? include : undefined,
|
|
210
|
+
};
|
|
266
211
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
267
212
|
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);
|
|
268
213
|
const _response = yield core.fetcher({
|
|
@@ -295,26 +240,7 @@ export class AttributionsClient {
|
|
|
295
240
|
});
|
|
296
241
|
}
|
|
297
242
|
}
|
|
298
|
-
|
|
299
|
-
case "non-json":
|
|
300
|
-
throw new errors.KardApiError({
|
|
301
|
-
statusCode: _response.error.statusCode,
|
|
302
|
-
body: _response.error.rawBody,
|
|
303
|
-
rawResponse: _response.rawResponse,
|
|
304
|
-
});
|
|
305
|
-
case "body-is-null":
|
|
306
|
-
throw new errors.KardApiError({
|
|
307
|
-
statusCode: _response.error.statusCode,
|
|
308
|
-
rawResponse: _response.rawResponse,
|
|
309
|
-
});
|
|
310
|
-
case "timeout":
|
|
311
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/issuers/{organizationId}/users/{userId}/offers/{offerId}/boost.");
|
|
312
|
-
case "unknown":
|
|
313
|
-
throw new errors.KardApiError({
|
|
314
|
-
message: _response.error.errorMessage,
|
|
315
|
-
rawResponse: _response.rawResponse,
|
|
316
|
-
});
|
|
317
|
-
}
|
|
243
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/users/{userId}/offers/{offerId}/boost");
|
|
318
244
|
});
|
|
319
245
|
}
|
|
320
246
|
}
|
package/dist/esm/api/resources/users/resources/attributions/types/ActivateOfferResponse.d.mts
CHANGED
|
@@ -16,5 +16,5 @@ import type * as KardApi from "../../../../../index.mjs";
|
|
|
16
16
|
*/
|
|
17
17
|
export interface ActivateOfferResponse {
|
|
18
18
|
data: KardApi.users.ActivateOfferResponseData;
|
|
19
|
-
included?: KardApi.users.ActivateOfferIncluded[];
|
|
19
|
+
included?: KardApi.users.ActivateOfferIncluded[] | undefined;
|
|
20
20
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as KardApi from "../../../../../index.mjs";
|
|
2
2
|
export interface AttributionState {
|
|
3
3
|
/** The position of the offer in the list shown to the user (1-indexed) */
|
|
4
|
-
rank?: number;
|
|
4
|
+
rank?: number | undefined;
|
|
5
5
|
/** The active filters when the user saw the offer */
|
|
6
|
-
filters?: KardApi.users.AttributionFilter[];
|
|
6
|
+
filters?: KardApi.users.AttributionFilter[] | undefined;
|
|
7
7
|
}
|
|
@@ -16,5 +16,5 @@ import type * as KardApi from "../../../../../index.mjs";
|
|
|
16
16
|
*/
|
|
17
17
|
export interface BoostOfferResponse {
|
|
18
18
|
data: KardApi.users.BoostOfferResponseData;
|
|
19
|
-
included?: KardApi.users.BoostOfferIncluded[];
|
|
19
|
+
included?: KardApi.users.BoostOfferIncluded[] | undefined;
|
|
20
20
|
}
|
|
@@ -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 AuthClient {
|
|
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 AuthClient {
|
|
@@ -67,26 +68,7 @@ export class AuthClient {
|
|
|
67
68
|
});
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
-
case "non-json":
|
|
72
|
-
throw new errors.KardApiError({
|
|
73
|
-
statusCode: _response.error.statusCode,
|
|
74
|
-
body: _response.error.rawBody,
|
|
75
|
-
rawResponse: _response.rawResponse,
|
|
76
|
-
});
|
|
77
|
-
case "body-is-null":
|
|
78
|
-
throw new errors.KardApiError({
|
|
79
|
-
statusCode: _response.error.statusCode,
|
|
80
|
-
rawResponse: _response.rawResponse,
|
|
81
|
-
});
|
|
82
|
-
case "timeout":
|
|
83
|
-
throw new errors.KardApiTimeoutError("Timeout exceeded when calling POST /v2/auth/issuers/{organizationId}/users/{userId}/token.");
|
|
84
|
-
case "unknown":
|
|
85
|
-
throw new errors.KardApiError({
|
|
86
|
-
message: _response.error.errorMessage,
|
|
87
|
-
rawResponse: _response.rawResponse,
|
|
88
|
-
});
|
|
89
|
-
}
|
|
71
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/auth/issuers/{organizationId}/users/{userId}/token");
|
|
90
72
|
});
|
|
91
73
|
}
|
|
92
74
|
}
|
|
@@ -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 RewardsClient {
|
|
6
|
-
|
|
7
|
-
}
|
|
6
|
+
type Options = BaseClientOptions;
|
|
8
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
9
8
|
}
|
|
10
9
|
}
|