@puntjes/sdk 2.1.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 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, 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, 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, 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, VerifyRedemptionData, 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
@@ -32,13 +32,15 @@ export declare class PuntjesApi extends HeyApiClient {
32
32
  key?: string;
33
33
  });
34
34
  lookupCustomer<ThrowOnError extends boolean = true>(options?: Options<LookupCustomerData, ThrowOnError>): RequestResult<LookupCustomerResponses, LookupCustomerErrors, ThrowOnError>;
35
- registerCustomer<ThrowOnError extends boolean = true>(options: Options<RegisterCustomerData, ThrowOnError>): RequestResult<RegisterCustomerResponses, RegisterCustomerErrors, ThrowOnError>;
35
+ registerCustomer<ThrowOnError extends boolean = true>(options?: Options<RegisterCustomerData, ThrowOnError>): RequestResult<RegisterCustomerResponses, RegisterCustomerErrors, ThrowOnError>;
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>;
@@ -49,7 +51,7 @@ export declare class PuntjesApi extends HeyApiClient {
49
51
  listCustomerRedemptions<ThrowOnError extends boolean = true>(options: Options<ListCustomerRedemptionsData, ThrowOnError>): RequestResult<ListCustomerRedemptionsResponses, ListCustomerRedemptionsErrors, ThrowOnError>;
50
52
  redeemReward<ThrowOnError extends boolean = true>(options: Options<RedeemRewardData, ThrowOnError>): RequestResult<RedeemRewardResponses, RedeemRewardErrors, ThrowOnError>;
51
53
  lookupRedemption<ThrowOnError extends boolean = true>(options: Options<LookupRedemptionData, ThrowOnError>): RequestResult<LookupRedemptionResponses, LookupRedemptionErrors, ThrowOnError>;
52
- verifyRedemption<ThrowOnError extends boolean = true>(options: Options<VerifyRedemptionData, ThrowOnError>): RequestResult<VerifyRedemptionResponses, VerifyRedemptionErrors, ThrowOnError>;
54
+ verifyRedemption<ThrowOnError extends boolean = true>(options: Options<VerifyRedemptionData2, ThrowOnError>): RequestResult<VerifyRedemptionResponses, VerifyRedemptionErrors, ThrowOnError>;
53
55
  listProducts<ThrowOnError extends boolean = true>(options?: Options<ListProductsData, ThrowOnError>): RequestResult<ListProductsResponses, ListProductsErrors, ThrowOnError>;
54
56
  createProduct<ThrowOnError extends boolean = true>(options: Options<CreateProductData2, ThrowOnError>): RequestResult<CreateProductResponses, CreateProductErrors, ThrowOnError>;
55
57
  bulkUpsertProducts<ThrowOnError extends boolean = true>(options: Options<BulkUpsertProductsData, ThrowOnError>): RequestResult<BulkUpsertProductsResponses, BulkUpsertProductsErrors, ThrowOnError>;
@@ -64,6 +66,7 @@ export declare class PuntjesApi extends HeyApiClient {
64
66
  verifyVoucher<ThrowOnError extends boolean = true>(options: Options<VerifyVoucherData, ThrowOnError>): RequestResult<VerifyVoucherResponses, VerifyVoucherErrors, ThrowOnError>;
65
67
  showStatistics<ThrowOnError extends boolean = true>(options?: Options<ShowStatisticsData, ThrowOnError>): RequestResult<ShowStatisticsResponses, ShowStatisticsErrors, ThrowOnError>;
66
68
  showMe<ThrowOnError extends boolean = true>(options?: Options<ShowMeData, ThrowOnError>): RequestResult<ShowMeResponses, ShowMeErrors, ThrowOnError>;
69
+ listBranches<ThrowOnError extends boolean = true>(options?: Options<ListBranchesData, ThrowOnError>): RequestResult<ListBranchesResponses, ListBranchesErrors, ThrowOnError>;
67
70
  checkHealth<ThrowOnError extends boolean = true>(options?: Options<CheckHealthData, ThrowOnError>): RequestResult<CheckHealthResponses, CheckHealthErrors, ThrowOnError>;
68
71
  }
69
72
  export {};
@@ -34,13 +34,13 @@ export class PuntjesApi extends HeyApiClient {
34
34
  });
35
35
  }
36
36
  registerCustomer(options) {
37
- return (options.client ?? this.client).post({
37
+ return (options?.client ?? this.client).post({
38
38
  security: [{ scheme: 'bearer', type: 'http' }],
39
39
  url: '/customers',
40
40
  ...options,
41
41
  headers: {
42
42
  'Content-Type': 'application/json',
43
- ...options.headers
43
+ ...options?.headers
44
44
  }
45
45
  });
46
46
  }
@@ -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' }],
@@ -192,7 +214,11 @@ export class PuntjesApi extends HeyApiClient {
192
214
  return (options.client ?? this.client).post({
193
215
  security: [{ scheme: 'bearer', type: 'http' }],
194
216
  url: '/redemptions/{code}/verify',
195
- ...options
217
+ ...options,
218
+ headers: {
219
+ 'Content-Type': 'application/json',
220
+ ...options.headers
221
+ }
196
222
  });
197
223
  }
198
224
  listProducts(options) {
@@ -317,6 +343,13 @@ export class PuntjesApi extends HeyApiClient {
317
343
  ...options
318
344
  });
319
345
  }
346
+ listBranches(options) {
347
+ return (options?.client ?? this.client).get({
348
+ security: [{ scheme: 'bearer', type: 'http' }],
349
+ url: '/branches',
350
+ ...options
351
+ });
352
+ }
320
353
  checkHealth(options) {
321
354
  return (options?.client ?? this.client).get({ url: '/health', ...options });
322
355
  }
@@ -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 bon. Its `type` says which shape this is.
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 bon was spent, or null while it is not.
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 bon.
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 bon. Its `type` says which shape this is.
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 bon.
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 bon. Its `type` says which shape this is.
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 bon.
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 bon can be spent, or null when it does not run out.
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 bon; null means every branch.
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
  */
@@ -876,6 +951,10 @@ export type RedemptionCreatedData = {
876
951
  } & DiscountRedemptionData) | ({
877
952
  type: 'free_product';
878
953
  } & FreeProductRedemptionData);
954
+ /**
955
+ * The branches the reward has now; null means every branch.
956
+ */
957
+ branches: Array<BranchReferenceData> | null;
879
958
  };
880
959
  /**
881
960
  * RedemptionCustomerData
@@ -904,6 +983,10 @@ export type RedemptionLookupData = {
904
983
  } & DiscountRedemptionData) | ({
905
984
  type: 'free_product';
906
985
  } & FreeProductRedemptionData);
986
+ /**
987
+ * The branches the reward has now; null means every branch.
988
+ */
989
+ branches: Array<BranchReferenceData> | null;
907
990
  };
908
991
  /**
909
992
  * RedemptionRewardData
@@ -911,6 +994,10 @@ export type RedemptionLookupData = {
911
994
  export type RedemptionRewardData = {
912
995
  name: string;
913
996
  type: string;
997
+ /**
998
+ * The reward's id, the one GET /rewards lists.
999
+ */
1000
+ id: number;
914
1001
  };
915
1002
  /**
916
1003
  * RedemptionVerificationData
@@ -930,6 +1017,10 @@ export type RedemptionVerificationData = {
930
1017
  } & DiscountRedemptionData) | ({
931
1018
  type: 'free_product';
932
1019
  } & FreeProductRedemptionData);
1020
+ /**
1021
+ * The branches the reward has now; null means every branch.
1022
+ */
1023
+ branches: Array<BranchReferenceData> | null;
933
1024
  };
934
1025
  /**
935
1026
  * RewardCatalogItemData
@@ -1096,6 +1187,10 @@ export type TransactionCampaignConfigData = {
1096
1187
  * The branches this campaign runs in. Absent or empty means all of them.
1097
1188
  */
1098
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>;
1099
1194
  /**
1100
1195
  * Which shape this is.
1101
1196
  */
@@ -1142,6 +1237,7 @@ export type UpdateCustomerData = {
1142
1237
  locale?: 'nl' | 'en' | null;
1143
1238
  marketing_consent?: boolean | null;
1144
1239
  marketing_consent_statement_version?: string | null;
1240
+ groups?: Array<CustomerGroupReferenceData>;
1145
1241
  };
1146
1242
  /**
1147
1243
  * UpdateProductData
@@ -1181,6 +1277,7 @@ export type VendorBrandingData = {
1181
1277
  logo_url: string | null;
1182
1278
  brand_color_primary: string | null;
1183
1279
  brand_color_accent: string | null;
1280
+ default_branch: BranchReferenceData | null;
1184
1281
  };
1185
1282
  /**
1186
1283
  * VerifyCampaignVoucherData
@@ -1189,6 +1286,13 @@ export type VerifyCampaignVoucherData = {
1189
1286
  branch?: string | null;
1190
1287
  idempotency_key?: string | null;
1191
1288
  };
1289
+ /**
1290
+ * VerifyRedemptionData
1291
+ */
1292
+ export type VerifyRedemptionData = {
1293
+ branch?: string | null;
1294
+ idempotency_key?: string | null;
1295
+ };
1192
1296
  /**
1193
1297
  * VolumeBucketData
1194
1298
  */
@@ -1229,7 +1333,7 @@ export type VoucherGiftProductData = {
1229
1333
  */
1230
1334
  id: number | null;
1231
1335
  /**
1232
- * The product name as it was when the bon was issued.
1336
+ * The product name as it was when the voucher was issued.
1233
1337
  */
1234
1338
  name: string;
1235
1339
  /**
@@ -1237,7 +1341,7 @@ export type VoucherGiftProductData = {
1237
1341
  */
1238
1342
  quantity: number;
1239
1343
  /**
1240
- * The item number when the bon was issued, or null when it had none.
1344
+ * The item number when the voucher was issued, or null when it had none.
1241
1345
  */
1242
1346
  product_reference: string | null;
1243
1347
  };
@@ -1297,6 +1401,10 @@ export type WinBackCampaignConfigData = {
1297
1401
  * The branches this campaign runs in. Absent or empty means all of them.
1298
1402
  */
1299
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>;
1300
1408
  /**
1301
1409
  * Which shape this is.
1302
1410
  */
@@ -1345,7 +1453,7 @@ export type LookupCustomerResponses = {
1345
1453
  };
1346
1454
  export type LookupCustomerResponse = LookupCustomerResponses[keyof LookupCustomerResponses];
1347
1455
  export type RegisterCustomerData = {
1348
- body: CreateCustomerData;
1456
+ body?: CreateCustomerData;
1349
1457
  path?: never;
1350
1458
  query?: never;
1351
1459
  url: '/customers';
@@ -1392,7 +1500,7 @@ export type RegisterCustomerResponses = {
1392
1500
  };
1393
1501
  export type RegisterCustomerResponse = RegisterCustomerResponses[keyof RegisterCustomerResponses];
1394
1502
  export type UpdateCustomerByExternalIdData = {
1395
- body: UpdateCustomerData;
1503
+ body?: UpdateCustomerData;
1396
1504
  path: {
1397
1505
  externalId: string | null;
1398
1506
  };
@@ -1445,7 +1553,7 @@ export type UpdateCustomerByExternalIdResponses = {
1445
1553
  };
1446
1554
  export type UpdateCustomerByExternalIdResponse = UpdateCustomerByExternalIdResponses[keyof UpdateCustomerByExternalIdResponses];
1447
1555
  export type ReplaceCustomerByExternalIdData = {
1448
- body: UpdateCustomerData;
1556
+ body?: UpdateCustomerData;
1449
1557
  path: {
1450
1558
  externalId: string | null;
1451
1559
  };
@@ -1548,8 +1656,61 @@ export type LinkCustomerExternalIdResponses = {
1548
1656
  };
1549
1657
  };
1550
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];
1551
1712
  export type SendLoyaltyCardByExternalIdData = {
1552
- body: SendLoyaltyCardRequestData;
1713
+ body?: SendLoyaltyCardRequestData;
1553
1714
  path: {
1554
1715
  externalId: string | null;
1555
1716
  };
@@ -1598,7 +1759,7 @@ export type SendLoyaltyCardByExternalIdResponses = {
1598
1759
  };
1599
1760
  export type SendLoyaltyCardByExternalIdResponse = SendLoyaltyCardByExternalIdResponses[keyof SendLoyaltyCardByExternalIdResponses];
1600
1761
  export type SendLoyaltyCardData = {
1601
- body: SendLoyaltyCardRequestData;
1762
+ body?: SendLoyaltyCardRequestData;
1602
1763
  path: {
1603
1764
  customer: string | null;
1604
1765
  };
@@ -1683,6 +1844,55 @@ export type ShowCustomerResponses = {
1683
1844
  };
1684
1845
  };
1685
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];
1686
1896
  export type SubmitTransactionData = {
1687
1897
  body: CreateTransactionData;
1688
1898
  path?: never;
@@ -2132,8 +2342,8 @@ export type LookupRedemptionResponses = {
2132
2342
  };
2133
2343
  };
2134
2344
  export type LookupRedemptionResponse = LookupRedemptionResponses[keyof LookupRedemptionResponses];
2135
- export type VerifyRedemptionData = {
2136
- body?: never;
2345
+ export type VerifyRedemptionData2 = {
2346
+ body?: VerifyRedemptionData;
2137
2347
  path: {
2138
2348
  code: string | null;
2139
2349
  };
@@ -2141,6 +2351,10 @@ export type VerifyRedemptionData = {
2141
2351
  url: '/redemptions/{code}/verify';
2142
2352
  };
2143
2353
  export type VerifyRedemptionErrors = {
2354
+ /**
2355
+ * The request is missing something the API needs before it can act.
2356
+ */
2357
+ 400: ErrorResponse;
2144
2358
  /**
2145
2359
  * The credential is missing, malformed, or not accepted.
2146
2360
  */
@@ -2440,7 +2654,7 @@ export type ShowProductResponses = {
2440
2654
  };
2441
2655
  export type ShowProductResponse = ShowProductResponses[keyof ShowProductResponses];
2442
2656
  export type UpdateProductData2 = {
2443
- body: UpdateProductData;
2657
+ body?: UpdateProductData;
2444
2658
  path: {
2445
2659
  externalId: string | null;
2446
2660
  };
@@ -2653,7 +2867,7 @@ export type LookupVoucherResponses = {
2653
2867
  };
2654
2868
  export type LookupVoucherResponse = LookupVoucherResponses[keyof LookupVoucherResponses];
2655
2869
  export type VerifyVoucherData = {
2656
- body: VerifyCampaignVoucherData;
2870
+ body?: VerifyCampaignVoucherData;
2657
2871
  path: {
2658
2872
  code: string | null;
2659
2873
  };
@@ -2775,6 +2989,37 @@ export type ShowMeResponses = {
2775
2989
  };
2776
2990
  };
2777
2991
  export type ShowMeResponse = ShowMeResponses[keyof ShowMeResponses];
2992
+ export type ListBranchesData = {
2993
+ body?: never;
2994
+ path?: never;
2995
+ query?: never;
2996
+ url: '/branches';
2997
+ };
2998
+ export type ListBranchesErrors = {
2999
+ /**
3000
+ * The credential is missing, malformed, or not accepted.
3001
+ */
3002
+ 401: ErrorResponse;
3003
+ /**
3004
+ * The credential is valid, but this vendor may not do this right now.
3005
+ */
3006
+ 403: ErrorResponse;
3007
+ /**
3008
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
3009
+ */
3010
+ 429: ErrorResponse;
3011
+ /**
3012
+ * Something went wrong on our side. Quote the request_id when you report it.
3013
+ */
3014
+ 500: ErrorResponse;
3015
+ };
3016
+ export type ListBranchesError = ListBranchesErrors[keyof ListBranchesErrors];
3017
+ export type ListBranchesResponses = {
3018
+ 200: {
3019
+ data: Array<BranchReferenceData>;
3020
+ };
3021
+ };
3022
+ export type ListBranchesResponse = ListBranchesResponses[keyof ListBranchesResponses];
2778
3023
  export type CheckHealthData = {
2779
3024
  body?: never;
2780
3025
  path?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puntjes/sdk",
3
- "version": "2.1.0",
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.87.0",
44
+ "oxlint": "1.88.0",
44
45
  "typescript": "5.9.3",
45
- "vitest": "5.0.3"
46
+ "vitest": "5.0.5"
46
47
  }
47
48
  }