@polar-sh/sdk 0.29.0 → 0.29.2
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/FUNCTIONS.md +5 -1
- package/README.md +48 -12
- package/bin/mcp-server.js +866 -148
- package/bin/mcp-server.js.map +29 -14
- package/dist/commonjs/funcs/customersGetState.d.ts +27 -0
- package/dist/commonjs/funcs/customersGetState.d.ts.map +1 -0
- package/dist/commonjs/funcs/customersGetState.js +121 -0
- package/dist/commonjs/funcs/customersGetState.js.map +1 -0
- package/dist/commonjs/funcs/customersGetStateExternal.d.ts +27 -0
- package/dist/commonjs/funcs/customersGetStateExternal.d.ts.map +1 -0
- package/dist/commonjs/funcs/customersGetStateExternal.js +121 -0
- package/dist/commonjs/funcs/customersGetStateExternal.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +5 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/customersGetState.d.ts +7 -0
- package/dist/commonjs/mcp-server/tools/customersGetState.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/customersGetState.js +40 -0
- package/dist/commonjs/mcp-server/tools/customersGetState.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/customersGetStateExternal.d.ts +7 -0
- package/dist/commonjs/mcp-server/tools/customersGetStateExternal.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/customersGetStateExternal.js +40 -0
- package/dist/commonjs/mcp-server/tools/customersGetStateExternal.js.map +1 -0
- package/dist/commonjs/models/components/customer.d.ts +11 -5
- package/dist/commonjs/models/components/customer.d.ts.map +1 -1
- package/dist/commonjs/models/components/customer.js +2 -2
- package/dist/commonjs/models/components/customer.js.map +1 -1
- package/dist/commonjs/models/components/customercreate.d.ts +3 -0
- package/dist/commonjs/models/components/customercreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/customercreate.js.map +1 -1
- package/dist/commonjs/models/components/customerordersubscription.d.ts +39 -0
- package/dist/commonjs/models/components/customerordersubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerordersubscription.js.map +1 -1
- package/dist/commonjs/models/components/customerstate.d.ts +143 -0
- package/dist/commonjs/models/components/customerstate.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerstate.js +162 -0
- package/dist/commonjs/models/components/customerstate.js.map +1 -0
- package/dist/commonjs/models/components/customerstatebenefitgrant.d.ts +86 -0
- package/dist/commonjs/models/components/customerstatebenefitgrant.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerstatebenefitgrant.js +141 -0
- package/dist/commonjs/models/components/customerstatebenefitgrant.js.map +1 -0
- package/dist/commonjs/models/components/customerstatesubscription.d.ts +162 -0
- package/dist/commonjs/models/components/customerstatesubscription.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerstatesubscription.js +193 -0
- package/dist/commonjs/models/components/customerstatesubscription.js.map +1 -0
- package/dist/commonjs/models/components/customersubscription.d.ts +9 -0
- package/dist/commonjs/models/components/customersubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/customersubscription.js.map +1 -1
- package/dist/commonjs/models/components/customerupdate.d.ts +3 -0
- package/dist/commonjs/models/components/customerupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerupdate.js.map +1 -1
- package/dist/commonjs/models/components/licensekeycustomer.d.ts +11 -5
- package/dist/commonjs/models/components/licensekeycustomer.d.ts.map +1 -1
- package/dist/commonjs/models/components/licensekeycustomer.js +2 -2
- package/dist/commonjs/models/components/licensekeycustomer.js.map +1 -1
- package/dist/commonjs/models/components/ordercustomer.d.ts +11 -5
- package/dist/commonjs/models/components/ordercustomer.d.ts.map +1 -1
- package/dist/commonjs/models/components/ordercustomer.js +2 -2
- package/dist/commonjs/models/components/ordercustomer.js.map +1 -1
- package/dist/commonjs/models/components/ordersubscription.d.ts +39 -0
- package/dist/commonjs/models/components/ordersubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/ordersubscription.js.map +1 -1
- package/dist/commonjs/models/components/subscription.d.ts +39 -0
- package/dist/commonjs/models/components/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscription.js.map +1 -1
- package/dist/commonjs/models/components/subscriptioncustomer.d.ts +11 -5
- package/dist/commonjs/models/components/subscriptioncustomer.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscriptioncustomer.js +2 -2
- package/dist/commonjs/models/components/subscriptioncustomer.js.map +1 -1
- package/dist/commonjs/models/components/webhookcustomercreatedpayload.d.ts +47 -0
- package/dist/commonjs/models/components/webhookcustomercreatedpayload.d.ts.map +1 -0
- package/dist/commonjs/models/components/webhookcustomercreatedpayload.js +62 -0
- package/dist/commonjs/models/components/webhookcustomercreatedpayload.js.map +1 -0
- package/dist/commonjs/models/components/webhookcustomerdeletedpayload.d.ts +42 -0
- package/dist/commonjs/models/components/webhookcustomerdeletedpayload.d.ts.map +1 -0
- package/dist/commonjs/models/components/webhookcustomerdeletedpayload.js +62 -0
- package/dist/commonjs/models/components/webhookcustomerdeletedpayload.js.map +1 -0
- package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.d.ts +53 -0
- package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.d.ts.map +1 -0
- package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.js +62 -0
- package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.js.map +1 -0
- package/dist/commonjs/models/components/webhookcustomerupdatedpayload.d.ts +46 -0
- package/dist/commonjs/models/components/webhookcustomerupdatedpayload.d.ts.map +1 -0
- package/dist/commonjs/models/components/webhookcustomerupdatedpayload.js +62 -0
- package/dist/commonjs/models/components/webhookcustomerupdatedpayload.js.map +1 -0
- package/dist/commonjs/models/components/webhookordercreatedpayload.d.ts +7 -0
- package/dist/commonjs/models/components/webhookordercreatedpayload.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhookordercreatedpayload.js.map +1 -1
- package/dist/commonjs/models/components/webhooksubscriptioncreatedpayload.d.ts +2 -0
- package/dist/commonjs/models/components/webhooksubscriptioncreatedpayload.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhooksubscriptioncreatedpayload.js.map +1 -1
- package/dist/commonjs/models/operations/customersgetstate.d.ts +32 -0
- package/dist/commonjs/models/operations/customersgetstate.d.ts.map +1 -0
- package/dist/commonjs/models/operations/customersgetstate.js +59 -0
- package/dist/commonjs/models/operations/customersgetstate.js.map +1 -0
- package/dist/commonjs/models/operations/customersgetstateexternal.d.ts +32 -0
- package/dist/commonjs/models/operations/customersgetstateexternal.d.ts.map +1 -0
- package/dist/commonjs/models/operations/customersgetstateexternal.js +68 -0
- package/dist/commonjs/models/operations/customersgetstateexternal.js.map +1 -0
- package/dist/commonjs/sdk/customers.d.ts +33 -0
- package/dist/commonjs/sdk/customers.d.ts.map +1 -1
- package/dist/commonjs/sdk/customers.js +36 -0
- package/dist/commonjs/sdk/customers.js.map +1 -1
- package/dist/commonjs/webhooks.d.ts +2 -2
- package/dist/commonjs/webhooks.d.ts.map +1 -1
- package/dist/commonjs/webhooks.js +36 -24
- package/dist/commonjs/webhooks.js.map +1 -1
- package/dist/esm/funcs/customersGetState.d.ts +27 -0
- package/dist/esm/funcs/customersGetState.d.ts.map +1 -0
- package/dist/esm/funcs/customersGetState.js +95 -0
- package/dist/esm/funcs/customersGetState.js.map +1 -0
- package/dist/esm/funcs/customersGetStateExternal.d.ts +27 -0
- package/dist/esm/funcs/customersGetStateExternal.d.ts.map +1 -0
- package/dist/esm/funcs/customersGetStateExternal.js +95 -0
- package/dist/esm/funcs/customersGetStateExternal.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +5 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/customersGetState.d.ts +7 -0
- package/dist/esm/mcp-server/tools/customersGetState.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/customersGetState.js +37 -0
- package/dist/esm/mcp-server/tools/customersGetState.js.map +1 -0
- package/dist/esm/mcp-server/tools/customersGetStateExternal.d.ts +7 -0
- package/dist/esm/mcp-server/tools/customersGetStateExternal.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/customersGetStateExternal.js +37 -0
- package/dist/esm/mcp-server/tools/customersGetStateExternal.js.map +1 -0
- package/dist/esm/models/components/customer.d.ts +11 -5
- package/dist/esm/models/components/customer.d.ts.map +1 -1
- package/dist/esm/models/components/customer.js +2 -2
- package/dist/esm/models/components/customer.js.map +1 -1
- package/dist/esm/models/components/customercreate.d.ts +3 -0
- package/dist/esm/models/components/customercreate.d.ts.map +1 -1
- package/dist/esm/models/components/customercreate.js.map +1 -1
- package/dist/esm/models/components/customerordersubscription.d.ts +39 -0
- package/dist/esm/models/components/customerordersubscription.d.ts.map +1 -1
- package/dist/esm/models/components/customerordersubscription.js.map +1 -1
- package/dist/esm/models/components/customerstate.d.ts +143 -0
- package/dist/esm/models/components/customerstate.d.ts.map +1 -0
- package/dist/esm/models/components/customerstate.js +130 -0
- package/dist/esm/models/components/customerstate.js.map +1 -0
- package/dist/esm/models/components/customerstatebenefitgrant.d.ts +86 -0
- package/dist/esm/models/components/customerstatebenefitgrant.d.ts.map +1 -0
- package/dist/esm/models/components/customerstatebenefitgrant.js +111 -0
- package/dist/esm/models/components/customerstatebenefitgrant.js.map +1 -0
- package/dist/esm/models/components/customerstatesubscription.d.ts +162 -0
- package/dist/esm/models/components/customerstatesubscription.d.ts.map +1 -0
- package/dist/esm/models/components/customerstatesubscription.js +161 -0
- package/dist/esm/models/components/customerstatesubscription.js.map +1 -0
- package/dist/esm/models/components/customersubscription.d.ts +9 -0
- package/dist/esm/models/components/customersubscription.d.ts.map +1 -1
- package/dist/esm/models/components/customersubscription.js.map +1 -1
- package/dist/esm/models/components/customerupdate.d.ts +3 -0
- package/dist/esm/models/components/customerupdate.d.ts.map +1 -1
- package/dist/esm/models/components/customerupdate.js.map +1 -1
- package/dist/esm/models/components/licensekeycustomer.d.ts +11 -5
- package/dist/esm/models/components/licensekeycustomer.d.ts.map +1 -1
- package/dist/esm/models/components/licensekeycustomer.js +2 -2
- package/dist/esm/models/components/licensekeycustomer.js.map +1 -1
- package/dist/esm/models/components/ordercustomer.d.ts +11 -5
- package/dist/esm/models/components/ordercustomer.d.ts.map +1 -1
- package/dist/esm/models/components/ordercustomer.js +2 -2
- package/dist/esm/models/components/ordercustomer.js.map +1 -1
- package/dist/esm/models/components/ordersubscription.d.ts +39 -0
- package/dist/esm/models/components/ordersubscription.d.ts.map +1 -1
- package/dist/esm/models/components/ordersubscription.js.map +1 -1
- package/dist/esm/models/components/subscription.d.ts +39 -0
- package/dist/esm/models/components/subscription.d.ts.map +1 -1
- package/dist/esm/models/components/subscription.js.map +1 -1
- package/dist/esm/models/components/subscriptioncustomer.d.ts +11 -5
- package/dist/esm/models/components/subscriptioncustomer.d.ts.map +1 -1
- package/dist/esm/models/components/subscriptioncustomer.js +2 -2
- package/dist/esm/models/components/subscriptioncustomer.js.map +1 -1
- package/dist/esm/models/components/webhookcustomercreatedpayload.d.ts +47 -0
- package/dist/esm/models/components/webhookcustomercreatedpayload.d.ts.map +1 -0
- package/dist/esm/models/components/webhookcustomercreatedpayload.js +34 -0
- package/dist/esm/models/components/webhookcustomercreatedpayload.js.map +1 -0
- package/dist/esm/models/components/webhookcustomerdeletedpayload.d.ts +42 -0
- package/dist/esm/models/components/webhookcustomerdeletedpayload.d.ts.map +1 -0
- package/dist/esm/models/components/webhookcustomerdeletedpayload.js +34 -0
- package/dist/esm/models/components/webhookcustomerdeletedpayload.js.map +1 -0
- package/dist/esm/models/components/webhookcustomerstatechangedpayload.d.ts +53 -0
- package/dist/esm/models/components/webhookcustomerstatechangedpayload.d.ts.map +1 -0
- package/dist/esm/models/components/webhookcustomerstatechangedpayload.js +34 -0
- package/dist/esm/models/components/webhookcustomerstatechangedpayload.js.map +1 -0
- package/dist/esm/models/components/webhookcustomerupdatedpayload.d.ts +46 -0
- package/dist/esm/models/components/webhookcustomerupdatedpayload.d.ts.map +1 -0
- package/dist/esm/models/components/webhookcustomerupdatedpayload.js +34 -0
- package/dist/esm/models/components/webhookcustomerupdatedpayload.js.map +1 -0
- package/dist/esm/models/components/webhookordercreatedpayload.d.ts +7 -0
- package/dist/esm/models/components/webhookordercreatedpayload.d.ts.map +1 -1
- package/dist/esm/models/components/webhookordercreatedpayload.js.map +1 -1
- package/dist/esm/models/components/webhooksubscriptioncreatedpayload.d.ts +2 -0
- package/dist/esm/models/components/webhooksubscriptioncreatedpayload.d.ts.map +1 -1
- package/dist/esm/models/components/webhooksubscriptioncreatedpayload.js.map +1 -1
- package/dist/esm/models/operations/customersgetstate.d.ts +32 -0
- package/dist/esm/models/operations/customersgetstate.d.ts.map +1 -0
- package/dist/esm/models/operations/customersgetstate.js +31 -0
- package/dist/esm/models/operations/customersgetstate.js.map +1 -0
- package/dist/esm/models/operations/customersgetstateexternal.d.ts +32 -0
- package/dist/esm/models/operations/customersgetstateexternal.d.ts.map +1 -0
- package/dist/esm/models/operations/customersgetstateexternal.js +40 -0
- package/dist/esm/models/operations/customersgetstateexternal.js.map +1 -0
- package/dist/esm/sdk/customers.d.ts +33 -0
- package/dist/esm/sdk/customers.d.ts.map +1 -1
- package/dist/esm/sdk/customers.js +36 -0
- package/dist/esm/sdk/customers.js.map +1 -1
- package/dist/esm/webhooks.d.ts +2 -2
- package/dist/esm/webhooks.d.ts.map +1 -1
- package/dist/esm/webhooks.js +39 -27
- package/dist/esm/webhooks.js.map +1 -1
- package/docs/sdks/benefitgrants/README.md +10 -2
- package/docs/sdks/benefits/README.md +12 -2
- package/docs/sdks/checkoutlinks/README.md +10 -2
- package/docs/sdks/checkouts/README.md +16 -2
- package/docs/sdks/customers/README.md +206 -4
- package/docs/sdks/customfields/README.md +12 -2
- package/docs/sdks/discounts/README.md +12 -2
- package/docs/sdks/downloadables/README.md +10 -2
- package/docs/sdks/events/README.md +14 -2
- package/docs/sdks/externalorganizations/README.md +10 -2
- package/docs/sdks/files/README.md +8 -2
- package/docs/sdks/licensekeys/README.md +10 -2
- package/docs/sdks/meters/README.md +12 -2
- package/docs/sdks/metrics/README.md +6 -0
- package/docs/sdks/orders/README.md +10 -2
- package/docs/sdks/organizations/README.md +4 -4
- package/docs/sdks/polarlicensekeys/README.md +10 -2
- package/docs/sdks/polarorders/README.md +10 -2
- package/docs/sdks/polarsubscriptions/README.md +10 -2
- package/docs/sdks/products/README.md +12 -2
- package/docs/sdks/refunds/README.md +10 -2
- package/docs/sdks/repositories/README.md +10 -2
- package/docs/sdks/subscriptions/README.md +20 -4
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/customersGetState.ts +195 -0
- package/src/funcs/customersGetStateExternal.ts +197 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/customersGetState.ts +46 -0
- package/src/mcp-server/tools/customersGetStateExternal.ts +46 -0
- package/src/models/components/customer.ts +13 -7
- package/src/models/components/customercreate.ts +3 -0
- package/src/models/components/customerordersubscription.ts +39 -0
- package/src/models/components/customerstate.ts +308 -0
- package/src/models/components/customerstatebenefitgrant.ts +261 -0
- package/src/models/components/customerstatesubscription.ts +389 -0
- package/src/models/components/customersubscription.ts +9 -0
- package/src/models/components/customerupdate.ts +3 -0
- package/src/models/components/licensekeycustomer.ts +13 -7
- package/src/models/components/ordercustomer.ts +13 -7
- package/src/models/components/ordersubscription.ts +39 -0
- package/src/models/components/subscription.ts +39 -0
- package/src/models/components/subscriptioncustomer.ts +13 -7
- package/src/models/components/webhookcustomercreatedpayload.ts +93 -0
- package/src/models/components/webhookcustomerdeletedpayload.ts +88 -0
- package/src/models/components/webhookcustomerstatechangedpayload.ts +103 -0
- package/src/models/components/webhookcustomerupdatedpayload.ts +92 -0
- package/src/models/components/webhookordercreatedpayload.ts +7 -0
- package/src/models/components/webhooksubscriptioncreatedpayload.ts +2 -0
- package/src/models/operations/customersgetstate.ts +69 -0
- package/src/models/operations/customersgetstateexternal.ts +80 -0
- package/src/sdk/customers.ts +55 -0
- package/src/webhooks.ts +95 -78
|
@@ -27,7 +27,11 @@ const polar = new Polar({
|
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
async function run() {
|
|
30
|
-
const result = await polar.discounts.list({
|
|
30
|
+
const result = await polar.discounts.list({
|
|
31
|
+
organizationId: [
|
|
32
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
33
|
+
],
|
|
34
|
+
});
|
|
31
35
|
|
|
32
36
|
for await (const page of result) {
|
|
33
37
|
// Handle the page
|
|
@@ -53,7 +57,11 @@ const polar = new PolarCore({
|
|
|
53
57
|
});
|
|
54
58
|
|
|
55
59
|
async function run() {
|
|
56
|
-
const res = await discountsList(polar, {
|
|
60
|
+
const res = await discountsList(polar, {
|
|
61
|
+
organizationId: [
|
|
62
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
63
|
+
],
|
|
64
|
+
});
|
|
57
65
|
|
|
58
66
|
if (!res.ok) {
|
|
59
67
|
throw res.error;
|
|
@@ -113,6 +121,7 @@ async function run() {
|
|
|
113
121
|
amount: 69025,
|
|
114
122
|
currency: "usd",
|
|
115
123
|
name: "<value>",
|
|
124
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
116
125
|
});
|
|
117
126
|
|
|
118
127
|
// Handle the result
|
|
@@ -144,6 +153,7 @@ async function run() {
|
|
|
144
153
|
amount: 69025,
|
|
145
154
|
currency: "usd",
|
|
146
155
|
name: "<value>",
|
|
156
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
147
157
|
});
|
|
148
158
|
|
|
149
159
|
if (!res.ok) {
|
|
@@ -22,7 +22,11 @@ const polar = new Polar();
|
|
|
22
22
|
async function run() {
|
|
23
23
|
const result = await polar.customerPortal.downloadables.list({
|
|
24
24
|
customerSession: process.env["POLAR_CUSTOMER_SESSION"] ?? "",
|
|
25
|
-
}, {
|
|
25
|
+
}, {
|
|
26
|
+
organizationId: [
|
|
27
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
28
|
+
],
|
|
29
|
+
});
|
|
26
30
|
|
|
27
31
|
for await (const page of result) {
|
|
28
32
|
// Handle the page
|
|
@@ -48,7 +52,11 @@ const polar = new PolarCore();
|
|
|
48
52
|
async function run() {
|
|
49
53
|
const res = await customerPortalDownloadablesList(polar, {
|
|
50
54
|
customerSession: process.env["POLAR_CUSTOMER_SESSION"] ?? "",
|
|
51
|
-
}, {
|
|
55
|
+
}, {
|
|
56
|
+
organizationId: [
|
|
57
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
58
|
+
],
|
|
59
|
+
});
|
|
52
60
|
|
|
53
61
|
if (!res.ok) {
|
|
54
62
|
throw res.error;
|
|
@@ -25,7 +25,11 @@ const polar = new Polar({
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
async function run() {
|
|
28
|
-
const result = await polar.events.list({
|
|
28
|
+
const result = await polar.events.list({
|
|
29
|
+
organizationId: [
|
|
30
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
31
|
+
],
|
|
32
|
+
});
|
|
29
33
|
|
|
30
34
|
for await (const page of result) {
|
|
31
35
|
// Handle the page
|
|
@@ -51,7 +55,11 @@ const polar = new PolarCore({
|
|
|
51
55
|
});
|
|
52
56
|
|
|
53
57
|
async function run() {
|
|
54
|
-
const res = await eventsList(polar, {
|
|
58
|
+
const res = await eventsList(polar, {
|
|
59
|
+
organizationId: [
|
|
60
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
61
|
+
],
|
|
62
|
+
});
|
|
55
63
|
|
|
56
64
|
if (!res.ok) {
|
|
57
65
|
throw res.error;
|
|
@@ -188,10 +196,12 @@ async function run() {
|
|
|
188
196
|
events: [
|
|
189
197
|
{
|
|
190
198
|
name: "<value>",
|
|
199
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
191
200
|
customerId: "<value>",
|
|
192
201
|
},
|
|
193
202
|
{
|
|
194
203
|
name: "<value>",
|
|
204
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
195
205
|
externalCustomerId: "<id>",
|
|
196
206
|
},
|
|
197
207
|
],
|
|
@@ -223,10 +233,12 @@ async function run() {
|
|
|
223
233
|
events: [
|
|
224
234
|
{
|
|
225
235
|
name: "<value>",
|
|
236
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
226
237
|
customerId: "<value>",
|
|
227
238
|
},
|
|
228
239
|
{
|
|
229
240
|
name: "<value>",
|
|
241
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
230
242
|
externalCustomerId: "<id>",
|
|
231
243
|
},
|
|
232
244
|
],
|
|
@@ -23,7 +23,11 @@ const polar = new Polar({
|
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
async function run() {
|
|
26
|
-
const result = await polar.externalOrganizations.list({
|
|
26
|
+
const result = await polar.externalOrganizations.list({
|
|
27
|
+
organizationId: [
|
|
28
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
29
|
+
],
|
|
30
|
+
});
|
|
27
31
|
|
|
28
32
|
for await (const page of result) {
|
|
29
33
|
// Handle the page
|
|
@@ -49,7 +53,11 @@ const polar = new PolarCore({
|
|
|
49
53
|
});
|
|
50
54
|
|
|
51
55
|
async function run() {
|
|
52
|
-
const res = await externalOrganizationsList(polar, {
|
|
56
|
+
const res = await externalOrganizationsList(polar, {
|
|
57
|
+
organizationId: [
|
|
58
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
59
|
+
],
|
|
60
|
+
});
|
|
53
61
|
|
|
54
62
|
if (!res.ok) {
|
|
55
63
|
throw res.error;
|
|
@@ -27,7 +27,9 @@ const polar = new Polar({
|
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
async function run() {
|
|
30
|
-
const result = await polar.files.list({
|
|
30
|
+
const result = await polar.files.list({
|
|
31
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
32
|
+
});
|
|
31
33
|
|
|
32
34
|
for await (const page of result) {
|
|
33
35
|
// Handle the page
|
|
@@ -53,7 +55,9 @@ const polar = new PolarCore({
|
|
|
53
55
|
});
|
|
54
56
|
|
|
55
57
|
async function run() {
|
|
56
|
-
const res = await filesList(polar, {
|
|
58
|
+
const res = await filesList(polar, {
|
|
59
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
60
|
+
});
|
|
57
61
|
|
|
58
62
|
if (!res.ok) {
|
|
59
63
|
throw res.error;
|
|
@@ -107,6 +111,7 @@ const polar = new Polar({
|
|
|
107
111
|
|
|
108
112
|
async function run() {
|
|
109
113
|
const result = await polar.files.create({
|
|
114
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
110
115
|
name: "<value>",
|
|
111
116
|
mimeType: "<value>",
|
|
112
117
|
size: 638424,
|
|
@@ -144,6 +149,7 @@ const polar = new PolarCore({
|
|
|
144
149
|
|
|
145
150
|
async function run() {
|
|
146
151
|
const res = await filesCreate(polar, {
|
|
152
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
147
153
|
name: "<value>",
|
|
148
154
|
mimeType: "<value>",
|
|
149
155
|
size: 816588,
|
|
@@ -26,7 +26,11 @@ const polar = new Polar({
|
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
async function run() {
|
|
29
|
-
const result = await polar.licenseKeys.list({
|
|
29
|
+
const result = await polar.licenseKeys.list({
|
|
30
|
+
organizationId: [
|
|
31
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
32
|
+
],
|
|
33
|
+
});
|
|
30
34
|
|
|
31
35
|
for await (const page of result) {
|
|
32
36
|
// Handle the page
|
|
@@ -52,7 +56,11 @@ const polar = new PolarCore({
|
|
|
52
56
|
});
|
|
53
57
|
|
|
54
58
|
async function run() {
|
|
55
|
-
const res = await licenseKeysList(polar, {
|
|
59
|
+
const res = await licenseKeysList(polar, {
|
|
60
|
+
organizationId: [
|
|
61
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
62
|
+
],
|
|
63
|
+
});
|
|
56
64
|
|
|
57
65
|
if (!res.ok) {
|
|
58
66
|
throw res.error;
|
|
@@ -28,7 +28,11 @@ const polar = new Polar({
|
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
async function run() {
|
|
31
|
-
const result = await polar.meters.list({
|
|
31
|
+
const result = await polar.meters.list({
|
|
32
|
+
organizationId: [
|
|
33
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
34
|
+
],
|
|
35
|
+
});
|
|
32
36
|
|
|
33
37
|
for await (const page of result) {
|
|
34
38
|
// Handle the page
|
|
@@ -54,7 +58,11 @@ const polar = new PolarCore({
|
|
|
54
58
|
});
|
|
55
59
|
|
|
56
60
|
async function run() {
|
|
57
|
-
const res = await metersList(polar, {
|
|
61
|
+
const res = await metersList(polar, {
|
|
62
|
+
organizationId: [
|
|
63
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
64
|
+
],
|
|
65
|
+
});
|
|
58
66
|
|
|
59
67
|
if (!res.ok) {
|
|
60
68
|
throw res.error;
|
|
@@ -119,6 +127,7 @@ async function run() {
|
|
|
119
127
|
func: "sum",
|
|
120
128
|
property: "<value>",
|
|
121
129
|
},
|
|
130
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
122
131
|
});
|
|
123
132
|
|
|
124
133
|
// Handle the result
|
|
@@ -155,6 +164,7 @@ async function run() {
|
|
|
155
164
|
func: "sum",
|
|
156
165
|
property: "<value>",
|
|
157
166
|
},
|
|
167
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
158
168
|
});
|
|
159
169
|
|
|
160
170
|
if (!res.ok) {
|
|
@@ -31,6 +31,9 @@ async function run() {
|
|
|
31
31
|
startDate: new RFCDate("2025-02-06"),
|
|
32
32
|
endDate: new RFCDate("2024-09-04"),
|
|
33
33
|
interval: "week",
|
|
34
|
+
organizationId: [
|
|
35
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
36
|
+
],
|
|
34
37
|
});
|
|
35
38
|
|
|
36
39
|
// Handle the result
|
|
@@ -60,6 +63,9 @@ async function run() {
|
|
|
60
63
|
startDate: new RFCDate("2025-02-06"),
|
|
61
64
|
endDate: new RFCDate("2024-09-04"),
|
|
62
65
|
interval: "week",
|
|
66
|
+
organizationId: [
|
|
67
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
68
|
+
],
|
|
63
69
|
});
|
|
64
70
|
|
|
65
71
|
if (!res.ok) {
|
|
@@ -25,7 +25,11 @@ const polar = new Polar({
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
async function run() {
|
|
28
|
-
const result = await polar.orders.list({
|
|
28
|
+
const result = await polar.orders.list({
|
|
29
|
+
organizationId: [
|
|
30
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
31
|
+
],
|
|
32
|
+
});
|
|
29
33
|
|
|
30
34
|
for await (const page of result) {
|
|
31
35
|
// Handle the page
|
|
@@ -51,7 +55,11 @@ const polar = new PolarCore({
|
|
|
51
55
|
});
|
|
52
56
|
|
|
53
57
|
async function run() {
|
|
54
|
-
const res = await ordersList(polar, {
|
|
58
|
+
const res = await ordersList(polar, {
|
|
59
|
+
organizationId: [
|
|
60
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
61
|
+
],
|
|
62
|
+
});
|
|
55
63
|
|
|
56
64
|
if (!res.ok) {
|
|
57
65
|
throw res.error;
|
|
@@ -187,7 +187,7 @@ const polar = new Polar({
|
|
|
187
187
|
|
|
188
188
|
async function run() {
|
|
189
189
|
const result = await polar.organizations.get({
|
|
190
|
-
id: "
|
|
190
|
+
id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
191
191
|
});
|
|
192
192
|
|
|
193
193
|
// Handle the result
|
|
@@ -213,7 +213,7 @@ const polar = new PolarCore({
|
|
|
213
213
|
|
|
214
214
|
async function run() {
|
|
215
215
|
const res = await organizationsGet(polar, {
|
|
216
|
-
id: "
|
|
216
|
+
id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
217
217
|
});
|
|
218
218
|
|
|
219
219
|
if (!res.ok) {
|
|
@@ -267,7 +267,7 @@ const polar = new Polar({
|
|
|
267
267
|
|
|
268
268
|
async function run() {
|
|
269
269
|
const result = await polar.organizations.update({
|
|
270
|
-
id: "
|
|
270
|
+
id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
271
271
|
organizationUpdate: {},
|
|
272
272
|
});
|
|
273
273
|
|
|
@@ -294,7 +294,7 @@ const polar = new PolarCore({
|
|
|
294
294
|
|
|
295
295
|
async function run() {
|
|
296
296
|
const res = await organizationsUpdate(polar, {
|
|
297
|
-
id: "
|
|
297
|
+
id: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
298
298
|
organizationUpdate: {},
|
|
299
299
|
});
|
|
300
300
|
|
|
@@ -25,7 +25,11 @@ const polar = new Polar();
|
|
|
25
25
|
async function run() {
|
|
26
26
|
const result = await polar.customerPortal.licenseKeys.list({
|
|
27
27
|
customerSession: process.env["POLAR_CUSTOMER_SESSION"] ?? "",
|
|
28
|
-
}, {
|
|
28
|
+
}, {
|
|
29
|
+
organizationId: [
|
|
30
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
31
|
+
],
|
|
32
|
+
});
|
|
29
33
|
|
|
30
34
|
for await (const page of result) {
|
|
31
35
|
// Handle the page
|
|
@@ -51,7 +55,11 @@ const polar = new PolarCore();
|
|
|
51
55
|
async function run() {
|
|
52
56
|
const res = await customerPortalLicenseKeysList(polar, {
|
|
53
57
|
customerSession: process.env["POLAR_CUSTOMER_SESSION"] ?? "",
|
|
54
|
-
}, {
|
|
58
|
+
}, {
|
|
59
|
+
organizationId: [
|
|
60
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
61
|
+
],
|
|
62
|
+
});
|
|
55
63
|
|
|
56
64
|
if (!res.ok) {
|
|
57
65
|
throw res.error;
|
|
@@ -25,7 +25,11 @@ const polar = new Polar();
|
|
|
25
25
|
async function run() {
|
|
26
26
|
const result = await polar.customerPortal.orders.list({
|
|
27
27
|
customerSession: process.env["POLAR_CUSTOMER_SESSION"] ?? "",
|
|
28
|
-
}, {
|
|
28
|
+
}, {
|
|
29
|
+
organizationId: [
|
|
30
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
31
|
+
],
|
|
32
|
+
});
|
|
29
33
|
|
|
30
34
|
for await (const page of result) {
|
|
31
35
|
// Handle the page
|
|
@@ -51,7 +55,11 @@ const polar = new PolarCore();
|
|
|
51
55
|
async function run() {
|
|
52
56
|
const res = await customerPortalOrdersList(polar, {
|
|
53
57
|
customerSession: process.env["POLAR_CUSTOMER_SESSION"] ?? "",
|
|
54
|
-
}, {
|
|
58
|
+
}, {
|
|
59
|
+
organizationId: [
|
|
60
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
61
|
+
],
|
|
62
|
+
});
|
|
55
63
|
|
|
56
64
|
if (!res.ok) {
|
|
57
65
|
throw res.error;
|
|
@@ -26,7 +26,11 @@ const polar = new Polar();
|
|
|
26
26
|
async function run() {
|
|
27
27
|
const result = await polar.customerPortal.subscriptions.list({
|
|
28
28
|
customerSession: process.env["POLAR_CUSTOMER_SESSION"] ?? "",
|
|
29
|
-
}, {
|
|
29
|
+
}, {
|
|
30
|
+
organizationId: [
|
|
31
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
32
|
+
],
|
|
33
|
+
});
|
|
30
34
|
|
|
31
35
|
for await (const page of result) {
|
|
32
36
|
// Handle the page
|
|
@@ -52,7 +56,11 @@ const polar = new PolarCore();
|
|
|
52
56
|
async function run() {
|
|
53
57
|
const res = await customerPortalSubscriptionsList(polar, {
|
|
54
58
|
customerSession: process.env["POLAR_CUSTOMER_SESSION"] ?? "",
|
|
55
|
-
}, {
|
|
59
|
+
}, {
|
|
60
|
+
organizationId: [
|
|
61
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
62
|
+
],
|
|
63
|
+
});
|
|
56
64
|
|
|
57
65
|
if (!res.ok) {
|
|
58
66
|
throw res.error;
|
|
@@ -27,7 +27,11 @@ const polar = new Polar({
|
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
async function run() {
|
|
30
|
-
const result = await polar.products.list({
|
|
30
|
+
const result = await polar.products.list({
|
|
31
|
+
organizationId: [
|
|
32
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
33
|
+
],
|
|
34
|
+
});
|
|
31
35
|
|
|
32
36
|
for await (const page of result) {
|
|
33
37
|
// Handle the page
|
|
@@ -53,7 +57,11 @@ const polar = new PolarCore({
|
|
|
53
57
|
});
|
|
54
58
|
|
|
55
59
|
async function run() {
|
|
56
|
-
const res = await productsList(polar, {
|
|
60
|
+
const res = await productsList(polar, {
|
|
61
|
+
organizationId: [
|
|
62
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
63
|
+
],
|
|
64
|
+
});
|
|
57
65
|
|
|
58
66
|
if (!res.ok) {
|
|
59
67
|
throw res.error;
|
|
@@ -114,6 +122,7 @@ async function run() {
|
|
|
114
122
|
priceCurrency: "usd",
|
|
115
123
|
},
|
|
116
124
|
],
|
|
125
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
117
126
|
});
|
|
118
127
|
|
|
119
128
|
// Handle the result
|
|
@@ -146,6 +155,7 @@ async function run() {
|
|
|
146
155
|
priceCurrency: "usd",
|
|
147
156
|
},
|
|
148
157
|
],
|
|
158
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
149
159
|
});
|
|
150
160
|
|
|
151
161
|
if (!res.ok) {
|
|
@@ -24,7 +24,11 @@ const polar = new Polar({
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
async function run() {
|
|
27
|
-
const result = await polar.refunds.list({
|
|
27
|
+
const result = await polar.refunds.list({
|
|
28
|
+
organizationId: [
|
|
29
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
30
|
+
],
|
|
31
|
+
});
|
|
28
32
|
|
|
29
33
|
for await (const page of result) {
|
|
30
34
|
// Handle the page
|
|
@@ -50,7 +54,11 @@ const polar = new PolarCore({
|
|
|
50
54
|
});
|
|
51
55
|
|
|
52
56
|
async function run() {
|
|
53
|
-
const res = await refundsList(polar, {
|
|
57
|
+
const res = await refundsList(polar, {
|
|
58
|
+
organizationId: [
|
|
59
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
60
|
+
],
|
|
61
|
+
});
|
|
54
62
|
|
|
55
63
|
if (!res.ok) {
|
|
56
64
|
throw res.error;
|
|
@@ -25,7 +25,11 @@ const polar = new Polar({
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
async function run() {
|
|
28
|
-
const result = await polar.repositories.list({
|
|
28
|
+
const result = await polar.repositories.list({
|
|
29
|
+
organizationId: [
|
|
30
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
31
|
+
],
|
|
32
|
+
});
|
|
29
33
|
|
|
30
34
|
for await (const page of result) {
|
|
31
35
|
// Handle the page
|
|
@@ -51,7 +55,11 @@ const polar = new PolarCore({
|
|
|
51
55
|
});
|
|
52
56
|
|
|
53
57
|
async function run() {
|
|
54
|
-
const res = await repositoriesList(polar, {
|
|
58
|
+
const res = await repositoriesList(polar, {
|
|
59
|
+
organizationId: [
|
|
60
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
61
|
+
],
|
|
62
|
+
});
|
|
55
63
|
|
|
56
64
|
if (!res.ok) {
|
|
57
65
|
throw res.error;
|
|
@@ -27,7 +27,11 @@ const polar = new Polar({
|
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
async function run() {
|
|
30
|
-
const result = await polar.subscriptions.list({
|
|
30
|
+
const result = await polar.subscriptions.list({
|
|
31
|
+
organizationId: [
|
|
32
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
33
|
+
],
|
|
34
|
+
});
|
|
31
35
|
|
|
32
36
|
for await (const page of result) {
|
|
33
37
|
// Handle the page
|
|
@@ -53,7 +57,11 @@ const polar = new PolarCore({
|
|
|
53
57
|
});
|
|
54
58
|
|
|
55
59
|
async function run() {
|
|
56
|
-
const res = await subscriptionsList(polar, {
|
|
60
|
+
const res = await subscriptionsList(polar, {
|
|
61
|
+
organizationId: [
|
|
62
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
63
|
+
],
|
|
64
|
+
});
|
|
57
65
|
|
|
58
66
|
if (!res.ok) {
|
|
59
67
|
throw res.error;
|
|
@@ -106,7 +114,11 @@ const polar = new Polar({
|
|
|
106
114
|
});
|
|
107
115
|
|
|
108
116
|
async function run() {
|
|
109
|
-
const result = await polar.subscriptions.export({
|
|
117
|
+
const result = await polar.subscriptions.export({
|
|
118
|
+
organizationId: [
|
|
119
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
120
|
+
],
|
|
121
|
+
});
|
|
110
122
|
|
|
111
123
|
// Handle the result
|
|
112
124
|
console.log(result);
|
|
@@ -130,7 +142,11 @@ const polar = new PolarCore({
|
|
|
130
142
|
});
|
|
131
143
|
|
|
132
144
|
async function run() {
|
|
133
|
-
const res = await subscriptionsExport(polar, {
|
|
145
|
+
const res = await subscriptionsExport(polar, {
|
|
146
|
+
organizationId: [
|
|
147
|
+
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
148
|
+
],
|
|
149
|
+
});
|
|
134
150
|
|
|
135
151
|
if (!res.ok) {
|
|
136
152
|
throw res.error;
|
package/jsr.json
CHANGED