@puntjes/sdk 2.4.1 → 2.6.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.
@@ -28,6 +28,7 @@ export declare const ErrorCode: {
28
28
  readonly InvalidClient: "INVALID_CLIENT";
29
29
  readonly InvalidClientSecret: "INVALID_CLIENT_SECRET";
30
30
  readonly InvalidJson: "INVALID_JSON";
31
+ readonly LoyaltyCardLimitReached: "LOYALTY_CARD_LIMIT_REACHED";
31
32
  readonly LoyaltyCardNotFound: "LOYALTY_CARD_NOT_FOUND";
32
33
  readonly MarketingConsentUnderAge: "MARKETING_CONSENT_UNDER_AGE";
33
34
  readonly MethodNotAllowed: "METHOD_NOT_ALLOWED";
@@ -29,6 +29,7 @@ export const ErrorCode = {
29
29
  InvalidClient: 'INVALID_CLIENT',
30
30
  InvalidClientSecret: 'INVALID_CLIENT_SECRET',
31
31
  InvalidJson: 'INVALID_JSON',
32
+ LoyaltyCardLimitReached: 'LOYALTY_CARD_LIMIT_REACHED',
32
33
  LoyaltyCardNotFound: 'LOYALTY_CARD_NOT_FOUND',
33
34
  MarketingConsentUnderAge: 'MARKETING_CONSENT_UNDER_AGE',
34
35
  MethodNotAllowed: 'METHOD_NOT_ALLOWED',
@@ -90,6 +91,7 @@ export const errorCodeStatus = {
90
91
  INVALID_CLIENT: 401,
91
92
  INVALID_CLIENT_SECRET: 401,
92
93
  INVALID_JSON: 400,
94
+ LOYALTY_CARD_LIMIT_REACHED: 422,
93
95
  LOYALTY_CARD_NOT_FOUND: 422,
94
96
  MARKETING_CONSENT_UNDER_AGE: 422,
95
97
  METHOD_NOT_ALLOWED: 405,
@@ -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, ChangeCustomerExternalIdData, ChangeCustomerExternalIdError, ChangeCustomerExternalIdErrors, ChangeCustomerExternalIdResponse, ChangeCustomerExternalIdResponses, ChangeExternalIdData, CheckHealthData, CheckHealthError, CheckHealthErrors, CheckHealthResponse, CheckHealthResponses, ClientOptions, ClientSecretData, CommerceStatisticsData, CreateCustomerData, CreateIdentifierData, CreatePartnerApiClientData, CreatePartnerApiClientData2, CreatePartnerApiClientError, CreatePartnerApiClientErrors, CreatePartnerApiClientResponse, CreatePartnerApiClientResponses, CreateProductData, CreateProductData2, CreateProductError, CreateProductErrors, CreateProductResponse, CreateProductResponses, CreateRedemptionData, CreateRewardFromProductData, CreateRewardFromProductData2, CreateRewardFromProductError, CreateRewardFromProductErrors, CreateRewardFromProductResponse, CreateRewardFromProductResponses, CreateTransactionData, CreateTransactionItemData, CustomerData, CustomerDetailData, CustomerGroupReferenceData, CustomerIdentifierData, CustomerLookupData, CustomerStatusData, CustomerVoucherData, DateRangeRecurrenceData, DaysOfWeekRecurrenceData, DeleteClientData, DeleteClientError, DeleteClientErrors, DeleteClientResponse, DeleteClientResponses, DeleteProductData, DeleteProductError, DeleteProductErrors, DeleteProductResponse, DeleteProductResponses, DiscountGiftData, DiscountRedemptionData, DownloadWalletPassData, DownloadWalletPassError, DownloadWalletPassErrors, DownloadWalletPassResponse, DownloadWalletPassResponses, EarnResultData, ErrorResponse, FixedDiscountData, FreeProductGiftData, FreeProductRedemptionData, GiftProductData, GoogleWalletPassData, ItemizedStatisticsData, LedgerEntryData, LinkCustomerExternalIdData, LinkCustomerExternalIdError, LinkCustomerExternalIdErrors, LinkCustomerExternalIdResponse, LinkCustomerExternalIdResponses, LinkExternalIdData, ListBranchesData, ListBranchesError, ListBranchesErrors, ListBranchesResponse, ListBranchesResponses, ListCampaignsData, ListCampaignsError, ListCampaignsErrors, ListCampaignsResponse, ListCampaignsResponses, ListCustomerRedemptionsData, ListCustomerRedemptionsError, ListCustomerRedemptionsErrors, ListCustomerRedemptionsResponse, ListCustomerRedemptionsResponses, ListCustomerTransactionsData, ListCustomerTransactionsError, ListCustomerTransactionsErrors, ListCustomerTransactionsResponse, ListCustomerTransactionsResponses, ListCustomerVouchersData, ListCustomerVouchersError, ListCustomerVouchersErrors, ListCustomerVouchersResponse, ListCustomerVouchersResponses, ListLedgerEntriesData, ListLedgerEntriesError, ListLedgerEntriesErrors, ListLedgerEntriesResponse, ListLedgerEntriesResponses, ListProductsData, ListProductsError, ListProductsErrors, ListProductsResponse, ListProductsResponses, ListRewardsData, ListRewardsError, ListRewardsErrors, ListRewardsResponse, ListRewardsResponses, LookupCustomerData, LookupCustomerError, LookupCustomerErrors, LookupCustomerResponse, LookupCustomerResponses, LookupRedemptionData, LookupRedemptionError, LookupRedemptionErrors, LookupRedemptionResponse, LookupRedemptionResponses, LookupVoucherData, LookupVoucherError, LookupVoucherErrors, LookupVoucherResponse, LookupVoucherResponses, LoyaltyStatisticsData, MergeCustomersApiData, MergeCustomersData, MergeCustomersError, MergeCustomersErrors, MergeCustomersResponse, MergeCustomersResponses, MomentCampaignConfigData, NewClientSecretData, NthPurchaseCampaignConfigData, PaginationLinks, PaginationMeta, PartnerApiClientData, PercentageDiscountData, PointsGiftData, ProductData, RedeemRewardData, RedeemRewardError, RedeemRewardErrors, RedeemRewardResponse, RedeemRewardResponses, RedemptionCreatedData, RedemptionCustomerData, RedemptionLookupData, RedemptionRewardData, RedemptionVerificationData, RegisterCustomerData, RegisterCustomerError, RegisterCustomerErrors, RegisterCustomerResponse, RegisterCustomerResponses, ReplaceCustomerByExternalIdData, ReplaceCustomerByExternalIdError, ReplaceCustomerByExternalIdErrors, ReplaceCustomerByExternalIdResponse, ReplaceCustomerByExternalIdResponses, RewardCatalogItemData, RewardData, RewardStatusData, RotateClientSecretData, RotateClientSecretError, RotateClientSecretErrors, RotateClientSecretResponse, RotateClientSecretResponses, SendLoyaltyCardByExternalIdData, SendLoyaltyCardByExternalIdError, SendLoyaltyCardByExternalIdErrors, SendLoyaltyCardByExternalIdResponse, SendLoyaltyCardByExternalIdResponses, SendLoyaltyCardData, SendLoyaltyCardError, SendLoyaltyCardErrors, SendLoyaltyCardRequestData, SendLoyaltyCardResponse, SendLoyaltyCardResponses, SendLoyaltyCardResultData, ShowCustomerData, ShowCustomerError, ShowCustomerErrors, ShowCustomerResponse, ShowCustomerResponses, ShowMeData, ShowMeError, ShowMeErrors, ShowMeResponse, ShowMeResponses, ShowProductData, ShowProductError, ShowProductErrors, ShowProductResponse, ShowProductResponses, ShowStatisticsData, ShowStatisticsError, ShowStatisticsErrors, ShowStatisticsResponse, ShowStatisticsResponses, ShowWalletData, ShowWalletError, ShowWalletErrors, ShowWalletResponse, ShowWalletResponses, SpecificDatesRecurrenceData, StatisticsApiData, StatisticsPeriodData, SubmitTransactionData, SubmitTransactionError, SubmitTransactionErrors, SubmitTransactionResponse, SubmitTransactionResponses, TopProductData, TransactionCampaignConfigData, TransactionData, TransactionItemData, UpdateCustomerByExternalIdData, UpdateCustomerByExternalIdError, UpdateCustomerByExternalIdErrors, UpdateCustomerByExternalIdResponse, UpdateCustomerByExternalIdResponses, UpdateCustomerData, UpdateProductData, UpdateProductData2, UpdateProductError, UpdateProductErrors, UpdateProductResponse, UpdateProductResponses, UpsertProductData, UpsertProductData2, UpsertProductError, UpsertProductErrors, UpsertProductResponse, UpsertProductResponses, VendorBrandingData, VerifyCampaignVoucherData, VerifyRedemptionData, VerifyRedemptionData2, VerifyRedemptionError, VerifyRedemptionErrors, VerifyRedemptionResponse, VerifyRedemptionResponses, VerifyVoucherData, VerifyVoucherError, VerifyVoucherErrors, VerifyVoucherResponse, VerifyVoucherResponses, VolumeBucketData, VoucherFixedDiscountData, VoucherGiftProductData, VoucherPercentageDiscountData, WalletData, WinBackCampaignConfigData } from './types.gen.js';
2
+ export type { AddLoyaltyCardByExternalIdData, AddLoyaltyCardByExternalIdError, AddLoyaltyCardByExternalIdErrors, AddLoyaltyCardByExternalIdResponse, AddLoyaltyCardByExternalIdResponses, AddLoyaltyCardData, AddLoyaltyCardData2, AddLoyaltyCardError, AddLoyaltyCardErrors, AddLoyaltyCardResponse, AddLoyaltyCardResponses, AdjustWalletApiData, AdjustWalletData, AdjustWalletError, AdjustWalletErrors, AdjustWalletResponse, AdjustWalletResponses, AnniversaryCampaignConfigData, BranchReferenceData, BulkUpsertProductsData, BulkUpsertProductsError, BulkUpsertProductsErrors, BulkUpsertProductsResponse, BulkUpsertProductsResponses, BulkUpsertResponseData, BulkUpsertResultData, BulkUpsertSummaryData, CampaignListData, CampaignProductRuleData, CampaignStatusData, CampaignVoucherLookupData, CampaignVoucherVerificationData, CategoryRevenueData, ChangeCustomerExternalIdData, ChangeCustomerExternalIdError, ChangeCustomerExternalIdErrors, ChangeCustomerExternalIdResponse, ChangeCustomerExternalIdResponses, ChangeExternalIdData, CheckHealthData, CheckHealthError, CheckHealthErrors, CheckHealthResponse, CheckHealthResponses, ClientOptions, ClientSecretData, CommerceStatisticsData, CreateCustomerData, CreateIdentifierData, CreatePartnerApiClientData, CreatePartnerApiClientData2, CreatePartnerApiClientError, CreatePartnerApiClientErrors, CreatePartnerApiClientResponse, CreatePartnerApiClientResponses, CreateProductData, CreateProductData2, CreateProductError, CreateProductErrors, CreateProductResponse, CreateProductResponses, CreateRedemptionData, CreateRewardFromProductData, CreateRewardFromProductData2, CreateRewardFromProductError, CreateRewardFromProductErrors, CreateRewardFromProductResponse, CreateRewardFromProductResponses, CreateTransactionData, CreateTransactionItemData, CustomerData, CustomerDetailData, CustomerGroupReferenceData, CustomerIdentifierData, CustomerLookupData, CustomerStatusData, CustomerVoucherData, DateRangeRecurrenceData, DaysOfWeekRecurrenceData, DeleteClientData, DeleteClientError, DeleteClientErrors, DeleteClientResponse, DeleteClientResponses, DeleteProductData, DeleteProductError, DeleteProductErrors, DeleteProductResponse, DeleteProductResponses, DiscountGiftData, DiscountRedemptionData, DownloadWalletPassData, DownloadWalletPassError, DownloadWalletPassErrors, DownloadWalletPassResponse, DownloadWalletPassResponses, EarnResultData, ErrorResponse, FixedDiscountData, FreeProductGiftData, FreeProductRedemptionData, GiftProductData, GoogleWalletPassData, ItemizedStatisticsData, LedgerEntryData, LinkCustomerExternalIdData, LinkCustomerExternalIdError, LinkCustomerExternalIdErrors, LinkCustomerExternalIdResponse, LinkCustomerExternalIdResponses, LinkExternalIdData, ListBranchesData, ListBranchesError, ListBranchesErrors, ListBranchesResponse, ListBranchesResponses, ListCampaignsData, ListCampaignsError, ListCampaignsErrors, ListCampaignsResponse, ListCampaignsResponses, ListCustomerRedemptionsData, ListCustomerRedemptionsError, ListCustomerRedemptionsErrors, ListCustomerRedemptionsResponse, ListCustomerRedemptionsResponses, ListCustomerTransactionsData, ListCustomerTransactionsError, ListCustomerTransactionsErrors, ListCustomerTransactionsResponse, ListCustomerTransactionsResponses, ListCustomerVouchersData, ListCustomerVouchersError, ListCustomerVouchersErrors, ListCustomerVouchersResponse, ListCustomerVouchersResponses, ListLedgerEntriesData, ListLedgerEntriesError, ListLedgerEntriesErrors, ListLedgerEntriesResponse, ListLedgerEntriesResponses, ListProductsData, ListProductsError, ListProductsErrors, ListProductsResponse, ListProductsResponses, ListRewardsData, ListRewardsError, ListRewardsErrors, ListRewardsResponse, ListRewardsResponses, LookupCustomerData, LookupCustomerError, LookupCustomerErrors, LookupCustomerResponse, LookupCustomerResponses, LookupRedemptionData, LookupRedemptionError, LookupRedemptionErrors, LookupRedemptionResponse, LookupRedemptionResponses, LookupVoucherData, LookupVoucherError, LookupVoucherErrors, LookupVoucherResponse, LookupVoucherResponses, LoyaltyStatisticsData, MergeCustomersApiData, MergeCustomersData, MergeCustomersError, MergeCustomersErrors, MergeCustomersResponse, MergeCustomersResponses, MomentCampaignConfigData, NewClientSecretData, NthPurchaseCampaignConfigData, PaginationLinks, PaginationMeta, PartnerApiClientData, PercentageDiscountData, PointsGiftData, ProductData, RedeemRewardData, RedeemRewardError, RedeemRewardErrors, RedeemRewardResponse, RedeemRewardResponses, RedemptionCreatedData, RedemptionCustomerData, RedemptionLookupData, RedemptionRewardData, RedemptionVerificationData, RegisterCustomerData, RegisterCustomerError, RegisterCustomerErrors, RegisterCustomerResponse, RegisterCustomerResponses, ReplaceCustomerByExternalIdData, ReplaceCustomerByExternalIdError, ReplaceCustomerByExternalIdErrors, ReplaceCustomerByExternalIdResponse, ReplaceCustomerByExternalIdResponses, RewardCatalogItemData, RewardData, RewardStatusData, RotateClientSecretData, RotateClientSecretError, RotateClientSecretErrors, RotateClientSecretResponse, RotateClientSecretResponses, SendLoyaltyCardByExternalIdData, SendLoyaltyCardByExternalIdError, SendLoyaltyCardByExternalIdErrors, SendLoyaltyCardByExternalIdResponse, SendLoyaltyCardByExternalIdResponses, SendLoyaltyCardData, SendLoyaltyCardError, SendLoyaltyCardErrors, SendLoyaltyCardRequestData, SendLoyaltyCardResponse, SendLoyaltyCardResponses, SendLoyaltyCardResultData, ShowCustomerData, ShowCustomerError, ShowCustomerErrors, ShowCustomerResponse, ShowCustomerResponses, ShowMeData, ShowMeError, ShowMeErrors, ShowMeResponse, ShowMeResponses, ShowProductData, ShowProductError, ShowProductErrors, ShowProductResponse, ShowProductResponses, ShowStatisticsData, ShowStatisticsError, ShowStatisticsErrors, ShowStatisticsResponse, ShowStatisticsResponses, ShowWalletData, ShowWalletError, ShowWalletErrors, ShowWalletResponse, ShowWalletResponses, SpecificDatesRecurrenceData, StatisticsApiData, StatisticsPeriodData, SubmitTransactionData, SubmitTransactionError, SubmitTransactionErrors, SubmitTransactionResponse, SubmitTransactionResponses, TopProductData, TransactionCampaignConfigData, TransactionData, TransactionItemData, UpdateCustomerByExternalIdData, UpdateCustomerByExternalIdError, UpdateCustomerByExternalIdErrors, UpdateCustomerByExternalIdResponse, UpdateCustomerByExternalIdResponses, UpdateCustomerData, UpdateProductData, UpdateProductData2, UpdateProductError, UpdateProductErrors, UpdateProductResponse, UpdateProductResponses, UpsertProductData, UpsertProductData2, UpsertProductError, UpsertProductErrors, UpsertProductResponse, UpsertProductResponses, VendorBrandingData, VerifyCampaignVoucherData, VerifyRedemptionData, VerifyRedemptionData2, VerifyRedemptionError, VerifyRedemptionErrors, VerifyRedemptionResponse, VerifyRedemptionResponses, VerifyVoucherData, VerifyVoucherError, VerifyVoucherErrors, VerifyVoucherResponse, VerifyVoucherResponses, VolumeBucketData, VoucherFixedDiscountData, VoucherGiftProductData, VoucherPercentageDiscountData, WalletData, WinBackCampaignConfigData } from './types.gen.js';
@@ -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, ChangeCustomerExternalIdData, ChangeCustomerExternalIdErrors, ChangeCustomerExternalIdResponses, CheckHealthData, CheckHealthErrors, CheckHealthResponses, CreatePartnerApiClientData2, CreatePartnerApiClientErrors, CreatePartnerApiClientResponses, CreateProductData2, CreateProductErrors, CreateProductResponses, CreateRewardFromProductData2, CreateRewardFromProductErrors, CreateRewardFromProductResponses, DeleteClientData, DeleteClientErrors, DeleteClientResponses, DeleteProductData, DeleteProductErrors, DeleteProductResponses, DownloadWalletPassData, DownloadWalletPassErrors, DownloadWalletPassResponses, LinkCustomerExternalIdData, LinkCustomerExternalIdErrors, LinkCustomerExternalIdResponses, ListBranchesData, ListBranchesErrors, ListBranchesResponses, ListCampaignsData, ListCampaignsErrors, ListCampaignsResponses, ListCustomerRedemptionsData, ListCustomerRedemptionsErrors, ListCustomerRedemptionsResponses, ListCustomerTransactionsData, ListCustomerTransactionsErrors, ListCustomerTransactionsResponses, ListCustomerVouchersData, ListCustomerVouchersErrors, ListCustomerVouchersResponses, ListLedgerEntriesData, ListLedgerEntriesErrors, ListLedgerEntriesResponses, ListProductsData, ListProductsErrors, ListProductsResponses, ListRewardsData, ListRewardsErrors, ListRewardsResponses, LookupCustomerData, LookupCustomerErrors, LookupCustomerResponses, LookupRedemptionData, LookupRedemptionErrors, LookupRedemptionResponses, LookupVoucherData, LookupVoucherErrors, LookupVoucherResponses, MergeCustomersData, MergeCustomersErrors, MergeCustomersResponses, RedeemRewardData, RedeemRewardErrors, RedeemRewardResponses, RegisterCustomerData, RegisterCustomerErrors, RegisterCustomerResponses, ReplaceCustomerByExternalIdData, ReplaceCustomerByExternalIdErrors, ReplaceCustomerByExternalIdResponses, RotateClientSecretData, RotateClientSecretErrors, RotateClientSecretResponses, SendLoyaltyCardByExternalIdData, SendLoyaltyCardByExternalIdErrors, SendLoyaltyCardByExternalIdResponses, SendLoyaltyCardData, SendLoyaltyCardErrors, SendLoyaltyCardResponses, ShowCustomerData, ShowCustomerErrors, ShowCustomerResponses, ShowMeData, ShowMeErrors, ShowMeResponses, ShowProductData, ShowProductErrors, ShowProductResponses, ShowStatisticsData, ShowStatisticsErrors, ShowStatisticsResponses, ShowWalletData, ShowWalletErrors, ShowWalletResponses, SubmitTransactionData, SubmitTransactionErrors, SubmitTransactionResponses, UpdateCustomerByExternalIdData, UpdateCustomerByExternalIdErrors, UpdateCustomerByExternalIdResponses, UpdateProductData2, UpdateProductErrors, UpdateProductResponses, UpsertProductData2, UpsertProductErrors, UpsertProductResponses, VerifyRedemptionData2, VerifyRedemptionErrors, VerifyRedemptionResponses, VerifyVoucherData, VerifyVoucherErrors, VerifyVoucherResponses } from './types.gen.js';
2
+ import type { AddLoyaltyCardByExternalIdData, AddLoyaltyCardByExternalIdErrors, AddLoyaltyCardByExternalIdResponses, AddLoyaltyCardData2, AddLoyaltyCardErrors, AddLoyaltyCardResponses, AdjustWalletData, AdjustWalletErrors, AdjustWalletResponses, BulkUpsertProductsData, BulkUpsertProductsErrors, BulkUpsertProductsResponses, ChangeCustomerExternalIdData, ChangeCustomerExternalIdErrors, ChangeCustomerExternalIdResponses, CheckHealthData, CheckHealthErrors, CheckHealthResponses, CreatePartnerApiClientData2, CreatePartnerApiClientErrors, CreatePartnerApiClientResponses, CreateProductData2, CreateProductErrors, CreateProductResponses, CreateRewardFromProductData2, CreateRewardFromProductErrors, CreateRewardFromProductResponses, DeleteClientData, DeleteClientErrors, DeleteClientResponses, DeleteProductData, DeleteProductErrors, DeleteProductResponses, DownloadWalletPassData, DownloadWalletPassErrors, DownloadWalletPassResponses, LinkCustomerExternalIdData, LinkCustomerExternalIdErrors, LinkCustomerExternalIdResponses, ListBranchesData, ListBranchesErrors, ListBranchesResponses, ListCampaignsData, ListCampaignsErrors, ListCampaignsResponses, ListCustomerRedemptionsData, ListCustomerRedemptionsErrors, ListCustomerRedemptionsResponses, ListCustomerTransactionsData, ListCustomerTransactionsErrors, ListCustomerTransactionsResponses, ListCustomerVouchersData, ListCustomerVouchersErrors, ListCustomerVouchersResponses, ListLedgerEntriesData, ListLedgerEntriesErrors, ListLedgerEntriesResponses, ListProductsData, ListProductsErrors, ListProductsResponses, ListRewardsData, ListRewardsErrors, ListRewardsResponses, LookupCustomerData, LookupCustomerErrors, LookupCustomerResponses, LookupRedemptionData, LookupRedemptionErrors, LookupRedemptionResponses, LookupVoucherData, LookupVoucherErrors, LookupVoucherResponses, MergeCustomersData, MergeCustomersErrors, MergeCustomersResponses, RedeemRewardData, RedeemRewardErrors, RedeemRewardResponses, RegisterCustomerData, RegisterCustomerErrors, RegisterCustomerResponses, ReplaceCustomerByExternalIdData, ReplaceCustomerByExternalIdErrors, ReplaceCustomerByExternalIdResponses, RotateClientSecretData, RotateClientSecretErrors, RotateClientSecretResponses, SendLoyaltyCardByExternalIdData, SendLoyaltyCardByExternalIdErrors, SendLoyaltyCardByExternalIdResponses, SendLoyaltyCardData, SendLoyaltyCardErrors, SendLoyaltyCardResponses, ShowCustomerData, ShowCustomerErrors, ShowCustomerResponses, ShowMeData, ShowMeErrors, ShowMeResponses, ShowProductData, ShowProductErrors, ShowProductResponses, ShowStatisticsData, ShowStatisticsErrors, ShowStatisticsResponses, ShowWalletData, ShowWalletErrors, ShowWalletResponses, SubmitTransactionData, SubmitTransactionErrors, SubmitTransactionResponses, UpdateCustomerByExternalIdData, UpdateCustomerByExternalIdErrors, UpdateCustomerByExternalIdResponses, UpdateProductData2, UpdateProductErrors, UpdateProductResponses, UpsertProductData2, UpsertProductErrors, UpsertProductResponses, VerifyRedemptionData2, VerifyRedemptionErrors, VerifyRedemptionResponses, VerifyVoucherData, VerifyVoucherErrors, VerifyVoucherResponses } from './types.gen.js';
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
@@ -39,6 +39,8 @@ export declare class PuntjesApi extends HeyApiClient {
39
39
  changeCustomerExternalId<ThrowOnError extends boolean = true>(options: Options<ChangeCustomerExternalIdData, ThrowOnError>): RequestResult<ChangeCustomerExternalIdResponses, ChangeCustomerExternalIdErrors, ThrowOnError>;
40
40
  sendLoyaltyCardByExternalId<ThrowOnError extends boolean = true>(options: Options<SendLoyaltyCardByExternalIdData, ThrowOnError>): RequestResult<SendLoyaltyCardByExternalIdResponses, SendLoyaltyCardByExternalIdErrors, ThrowOnError>;
41
41
  sendLoyaltyCard<ThrowOnError extends boolean = true>(options: Options<SendLoyaltyCardData, ThrowOnError>): RequestResult<SendLoyaltyCardResponses, SendLoyaltyCardErrors, ThrowOnError>;
42
+ addLoyaltyCardByExternalId<ThrowOnError extends boolean = true>(options: Options<AddLoyaltyCardByExternalIdData, ThrowOnError>): RequestResult<AddLoyaltyCardByExternalIdResponses, AddLoyaltyCardByExternalIdErrors, ThrowOnError>;
43
+ addLoyaltyCard<ThrowOnError extends boolean = true>(options: Options<AddLoyaltyCardData2, ThrowOnError>): RequestResult<AddLoyaltyCardResponses, AddLoyaltyCardErrors, ThrowOnError>;
42
44
  showCustomer<ThrowOnError extends boolean = true>(options: Options<ShowCustomerData, ThrowOnError>): RequestResult<ShowCustomerResponses, ShowCustomerErrors, ThrowOnError>;
43
45
  mergeCustomers<ThrowOnError extends boolean = true>(options: Options<MergeCustomersData, ThrowOnError>): RequestResult<MergeCustomersResponses, MergeCustomersErrors, ThrowOnError>;
44
46
  submitTransaction<ThrowOnError extends boolean = true>(options: Options<SubmitTransactionData, ThrowOnError>): RequestResult<SubmitTransactionResponses, SubmitTransactionErrors, ThrowOnError>;
@@ -142,6 +142,36 @@ export class PuntjesApi extends HeyApiClient {
142
142
  }
143
143
  });
144
144
  }
145
+ addLoyaltyCardByExternalId(options) {
146
+ return (options.client ?? this.client).post({
147
+ security: [{
148
+ key: 'oauth2',
149
+ scheme: 'bearer',
150
+ type: 'http'
151
+ }],
152
+ url: '/customers/by-external-id/{externalId}/loyalty-cards',
153
+ ...options,
154
+ headers: {
155
+ 'Content-Type': 'application/json',
156
+ ...options.headers
157
+ }
158
+ });
159
+ }
160
+ addLoyaltyCard(options) {
161
+ return (options.client ?? this.client).post({
162
+ security: [{
163
+ key: 'oauth2',
164
+ scheme: 'bearer',
165
+ type: 'http'
166
+ }],
167
+ url: '/customers/{customer}/loyalty-cards',
168
+ ...options,
169
+ headers: {
170
+ 'Content-Type': 'application/json',
171
+ ...options.headers
172
+ }
173
+ });
174
+ }
145
175
  showCustomer(options) {
146
176
  return (options.client ?? this.client).get({
147
177
  security: [{
@@ -1,6 +1,19 @@
1
1
  export type ClientOptions = {
2
2
  baseUrl: 'https://puntjes.app/api/v1' | (string & {});
3
3
  };
4
+ /**
5
+ * AddLoyaltyCardData
6
+ */
7
+ export type AddLoyaltyCardData = {
8
+ /**
9
+ * The code of a card without a customer on your card list. The setting for new codes does not apply.
10
+ */
11
+ code: string;
12
+ /**
13
+ * The code of the card the customer gives back. Only an active card of this customer is switched off.
14
+ */
15
+ replaces?: string | null;
16
+ };
4
17
  /**
5
18
  * AdjustWalletApiData
6
19
  */
@@ -330,7 +343,7 @@ export type CreateRewardFromProductData = {
330
343
  * CreateTransactionData
331
344
  */
332
345
  export type CreateTransactionData = {
333
- identifier: string;
346
+ identifier?: string | null;
334
347
  idempotency_key: string;
335
348
  total_amount: number;
336
349
  description?: string | null;
@@ -1257,7 +1270,7 @@ export type TransactionCampaignConfigData = {
1257
1270
  */
1258
1271
  export type TransactionData = {
1259
1272
  id: number;
1260
- customer_id: number;
1273
+ customer_id: number | null;
1261
1274
  idempotency_key: string;
1262
1275
  total_amount: number;
1263
1276
  description: string | null;
@@ -1863,6 +1876,112 @@ export type SendLoyaltyCardResponses = {
1863
1876
  };
1864
1877
  };
1865
1878
  export type SendLoyaltyCardResponse = SendLoyaltyCardResponses[keyof SendLoyaltyCardResponses];
1879
+ export type AddLoyaltyCardByExternalIdData = {
1880
+ body: AddLoyaltyCardData;
1881
+ path: {
1882
+ externalId: string | null;
1883
+ };
1884
+ query?: never;
1885
+ url: '/customers/by-external-id/{externalId}/loyalty-cards';
1886
+ };
1887
+ export type AddLoyaltyCardByExternalIdErrors = {
1888
+ /**
1889
+ * The request is missing something the API needs before it can act.
1890
+ */
1891
+ 400: ErrorResponse;
1892
+ /**
1893
+ * The credential is missing, malformed, or not accepted.
1894
+ */
1895
+ 401: ErrorResponse;
1896
+ /**
1897
+ * The credential is valid, but this vendor may not do this right now.
1898
+ */
1899
+ 403: ErrorResponse;
1900
+ /**
1901
+ * The route, or the record it names, does not exist.
1902
+ */
1903
+ 404: ErrorResponse;
1904
+ /**
1905
+ * The request conflicts with something that already exists.
1906
+ */
1907
+ 409: ErrorResponse;
1908
+ /**
1909
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
1910
+ */
1911
+ 415: ErrorResponse;
1912
+ /**
1913
+ * The request was understood, and the API refuses to act on it.
1914
+ */
1915
+ 422: ErrorResponse;
1916
+ /**
1917
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1918
+ */
1919
+ 429: ErrorResponse;
1920
+ /**
1921
+ * Something went wrong on our side. Quote the request_id when you report it.
1922
+ */
1923
+ 500: ErrorResponse;
1924
+ };
1925
+ export type AddLoyaltyCardByExternalIdError = AddLoyaltyCardByExternalIdErrors[keyof AddLoyaltyCardByExternalIdErrors];
1926
+ export type AddLoyaltyCardByExternalIdResponses = {
1927
+ 200: {
1928
+ data: CustomerDetailData;
1929
+ };
1930
+ };
1931
+ export type AddLoyaltyCardByExternalIdResponse = AddLoyaltyCardByExternalIdResponses[keyof AddLoyaltyCardByExternalIdResponses];
1932
+ export type AddLoyaltyCardData2 = {
1933
+ body: AddLoyaltyCardData;
1934
+ path: {
1935
+ customer: string | null;
1936
+ };
1937
+ query?: never;
1938
+ url: '/customers/{customer}/loyalty-cards';
1939
+ };
1940
+ export type AddLoyaltyCardErrors = {
1941
+ /**
1942
+ * The request is missing something the API needs before it can act.
1943
+ */
1944
+ 400: ErrorResponse;
1945
+ /**
1946
+ * The credential is missing, malformed, or not accepted.
1947
+ */
1948
+ 401: ErrorResponse;
1949
+ /**
1950
+ * The credential is valid, but this vendor may not do this right now.
1951
+ */
1952
+ 403: ErrorResponse;
1953
+ /**
1954
+ * The route, or the record it names, does not exist.
1955
+ */
1956
+ 404: ErrorResponse;
1957
+ /**
1958
+ * The request conflicts with something that already exists.
1959
+ */
1960
+ 409: ErrorResponse;
1961
+ /**
1962
+ * The body is in a format the API cannot read. Send it as JSON, or as a form.
1963
+ */
1964
+ 415: ErrorResponse;
1965
+ /**
1966
+ * The request was understood, and the API refuses to act on it.
1967
+ */
1968
+ 422: ErrorResponse;
1969
+ /**
1970
+ * Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
1971
+ */
1972
+ 429: ErrorResponse;
1973
+ /**
1974
+ * Something went wrong on our side. Quote the request_id when you report it.
1975
+ */
1976
+ 500: ErrorResponse;
1977
+ };
1978
+ export type AddLoyaltyCardError = AddLoyaltyCardErrors[keyof AddLoyaltyCardErrors];
1979
+ export type AddLoyaltyCardResponses = {
1980
+ 200: {
1981
+ data: CustomerDetailData;
1982
+ };
1983
+ };
1984
+ export type AddLoyaltyCardResponse = AddLoyaltyCardResponses[keyof AddLoyaltyCardResponses];
1866
1985
  export type ShowCustomerData = {
1867
1986
  body?: never;
1868
1987
  path: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puntjes/sdk",
3
- "version": "2.4.1",
3
+ "version": "2.6.0",
4
4
  "description": "The official TypeScript client for the Puntjes loyalty API.",
5
5
  "license": "MIT",
6
6
  "type": "module",