@puntjes/sdk 2.5.0 → 2.7.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.
|
@@ -21,6 +21,13 @@ export declare const ErrorCode: {
|
|
|
21
21
|
readonly ExternalIdNotFound: "EXTERNAL_ID_NOT_FOUND";
|
|
22
22
|
readonly FeatureNotEnabled: "FEATURE_NOT_ENABLED";
|
|
23
23
|
readonly Forbidden: "FORBIDDEN";
|
|
24
|
+
readonly GiftCardAlreadyLoaded: "GIFT_CARD_ALREADY_LOADED";
|
|
25
|
+
readonly GiftCardAmountLeftTooLow: "GIFT_CARD_AMOUNT_LEFT_TOO_LOW";
|
|
26
|
+
readonly GiftCardAmountOutOfBounds: "GIFT_CARD_AMOUNT_OUT_OF_BOUNDS";
|
|
27
|
+
readonly GiftCardCancelled: "GIFT_CARD_CANCELLED";
|
|
28
|
+
readonly GiftCardEnded: "GIFT_CARD_ENDED";
|
|
29
|
+
readonly GiftCardNotFound: "GIFT_CARD_NOT_FOUND";
|
|
30
|
+
readonly GiftCardUndoNotAllowed: "GIFT_CARD_UNDO_NOT_ALLOWED";
|
|
24
31
|
readonly IdempotencyKeyConflict: "IDEMPOTENCY_KEY_CONFLICT";
|
|
25
32
|
readonly IdentifierDuplicate: "IDENTIFIER_DUPLICATE";
|
|
26
33
|
readonly InsufficientBalance: "INSUFFICIENT_BALANCE";
|
|
@@ -22,6 +22,13 @@ export const ErrorCode = {
|
|
|
22
22
|
ExternalIdNotFound: 'EXTERNAL_ID_NOT_FOUND',
|
|
23
23
|
FeatureNotEnabled: 'FEATURE_NOT_ENABLED',
|
|
24
24
|
Forbidden: 'FORBIDDEN',
|
|
25
|
+
GiftCardAlreadyLoaded: 'GIFT_CARD_ALREADY_LOADED',
|
|
26
|
+
GiftCardAmountLeftTooLow: 'GIFT_CARD_AMOUNT_LEFT_TOO_LOW',
|
|
27
|
+
GiftCardAmountOutOfBounds: 'GIFT_CARD_AMOUNT_OUT_OF_BOUNDS',
|
|
28
|
+
GiftCardCancelled: 'GIFT_CARD_CANCELLED',
|
|
29
|
+
GiftCardEnded: 'GIFT_CARD_ENDED',
|
|
30
|
+
GiftCardNotFound: 'GIFT_CARD_NOT_FOUND',
|
|
31
|
+
GiftCardUndoNotAllowed: 'GIFT_CARD_UNDO_NOT_ALLOWED',
|
|
25
32
|
IdempotencyKeyConflict: 'IDEMPOTENCY_KEY_CONFLICT',
|
|
26
33
|
IdentifierDuplicate: 'IDENTIFIER_DUPLICATE',
|
|
27
34
|
InsufficientBalance: 'INSUFFICIENT_BALANCE',
|
|
@@ -84,6 +91,13 @@ export const errorCodeStatus = {
|
|
|
84
91
|
EXTERNAL_ID_NOT_FOUND: 404,
|
|
85
92
|
FEATURE_NOT_ENABLED: 403,
|
|
86
93
|
FORBIDDEN: 403,
|
|
94
|
+
GIFT_CARD_ALREADY_LOADED: 422,
|
|
95
|
+
GIFT_CARD_AMOUNT_LEFT_TOO_LOW: 422,
|
|
96
|
+
GIFT_CARD_AMOUNT_OUT_OF_BOUNDS: 422,
|
|
97
|
+
GIFT_CARD_CANCELLED: 422,
|
|
98
|
+
GIFT_CARD_ENDED: 422,
|
|
99
|
+
GIFT_CARD_NOT_FOUND: 404,
|
|
100
|
+
GIFT_CARD_UNDO_NOT_ALLOWED: 422,
|
|
87
101
|
IDEMPOTENCY_KEY_CONFLICT: 422,
|
|
88
102
|
IDENTIFIER_DUPLICATE: 409,
|
|
89
103
|
INSUFFICIENT_BALANCE: 422,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { type Options, PuntjesApi } from './sdk.gen.js';
|
|
2
|
-
export type { AddLoyaltyCardByExternalIdData, AddLoyaltyCardByExternalIdError, AddLoyaltyCardByExternalIdErrors, AddLoyaltyCardByExternalIdResponse, AddLoyaltyCardByExternalIdResponses, AddLoyaltyCardData, AddLoyaltyCardData2, AddLoyaltyCardError, AddLoyaltyCardErrors, AddLoyaltyCardResponse, AddLoyaltyCardResponses, AdjustWalletApiData, AdjustWalletData, AdjustWalletError, AdjustWalletErrors, AdjustWalletResponse, AdjustWalletResponses, AnniversaryCampaignConfigData, BranchReferenceData, BulkUpsertProductsData, BulkUpsertProductsError, BulkUpsertProductsErrors, BulkUpsertProductsResponse, BulkUpsertProductsResponses, BulkUpsertResponseData, BulkUpsertResultData, BulkUpsertSummaryData, CampaignListData, CampaignProductRuleData, CampaignStatusData, CampaignVoucherLookupData, CampaignVoucherVerificationData, CategoryRevenueData, ChangeCustomerExternalIdData, ChangeCustomerExternalIdError, ChangeCustomerExternalIdErrors, ChangeCustomerExternalIdResponse, ChangeCustomerExternalIdResponses, ChangeExternalIdData, CheckHealthData, CheckHealthError, CheckHealthErrors, CheckHealthResponse, CheckHealthResponses, ClientOptions, ClientSecretData, CommerceStatisticsData, CreateCustomerData, CreateIdentifierData, CreatePartnerApiClientData, CreatePartnerApiClientData2, CreatePartnerApiClientError, CreatePartnerApiClientErrors, CreatePartnerApiClientResponse, CreatePartnerApiClientResponses, CreateProductData, CreateProductData2, CreateProductError, CreateProductErrors, CreateProductResponse, CreateProductResponses, CreateRedemptionData, CreateRewardFromProductData, CreateRewardFromProductData2, CreateRewardFromProductError, CreateRewardFromProductErrors, CreateRewardFromProductResponse, CreateRewardFromProductResponses, CreateTransactionData, CreateTransactionItemData, CustomerData, CustomerDetailData, CustomerGroupReferenceData, CustomerIdentifierData, CustomerLookupData, CustomerStatusData, CustomerVoucherData, DateRangeRecurrenceData, DaysOfWeekRecurrenceData, DeleteClientData, DeleteClientError, DeleteClientErrors, DeleteClientResponse, DeleteClientResponses, DeleteProductData, DeleteProductError, DeleteProductErrors, DeleteProductResponse, DeleteProductResponses, DiscountGiftData, DiscountRedemptionData, DownloadWalletPassData, DownloadWalletPassError, DownloadWalletPassErrors, DownloadWalletPassResponse, DownloadWalletPassResponses, EarnResultData, ErrorResponse, FixedDiscountData, FreeProductGiftData, FreeProductRedemptionData, GiftProductData, GoogleWalletPassData, ItemizedStatisticsData, LedgerEntryData, LinkCustomerExternalIdData, LinkCustomerExternalIdError, LinkCustomerExternalIdErrors, LinkCustomerExternalIdResponse, LinkCustomerExternalIdResponses, LinkExternalIdData, ListBranchesData, ListBranchesError, ListBranchesErrors, ListBranchesResponse, ListBranchesResponses, ListCampaignsData, ListCampaignsError, ListCampaignsErrors, ListCampaignsResponse, ListCampaignsResponses, ListCustomerRedemptionsData, ListCustomerRedemptionsError, ListCustomerRedemptionsErrors, ListCustomerRedemptionsResponse, ListCustomerRedemptionsResponses, ListCustomerTransactionsData, ListCustomerTransactionsError, ListCustomerTransactionsErrors, ListCustomerTransactionsResponse, ListCustomerTransactionsResponses, ListCustomerVouchersData, ListCustomerVouchersError, ListCustomerVouchersErrors, ListCustomerVouchersResponse, ListCustomerVouchersResponses, ListLedgerEntriesData, ListLedgerEntriesError, ListLedgerEntriesErrors, ListLedgerEntriesResponse, ListLedgerEntriesResponses, ListProductsData, ListProductsError, ListProductsErrors, ListProductsResponse, ListProductsResponses, ListRewardsData, ListRewardsError, ListRewardsErrors, ListRewardsResponse, ListRewardsResponses, LookupCustomerData, LookupCustomerError, LookupCustomerErrors, LookupCustomerResponse, LookupCustomerResponses, LookupRedemptionData, LookupRedemptionError, LookupRedemptionErrors, LookupRedemptionResponse, LookupRedemptionResponses, LookupVoucherData, LookupVoucherError, LookupVoucherErrors, LookupVoucherResponse, LookupVoucherResponses, LoyaltyStatisticsData, MergeCustomersApiData, MergeCustomersData, MergeCustomersError, MergeCustomersErrors, MergeCustomersResponse, MergeCustomersResponses, MomentCampaignConfigData, NewClientSecretData, NthPurchaseCampaignConfigData, PaginationLinks, PaginationMeta, PartnerApiClientData, PercentageDiscountData, PointsGiftData, ProductData, RedeemRewardData, RedeemRewardError, RedeemRewardErrors, RedeemRewardResponse, RedeemRewardResponses, RedemptionCreatedData, RedemptionCustomerData, RedemptionLookupData, RedemptionRewardData, RedemptionVerificationData, RegisterCustomerData, RegisterCustomerError, RegisterCustomerErrors, RegisterCustomerResponse, RegisterCustomerResponses, ReplaceCustomerByExternalIdData, ReplaceCustomerByExternalIdError, ReplaceCustomerByExternalIdErrors, ReplaceCustomerByExternalIdResponse, ReplaceCustomerByExternalIdResponses, RewardCatalogItemData, RewardData, RewardStatusData, RotateClientSecretData, RotateClientSecretError, RotateClientSecretErrors, RotateClientSecretResponse, RotateClientSecretResponses, SendLoyaltyCardByExternalIdData, SendLoyaltyCardByExternalIdError, SendLoyaltyCardByExternalIdErrors, SendLoyaltyCardByExternalIdResponse, SendLoyaltyCardByExternalIdResponses, SendLoyaltyCardData, SendLoyaltyCardError, SendLoyaltyCardErrors, SendLoyaltyCardRequestData, SendLoyaltyCardResponse, SendLoyaltyCardResponses, SendLoyaltyCardResultData, ShowCustomerData, ShowCustomerError, ShowCustomerErrors, ShowCustomerResponse, ShowCustomerResponses, ShowMeData, ShowMeError, ShowMeErrors, ShowMeResponse, ShowMeResponses, ShowProductData, ShowProductError, ShowProductErrors, ShowProductResponse, ShowProductResponses, ShowStatisticsData, ShowStatisticsError, ShowStatisticsErrors, ShowStatisticsResponse, ShowStatisticsResponses, ShowWalletData, ShowWalletError, ShowWalletErrors, ShowWalletResponse, ShowWalletResponses, SpecificDatesRecurrenceData, StatisticsApiData, StatisticsPeriodData, SubmitTransactionData, SubmitTransactionError, SubmitTransactionErrors, SubmitTransactionResponse, SubmitTransactionResponses, TopProductData, TransactionCampaignConfigData, TransactionData, TransactionItemData, UpdateCustomerByExternalIdData, UpdateCustomerByExternalIdError, UpdateCustomerByExternalIdErrors, UpdateCustomerByExternalIdResponse, UpdateCustomerByExternalIdResponses, UpdateCustomerData, UpdateProductData, UpdateProductData2, UpdateProductError, UpdateProductErrors, UpdateProductResponse, UpdateProductResponses, UpsertProductData, UpsertProductData2, UpsertProductError, UpsertProductErrors, UpsertProductResponse, UpsertProductResponses, VendorBrandingData, VerifyCampaignVoucherData, VerifyRedemptionData, VerifyRedemptionData2, VerifyRedemptionError, VerifyRedemptionErrors, VerifyRedemptionResponse, VerifyRedemptionResponses, VerifyVoucherData, VerifyVoucherError, VerifyVoucherErrors, VerifyVoucherResponse, VerifyVoucherResponses, VolumeBucketData, VoucherFixedDiscountData, VoucherGiftProductData, VoucherPercentageDiscountData, WalletData, WinBackCampaignConfigData } from './types.gen.js';
|
|
2
|
+
export type { AddLoyaltyCardByExternalIdData, AddLoyaltyCardByExternalIdError, AddLoyaltyCardByExternalIdErrors, AddLoyaltyCardByExternalIdResponse, AddLoyaltyCardByExternalIdResponses, AddLoyaltyCardData, AddLoyaltyCardData2, AddLoyaltyCardError, AddLoyaltyCardErrors, AddLoyaltyCardResponse, AddLoyaltyCardResponses, AdjustWalletApiData, AdjustWalletData, AdjustWalletError, AdjustWalletErrors, AdjustWalletResponse, AdjustWalletResponses, AnniversaryCampaignConfigData, BranchReferenceData, BulkUpsertProductsData, BulkUpsertProductsError, BulkUpsertProductsErrors, BulkUpsertProductsResponse, BulkUpsertProductsResponses, BulkUpsertResponseData, BulkUpsertResultData, BulkUpsertSummaryData, CampaignListData, CampaignProductRuleData, CampaignStatusData, CampaignVoucherLookupData, CampaignVoucherVerificationData, CategoryRevenueData, ChangeCustomerExternalIdData, ChangeCustomerExternalIdError, ChangeCustomerExternalIdErrors, ChangeCustomerExternalIdResponse, ChangeCustomerExternalIdResponses, ChangeExternalIdData, CheckHealthData, CheckHealthError, CheckHealthErrors, CheckHealthResponse, CheckHealthResponses, ClientOptions, ClientSecretData, CommerceStatisticsData, CreateCustomerData, CreateIdentifierData, CreatePartnerApiClientData, CreatePartnerApiClientData2, CreatePartnerApiClientError, CreatePartnerApiClientErrors, CreatePartnerApiClientResponse, CreatePartnerApiClientResponses, CreateProductData, CreateProductData2, CreateProductError, CreateProductErrors, CreateProductResponse, CreateProductResponses, CreateRedemptionData, CreateRewardFromProductData, CreateRewardFromProductData2, CreateRewardFromProductError, CreateRewardFromProductErrors, CreateRewardFromProductResponse, CreateRewardFromProductResponses, CreateTransactionData, CreateTransactionItemData, CustomerData, CustomerDetailData, CustomerGroupReferenceData, CustomerIdentifierData, CustomerLookupData, CustomerStatusData, CustomerVoucherData, DateRangeRecurrenceData, DaysOfWeekRecurrenceData, DeleteClientData, DeleteClientError, DeleteClientErrors, DeleteClientResponse, DeleteClientResponses, DeleteProductData, DeleteProductError, DeleteProductErrors, DeleteProductResponse, DeleteProductResponses, DiscountGiftData, DiscountRedemptionData, DownloadWalletPassData, DownloadWalletPassError, DownloadWalletPassErrors, DownloadWalletPassResponse, DownloadWalletPassResponses, EarnResultData, ErrorResponse, FixedDiscountData, FreeProductGiftData, FreeProductRedemptionData, GiftCardApiData, GiftCardStatus, GiftCardVatKind, GiftProductData, GoogleWalletPassData, ItemizedStatisticsData, LedgerEntryData, LinkCustomerExternalIdData, LinkCustomerExternalIdError, LinkCustomerExternalIdErrors, LinkCustomerExternalIdResponse, LinkCustomerExternalIdResponses, LinkExternalIdData, ListBranchesData, ListBranchesError, ListBranchesErrors, ListBranchesResponse, ListBranchesResponses, ListCampaignsData, ListCampaignsError, ListCampaignsErrors, ListCampaignsResponse, ListCampaignsResponses, ListCustomerRedemptionsData, ListCustomerRedemptionsError, ListCustomerRedemptionsErrors, ListCustomerRedemptionsResponse, ListCustomerRedemptionsResponses, ListCustomerTransactionsData, ListCustomerTransactionsError, ListCustomerTransactionsErrors, ListCustomerTransactionsResponse, ListCustomerTransactionsResponses, ListCustomerVouchersData, ListCustomerVouchersError, ListCustomerVouchersErrors, ListCustomerVouchersResponse, ListCustomerVouchersResponses, ListLedgerEntriesData, ListLedgerEntriesError, ListLedgerEntriesErrors, ListLedgerEntriesResponse, ListLedgerEntriesResponses, ListProductsData, ListProductsError, ListProductsErrors, ListProductsResponse, ListProductsResponses, ListRewardsData, ListRewardsError, ListRewardsErrors, ListRewardsResponse, ListRewardsResponses, LoadGiftCardApiData, LoadGiftCardData, LoadGiftCardError, LoadGiftCardErrors, LoadGiftCardResponse, LoadGiftCardResponses, LookupCustomerData, LookupCustomerError, LookupCustomerErrors, LookupCustomerResponse, LookupCustomerResponses, LookupGiftCardApiData, LookupGiftCardData, LookupGiftCardError, LookupGiftCardErrors, LookupGiftCardResponse, LookupGiftCardResponses, LookupRedemptionData, LookupRedemptionError, LookupRedemptionErrors, LookupRedemptionResponse, LookupRedemptionResponses, LookupVoucherData, LookupVoucherError, LookupVoucherErrors, LookupVoucherResponse, LookupVoucherResponses, LoyaltyStatisticsData, MergeCustomersApiData, MergeCustomersData, MergeCustomersError, MergeCustomersErrors, MergeCustomersResponse, MergeCustomersResponses, MomentCampaignConfigData, NewClientSecretData, NthPurchaseCampaignConfigData, PaginationLinks, PaginationMeta, PartnerApiClientData, PercentageDiscountData, PointsGiftData, ProductData, RedeemGiftCardApiData, RedeemGiftCardData, RedeemGiftCardError, RedeemGiftCardErrors, RedeemGiftCardResponse, RedeemGiftCardResponses, RedeemRewardData, RedeemRewardError, RedeemRewardErrors, RedeemRewardResponse, RedeemRewardResponses, RedemptionCreatedData, RedemptionCustomerData, RedemptionLookupData, RedemptionRewardData, RedemptionVerificationData, RegisterCustomerData, RegisterCustomerError, RegisterCustomerErrors, RegisterCustomerResponse, RegisterCustomerResponses, ReplaceCustomerByExternalIdData, ReplaceCustomerByExternalIdError, ReplaceCustomerByExternalIdErrors, ReplaceCustomerByExternalIdResponse, ReplaceCustomerByExternalIdResponses, RewardCatalogItemData, RewardData, RewardStatusData, RotateClientSecretData, RotateClientSecretError, RotateClientSecretErrors, RotateClientSecretResponse, RotateClientSecretResponses, SendLoyaltyCardByExternalIdData, SendLoyaltyCardByExternalIdError, SendLoyaltyCardByExternalIdErrors, SendLoyaltyCardByExternalIdResponse, SendLoyaltyCardByExternalIdResponses, SendLoyaltyCardData, SendLoyaltyCardError, SendLoyaltyCardErrors, SendLoyaltyCardRequestData, SendLoyaltyCardResponse, SendLoyaltyCardResponses, SendLoyaltyCardResultData, ShowCustomerData, ShowCustomerError, ShowCustomerErrors, ShowCustomerResponse, ShowCustomerResponses, ShowMeData, ShowMeError, ShowMeErrors, ShowMeResponse, ShowMeResponses, ShowProductData, ShowProductError, ShowProductErrors, ShowProductResponse, ShowProductResponses, ShowStatisticsData, ShowStatisticsError, ShowStatisticsErrors, ShowStatisticsResponse, ShowStatisticsResponses, ShowWalletData, ShowWalletError, ShowWalletErrors, ShowWalletResponse, ShowWalletResponses, SpecificDatesRecurrenceData, StatisticsApiData, StatisticsPeriodData, SubmitTransactionData, SubmitTransactionError, SubmitTransactionErrors, SubmitTransactionResponse, SubmitTransactionResponses, TopProductData, TransactionCampaignConfigData, TransactionData, TransactionItemData, UndoGiftCardLoadApiData, UndoGiftCardLoadData, UndoGiftCardLoadError, UndoGiftCardLoadErrors, UndoGiftCardLoadResponse, UndoGiftCardLoadResponses, UpdateCustomerByExternalIdData, UpdateCustomerByExternalIdError, UpdateCustomerByExternalIdErrors, UpdateCustomerByExternalIdResponse, UpdateCustomerByExternalIdResponses, UpdateCustomerData, UpdateProductData, UpdateProductData2, UpdateProductError, UpdateProductErrors, UpdateProductResponse, UpdateProductResponses, UpsertProductData, UpsertProductData2, UpsertProductError, UpsertProductErrors, UpsertProductResponse, UpsertProductResponses, VendorBrandingData, VerifyCampaignVoucherData, VerifyRedemptionData, VerifyRedemptionData2, VerifyRedemptionError, VerifyRedemptionErrors, VerifyRedemptionResponse, VerifyRedemptionResponses, VerifyVoucherData, VerifyVoucherError, VerifyVoucherErrors, VerifyVoucherResponse, VerifyVoucherResponses, VolumeBucketData, VoucherFixedDiscountData, VoucherGiftProductData, VoucherPercentageDiscountData, WalletData, WinBackCampaignConfigData } from './types.gen.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
-
import type { AddLoyaltyCardByExternalIdData, AddLoyaltyCardByExternalIdErrors, AddLoyaltyCardByExternalIdResponses, AddLoyaltyCardData2, AddLoyaltyCardErrors, AddLoyaltyCardResponses, AdjustWalletData, AdjustWalletErrors, AdjustWalletResponses, BulkUpsertProductsData, BulkUpsertProductsErrors, BulkUpsertProductsResponses, ChangeCustomerExternalIdData, ChangeCustomerExternalIdErrors, ChangeCustomerExternalIdResponses, CheckHealthData, CheckHealthErrors, CheckHealthResponses, CreatePartnerApiClientData2, CreatePartnerApiClientErrors, CreatePartnerApiClientResponses, CreateProductData2, CreateProductErrors, CreateProductResponses, CreateRewardFromProductData2, CreateRewardFromProductErrors, CreateRewardFromProductResponses, DeleteClientData, DeleteClientErrors, DeleteClientResponses, DeleteProductData, DeleteProductErrors, DeleteProductResponses, DownloadWalletPassData, DownloadWalletPassErrors, DownloadWalletPassResponses, LinkCustomerExternalIdData, LinkCustomerExternalIdErrors, LinkCustomerExternalIdResponses, ListBranchesData, ListBranchesErrors, ListBranchesResponses, ListCampaignsData, ListCampaignsErrors, ListCampaignsResponses, ListCustomerRedemptionsData, ListCustomerRedemptionsErrors, ListCustomerRedemptionsResponses, ListCustomerTransactionsData, ListCustomerTransactionsErrors, ListCustomerTransactionsResponses, ListCustomerVouchersData, ListCustomerVouchersErrors, ListCustomerVouchersResponses, ListLedgerEntriesData, ListLedgerEntriesErrors, ListLedgerEntriesResponses, ListProductsData, ListProductsErrors, ListProductsResponses, ListRewardsData, ListRewardsErrors, ListRewardsResponses, LookupCustomerData, LookupCustomerErrors, LookupCustomerResponses, LookupRedemptionData, LookupRedemptionErrors, LookupRedemptionResponses, LookupVoucherData, LookupVoucherErrors, LookupVoucherResponses, MergeCustomersData, MergeCustomersErrors, MergeCustomersResponses, RedeemRewardData, RedeemRewardErrors, RedeemRewardResponses, RegisterCustomerData, RegisterCustomerErrors, RegisterCustomerResponses, ReplaceCustomerByExternalIdData, ReplaceCustomerByExternalIdErrors, ReplaceCustomerByExternalIdResponses, RotateClientSecretData, RotateClientSecretErrors, RotateClientSecretResponses, SendLoyaltyCardByExternalIdData, SendLoyaltyCardByExternalIdErrors, SendLoyaltyCardByExternalIdResponses, SendLoyaltyCardData, SendLoyaltyCardErrors, SendLoyaltyCardResponses, ShowCustomerData, ShowCustomerErrors, ShowCustomerResponses, ShowMeData, ShowMeErrors, ShowMeResponses, ShowProductData, ShowProductErrors, ShowProductResponses, ShowStatisticsData, ShowStatisticsErrors, ShowStatisticsResponses, ShowWalletData, ShowWalletErrors, ShowWalletResponses, SubmitTransactionData, SubmitTransactionErrors, SubmitTransactionResponses, UpdateCustomerByExternalIdData, UpdateCustomerByExternalIdErrors, UpdateCustomerByExternalIdResponses, UpdateProductData2, UpdateProductErrors, UpdateProductResponses, UpsertProductData2, UpsertProductErrors, UpsertProductResponses, VerifyRedemptionData2, VerifyRedemptionErrors, VerifyRedemptionResponses, VerifyVoucherData, VerifyVoucherErrors, VerifyVoucherResponses } from './types.gen.js';
|
|
2
|
+
import type { AddLoyaltyCardByExternalIdData, AddLoyaltyCardByExternalIdErrors, AddLoyaltyCardByExternalIdResponses, AddLoyaltyCardData2, AddLoyaltyCardErrors, AddLoyaltyCardResponses, AdjustWalletData, AdjustWalletErrors, AdjustWalletResponses, BulkUpsertProductsData, BulkUpsertProductsErrors, BulkUpsertProductsResponses, ChangeCustomerExternalIdData, ChangeCustomerExternalIdErrors, ChangeCustomerExternalIdResponses, CheckHealthData, CheckHealthErrors, CheckHealthResponses, CreatePartnerApiClientData2, CreatePartnerApiClientErrors, CreatePartnerApiClientResponses, CreateProductData2, CreateProductErrors, CreateProductResponses, CreateRewardFromProductData2, CreateRewardFromProductErrors, CreateRewardFromProductResponses, DeleteClientData, DeleteClientErrors, DeleteClientResponses, DeleteProductData, DeleteProductErrors, DeleteProductResponses, DownloadWalletPassData, DownloadWalletPassErrors, DownloadWalletPassResponses, LinkCustomerExternalIdData, LinkCustomerExternalIdErrors, LinkCustomerExternalIdResponses, ListBranchesData, ListBranchesErrors, ListBranchesResponses, ListCampaignsData, ListCampaignsErrors, ListCampaignsResponses, ListCustomerRedemptionsData, ListCustomerRedemptionsErrors, ListCustomerRedemptionsResponses, ListCustomerTransactionsData, ListCustomerTransactionsErrors, ListCustomerTransactionsResponses, ListCustomerVouchersData, ListCustomerVouchersErrors, ListCustomerVouchersResponses, ListLedgerEntriesData, ListLedgerEntriesErrors, ListLedgerEntriesResponses, ListProductsData, ListProductsErrors, ListProductsResponses, ListRewardsData, ListRewardsErrors, ListRewardsResponses, LoadGiftCardData, LoadGiftCardErrors, LoadGiftCardResponses, LookupCustomerData, LookupCustomerErrors, LookupCustomerResponses, LookupGiftCardData, LookupGiftCardErrors, LookupGiftCardResponses, LookupRedemptionData, LookupRedemptionErrors, LookupRedemptionResponses, LookupVoucherData, LookupVoucherErrors, LookupVoucherResponses, MergeCustomersData, MergeCustomersErrors, MergeCustomersResponses, RedeemGiftCardData, RedeemGiftCardErrors, RedeemGiftCardResponses, RedeemRewardData, RedeemRewardErrors, RedeemRewardResponses, RegisterCustomerData, RegisterCustomerErrors, RegisterCustomerResponses, ReplaceCustomerByExternalIdData, ReplaceCustomerByExternalIdErrors, ReplaceCustomerByExternalIdResponses, RotateClientSecretData, RotateClientSecretErrors, RotateClientSecretResponses, SendLoyaltyCardByExternalIdData, SendLoyaltyCardByExternalIdErrors, SendLoyaltyCardByExternalIdResponses, SendLoyaltyCardData, SendLoyaltyCardErrors, SendLoyaltyCardResponses, ShowCustomerData, ShowCustomerErrors, ShowCustomerResponses, ShowMeData, ShowMeErrors, ShowMeResponses, ShowProductData, ShowProductErrors, ShowProductResponses, ShowStatisticsData, ShowStatisticsErrors, ShowStatisticsResponses, ShowWalletData, ShowWalletErrors, ShowWalletResponses, SubmitTransactionData, SubmitTransactionErrors, SubmitTransactionResponses, UndoGiftCardLoadData, UndoGiftCardLoadErrors, UndoGiftCardLoadResponses, UpdateCustomerByExternalIdData, UpdateCustomerByExternalIdErrors, UpdateCustomerByExternalIdResponses, UpdateProductData2, UpdateProductErrors, UpdateProductResponses, UpsertProductData2, UpsertProductErrors, UpsertProductResponses, VerifyRedemptionData2, VerifyRedemptionErrors, VerifyRedemptionResponses, VerifyVoucherData, VerifyVoucherErrors, VerifyVoucherResponses } from './types.gen.js';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -73,5 +73,9 @@ export declare class PuntjesApi extends HeyApiClient {
|
|
|
73
73
|
rotateClientSecret<ThrowOnError extends boolean = true>(options: Options<RotateClientSecretData, ThrowOnError>): RequestResult<RotateClientSecretResponses, RotateClientSecretErrors, ThrowOnError>;
|
|
74
74
|
deleteClient<ThrowOnError extends boolean = true>(options: Options<DeleteClientData, ThrowOnError>): RequestResult<DeleteClientResponses, DeleteClientErrors, ThrowOnError>;
|
|
75
75
|
checkHealth<ThrowOnError extends boolean = true>(options?: Options<CheckHealthData, ThrowOnError>): RequestResult<CheckHealthResponses, CheckHealthErrors, ThrowOnError>;
|
|
76
|
+
lookupGiftCard<ThrowOnError extends boolean = true>(options: Options<LookupGiftCardData, ThrowOnError>): RequestResult<LookupGiftCardResponses, LookupGiftCardErrors, ThrowOnError>;
|
|
77
|
+
redeemGiftCard<ThrowOnError extends boolean = true>(options: Options<RedeemGiftCardData, ThrowOnError>): RequestResult<RedeemGiftCardResponses, RedeemGiftCardErrors, ThrowOnError>;
|
|
78
|
+
loadGiftCard<ThrowOnError extends boolean = true>(options: Options<LoadGiftCardData, ThrowOnError>): RequestResult<LoadGiftCardResponses, LoadGiftCardErrors, ThrowOnError>;
|
|
79
|
+
undoGiftCardLoad<ThrowOnError extends boolean = true>(options: Options<UndoGiftCardLoadData, ThrowOnError>): RequestResult<UndoGiftCardLoadResponses, UndoGiftCardLoadErrors, ThrowOnError>;
|
|
76
80
|
}
|
|
77
81
|
export {};
|
|
@@ -572,4 +572,64 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
572
572
|
checkHealth(options) {
|
|
573
573
|
return (options?.client ?? this.client).get({ url: '/health', ...options });
|
|
574
574
|
}
|
|
575
|
+
lookupGiftCard(options) {
|
|
576
|
+
return (options.client ?? this.client).post({
|
|
577
|
+
security: [{
|
|
578
|
+
key: 'oauth2',
|
|
579
|
+
scheme: 'bearer',
|
|
580
|
+
type: 'http'
|
|
581
|
+
}],
|
|
582
|
+
url: '/gift-cards/lookup',
|
|
583
|
+
...options,
|
|
584
|
+
headers: {
|
|
585
|
+
'Content-Type': 'application/json',
|
|
586
|
+
...options.headers
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
redeemGiftCard(options) {
|
|
591
|
+
return (options.client ?? this.client).post({
|
|
592
|
+
security: [{
|
|
593
|
+
key: 'oauth2',
|
|
594
|
+
scheme: 'bearer',
|
|
595
|
+
type: 'http'
|
|
596
|
+
}],
|
|
597
|
+
url: '/gift-cards/redeem',
|
|
598
|
+
...options,
|
|
599
|
+
headers: {
|
|
600
|
+
'Content-Type': 'application/json',
|
|
601
|
+
...options.headers
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
loadGiftCard(options) {
|
|
606
|
+
return (options.client ?? this.client).post({
|
|
607
|
+
security: [{
|
|
608
|
+
key: 'oauth2',
|
|
609
|
+
scheme: 'bearer',
|
|
610
|
+
type: 'http'
|
|
611
|
+
}],
|
|
612
|
+
url: '/gift-cards/load',
|
|
613
|
+
...options,
|
|
614
|
+
headers: {
|
|
615
|
+
'Content-Type': 'application/json',
|
|
616
|
+
...options.headers
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
undoGiftCardLoad(options) {
|
|
621
|
+
return (options.client ?? this.client).post({
|
|
622
|
+
security: [{
|
|
623
|
+
key: 'oauth2',
|
|
624
|
+
scheme: 'bearer',
|
|
625
|
+
type: 'http'
|
|
626
|
+
}],
|
|
627
|
+
url: '/gift-cards/load/undo',
|
|
628
|
+
...options,
|
|
629
|
+
headers: {
|
|
630
|
+
'Content-Type': 'application/json',
|
|
631
|
+
...options.headers
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
}
|
|
575
635
|
}
|
|
@@ -343,7 +343,7 @@ export type CreateRewardFromProductData = {
|
|
|
343
343
|
* CreateTransactionData
|
|
344
344
|
*/
|
|
345
345
|
export type CreateTransactionData = {
|
|
346
|
-
identifier
|
|
346
|
+
identifier?: string | null;
|
|
347
347
|
idempotency_key: string;
|
|
348
348
|
total_amount: number;
|
|
349
349
|
description?: string | null;
|
|
@@ -1270,7 +1270,7 @@ export type TransactionCampaignConfigData = {
|
|
|
1270
1270
|
*/
|
|
1271
1271
|
export type TransactionData = {
|
|
1272
1272
|
id: number;
|
|
1273
|
-
customer_id: number;
|
|
1273
|
+
customer_id: number | null;
|
|
1274
1274
|
idempotency_key: string;
|
|
1275
1275
|
total_amount: number;
|
|
1276
1276
|
description: string | null;
|
|
@@ -1479,6 +1479,71 @@ export type WinBackCampaignConfigData = {
|
|
|
1479
1479
|
*/
|
|
1480
1480
|
type: 'win_back';
|
|
1481
1481
|
};
|
|
1482
|
+
/**
|
|
1483
|
+
* GiftCardApiData
|
|
1484
|
+
*/
|
|
1485
|
+
export type GiftCardApiData = {
|
|
1486
|
+
/**
|
|
1487
|
+
* The last 4 characters of the code, for the receipt.
|
|
1488
|
+
*/
|
|
1489
|
+
code_last4: string;
|
|
1490
|
+
/**
|
|
1491
|
+
* What the gift card still holds, in cents.
|
|
1492
|
+
*/
|
|
1493
|
+
amount_left_cents: number;
|
|
1494
|
+
/**
|
|
1495
|
+
* The last day the gift card works (YYYY-MM-DD, Brussels time).
|
|
1496
|
+
*/
|
|
1497
|
+
ends_on: string;
|
|
1498
|
+
status: GiftCardStatus;
|
|
1499
|
+
vat_kind: GiftCardVatKind;
|
|
1500
|
+
};
|
|
1501
|
+
/**
|
|
1502
|
+
* GiftCardStatus
|
|
1503
|
+
*
|
|
1504
|
+
* Whether a gift card can still be used: cancelled wins over used up, used up over ended, otherwise open.
|
|
1505
|
+
*
|
|
1506
|
+
*/
|
|
1507
|
+
export type GiftCardStatus = 'open' | 'used_up' | 'ended' | 'cancelled';
|
|
1508
|
+
/**
|
|
1509
|
+
* LookupGiftCardApiData
|
|
1510
|
+
*/
|
|
1511
|
+
export type LookupGiftCardApiData = {
|
|
1512
|
+
code: string;
|
|
1513
|
+
};
|
|
1514
|
+
/**
|
|
1515
|
+
* RedeemGiftCardApiData
|
|
1516
|
+
*/
|
|
1517
|
+
export type RedeemGiftCardApiData = {
|
|
1518
|
+
code: string;
|
|
1519
|
+
amount_cents: number;
|
|
1520
|
+
idempotency_key: string;
|
|
1521
|
+
branch?: string | null;
|
|
1522
|
+
};
|
|
1523
|
+
/**
|
|
1524
|
+
* GiftCardVatKind
|
|
1525
|
+
*
|
|
1526
|
+
* Whether the shop knows at the sale what the gift card buys, which decides the VAT moment.
|
|
1527
|
+
*
|
|
1528
|
+
*/
|
|
1529
|
+
export type GiftCardVatKind = 'single_purpose' | 'multi_purpose';
|
|
1530
|
+
/**
|
|
1531
|
+
* LoadGiftCardApiData
|
|
1532
|
+
*/
|
|
1533
|
+
export type LoadGiftCardApiData = {
|
|
1534
|
+
code: string;
|
|
1535
|
+
amount_cents: number;
|
|
1536
|
+
idempotency_key: string;
|
|
1537
|
+
ends_on?: string | null;
|
|
1538
|
+
branch?: string | null;
|
|
1539
|
+
};
|
|
1540
|
+
/**
|
|
1541
|
+
* UndoGiftCardLoadApiData
|
|
1542
|
+
*/
|
|
1543
|
+
export type UndoGiftCardLoadApiData = {
|
|
1544
|
+
code: string;
|
|
1545
|
+
idempotency_key: string;
|
|
1546
|
+
};
|
|
1482
1547
|
export type LookupCustomerData = {
|
|
1483
1548
|
body?: never;
|
|
1484
1549
|
path?: never;
|
|
@@ -3347,3 +3412,191 @@ export type CheckHealthResponses = {
|
|
|
3347
3412
|
};
|
|
3348
3413
|
};
|
|
3349
3414
|
export type CheckHealthResponse = CheckHealthResponses[keyof CheckHealthResponses];
|
|
3415
|
+
export type LookupGiftCardData = {
|
|
3416
|
+
body: LookupGiftCardApiData;
|
|
3417
|
+
path?: never;
|
|
3418
|
+
query?: never;
|
|
3419
|
+
url: '/gift-cards/lookup';
|
|
3420
|
+
};
|
|
3421
|
+
export type LookupGiftCardErrors = {
|
|
3422
|
+
/**
|
|
3423
|
+
* The request is missing something the API needs before it can act.
|
|
3424
|
+
*/
|
|
3425
|
+
400: ErrorResponse;
|
|
3426
|
+
/**
|
|
3427
|
+
* The credential is missing, malformed, or not accepted.
|
|
3428
|
+
*/
|
|
3429
|
+
401: ErrorResponse;
|
|
3430
|
+
/**
|
|
3431
|
+
* The credential is valid, but this vendor may not do this right now.
|
|
3432
|
+
*/
|
|
3433
|
+
403: ErrorResponse;
|
|
3434
|
+
/**
|
|
3435
|
+
* The route, or the record it names, does not exist.
|
|
3436
|
+
*/
|
|
3437
|
+
404: ErrorResponse;
|
|
3438
|
+
/**
|
|
3439
|
+
* The body is in a format the API cannot read. Send it as JSON, or as a form.
|
|
3440
|
+
*/
|
|
3441
|
+
415: ErrorResponse;
|
|
3442
|
+
/**
|
|
3443
|
+
* The request was understood, and the API refuses to act on it.
|
|
3444
|
+
*/
|
|
3445
|
+
422: ErrorResponse;
|
|
3446
|
+
/**
|
|
3447
|
+
* Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
|
|
3448
|
+
*/
|
|
3449
|
+
429: ErrorResponse;
|
|
3450
|
+
/**
|
|
3451
|
+
* Something went wrong on our side. Quote the request_id when you report it.
|
|
3452
|
+
*/
|
|
3453
|
+
500: ErrorResponse;
|
|
3454
|
+
};
|
|
3455
|
+
export type LookupGiftCardError = LookupGiftCardErrors[keyof LookupGiftCardErrors];
|
|
3456
|
+
export type LookupGiftCardResponses = {
|
|
3457
|
+
200: {
|
|
3458
|
+
data: GiftCardApiData;
|
|
3459
|
+
};
|
|
3460
|
+
};
|
|
3461
|
+
export type LookupGiftCardResponse = LookupGiftCardResponses[keyof LookupGiftCardResponses];
|
|
3462
|
+
export type RedeemGiftCardData = {
|
|
3463
|
+
body: RedeemGiftCardApiData;
|
|
3464
|
+
path?: never;
|
|
3465
|
+
query?: never;
|
|
3466
|
+
url: '/gift-cards/redeem';
|
|
3467
|
+
};
|
|
3468
|
+
export type RedeemGiftCardErrors = {
|
|
3469
|
+
/**
|
|
3470
|
+
* The request is missing something the API needs before it can act.
|
|
3471
|
+
*/
|
|
3472
|
+
400: ErrorResponse;
|
|
3473
|
+
/**
|
|
3474
|
+
* The credential is missing, malformed, or not accepted.
|
|
3475
|
+
*/
|
|
3476
|
+
401: ErrorResponse;
|
|
3477
|
+
/**
|
|
3478
|
+
* The credential is valid, but this vendor may not do this right now.
|
|
3479
|
+
*/
|
|
3480
|
+
403: ErrorResponse;
|
|
3481
|
+
/**
|
|
3482
|
+
* The route, or the record it names, does not exist.
|
|
3483
|
+
*/
|
|
3484
|
+
404: ErrorResponse;
|
|
3485
|
+
/**
|
|
3486
|
+
* The body is in a format the API cannot read. Send it as JSON, or as a form.
|
|
3487
|
+
*/
|
|
3488
|
+
415: ErrorResponse;
|
|
3489
|
+
/**
|
|
3490
|
+
* The request was understood, and the API refuses to act on it.
|
|
3491
|
+
*/
|
|
3492
|
+
422: ErrorResponse;
|
|
3493
|
+
/**
|
|
3494
|
+
* Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
|
|
3495
|
+
*/
|
|
3496
|
+
429: ErrorResponse;
|
|
3497
|
+
/**
|
|
3498
|
+
* Something went wrong on our side. Quote the request_id when you report it.
|
|
3499
|
+
*/
|
|
3500
|
+
500: ErrorResponse;
|
|
3501
|
+
};
|
|
3502
|
+
export type RedeemGiftCardError = RedeemGiftCardErrors[keyof RedeemGiftCardErrors];
|
|
3503
|
+
export type RedeemGiftCardResponses = {
|
|
3504
|
+
200: {
|
|
3505
|
+
data: GiftCardApiData;
|
|
3506
|
+
};
|
|
3507
|
+
};
|
|
3508
|
+
export type RedeemGiftCardResponse = RedeemGiftCardResponses[keyof RedeemGiftCardResponses];
|
|
3509
|
+
export type LoadGiftCardData = {
|
|
3510
|
+
body: LoadGiftCardApiData;
|
|
3511
|
+
path?: never;
|
|
3512
|
+
query?: never;
|
|
3513
|
+
url: '/gift-cards/load';
|
|
3514
|
+
};
|
|
3515
|
+
export type LoadGiftCardErrors = {
|
|
3516
|
+
/**
|
|
3517
|
+
* The request is missing something the API needs before it can act.
|
|
3518
|
+
*/
|
|
3519
|
+
400: ErrorResponse;
|
|
3520
|
+
/**
|
|
3521
|
+
* The credential is missing, malformed, or not accepted.
|
|
3522
|
+
*/
|
|
3523
|
+
401: ErrorResponse;
|
|
3524
|
+
/**
|
|
3525
|
+
* The credential is valid, but this vendor may not do this right now.
|
|
3526
|
+
*/
|
|
3527
|
+
403: ErrorResponse;
|
|
3528
|
+
/**
|
|
3529
|
+
* The route, or the record it names, does not exist.
|
|
3530
|
+
*/
|
|
3531
|
+
404: ErrorResponse;
|
|
3532
|
+
/**
|
|
3533
|
+
* The body is in a format the API cannot read. Send it as JSON, or as a form.
|
|
3534
|
+
*/
|
|
3535
|
+
415: ErrorResponse;
|
|
3536
|
+
/**
|
|
3537
|
+
* The request was understood, and the API refuses to act on it.
|
|
3538
|
+
*/
|
|
3539
|
+
422: ErrorResponse;
|
|
3540
|
+
/**
|
|
3541
|
+
* Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
|
|
3542
|
+
*/
|
|
3543
|
+
429: ErrorResponse;
|
|
3544
|
+
/**
|
|
3545
|
+
* Something went wrong on our side. Quote the request_id when you report it.
|
|
3546
|
+
*/
|
|
3547
|
+
500: ErrorResponse;
|
|
3548
|
+
};
|
|
3549
|
+
export type LoadGiftCardError = LoadGiftCardErrors[keyof LoadGiftCardErrors];
|
|
3550
|
+
export type LoadGiftCardResponses = {
|
|
3551
|
+
200: {
|
|
3552
|
+
data: GiftCardApiData;
|
|
3553
|
+
};
|
|
3554
|
+
};
|
|
3555
|
+
export type LoadGiftCardResponse = LoadGiftCardResponses[keyof LoadGiftCardResponses];
|
|
3556
|
+
export type UndoGiftCardLoadData = {
|
|
3557
|
+
body: UndoGiftCardLoadApiData;
|
|
3558
|
+
path?: never;
|
|
3559
|
+
query?: never;
|
|
3560
|
+
url: '/gift-cards/load/undo';
|
|
3561
|
+
};
|
|
3562
|
+
export type UndoGiftCardLoadErrors = {
|
|
3563
|
+
/**
|
|
3564
|
+
* The request is missing something the API needs before it can act.
|
|
3565
|
+
*/
|
|
3566
|
+
400: ErrorResponse;
|
|
3567
|
+
/**
|
|
3568
|
+
* The credential is missing, malformed, or not accepted.
|
|
3569
|
+
*/
|
|
3570
|
+
401: ErrorResponse;
|
|
3571
|
+
/**
|
|
3572
|
+
* The credential is valid, but this vendor may not do this right now.
|
|
3573
|
+
*/
|
|
3574
|
+
403: ErrorResponse;
|
|
3575
|
+
/**
|
|
3576
|
+
* The route, or the record it names, does not exist.
|
|
3577
|
+
*/
|
|
3578
|
+
404: ErrorResponse;
|
|
3579
|
+
/**
|
|
3580
|
+
* The body is in a format the API cannot read. Send it as JSON, or as a form.
|
|
3581
|
+
*/
|
|
3582
|
+
415: ErrorResponse;
|
|
3583
|
+
/**
|
|
3584
|
+
* The request was understood, and the API refuses to act on it.
|
|
3585
|
+
*/
|
|
3586
|
+
422: ErrorResponse;
|
|
3587
|
+
/**
|
|
3588
|
+
* Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
|
|
3589
|
+
*/
|
|
3590
|
+
429: ErrorResponse;
|
|
3591
|
+
/**
|
|
3592
|
+
* Something went wrong on our side. Quote the request_id when you report it.
|
|
3593
|
+
*/
|
|
3594
|
+
500: ErrorResponse;
|
|
3595
|
+
};
|
|
3596
|
+
export type UndoGiftCardLoadError = UndoGiftCardLoadErrors[keyof UndoGiftCardLoadErrors];
|
|
3597
|
+
export type UndoGiftCardLoadResponses = {
|
|
3598
|
+
200: {
|
|
3599
|
+
data: GiftCardApiData;
|
|
3600
|
+
};
|
|
3601
|
+
};
|
|
3602
|
+
export type UndoGiftCardLoadResponse = UndoGiftCardLoadResponses[keyof UndoGiftCardLoadResponses];
|