@polar-sh/sdk 0.8.2 → 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/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/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":"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
|
|
|
@@ -165,11 +165,16 @@ export * from "./productonetimecreate.js";
|
|
|
165
165
|
export * from "./productoutput.js";
|
|
166
166
|
export * from "./productpriceinput.js";
|
|
167
167
|
export * from "./productpriceonetime.js";
|
|
168
|
-
export * from "./
|
|
168
|
+
export * from "./productpriceonetimecustom.js";
|
|
169
|
+
export * from "./productpriceonetimecustomcreate.js";
|
|
170
|
+
export * from "./productpriceonetimefixed.js";
|
|
171
|
+
export * from "./productpriceonetimefixedcreate.js";
|
|
169
172
|
export * from "./productpriceoutput.js";
|
|
170
|
-
export * from "./productpricerecurring.js";
|
|
171
173
|
export * from "./productpricerecurringcreate.js";
|
|
172
|
-
export * from "./
|
|
174
|
+
export * from "./productpricerecurringcustom.js";
|
|
175
|
+
export * from "./productpricerecurringfixed.js";
|
|
176
|
+
export * from "./productpricerecurringinput.js";
|
|
177
|
+
export * from "./productpricerecurringoutput.js";
|
|
173
178
|
export * from "./productpricetype.js";
|
|
174
179
|
export * from "./productrecurringcreate.js";
|
|
175
180
|
export * from "./productupdate.js";
|
|
@@ -192,6 +197,7 @@ export * from "./state.js";
|
|
|
192
197
|
export * from "./subscriptioncreateemail.js";
|
|
193
198
|
export * from "./subscriptioninput.js";
|
|
194
199
|
export * from "./subscriptionoutput.js";
|
|
200
|
+
export * from "./subscriptionrecurringinterval.js";
|
|
195
201
|
export * from "./subscriptionsimported.js";
|
|
196
202
|
export * from "./subscriptionsortproperty.js";
|
|
197
203
|
export * from "./subscriptionstatus.js";
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import {
|
|
8
|
+
SubscriptionRecurringInterval,
|
|
9
|
+
SubscriptionRecurringInterval$inboundSchema,
|
|
10
|
+
SubscriptionRecurringInterval$outboundSchema,
|
|
11
|
+
} from "./subscriptionrecurringinterval.js";
|
|
7
12
|
import {
|
|
8
13
|
SubscriptionStatus,
|
|
9
14
|
SubscriptionStatus$inboundSchema,
|
|
@@ -23,6 +28,9 @@ export type OrderSubscription = {
|
|
|
23
28
|
* The ID of the object.
|
|
24
29
|
*/
|
|
25
30
|
id: string;
|
|
31
|
+
amount: number | null;
|
|
32
|
+
currency: string | null;
|
|
33
|
+
recurringInterval: SubscriptionRecurringInterval;
|
|
26
34
|
status: SubscriptionStatus;
|
|
27
35
|
currentPeriodStart: Date;
|
|
28
36
|
currentPeriodEnd: Date | null;
|
|
@@ -45,6 +53,9 @@ export const OrderSubscription$inboundSchema: z.ZodType<
|
|
|
45
53
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
46
54
|
),
|
|
47
55
|
id: z.string(),
|
|
56
|
+
amount: z.nullable(z.number().int()),
|
|
57
|
+
currency: z.nullable(z.string()),
|
|
58
|
+
recurring_interval: SubscriptionRecurringInterval$inboundSchema,
|
|
48
59
|
status: SubscriptionStatus$inboundSchema,
|
|
49
60
|
current_period_start: z.string().datetime({ offset: true }).transform(v =>
|
|
50
61
|
new Date(v)
|
|
@@ -66,6 +77,7 @@ export const OrderSubscription$inboundSchema: z.ZodType<
|
|
|
66
77
|
return remap$(v, {
|
|
67
78
|
"created_at": "createdAt",
|
|
68
79
|
"modified_at": "modifiedAt",
|
|
80
|
+
"recurring_interval": "recurringInterval",
|
|
69
81
|
"current_period_start": "currentPeriodStart",
|
|
70
82
|
"current_period_end": "currentPeriodEnd",
|
|
71
83
|
"cancel_at_period_end": "cancelAtPeriodEnd",
|
|
@@ -82,6 +94,9 @@ export type OrderSubscription$Outbound = {
|
|
|
82
94
|
created_at: string;
|
|
83
95
|
modified_at: string | null;
|
|
84
96
|
id: string;
|
|
97
|
+
amount: number | null;
|
|
98
|
+
currency: string | null;
|
|
99
|
+
recurring_interval: string;
|
|
85
100
|
status: string;
|
|
86
101
|
current_period_start: string;
|
|
87
102
|
current_period_end: string | null;
|
|
@@ -102,6 +117,9 @@ export const OrderSubscription$outboundSchema: z.ZodType<
|
|
|
102
117
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
103
118
|
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
104
119
|
id: z.string(),
|
|
120
|
+
amount: z.nullable(z.number().int()),
|
|
121
|
+
currency: z.nullable(z.string()),
|
|
122
|
+
recurringInterval: SubscriptionRecurringInterval$outboundSchema,
|
|
105
123
|
status: SubscriptionStatus$outboundSchema,
|
|
106
124
|
currentPeriodStart: z.date().transform(v => v.toISOString()),
|
|
107
125
|
currentPeriodEnd: z.nullable(z.date().transform(v => v.toISOString())),
|
|
@@ -115,6 +133,7 @@ export const OrderSubscription$outboundSchema: z.ZodType<
|
|
|
115
133
|
return remap$(v, {
|
|
116
134
|
createdAt: "created_at",
|
|
117
135
|
modifiedAt: "modified_at",
|
|
136
|
+
recurringInterval: "recurring_interval",
|
|
118
137
|
currentPeriodStart: "current_period_start",
|
|
119
138
|
currentPeriodEnd: "current_period_end",
|
|
120
139
|
cancelAtPeriodEnd: "cancel_at_period_end",
|
|
@@ -10,10 +10,6 @@ export type OrganizationFeatureSettings = {
|
|
|
10
10
|
* If this organization has articles enabled
|
|
11
11
|
*/
|
|
12
12
|
articlesEnabled?: boolean | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* If this organization has subscriptions enabled
|
|
15
|
-
*/
|
|
16
|
-
subscriptionsEnabled?: boolean | undefined;
|
|
17
13
|
/**
|
|
18
14
|
* If this organization has issue funding enabled
|
|
19
15
|
*/
|
|
@@ -27,12 +23,10 @@ export const OrganizationFeatureSettings$inboundSchema: z.ZodType<
|
|
|
27
23
|
unknown
|
|
28
24
|
> = z.object({
|
|
29
25
|
articles_enabled: z.boolean().default(false),
|
|
30
|
-
subscriptions_enabled: z.boolean().default(false),
|
|
31
26
|
issue_funding_enabled: z.boolean().default(false),
|
|
32
27
|
}).transform((v) => {
|
|
33
28
|
return remap$(v, {
|
|
34
29
|
"articles_enabled": "articlesEnabled",
|
|
35
|
-
"subscriptions_enabled": "subscriptionsEnabled",
|
|
36
30
|
"issue_funding_enabled": "issueFundingEnabled",
|
|
37
31
|
});
|
|
38
32
|
});
|
|
@@ -40,7 +34,6 @@ export const OrganizationFeatureSettings$inboundSchema: z.ZodType<
|
|
|
40
34
|
/** @internal */
|
|
41
35
|
export type OrganizationFeatureSettings$Outbound = {
|
|
42
36
|
articles_enabled: boolean;
|
|
43
|
-
subscriptions_enabled: boolean;
|
|
44
37
|
issue_funding_enabled: boolean;
|
|
45
38
|
};
|
|
46
39
|
|
|
@@ -51,12 +44,10 @@ export const OrganizationFeatureSettings$outboundSchema: z.ZodType<
|
|
|
51
44
|
OrganizationFeatureSettings
|
|
52
45
|
> = z.object({
|
|
53
46
|
articlesEnabled: z.boolean().default(false),
|
|
54
|
-
subscriptionsEnabled: z.boolean().default(false),
|
|
55
47
|
issueFundingEnabled: z.boolean().default(false),
|
|
56
48
|
}).transform((v) => {
|
|
57
49
|
return remap$(v, {
|
|
58
50
|
articlesEnabled: "articles_enabled",
|
|
59
|
-
subscriptionsEnabled: "subscriptions_enabled",
|
|
60
51
|
issueFundingEnabled: "issue_funding_enabled",
|
|
61
52
|
});
|
|
62
53
|
});
|