@flexprice/sdk 2.1.35 → 2.1.37
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/docs/sdk/models/add-addon-ref.md +1 -0
- package/docs/sdk/models/add-addon-request.md +1 -0
- package/docs/sdk/models/add-addon-to-subscription-request.md +1 -0
- package/docs/sdk/models/coupon-ref.md +19 -0
- package/docs/sdk/models/create-credit-grant-request.md +1 -0
- package/docs/sdk/models/create-customer-request.md +6 -0
- package/docs/sdk/models/create-scheduled-task-request.md +1 -1
- package/docs/sdk/models/customer-contact-person.md +25 -0
- package/docs/sdk/models/customer-response.md +1 -0
- package/docs/sdk/models/customer.md +1 -0
- package/docs/sdk/models/external-tax-details.md +25 -0
- package/docs/sdk/models/line-item-change.md +1 -0
- package/docs/sdk/models/modify-subscription-line-item.md +1 -0
- package/docs/sdk/models/scheduled-task-entity-type.md +1 -1
- package/docs/sdk/models/tax-applied-response.md +5 -1
- package/docs/sdk/models/tax-exemption-reason-code.md +2 -2
- package/docs/sdk/models/tax-jurisdiction.md +18 -0
- package/docs/sdk/models/tax-provider.md +17 -0
- package/docs/sdk/models/tax-rate-entity-type.md +1 -1
- package/docs/sdk/models/tax-reversal-mode.md +17 -0
- package/docs/sdk/models/tax-reversal.md +16 -0
- package/docs/sdk/models/tax-transaction-type.md +17 -0
- package/docs/sdk/models/top-up-coupon.md +17 -0
- package/docs/sdk/models/top-up-wallet-request.md +1 -0
- package/docs/sdk/models/update-customer-request-request.md +7 -1
- package/docs/sdk/models/update-customer-request.md +4 -1
- package/docs/sdk/models/update-subscription-request.md +1 -1
- package/docs/sdk/models/wallet-transaction-response.md +3 -0
- package/docs/sdk/models/wallet-tx-consumption.md +16 -0
- package/docs/sdk/models/wallet-tx-source-type.md +15 -0
- package/docs/sdk/models/webhook-dto-invoice-line-item.md +1 -0
- package/docs/sdk/models/webhook-dto-invoice.md +1 -0
- package/docs/sdk/models/webhook-dto-tax-applied.md +3 -0
- package/docs/sdk/models/webhook-dto-wallet-transaction.md +3 -0
- package/docs/sdks/customers/README.md +8 -2
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/sdk/models/add-addon-ref.d.ts +3 -0
- package/esm/sdk/models/add-addon-ref.d.ts.map +1 -1
- package/esm/sdk/models/add-addon-ref.js +2 -0
- package/esm/sdk/models/add-addon-ref.js.map +1 -1
- package/esm/sdk/models/add-addon-request.d.ts +6 -0
- package/esm/sdk/models/add-addon-request.d.ts.map +1 -1
- package/esm/sdk/models/add-addon-request.js +2 -0
- package/esm/sdk/models/add-addon-request.js.map +1 -1
- package/esm/sdk/models/add-addon-to-subscription-request.d.ts +6 -0
- package/esm/sdk/models/add-addon-to-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/add-addon-to-subscription-request.js +2 -0
- package/esm/sdk/models/add-addon-to-subscription-request.js.map +1 -1
- package/esm/sdk/models/coupon-ref.d.ts +20 -0
- package/esm/sdk/models/coupon-ref.d.ts.map +1 -0
- package/esm/sdk/models/coupon-ref.js +25 -0
- package/esm/sdk/models/coupon-ref.js.map +1 -0
- package/esm/sdk/models/create-credit-grant-request.d.ts +3 -0
- package/esm/sdk/models/create-credit-grant-request.d.ts.map +1 -1
- package/esm/sdk/models/create-credit-grant-request.js +3 -0
- package/esm/sdk/models/create-credit-grant-request.js.map +1 -1
- package/esm/sdk/models/create-customer-request.d.ts +6 -0
- package/esm/sdk/models/create-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/create-customer-request.js +3 -0
- package/esm/sdk/models/create-customer-request.js.map +1 -1
- package/esm/sdk/models/customer-contact-person.d.ts +33 -0
- package/esm/sdk/models/customer-contact-person.d.ts.map +1 -0
- package/esm/sdk/models/customer-contact-person.js +50 -0
- package/esm/sdk/models/customer-contact-person.js.map +1 -0
- package/esm/sdk/models/customer-response.d.ts +2 -0
- package/esm/sdk/models/customer-response.d.ts.map +1 -1
- package/esm/sdk/models/customer-response.js +3 -0
- package/esm/sdk/models/customer-response.js.map +1 -1
- package/esm/sdk/models/customer.d.ts +2 -0
- package/esm/sdk/models/customer.d.ts.map +1 -1
- package/esm/sdk/models/customer.js +3 -0
- package/esm/sdk/models/customer.js.map +1 -1
- package/esm/sdk/models/external-tax-details.d.ts +66 -0
- package/esm/sdk/models/external-tax-details.d.ts.map +1 -0
- package/esm/sdk/models/external-tax-details.js +36 -0
- package/esm/sdk/models/external-tax-details.js.map +1 -0
- package/esm/sdk/models/index.d.ts +11 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +11 -0
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/line-item-change.d.ts +6 -0
- package/esm/sdk/models/line-item-change.d.ts.map +1 -1
- package/esm/sdk/models/line-item-change.js +2 -0
- package/esm/sdk/models/line-item-change.js.map +1 -1
- package/esm/sdk/models/modify-subscription-line-item.d.ts +3 -0
- package/esm/sdk/models/modify-subscription-line-item.d.ts.map +1 -1
- package/esm/sdk/models/modify-subscription-line-item.js +2 -0
- package/esm/sdk/models/modify-subscription-line-item.js.map +1 -1
- package/esm/sdk/models/scheduled-task-entity-type.d.ts +1 -0
- package/esm/sdk/models/scheduled-task-entity-type.d.ts.map +1 -1
- package/esm/sdk/models/scheduled-task-entity-type.js +1 -0
- package/esm/sdk/models/scheduled-task-entity-type.js.map +1 -1
- package/esm/sdk/models/tax-applied-response.d.ts +13 -0
- package/esm/sdk/models/tax-applied-response.d.ts.map +1 -1
- package/esm/sdk/models/tax-applied-response.js +10 -0
- package/esm/sdk/models/tax-applied-response.js.map +1 -1
- package/esm/sdk/models/tax-exemption-reason-code.d.ts +4 -0
- package/esm/sdk/models/tax-exemption-reason-code.d.ts.map +1 -1
- package/esm/sdk/models/tax-exemption-reason-code.js +4 -0
- package/esm/sdk/models/tax-exemption-reason-code.js.map +1 -1
- package/esm/sdk/models/tax-jurisdiction.d.ts +13 -0
- package/esm/sdk/models/tax-jurisdiction.d.ts.map +1 -0
- package/esm/sdk/models/tax-jurisdiction.js +22 -0
- package/esm/sdk/models/tax-jurisdiction.js.map +1 -0
- package/esm/sdk/models/tax-provider.d.ts +10 -0
- package/esm/sdk/models/tax-provider.d.ts.map +1 -0
- package/esm/sdk/models/tax-provider.js +11 -0
- package/esm/sdk/models/tax-provider.js.map +1 -0
- package/esm/sdk/models/tax-rate-entity-type.d.ts +1 -0
- package/esm/sdk/models/tax-rate-entity-type.d.ts.map +1 -1
- package/esm/sdk/models/tax-rate-entity-type.js +1 -0
- package/esm/sdk/models/tax-rate-entity-type.js.map +1 -1
- package/esm/sdk/models/tax-reversal-mode.d.ts +10 -0
- package/esm/sdk/models/tax-reversal-mode.d.ts.map +1 -0
- package/esm/sdk/models/tax-reversal-mode.js +11 -0
- package/esm/sdk/models/tax-reversal-mode.js.map +1 -0
- package/esm/sdk/models/tax-reversal.d.ts +12 -0
- package/esm/sdk/models/tax-reversal.d.ts.map +1 -0
- package/esm/sdk/models/tax-reversal.js +22 -0
- package/esm/sdk/models/tax-reversal.js.map +1 -0
- package/esm/sdk/models/tax-transaction-type.d.ts +10 -0
- package/esm/sdk/models/tax-transaction-type.d.ts.map +1 -0
- package/esm/sdk/models/tax-transaction-type.js +11 -0
- package/esm/sdk/models/tax-transaction-type.js.map +1 -0
- package/esm/sdk/models/top-up-coupon.d.ts +12 -0
- package/esm/sdk/models/top-up-coupon.d.ts.map +1 -0
- package/esm/sdk/models/top-up-coupon.js +17 -0
- package/esm/sdk/models/top-up-coupon.js.map +1 -0
- package/esm/sdk/models/top-up-wallet-request.d.ts +3 -0
- package/esm/sdk/models/top-up-wallet-request.d.ts.map +1 -1
- package/esm/sdk/models/top-up-wallet-request.js +2 -0
- package/esm/sdk/models/top-up-wallet-request.js.map +1 -1
- package/esm/sdk/models/update-customer-request.d.ts +6 -0
- package/esm/sdk/models/update-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/update-customer-request.js +3 -0
- package/esm/sdk/models/update-customer-request.js.map +1 -1
- package/esm/sdk/models/update-subscription-request.d.ts +3 -0
- package/esm/sdk/models/update-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/update-subscription-request.js.map +1 -1
- package/esm/sdk/models/wallet-transaction-response.d.ts +8 -0
- package/esm/sdk/models/wallet-transaction-response.d.ts.map +1 -1
- package/esm/sdk/models/wallet-transaction-response.js +8 -0
- package/esm/sdk/models/wallet-transaction-response.js.map +1 -1
- package/esm/sdk/models/wallet-tx-consumption.d.ts +11 -0
- package/esm/sdk/models/wallet-tx-consumption.d.ts.map +1 -0
- package/esm/sdk/models/wallet-tx-consumption.js +20 -0
- package/esm/sdk/models/wallet-tx-consumption.js.map +1 -0
- package/esm/sdk/models/wallet-tx-source-type.d.ts +9 -0
- package/esm/sdk/models/wallet-tx-source-type.d.ts.map +1 -0
- package/esm/sdk/models/wallet-tx-source-type.js +10 -0
- package/esm/sdk/models/wallet-tx-source-type.js.map +1 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts +2 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice-line-item.js +3 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.js.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice.d.ts +2 -0
- package/esm/sdk/models/webhook-dto-invoice.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice.js +3 -0
- package/esm/sdk/models/webhook-dto-invoice.js.map +1 -1
- package/esm/sdk/models/webhook-dto-tax-applied.d.ts +6 -0
- package/esm/sdk/models/webhook-dto-tax-applied.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-tax-applied.js +8 -0
- package/esm/sdk/models/webhook-dto-tax-applied.js.map +1 -1
- package/esm/sdk/models/webhook-dto-wallet-transaction.d.ts +5 -0
- package/esm/sdk/models/webhook-dto-wallet-transaction.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-wallet-transaction.js +8 -0
- package/esm/sdk/models/webhook-dto-wallet-transaction.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/sdk/models/add-addon-ref.ts +8 -0
- package/src/sdk/models/add-addon-request.ts +11 -0
- package/src/sdk/models/add-addon-to-subscription-request.ts +11 -0
- package/src/sdk/models/coupon-ref.ts +50 -0
- package/src/sdk/models/create-credit-grant-request.ts +8 -0
- package/src/sdk/models/create-customer-request.ts +12 -0
- package/src/sdk/models/customer-contact-person.ts +101 -0
- package/src/sdk/models/customer-response.ts +9 -0
- package/src/sdk/models/customer.ts +9 -0
- package/src/sdk/models/external-tax-details.ts +113 -0
- package/src/sdk/models/index.ts +11 -0
- package/src/sdk/models/line-item-change.ts +11 -0
- package/src/sdk/models/modify-subscription-line-item.ts +8 -0
- package/src/sdk/models/scheduled-task-entity-type.ts +1 -0
- package/src/sdk/models/tax-applied-response.ts +26 -0
- package/src/sdk/models/tax-exemption-reason-code.ts +4 -0
- package/src/sdk/models/tax-jurisdiction.ts +45 -0
- package/src/sdk/models/tax-provider.ts +17 -0
- package/src/sdk/models/tax-rate-entity-type.ts +1 -0
- package/src/sdk/models/tax-reversal-mode.ts +19 -0
- package/src/sdk/models/tax-reversal.ts +43 -0
- package/src/sdk/models/tax-transaction-type.ts +19 -0
- package/src/sdk/models/top-up-coupon.ts +34 -0
- package/src/sdk/models/top-up-wallet-request.ts +8 -0
- package/src/sdk/models/update-customer-request.ts +12 -0
- package/src/sdk/models/update-subscription-request.ts +3 -0
- package/src/sdk/models/wallet-transaction-response.ts +22 -0
- package/src/sdk/models/wallet-tx-consumption.ts +41 -0
- package/src/sdk/models/wallet-tx-source-type.ts +16 -0
- package/src/sdk/models/webhook-dto-invoice-line-item.ts +4 -0
- package/src/sdk/models/webhook-dto-invoice.ts +4 -0
- package/src/sdk/models/webhook-dto-tax-applied.ts +17 -0
- package/src/sdk/models/webhook-dto-wallet-transaction.ts +19 -0
|
@@ -7,8 +7,17 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import * as types from "../../types/primitives.js";
|
|
10
|
+
import {
|
|
11
|
+
ExternalTaxDetails,
|
|
12
|
+
ExternalTaxDetails$inboundSchema,
|
|
13
|
+
} from "./external-tax-details.js";
|
|
10
14
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
11
15
|
import { TaxBehavior, TaxBehavior$inboundSchema } from "./tax-behavior.js";
|
|
16
|
+
import { TaxProvider, TaxProvider$inboundSchema } from "./tax-provider.js";
|
|
17
|
+
import {
|
|
18
|
+
TaxTransactionType,
|
|
19
|
+
TaxTransactionType$inboundSchema,
|
|
20
|
+
} from "./tax-transaction-type.js";
|
|
12
21
|
import {
|
|
13
22
|
WebhookDtoTaxRate,
|
|
14
23
|
WebhookDtoTaxRate$inboundSchema,
|
|
@@ -17,12 +26,15 @@ import {
|
|
|
17
26
|
export type WebhookDtoTaxApplied = {
|
|
18
27
|
appliedAt?: Date | undefined;
|
|
19
28
|
currency?: string | undefined;
|
|
29
|
+
externalTaxDetails?: ExternalTaxDetails | undefined;
|
|
20
30
|
id?: string | undefined;
|
|
21
31
|
metadata?: { [k: string]: string } | undefined;
|
|
32
|
+
provider?: TaxProvider | undefined;
|
|
22
33
|
taxAmount?: string | undefined;
|
|
23
34
|
taxBehavior?: TaxBehavior | undefined;
|
|
24
35
|
taxRate?: WebhookDtoTaxRate | undefined;
|
|
25
36
|
taxRateId?: string | undefined;
|
|
37
|
+
taxTransactionType?: TaxTransactionType | undefined;
|
|
26
38
|
taxableAmount?: string | undefined;
|
|
27
39
|
};
|
|
28
40
|
|
|
@@ -34,21 +46,26 @@ export const WebhookDtoTaxApplied$inboundSchema: z.ZodMiniType<
|
|
|
34
46
|
z.object({
|
|
35
47
|
applied_at: types.optional(types.date()),
|
|
36
48
|
currency: types.optional(types.string()),
|
|
49
|
+
external_tax_details: types.optional(ExternalTaxDetails$inboundSchema),
|
|
37
50
|
id: types.optional(types.string()),
|
|
38
51
|
metadata: types.optional(z.record(z.string(), types.string())),
|
|
52
|
+
provider: types.optional(TaxProvider$inboundSchema),
|
|
39
53
|
tax_amount: types.optional(types.string()),
|
|
40
54
|
tax_behavior: types.optional(TaxBehavior$inboundSchema),
|
|
41
55
|
tax_rate: types.optional(WebhookDtoTaxRate$inboundSchema),
|
|
42
56
|
tax_rate_id: types.optional(types.string()),
|
|
57
|
+
tax_transaction_type: types.optional(TaxTransactionType$inboundSchema),
|
|
43
58
|
taxable_amount: types.optional(types.string()),
|
|
44
59
|
}),
|
|
45
60
|
z.transform((v) => {
|
|
46
61
|
return remap$(v, {
|
|
47
62
|
"applied_at": "appliedAt",
|
|
63
|
+
"external_tax_details": "externalTaxDetails",
|
|
48
64
|
"tax_amount": "taxAmount",
|
|
49
65
|
"tax_behavior": "taxBehavior",
|
|
50
66
|
"tax_rate": "taxRate",
|
|
51
67
|
"tax_rate_id": "taxRateId",
|
|
68
|
+
"tax_transaction_type": "taxTransactionType",
|
|
52
69
|
"taxable_amount": "taxableAmount",
|
|
53
70
|
});
|
|
54
71
|
}),
|
|
@@ -20,13 +20,22 @@ import {
|
|
|
20
20
|
TransactionType,
|
|
21
21
|
TransactionType$inboundSchema,
|
|
22
22
|
} from "./transaction-type.js";
|
|
23
|
+
import {
|
|
24
|
+
WalletTxConsumption,
|
|
25
|
+
WalletTxConsumption$inboundSchema,
|
|
26
|
+
} from "./wallet-tx-consumption.js";
|
|
23
27
|
import {
|
|
24
28
|
WalletTxReferenceType,
|
|
25
29
|
WalletTxReferenceType$inboundSchema,
|
|
26
30
|
} from "./wallet-tx-reference-type.js";
|
|
31
|
+
import {
|
|
32
|
+
WalletTxSourceType,
|
|
33
|
+
WalletTxSourceType$inboundSchema,
|
|
34
|
+
} from "./wallet-tx-source-type.js";
|
|
27
35
|
|
|
28
36
|
export type WebhookDtoWalletTransaction = {
|
|
29
37
|
amount?: string | undefined;
|
|
38
|
+
consumptionBreakdown?: Array<WalletTxConsumption> | undefined;
|
|
30
39
|
creditAmount?: string | undefined;
|
|
31
40
|
creditBalanceAfter?: string | undefined;
|
|
32
41
|
creditBalanceBefore?: string | undefined;
|
|
@@ -38,6 +47,8 @@ export type WebhookDtoWalletTransaction = {
|
|
|
38
47
|
metadata?: { [k: string]: string } | undefined;
|
|
39
48
|
referenceId?: string | undefined;
|
|
40
49
|
referenceType?: WalletTxReferenceType | undefined;
|
|
50
|
+
sourceId?: string | undefined;
|
|
51
|
+
sourceType?: WalletTxSourceType | undefined;
|
|
41
52
|
transactionReason?: TransactionReason | undefined;
|
|
42
53
|
transactionStatus?: TransactionStatus | undefined;
|
|
43
54
|
type?: TransactionType | undefined;
|
|
@@ -51,6 +62,9 @@ export const WebhookDtoWalletTransaction$inboundSchema: z.ZodMiniType<
|
|
|
51
62
|
> = z.pipe(
|
|
52
63
|
z.object({
|
|
53
64
|
amount: types.optional(types.string()),
|
|
65
|
+
consumption_breakdown: types.optional(
|
|
66
|
+
z.array(WalletTxConsumption$inboundSchema),
|
|
67
|
+
),
|
|
54
68
|
credit_amount: types.optional(types.string()),
|
|
55
69
|
credit_balance_after: types.optional(types.string()),
|
|
56
70
|
credit_balance_before: types.optional(types.string()),
|
|
@@ -62,6 +76,8 @@ export const WebhookDtoWalletTransaction$inboundSchema: z.ZodMiniType<
|
|
|
62
76
|
metadata: types.optional(z.record(z.string(), types.string())),
|
|
63
77
|
reference_id: types.optional(types.string()),
|
|
64
78
|
reference_type: types.optional(WalletTxReferenceType$inboundSchema),
|
|
79
|
+
source_id: types.optional(types.string()),
|
|
80
|
+
source_type: types.optional(WalletTxSourceType$inboundSchema),
|
|
65
81
|
transaction_reason: types.optional(TransactionReason$inboundSchema),
|
|
66
82
|
transaction_status: types.optional(TransactionStatus$inboundSchema),
|
|
67
83
|
type: types.optional(TransactionType$inboundSchema),
|
|
@@ -69,6 +85,7 @@ export const WebhookDtoWalletTransaction$inboundSchema: z.ZodMiniType<
|
|
|
69
85
|
}),
|
|
70
86
|
z.transform((v) => {
|
|
71
87
|
return remap$(v, {
|
|
88
|
+
"consumption_breakdown": "consumptionBreakdown",
|
|
72
89
|
"credit_amount": "creditAmount",
|
|
73
90
|
"credit_balance_after": "creditBalanceAfter",
|
|
74
91
|
"credit_balance_before": "creditBalanceBefore",
|
|
@@ -76,6 +93,8 @@ export const WebhookDtoWalletTransaction$inboundSchema: z.ZodMiniType<
|
|
|
76
93
|
"expiry_date": "expiryDate",
|
|
77
94
|
"reference_id": "referenceId",
|
|
78
95
|
"reference_type": "referenceType",
|
|
96
|
+
"source_id": "sourceId",
|
|
97
|
+
"source_type": "sourceType",
|
|
79
98
|
"transaction_reason": "transactionReason",
|
|
80
99
|
"transaction_status": "transactionStatus",
|
|
81
100
|
"wallet_id": "walletId",
|