@polar-sh/sdk 0.8.1 → 0.9.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.
- package/README.md +7 -6
- package/docs/sdks/products/README.md +2 -2
- package/funcs/advertisementsList.js +2 -2
- package/funcs/advertisementsList.js.map +1 -1
- package/funcs/articlesList.js +2 -2
- package/funcs/articlesList.js.map +1 -1
- package/funcs/benefitsGrants.js +2 -2
- package/funcs/benefitsGrants.js.map +1 -1
- package/funcs/benefitsList.js +2 -2
- package/funcs/benefitsList.js.map +1 -1
- package/funcs/externalOrganizationsList.js +2 -2
- package/funcs/externalOrganizationsList.js.map +1 -1
- package/funcs/filesList.js +2 -2
- package/funcs/filesList.js.map +1 -1
- package/funcs/licenseKeysList.js +2 -2
- package/funcs/licenseKeysList.js.map +1 -1
- package/funcs/oauth2ClientsList.js +2 -2
- package/funcs/oauth2ClientsList.js.map +1 -1
- package/funcs/ordersList.js +2 -2
- package/funcs/ordersList.js.map +1 -1
- package/funcs/organizationsList.js +2 -2
- package/funcs/organizationsList.js.map +1 -1
- package/funcs/productsList.js +2 -2
- package/funcs/productsList.js.map +1 -1
- package/funcs/repositoriesList.js +2 -2
- package/funcs/repositoriesList.js.map +1 -1
- package/funcs/subscriptionsList.js +2 -2
- package/funcs/subscriptionsList.js.map +1 -1
- package/funcs/usersAdvertisementsList.js +2 -2
- package/funcs/usersAdvertisementsList.js.map +1 -1
- package/funcs/usersBenefitsList.js +2 -2
- package/funcs/usersBenefitsList.js.map +1 -1
- package/funcs/usersDownloadablesList.js +2 -2
- package/funcs/usersDownloadablesList.js.map +1 -1
- package/funcs/usersLicenseKeysList.js +2 -2
- package/funcs/usersLicenseKeysList.js.map +1 -1
- package/funcs/usersOrdersList.js +2 -2
- package/funcs/usersOrdersList.js.map +1 -1
- package/funcs/usersSubscriptionsList.js +2 -2
- package/funcs/usersSubscriptionsList.js.map +1 -1
- package/lib/config.d.ts +16 -5
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +18 -12
- package/lib/config.js.map +1 -1
- package/models/components/bodysubscriptionsimport.d.ts +2 -2
- package/models/components/bodysubscriptionsimport.d.ts.map +1 -1
- package/models/components/bodysubscriptionsimport.js +2 -0
- package/models/components/bodysubscriptionsimport.js.map +1 -1
- package/models/components/index.d.ts +9 -3
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +9 -3
- package/models/components/index.js.map +1 -1
- package/models/components/ordersubscription.d.ts +7 -0
- package/models/components/ordersubscription.d.ts.map +1 -1
- package/models/components/ordersubscription.js +9 -0
- package/models/components/ordersubscription.js.map +1 -1
- package/models/components/organizationfeaturesettings.d.ts +0 -5
- package/models/components/organizationfeaturesettings.d.ts.map +1 -1
- package/models/components/organizationfeaturesettings.js +0 -4
- package/models/components/organizationfeaturesettings.js.map +1 -1
- package/models/components/organizationprofilesettings.d.ts +10 -0
- package/models/components/organizationprofilesettings.d.ts.map +1 -1
- package/models/components/organizationprofilesettings.js +6 -0
- package/models/components/organizationprofilesettings.js.map +1 -1
- package/models/components/productonetimecreate.d.ts +23 -3
- package/models/components/productonetimecreate.d.ts.map +1 -1
- package/models/components/productonetimecreate.js +33 -4
- package/models/components/productonetimecreate.js.map +1 -1
- package/models/components/productpriceinput.d.ts +3 -11
- package/models/components/productpriceinput.d.ts.map +1 -1
- package/models/components/productpriceinput.js +5 -13
- package/models/components/productpriceinput.js.map +1 -1
- package/models/components/productpriceonetime.d.ts +4 -71
- package/models/components/productpriceonetime.d.ts.map +1 -1
- package/models/components/productpriceonetime.js +11 -57
- package/models/components/productpriceonetime.js.map +1 -1
- package/models/components/productpriceonetimecustom.d.ts +124 -0
- package/models/components/productpriceonetimecustom.d.ts.map +1 -0
- package/models/components/productpriceonetimecustom.js +130 -0
- package/models/components/productpriceonetimecustom.js.map +1 -0
- package/models/components/productpriceonetimecustomcreate.d.ts +71 -0
- package/models/components/productpriceonetimecustomcreate.d.ts.map +1 -0
- package/models/components/productpriceonetimecustomcreate.js +91 -0
- package/models/components/productpriceonetimecustomcreate.js.map +1 -0
- package/models/components/productpriceonetimefixed.d.ts +114 -0
- package/models/components/productpriceonetimefixed.d.ts.map +1 -0
- package/models/components/productpriceonetimefixed.js +122 -0
- package/models/components/productpriceonetimefixed.js.map +1 -0
- package/models/components/productpriceonetimefixedcreate.d.ts +61 -0
- package/models/components/productpriceonetimefixedcreate.d.ts.map +1 -0
- package/models/components/{productpriceonetimecreate.js → productpriceonetimefixedcreate.js} +25 -25
- package/models/components/productpriceonetimefixedcreate.js.map +1 -0
- package/models/components/productpriceoutput.d.ts +3 -11
- package/models/components/productpriceoutput.d.ts.map +1 -1
- package/models/components/productpriceoutput.js +5 -13
- package/models/components/productpriceoutput.js.map +1 -1
- package/models/components/productpricerecurringcreate.d.ts +7 -7
- package/models/components/productpricerecurringcreate.d.ts.map +1 -1
- package/models/components/productpricerecurringcreate.js +9 -9
- package/models/components/productpricerecurringcreate.js.map +1 -1
- package/models/components/productpricerecurringcustom.d.ts +130 -0
- package/models/components/productpricerecurringcustom.d.ts.map +1 -0
- package/models/components/productpricerecurringcustom.js +135 -0
- package/models/components/productpricerecurringcustom.js.map +1 -0
- package/models/components/productpricerecurringfixed.d.ts +120 -0
- package/models/components/productpricerecurringfixed.d.ts.map +1 -0
- package/models/components/productpricerecurringfixed.js +128 -0
- package/models/components/productpricerecurringfixed.js.map +1 -0
- package/models/components/productpricerecurringinput.d.ts +31 -0
- package/models/components/productpricerecurringinput.d.ts.map +1 -0
- package/models/components/productpricerecurringinput.js +62 -0
- package/models/components/productpricerecurringinput.js.map +1 -0
- package/models/components/productpricerecurringoutput.d.ts +31 -0
- package/models/components/productpricerecurringoutput.d.ts.map +1 -0
- package/models/components/productpricerecurringoutput.js +62 -0
- package/models/components/productpricerecurringoutput.js.map +1 -0
- package/models/components/productupdate.d.ts +15 -14
- package/models/components/productupdate.d.ts.map +1 -1
- package/models/components/productupdate.js +20 -16
- package/models/components/productupdate.js.map +1 -1
- package/models/components/subscriptioninput.d.ts +7 -0
- package/models/components/subscriptioninput.d.ts.map +1 -1
- package/models/components/subscriptioninput.js +9 -0
- package/models/components/subscriptioninput.js.map +1 -1
- package/models/components/subscriptionoutput.d.ts +7 -0
- package/models/components/subscriptionoutput.d.ts.map +1 -1
- package/models/components/subscriptionoutput.js +9 -0
- package/models/components/subscriptionoutput.js.map +1 -1
- package/models/components/subscriptionrecurringinterval.d.ts +28 -0
- package/models/components/{productpricerecurringinterval.d.ts.map → subscriptionrecurringinterval.d.ts.map} +1 -1
- package/models/components/{productpricerecurringinterval.js → subscriptionrecurringinterval.js} +12 -12
- package/models/components/{productpricerecurringinterval.js.map → subscriptionrecurringinterval.js.map} +1 -1
- package/models/components/subscriptionsortproperty.d.ts +6 -6
- package/models/components/subscriptionsortproperty.js +2 -2
- package/models/components/subscriptionsortproperty.js.map +1 -1
- package/models/components/userordersubscription.d.ts +7 -0
- package/models/components/userordersubscription.d.ts.map +1 -1
- package/models/components/userordersubscription.js +9 -0
- package/models/components/userordersubscription.js.map +1 -1
- package/models/components/usersubscription.d.ts +10 -0
- package/models/components/usersubscription.d.ts.map +1 -1
- package/models/components/usersubscription.js +9 -0
- package/models/components/usersubscription.js.map +1 -1
- package/models/components/usersubscriptionsortproperty.d.ts +6 -6
- package/models/components/usersubscriptionsortproperty.js +2 -2
- package/models/components/usersubscriptionsortproperty.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/advertisementsList.ts +2 -2
- package/src/funcs/articlesList.ts +2 -2
- package/src/funcs/benefitsGrants.ts +2 -2
- package/src/funcs/benefitsList.ts +2 -2
- package/src/funcs/externalOrganizationsList.ts +2 -2
- package/src/funcs/filesList.ts +2 -2
- package/src/funcs/licenseKeysList.ts +2 -2
- package/src/funcs/oauth2ClientsList.ts +2 -2
- package/src/funcs/ordersList.ts +2 -2
- package/src/funcs/organizationsList.ts +2 -2
- package/src/funcs/productsList.ts +2 -2
- package/src/funcs/repositoriesList.ts +2 -2
- package/src/funcs/subscriptionsList.ts +2 -2
- package/src/funcs/usersAdvertisementsList.ts +2 -2
- package/src/funcs/usersBenefitsList.ts +2 -2
- package/src/funcs/usersDownloadablesList.ts +2 -2
- package/src/funcs/usersLicenseKeysList.ts +2 -2
- package/src/funcs/usersOrdersList.ts +2 -2
- package/src/funcs/usersSubscriptionsList.ts +2 -2
- package/src/lib/config.ts +18 -12
- package/src/models/components/bodysubscriptionsimport.ts +4 -2
- package/src/models/components/index.ts +9 -3
- package/src/models/components/ordersubscription.ts +19 -0
- package/src/models/components/organizationfeaturesettings.ts +0 -9
- package/src/models/components/organizationprofilesettings.ts +16 -0
- package/src/models/components/productonetimecreate.ts +69 -9
- package/src/models/components/productpriceinput.ts +13 -29
- package/src/models/components/productpriceonetime.ts +27 -115
- package/src/models/components/productpriceonetimecustom.ts +201 -0
- package/src/models/components/productpriceonetimecustomcreate.ts +122 -0
- package/src/models/components/productpriceonetimefixed.ts +182 -0
- package/src/models/components/productpriceonetimefixedcreate.ts +103 -0
- package/src/models/components/productpriceoutput.ts +13 -29
- package/src/models/components/productpricerecurringcreate.ts +18 -18
- package/src/models/components/productpricerecurringcustom.ts +216 -0
- package/src/models/components/productpricerecurringfixed.ts +191 -0
- package/src/models/components/productpricerecurringinput.ts +75 -0
- package/src/models/components/productpricerecurringoutput.ts +75 -0
- package/src/models/components/productupdate.ts +49 -32
- package/src/models/components/subscriptioninput.ts +19 -0
- package/src/models/components/subscriptionoutput.ts +19 -0
- package/src/models/components/subscriptionrecurringinterval.ts +35 -0
- package/src/models/components/subscriptionsortproperty.ts +2 -2
- package/src/models/components/userordersubscription.ts +19 -0
- package/src/models/components/usersubscription.ts +22 -0
- package/src/models/components/usersubscriptionsortproperty.ts +2 -2
- package/models/components/productpriceonetimecreate.d.ts +0 -61
- package/models/components/productpriceonetimecreate.d.ts.map +0 -1
- package/models/components/productpriceonetimecreate.js.map +0 -1
- package/models/components/productpricerecurring.d.ts +0 -96
- package/models/components/productpricerecurring.d.ts.map +0 -1
- package/models/components/productpricerecurring.js +0 -105
- package/models/components/productpricerecurring.js.map +0 -1
- package/models/components/productpricerecurringinterval.d.ts +0 -28
- package/src/models/components/productpriceonetimecreate.ts +0 -102
- package/src/models/components/productpricerecurring.ts +0 -161
- package/src/models/components/productpricerecurringinterval.ts +0 -35
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userordersubscription.js","sourceRoot":"","sources":["../../src/models/components/userordersubscription.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2DAA0D;AAC1D,mEAIiC;
|
|
1
|
+
{"version":3,"file":"userordersubscription.js","sourceRoot":"","sources":["../../src/models/components/userordersubscription.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2DAA0D;AAC1D,yFAI4C;AAC5C,mEAIiC;AA6BjC,gBAAgB;AACH,QAAA,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7E,WAAW,EAAE,CAAC,CAAC,QAAQ,CACrB,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAClE;IACD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC;IACpC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAChC,kBAAkB,EAA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EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAC/D,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAC7D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAChC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;QACvB,UAAU,EAAE,aAAa;QACzB,iBAAiB,EAAE,oBAAoB;QACvC,kBAAkB,EAAE,sBAAsB;QAC1C,gBAAgB,EAAE,oBAAoB;QACtC,iBAAiB,EAAE,sBAAsB;QACzC,SAAS,EAAE,YAAY;QACvB,OAAO,EAAE,UAAU;QACnB,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,YAAY;QACvB,OAAO,EAAE,UAAU;KACpB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,sBAAsB,CAOtC;AAPD,WAAiB,sBAAsB;IACrC,qEAAqE;IACxD,oCAAa,GAAG,2CAAmC,CAAC;IACjE,sEAAsE;IACzD,qCAAc,GAAG,4CAAoC,CAAC;AAGrE,CAAC,EAPgB,sBAAsB,sCAAtB,sBAAsB,QAOtC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { ProductPriceOutput, ProductPriceOutput$Outbound } from "./productpriceoutput.js";
|
|
3
|
+
import { SubscriptionRecurringInterval } from "./subscriptionrecurringinterval.js";
|
|
3
4
|
import { SubscriptionStatus } from "./subscriptionstatus.js";
|
|
4
5
|
import { UserSubscriptionProduct, UserSubscriptionProduct$Outbound } from "./usersubscriptionproduct.js";
|
|
5
6
|
export type UserSubscription = {
|
|
@@ -11,7 +12,13 @@ export type UserSubscription = {
|
|
|
11
12
|
* Last modification timestamp of the object.
|
|
12
13
|
*/
|
|
13
14
|
modifiedAt: Date | null;
|
|
15
|
+
/**
|
|
16
|
+
* The ID of the object.
|
|
17
|
+
*/
|
|
14
18
|
id: string;
|
|
19
|
+
amount: number | null;
|
|
20
|
+
currency: string | null;
|
|
21
|
+
recurringInterval: SubscriptionRecurringInterval;
|
|
15
22
|
status: SubscriptionStatus;
|
|
16
23
|
currentPeriodStart: Date;
|
|
17
24
|
currentPeriodEnd: Date | null;
|
|
@@ -31,6 +38,9 @@ export type UserSubscription$Outbound = {
|
|
|
31
38
|
created_at: string;
|
|
32
39
|
modified_at: string | null;
|
|
33
40
|
id: string;
|
|
41
|
+
amount: number | null;
|
|
42
|
+
currency: string | null;
|
|
43
|
+
recurring_interval: string;
|
|
34
44
|
status: string;
|
|
35
45
|
current_period_start: string;
|
|
36
46
|
current_period_end: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usersubscription.d.ts","sourceRoot":"","sources":["../../src/models/components/usersubscription.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EACL,kBAAkB,EAElB,2BAA2B,EAE5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAGnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,uBAAuB,EAEvB,gCAAgC,EAEjC,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,kBAAkB,CAAC;IAC3B,kBAAkB,EAAE,IAAI,CAAC;IACzB,gBAAgB,EAAE,IAAI,GAAG,IAAI,CAAC;IAC9B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,uBAAuB,CAAC;IACjC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CACpD,gBAAgB,EAChB,CAAC,CAAC,UAAU,EACZ,OAAO,
|
|
1
|
+
{"version":3,"file":"usersubscription.d.ts","sourceRoot":"","sources":["../../src/models/components/usersubscription.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EACL,kBAAkB,EAElB,2BAA2B,EAE5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,6BAA6B,EAG9B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,kBAAkB,EAGnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,uBAAuB,EAEvB,gCAAgC,EAEjC,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,iBAAiB,EAAE,6BAA6B,CAAC;IACjD,MAAM,EAAE,kBAAkB,CAAC;IAC3B,kBAAkB,EAAE,IAAI,CAAC;IACzB,gBAAgB,EAAE,IAAI,GAAG,I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AAC,UAAU,EACZ,gBAAgB,CAiChB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,iBAAiB,CAAC;IACjC,gEAAgE;IACzD,MAAM,aAAa,oDAAiC,CAAC;IAC5D,iEAAiE;IAC1D,MAAM,cAAc,sEAAkC,CAAC;IAC9D,2DAA2D;IAC3D,KAAY,QAAQ,GAAG,yBAAyB,CAAC;CAClD"}
|
|
@@ -30,6 +30,7 @@ exports.UserSubscription$ = exports.UserSubscription$outboundSchema = exports.Us
|
|
|
30
30
|
const z = __importStar(require("zod"));
|
|
31
31
|
const primitives_js_1 = require("../../lib/primitives.js");
|
|
32
32
|
const productpriceoutput_js_1 = require("./productpriceoutput.js");
|
|
33
|
+
const subscriptionrecurringinterval_js_1 = require("./subscriptionrecurringinterval.js");
|
|
33
34
|
const subscriptionstatus_js_1 = require("./subscriptionstatus.js");
|
|
34
35
|
const usersubscriptionproduct_js_1 = require("./usersubscriptionproduct.js");
|
|
35
36
|
/** @internal */
|
|
@@ -37,6 +38,9 @@ exports.UserSubscription$inboundSchema = z.object({
|
|
|
37
38
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
38
39
|
modified_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))),
|
|
39
40
|
id: z.string(),
|
|
41
|
+
amount: z.nullable(z.number().int()),
|
|
42
|
+
currency: z.nullable(z.string()),
|
|
43
|
+
recurring_interval: subscriptionrecurringinterval_js_1.SubscriptionRecurringInterval$inboundSchema,
|
|
40
44
|
status: subscriptionstatus_js_1.SubscriptionStatus$inboundSchema,
|
|
41
45
|
current_period_start: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
42
46
|
current_period_end: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))),
|
|
@@ -52,6 +56,7 @@ exports.UserSubscription$inboundSchema = z.object({
|
|
|
52
56
|
return (0, primitives_js_1.remap)(v, {
|
|
53
57
|
"created_at": "createdAt",
|
|
54
58
|
"modified_at": "modifiedAt",
|
|
59
|
+
"recurring_interval": "recurringInterval",
|
|
55
60
|
"current_period_start": "currentPeriodStart",
|
|
56
61
|
"current_period_end": "currentPeriodEnd",
|
|
57
62
|
"cancel_at_period_end": "cancelAtPeriodEnd",
|
|
@@ -67,6 +72,9 @@ exports.UserSubscription$outboundSchema = z.object({
|
|
|
67
72
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
68
73
|
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
69
74
|
id: z.string(),
|
|
75
|
+
amount: z.nullable(z.number().int()),
|
|
76
|
+
currency: z.nullable(z.string()),
|
|
77
|
+
recurringInterval: subscriptionrecurringinterval_js_1.SubscriptionRecurringInterval$outboundSchema,
|
|
70
78
|
status: subscriptionstatus_js_1.SubscriptionStatus$outboundSchema,
|
|
71
79
|
currentPeriodStart: z.date().transform(v => v.toISOString()),
|
|
72
80
|
currentPeriodEnd: z.nullable(z.date().transform(v => v.toISOString())),
|
|
@@ -82,6 +90,7 @@ exports.UserSubscription$outboundSchema = z.object({
|
|
|
82
90
|
return (0, primitives_js_1.remap)(v, {
|
|
83
91
|
createdAt: "created_at",
|
|
84
92
|
modifiedAt: "modified_at",
|
|
93
|
+
recurringInterval: "recurring_interval",
|
|
85
94
|
currentPeriodStart: "current_period_start",
|
|
86
95
|
currentPeriodEnd: "current_period_end",
|
|
87
96
|
cancelAtPeriodEnd: "cancel_at_period_end",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usersubscription.js","sourceRoot":"","sources":["../../src/models/components/usersubscription.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2DAA0D;AAC1D,mEAKiC;AACjC,mEAIiC;AACjC,6EAKsC;
|
|
1
|
+
{"version":3,"file":"usersubscription.js","sourceRoot":"","sources":["../../src/models/components/usersubscription.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAy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AAE,CAAC,CAAC,QAAQ,CAAC,yDAAiC,CAAC;CACrD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;QACvB,UAAU,EAAE,aAAa;QACzB,iBAAiB,EAAE,oBAAoB;QACvC,kBAAkB,EAAE,sBAAsB;QAC1C,gBAAgB,EAAE,oBAAoB;QACtC,iBAAiB,EAAE,sBAAsB;QACzC,SAAS,EAAE,YAAY;QACvB,OAAO,EAAE,UAAU;QACnB,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,YAAY;QACvB,OAAO,EAAE,UAAU;KACpB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,iBAAiB,CAOjC;AAPD,WAAiB,iBAAiB;IAChC,gEAAgE;IACnD,+BAAa,GAAG,sCAA8B,CAAC;IAC5D,iEAAiE;IACpD,gCAAc,GAAG,uCAA+B,CAAC;AAGhE,CAAC,EAPgB,iBAAiB,iCAAjB,iBAAiB,QAOjC"}
|
|
@@ -3,8 +3,8 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
3
3
|
export declare const UserSubscriptionSortProperty: {
|
|
4
4
|
readonly StartedAt: "started_at";
|
|
5
5
|
readonly MinusStartedAt: "-started_at";
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
6
|
+
readonly Amount: "amount";
|
|
7
|
+
readonly MinusAmount: "-amount";
|
|
8
8
|
readonly Status: "status";
|
|
9
9
|
readonly MinusStatus: "-status";
|
|
10
10
|
readonly Organization: "organization";
|
|
@@ -26,8 +26,8 @@ export declare namespace UserSubscriptionSortProperty$ {
|
|
|
26
26
|
const inboundSchema: z.ZodNativeEnum<{
|
|
27
27
|
readonly StartedAt: "started_at";
|
|
28
28
|
readonly MinusStartedAt: "-started_at";
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
29
|
+
readonly Amount: "amount";
|
|
30
|
+
readonly MinusAmount: "-amount";
|
|
31
31
|
readonly Status: "status";
|
|
32
32
|
readonly MinusStatus: "-status";
|
|
33
33
|
readonly Organization: "organization";
|
|
@@ -39,8 +39,8 @@ export declare namespace UserSubscriptionSortProperty$ {
|
|
|
39
39
|
const outboundSchema: z.ZodNativeEnum<{
|
|
40
40
|
readonly StartedAt: "started_at";
|
|
41
41
|
readonly MinusStartedAt: "-started_at";
|
|
42
|
-
readonly
|
|
43
|
-
readonly
|
|
42
|
+
readonly Amount: "amount";
|
|
43
|
+
readonly MinusAmount: "-amount";
|
|
44
44
|
readonly Status: "status";
|
|
45
45
|
readonly MinusStatus: "-status";
|
|
46
46
|
readonly Organization: "organization";
|
|
@@ -31,8 +31,8 @@ const z = __importStar(require("zod"));
|
|
|
31
31
|
exports.UserSubscriptionSortProperty = {
|
|
32
32
|
StartedAt: "started_at",
|
|
33
33
|
MinusStartedAt: "-started_at",
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
Amount: "amount",
|
|
35
|
+
MinusAmount: "-amount",
|
|
36
36
|
Status: "status",
|
|
37
37
|
MinusStatus: "-status",
|
|
38
38
|
Organization: "organization",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usersubscriptionsortproperty.js","sourceRoot":"","sources":["../../src/models/components/usersubscriptionsortproperty.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AAGZ,QAAA,4BAA4B,GAAG;IAC1C,SAAS,EAAE,YAAY;IACvB,cAAc,EAAE,aAAa;IAC7B,
|
|
1
|
+
{"version":3,"file":"usersubscriptionsortproperty.js","sourceRoot":"","sources":["../../src/models/components/usersubscriptionsortproperty.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AAGZ,QAAA,4BAA4B,GAAG;IAC1C,SAAS,EAAE,YAAY;IACvB,cAAc,EAAE,aAAa;IAC7B,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,SAAS;IACtB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,SAAS;IACtB,YAAY,EAAE,cAAc;IAC5B,iBAAiB,EAAE,eAAe;IAClC,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,UAAU;CAChB,CAAC;AAKX,gBAAgB;AACH,QAAA,0CAA0C,GAEnD,CAAC,CAAC,UAAU,CAAC,oCAA4B,CAAC,CAAC;AAE/C,gBAAgB;AACH,QAAA,2CAA2C,GAEpD,kDAA0C,CAAC;AAE/C;;;GAGG;AACH,IAAiB,6BAA6B,CAK7C;AALD,WAAiB,6BAA6B;IAC5C,4EAA4E;IAC/D,2CAAa,GAAG,kDAA0C,CAAC;IACxE,6EAA6E;IAChE,4CAAc,GAAG,mDAA2C,CAAC;AAC5E,CAAC,EALgB,6BAA6B,6CAA7B,6BAA6B,QAK7C"}
|
package/package.json
CHANGED
|
@@ -156,7 +156,7 @@ export async function advertisementsList(
|
|
|
156
156
|
| ConnectionError
|
|
157
157
|
>
|
|
158
158
|
> => {
|
|
159
|
-
const page = input
|
|
159
|
+
const page = input$?.page || 0;
|
|
160
160
|
const nextPage = page + 1;
|
|
161
161
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
162
162
|
if (numPages == null || numPages <= page) {
|
|
@@ -170,7 +170,7 @@ export async function advertisementsList(
|
|
|
170
170
|
if (!Array.isArray(results) || !results.length) {
|
|
171
171
|
return () => null;
|
|
172
172
|
}
|
|
173
|
-
const limit = input
|
|
173
|
+
const limit = input$?.limit || 0;
|
|
174
174
|
if (results.length < limit) {
|
|
175
175
|
return () => null;
|
|
176
176
|
}
|
|
@@ -159,7 +159,7 @@ export async function articlesList(
|
|
|
159
159
|
| ConnectionError
|
|
160
160
|
>
|
|
161
161
|
> => {
|
|
162
|
-
const page = input
|
|
162
|
+
const page = input$?.page || 0;
|
|
163
163
|
const nextPage = page + 1;
|
|
164
164
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
165
165
|
if (numPages == null || numPages <= page) {
|
|
@@ -173,7 +173,7 @@ export async function articlesList(
|
|
|
173
173
|
if (!Array.isArray(results) || !results.length) {
|
|
174
174
|
return () => null;
|
|
175
175
|
}
|
|
176
|
-
const limit = input
|
|
176
|
+
const limit = input$?.limit || 0;
|
|
177
177
|
if (results.length < limit) {
|
|
178
178
|
return () => null;
|
|
179
179
|
}
|
|
@@ -172,7 +172,7 @@ export async function benefitsGrants(
|
|
|
172
172
|
| ConnectionError
|
|
173
173
|
>
|
|
174
174
|
> => {
|
|
175
|
-
const page = input
|
|
175
|
+
const page = input$?.page || 0;
|
|
176
176
|
const nextPage = page + 1;
|
|
177
177
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
178
178
|
if (numPages == null || numPages <= page) {
|
|
@@ -186,7 +186,7 @@ export async function benefitsGrants(
|
|
|
186
186
|
if (!Array.isArray(results) || !results.length) {
|
|
187
187
|
return () => null;
|
|
188
188
|
}
|
|
189
|
-
const limit = input
|
|
189
|
+
const limit = input$?.limit || 0;
|
|
190
190
|
if (results.length < limit) {
|
|
191
191
|
return () => null;
|
|
192
192
|
}
|
|
@@ -155,7 +155,7 @@ export async function benefitsList(
|
|
|
155
155
|
| ConnectionError
|
|
156
156
|
>
|
|
157
157
|
> => {
|
|
158
|
-
const page = input
|
|
158
|
+
const page = input$?.page || 0;
|
|
159
159
|
const nextPage = page + 1;
|
|
160
160
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
161
161
|
if (numPages == null || numPages <= page) {
|
|
@@ -169,7 +169,7 @@ export async function benefitsList(
|
|
|
169
169
|
if (!Array.isArray(results) || !results.length) {
|
|
170
170
|
return () => null;
|
|
171
171
|
}
|
|
172
|
-
const limit = input
|
|
172
|
+
const limit = input$?.limit || 0;
|
|
173
173
|
if (results.length < limit) {
|
|
174
174
|
return () => null;
|
|
175
175
|
}
|
|
@@ -158,7 +158,7 @@ export async function externalOrganizationsList(
|
|
|
158
158
|
| ConnectionError
|
|
159
159
|
>
|
|
160
160
|
> => {
|
|
161
|
-
const page = input
|
|
161
|
+
const page = input$?.page || 0;
|
|
162
162
|
const nextPage = page + 1;
|
|
163
163
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
164
164
|
if (numPages == null || numPages <= page) {
|
|
@@ -172,7 +172,7 @@ export async function externalOrganizationsList(
|
|
|
172
172
|
if (!Array.isArray(results) || !results.length) {
|
|
173
173
|
return () => null;
|
|
174
174
|
}
|
|
175
|
-
const limit = input
|
|
175
|
+
const limit = input$?.limit || 0;
|
|
176
176
|
if (results.length < limit) {
|
|
177
177
|
return () => null;
|
|
178
178
|
}
|
package/src/funcs/filesList.ts
CHANGED
|
@@ -153,7 +153,7 @@ export async function filesList(
|
|
|
153
153
|
| ConnectionError
|
|
154
154
|
>
|
|
155
155
|
> => {
|
|
156
|
-
const page = input
|
|
156
|
+
const page = input$?.page || 0;
|
|
157
157
|
const nextPage = page + 1;
|
|
158
158
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
159
159
|
if (numPages == null || numPages <= page) {
|
|
@@ -167,7 +167,7 @@ export async function filesList(
|
|
|
167
167
|
if (!Array.isArray(results) || !results.length) {
|
|
168
168
|
return () => null;
|
|
169
169
|
}
|
|
170
|
-
const limit = input
|
|
170
|
+
const limit = input$?.limit || 0;
|
|
171
171
|
if (results.length < limit) {
|
|
172
172
|
return () => null;
|
|
173
173
|
}
|
|
@@ -162,7 +162,7 @@ export async function licenseKeysList(
|
|
|
162
162
|
| ConnectionError
|
|
163
163
|
>
|
|
164
164
|
> => {
|
|
165
|
-
const page = input
|
|
165
|
+
const page = input$?.page || 0;
|
|
166
166
|
const nextPage = page + 1;
|
|
167
167
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
168
168
|
if (numPages == null || numPages <= page) {
|
|
@@ -176,7 +176,7 @@ export async function licenseKeysList(
|
|
|
176
176
|
if (!Array.isArray(results) || !results.length) {
|
|
177
177
|
return () => null;
|
|
178
178
|
}
|
|
179
|
-
const limit = input
|
|
179
|
+
const limit = input$?.limit || 0;
|
|
180
180
|
if (results.length < limit) {
|
|
181
181
|
return () => null;
|
|
182
182
|
}
|
|
@@ -154,7 +154,7 @@ export async function oauth2ClientsList(
|
|
|
154
154
|
| ConnectionError
|
|
155
155
|
>
|
|
156
156
|
> => {
|
|
157
|
-
const page = input
|
|
157
|
+
const page = input$?.page || 0;
|
|
158
158
|
const nextPage = page + 1;
|
|
159
159
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
160
160
|
if (numPages == null || numPages <= page) {
|
|
@@ -168,7 +168,7 @@ export async function oauth2ClientsList(
|
|
|
168
168
|
if (!Array.isArray(results) || !results.length) {
|
|
169
169
|
return () => null;
|
|
170
170
|
}
|
|
171
|
-
const limit = input
|
|
171
|
+
const limit = input$?.limit || 0;
|
|
172
172
|
if (results.length < limit) {
|
|
173
173
|
return () => null;
|
|
174
174
|
}
|
package/src/funcs/ordersList.ts
CHANGED
|
@@ -158,7 +158,7 @@ export async function ordersList(
|
|
|
158
158
|
| ConnectionError
|
|
159
159
|
>
|
|
160
160
|
> => {
|
|
161
|
-
const page = input
|
|
161
|
+
const page = input$?.page || 0;
|
|
162
162
|
const nextPage = page + 1;
|
|
163
163
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
164
164
|
if (numPages == null || numPages <= page) {
|
|
@@ -172,7 +172,7 @@ export async function ordersList(
|
|
|
172
172
|
if (!Array.isArray(results) || !results.length) {
|
|
173
173
|
return () => null;
|
|
174
174
|
}
|
|
175
|
-
const limit = input
|
|
175
|
+
const limit = input$?.limit || 0;
|
|
176
176
|
if (results.length < limit) {
|
|
177
177
|
return () => null;
|
|
178
178
|
}
|
|
@@ -157,7 +157,7 @@ export async function organizationsList(
|
|
|
157
157
|
| ConnectionError
|
|
158
158
|
>
|
|
159
159
|
> => {
|
|
160
|
-
const page = input
|
|
160
|
+
const page = input$?.page || 0;
|
|
161
161
|
const nextPage = page + 1;
|
|
162
162
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
163
163
|
if (numPages == null || numPages <= page) {
|
|
@@ -171,7 +171,7 @@ export async function organizationsList(
|
|
|
171
171
|
if (!Array.isArray(results) || !results.length) {
|
|
172
172
|
return () => null;
|
|
173
173
|
}
|
|
174
|
-
const limit = input
|
|
174
|
+
const limit = input$?.limit || 0;
|
|
175
175
|
if (results.length < limit) {
|
|
176
176
|
return () => null;
|
|
177
177
|
}
|
|
@@ -158,7 +158,7 @@ export async function productsList(
|
|
|
158
158
|
| ConnectionError
|
|
159
159
|
>
|
|
160
160
|
> => {
|
|
161
|
-
const page = input
|
|
161
|
+
const page = input$?.page || 0;
|
|
162
162
|
const nextPage = page + 1;
|
|
163
163
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
164
164
|
if (numPages == null || numPages <= page) {
|
|
@@ -172,7 +172,7 @@ export async function productsList(
|
|
|
172
172
|
if (!Array.isArray(results) || !results.length) {
|
|
173
173
|
return () => null;
|
|
174
174
|
}
|
|
175
|
-
const limit = input
|
|
175
|
+
const limit = input$?.limit || 0;
|
|
176
176
|
if (results.length < limit) {
|
|
177
177
|
return () => null;
|
|
178
178
|
}
|
|
@@ -159,7 +159,7 @@ export async function repositoriesList(
|
|
|
159
159
|
| ConnectionError
|
|
160
160
|
>
|
|
161
161
|
> => {
|
|
162
|
-
const page = input
|
|
162
|
+
const page = input$?.page || 0;
|
|
163
163
|
const nextPage = page + 1;
|
|
164
164
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
165
165
|
if (numPages == null || numPages <= page) {
|
|
@@ -173,7 +173,7 @@ export async function repositoriesList(
|
|
|
173
173
|
if (!Array.isArray(results) || !results.length) {
|
|
174
174
|
return () => null;
|
|
175
175
|
}
|
|
176
|
-
const limit = input
|
|
176
|
+
const limit = input$?.limit || 0;
|
|
177
177
|
if (results.length < limit) {
|
|
178
178
|
return () => null;
|
|
179
179
|
}
|
|
@@ -159,7 +159,7 @@ export async function subscriptionsList(
|
|
|
159
159
|
| ConnectionError
|
|
160
160
|
>
|
|
161
161
|
> => {
|
|
162
|
-
const page = input
|
|
162
|
+
const page = input$?.page || 0;
|
|
163
163
|
const nextPage = page + 1;
|
|
164
164
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
165
165
|
if (numPages == null || numPages <= page) {
|
|
@@ -173,7 +173,7 @@ export async function subscriptionsList(
|
|
|
173
173
|
if (!Array.isArray(results) || !results.length) {
|
|
174
174
|
return () => null;
|
|
175
175
|
}
|
|
176
|
-
const limit = input
|
|
176
|
+
const limit = input$?.limit || 0;
|
|
177
177
|
if (results.length < limit) {
|
|
178
178
|
return () => null;
|
|
179
179
|
}
|
|
@@ -155,7 +155,7 @@ export async function usersAdvertisementsList(
|
|
|
155
155
|
| ConnectionError
|
|
156
156
|
>
|
|
157
157
|
> => {
|
|
158
|
-
const page = input
|
|
158
|
+
const page = input$?.page || 0;
|
|
159
159
|
const nextPage = page + 1;
|
|
160
160
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
161
161
|
if (numPages == null || numPages <= page) {
|
|
@@ -169,7 +169,7 @@ export async function usersAdvertisementsList(
|
|
|
169
169
|
if (!Array.isArray(results) || !results.length) {
|
|
170
170
|
return () => null;
|
|
171
171
|
}
|
|
172
|
-
const limit = input
|
|
172
|
+
const limit = input$?.limit || 0;
|
|
173
173
|
if (results.length < limit) {
|
|
174
174
|
return () => null;
|
|
175
175
|
}
|
|
@@ -159,7 +159,7 @@ export async function usersBenefitsList(
|
|
|
159
159
|
| ConnectionError
|
|
160
160
|
>
|
|
161
161
|
> => {
|
|
162
|
-
const page = input
|
|
162
|
+
const page = input$?.page || 0;
|
|
163
163
|
const nextPage = page + 1;
|
|
164
164
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
165
165
|
if (numPages == null || numPages <= page) {
|
|
@@ -173,7 +173,7 @@ export async function usersBenefitsList(
|
|
|
173
173
|
if (!Array.isArray(results) || !results.length) {
|
|
174
174
|
return () => null;
|
|
175
175
|
}
|
|
176
|
-
const limit = input
|
|
176
|
+
const limit = input$?.limit || 0;
|
|
177
177
|
if (results.length < limit) {
|
|
178
178
|
return () => null;
|
|
179
179
|
}
|
|
@@ -153,7 +153,7 @@ export async function usersDownloadablesList(
|
|
|
153
153
|
| ConnectionError
|
|
154
154
|
>
|
|
155
155
|
> => {
|
|
156
|
-
const page = input
|
|
156
|
+
const page = input$?.page || 0;
|
|
157
157
|
const nextPage = page + 1;
|
|
158
158
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
159
159
|
if (numPages == null || numPages <= page) {
|
|
@@ -167,7 +167,7 @@ export async function usersDownloadablesList(
|
|
|
167
167
|
if (!Array.isArray(results) || !results.length) {
|
|
168
168
|
return () => null;
|
|
169
169
|
}
|
|
170
|
-
const limit = input
|
|
170
|
+
const limit = input$?.limit || 0;
|
|
171
171
|
if (results.length < limit) {
|
|
172
172
|
return () => null;
|
|
173
173
|
}
|
|
@@ -161,7 +161,7 @@ export async function usersLicenseKeysList(
|
|
|
161
161
|
| ConnectionError
|
|
162
162
|
>
|
|
163
163
|
> => {
|
|
164
|
-
const page = input
|
|
164
|
+
const page = input$?.page || 0;
|
|
165
165
|
const nextPage = page + 1;
|
|
166
166
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
167
167
|
if (numPages == null || numPages <= page) {
|
|
@@ -175,7 +175,7 @@ export async function usersLicenseKeysList(
|
|
|
175
175
|
if (!Array.isArray(results) || !results.length) {
|
|
176
176
|
return () => null;
|
|
177
177
|
}
|
|
178
|
-
const limit = input
|
|
178
|
+
const limit = input$?.limit || 0;
|
|
179
179
|
if (results.length < limit) {
|
|
180
180
|
return () => null;
|
|
181
181
|
}
|
|
@@ -159,7 +159,7 @@ export async function usersOrdersList(
|
|
|
159
159
|
| ConnectionError
|
|
160
160
|
>
|
|
161
161
|
> => {
|
|
162
|
-
const page = input
|
|
162
|
+
const page = input$?.page || 0;
|
|
163
163
|
const nextPage = page + 1;
|
|
164
164
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
165
165
|
if (numPages == null || numPages <= page) {
|
|
@@ -173,7 +173,7 @@ export async function usersOrdersList(
|
|
|
173
173
|
if (!Array.isArray(results) || !results.length) {
|
|
174
174
|
return () => null;
|
|
175
175
|
}
|
|
176
|
-
const limit = input
|
|
176
|
+
const limit = input$?.limit || 0;
|
|
177
177
|
if (results.length < limit) {
|
|
178
178
|
return () => null;
|
|
179
179
|
}
|
|
@@ -159,7 +159,7 @@ export async function usersSubscriptionsList(
|
|
|
159
159
|
| ConnectionError
|
|
160
160
|
>
|
|
161
161
|
> => {
|
|
162
|
-
const page = input
|
|
162
|
+
const page = input$?.page || 0;
|
|
163
163
|
const nextPage = page + 1;
|
|
164
164
|
const numPages = dlv(responseData, "pagination.max_page");
|
|
165
165
|
if (numPages == null || numPages <= page) {
|
|
@@ -173,7 +173,7 @@ export async function usersSubscriptionsList(
|
|
|
173
173
|
if (!Array.isArray(results) || !results.length) {
|
|
174
174
|
return () => null;
|
|
175
175
|
}
|
|
176
|
-
const limit = input
|
|
176
|
+
const limit = input$?.limit || 0;
|
|
177
177
|
if (results.length < limit) {
|
|
178
178
|
return () => null;
|
|
179
179
|
}
|
package/src/lib/config.ts
CHANGED
|
@@ -7,12 +7,21 @@ import { Logger } from "./logger.js";
|
|
|
7
7
|
import { RetryConfig } from "./retries.js";
|
|
8
8
|
import { Params, pathToFunc } from "./url.js";
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Production environment
|
|
12
|
+
*/
|
|
13
|
+
export const ServerProduction = "production";
|
|
14
|
+
/**
|
|
15
|
+
* Sandbox environment
|
|
16
|
+
*/
|
|
17
|
+
export const ServerSandbox = "sandbox";
|
|
10
18
|
/**
|
|
11
19
|
* Contains the list of servers available to the SDK
|
|
12
20
|
*/
|
|
13
|
-
export const ServerList =
|
|
14
|
-
"https://api.polar.sh",
|
|
15
|
-
]
|
|
21
|
+
export const ServerList = {
|
|
22
|
+
[ServerProduction]: "https://api.polar.sh",
|
|
23
|
+
[ServerSandbox]: "https://sandbox-api.polar.sh",
|
|
24
|
+
} as const;
|
|
16
25
|
|
|
17
26
|
export type SDKOptions = {
|
|
18
27
|
accessToken?: string | (() => Promise<string>);
|
|
@@ -21,7 +30,7 @@ export type SDKOptions = {
|
|
|
21
30
|
/**
|
|
22
31
|
* Allows overriding the default server used by the SDK
|
|
23
32
|
*/
|
|
24
|
-
|
|
33
|
+
server?: keyof typeof ServerList;
|
|
25
34
|
/**
|
|
26
35
|
* Allows overriding the default server URL used by the SDK
|
|
27
36
|
*/
|
|
@@ -40,11 +49,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
40
49
|
const params: Params = {};
|
|
41
50
|
|
|
42
51
|
if (!serverURL) {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
throw new Error(`Invalid server index ${serverIdx}`);
|
|
46
|
-
}
|
|
47
|
-
serverURL = ServerList[serverIdx] || "";
|
|
52
|
+
const server = options.server ?? ServerProduction;
|
|
53
|
+
serverURL = ServerList[server] || "";
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
const u = pathToFunc(serverURL)(params);
|
|
@@ -54,7 +60,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
54
60
|
export const SDK_METADATA = {
|
|
55
61
|
language: "typescript",
|
|
56
62
|
openapiDocVersion: "0.1.0",
|
|
57
|
-
sdkVersion: "0.
|
|
58
|
-
genVersion: "2.
|
|
59
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
63
|
+
sdkVersion: "0.9.0",
|
|
64
|
+
genVersion: "2.416.6",
|
|
65
|
+
userAgent: "speakeasy-sdk/typescript 0.9.0 2.416.6 0.1.0 @polar-sh/sdk",
|
|
60
66
|
} as const;
|
|
@@ -8,7 +8,7 @@ import { blobLikeSchema } from "../../types/blobs.js";
|
|
|
8
8
|
|
|
9
9
|
export type FileT = {
|
|
10
10
|
fileName: string;
|
|
11
|
-
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer;
|
|
11
|
+
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export type BodySubscriptionsImport = {
|
|
@@ -30,13 +30,14 @@ export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
|
|
|
30
30
|
z.instanceof(ReadableStream<Uint8Array>),
|
|
31
31
|
z.instanceof(Blob),
|
|
32
32
|
z.instanceof(ArrayBuffer),
|
|
33
|
+
z.instanceof(Uint8Array),
|
|
33
34
|
]),
|
|
34
35
|
});
|
|
35
36
|
|
|
36
37
|
/** @internal */
|
|
37
38
|
export type FileT$Outbound = {
|
|
38
39
|
fileName: string;
|
|
39
|
-
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer;
|
|
40
|
+
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
40
41
|
};
|
|
41
42
|
|
|
42
43
|
/** @internal */
|
|
@@ -50,6 +51,7 @@ export const FileT$outboundSchema: z.ZodType<
|
|
|
50
51
|
z.instanceof(ReadableStream<Uint8Array>),
|
|
51
52
|
z.instanceof(Blob),
|
|
52
53
|
z.instanceof(ArrayBuffer),
|
|
54
|
+
z.instanceof(Uint8Array),
|
|
53
55
|
]),
|
|
54
56
|
});
|
|
55
57
|
|