@puntjes/sdk 2.3.0 → 2.4.1
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.
|
@@ -5,9 +5,13 @@ export declare const ErrorCode: {
|
|
|
5
5
|
readonly BranchNotFound: "BRANCH_NOT_FOUND";
|
|
6
6
|
readonly BranchRequired: "BRANCH_REQUIRED";
|
|
7
7
|
readonly CardSendThrottled: "CARD_SEND_THROTTLED";
|
|
8
|
+
readonly ClientLimitReached: "CLIENT_LIMIT_REACHED";
|
|
9
|
+
readonly ClientNotPartnerMade: "CLIENT_NOT_PARTNER_MADE";
|
|
8
10
|
readonly CodeAlreadyUsed: "CODE_ALREADY_USED";
|
|
9
11
|
readonly CodeCancelled: "CODE_CANCELLED";
|
|
10
12
|
readonly CodeExpired: "CODE_EXPIRED";
|
|
13
|
+
readonly ConnectionExpired: "CONNECTION_EXPIRED";
|
|
14
|
+
readonly ConnectionNotFound: "CONNECTION_NOT_FOUND";
|
|
11
15
|
readonly CustomerAlreadyLinked: "CUSTOMER_ALREADY_LINKED";
|
|
12
16
|
readonly CustomerDeactivated: "CUSTOMER_DEACTIVATED";
|
|
13
17
|
readonly CustomerEmailSuppressed: "CUSTOMER_EMAIL_SUPPRESSED";
|
|
@@ -22,6 +26,7 @@ export declare const ErrorCode: {
|
|
|
22
26
|
readonly InsufficientBalance: "INSUFFICIENT_BALANCE";
|
|
23
27
|
readonly InternalError: "INTERNAL_ERROR";
|
|
24
28
|
readonly InvalidClient: "INVALID_CLIENT";
|
|
29
|
+
readonly InvalidClientSecret: "INVALID_CLIENT_SECRET";
|
|
25
30
|
readonly InvalidJson: "INVALID_JSON";
|
|
26
31
|
readonly LoyaltyCardNotFound: "LOYALTY_CARD_NOT_FOUND";
|
|
27
32
|
readonly MarketingConsentUnderAge: "MARKETING_CONSENT_UNDER_AGE";
|
|
@@ -6,9 +6,13 @@ export const ErrorCode = {
|
|
|
6
6
|
BranchNotFound: 'BRANCH_NOT_FOUND',
|
|
7
7
|
BranchRequired: 'BRANCH_REQUIRED',
|
|
8
8
|
CardSendThrottled: 'CARD_SEND_THROTTLED',
|
|
9
|
+
ClientLimitReached: 'CLIENT_LIMIT_REACHED',
|
|
10
|
+
ClientNotPartnerMade: 'CLIENT_NOT_PARTNER_MADE',
|
|
9
11
|
CodeAlreadyUsed: 'CODE_ALREADY_USED',
|
|
10
12
|
CodeCancelled: 'CODE_CANCELLED',
|
|
11
13
|
CodeExpired: 'CODE_EXPIRED',
|
|
14
|
+
ConnectionExpired: 'CONNECTION_EXPIRED',
|
|
15
|
+
ConnectionNotFound: 'CONNECTION_NOT_FOUND',
|
|
12
16
|
CustomerAlreadyLinked: 'CUSTOMER_ALREADY_LINKED',
|
|
13
17
|
CustomerDeactivated: 'CUSTOMER_DEACTIVATED',
|
|
14
18
|
CustomerEmailSuppressed: 'CUSTOMER_EMAIL_SUPPRESSED',
|
|
@@ -23,6 +27,7 @@ export const ErrorCode = {
|
|
|
23
27
|
InsufficientBalance: 'INSUFFICIENT_BALANCE',
|
|
24
28
|
InternalError: 'INTERNAL_ERROR',
|
|
25
29
|
InvalidClient: 'INVALID_CLIENT',
|
|
30
|
+
InvalidClientSecret: 'INVALID_CLIENT_SECRET',
|
|
26
31
|
InvalidJson: 'INVALID_JSON',
|
|
27
32
|
LoyaltyCardNotFound: 'LOYALTY_CARD_NOT_FOUND',
|
|
28
33
|
MarketingConsentUnderAge: 'MARKETING_CONSENT_UNDER_AGE',
|
|
@@ -62,9 +67,13 @@ export const errorCodeStatus = {
|
|
|
62
67
|
BRANCH_NOT_FOUND: 422,
|
|
63
68
|
BRANCH_REQUIRED: 422,
|
|
64
69
|
CARD_SEND_THROTTLED: 429,
|
|
70
|
+
CLIENT_LIMIT_REACHED: 422,
|
|
71
|
+
CLIENT_NOT_PARTNER_MADE: 403,
|
|
65
72
|
CODE_ALREADY_USED: 422,
|
|
66
73
|
CODE_CANCELLED: 422,
|
|
67
74
|
CODE_EXPIRED: 422,
|
|
75
|
+
CONNECTION_EXPIRED: 422,
|
|
76
|
+
CONNECTION_NOT_FOUND: 404,
|
|
68
77
|
CUSTOMER_ALREADY_LINKED: 409,
|
|
69
78
|
CUSTOMER_DEACTIVATED: 422,
|
|
70
79
|
CUSTOMER_EMAIL_SUPPRESSED: 422,
|
|
@@ -79,6 +88,7 @@ export const errorCodeStatus = {
|
|
|
79
88
|
INSUFFICIENT_BALANCE: 422,
|
|
80
89
|
INTERNAL_ERROR: 500,
|
|
81
90
|
INVALID_CLIENT: 401,
|
|
91
|
+
INVALID_CLIENT_SECRET: 401,
|
|
82
92
|
INVALID_JSON: 400,
|
|
83
93
|
LOYALTY_CARD_NOT_FOUND: 422,
|
|
84
94
|
MARKETING_CONSENT_UNDER_AGE: 422,
|
|
@@ -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, 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';
|
|
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';
|
|
@@ -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, 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';
|
|
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';
|
|
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
|
|
@@ -67,6 +67,9 @@ export declare class PuntjesApi extends HeyApiClient {
|
|
|
67
67
|
showStatistics<ThrowOnError extends boolean = true>(options?: Options<ShowStatisticsData, ThrowOnError>): RequestResult<ShowStatisticsResponses, ShowStatisticsErrors, ThrowOnError>;
|
|
68
68
|
showMe<ThrowOnError extends boolean = true>(options?: Options<ShowMeData, ThrowOnError>): RequestResult<ShowMeResponses, ShowMeErrors, ThrowOnError>;
|
|
69
69
|
listBranches<ThrowOnError extends boolean = true>(options?: Options<ListBranchesData, ThrowOnError>): RequestResult<ListBranchesResponses, ListBranchesErrors, ThrowOnError>;
|
|
70
|
+
createPartnerApiClient<ThrowOnError extends boolean = true>(options: Options<CreatePartnerApiClientData2, ThrowOnError>): RequestResult<CreatePartnerApiClientResponses, CreatePartnerApiClientErrors, ThrowOnError>;
|
|
71
|
+
rotateClientSecret<ThrowOnError extends boolean = true>(options: Options<RotateClientSecretData, ThrowOnError>): RequestResult<RotateClientSecretResponses, RotateClientSecretErrors, ThrowOnError>;
|
|
72
|
+
deleteClient<ThrowOnError extends boolean = true>(options: Options<DeleteClientData, ThrowOnError>): RequestResult<DeleteClientResponses, DeleteClientErrors, ThrowOnError>;
|
|
70
73
|
checkHealth<ThrowOnError extends boolean = true>(options?: Options<CheckHealthData, ThrowOnError>): RequestResult<CheckHealthResponses, CheckHealthErrors, ThrowOnError>;
|
|
71
74
|
}
|
|
72
75
|
export {};
|
|
@@ -28,14 +28,22 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
28
28
|
}
|
|
29
29
|
lookupCustomer(options) {
|
|
30
30
|
return (options?.client ?? this.client).get({
|
|
31
|
-
security: [{
|
|
31
|
+
security: [{
|
|
32
|
+
key: 'oauth2',
|
|
33
|
+
scheme: 'bearer',
|
|
34
|
+
type: 'http'
|
|
35
|
+
}],
|
|
32
36
|
url: '/customers/lookup',
|
|
33
37
|
...options
|
|
34
38
|
});
|
|
35
39
|
}
|
|
36
40
|
registerCustomer(options) {
|
|
37
41
|
return (options?.client ?? this.client).post({
|
|
38
|
-
security: [{
|
|
42
|
+
security: [{
|
|
43
|
+
key: 'oauth2',
|
|
44
|
+
scheme: 'bearer',
|
|
45
|
+
type: 'http'
|
|
46
|
+
}],
|
|
39
47
|
url: '/customers',
|
|
40
48
|
...options,
|
|
41
49
|
headers: {
|
|
@@ -46,7 +54,11 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
46
54
|
}
|
|
47
55
|
updateCustomerByExternalId(options) {
|
|
48
56
|
return (options.client ?? this.client).patch({
|
|
49
|
-
security: [{
|
|
57
|
+
security: [{
|
|
58
|
+
key: 'oauth2',
|
|
59
|
+
scheme: 'bearer',
|
|
60
|
+
type: 'http'
|
|
61
|
+
}],
|
|
50
62
|
url: '/customers/by-external-id/{externalId}',
|
|
51
63
|
...options,
|
|
52
64
|
headers: {
|
|
@@ -57,7 +69,11 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
57
69
|
}
|
|
58
70
|
replaceCustomerByExternalId(options) {
|
|
59
71
|
return (options.client ?? this.client).put({
|
|
60
|
-
security: [{
|
|
72
|
+
security: [{
|
|
73
|
+
key: 'oauth2',
|
|
74
|
+
scheme: 'bearer',
|
|
75
|
+
type: 'http'
|
|
76
|
+
}],
|
|
61
77
|
url: '/customers/by-external-id/{externalId}',
|
|
62
78
|
...options,
|
|
63
79
|
headers: {
|
|
@@ -68,7 +84,11 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
68
84
|
}
|
|
69
85
|
linkCustomerExternalId(options) {
|
|
70
86
|
return (options.client ?? this.client).post({
|
|
71
|
-
security: [{
|
|
87
|
+
security: [{
|
|
88
|
+
key: 'oauth2',
|
|
89
|
+
scheme: 'bearer',
|
|
90
|
+
type: 'http'
|
|
91
|
+
}],
|
|
72
92
|
url: '/customers/link-external-id',
|
|
73
93
|
...options,
|
|
74
94
|
headers: {
|
|
@@ -79,7 +99,11 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
79
99
|
}
|
|
80
100
|
changeCustomerExternalId(options) {
|
|
81
101
|
return (options.client ?? this.client).put({
|
|
82
|
-
security: [{
|
|
102
|
+
security: [{
|
|
103
|
+
key: 'oauth2',
|
|
104
|
+
scheme: 'bearer',
|
|
105
|
+
type: 'http'
|
|
106
|
+
}],
|
|
83
107
|
url: '/customers/{customer}/external-id',
|
|
84
108
|
...options,
|
|
85
109
|
headers: {
|
|
@@ -90,7 +114,11 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
90
114
|
}
|
|
91
115
|
sendLoyaltyCardByExternalId(options) {
|
|
92
116
|
return (options.client ?? this.client).post({
|
|
93
|
-
security: [{
|
|
117
|
+
security: [{
|
|
118
|
+
key: 'oauth2',
|
|
119
|
+
scheme: 'bearer',
|
|
120
|
+
type: 'http'
|
|
121
|
+
}],
|
|
94
122
|
url: '/customers/by-external-id/{externalId}/send-card',
|
|
95
123
|
...options,
|
|
96
124
|
headers: {
|
|
@@ -101,7 +129,11 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
101
129
|
}
|
|
102
130
|
sendLoyaltyCard(options) {
|
|
103
131
|
return (options.client ?? this.client).post({
|
|
104
|
-
security: [{
|
|
132
|
+
security: [{
|
|
133
|
+
key: 'oauth2',
|
|
134
|
+
scheme: 'bearer',
|
|
135
|
+
type: 'http'
|
|
136
|
+
}],
|
|
105
137
|
url: '/customers/{customer}/send-card',
|
|
106
138
|
...options,
|
|
107
139
|
headers: {
|
|
@@ -112,14 +144,22 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
112
144
|
}
|
|
113
145
|
showCustomer(options) {
|
|
114
146
|
return (options.client ?? this.client).get({
|
|
115
|
-
security: [{
|
|
147
|
+
security: [{
|
|
148
|
+
key: 'oauth2',
|
|
149
|
+
scheme: 'bearer',
|
|
150
|
+
type: 'http'
|
|
151
|
+
}],
|
|
116
152
|
url: '/customers/{customer}',
|
|
117
153
|
...options
|
|
118
154
|
});
|
|
119
155
|
}
|
|
120
156
|
mergeCustomers(options) {
|
|
121
157
|
return (options.client ?? this.client).post({
|
|
122
|
-
security: [{
|
|
158
|
+
security: [{
|
|
159
|
+
key: 'oauth2',
|
|
160
|
+
scheme: 'bearer',
|
|
161
|
+
type: 'http'
|
|
162
|
+
}],
|
|
123
163
|
url: '/customers/{customer}/merge',
|
|
124
164
|
...options,
|
|
125
165
|
headers: {
|
|
@@ -130,7 +170,11 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
130
170
|
}
|
|
131
171
|
submitTransaction(options) {
|
|
132
172
|
return (options.client ?? this.client).post({
|
|
133
|
-
security: [{
|
|
173
|
+
security: [{
|
|
174
|
+
key: 'oauth2',
|
|
175
|
+
scheme: 'bearer',
|
|
176
|
+
type: 'http'
|
|
177
|
+
}],
|
|
134
178
|
url: '/transactions',
|
|
135
179
|
...options,
|
|
136
180
|
headers: {
|
|
@@ -141,35 +185,55 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
141
185
|
}
|
|
142
186
|
listCustomerTransactions(options) {
|
|
143
187
|
return (options.client ?? this.client).get({
|
|
144
|
-
security: [{
|
|
188
|
+
security: [{
|
|
189
|
+
key: 'oauth2',
|
|
190
|
+
scheme: 'bearer',
|
|
191
|
+
type: 'http'
|
|
192
|
+
}],
|
|
145
193
|
url: '/customers/{customer}/transactions',
|
|
146
194
|
...options
|
|
147
195
|
});
|
|
148
196
|
}
|
|
149
197
|
showWallet(options) {
|
|
150
198
|
return (options.client ?? this.client).get({
|
|
151
|
-
security: [{
|
|
199
|
+
security: [{
|
|
200
|
+
key: 'oauth2',
|
|
201
|
+
scheme: 'bearer',
|
|
202
|
+
type: 'http'
|
|
203
|
+
}],
|
|
152
204
|
url: '/customers/{customer}/wallet',
|
|
153
205
|
...options
|
|
154
206
|
});
|
|
155
207
|
}
|
|
156
208
|
listLedgerEntries(options) {
|
|
157
209
|
return (options.client ?? this.client).get({
|
|
158
|
-
security: [{
|
|
210
|
+
security: [{
|
|
211
|
+
key: 'oauth2',
|
|
212
|
+
scheme: 'bearer',
|
|
213
|
+
type: 'http'
|
|
214
|
+
}],
|
|
159
215
|
url: '/customers/{customer}/ledger',
|
|
160
216
|
...options
|
|
161
217
|
});
|
|
162
218
|
}
|
|
163
219
|
downloadWalletPass(options) {
|
|
164
220
|
return (options.client ?? this.client).get({
|
|
165
|
-
security: [{
|
|
221
|
+
security: [{
|
|
222
|
+
key: 'oauth2',
|
|
223
|
+
scheme: 'bearer',
|
|
224
|
+
type: 'http'
|
|
225
|
+
}],
|
|
166
226
|
url: '/customers/{customer}/wallet-pass',
|
|
167
227
|
...options
|
|
168
228
|
});
|
|
169
229
|
}
|
|
170
230
|
adjustWallet(options) {
|
|
171
231
|
return (options.client ?? this.client).post({
|
|
172
|
-
security: [{
|
|
232
|
+
security: [{
|
|
233
|
+
key: 'oauth2',
|
|
234
|
+
scheme: 'bearer',
|
|
235
|
+
type: 'http'
|
|
236
|
+
}],
|
|
173
237
|
url: '/customers/{customer}/wallet/adjust',
|
|
174
238
|
...options,
|
|
175
239
|
headers: {
|
|
@@ -180,21 +244,33 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
180
244
|
}
|
|
181
245
|
listRewards(options) {
|
|
182
246
|
return (options?.client ?? this.client).get({
|
|
183
|
-
security: [{
|
|
247
|
+
security: [{
|
|
248
|
+
key: 'oauth2',
|
|
249
|
+
scheme: 'bearer',
|
|
250
|
+
type: 'http'
|
|
251
|
+
}],
|
|
184
252
|
url: '/rewards',
|
|
185
253
|
...options
|
|
186
254
|
});
|
|
187
255
|
}
|
|
188
256
|
listCustomerRedemptions(options) {
|
|
189
257
|
return (options.client ?? this.client).get({
|
|
190
|
-
security: [{
|
|
258
|
+
security: [{
|
|
259
|
+
key: 'oauth2',
|
|
260
|
+
scheme: 'bearer',
|
|
261
|
+
type: 'http'
|
|
262
|
+
}],
|
|
191
263
|
url: '/customers/{customer}/redemptions',
|
|
192
264
|
...options
|
|
193
265
|
});
|
|
194
266
|
}
|
|
195
267
|
redeemReward(options) {
|
|
196
268
|
return (options.client ?? this.client).post({
|
|
197
|
-
security: [{
|
|
269
|
+
security: [{
|
|
270
|
+
key: 'oauth2',
|
|
271
|
+
scheme: 'bearer',
|
|
272
|
+
type: 'http'
|
|
273
|
+
}],
|
|
198
274
|
url: '/redemptions',
|
|
199
275
|
...options,
|
|
200
276
|
headers: {
|
|
@@ -205,14 +281,22 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
205
281
|
}
|
|
206
282
|
lookupRedemption(options) {
|
|
207
283
|
return (options.client ?? this.client).get({
|
|
208
|
-
security: [{
|
|
284
|
+
security: [{
|
|
285
|
+
key: 'oauth2',
|
|
286
|
+
scheme: 'bearer',
|
|
287
|
+
type: 'http'
|
|
288
|
+
}],
|
|
209
289
|
url: '/redemptions/{code}',
|
|
210
290
|
...options
|
|
211
291
|
});
|
|
212
292
|
}
|
|
213
293
|
verifyRedemption(options) {
|
|
214
294
|
return (options.client ?? this.client).post({
|
|
215
|
-
security: [{
|
|
295
|
+
security: [{
|
|
296
|
+
key: 'oauth2',
|
|
297
|
+
scheme: 'bearer',
|
|
298
|
+
type: 'http'
|
|
299
|
+
}],
|
|
216
300
|
url: '/redemptions/{code}/verify',
|
|
217
301
|
...options,
|
|
218
302
|
headers: {
|
|
@@ -223,14 +307,22 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
223
307
|
}
|
|
224
308
|
listProducts(options) {
|
|
225
309
|
return (options?.client ?? this.client).get({
|
|
226
|
-
security: [{
|
|
310
|
+
security: [{
|
|
311
|
+
key: 'oauth2',
|
|
312
|
+
scheme: 'bearer',
|
|
313
|
+
type: 'http'
|
|
314
|
+
}],
|
|
227
315
|
url: '/products',
|
|
228
316
|
...options
|
|
229
317
|
});
|
|
230
318
|
}
|
|
231
319
|
createProduct(options) {
|
|
232
320
|
return (options.client ?? this.client).post({
|
|
233
|
-
security: [{
|
|
321
|
+
security: [{
|
|
322
|
+
key: 'oauth2',
|
|
323
|
+
scheme: 'bearer',
|
|
324
|
+
type: 'http'
|
|
325
|
+
}],
|
|
234
326
|
url: '/products',
|
|
235
327
|
...options,
|
|
236
328
|
headers: {
|
|
@@ -241,7 +333,11 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
241
333
|
}
|
|
242
334
|
bulkUpsertProducts(options) {
|
|
243
335
|
return (options.client ?? this.client).post({
|
|
244
|
-
security: [{
|
|
336
|
+
security: [{
|
|
337
|
+
key: 'oauth2',
|
|
338
|
+
scheme: 'bearer',
|
|
339
|
+
type: 'http'
|
|
340
|
+
}],
|
|
245
341
|
url: '/products/batch',
|
|
246
342
|
...options,
|
|
247
343
|
headers: {
|
|
@@ -252,7 +348,11 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
252
348
|
}
|
|
253
349
|
createRewardFromProduct(options) {
|
|
254
350
|
return (options.client ?? this.client).post({
|
|
255
|
-
security: [{
|
|
351
|
+
security: [{
|
|
352
|
+
key: 'oauth2',
|
|
353
|
+
scheme: 'bearer',
|
|
354
|
+
type: 'http'
|
|
355
|
+
}],
|
|
256
356
|
url: '/products/{externalId}/reward',
|
|
257
357
|
...options,
|
|
258
358
|
headers: {
|
|
@@ -263,21 +363,33 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
263
363
|
}
|
|
264
364
|
deleteProduct(options) {
|
|
265
365
|
return (options.client ?? this.client).delete({
|
|
266
|
-
security: [{
|
|
366
|
+
security: [{
|
|
367
|
+
key: 'oauth2',
|
|
368
|
+
scheme: 'bearer',
|
|
369
|
+
type: 'http'
|
|
370
|
+
}],
|
|
267
371
|
url: '/products/{externalId}',
|
|
268
372
|
...options
|
|
269
373
|
});
|
|
270
374
|
}
|
|
271
375
|
showProduct(options) {
|
|
272
376
|
return (options.client ?? this.client).get({
|
|
273
|
-
security: [{
|
|
377
|
+
security: [{
|
|
378
|
+
key: 'oauth2',
|
|
379
|
+
scheme: 'bearer',
|
|
380
|
+
type: 'http'
|
|
381
|
+
}],
|
|
274
382
|
url: '/products/{externalId}',
|
|
275
383
|
...options
|
|
276
384
|
});
|
|
277
385
|
}
|
|
278
386
|
updateProduct(options) {
|
|
279
387
|
return (options.client ?? this.client).patch({
|
|
280
|
-
security: [{
|
|
388
|
+
security: [{
|
|
389
|
+
key: 'oauth2',
|
|
390
|
+
scheme: 'bearer',
|
|
391
|
+
type: 'http'
|
|
392
|
+
}],
|
|
281
393
|
url: '/products/{externalId}',
|
|
282
394
|
...options,
|
|
283
395
|
headers: {
|
|
@@ -288,7 +400,11 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
288
400
|
}
|
|
289
401
|
upsertProduct(options) {
|
|
290
402
|
return (options.client ?? this.client).put({
|
|
291
|
-
security: [{
|
|
403
|
+
security: [{
|
|
404
|
+
key: 'oauth2',
|
|
405
|
+
scheme: 'bearer',
|
|
406
|
+
type: 'http'
|
|
407
|
+
}],
|
|
292
408
|
url: '/products/{externalId}',
|
|
293
409
|
...options,
|
|
294
410
|
headers: {
|
|
@@ -299,28 +415,44 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
299
415
|
}
|
|
300
416
|
listCampaigns(options) {
|
|
301
417
|
return (options?.client ?? this.client).get({
|
|
302
|
-
security: [{
|
|
418
|
+
security: [{
|
|
419
|
+
key: 'oauth2',
|
|
420
|
+
scheme: 'bearer',
|
|
421
|
+
type: 'http'
|
|
422
|
+
}],
|
|
303
423
|
url: '/campaigns',
|
|
304
424
|
...options
|
|
305
425
|
});
|
|
306
426
|
}
|
|
307
427
|
listCustomerVouchers(options) {
|
|
308
428
|
return (options.client ?? this.client).get({
|
|
309
|
-
security: [{
|
|
429
|
+
security: [{
|
|
430
|
+
key: 'oauth2',
|
|
431
|
+
scheme: 'bearer',
|
|
432
|
+
type: 'http'
|
|
433
|
+
}],
|
|
310
434
|
url: '/customers/{customer}/vouchers',
|
|
311
435
|
...options
|
|
312
436
|
});
|
|
313
437
|
}
|
|
314
438
|
lookupVoucher(options) {
|
|
315
439
|
return (options.client ?? this.client).get({
|
|
316
|
-
security: [{
|
|
440
|
+
security: [{
|
|
441
|
+
key: 'oauth2',
|
|
442
|
+
scheme: 'bearer',
|
|
443
|
+
type: 'http'
|
|
444
|
+
}],
|
|
317
445
|
url: '/vouchers/{code}',
|
|
318
446
|
...options
|
|
319
447
|
});
|
|
320
448
|
}
|
|
321
449
|
verifyVoucher(options) {
|
|
322
450
|
return (options.client ?? this.client).post({
|
|
323
|
-
security: [{
|
|
451
|
+
security: [{
|
|
452
|
+
key: 'oauth2',
|
|
453
|
+
scheme: 'bearer',
|
|
454
|
+
type: 'http'
|
|
455
|
+
}],
|
|
324
456
|
url: '/vouchers/{code}/verify',
|
|
325
457
|
...options,
|
|
326
458
|
headers: {
|
|
@@ -331,25 +463,82 @@ export class PuntjesApi extends HeyApiClient {
|
|
|
331
463
|
}
|
|
332
464
|
showStatistics(options) {
|
|
333
465
|
return (options?.client ?? this.client).get({
|
|
334
|
-
security: [{
|
|
466
|
+
security: [{
|
|
467
|
+
key: 'oauth2',
|
|
468
|
+
scheme: 'bearer',
|
|
469
|
+
type: 'http'
|
|
470
|
+
}],
|
|
335
471
|
url: '/statistics',
|
|
336
472
|
...options
|
|
337
473
|
});
|
|
338
474
|
}
|
|
339
475
|
showMe(options) {
|
|
340
476
|
return (options?.client ?? this.client).get({
|
|
341
|
-
security: [{
|
|
477
|
+
security: [{
|
|
478
|
+
key: 'oauth2',
|
|
479
|
+
scheme: 'bearer',
|
|
480
|
+
type: 'http'
|
|
481
|
+
}],
|
|
342
482
|
url: '/me',
|
|
343
483
|
...options
|
|
344
484
|
});
|
|
345
485
|
}
|
|
346
486
|
listBranches(options) {
|
|
347
487
|
return (options?.client ?? this.client).get({
|
|
348
|
-
security: [{
|
|
488
|
+
security: [{
|
|
489
|
+
key: 'oauth2',
|
|
490
|
+
scheme: 'bearer',
|
|
491
|
+
type: 'http'
|
|
492
|
+
}],
|
|
349
493
|
url: '/branches',
|
|
350
494
|
...options
|
|
351
495
|
});
|
|
352
496
|
}
|
|
497
|
+
createPartnerApiClient(options) {
|
|
498
|
+
return (options.client ?? this.client).post({
|
|
499
|
+
security: [{
|
|
500
|
+
key: 'partnerAuthorizationCode',
|
|
501
|
+
scheme: 'bearer',
|
|
502
|
+
type: 'http'
|
|
503
|
+
}],
|
|
504
|
+
url: '/partner/clients',
|
|
505
|
+
...options,
|
|
506
|
+
headers: {
|
|
507
|
+
'Content-Type': 'application/json',
|
|
508
|
+
...options.headers
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
rotateClientSecret(options) {
|
|
513
|
+
return (options.client ?? this.client).post({
|
|
514
|
+
security: [{
|
|
515
|
+
key: 'oauth2',
|
|
516
|
+
scheme: 'bearer',
|
|
517
|
+
type: 'http'
|
|
518
|
+
}],
|
|
519
|
+
url: '/client/secret',
|
|
520
|
+
...options,
|
|
521
|
+
headers: {
|
|
522
|
+
'Content-Type': 'application/json',
|
|
523
|
+
...options.headers
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
deleteClient(options) {
|
|
528
|
+
return (options.client ?? this.client).delete({
|
|
529
|
+
security: [{
|
|
530
|
+
key: 'oauth2',
|
|
531
|
+
scheme: 'bearer',
|
|
532
|
+
type: 'http'
|
|
533
|
+
}],
|
|
534
|
+
url: '/client',
|
|
535
|
+
...options,
|
|
536
|
+
headers: {
|
|
537
|
+
'Content-Type': 'application/json',
|
|
538
|
+
...options.headers
|
|
539
|
+
}
|
|
540
|
+
});
|
|
541
|
+
}
|
|
353
542
|
checkHealth(options) {
|
|
354
543
|
return (options?.client ?? this.client).get({ url: '/health', ...options });
|
|
355
544
|
}
|
|
@@ -228,6 +228,15 @@ export type CategoryRevenueData = {
|
|
|
228
228
|
export type ChangeExternalIdData = {
|
|
229
229
|
external_id: string;
|
|
230
230
|
};
|
|
231
|
+
/**
|
|
232
|
+
* ClientSecretData
|
|
233
|
+
*/
|
|
234
|
+
export type ClientSecretData = {
|
|
235
|
+
/**
|
|
236
|
+
* The current `client_secret` of this client, or the old one in its 60 minutes.
|
|
237
|
+
*/
|
|
238
|
+
client_secret: string;
|
|
239
|
+
};
|
|
231
240
|
/**
|
|
232
241
|
* CommerceStatisticsData
|
|
233
242
|
*/
|
|
@@ -263,6 +272,19 @@ export type CreateIdentifierData = {
|
|
|
263
272
|
value: string;
|
|
264
273
|
is_primary?: boolean;
|
|
265
274
|
};
|
|
275
|
+
/**
|
|
276
|
+
* CreatePartnerApiClientData
|
|
277
|
+
*/
|
|
278
|
+
export type CreatePartnerApiClientData = {
|
|
279
|
+
/**
|
|
280
|
+
* The `connection` handle the partner got on its redirect URI after the admin allowed.
|
|
281
|
+
*/
|
|
282
|
+
connection: string;
|
|
283
|
+
/**
|
|
284
|
+
* The name of the new client, as the vendor sees it under API clients.
|
|
285
|
+
*/
|
|
286
|
+
label: string;
|
|
287
|
+
};
|
|
266
288
|
/**
|
|
267
289
|
* CreateProductData
|
|
268
290
|
*/
|
|
@@ -820,6 +842,19 @@ export type MomentCampaignConfigData = {
|
|
|
820
842
|
*/
|
|
821
843
|
type: 'moment';
|
|
822
844
|
};
|
|
845
|
+
/**
|
|
846
|
+
* NewClientSecretData
|
|
847
|
+
*/
|
|
848
|
+
export type NewClientSecretData = {
|
|
849
|
+
/**
|
|
850
|
+
* The `client_id` for `POST /oauth/token`. It does not change.
|
|
851
|
+
*/
|
|
852
|
+
client_id: string;
|
|
853
|
+
/**
|
|
854
|
+
* The new `client_secret` for `POST /oauth/token`.
|
|
855
|
+
*/
|
|
856
|
+
client_secret: string;
|
|
857
|
+
};
|
|
823
858
|
/**
|
|
824
859
|
* NthPurchaseCampaignConfigData
|
|
825
860
|
*/
|
|
@@ -873,6 +908,27 @@ export type PaginationMeta = {
|
|
|
873
908
|
per_page: number;
|
|
874
909
|
total: number;
|
|
875
910
|
};
|
|
911
|
+
/**
|
|
912
|
+
* PartnerApiClientData
|
|
913
|
+
*/
|
|
914
|
+
export type PartnerApiClientData = {
|
|
915
|
+
/**
|
|
916
|
+
* The `client_id` for `POST /oauth/token`.
|
|
917
|
+
*/
|
|
918
|
+
client_id: string;
|
|
919
|
+
/**
|
|
920
|
+
* The `client_secret` for `POST /oauth/token`.
|
|
921
|
+
*/
|
|
922
|
+
client_secret: string;
|
|
923
|
+
/**
|
|
924
|
+
* The vendor that allowed the connection.
|
|
925
|
+
*/
|
|
926
|
+
vendor: {
|
|
927
|
+
id: number;
|
|
928
|
+
name: string;
|
|
929
|
+
};
|
|
930
|
+
branch: BranchReferenceData | null;
|
|
931
|
+
};
|
|
876
932
|
/**
|
|
877
933
|
* PercentageDiscountData
|
|
878
934
|
*/
|
|
@@ -3020,6 +3076,137 @@ export type ListBranchesResponses = {
|
|
|
3020
3076
|
};
|
|
3021
3077
|
};
|
|
3022
3078
|
export type ListBranchesResponse = ListBranchesResponses[keyof ListBranchesResponses];
|
|
3079
|
+
export type CreatePartnerApiClientData2 = {
|
|
3080
|
+
body: CreatePartnerApiClientData;
|
|
3081
|
+
path?: never;
|
|
3082
|
+
query?: never;
|
|
3083
|
+
url: '/partner/clients';
|
|
3084
|
+
};
|
|
3085
|
+
export type CreatePartnerApiClientErrors = {
|
|
3086
|
+
/**
|
|
3087
|
+
* The request is missing something the API needs before it can act.
|
|
3088
|
+
*/
|
|
3089
|
+
400: ErrorResponse;
|
|
3090
|
+
/**
|
|
3091
|
+
* The credential is missing, malformed, or not accepted.
|
|
3092
|
+
*/
|
|
3093
|
+
401: ErrorResponse;
|
|
3094
|
+
/**
|
|
3095
|
+
* The credential is valid, but this vendor may not do this right now.
|
|
3096
|
+
*/
|
|
3097
|
+
403: ErrorResponse;
|
|
3098
|
+
/**
|
|
3099
|
+
* The route, or the record it names, does not exist.
|
|
3100
|
+
*/
|
|
3101
|
+
404: ErrorResponse;
|
|
3102
|
+
/**
|
|
3103
|
+
* The body is in a format the API cannot read. Send it as JSON, or as a form.
|
|
3104
|
+
*/
|
|
3105
|
+
415: ErrorResponse;
|
|
3106
|
+
/**
|
|
3107
|
+
* The request was understood, and the API refuses to act on it.
|
|
3108
|
+
*/
|
|
3109
|
+
422: ErrorResponse;
|
|
3110
|
+
/**
|
|
3111
|
+
* Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
|
|
3112
|
+
*/
|
|
3113
|
+
429: ErrorResponse;
|
|
3114
|
+
/**
|
|
3115
|
+
* Something went wrong on our side. Quote the request_id when you report it.
|
|
3116
|
+
*/
|
|
3117
|
+
500: ErrorResponse;
|
|
3118
|
+
};
|
|
3119
|
+
export type CreatePartnerApiClientError = CreatePartnerApiClientErrors[keyof CreatePartnerApiClientErrors];
|
|
3120
|
+
export type CreatePartnerApiClientResponses = {
|
|
3121
|
+
201: {
|
|
3122
|
+
data: PartnerApiClientData;
|
|
3123
|
+
};
|
|
3124
|
+
};
|
|
3125
|
+
export type CreatePartnerApiClientResponse = CreatePartnerApiClientResponses[keyof CreatePartnerApiClientResponses];
|
|
3126
|
+
export type RotateClientSecretData = {
|
|
3127
|
+
body: ClientSecretData;
|
|
3128
|
+
path?: never;
|
|
3129
|
+
query?: never;
|
|
3130
|
+
url: '/client/secret';
|
|
3131
|
+
};
|
|
3132
|
+
export type RotateClientSecretErrors = {
|
|
3133
|
+
/**
|
|
3134
|
+
* The request is missing something the API needs before it can act.
|
|
3135
|
+
*/
|
|
3136
|
+
400: ErrorResponse;
|
|
3137
|
+
/**
|
|
3138
|
+
* The credential is missing, malformed, or not accepted.
|
|
3139
|
+
*/
|
|
3140
|
+
401: ErrorResponse;
|
|
3141
|
+
/**
|
|
3142
|
+
* The credential is valid, but this vendor may not do this right now.
|
|
3143
|
+
*/
|
|
3144
|
+
403: ErrorResponse;
|
|
3145
|
+
/**
|
|
3146
|
+
* The body is in a format the API cannot read. Send it as JSON, or as a form.
|
|
3147
|
+
*/
|
|
3148
|
+
415: ErrorResponse;
|
|
3149
|
+
/**
|
|
3150
|
+
* The request was understood, and the API refuses to act on it.
|
|
3151
|
+
*/
|
|
3152
|
+
422: ErrorResponse;
|
|
3153
|
+
/**
|
|
3154
|
+
* Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
|
|
3155
|
+
*/
|
|
3156
|
+
429: ErrorResponse;
|
|
3157
|
+
/**
|
|
3158
|
+
* Something went wrong on our side. Quote the request_id when you report it.
|
|
3159
|
+
*/
|
|
3160
|
+
500: ErrorResponse;
|
|
3161
|
+
};
|
|
3162
|
+
export type RotateClientSecretError = RotateClientSecretErrors[keyof RotateClientSecretErrors];
|
|
3163
|
+
export type RotateClientSecretResponses = {
|
|
3164
|
+
200: {
|
|
3165
|
+
data: NewClientSecretData;
|
|
3166
|
+
};
|
|
3167
|
+
};
|
|
3168
|
+
export type RotateClientSecretResponse = RotateClientSecretResponses[keyof RotateClientSecretResponses];
|
|
3169
|
+
export type DeleteClientData = {
|
|
3170
|
+
body: ClientSecretData;
|
|
3171
|
+
path?: never;
|
|
3172
|
+
query?: never;
|
|
3173
|
+
url: '/client';
|
|
3174
|
+
};
|
|
3175
|
+
export type DeleteClientErrors = {
|
|
3176
|
+
/**
|
|
3177
|
+
* The request is missing something the API needs before it can act.
|
|
3178
|
+
*/
|
|
3179
|
+
400: ErrorResponse;
|
|
3180
|
+
/**
|
|
3181
|
+
* The credential is missing, malformed, or not accepted.
|
|
3182
|
+
*/
|
|
3183
|
+
401: ErrorResponse;
|
|
3184
|
+
/**
|
|
3185
|
+
* The credential is valid, but this vendor may not do this right now.
|
|
3186
|
+
*/
|
|
3187
|
+
403: ErrorResponse;
|
|
3188
|
+
/**
|
|
3189
|
+
* The body is in a format the API cannot read. Send it as JSON, or as a form.
|
|
3190
|
+
*/
|
|
3191
|
+
415: ErrorResponse;
|
|
3192
|
+
/**
|
|
3193
|
+
* The request was understood, and the API refuses to act on it.
|
|
3194
|
+
*/
|
|
3195
|
+
422: ErrorResponse;
|
|
3196
|
+
/**
|
|
3197
|
+
* Too many requests. `x-error-codes` names the limit; not every one of them clears by waiting.
|
|
3198
|
+
*/
|
|
3199
|
+
429: ErrorResponse;
|
|
3200
|
+
/**
|
|
3201
|
+
* Something went wrong on our side. Quote the request_id when you report it.
|
|
3202
|
+
*/
|
|
3203
|
+
500: ErrorResponse;
|
|
3204
|
+
};
|
|
3205
|
+
export type DeleteClientError = DeleteClientErrors[keyof DeleteClientErrors];
|
|
3206
|
+
export type DeleteClientResponses = {
|
|
3207
|
+
204: void;
|
|
3208
|
+
};
|
|
3209
|
+
export type DeleteClientResponse = DeleteClientResponses[keyof DeleteClientResponses];
|
|
3023
3210
|
export type CheckHealthData = {
|
|
3024
3211
|
body?: never;
|
|
3025
3212
|
path?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puntjes/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "The official TypeScript client for the Puntjes loyalty API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@hey-api/openapi-ts": "0.99.0",
|
|
42
42
|
"@microsoft/api-extractor": "7.59.4",
|
|
43
43
|
"@types/node": "22.20.5",
|
|
44
|
-
"oxlint": "1.
|
|
44
|
+
"oxlint": "1.89.0",
|
|
45
45
|
"typescript": "5.9.3",
|
|
46
46
|
"vitest": "5.0.5"
|
|
47
47
|
}
|