@leaflow/sdk 0.129.1 → 0.130.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.
Files changed (163) hide show
  1. package/dist/billing/type/order/v1/generated/models.d.ts +241 -85
  2. package/dist/billing/type/order/v1/generated/models.js +19 -4
  3. package/dist/billing/type/order/v1/generated/validators/paymentResult.zod.d.ts +1 -0
  4. package/dist/billing/type/order/v1/generated/validators/refund.zod.d.ts +1 -0
  5. package/dist/billing/type/order/v1/generated/validators/refundList.zod.d.ts +1 -0
  6. package/dist/billing/type/order/v1/generated/validators/transaction.zod.d.ts +1 -0
  7. package/dist/billing/type/order/v1/generated/validators/transactionList.zod.d.ts +1 -0
  8. package/dist/billing/type/order/v1/generated/validators/transactionType.zod.d.ts +1 -0
  9. package/dist/billing/type/order/v1/generated/validators/transactionType.zod.js +1 -1
  10. package/dist/billing/type/order/v1/generated/validators/withdrawal.zod.d.ts +40 -0
  11. package/dist/billing/type/order/v1/generated/validators/withdrawal.zod.js +43 -0
  12. package/dist/billing/type/order/v1/generated/validators/withdrawalAllocation.zod.d.ts +19 -0
  13. package/dist/billing/type/order/v1/generated/validators/withdrawalAllocation.zod.js +17 -0
  14. package/dist/billing/type/order/v1/generated/validators/withdrawalCreate.zod.d.ts +25 -0
  15. package/dist/billing/type/order/v1/generated/validators/withdrawalCreate.zod.js +19 -0
  16. package/dist/billing/type/order/v1/generated/validators/withdrawalItem.zod.d.ts +46 -0
  17. package/dist/billing/type/order/v1/generated/validators/withdrawalItem.zod.js +37 -0
  18. package/dist/billing/type/order/v1/generated/validators/withdrawalItemList.zod.d.ts +48 -0
  19. package/dist/billing/type/order/v1/generated/validators/withdrawalItemList.zod.js +14 -0
  20. package/dist/billing/type/order/v1/generated/validators/withdrawalList.zod.d.ts +39 -0
  21. package/dist/billing/type/order/v1/generated/validators/withdrawalList.zod.js +14 -0
  22. package/dist/billing/type/order/v1/generated/validators/withdrawalPreview.zod.d.ts +40 -0
  23. package/dist/billing/type/order/v1/generated/validators/withdrawalPreview.zod.js +25 -0
  24. package/dist/billing/type/order/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +28 -0
  25. package/dist/billing/type/order/v1/generated/validators/withdrawalPreviewItem.zod.js +19 -0
  26. package/dist/billing/type/order/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +15 -0
  27. package/dist/billing/type/order/v1/generated/validators/withdrawalPreviewRequest.zod.js +13 -0
  28. package/dist/billing/type/order/v1/generated/validators/withdrawalSource.zod.d.ts +23 -0
  29. package/dist/billing/type/order/v1/generated/validators/withdrawalSource.zod.js +23 -0
  30. package/dist/billing/v1/generated/functions.d.ts +106 -1
  31. package/dist/billing/v1/generated/functions.js +132 -0
  32. package/dist/billing/v1/generated/models.d.ts +194 -9
  33. package/dist/billing/v1/generated/models.js +15 -0
  34. package/dist/billing/v1/generated/schemas.zod.d.ts +59 -0
  35. package/dist/billing/v1/generated/schemas.zod.js +67 -0
  36. package/dist/billing/v1/generated/validators/listWithdrawalItemsParams.zod.d.ts +18 -0
  37. package/dist/billing/v1/generated/validators/listWithdrawalItemsParams.zod.js +24 -0
  38. package/dist/billing/v1/generated/validators/listWithdrawalsParams.zod.d.ts +19 -0
  39. package/dist/billing/v1/generated/validators/listWithdrawalsParams.zod.js +25 -0
  40. package/dist/billing/v1/generated/validators/paymentResult.zod.d.ts +1 -0
  41. package/dist/billing/v1/generated/validators/refund.zod.d.ts +1 -0
  42. package/dist/billing/v1/generated/validators/refundList.zod.d.ts +1 -0
  43. package/dist/billing/v1/generated/validators/transaction.zod.d.ts +1 -0
  44. package/dist/billing/v1/generated/validators/transactionList.zod.d.ts +1 -0
  45. package/dist/billing/v1/generated/validators/transactionType.zod.d.ts +1 -0
  46. package/dist/billing/v1/generated/validators/transactionType.zod.js +1 -1
  47. package/dist/billing/v1/generated/validators/withdrawal.zod.d.ts +40 -0
  48. package/dist/billing/v1/generated/validators/withdrawal.zod.js +43 -0
  49. package/dist/billing/v1/generated/validators/withdrawalAllocation.zod.d.ts +19 -0
  50. package/dist/billing/v1/generated/validators/withdrawalAllocation.zod.js +17 -0
  51. package/dist/billing/v1/generated/validators/withdrawalCreate.zod.d.ts +25 -0
  52. package/dist/billing/v1/generated/validators/withdrawalCreate.zod.js +19 -0
  53. package/dist/billing/v1/generated/validators/withdrawalItem.zod.d.ts +46 -0
  54. package/dist/billing/v1/generated/validators/withdrawalItem.zod.js +37 -0
  55. package/dist/billing/v1/generated/validators/withdrawalItemList.zod.d.ts +48 -0
  56. package/dist/billing/v1/generated/validators/withdrawalItemList.zod.js +14 -0
  57. package/dist/billing/v1/generated/validators/withdrawalList.zod.d.ts +39 -0
  58. package/dist/billing/v1/generated/validators/withdrawalList.zod.js +14 -0
  59. package/dist/billing/v1/generated/validators/withdrawalPreview.zod.d.ts +40 -0
  60. package/dist/billing/v1/generated/validators/withdrawalPreview.zod.js +25 -0
  61. package/dist/billing/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +28 -0
  62. package/dist/billing/v1/generated/validators/withdrawalPreviewItem.zod.js +19 -0
  63. package/dist/billing/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +15 -0
  64. package/dist/billing/v1/generated/validators/withdrawalPreviewRequest.zod.js +13 -0
  65. package/dist/billing/v1/generated/validators/withdrawalSource.zod.d.ts +23 -0
  66. package/dist/billing/v1/generated/validators/withdrawalSource.zod.js +23 -0
  67. package/dist/canopy/v1/generated/models.d.ts +241 -85
  68. package/dist/canopy/v1/generated/models.js +19 -4
  69. package/dist/canopy/v1/generated/validators/paymentResult.zod.d.ts +1 -0
  70. package/dist/canopy/v1/generated/validators/refund.zod.d.ts +1 -0
  71. package/dist/canopy/v1/generated/validators/refundList.zod.d.ts +1 -0
  72. package/dist/canopy/v1/generated/validators/transaction.zod.d.ts +1 -0
  73. package/dist/canopy/v1/generated/validators/transactionList.zod.d.ts +1 -0
  74. package/dist/canopy/v1/generated/validators/transactionType.zod.d.ts +1 -0
  75. package/dist/canopy/v1/generated/validators/transactionType.zod.js +1 -1
  76. package/dist/canopy/v1/generated/validators/withdrawal.zod.d.ts +63 -0
  77. package/dist/canopy/v1/generated/validators/withdrawal.zod.js +66 -0
  78. package/dist/canopy/v1/generated/validators/withdrawalAllocation.zod.d.ts +42 -0
  79. package/dist/canopy/v1/generated/validators/withdrawalAllocation.zod.js +40 -0
  80. package/dist/canopy/v1/generated/validators/withdrawalCreate.zod.d.ts +48 -0
  81. package/dist/canopy/v1/generated/validators/withdrawalCreate.zod.js +42 -0
  82. package/dist/canopy/v1/generated/validators/withdrawalItem.zod.d.ts +69 -0
  83. package/dist/canopy/v1/generated/validators/withdrawalItem.zod.js +60 -0
  84. package/dist/canopy/v1/generated/validators/withdrawalItemList.zod.d.ts +71 -0
  85. package/dist/canopy/v1/generated/validators/withdrawalItemList.zod.js +37 -0
  86. package/dist/canopy/v1/generated/validators/withdrawalList.zod.d.ts +62 -0
  87. package/dist/canopy/v1/generated/validators/withdrawalList.zod.js +37 -0
  88. package/dist/canopy/v1/generated/validators/withdrawalPreview.zod.d.ts +63 -0
  89. package/dist/canopy/v1/generated/validators/withdrawalPreview.zod.js +48 -0
  90. package/dist/canopy/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +51 -0
  91. package/dist/canopy/v1/generated/validators/withdrawalPreviewItem.zod.js +42 -0
  92. package/dist/canopy/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +38 -0
  93. package/dist/canopy/v1/generated/validators/withdrawalPreviewRequest.zod.js +36 -0
  94. package/dist/canopy/v1/generated/validators/withdrawalSource.zod.d.ts +46 -0
  95. package/dist/canopy/v1/generated/validators/withdrawalSource.zod.js +46 -0
  96. package/dist/compute/v1/generated/models.d.ts +241 -85
  97. package/dist/compute/v1/generated/models.js +19 -4
  98. package/dist/compute/v1/generated/validators/paymentResult.zod.d.ts +1 -0
  99. package/dist/compute/v1/generated/validators/refund.zod.d.ts +1 -0
  100. package/dist/compute/v1/generated/validators/refundList.zod.d.ts +1 -0
  101. package/dist/compute/v1/generated/validators/transaction.zod.d.ts +1 -0
  102. package/dist/compute/v1/generated/validators/transactionList.zod.d.ts +1 -0
  103. package/dist/compute/v1/generated/validators/transactionType.zod.d.ts +1 -0
  104. package/dist/compute/v1/generated/validators/transactionType.zod.js +1 -1
  105. package/dist/compute/v1/generated/validators/withdrawal.zod.d.ts +56 -0
  106. package/dist/compute/v1/generated/validators/withdrawal.zod.js +59 -0
  107. package/dist/compute/v1/generated/validators/withdrawalAllocation.zod.d.ts +35 -0
  108. package/dist/compute/v1/generated/validators/withdrawalAllocation.zod.js +33 -0
  109. package/dist/compute/v1/generated/validators/withdrawalCreate.zod.d.ts +41 -0
  110. package/dist/compute/v1/generated/validators/withdrawalCreate.zod.js +35 -0
  111. package/dist/compute/v1/generated/validators/withdrawalItem.zod.d.ts +62 -0
  112. package/dist/compute/v1/generated/validators/withdrawalItem.zod.js +53 -0
  113. package/dist/compute/v1/generated/validators/withdrawalItemList.zod.d.ts +64 -0
  114. package/dist/compute/v1/generated/validators/withdrawalItemList.zod.js +30 -0
  115. package/dist/compute/v1/generated/validators/withdrawalList.zod.d.ts +55 -0
  116. package/dist/compute/v1/generated/validators/withdrawalList.zod.js +30 -0
  117. package/dist/compute/v1/generated/validators/withdrawalPreview.zod.d.ts +56 -0
  118. package/dist/compute/v1/generated/validators/withdrawalPreview.zod.js +41 -0
  119. package/dist/compute/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +44 -0
  120. package/dist/compute/v1/generated/validators/withdrawalPreviewItem.zod.js +35 -0
  121. package/dist/compute/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +31 -0
  122. package/dist/compute/v1/generated/validators/withdrawalPreviewRequest.zod.js +29 -0
  123. package/dist/compute/v1/generated/validators/withdrawalSource.zod.d.ts +39 -0
  124. package/dist/compute/v1/generated/validators/withdrawalSource.zod.js +39 -0
  125. package/dist/membership/v1/generated/models.d.ts +247 -85
  126. package/dist/membership/v1/generated/models.js +19 -4
  127. package/dist/membership/v1/generated/validators/grant.zod.d.ts +2 -0
  128. package/dist/membership/v1/generated/validators/grant.zod.js +5 -0
  129. package/dist/membership/v1/generated/validators/membership.zod.d.ts +2 -0
  130. package/dist/membership/v1/generated/validators/membershipList.zod.d.ts +2 -0
  131. package/dist/membership/v1/generated/validators/membershipPurchase.zod.d.ts +2 -0
  132. package/dist/membership/v1/generated/validators/paymentResult.zod.d.ts +1 -0
  133. package/dist/membership/v1/generated/validators/period.zod.d.ts +2 -0
  134. package/dist/membership/v1/generated/validators/periodList.zod.d.ts +2 -0
  135. package/dist/membership/v1/generated/validators/refund.zod.d.ts +1 -0
  136. package/dist/membership/v1/generated/validators/refundList.zod.d.ts +1 -0
  137. package/dist/membership/v1/generated/validators/transaction.zod.d.ts +1 -0
  138. package/dist/membership/v1/generated/validators/transactionList.zod.d.ts +1 -0
  139. package/dist/membership/v1/generated/validators/transactionType.zod.d.ts +1 -0
  140. package/dist/membership/v1/generated/validators/transactionType.zod.js +1 -1
  141. package/dist/membership/v1/generated/validators/withdrawal.zod.d.ts +40 -0
  142. package/dist/membership/v1/generated/validators/withdrawal.zod.js +43 -0
  143. package/dist/membership/v1/generated/validators/withdrawalAllocation.zod.d.ts +19 -0
  144. package/dist/membership/v1/generated/validators/withdrawalAllocation.zod.js +17 -0
  145. package/dist/membership/v1/generated/validators/withdrawalCreate.zod.d.ts +25 -0
  146. package/dist/membership/v1/generated/validators/withdrawalCreate.zod.js +19 -0
  147. package/dist/membership/v1/generated/validators/withdrawalItem.zod.d.ts +46 -0
  148. package/dist/membership/v1/generated/validators/withdrawalItem.zod.js +37 -0
  149. package/dist/membership/v1/generated/validators/withdrawalItemList.zod.d.ts +48 -0
  150. package/dist/membership/v1/generated/validators/withdrawalItemList.zod.js +14 -0
  151. package/dist/membership/v1/generated/validators/withdrawalList.zod.d.ts +39 -0
  152. package/dist/membership/v1/generated/validators/withdrawalList.zod.js +14 -0
  153. package/dist/membership/v1/generated/validators/withdrawalPreview.zod.d.ts +40 -0
  154. package/dist/membership/v1/generated/validators/withdrawalPreview.zod.js +25 -0
  155. package/dist/membership/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +28 -0
  156. package/dist/membership/v1/generated/validators/withdrawalPreviewItem.zod.js +19 -0
  157. package/dist/membership/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +15 -0
  158. package/dist/membership/v1/generated/validators/withdrawalPreviewRequest.zod.js +13 -0
  159. package/dist/membership/v1/generated/validators/withdrawalSource.zod.d.ts +23 -0
  160. package/dist/membership/v1/generated/validators/withdrawalSource.zod.js +23 -0
  161. package/dist/routes.d.ts +40 -0
  162. package/dist/routes.js +45 -0
  163. package/package.json +1 -1
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export const withdrawalAllocationAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
10
+ export const withdrawalAllocationFeeAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
11
+ export const withdrawalAllocationRefundAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
12
+ export const WithdrawalAllocation = zod.strictObject({
13
+ source_transaction_id: zod.uuid(),
14
+ amount: zod.string().regex(withdrawalAllocationAmountRegExp),
15
+ fee_amount: zod.string().regex(withdrawalAllocationFeeAmountRegExp),
16
+ refund_amount: zod.string().regex(withdrawalAllocationRefundAmountRegExp),
17
+ });
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export declare const withdrawalCreateAmountRegExp: RegExp;
10
+ export declare const withdrawalCreateExpectedRefundAmountRegExp: RegExp;
11
+ export declare const withdrawalCreateExpectedItemsMax = 200;
12
+ export declare const WithdrawalCreate: zod.ZodObject<{
13
+ id: zod.ZodUUID;
14
+ billing_account_id: zod.ZodInt;
15
+ amount: zod.ZodString;
16
+ expected_refund_amount: zod.ZodString;
17
+ expected_items: zod.ZodArray<zod.ZodObject<{
18
+ source_transaction_id: zod.ZodUUID;
19
+ amount: zod.ZodString;
20
+ fee_amount: zod.ZodString;
21
+ refund_amount: zod.ZodString;
22
+ }, zod.z.core.$strict>>;
23
+ }, zod.z.core.$strict>;
24
+ export type WithdrawalCreate = zod.input<typeof WithdrawalCreate>;
25
+ export type WithdrawalCreateOutput = zod.output<typeof WithdrawalCreate>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ import { WithdrawalAllocation } from "./withdrawalAllocation.zod.js";
10
+ export const withdrawalCreateAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
11
+ export const withdrawalCreateExpectedRefundAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
12
+ export const withdrawalCreateExpectedItemsMax = 200;
13
+ export const WithdrawalCreate = zod.strictObject({
14
+ id: zod.uuid(),
15
+ billing_account_id: zod.int(),
16
+ amount: zod.string().regex(withdrawalCreateAmountRegExp),
17
+ expected_refund_amount: zod.string().regex(withdrawalCreateExpectedRefundAmountRegExp),
18
+ expected_items: zod.array(WithdrawalAllocation).min(1).max(withdrawalCreateExpectedItemsMax),
19
+ });
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export declare const withdrawalItemAmountRegExp: RegExp;
10
+ export declare const withdrawalItemFeeAmountRegExp: RegExp;
11
+ export declare const withdrawalItemRefundAmountRegExp: RegExp;
12
+ export declare const withdrawalItemCurrencyMin = 3;
13
+ export declare const withdrawalItemCurrencyMax = 3;
14
+ export declare const WithdrawalItem: zod.ZodObject<{
15
+ source_transaction_id: zod.ZodUUID;
16
+ amount: zod.ZodString;
17
+ fee_amount: zod.ZodString;
18
+ refund_amount: zod.ZodString;
19
+ id: zod.ZodUUID;
20
+ withdrawal_id: zod.ZodUUID;
21
+ billing_account_id: zod.ZodInt;
22
+ currency: zod.ZodString;
23
+ refund_id: zod.ZodUUID;
24
+ fee_transaction_id: zod.ZodOptional<zod.ZodUUID>;
25
+ status: zod.ZodEnum<{
26
+ pending: "pending";
27
+ failed: "failed";
28
+ succeeded: "succeeded";
29
+ reversed: "reversed";
30
+ }>;
31
+ completed_at: zod.ZodOptional<zod.z.ZodISODateTime>;
32
+ payment_gateway: zod.ZodString;
33
+ method_type: zod.ZodString;
34
+ source: zod.ZodObject<{
35
+ amount: zod.ZodString;
36
+ currency: zod.ZodString;
37
+ received_at: zod.z.ZodISODateTime;
38
+ payment_gateway: zod.ZodString;
39
+ method_type: zod.ZodString;
40
+ card_brand: zod.ZodOptional<zod.ZodString>;
41
+ card_last4: zod.ZodOptional<zod.ZodString>;
42
+ }, zod.z.core.$strict>;
43
+ failure_code: zod.ZodOptional<zod.ZodString>;
44
+ }, zod.z.core.$strict>;
45
+ export type WithdrawalItem = zod.input<typeof WithdrawalItem>;
46
+ export type WithdrawalItemOutput = zod.output<typeof WithdrawalItem>;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ import { WithdrawalSource } from "./withdrawalSource.zod.js";
10
+ export const withdrawalItemAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
11
+ export const withdrawalItemFeeAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
12
+ export const withdrawalItemRefundAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
13
+ export const withdrawalItemCurrencyMin = 3;
14
+ export const withdrawalItemCurrencyMax = 3;
15
+ export const WithdrawalItem = zod
16
+ .strictObject({
17
+ source_transaction_id: zod.uuid(),
18
+ amount: zod.string().regex(withdrawalItemAmountRegExp),
19
+ fee_amount: zod.string().regex(withdrawalItemFeeAmountRegExp),
20
+ refund_amount: zod.string().regex(withdrawalItemRefundAmountRegExp),
21
+ id: zod.uuid(),
22
+ withdrawal_id: zod.uuid(),
23
+ billing_account_id: zod.int(),
24
+ currency: zod.string().min(withdrawalItemCurrencyMin).max(withdrawalItemCurrencyMax),
25
+ refund_id: zod.uuid(),
26
+ fee_transaction_id: zod.uuid().optional(),
27
+ status: zod.enum(["pending", "succeeded", "failed", "reversed"]),
28
+ completed_at: zod.iso.datetime({ offset: true }).optional(),
29
+ payment_gateway: zod.string(),
30
+ method_type: zod.string(),
31
+ source: WithdrawalSource,
32
+ failure_code: zod
33
+ .string()
34
+ .optional()
35
+ .describe("The original gateway failure code when a refund failed, or refund_reversed when a completed refund was reversed. Absent while pending or successful."),
36
+ })
37
+ .describe("The fixed principal deduction, withdrawal fee and exact refund obligation for one original top-up. Each item has its own refund; payment_gateway and method_type identify the original route.");
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export declare const WithdrawalItemList: zod.ZodObject<{
10
+ items: zod.ZodArray<zod.ZodObject<{
11
+ source_transaction_id: zod.ZodUUID;
12
+ amount: zod.ZodString;
13
+ fee_amount: zod.ZodString;
14
+ refund_amount: zod.ZodString;
15
+ id: zod.ZodUUID;
16
+ withdrawal_id: zod.ZodUUID;
17
+ billing_account_id: zod.ZodInt;
18
+ currency: zod.ZodString;
19
+ refund_id: zod.ZodUUID;
20
+ fee_transaction_id: zod.ZodOptional<zod.ZodUUID>;
21
+ status: zod.ZodEnum<{
22
+ pending: "pending";
23
+ failed: "failed";
24
+ succeeded: "succeeded";
25
+ reversed: "reversed";
26
+ }>;
27
+ completed_at: zod.ZodOptional<zod.z.ZodISODateTime>;
28
+ payment_gateway: zod.ZodString;
29
+ method_type: zod.ZodString;
30
+ source: zod.ZodObject<{
31
+ amount: zod.ZodString;
32
+ currency: zod.ZodString;
33
+ received_at: zod.z.ZodISODateTime;
34
+ payment_gateway: zod.ZodString;
35
+ method_type: zod.ZodString;
36
+ card_brand: zod.ZodOptional<zod.ZodString>;
37
+ card_last4: zod.ZodOptional<zod.ZodString>;
38
+ }, zod.z.core.$strict>;
39
+ failure_code: zod.ZodOptional<zod.ZodString>;
40
+ }, zod.z.core.$strict>>;
41
+ pagination: zod.ZodObject<{
42
+ page: zod.ZodInt;
43
+ page_size: zod.ZodInt;
44
+ total_count: zod.ZodOptional<zod.ZodInt>;
45
+ }, zod.z.core.$strict>;
46
+ }, zod.z.core.$strict>;
47
+ export type WithdrawalItemList = zod.input<typeof WithdrawalItemList>;
48
+ export type WithdrawalItemListOutput = zod.output<typeof WithdrawalItemList>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ import { OffsetPagination } from "./offsetPagination.zod.js";
10
+ import { WithdrawalItem } from "./withdrawalItem.zod.js";
11
+ export const WithdrawalItemList = zod.strictObject({
12
+ items: zod.array(WithdrawalItem),
13
+ pagination: OffsetPagination,
14
+ });
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export declare const WithdrawalList: zod.ZodObject<{
10
+ items: zod.ZodArray<zod.ZodObject<{
11
+ id: zod.ZodUUID;
12
+ billing_account_id: zod.ZodInt;
13
+ currency: zod.ZodString;
14
+ amount: zod.ZodString;
15
+ fee_amount: zod.ZodString;
16
+ refund_amount: zod.ZodString;
17
+ deducted_amount: zod.ZodString;
18
+ settled_amount: zod.ZodString;
19
+ charged_fee_amount: zod.ZodString;
20
+ status: zod.ZodEnum<{
21
+ pending: "pending";
22
+ failed: "failed";
23
+ succeeded: "succeeded";
24
+ processing: "processing";
25
+ partially_completed: "partially_completed";
26
+ reversed: "reversed";
27
+ }>;
28
+ created_at: zod.z.ZodISODateTime;
29
+ completed_at: zod.ZodOptional<zod.z.ZodISODateTime>;
30
+ created_by: zod.ZodOptional<zod.ZodString>;
31
+ }, zod.z.core.$strict>>;
32
+ pagination: zod.ZodObject<{
33
+ page: zod.ZodInt;
34
+ page_size: zod.ZodInt;
35
+ total_count: zod.ZodOptional<zod.ZodInt>;
36
+ }, zod.z.core.$strict>;
37
+ }, zod.z.core.$strict>;
38
+ export type WithdrawalList = zod.input<typeof WithdrawalList>;
39
+ export type WithdrawalListOutput = zod.output<typeof WithdrawalList>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ import { OffsetPagination } from "./offsetPagination.zod.js";
10
+ import { Withdrawal } from "./withdrawal.zod.js";
11
+ export const WithdrawalList = zod.strictObject({
12
+ items: zod.array(Withdrawal),
13
+ pagination: OffsetPagination,
14
+ });
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export declare const withdrawalPreviewCurrencyMin = 3;
10
+ export declare const withdrawalPreviewCurrencyMax = 3;
11
+ export declare const withdrawalPreviewAvailableAmountRegExp: RegExp;
12
+ export declare const withdrawalPreviewAmountRegExp: RegExp;
13
+ export declare const withdrawalPreviewFeeAmountRegExp: RegExp;
14
+ export declare const withdrawalPreviewRefundAmountRegExp: RegExp;
15
+ export declare const withdrawalPreviewItemsMax = 200;
16
+ export declare const WithdrawalPreview: zod.ZodObject<{
17
+ billing_account_id: zod.ZodInt;
18
+ currency: zod.ZodString;
19
+ available_amount: zod.ZodString;
20
+ amount: zod.ZodString;
21
+ fee_amount: zod.ZodString;
22
+ refund_amount: zod.ZodString;
23
+ items: zod.ZodArray<zod.ZodObject<{
24
+ source_transaction_id: zod.ZodUUID;
25
+ amount: zod.ZodString;
26
+ fee_amount: zod.ZodString;
27
+ refund_amount: zod.ZodString;
28
+ source: zod.ZodObject<{
29
+ amount: zod.ZodString;
30
+ currency: zod.ZodString;
31
+ received_at: zod.z.ZodISODateTime;
32
+ payment_gateway: zod.ZodString;
33
+ method_type: zod.ZodString;
34
+ card_brand: zod.ZodOptional<zod.ZodString>;
35
+ card_last4: zod.ZodOptional<zod.ZodString>;
36
+ }, zod.z.core.$strict>;
37
+ }, zod.z.core.$strict>>;
38
+ }, zod.z.core.$strict>;
39
+ export type WithdrawalPreview = zod.input<typeof WithdrawalPreview>;
40
+ export type WithdrawalPreviewOutput = zod.output<typeof WithdrawalPreview>;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ import { WithdrawalPreviewItem } from "./withdrawalPreviewItem.zod.js";
10
+ export const withdrawalPreviewCurrencyMin = 3;
11
+ export const withdrawalPreviewCurrencyMax = 3;
12
+ export const withdrawalPreviewAvailableAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
13
+ export const withdrawalPreviewAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
14
+ export const withdrawalPreviewFeeAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
15
+ export const withdrawalPreviewRefundAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
16
+ export const withdrawalPreviewItemsMax = 200;
17
+ export const WithdrawalPreview = zod.strictObject({
18
+ billing_account_id: zod.int(),
19
+ currency: zod.string().min(withdrawalPreviewCurrencyMin).max(withdrawalPreviewCurrencyMax),
20
+ available_amount: zod.string().regex(withdrawalPreviewAvailableAmountRegExp),
21
+ amount: zod.string().regex(withdrawalPreviewAmountRegExp),
22
+ fee_amount: zod.string().regex(withdrawalPreviewFeeAmountRegExp),
23
+ refund_amount: zod.string().regex(withdrawalPreviewRefundAmountRegExp),
24
+ items: zod.array(WithdrawalPreviewItem).max(withdrawalPreviewItemsMax),
25
+ });
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export declare const withdrawalPreviewItemAmountRegExp: RegExp;
10
+ export declare const withdrawalPreviewItemFeeAmountRegExp: RegExp;
11
+ export declare const withdrawalPreviewItemRefundAmountRegExp: RegExp;
12
+ export declare const WithdrawalPreviewItem: zod.ZodObject<{
13
+ source_transaction_id: zod.ZodUUID;
14
+ amount: zod.ZodString;
15
+ fee_amount: zod.ZodString;
16
+ refund_amount: zod.ZodString;
17
+ source: zod.ZodObject<{
18
+ amount: zod.ZodString;
19
+ currency: zod.ZodString;
20
+ received_at: zod.z.ZodISODateTime;
21
+ payment_gateway: zod.ZodString;
22
+ method_type: zod.ZodString;
23
+ card_brand: zod.ZodOptional<zod.ZodString>;
24
+ card_last4: zod.ZodOptional<zod.ZodString>;
25
+ }, zod.z.core.$strict>;
26
+ }, zod.z.core.$strict>;
27
+ export type WithdrawalPreviewItem = zod.input<typeof WithdrawalPreviewItem>;
28
+ export type WithdrawalPreviewItemOutput = zod.output<typeof WithdrawalPreviewItem>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ import { WithdrawalSource } from "./withdrawalSource.zod.js";
10
+ export const withdrawalPreviewItemAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
11
+ export const withdrawalPreviewItemFeeAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
12
+ export const withdrawalPreviewItemRefundAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
13
+ export const WithdrawalPreviewItem = zod.strictObject({
14
+ source_transaction_id: zod.uuid(),
15
+ amount: zod.string().regex(withdrawalPreviewItemAmountRegExp),
16
+ fee_amount: zod.string().regex(withdrawalPreviewItemFeeAmountRegExp),
17
+ refund_amount: zod.string().regex(withdrawalPreviewItemRefundAmountRegExp),
18
+ source: WithdrawalSource,
19
+ });
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export declare const withdrawalPreviewRequestAmountRegExp: RegExp;
10
+ export declare const WithdrawalPreviewRequest: zod.ZodObject<{
11
+ billing_account_id: zod.ZodInt;
12
+ amount: zod.ZodOptional<zod.ZodString>;
13
+ }, zod.z.core.$strict>;
14
+ export type WithdrawalPreviewRequest = zod.input<typeof WithdrawalPreviewRequest>;
15
+ export type WithdrawalPreviewRequestOutput = zod.output<typeof WithdrawalPreviewRequest>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export const withdrawalPreviewRequestAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
10
+ export const WithdrawalPreviewRequest = zod.strictObject({
11
+ billing_account_id: zod.int(),
12
+ amount: zod.string().regex(withdrawalPreviewRequestAmountRegExp).optional(),
13
+ });
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export declare const withdrawalSourceAmountRegExp: RegExp;
10
+ export declare const withdrawalSourceCurrencyMin = 3;
11
+ export declare const withdrawalSourceCurrencyMax = 3;
12
+ export declare const withdrawalSourceCardLast4RegExp: RegExp;
13
+ export declare const WithdrawalSource: zod.ZodObject<{
14
+ amount: zod.ZodString;
15
+ currency: zod.ZodString;
16
+ received_at: zod.z.ZodISODateTime;
17
+ payment_gateway: zod.ZodString;
18
+ method_type: zod.ZodString;
19
+ card_brand: zod.ZodOptional<zod.ZodString>;
20
+ card_last4: zod.ZodOptional<zod.ZodString>;
21
+ }, zod.z.core.$strict>;
22
+ export type WithdrawalSource = zod.input<typeof WithdrawalSource>;
23
+ export type WithdrawalSourceOutput = zod.output<typeof WithdrawalSource>;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Membership API
5
+ * Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import * as zod from "zod";
9
+ export const withdrawalSourceAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
10
+ export const withdrawalSourceCurrencyMin = 3;
11
+ export const withdrawalSourceCurrencyMax = 3;
12
+ export const withdrawalSourceCardLast4RegExp = new RegExp("^[0-9]{4}$");
13
+ export const WithdrawalSource = zod
14
+ .strictObject({
15
+ amount: zod.string().regex(withdrawalSourceAmountRegExp),
16
+ currency: zod.string().min(withdrawalSourceCurrencyMin).max(withdrawalSourceCurrencyMax),
17
+ received_at: zod.iso.datetime({ offset: true }),
18
+ payment_gateway: zod.string(),
19
+ method_type: zod.string(),
20
+ card_brand: zod.string().optional(),
21
+ card_last4: zod.string().regex(withdrawalSourceCardLast4RegExp).optional(),
22
+ })
23
+ .describe("The original top-up and its refund destination. Card details are included when the original payment method was saved; missing card details do not change the original refund route.");
package/dist/routes.d.ts CHANGED
@@ -486,6 +486,46 @@ export declare const routes: readonly [{
486
486
  readonly operationId: "revert-thread";
487
487
  readonly securityScheme: "ScopedToken";
488
488
  readonly upstreamUrl: "https://assistant.leaflow.cloud";
489
+ }, {
490
+ readonly service: "billing";
491
+ readonly contract: "billing";
492
+ readonly method: "GET";
493
+ readonly path: "/api/v1/withdrawals/{withdrawalId}/items";
494
+ readonly operationId: "list-withdrawal-items";
495
+ readonly securityScheme: "AccessToken";
496
+ readonly upstreamUrl: "https://billing.leaflow.cloud";
497
+ }, {
498
+ readonly service: "billing";
499
+ readonly contract: "billing";
500
+ readonly method: "GET";
501
+ readonly path: "/api/v1/withdrawals";
502
+ readonly operationId: "list-withdrawals";
503
+ readonly securityScheme: "AccessToken";
504
+ readonly upstreamUrl: "https://billing.leaflow.cloud";
505
+ }, {
506
+ readonly service: "billing";
507
+ readonly contract: "billing";
508
+ readonly method: "POST";
509
+ readonly path: "/api/v1/withdrawals";
510
+ readonly operationId: "create-withdrawal";
511
+ readonly securityScheme: "AccessToken";
512
+ readonly upstreamUrl: "https://billing.leaflow.cloud";
513
+ }, {
514
+ readonly service: "billing";
515
+ readonly contract: "billing";
516
+ readonly method: "POST";
517
+ readonly path: "/api/v1/withdrawals/preview";
518
+ readonly operationId: "preview-withdrawal";
519
+ readonly securityScheme: "AccessToken";
520
+ readonly upstreamUrl: "https://billing.leaflow.cloud";
521
+ }, {
522
+ readonly service: "billing";
523
+ readonly contract: "billing";
524
+ readonly method: "GET";
525
+ readonly path: "/api/v1/withdrawals/{withdrawalId}";
526
+ readonly operationId: "get-withdrawal";
527
+ readonly securityScheme: "AccessToken";
528
+ readonly upstreamUrl: "https://billing.leaflow.cloud";
489
529
  }, {
490
530
  readonly service: "billing";
491
531
  readonly contract: "billing";
package/dist/routes.js CHANGED
@@ -549,6 +549,51 @@ export const routes = [
549
549
  securityScheme: "ScopedToken",
550
550
  upstreamUrl: "https://assistant.leaflow.cloud",
551
551
  },
552
+ {
553
+ service: "billing",
554
+ contract: "billing",
555
+ method: "GET",
556
+ path: "/api/v1/withdrawals/{withdrawalId}/items",
557
+ operationId: "list-withdrawal-items",
558
+ securityScheme: "AccessToken",
559
+ upstreamUrl: "https://billing.leaflow.cloud",
560
+ },
561
+ {
562
+ service: "billing",
563
+ contract: "billing",
564
+ method: "GET",
565
+ path: "/api/v1/withdrawals",
566
+ operationId: "list-withdrawals",
567
+ securityScheme: "AccessToken",
568
+ upstreamUrl: "https://billing.leaflow.cloud",
569
+ },
570
+ {
571
+ service: "billing",
572
+ contract: "billing",
573
+ method: "POST",
574
+ path: "/api/v1/withdrawals",
575
+ operationId: "create-withdrawal",
576
+ securityScheme: "AccessToken",
577
+ upstreamUrl: "https://billing.leaflow.cloud",
578
+ },
579
+ {
580
+ service: "billing",
581
+ contract: "billing",
582
+ method: "POST",
583
+ path: "/api/v1/withdrawals/preview",
584
+ operationId: "preview-withdrawal",
585
+ securityScheme: "AccessToken",
586
+ upstreamUrl: "https://billing.leaflow.cloud",
587
+ },
588
+ {
589
+ service: "billing",
590
+ contract: "billing",
591
+ method: "GET",
592
+ path: "/api/v1/withdrawals/{withdrawalId}",
593
+ operationId: "get-withdrawal",
594
+ securityScheme: "AccessToken",
595
+ upstreamUrl: "https://billing.leaflow.cloud",
596
+ },
552
597
  {
553
598
  service: "billing",
554
599
  contract: "billing",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.129.1",
3
+ "version": "0.130.0",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {