@paygentic/sdk 0.6.19 → 0.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -5
- package/dist/commonjs/funcs/customersList.d.ts +1 -1
- package/dist/commonjs/funcs/customersList.d.ts.map +1 -1
- package/dist/commonjs/funcs/customersList.js +2 -2
- package/dist/commonjs/funcs/customersList.js.map +1 -1
- package/dist/commonjs/funcs/entitlementsGrantsCreate.d.ts +19 -0
- package/dist/commonjs/funcs/entitlementsGrantsCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/entitlementsGrantsCreate.js +127 -0
- package/dist/commonjs/funcs/entitlementsGrantsCreate.js.map +1 -0
- package/dist/commonjs/funcs/entitlementsGrantsGet.d.ts +19 -0
- package/dist/commonjs/funcs/entitlementsGrantsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/entitlementsGrantsGet.js +128 -0
- package/dist/commonjs/funcs/entitlementsGrantsGet.js.map +1 -0
- package/dist/commonjs/funcs/entitlementsGrantsList.d.ts +18 -0
- package/dist/commonjs/funcs/entitlementsGrantsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/entitlementsGrantsList.js +129 -0
- package/dist/commonjs/funcs/entitlementsGrantsList.js.map +1 -0
- package/dist/commonjs/funcs/entitlementsGrantsPurchase.d.ts +21 -0
- package/dist/commonjs/funcs/entitlementsGrantsPurchase.d.ts.map +1 -0
- package/dist/commonjs/funcs/entitlementsGrantsPurchase.js +129 -0
- package/dist/commonjs/funcs/entitlementsGrantsPurchase.js.map +1 -0
- package/dist/commonjs/funcs/entitlementsGrantsVoid.d.ts +19 -0
- package/dist/commonjs/funcs/entitlementsGrantsVoid.d.ts.map +1 -0
- package/dist/commonjs/funcs/entitlementsGrantsVoid.js +128 -0
- package/dist/commonjs/funcs/entitlementsGrantsVoid.js.map +1 -0
- package/dist/commonjs/funcs/revenueGet.d.ts +3 -3
- package/dist/commonjs/funcs/revenueGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/revenueGet.js +4 -4
- package/dist/commonjs/funcs/revenueGet.js.map +1 -1
- package/dist/commonjs/funcs/subscriptionsList.js +2 -0
- package/dist/commonjs/funcs/subscriptionsList.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/creategrantrequest.d.ts +30 -0
- package/dist/commonjs/models/creategrantrequest.d.ts.map +1 -0
- package/dist/commonjs/models/creategrantrequest.js +52 -0
- package/dist/commonjs/models/creategrantrequest.js.map +1 -0
- package/dist/commonjs/models/grant.d.ts +45 -0
- package/dist/commonjs/models/grant.d.ts.map +1 -0
- package/dist/commonjs/models/grant.js +64 -0
- package/dist/commonjs/models/grant.js.map +1 -0
- package/dist/commonjs/models/groupinvoicesummary.d.ts +21 -0
- package/dist/commonjs/models/groupinvoicesummary.d.ts.map +1 -0
- package/dist/commonjs/models/groupinvoicesummary.js +55 -0
- package/dist/commonjs/models/groupinvoicesummary.js.map +1 -0
- package/dist/commonjs/models/grouptrendentry.d.ts +21 -0
- package/dist/commonjs/models/grouptrendentry.d.ts.map +1 -0
- package/dist/commonjs/models/{revenuetimeseriesresponse.js → grouptrendentry.js} +9 -9
- package/dist/commonjs/models/grouptrendentry.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +11 -3
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +11 -3
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/invoicecategorysummary.d.ts +17 -0
- package/dist/commonjs/models/invoicecategorysummary.d.ts.map +1 -0
- package/dist/commonjs/models/{revenuestats.js → invoicecategorysummary.js} +8 -14
- package/dist/commonjs/models/invoicecategorysummary.js.map +1 -0
- package/dist/commonjs/models/invoicesummary.d.ts +14 -0
- package/dist/commonjs/models/invoicesummary.d.ts.map +1 -0
- package/dist/commonjs/models/invoicesummary.js +54 -0
- package/dist/commonjs/models/invoicesummary.js.map +1 -0
- package/dist/commonjs/models/operations/createentitlementgrant.d.ts +18 -0
- package/dist/commonjs/models/operations/createentitlementgrant.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createentitlementgrant.js +56 -0
- package/dist/commonjs/models/operations/createentitlementgrant.js.map +1 -0
- package/dist/commonjs/models/operations/getentitlementgrant.d.ts +20 -0
- package/dist/commonjs/models/operations/getentitlementgrant.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getentitlementgrant.js +50 -0
- package/dist/commonjs/models/operations/getentitlementgrant.js.map +1 -0
- package/dist/commonjs/models/operations/getrevenue.d.ts +19 -7
- package/dist/commonjs/models/operations/getrevenue.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getrevenue.js +14 -5
- package/dist/commonjs/models/operations/getrevenue.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +5 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +5 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listcustomers.d.ts +2 -2
- package/dist/commonjs/models/operations/listentitlementgrants.d.ts +54 -0
- package/dist/commonjs/models/operations/listentitlementgrants.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listentitlementgrants.js +69 -0
- package/dist/commonjs/models/operations/listentitlementgrants.js.map +1 -0
- package/dist/commonjs/models/operations/listsubscriptions.d.ts +23 -0
- package/dist/commonjs/models/operations/listsubscriptions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listsubscriptions.js +13 -1
- package/dist/commonjs/models/operations/listsubscriptions.js.map +1 -1
- package/dist/commonjs/models/operations/purchaseentitlementgrant.d.ts +18 -0
- package/dist/commonjs/models/operations/purchaseentitlementgrant.d.ts.map +1 -0
- package/dist/commonjs/models/operations/purchaseentitlementgrant.js +56 -0
- package/dist/commonjs/models/operations/purchaseentitlementgrant.js.map +1 -0
- package/dist/commonjs/models/operations/voidentitlementgrant.d.ts +20 -0
- package/dist/commonjs/models/operations/voidentitlementgrant.d.ts.map +1 -0
- package/dist/commonjs/models/operations/voidentitlementgrant.js +50 -0
- package/dist/commonjs/models/operations/voidentitlementgrant.js.map +1 -0
- package/dist/commonjs/models/paymentsummary.d.ts +33 -0
- package/dist/commonjs/models/paymentsummary.d.ts.map +1 -0
- package/dist/commonjs/models/paymentsummary.js +55 -0
- package/dist/commonjs/models/paymentsummary.js.map +1 -0
- package/dist/commonjs/models/purchasegrantrequest.d.ts +50 -0
- package/dist/commonjs/models/purchasegrantrequest.d.ts.map +1 -0
- package/dist/commonjs/models/purchasegrantrequest.js +56 -0
- package/dist/commonjs/models/purchasegrantrequest.js.map +1 -0
- package/dist/commonjs/models/purchasegrantresponse.d.ts +58 -0
- package/dist/commonjs/models/purchasegrantresponse.d.ts.map +1 -0
- package/dist/commonjs/models/purchasegrantresponse.js +71 -0
- package/dist/commonjs/models/purchasegrantresponse.js.map +1 -0
- package/dist/commonjs/models/revenuesummaryresponse.d.ts +31 -0
- package/dist/commonjs/models/revenuesummaryresponse.d.ts.map +1 -0
- package/dist/commonjs/models/revenuesummaryresponse.js +59 -0
- package/dist/commonjs/models/revenuesummaryresponse.js.map +1 -0
- package/dist/commonjs/models/revenuetrendbucket.d.ts +30 -0
- package/dist/commonjs/models/revenuetrendbucket.d.ts.map +1 -0
- package/dist/commonjs/models/{revenuetimebucket.js → revenuetrendbucket.js} +11 -9
- package/dist/commonjs/models/revenuetrendbucket.js.map +1 -0
- package/dist/commonjs/models/subscription.d.ts +38 -0
- package/dist/commonjs/models/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/subscription.js +33 -1
- package/dist/commonjs/models/subscription.js.map +1 -1
- package/dist/commonjs/sdk/entitlements.d.ts +3 -0
- package/dist/commonjs/sdk/entitlements.d.ts.map +1 -1
- package/dist/commonjs/sdk/entitlements.js +4 -0
- package/dist/commonjs/sdk/entitlements.js.map +1 -1
- package/dist/commonjs/sdk/grants.d.ts +43 -0
- package/dist/commonjs/sdk/grants.d.ts.map +1 -0
- package/dist/commonjs/sdk/grants.js +64 -0
- package/dist/commonjs/sdk/grants.js.map +1 -0
- package/dist/commonjs/sdk/revenue.d.ts +3 -3
- package/dist/commonjs/sdk/revenue.d.ts.map +1 -1
- package/dist/commonjs/sdk/revenue.js +2 -2
- package/dist/esm/funcs/customersList.d.ts +1 -1
- package/dist/esm/funcs/customersList.d.ts.map +1 -1
- package/dist/esm/funcs/customersList.js +2 -2
- package/dist/esm/funcs/customersList.js.map +1 -1
- package/dist/esm/funcs/entitlementsGrantsCreate.d.ts +19 -0
- package/dist/esm/funcs/entitlementsGrantsCreate.d.ts.map +1 -0
- package/dist/esm/funcs/entitlementsGrantsCreate.js +91 -0
- package/dist/esm/funcs/entitlementsGrantsCreate.js.map +1 -0
- package/dist/esm/funcs/entitlementsGrantsGet.d.ts +19 -0
- package/dist/esm/funcs/entitlementsGrantsGet.d.ts.map +1 -0
- package/dist/esm/funcs/entitlementsGrantsGet.js +92 -0
- package/dist/esm/funcs/entitlementsGrantsGet.js.map +1 -0
- package/dist/esm/funcs/entitlementsGrantsList.d.ts +18 -0
- package/dist/esm/funcs/entitlementsGrantsList.d.ts.map +1 -0
- package/dist/esm/funcs/entitlementsGrantsList.js +93 -0
- package/dist/esm/funcs/entitlementsGrantsList.js.map +1 -0
- package/dist/esm/funcs/entitlementsGrantsPurchase.d.ts +21 -0
- package/dist/esm/funcs/entitlementsGrantsPurchase.d.ts.map +1 -0
- package/dist/esm/funcs/entitlementsGrantsPurchase.js +93 -0
- package/dist/esm/funcs/entitlementsGrantsPurchase.js.map +1 -0
- package/dist/esm/funcs/entitlementsGrantsVoid.d.ts +19 -0
- package/dist/esm/funcs/entitlementsGrantsVoid.d.ts.map +1 -0
- package/dist/esm/funcs/entitlementsGrantsVoid.js +92 -0
- package/dist/esm/funcs/entitlementsGrantsVoid.js.map +1 -0
- package/dist/esm/funcs/revenueGet.d.ts +3 -3
- package/dist/esm/funcs/revenueGet.d.ts.map +1 -1
- package/dist/esm/funcs/revenueGet.js +4 -4
- package/dist/esm/funcs/revenueGet.js.map +1 -1
- package/dist/esm/funcs/subscriptionsList.js +2 -0
- package/dist/esm/funcs/subscriptionsList.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/creategrantrequest.d.ts +30 -0
- package/dist/esm/models/creategrantrequest.d.ts.map +1 -0
- package/dist/esm/models/creategrantrequest.js +15 -0
- package/dist/esm/models/creategrantrequest.js.map +1 -0
- package/dist/esm/models/grant.d.ts +45 -0
- package/dist/esm/models/grant.d.ts.map +1 -0
- package/dist/esm/models/grant.js +27 -0
- package/dist/esm/models/grant.js.map +1 -0
- package/dist/esm/models/groupinvoicesummary.d.ts +21 -0
- package/dist/esm/models/groupinvoicesummary.d.ts.map +1 -0
- package/dist/esm/models/groupinvoicesummary.js +18 -0
- package/dist/esm/models/groupinvoicesummary.js.map +1 -0
- package/dist/esm/models/grouptrendentry.d.ts +21 -0
- package/dist/esm/models/grouptrendentry.d.ts.map +1 -0
- package/dist/esm/models/grouptrendentry.js +15 -0
- package/dist/esm/models/grouptrendentry.js.map +1 -0
- package/dist/esm/models/index.d.ts +11 -3
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +11 -3
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/invoicecategorysummary.d.ts +17 -0
- package/dist/esm/models/invoicecategorysummary.d.ts.map +1 -0
- package/dist/esm/models/invoicecategorysummary.js +14 -0
- package/dist/esm/models/invoicecategorysummary.js.map +1 -0
- package/dist/esm/models/invoicesummary.d.ts +14 -0
- package/dist/esm/models/invoicesummary.d.ts.map +1 -0
- package/dist/esm/models/invoicesummary.js +17 -0
- package/dist/esm/models/invoicesummary.js.map +1 -0
- package/dist/esm/models/operations/createentitlementgrant.d.ts +18 -0
- package/dist/esm/models/operations/createentitlementgrant.d.ts.map +1 -0
- package/dist/esm/models/operations/createentitlementgrant.js +19 -0
- package/dist/esm/models/operations/createentitlementgrant.js.map +1 -0
- package/dist/esm/models/operations/getentitlementgrant.d.ts +20 -0
- package/dist/esm/models/operations/getentitlementgrant.d.ts.map +1 -0
- package/dist/esm/models/operations/getentitlementgrant.js +13 -0
- package/dist/esm/models/operations/getentitlementgrant.js.map +1 -0
- package/dist/esm/models/operations/getrevenue.d.ts +19 -7
- package/dist/esm/models/operations/getrevenue.d.ts.map +1 -1
- package/dist/esm/models/operations/getrevenue.js +13 -4
- package/dist/esm/models/operations/getrevenue.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +5 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +5 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listcustomers.d.ts +2 -2
- package/dist/esm/models/operations/listentitlementgrants.d.ts +54 -0
- package/dist/esm/models/operations/listentitlementgrants.d.ts.map +1 -0
- package/dist/esm/models/operations/listentitlementgrants.js +31 -0
- package/dist/esm/models/operations/listentitlementgrants.js.map +1 -0
- package/dist/esm/models/operations/listsubscriptions.d.ts +23 -0
- package/dist/esm/models/operations/listsubscriptions.d.ts.map +1 -1
- package/dist/esm/models/operations/listsubscriptions.js +12 -0
- package/dist/esm/models/operations/listsubscriptions.js.map +1 -1
- package/dist/esm/models/operations/purchaseentitlementgrant.d.ts +18 -0
- package/dist/esm/models/operations/purchaseentitlementgrant.d.ts.map +1 -0
- package/dist/esm/models/operations/purchaseentitlementgrant.js +19 -0
- package/dist/esm/models/operations/purchaseentitlementgrant.js.map +1 -0
- package/dist/esm/models/operations/voidentitlementgrant.d.ts +20 -0
- package/dist/esm/models/operations/voidentitlementgrant.d.ts.map +1 -0
- package/dist/esm/models/operations/voidentitlementgrant.js +13 -0
- package/dist/esm/models/operations/voidentitlementgrant.js.map +1 -0
- package/dist/esm/models/paymentsummary.d.ts +33 -0
- package/dist/esm/models/paymentsummary.d.ts.map +1 -0
- package/dist/esm/models/paymentsummary.js +18 -0
- package/dist/esm/models/paymentsummary.js.map +1 -0
- package/dist/esm/models/purchasegrantrequest.d.ts +50 -0
- package/dist/esm/models/purchasegrantrequest.d.ts.map +1 -0
- package/dist/esm/models/purchasegrantrequest.js +19 -0
- package/dist/esm/models/purchasegrantrequest.js.map +1 -0
- package/dist/esm/models/purchasegrantresponse.d.ts +58 -0
- package/dist/esm/models/purchasegrantresponse.d.ts.map +1 -0
- package/dist/esm/models/purchasegrantresponse.js +33 -0
- package/dist/esm/models/purchasegrantresponse.js.map +1 -0
- package/dist/esm/models/revenuesummaryresponse.d.ts +31 -0
- package/dist/esm/models/revenuesummaryresponse.d.ts.map +1 -0
- package/dist/esm/models/revenuesummaryresponse.js +22 -0
- package/dist/esm/models/revenuesummaryresponse.js.map +1 -0
- package/dist/esm/models/revenuetrendbucket.d.ts +30 -0
- package/dist/esm/models/revenuetrendbucket.d.ts.map +1 -0
- package/dist/esm/models/revenuetrendbucket.js +18 -0
- package/dist/esm/models/revenuetrendbucket.js.map +1 -0
- package/dist/esm/models/subscription.d.ts +38 -0
- package/dist/esm/models/subscription.d.ts.map +1 -1
- package/dist/esm/models/subscription.js +29 -0
- package/dist/esm/models/subscription.js.map +1 -1
- package/dist/esm/sdk/entitlements.d.ts +3 -0
- package/dist/esm/sdk/entitlements.d.ts.map +1 -1
- package/dist/esm/sdk/entitlements.js +4 -0
- package/dist/esm/sdk/entitlements.js.map +1 -1
- package/dist/esm/sdk/grants.d.ts +43 -0
- package/dist/esm/sdk/grants.d.ts.map +1 -0
- package/dist/esm/sdk/grants.js +60 -0
- package/dist/esm/sdk/grants.js.map +1 -0
- package/dist/esm/sdk/revenue.d.ts +3 -3
- package/dist/esm/sdk/revenue.d.ts.map +1 -1
- package/dist/esm/sdk/revenue.js +2 -2
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/customersList.ts +5 -1
- package/src/funcs/entitlementsGrantsCreate.ts +187 -0
- package/src/funcs/entitlementsGrantsGet.ts +188 -0
- package/src/funcs/entitlementsGrantsList.ts +190 -0
- package/src/funcs/entitlementsGrantsPurchase.ts +189 -0
- package/src/funcs/entitlementsGrantsVoid.ts +188 -0
- package/src/funcs/revenueGet.ts +7 -7
- package/src/funcs/subscriptionsList.ts +2 -0
- package/src/lib/config.ts +3 -3
- package/src/models/creategrantrequest.ts +52 -0
- package/src/models/grant.ts +81 -0
- package/src/models/groupinvoicesummary.ts +49 -0
- package/src/models/grouptrendentry.ts +44 -0
- package/src/models/index.ts +11 -3
- package/src/models/invoicecategorysummary.ts +39 -0
- package/src/models/invoicesummary.ts +41 -0
- package/src/models/operations/createentitlementgrant.ts +45 -0
- package/src/models/operations/getentitlementgrant.ts +40 -0
- package/src/models/operations/getrevenue.ts +24 -9
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/listcustomers.ts +2 -2
- package/src/models/operations/listentitlementgrants.ts +104 -0
- package/src/models/operations/listsubscriptions.ts +28 -0
- package/src/models/operations/purchaseentitlementgrant.ts +45 -0
- package/src/models/operations/voidentitlementgrant.ts +42 -0
- package/src/models/paymentsummary.ts +59 -0
- package/src/models/purchasegrantrequest.ts +76 -0
- package/src/models/purchasegrantresponse.ts +112 -0
- package/src/models/revenuesummaryresponse.ts +69 -0
- package/src/models/revenuetrendbucket.ts +58 -0
- package/src/models/subscription.ts +97 -0
- package/src/sdk/entitlements.ts +6 -0
- package/src/sdk/grants.ts +102 -0
- package/src/sdk/revenue.ts +3 -3
- package/dist/commonjs/models/revenuestats.d.ts +0 -41
- package/dist/commonjs/models/revenuestats.d.ts.map +0 -1
- package/dist/commonjs/models/revenuestats.js.map +0 -1
- package/dist/commonjs/models/revenuetimebucket.d.ts +0 -21
- package/dist/commonjs/models/revenuetimebucket.d.ts.map +0 -1
- package/dist/commonjs/models/revenuetimebucket.js.map +0 -1
- package/dist/commonjs/models/revenuetimeseriesresponse.d.ts +0 -18
- package/dist/commonjs/models/revenuetimeseriesresponse.d.ts.map +0 -1
- package/dist/commonjs/models/revenuetimeseriesresponse.js.map +0 -1
- package/dist/esm/models/revenuestats.d.ts +0 -41
- package/dist/esm/models/revenuestats.d.ts.map +0 -1
- package/dist/esm/models/revenuestats.js +0 -20
- package/dist/esm/models/revenuestats.js.map +0 -1
- package/dist/esm/models/revenuetimebucket.d.ts +0 -21
- package/dist/esm/models/revenuetimebucket.d.ts.map +0 -1
- package/dist/esm/models/revenuetimebucket.js +0 -16
- package/dist/esm/models/revenuetimebucket.js.map +0 -1
- package/dist/esm/models/revenuetimeseriesresponse.d.ts +0 -18
- package/dist/esm/models/revenuetimeseriesresponse.d.ts.map +0 -1
- package/dist/esm/models/revenuetimeseriesresponse.js +0 -15
- package/dist/esm/models/revenuetimeseriesresponse.js.map +0 -1
- package/src/models/revenuestats.ts +0 -69
- package/src/models/revenuetimebucket.ts +0 -42
- package/src/models/revenuetimeseriesresponse.ts +0 -43
package/src/models/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./billablemetric.js";
|
|
|
9
9
|
export * from "./booleanentitlementdetail.js";
|
|
10
10
|
export * from "./createdisputerequest.js";
|
|
11
11
|
export * from "./createentitlementrequest.js";
|
|
12
|
+
export * from "./creategrantrequest.js";
|
|
12
13
|
export * from "./createmanuallineitemrequest.js";
|
|
13
14
|
export * from "./createrulerequest.js";
|
|
14
15
|
export * from "./createusageeventrequest.js";
|
|
@@ -23,9 +24,14 @@ export * from "./eventresponse.js";
|
|
|
23
24
|
export * from "./feature.js";
|
|
24
25
|
export * from "./fee.js";
|
|
25
26
|
export * from "./feeprice.js";
|
|
27
|
+
export * from "./grant.js";
|
|
28
|
+
export * from "./groupinvoicesummary.js";
|
|
29
|
+
export * from "./grouptrendentry.js";
|
|
26
30
|
export * from "./invoice.js";
|
|
31
|
+
export * from "./invoicecategorysummary.js";
|
|
27
32
|
export * from "./invoicelineitem.js";
|
|
28
33
|
export * from "./invoicelineitemsresponse.js";
|
|
34
|
+
export * from "./invoicesummary.js";
|
|
29
35
|
export * from "./issueentitlementrequest.js";
|
|
30
36
|
export * from "./lineitem.js";
|
|
31
37
|
export * from "./lineitemsresponse.js";
|
|
@@ -33,15 +39,17 @@ export * from "./lineitemssummary.js";
|
|
|
33
39
|
export * from "./meteredentitlementdetail.js";
|
|
34
40
|
export * from "./offsetpagination.js";
|
|
35
41
|
export * from "./payment.js";
|
|
42
|
+
export * from "./paymentsummary.js";
|
|
36
43
|
export * from "./plan.js";
|
|
37
44
|
export * from "./price.js";
|
|
38
45
|
export * from "./pricefeature.js";
|
|
39
46
|
export * from "./pricefeatureinput.js";
|
|
40
47
|
export * from "./pricepropertiesunion.js";
|
|
41
48
|
export * from "./product.js";
|
|
42
|
-
export * from "./
|
|
43
|
-
export * from "./
|
|
44
|
-
export * from "./
|
|
49
|
+
export * from "./purchasegrantrequest.js";
|
|
50
|
+
export * from "./purchasegrantresponse.js";
|
|
51
|
+
export * from "./revenuesummaryresponse.js";
|
|
52
|
+
export * from "./revenuetrendbucket.js";
|
|
45
53
|
export * from "./rulecondition.js";
|
|
46
54
|
export * from "./schemasentitlement.js";
|
|
47
55
|
export * from "./schemasprice.js";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type InvoiceCategorySummary = {
|
|
11
|
+
/**
|
|
12
|
+
* Number of invoices in this category
|
|
13
|
+
*/
|
|
14
|
+
count: number;
|
|
15
|
+
/**
|
|
16
|
+
* Total amount of invoices in this category in dollars
|
|
17
|
+
*/
|
|
18
|
+
amount: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const InvoiceCategorySummary$inboundSchema: z.ZodType<
|
|
23
|
+
InvoiceCategorySummary,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
count: z.number().int(),
|
|
28
|
+
amount: z.string(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export function invoiceCategorySummaryFromJSON(
|
|
32
|
+
jsonString: string,
|
|
33
|
+
): SafeParseResult<InvoiceCategorySummary, SDKValidationError> {
|
|
34
|
+
return safeParse(
|
|
35
|
+
jsonString,
|
|
36
|
+
(x) => InvoiceCategorySummary$inboundSchema.parse(JSON.parse(x)),
|
|
37
|
+
`Failed to parse 'InvoiceCategorySummary' from JSON`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
InvoiceCategorySummary,
|
|
11
|
+
InvoiceCategorySummary$inboundSchema,
|
|
12
|
+
} from "./invoicecategorysummary.js";
|
|
13
|
+
|
|
14
|
+
export type InvoiceSummary = {
|
|
15
|
+
issued: InvoiceCategorySummary;
|
|
16
|
+
outstanding: InvoiceCategorySummary;
|
|
17
|
+
paid: InvoiceCategorySummary;
|
|
18
|
+
writtenOff: InvoiceCategorySummary;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const InvoiceSummary$inboundSchema: z.ZodType<
|
|
23
|
+
InvoiceSummary,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
issued: InvoiceCategorySummary$inboundSchema,
|
|
28
|
+
outstanding: InvoiceCategorySummary$inboundSchema,
|
|
29
|
+
paid: InvoiceCategorySummary$inboundSchema,
|
|
30
|
+
writtenOff: InvoiceCategorySummary$inboundSchema,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export function invoiceSummaryFromJSON(
|
|
34
|
+
jsonString: string,
|
|
35
|
+
): SafeParseResult<InvoiceSummary, SDKValidationError> {
|
|
36
|
+
return safeParse(
|
|
37
|
+
jsonString,
|
|
38
|
+
(x) => InvoiceSummary$inboundSchema.parse(JSON.parse(x)),
|
|
39
|
+
`Failed to parse 'InvoiceSummary' from JSON`,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
|
|
9
|
+
export type CreateEntitlementGrantRequest = {
|
|
10
|
+
/**
|
|
11
|
+
* The unique identifier of the entitlement to grant credits to.
|
|
12
|
+
*/
|
|
13
|
+
entitlementId: string;
|
|
14
|
+
createGrantRequest: models.CreateGrantRequest;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type CreateEntitlementGrantRequest$Outbound = {
|
|
19
|
+
entitlementId: string;
|
|
20
|
+
CreateGrantRequest: models.CreateGrantRequest$Outbound;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const CreateEntitlementGrantRequest$outboundSchema: z.ZodType<
|
|
25
|
+
CreateEntitlementGrantRequest$Outbound,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
CreateEntitlementGrantRequest
|
|
28
|
+
> = z.object({
|
|
29
|
+
entitlementId: z.string(),
|
|
30
|
+
createGrantRequest: models.CreateGrantRequest$outboundSchema,
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
createGrantRequest: "CreateGrantRequest",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function createEntitlementGrantRequestToJSON(
|
|
38
|
+
createEntitlementGrantRequest: CreateEntitlementGrantRequest,
|
|
39
|
+
): string {
|
|
40
|
+
return JSON.stringify(
|
|
41
|
+
CreateEntitlementGrantRequest$outboundSchema.parse(
|
|
42
|
+
createEntitlementGrantRequest,
|
|
43
|
+
),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type GetEntitlementGrantRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The unique identifier of the entitlement.
|
|
10
|
+
*/
|
|
11
|
+
entitlementId: string;
|
|
12
|
+
/**
|
|
13
|
+
* The unique identifier of the grant.
|
|
14
|
+
*/
|
|
15
|
+
grantId: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export type GetEntitlementGrantRequest$Outbound = {
|
|
20
|
+
entitlementId: string;
|
|
21
|
+
grantId: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const GetEntitlementGrantRequest$outboundSchema: z.ZodType<
|
|
26
|
+
GetEntitlementGrantRequest$Outbound,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
GetEntitlementGrantRequest
|
|
29
|
+
> = z.object({
|
|
30
|
+
entitlementId: z.string(),
|
|
31
|
+
grantId: z.string(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function getEntitlementGrantRequestToJSON(
|
|
35
|
+
getEntitlementGrantRequest: GetEntitlementGrantRequest,
|
|
36
|
+
): string {
|
|
37
|
+
return JSON.stringify(
|
|
38
|
+
GetEntitlementGrantRequest$outboundSchema.parse(getEntitlementGrantRequest),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -6,18 +6,29 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Time bucket granularity
|
|
9
|
+
* Time bucket granularity for trend data
|
|
10
10
|
*/
|
|
11
11
|
export const BucketWidth = {
|
|
12
|
-
Minute: "minute",
|
|
13
12
|
Hour: "hour",
|
|
14
13
|
Day: "day",
|
|
14
|
+
Week: "week",
|
|
15
15
|
} as const;
|
|
16
16
|
/**
|
|
17
|
-
* Time bucket granularity
|
|
17
|
+
* Time bucket granularity for trend data
|
|
18
18
|
*/
|
|
19
19
|
export type BucketWidth = ClosedEnum<typeof BucketWidth>;
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Group invoice data by dimension. Max 5 groups (top 4 + 'other' when exceeding).
|
|
23
|
+
*/
|
|
24
|
+
export const GroupBy = {
|
|
25
|
+
Plan: "plan",
|
|
26
|
+
} as const;
|
|
27
|
+
/**
|
|
28
|
+
* Group invoice data by dimension. Max 5 groups (top 4 + 'other' when exceeding).
|
|
29
|
+
*/
|
|
30
|
+
export type GroupBy = ClosedEnum<typeof GroupBy>;
|
|
31
|
+
|
|
21
32
|
export type GetRevenueRequest = {
|
|
22
33
|
/**
|
|
23
34
|
* Start of the time range (ISO 8601 format)
|
|
@@ -28,7 +39,7 @@ export type GetRevenueRequest = {
|
|
|
28
39
|
*/
|
|
29
40
|
endTime: Date;
|
|
30
41
|
/**
|
|
31
|
-
* Time bucket granularity
|
|
42
|
+
* Time bucket granularity for trend data
|
|
32
43
|
*/
|
|
33
44
|
bucketWidth?: BucketWidth | undefined;
|
|
34
45
|
/**
|
|
@@ -44,15 +55,19 @@ export type GetRevenueRequest = {
|
|
|
44
55
|
*/
|
|
45
56
|
subscriptionIds?: Array<string> | undefined;
|
|
46
57
|
/**
|
|
47
|
-
*
|
|
58
|
+
* Group invoice data by dimension. Max 5 groups (top 4 + 'other' when exceeding).
|
|
48
59
|
*/
|
|
49
|
-
|
|
60
|
+
groupBy?: GroupBy | undefined;
|
|
50
61
|
};
|
|
51
62
|
|
|
52
63
|
/** @internal */
|
|
53
64
|
export const BucketWidth$outboundSchema: z.ZodNativeEnum<typeof BucketWidth> = z
|
|
54
65
|
.nativeEnum(BucketWidth);
|
|
55
66
|
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const GroupBy$outboundSchema: z.ZodNativeEnum<typeof GroupBy> = z
|
|
69
|
+
.nativeEnum(GroupBy);
|
|
70
|
+
|
|
56
71
|
/** @internal */
|
|
57
72
|
export type GetRevenueRequest$Outbound = {
|
|
58
73
|
startTime: string;
|
|
@@ -61,7 +76,7 @@ export type GetRevenueRequest$Outbound = {
|
|
|
61
76
|
merchantId?: string | undefined;
|
|
62
77
|
customerId?: string | undefined;
|
|
63
78
|
subscriptionIds?: Array<string> | undefined;
|
|
64
|
-
|
|
79
|
+
groupBy?: string | undefined;
|
|
65
80
|
};
|
|
66
81
|
|
|
67
82
|
/** @internal */
|
|
@@ -72,11 +87,11 @@ export const GetRevenueRequest$outboundSchema: z.ZodType<
|
|
|
72
87
|
> = z.object({
|
|
73
88
|
startTime: z.date().transform(v => v.toISOString()),
|
|
74
89
|
endTime: z.date().transform(v => v.toISOString()),
|
|
75
|
-
bucketWidth: BucketWidth$outboundSchema.default("
|
|
90
|
+
bucketWidth: BucketWidth$outboundSchema.default("day"),
|
|
76
91
|
merchantId: z.string().optional(),
|
|
77
92
|
customerId: z.string().optional(),
|
|
78
93
|
subscriptionIds: z.array(z.string()).optional(),
|
|
79
|
-
|
|
94
|
+
groupBy: GroupBy$outboundSchema.optional(),
|
|
80
95
|
});
|
|
81
96
|
|
|
82
97
|
export function getRevenueRequestToJSON(
|
|
@@ -9,6 +9,7 @@ export * from "./bulkapprovesourceevents.js";
|
|
|
9
9
|
export * from "./bulkrejectsourceevents.js";
|
|
10
10
|
export * from "./createbillablemetric.js";
|
|
11
11
|
export * from "./createcustomer.js";
|
|
12
|
+
export * from "./createentitlementgrant.js";
|
|
12
13
|
export * from "./createfeature.js";
|
|
13
14
|
export * from "./createfee.js";
|
|
14
15
|
export * from "./createlineitem.js";
|
|
@@ -31,6 +32,7 @@ export * from "./getbillablemetric.js";
|
|
|
31
32
|
export * from "./getbillablemetricmeter.js";
|
|
32
33
|
export * from "./getcustomer.js";
|
|
33
34
|
export * from "./getentitlement.js";
|
|
35
|
+
export * from "./getentitlementgrant.js";
|
|
34
36
|
export * from "./getfeature.js";
|
|
35
37
|
export * from "./getfee.js";
|
|
36
38
|
export * from "./getfeeprice.js";
|
|
@@ -52,6 +54,7 @@ export * from "./listavailableplans.js";
|
|
|
52
54
|
export * from "./listbillablemetrics.js";
|
|
53
55
|
export * from "./listcustomers.js";
|
|
54
56
|
export * from "./listdisputes.js";
|
|
57
|
+
export * from "./listentitlementgrants.js";
|
|
55
58
|
export * from "./listentitlements.js";
|
|
56
59
|
export * from "./listfeatures.js";
|
|
57
60
|
export * from "./listfees.js";
|
|
@@ -67,6 +70,7 @@ export * from "./listsources.js";
|
|
|
67
70
|
export * from "./listsubscriptions.js";
|
|
68
71
|
export * from "./listtestclocks.js";
|
|
69
72
|
export * from "./listusageevents.js";
|
|
73
|
+
export * from "./purchaseentitlementgrant.js";
|
|
70
74
|
export * from "./refundusageevent.js";
|
|
71
75
|
export * from "./rejectsourceevent.js";
|
|
72
76
|
export * from "./terminatesubscription.js";
|
|
@@ -80,3 +84,4 @@ export * from "./updateproduct.js";
|
|
|
80
84
|
export * from "./updatesource.js";
|
|
81
85
|
export * from "./updatesourcerule.js";
|
|
82
86
|
export * from "./updateuser.js";
|
|
87
|
+
export * from "./voidentitlementgrant.js";
|
|
@@ -19,11 +19,11 @@ export type ListCustomersRequest = {
|
|
|
19
19
|
*/
|
|
20
20
|
offset?: number | undefined;
|
|
21
21
|
/**
|
|
22
|
-
* Filter customers by consumer name (case-insensitive substring match)
|
|
22
|
+
* Filter customers by consumer name (case-insensitive substring match). Minimum 3 characters required for efficient index usage.
|
|
23
23
|
*/
|
|
24
24
|
name?: string | undefined;
|
|
25
25
|
/**
|
|
26
|
-
* Filter customers by billing email (case-insensitive substring match). Accepts partial values — e.g. a domain ("acme.com") or local part ("billing").
|
|
26
|
+
* Filter customers by billing email (case-insensitive substring match). Minimum 3 characters required for efficient index usage. Accepts partial values — e.g. a domain ("acme.com") or local part ("billing").
|
|
27
27
|
*/
|
|
28
28
|
email?: string | undefined;
|
|
29
29
|
/**
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import * as models from "../index.js";
|
|
11
|
+
|
|
12
|
+
export type ListEntitlementGrantsRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* The unique identifier of the entitlement.
|
|
15
|
+
*/
|
|
16
|
+
entitlementId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Maximum number of grants to return per page.
|
|
19
|
+
*/
|
|
20
|
+
limit?: number | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Number of grants to skip.
|
|
23
|
+
*/
|
|
24
|
+
offset?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* When true, voided grants are included in the response.
|
|
27
|
+
*/
|
|
28
|
+
includeVoided?: boolean | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const ListEntitlementGrantsObject = {
|
|
32
|
+
List: "list",
|
|
33
|
+
} as const;
|
|
34
|
+
export type ListEntitlementGrantsObject = ClosedEnum<
|
|
35
|
+
typeof ListEntitlementGrantsObject
|
|
36
|
+
>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Successfully retrieved the list of grants.
|
|
40
|
+
*/
|
|
41
|
+
export type ListEntitlementGrantsResponse = {
|
|
42
|
+
object: ListEntitlementGrantsObject;
|
|
43
|
+
data: Array<models.Grant>;
|
|
44
|
+
/**
|
|
45
|
+
* Offset-based pagination response.
|
|
46
|
+
*/
|
|
47
|
+
pagination: models.OffsetPagination;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export type ListEntitlementGrantsRequest$Outbound = {
|
|
52
|
+
entitlementId: string;
|
|
53
|
+
limit: number;
|
|
54
|
+
offset: number;
|
|
55
|
+
includeVoided: boolean;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const ListEntitlementGrantsRequest$outboundSchema: z.ZodType<
|
|
60
|
+
ListEntitlementGrantsRequest$Outbound,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
ListEntitlementGrantsRequest
|
|
63
|
+
> = z.object({
|
|
64
|
+
entitlementId: z.string(),
|
|
65
|
+
limit: z.number().int().default(20),
|
|
66
|
+
offset: z.number().int().default(0),
|
|
67
|
+
includeVoided: z.boolean().default(false),
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export function listEntitlementGrantsRequestToJSON(
|
|
71
|
+
listEntitlementGrantsRequest: ListEntitlementGrantsRequest,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
ListEntitlementGrantsRequest$outboundSchema.parse(
|
|
75
|
+
listEntitlementGrantsRequest,
|
|
76
|
+
),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const ListEntitlementGrantsObject$inboundSchema: z.ZodNativeEnum<
|
|
82
|
+
typeof ListEntitlementGrantsObject
|
|
83
|
+
> = z.nativeEnum(ListEntitlementGrantsObject);
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const ListEntitlementGrantsResponse$inboundSchema: z.ZodType<
|
|
87
|
+
ListEntitlementGrantsResponse,
|
|
88
|
+
z.ZodTypeDef,
|
|
89
|
+
unknown
|
|
90
|
+
> = z.object({
|
|
91
|
+
object: ListEntitlementGrantsObject$inboundSchema.default("list"),
|
|
92
|
+
data: z.array(models.Grant$inboundSchema),
|
|
93
|
+
pagination: models.OffsetPagination$inboundSchema,
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
export function listEntitlementGrantsResponseFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<ListEntitlementGrantsResponse, SDKValidationError> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) => ListEntitlementGrantsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
+
`Failed to parse 'ListEntitlementGrantsResponse' from JSON`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -12,11 +12,23 @@ import * as models from "../index.js";
|
|
|
12
12
|
export const ListSubscriptionsStatus = {
|
|
13
13
|
Active: "active",
|
|
14
14
|
Terminated: "terminated",
|
|
15
|
+
PendingPayment: "pending_payment",
|
|
15
16
|
} as const;
|
|
16
17
|
export type ListSubscriptionsStatus = ClosedEnum<
|
|
17
18
|
typeof ListSubscriptionsStatus
|
|
18
19
|
>;
|
|
19
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Include related resources. When 'customer' is specified, each subscription includes merchant and consumer details.
|
|
23
|
+
*/
|
|
24
|
+
export const Include = {
|
|
25
|
+
Customer: "customer",
|
|
26
|
+
} as const;
|
|
27
|
+
/**
|
|
28
|
+
* Include related resources. When 'customer' is specified, each subscription includes merchant and consumer details.
|
|
29
|
+
*/
|
|
30
|
+
export type Include = ClosedEnum<typeof Include>;
|
|
31
|
+
|
|
20
32
|
export type ListSubscriptionsRequest = {
|
|
21
33
|
consumerId?: string | undefined;
|
|
22
34
|
customerId?: string | undefined;
|
|
@@ -30,6 +42,14 @@ export type ListSubscriptionsRequest = {
|
|
|
30
42
|
*/
|
|
31
43
|
offset?: string | undefined;
|
|
32
44
|
status?: ListSubscriptionsStatus | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Filter subscriptions started at or before this ISO 8601 date-time
|
|
47
|
+
*/
|
|
48
|
+
startedBefore?: Date | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Include related resources. When 'customer' is specified, each subscription includes merchant and consumer details.
|
|
51
|
+
*/
|
|
52
|
+
include?: Include | undefined;
|
|
33
53
|
};
|
|
34
54
|
|
|
35
55
|
/**
|
|
@@ -48,6 +68,10 @@ export const ListSubscriptionsStatus$outboundSchema: z.ZodNativeEnum<
|
|
|
48
68
|
typeof ListSubscriptionsStatus
|
|
49
69
|
> = z.nativeEnum(ListSubscriptionsStatus);
|
|
50
70
|
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const Include$outboundSchema: z.ZodNativeEnum<typeof Include> = z
|
|
73
|
+
.nativeEnum(Include);
|
|
74
|
+
|
|
51
75
|
/** @internal */
|
|
52
76
|
export type ListSubscriptionsRequest$Outbound = {
|
|
53
77
|
consumerId?: string | undefined;
|
|
@@ -56,6 +80,8 @@ export type ListSubscriptionsRequest$Outbound = {
|
|
|
56
80
|
merchantId?: string | undefined;
|
|
57
81
|
offset: string;
|
|
58
82
|
status?: string | undefined;
|
|
83
|
+
startedBefore?: string | undefined;
|
|
84
|
+
include?: string | undefined;
|
|
59
85
|
};
|
|
60
86
|
|
|
61
87
|
/** @internal */
|
|
@@ -70,6 +96,8 @@ export const ListSubscriptionsRequest$outboundSchema: z.ZodType<
|
|
|
70
96
|
merchantId: z.string().optional(),
|
|
71
97
|
offset: z.string().default("0"),
|
|
72
98
|
status: ListSubscriptionsStatus$outboundSchema.optional(),
|
|
99
|
+
startedBefore: z.date().transform(v => v.toISOString()).optional(),
|
|
100
|
+
include: Include$outboundSchema.optional(),
|
|
73
101
|
});
|
|
74
102
|
|
|
75
103
|
export function listSubscriptionsRequestToJSON(
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
|
|
9
|
+
export type PurchaseEntitlementGrantRequest = {
|
|
10
|
+
/**
|
|
11
|
+
* The unique identifier of the entitlement to purchase credits for.
|
|
12
|
+
*/
|
|
13
|
+
entitlementId: string;
|
|
14
|
+
purchaseGrantRequest: models.PurchaseGrantRequest;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type PurchaseEntitlementGrantRequest$Outbound = {
|
|
19
|
+
entitlementId: string;
|
|
20
|
+
PurchaseGrantRequest: models.PurchaseGrantRequest$Outbound;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const PurchaseEntitlementGrantRequest$outboundSchema: z.ZodType<
|
|
25
|
+
PurchaseEntitlementGrantRequest$Outbound,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
PurchaseEntitlementGrantRequest
|
|
28
|
+
> = z.object({
|
|
29
|
+
entitlementId: z.string(),
|
|
30
|
+
purchaseGrantRequest: models.PurchaseGrantRequest$outboundSchema,
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
purchaseGrantRequest: "PurchaseGrantRequest",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function purchaseEntitlementGrantRequestToJSON(
|
|
38
|
+
purchaseEntitlementGrantRequest: PurchaseEntitlementGrantRequest,
|
|
39
|
+
): string {
|
|
40
|
+
return JSON.stringify(
|
|
41
|
+
PurchaseEntitlementGrantRequest$outboundSchema.parse(
|
|
42
|
+
purchaseEntitlementGrantRequest,
|
|
43
|
+
),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type VoidEntitlementGrantRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The unique identifier of the entitlement.
|
|
10
|
+
*/
|
|
11
|
+
entitlementId: string;
|
|
12
|
+
/**
|
|
13
|
+
* The unique identifier of the grant to void.
|
|
14
|
+
*/
|
|
15
|
+
grantId: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export type VoidEntitlementGrantRequest$Outbound = {
|
|
20
|
+
entitlementId: string;
|
|
21
|
+
grantId: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const VoidEntitlementGrantRequest$outboundSchema: z.ZodType<
|
|
26
|
+
VoidEntitlementGrantRequest$Outbound,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
VoidEntitlementGrantRequest
|
|
29
|
+
> = z.object({
|
|
30
|
+
entitlementId: z.string(),
|
|
31
|
+
grantId: z.string(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function voidEntitlementGrantRequestToJSON(
|
|
35
|
+
voidEntitlementGrantRequest: VoidEntitlementGrantRequest,
|
|
36
|
+
): string {
|
|
37
|
+
return JSON.stringify(
|
|
38
|
+
VoidEntitlementGrantRequest$outboundSchema.parse(
|
|
39
|
+
voidEntitlementGrantRequest,
|
|
40
|
+
),
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type PaymentSummary = {
|
|
11
|
+
/**
|
|
12
|
+
* Number of completed payment links in the period
|
|
13
|
+
*/
|
|
14
|
+
completedCount: number;
|
|
15
|
+
/**
|
|
16
|
+
* Total amount of completed payment links in dollars
|
|
17
|
+
*/
|
|
18
|
+
completedAmount: string;
|
|
19
|
+
/**
|
|
20
|
+
* Number of pending payment links in the period
|
|
21
|
+
*/
|
|
22
|
+
pendingCount: number;
|
|
23
|
+
/**
|
|
24
|
+
* Total amount of pending payment links in dollars
|
|
25
|
+
*/
|
|
26
|
+
pendingAmount: string;
|
|
27
|
+
/**
|
|
28
|
+
* Number of expired payment links in the period
|
|
29
|
+
*/
|
|
30
|
+
expiredCount: number;
|
|
31
|
+
/**
|
|
32
|
+
* Total amount of expired payment links in dollars
|
|
33
|
+
*/
|
|
34
|
+
expiredAmount: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const PaymentSummary$inboundSchema: z.ZodType<
|
|
39
|
+
PaymentSummary,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
completedCount: z.number().int(),
|
|
44
|
+
completedAmount: z.string(),
|
|
45
|
+
pendingCount: z.number().int(),
|
|
46
|
+
pendingAmount: z.string(),
|
|
47
|
+
expiredCount: z.number().int(),
|
|
48
|
+
expiredAmount: z.string(),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export function paymentSummaryFromJSON(
|
|
52
|
+
jsonString: string,
|
|
53
|
+
): SafeParseResult<PaymentSummary, SDKValidationError> {
|
|
54
|
+
return safeParse(
|
|
55
|
+
jsonString,
|
|
56
|
+
(x) => PaymentSummary$inboundSchema.parse(JSON.parse(x)),
|
|
57
|
+
`Failed to parse 'PaymentSummary' from JSON`,
|
|
58
|
+
);
|
|
59
|
+
}
|