@puntjes/sdk 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/generated/error-codes.gen.d.ts +2 -0
- package/dist/generated/error-codes.gen.js +4 -0
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/sdk.gen.d.ts +3 -1
- package/dist/generated/sdk.gen.js +22 -0
- package/dist/generated/types.gen.d.ts +197 -11
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -130,7 +130,10 @@ to `fix:` when the regenerated code changes, so release-please ships it as its o
|
|
|
130
130
|
- `npm run generate` regenerates it: hey-api, then `tools/codegen.ts` for the `ErrorCode` list. hey-api is pinned to
|
|
131
131
|
an exact version, and TypeScript is pinned to 5 beside it, because hey-api fails under TypeScript 7.
|
|
132
132
|
- When Puntjes publishes a new API spec, `.github/workflows/regenerate.yml` opens a PR with the new code. A minor or
|
|
133
|
-
patch spec merges itself when CI is green; a major one waits for a person.
|
|
133
|
+
patch spec merges itself when CI is green; a major one waits for a person. CI also compares the public API with the
|
|
134
|
+
last release on npm (`tools/bc-check.ts`). A PR that removes or changes a public declaration fails until its title
|
|
135
|
+
is `feat!:` or `fix!:`, or its body has a `BREAKING CHANGE:` line. A new choice in a union of literals, such as a
|
|
136
|
+
new `locale`, is not a change: it ships in a minor release.
|
|
134
137
|
- `.github/workflows/release.yml` runs release-please. Its release PR merges itself when CI is green, and the tag
|
|
135
138
|
publishes the package to npm with provenance.
|
|
136
139
|
|
|
@@ -15,6 +15,7 @@ export declare const ErrorCode: {
|
|
|
15
15
|
readonly CustomerNotFound: "CUSTOMER_NOT_FOUND";
|
|
16
16
|
readonly ExternalIdDuplicate: "EXTERNAL_ID_DUPLICATE";
|
|
17
17
|
readonly ExternalIdNotFound: "EXTERNAL_ID_NOT_FOUND";
|
|
18
|
+
readonly FeatureNotEnabled: "FEATURE_NOT_ENABLED";
|
|
18
19
|
readonly Forbidden: "FORBIDDEN";
|
|
19
20
|
readonly IdempotencyKeyConflict: "IDEMPOTENCY_KEY_CONFLICT";
|
|
20
21
|
readonly IdentifierDuplicate: "IDENTIFIER_DUPLICATE";
|
|
@@ -49,6 +50,7 @@ export declare const ErrorCode: {
|
|
|
49
50
|
readonly VerificationFailed: "VERIFICATION_FAILED";
|
|
50
51
|
readonly VoucherAlreadyUsed: "VOUCHER_ALREADY_USED";
|
|
51
52
|
readonly VoucherExpired: "VOUCHER_EXPIRED";
|
|
53
|
+
readonly VoucherGroupRequired: "VOUCHER_GROUP_REQUIRED";
|
|
52
54
|
readonly VoucherNotFound: "VOUCHER_NOT_FOUND";
|
|
53
55
|
readonly WalletNotFound: "WALLET_NOT_FOUND";
|
|
54
56
|
};
|
|
@@ -16,6 +16,7 @@ export const ErrorCode = {
|
|
|
16
16
|
CustomerNotFound: 'CUSTOMER_NOT_FOUND',
|
|
17
17
|
ExternalIdDuplicate: 'EXTERNAL_ID_DUPLICATE',
|
|
18
18
|
ExternalIdNotFound: 'EXTERNAL_ID_NOT_FOUND',
|
|
19
|
+
FeatureNotEnabled: 'FEATURE_NOT_ENABLED',
|
|
19
20
|
Forbidden: 'FORBIDDEN',
|
|
20
21
|
IdempotencyKeyConflict: 'IDEMPOTENCY_KEY_CONFLICT',
|
|
21
22
|
IdentifierDuplicate: 'IDENTIFIER_DUPLICATE',
|
|
@@ -50,6 +51,7 @@ export const ErrorCode = {
|
|
|
50
51
|
VerificationFailed: 'VERIFICATION_FAILED',
|
|
51
52
|
VoucherAlreadyUsed: 'VOUCHER_ALREADY_USED',
|
|
52
53
|
VoucherExpired: 'VOUCHER_EXPIRED',
|
|
54
|
+
VoucherGroupRequired: 'VOUCHER_GROUP_REQUIRED',
|
|
53
55
|
VoucherNotFound: 'VOUCHER_NOT_FOUND',
|
|
54
56
|
WalletNotFound: 'WALLET_NOT_FOUND',
|
|
55
57
|
};
|
|
@@ -70,6 +72,7 @@ export const errorCodeStatus = {
|
|
|
70
72
|
CUSTOMER_NOT_FOUND: 404,
|
|
71
73
|
EXTERNAL_ID_DUPLICATE: 409,
|
|
72
74
|
EXTERNAL_ID_NOT_FOUND: 404,
|
|
75
|
+
FEATURE_NOT_ENABLED: 403,
|
|
73
76
|
FORBIDDEN: 403,
|
|
74
77
|
IDEMPOTENCY_KEY_CONFLICT: 422,
|
|
75
78
|
IDENTIFIER_DUPLICATE: 409,
|
|
@@ -104,6 +107,7 @@ export const errorCodeStatus = {
|
|
|
104
107
|
VERIFICATION_FAILED: 422,
|
|
105
108
|
VOUCHER_ALREADY_USED: 422,
|
|
106
109
|
VOUCHER_EXPIRED: 422,
|
|
110
|
+
VOUCHER_GROUP_REQUIRED: 422,
|
|
107
111
|
VOUCHER_NOT_FOUND: 404,
|
|
108
112
|
WALLET_NOT_FOUND: 404,
|
|
109
113
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { type Options, PuntjesApi } from './sdk.gen.js';
|
|
2
|
-
export type { AdjustWalletApiData, AdjustWalletData, AdjustWalletError, AdjustWalletErrors, AdjustWalletResponse, AdjustWalletResponses, AnniversaryCampaignConfigData, BranchReferenceData, BulkUpsertProductsData, BulkUpsertProductsError, BulkUpsertProductsErrors, BulkUpsertProductsResponse, BulkUpsertProductsResponses, BulkUpsertResponseData, BulkUpsertResultData, BulkUpsertSummaryData, CampaignListData, CampaignProductRuleData, CampaignStatusData, CampaignVoucherLookupData, CampaignVoucherVerificationData, CategoryRevenueData, CheckHealthData, CheckHealthError, CheckHealthErrors, CheckHealthResponse, CheckHealthResponses, ClientOptions, CommerceStatisticsData, CreateCustomerData, CreateIdentifierData, CreateProductData, CreateProductData2, CreateProductError, CreateProductErrors, CreateProductResponse, CreateProductResponses, CreateRedemptionData, CreateRewardFromProductData, CreateRewardFromProductData2, CreateRewardFromProductError, CreateRewardFromProductErrors, CreateRewardFromProductResponse, CreateRewardFromProductResponses, CreateTransactionData, CreateTransactionItemData, CustomerData, CustomerDetailData, CustomerIdentifierData, CustomerLookupData, CustomerStatusData, CustomerVoucherData, DateRangeRecurrenceData, DaysOfWeekRecurrenceData, 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, MomentCampaignConfigData, NthPurchaseCampaignConfigData, PaginationLinks, PaginationMeta, 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, 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 { 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, CommerceStatisticsData, CreateCustomerData, CreateIdentifierData, CreateProductData, CreateProductData2, CreateProductError, CreateProductErrors, CreateProductResponse, CreateProductResponses, CreateRedemptionData, CreateRewardFromProductData, CreateRewardFromProductData2, CreateRewardFromProductError, CreateRewardFromProductErrors, CreateRewardFromProductResponse, CreateRewardFromProductResponses, CreateTransactionData, CreateTransactionItemData, CustomerData, CustomerDetailData, CustomerGroupReferenceData, CustomerIdentifierData, CustomerLookupData, CustomerStatusData, CustomerVoucherData, DateRangeRecurrenceData, DaysOfWeekRecurrenceData, 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, NthPurchaseCampaignConfigData, PaginationLinks, PaginationMeta, 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, 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';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
-
import type { AdjustWalletData, AdjustWalletErrors, AdjustWalletResponses, BulkUpsertProductsData, BulkUpsertProductsErrors, BulkUpsertProductsResponses, CheckHealthData, CheckHealthErrors, CheckHealthResponses, CreateProductData2, CreateProductErrors, CreateProductResponses, CreateRewardFromProductData2, CreateRewardFromProductErrors, CreateRewardFromProductResponses, 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, RedeemRewardData, RedeemRewardErrors, RedeemRewardResponses, RegisterCustomerData, RegisterCustomerErrors, RegisterCustomerResponses, ReplaceCustomerByExternalIdData, ReplaceCustomerByExternalIdErrors, ReplaceCustomerByExternalIdResponses, 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 { AdjustWalletData, AdjustWalletErrors, AdjustWalletResponses, BulkUpsertProductsData, BulkUpsertProductsErrors, BulkUpsertProductsResponses, ChangeCustomerExternalIdData, ChangeCustomerExternalIdErrors, ChangeCustomerExternalIdResponses, CheckHealthData, CheckHealthErrors, CheckHealthResponses, CreateProductData2, CreateProductErrors, CreateProductResponses, CreateRewardFromProductData2, CreateRewardFromProductErrors, CreateRewardFromProductResponses, 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, 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';
|
|
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
|
|
@@ -36,9 +36,11 @@ export declare class PuntjesApi extends HeyApiClient {
|
|
|
36
36
|
updateCustomerByExternalId<ThrowOnError extends boolean = true>(options: Options<UpdateCustomerByExternalIdData, ThrowOnError>): RequestResult<UpdateCustomerByExternalIdResponses, UpdateCustomerByExternalIdErrors, ThrowOnError>;
|
|
37
37
|
replaceCustomerByExternalId<ThrowOnError extends boolean = true>(options: Options<ReplaceCustomerByExternalIdData, ThrowOnError>): RequestResult<ReplaceCustomerByExternalIdResponses, ReplaceCustomerByExternalIdErrors, ThrowOnError>;
|
|
38
38
|
linkCustomerExternalId<ThrowOnError extends boolean = true>(options: Options<LinkCustomerExternalIdData, ThrowOnError>): RequestResult<LinkCustomerExternalIdResponses, LinkCustomerExternalIdErrors, ThrowOnError>;
|
|
39
|
+
changeCustomerExternalId<ThrowOnError extends boolean = true>(options: Options<ChangeCustomerExternalIdData, ThrowOnError>): RequestResult<ChangeCustomerExternalIdResponses, ChangeCustomerExternalIdErrors, ThrowOnError>;
|
|
39
40
|
sendLoyaltyCardByExternalId<ThrowOnError extends boolean = true>(options: Options<SendLoyaltyCardByExternalIdData, ThrowOnError>): RequestResult<SendLoyaltyCardByExternalIdResponses, SendLoyaltyCardByExternalIdErrors, ThrowOnError>;
|
|
40
41
|
sendLoyaltyCard<ThrowOnError extends boolean = true>(options: Options<SendLoyaltyCardData, ThrowOnError>): RequestResult<SendLoyaltyCardResponses, SendLoyaltyCardErrors, ThrowOnError>;
|
|
41
42
|
showCustomer<ThrowOnError extends boolean = true>(options: Options<ShowCustomerData, ThrowOnError>): RequestResult<ShowCustomerResponses, ShowCustomerErrors, ThrowOnError>;
|
|
43
|
+
mergeCustomers<ThrowOnError extends boolean = true>(options: Options<MergeCustomersData, ThrowOnError>): RequestResult<MergeCustomersResponses, MergeCustomersErrors, ThrowOnError>;
|
|
42
44
|
submitTransaction<ThrowOnError extends boolean = true>(options: Options<SubmitTransactionData, ThrowOnError>): RequestResult<SubmitTransactionResponses, SubmitTransactionErrors, ThrowOnError>;
|
|
43
45
|
listCustomerTransactions<ThrowOnError extends boolean = true>(options: Options<ListCustomerTransactionsData, ThrowOnError>): RequestResult<ListCustomerTransactionsResponses, ListCustomerTransactionsErrors, ThrowOnError>;
|
|
44
46
|
showWallet<ThrowOnError extends boolean = true>(options: Options<ShowWalletData, ThrowOnError>): RequestResult<ShowWalletResponses, ShowWalletErrors, ThrowOnError>;
|
|
@@ -77,6 +77,17 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
+
changeCustomerExternalId(options) {
|
|
81
|
+
return (options.client ?? this.client).put({
|
|
82
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
83
|
+
url: '/customers/{customer}/external-id',
|
|
84
|
+
...options,
|
|
85
|
+
headers: {
|
|
86
|
+
'Content-Type': 'application/json',
|
|
87
|
+
...options.headers
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
80
91
|
sendLoyaltyCardByExternalId(options) {
|
|
81
92
|
return (options.client ?? this.client).post({
|
|
82
93
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -106,6 +117,17 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
106
117
|
...options
|
|
107
118
|
});
|
|
108
119
|
}
|
|
120
|
+
mergeCustomers(options) {
|
|
121
|
+
return (options.client ?? this.client).post({
|
|
122
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
123
|
+
url: '/customers/{customer}/merge',
|
|
124
|
+
...options,
|
|
125
|
+
headers: {
|
|
126
|
+
'Content-Type': 'application/json',
|
|
127
|
+
...options.headers
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}
|
|
109
131
|
submitTransaction(options) {
|
|
110
132
|
return (options.client ?? this.client).post({
|
|
111
133
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -35,6 +35,10 @@ export type AnniversaryCampaignConfigData = {
|
|
|
35
35
|
* The branches this campaign runs in. Absent or empty means all of them.
|
|
36
36
|
*/
|
|
37
37
|
branch_ids?: Array<number>;
|
|
38
|
+
/**
|
|
39
|
+
* The groups this campaign is for. Absent or empty means everyone.
|
|
40
|
+
*/
|
|
41
|
+
customer_group_ids?: Array<number>;
|
|
38
42
|
/**
|
|
39
43
|
* Which shape this is.
|
|
40
44
|
*/
|
|
@@ -125,6 +129,10 @@ export type CampaignListData = {
|
|
|
125
129
|
branches: Array<BranchReferenceData> | null;
|
|
126
130
|
created_at: string | null;
|
|
127
131
|
updated_at: string | null;
|
|
132
|
+
/**
|
|
133
|
+
* Who the campaign is for. Empty means every customer.
|
|
134
|
+
*/
|
|
135
|
+
customer_groups: Array<CustomerGroupReferenceData>;
|
|
128
136
|
};
|
|
129
137
|
/**
|
|
130
138
|
* CampaignProductRuleData
|
|
@@ -152,7 +160,7 @@ export type CampaignStatusData = {
|
|
|
152
160
|
export type CampaignVoucherLookupData = {
|
|
153
161
|
voucher_code: string;
|
|
154
162
|
/**
|
|
155
|
-
* How much comes off, for a discount
|
|
163
|
+
* How much comes off, for a discount voucher. Its `type` says which shape this is.
|
|
156
164
|
*/
|
|
157
165
|
discount: ({
|
|
158
166
|
type: 'percentage';
|
|
@@ -161,19 +169,27 @@ export type CampaignVoucherLookupData = {
|
|
|
161
169
|
} & VoucherFixedDiscountData);
|
|
162
170
|
valid_until: string | null;
|
|
163
171
|
/**
|
|
164
|
-
* When the
|
|
172
|
+
* When the voucher was spent, or null while it is not.
|
|
165
173
|
*/
|
|
166
174
|
consumed_at: string | null;
|
|
167
175
|
campaign_id: number;
|
|
168
176
|
kind: string;
|
|
169
177
|
/**
|
|
170
|
-
* What to hand over, for a free-product
|
|
178
|
+
* What to hand over, for a free-product voucher.
|
|
171
179
|
*/
|
|
172
180
|
products: Array<VoucherGiftProductData> | null;
|
|
173
181
|
/**
|
|
174
182
|
* `valid`, `used` or `expired`.
|
|
175
183
|
*/
|
|
176
184
|
status: string;
|
|
185
|
+
/**
|
|
186
|
+
* Groups that may spend it; empty means every customer.
|
|
187
|
+
*/
|
|
188
|
+
customer_groups: Array<CustomerGroupReferenceData>;
|
|
189
|
+
/**
|
|
190
|
+
* Only true when `status` is `valid` and the customer is a member of none of its customer groups.
|
|
191
|
+
*/
|
|
192
|
+
blocked_by_group: boolean;
|
|
177
193
|
};
|
|
178
194
|
/**
|
|
179
195
|
* CampaignVoucherVerificationData
|
|
@@ -181,7 +197,7 @@ export type CampaignVoucherLookupData = {
|
|
|
181
197
|
export type CampaignVoucherVerificationData = {
|
|
182
198
|
voucher_code: string;
|
|
183
199
|
/**
|
|
184
|
-
* How much comes off, for a discount
|
|
200
|
+
* How much comes off, for a discount voucher. Its `type` says which shape this is.
|
|
185
201
|
*/
|
|
186
202
|
discount: ({
|
|
187
203
|
type: 'percentage';
|
|
@@ -193,7 +209,7 @@ export type CampaignVoucherVerificationData = {
|
|
|
193
209
|
campaign_id: number;
|
|
194
210
|
kind: string;
|
|
195
211
|
/**
|
|
196
|
-
* What to hand over, for a free-product
|
|
212
|
+
* What to hand over, for a free-product voucher.
|
|
197
213
|
*/
|
|
198
214
|
products: Array<VoucherGiftProductData> | null;
|
|
199
215
|
};
|
|
@@ -206,6 +222,12 @@ export type CategoryRevenueData = {
|
|
|
206
222
|
revenue?: number;
|
|
207
223
|
isOther?: boolean;
|
|
208
224
|
};
|
|
225
|
+
/**
|
|
226
|
+
* ChangeExternalIdData
|
|
227
|
+
*/
|
|
228
|
+
export type ChangeExternalIdData = {
|
|
229
|
+
external_id: string;
|
|
230
|
+
};
|
|
209
231
|
/**
|
|
210
232
|
* CommerceStatisticsData
|
|
211
233
|
*/
|
|
@@ -231,6 +253,7 @@ export type CreateCustomerData = {
|
|
|
231
253
|
marketing_consent?: boolean | null;
|
|
232
254
|
marketing_consent_statement_version?: string | null;
|
|
233
255
|
identifiers?: Array<CreateIdentifierData>;
|
|
256
|
+
groups?: Array<CustomerGroupReferenceData>;
|
|
234
257
|
};
|
|
235
258
|
/**
|
|
236
259
|
* CreateIdentifierData
|
|
@@ -334,6 +357,10 @@ export type CustomerData = {
|
|
|
334
357
|
anonymized_at: string | null;
|
|
335
358
|
created_at: string | null;
|
|
336
359
|
updated_at: string | null;
|
|
360
|
+
/**
|
|
361
|
+
* The customer's groups, sorted by name, then by external_id.
|
|
362
|
+
*/
|
|
363
|
+
groups: Array<CustomerGroupReferenceData>;
|
|
337
364
|
};
|
|
338
365
|
/**
|
|
339
366
|
* CustomerDetailData
|
|
@@ -367,6 +394,21 @@ export type CustomerDetailData = {
|
|
|
367
394
|
* `true` for a deactivated customer; the key is absent for any other customer.
|
|
368
395
|
*/
|
|
369
396
|
is_deactivated?: boolean;
|
|
397
|
+
/**
|
|
398
|
+
* The account a merge moved this closed account into, else `null`.
|
|
399
|
+
*/
|
|
400
|
+
merged_into_customer_id: number | null;
|
|
401
|
+
/**
|
|
402
|
+
* The customer's groups, sorted by name, then by external_id.
|
|
403
|
+
*/
|
|
404
|
+
groups: Array<CustomerGroupReferenceData>;
|
|
405
|
+
};
|
|
406
|
+
/**
|
|
407
|
+
* CustomerGroupReferenceData
|
|
408
|
+
*/
|
|
409
|
+
export type CustomerGroupReferenceData = {
|
|
410
|
+
external_id: string;
|
|
411
|
+
name: string;
|
|
370
412
|
};
|
|
371
413
|
/**
|
|
372
414
|
* CustomerIdentifierData
|
|
@@ -415,6 +457,14 @@ export type CustomerLookupData = {
|
|
|
415
457
|
* `true` for a deactivated customer; the key is absent for any other customer.
|
|
416
458
|
*/
|
|
417
459
|
is_deactivated?: boolean;
|
|
460
|
+
/**
|
|
461
|
+
* The account a merge moved this closed account into, else `null`.
|
|
462
|
+
*/
|
|
463
|
+
merged_into_customer_id: number | null;
|
|
464
|
+
/**
|
|
465
|
+
* The customer's groups, sorted by name, then by external_id.
|
|
466
|
+
*/
|
|
467
|
+
groups: Array<CustomerGroupReferenceData>;
|
|
418
468
|
};
|
|
419
469
|
/**
|
|
420
470
|
* CustomerStatusData
|
|
@@ -431,7 +481,7 @@ export type CustomerVoucherData = {
|
|
|
431
481
|
campaign_id: number;
|
|
432
482
|
kind: string;
|
|
433
483
|
/**
|
|
434
|
-
* How much comes off, for a discount
|
|
484
|
+
* How much comes off, for a discount voucher. Its `type` says which shape this is.
|
|
435
485
|
*/
|
|
436
486
|
discount: ({
|
|
437
487
|
type: 'percentage';
|
|
@@ -439,15 +489,15 @@ export type CustomerVoucherData = {
|
|
|
439
489
|
type: 'fixed';
|
|
440
490
|
} & VoucherFixedDiscountData);
|
|
441
491
|
/**
|
|
442
|
-
* What to hand over, for a free-product
|
|
492
|
+
* What to hand over, for a free-product voucher.
|
|
443
493
|
*/
|
|
444
494
|
products: Array<VoucherGiftProductData> | null;
|
|
445
495
|
/**
|
|
446
|
-
* The last day the
|
|
496
|
+
* The last day the voucher can be spent, or null when it does not run out.
|
|
447
497
|
*/
|
|
448
498
|
valid_until: string | null;
|
|
449
499
|
/**
|
|
450
|
-
* The branches that take the
|
|
500
|
+
* The branches that take the voucher; null means every branch.
|
|
451
501
|
*/
|
|
452
502
|
branches: Array<BranchReferenceData> | null;
|
|
453
503
|
};
|
|
@@ -726,6 +776,23 @@ export type LoyaltyStatisticsData = {
|
|
|
726
776
|
*/
|
|
727
777
|
breakage_rate_excluding_import?: number | null;
|
|
728
778
|
};
|
|
779
|
+
/**
|
|
780
|
+
* MergeCustomersApiData
|
|
781
|
+
*/
|
|
782
|
+
export type MergeCustomersApiData = {
|
|
783
|
+
/**
|
|
784
|
+
* Id of the closed account; its rows go to the kept account, its points too if `add_points`.
|
|
785
|
+
*/
|
|
786
|
+
source: number;
|
|
787
|
+
/**
|
|
788
|
+
* `true` adds the points of the closed account to the kept account; `false` drops them.
|
|
789
|
+
*/
|
|
790
|
+
add_points: boolean;
|
|
791
|
+
/**
|
|
792
|
+
* Max 255 characters; the same request again answers 200, another is refused.
|
|
793
|
+
*/
|
|
794
|
+
idempotency_key: string;
|
|
795
|
+
};
|
|
729
796
|
/**
|
|
730
797
|
* MomentCampaignConfigData
|
|
731
798
|
*/
|
|
@@ -744,6 +811,10 @@ export type MomentCampaignConfigData = {
|
|
|
744
811
|
* The branches this campaign runs in. Absent or empty means all of them.
|
|
745
812
|
*/
|
|
746
813
|
branch_ids?: Array<number>;
|
|
814
|
+
/**
|
|
815
|
+
* The groups this campaign is for. Absent or empty means everyone.
|
|
816
|
+
*/
|
|
817
|
+
customer_group_ids?: Array<number>;
|
|
747
818
|
/**
|
|
748
819
|
* Which shape this is.
|
|
749
820
|
*/
|
|
@@ -775,6 +846,10 @@ export type NthPurchaseCampaignConfigData = {
|
|
|
775
846
|
* The branches this campaign runs in. Absent or empty means all of them.
|
|
776
847
|
*/
|
|
777
848
|
branch_ids?: Array<number>;
|
|
849
|
+
/**
|
|
850
|
+
* The groups this campaign is for. Absent or empty means everyone.
|
|
851
|
+
*/
|
|
852
|
+
customer_group_ids?: Array<number>;
|
|
778
853
|
/**
|
|
779
854
|
* Which shape this is.
|
|
780
855
|
*/
|
|
@@ -1112,6 +1187,10 @@ export type TransactionCampaignConfigData = {
|
|
|
1112
1187
|
* The branches this campaign runs in. Absent or empty means all of them.
|
|
1113
1188
|
*/
|
|
1114
1189
|
branch_ids?: Array<number>;
|
|
1190
|
+
/**
|
|
1191
|
+
* The groups this campaign is for. Absent or empty means everyone.
|
|
1192
|
+
*/
|
|
1193
|
+
customer_group_ids?: Array<number>;
|
|
1115
1194
|
/**
|
|
1116
1195
|
* Which shape this is.
|
|
1117
1196
|
*/
|
|
@@ -1158,6 +1237,7 @@ export type UpdateCustomerData = {
|
|
|
1158
1237
|
locale?: 'nl' | 'en' | null;
|
|
1159
1238
|
marketing_consent?: boolean | null;
|
|
1160
1239
|
marketing_consent_statement_version?: string | null;
|
|
1240
|
+
groups?: Array<CustomerGroupReferenceData>;
|
|
1161
1241
|
};
|
|
1162
1242
|
/**
|
|
1163
1243
|
* UpdateProductData
|
|
@@ -1253,7 +1333,7 @@ export type VoucherGiftProductData = {
|
|
|
1253
1333
|
*/
|
|
1254
1334
|
id: number | null;
|
|
1255
1335
|
/**
|
|
1256
|
-
* The product name as it was when the
|
|
1336
|
+
* The product name as it was when the voucher was issued.
|
|
1257
1337
|
*/
|
|
1258
1338
|
name: string;
|
|
1259
1339
|
/**
|
|
@@ -1261,7 +1341,7 @@ export type VoucherGiftProductData = {
|
|
|
1261
1341
|
*/
|
|
1262
1342
|
quantity: number;
|
|
1263
1343
|
/**
|
|
1264
|
-
* The item number when the
|
|
1344
|
+
* The item number when the voucher was issued, or null when it had none.
|
|
1265
1345
|
*/
|
|
1266
1346
|
product_reference: string | null;
|
|
1267
1347
|
};
|
|
@@ -1321,6 +1401,10 @@ export type WinBackCampaignConfigData = {
|
|
|
1321
1401
|
* The branches this campaign runs in. Absent or empty means all of them.
|
|
1322
1402
|
*/
|
|
1323
1403
|
branch_ids?: Array<number>;
|
|
1404
|
+
/**
|
|
1405
|
+
* The groups this campaign is for. Absent or empty means everyone.
|
|
1406
|
+
*/
|
|
1407
|
+
customer_group_ids?: Array<number>;
|
|
1324
1408
|
/**
|
|
1325
1409
|
* Which shape this is.
|
|
1326
1410
|
*/
|
|
@@ -1572,6 +1656,59 @@ export type LinkCustomerExternalIdResponses = {
|
|
|
1572
1656
|
};
|
|
1573
1657
|
};
|
|
1574
1658
|
export type LinkCustomerExternalIdResponse = LinkCustomerExternalIdResponses[keyof LinkCustomerExternalIdResponses];
|
|
1659
|
+
export type ChangeCustomerExternalIdData = {
|
|
1660
|
+
body: ChangeExternalIdData;
|
|
1661
|
+
path: {
|
|
1662
|
+
customer: string | null;
|
|
1663
|
+
};
|
|
1664
|
+
query?: never;
|
|
1665
|
+
url: '/customers/{customer}/external-id';
|
|
1666
|
+
};
|
|
1667
|
+
export type ChangeCustomerExternalIdErrors = {
|
|
1668
|
+
/**
|
|
1669
|
+
* The request is missing something the API needs before it can act.
|
|
1670
|
+
*/
|
|
1671
|
+
400: ErrorResponse;
|
|
1672
|
+
/**
|
|
1673
|
+
* The credential is missing, malformed, or not accepted.
|
|
1674
|
+
*/
|
|
1675
|
+
401: ErrorResponse;
|
|
1676
|
+
/**
|
|
1677
|
+
* The credential is valid, but this vendor may not do this right now.
|
|
1678
|
+
*/
|
|
1679
|
+
403: ErrorResponse;
|
|
1680
|
+
/**
|
|
1681
|
+
* The route, or the record it names, does not exist.
|
|
1682
|
+
*/
|
|
1683
|
+
404: ErrorResponse;
|
|
1684
|
+
/**
|
|
1685
|
+
* The request conflicts with something that already exists.
|
|
1686
|
+
*/
|
|
1687
|
+
409: ErrorResponse;
|
|
1688
|
+
/**
|
|
1689
|
+
* The body is in a format the API cannot read. Send it as JSON, or as a form.
|
|
1690
|
+
*/
|
|
1691
|
+
415: ErrorResponse;
|
|
1692
|
+
/**
|
|
1693
|
+
* The request was understood, and the API refuses to act on it.
|
|
1694
|
+
*/
|
|
1695
|
+
422: ErrorResponse;
|
|
1696
|
+
/**
|
|
1697
|
+
* Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
|
|
1698
|
+
*/
|
|
1699
|
+
429: ErrorResponse;
|
|
1700
|
+
/**
|
|
1701
|
+
* Something went wrong on our side. Quote the request_id when you report it.
|
|
1702
|
+
*/
|
|
1703
|
+
500: ErrorResponse;
|
|
1704
|
+
};
|
|
1705
|
+
export type ChangeCustomerExternalIdError = ChangeCustomerExternalIdErrors[keyof ChangeCustomerExternalIdErrors];
|
|
1706
|
+
export type ChangeCustomerExternalIdResponses = {
|
|
1707
|
+
200: {
|
|
1708
|
+
data: CustomerDetailData;
|
|
1709
|
+
};
|
|
1710
|
+
};
|
|
1711
|
+
export type ChangeCustomerExternalIdResponse = ChangeCustomerExternalIdResponses[keyof ChangeCustomerExternalIdResponses];
|
|
1575
1712
|
export type SendLoyaltyCardByExternalIdData = {
|
|
1576
1713
|
body?: SendLoyaltyCardRequestData;
|
|
1577
1714
|
path: {
|
|
@@ -1707,6 +1844,55 @@ export type ShowCustomerResponses = {
|
|
|
1707
1844
|
};
|
|
1708
1845
|
};
|
|
1709
1846
|
export type ShowCustomerResponse = ShowCustomerResponses[keyof ShowCustomerResponses];
|
|
1847
|
+
export type MergeCustomersData = {
|
|
1848
|
+
body: MergeCustomersApiData;
|
|
1849
|
+
path: {
|
|
1850
|
+
customer: string | null;
|
|
1851
|
+
};
|
|
1852
|
+
query?: never;
|
|
1853
|
+
url: '/customers/{customer}/merge';
|
|
1854
|
+
};
|
|
1855
|
+
export type MergeCustomersErrors = {
|
|
1856
|
+
/**
|
|
1857
|
+
* The request is missing something the API needs before it can act.
|
|
1858
|
+
*/
|
|
1859
|
+
400: ErrorResponse;
|
|
1860
|
+
/**
|
|
1861
|
+
* The credential is missing, malformed, or not accepted.
|
|
1862
|
+
*/
|
|
1863
|
+
401: ErrorResponse;
|
|
1864
|
+
/**
|
|
1865
|
+
* The credential is valid, but this vendor may not do this right now.
|
|
1866
|
+
*/
|
|
1867
|
+
403: ErrorResponse;
|
|
1868
|
+
/**
|
|
1869
|
+
* The route, or the record it names, does not exist.
|
|
1870
|
+
*/
|
|
1871
|
+
404: ErrorResponse;
|
|
1872
|
+
/**
|
|
1873
|
+
* The body is in a format the API cannot read. Send it as JSON, or as a form.
|
|
1874
|
+
*/
|
|
1875
|
+
415: ErrorResponse;
|
|
1876
|
+
/**
|
|
1877
|
+
* The request was understood, and the API refuses to act on it.
|
|
1878
|
+
*/
|
|
1879
|
+
422: ErrorResponse;
|
|
1880
|
+
/**
|
|
1881
|
+
* Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
|
|
1882
|
+
*/
|
|
1883
|
+
429: ErrorResponse;
|
|
1884
|
+
/**
|
|
1885
|
+
* Something went wrong on our side. Quote the request_id when you report it.
|
|
1886
|
+
*/
|
|
1887
|
+
500: ErrorResponse;
|
|
1888
|
+
};
|
|
1889
|
+
export type MergeCustomersError = MergeCustomersErrors[keyof MergeCustomersErrors];
|
|
1890
|
+
export type MergeCustomersResponses = {
|
|
1891
|
+
200: {
|
|
1892
|
+
data: CustomerDetailData;
|
|
1893
|
+
};
|
|
1894
|
+
};
|
|
1895
|
+
export type MergeCustomersResponse = MergeCustomersResponses[keyof MergeCustomersResponses];
|
|
1710
1896
|
export type SubmitTransactionData = {
|
|
1711
1897
|
body: CreateTransactionData;
|
|
1712
1898
|
path?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puntjes/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "The official TypeScript client for the Puntjes loyalty API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,9 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@hey-api/openapi-ts": "0.99.0",
|
|
42
|
+
"@microsoft/api-extractor": "7.59.4",
|
|
42
43
|
"@types/node": "22.20.5",
|
|
43
|
-
"oxlint": "1.
|
|
44
|
+
"oxlint": "1.88.0",
|
|
44
45
|
"typescript": "5.9.3",
|
|
45
|
-
"vitest": "5.0.
|
|
46
|
+
"vitest": "5.0.5"
|
|
46
47
|
}
|
|
47
48
|
}
|