@polar-sh/sdk 0.32.0 → 0.32.1
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 +37 -33
- package/bin/mcp-server.js +99 -8
- package/bin/mcp-server.js.map +9 -7
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/productprice.d.ts +3 -2
- package/dist/commonjs/models/components/productprice.d.ts.map +1 -1
- package/dist/commonjs/models/components/productprice.js +3 -0
- package/dist/commonjs/models/components/productprice.js.map +1 -1
- package/dist/commonjs/models/components/productpricemeter.d.ts +40 -0
- package/dist/commonjs/models/components/productpricemeter.d.ts.map +1 -0
- package/dist/commonjs/models/components/productpricemeter.js +61 -0
- package/dist/commonjs/models/components/productpricemeter.js.map +1 -0
- package/dist/commonjs/models/components/productpricemeteredunit.d.ts +92 -0
- package/dist/commonjs/models/components/productpricemeteredunit.d.ts.map +1 -0
- package/dist/commonjs/models/components/productpricemeteredunit.js +113 -0
- package/dist/commonjs/models/components/productpricemeteredunit.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/productprice.d.ts +3 -2
- package/dist/esm/models/components/productprice.d.ts.map +1 -1
- package/dist/esm/models/components/productprice.js +3 -0
- package/dist/esm/models/components/productprice.js.map +1 -1
- package/dist/esm/models/components/productpricemeter.d.ts +40 -0
- package/dist/esm/models/components/productpricemeter.d.ts.map +1 -0
- package/dist/esm/models/components/productpricemeter.js +33 -0
- package/dist/esm/models/components/productpricemeter.js.map +1 -0
- package/dist/esm/models/components/productpricemeteredunit.d.ts +92 -0
- package/dist/esm/models/components/productpricemeteredunit.d.ts.map +1 -0
- package/dist/esm/models/components/productpricemeteredunit.js +85 -0
- package/dist/esm/models/components/productpricemeteredunit.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/productprice.ts +12 -2
- package/src/models/components/productpricemeter.ts +79 -0
- package/src/models/components/productpricemeteredunit.ts +195 -0
package/README.md
CHANGED
|
@@ -348,7 +348,9 @@ async function run() {
|
|
|
348
348
|
type: "one_time",
|
|
349
349
|
recurringInterval: "month",
|
|
350
350
|
priceCurrency: "<value>",
|
|
351
|
-
|
|
351
|
+
minimumAmount: 648726,
|
|
352
|
+
maximumAmount: 210702,
|
|
353
|
+
presetAmount: 441593,
|
|
352
354
|
},
|
|
353
355
|
],
|
|
354
356
|
benefits: [
|
|
@@ -432,33 +434,36 @@ async function run() {
|
|
|
432
434
|
organizationId: "<value>",
|
|
433
435
|
prices: [
|
|
434
436
|
{
|
|
435
|
-
createdAt: new Date("
|
|
436
|
-
modifiedAt: new Date("
|
|
437
|
+
createdAt: new Date("2024-07-02T09:46:29.338Z"),
|
|
438
|
+
modifiedAt: new Date("2025-01-24T18:08:49.597Z"),
|
|
437
439
|
id: "<value>",
|
|
438
440
|
isArchived: false,
|
|
439
441
|
productId: "<value>",
|
|
442
|
+
type: "recurring",
|
|
440
443
|
recurringInterval: "year",
|
|
441
|
-
priceCurrency: "<value>",
|
|
442
|
-
priceAmount: 688646,
|
|
443
444
|
},
|
|
444
445
|
{
|
|
445
|
-
createdAt: new Date("
|
|
446
|
-
modifiedAt: new Date("
|
|
446
|
+
createdAt: new Date("2023-08-29T09:50:00.241Z"),
|
|
447
|
+
modifiedAt: new Date("2024-11-17T19:11:13.132Z"),
|
|
447
448
|
id: "<value>",
|
|
448
449
|
isArchived: false,
|
|
449
450
|
productId: "<value>",
|
|
450
451
|
type: "one_time",
|
|
451
|
-
recurringInterval: "
|
|
452
|
+
recurringInterval: "month",
|
|
453
|
+
priceCurrency: "<value>",
|
|
454
|
+
minimumAmount: 827509,
|
|
455
|
+
maximumAmount: 691423,
|
|
456
|
+
presetAmount: 499526,
|
|
452
457
|
},
|
|
453
458
|
{
|
|
454
|
-
createdAt: new Date("
|
|
455
|
-
modifiedAt: new Date("
|
|
459
|
+
createdAt: new Date("2023-04-15T12:36:50.681Z"),
|
|
460
|
+
modifiedAt: new Date("2023-04-02T00:05:42.586Z"),
|
|
456
461
|
id: "<value>",
|
|
457
462
|
isArchived: false,
|
|
458
463
|
productId: "<value>",
|
|
459
|
-
recurringInterval: "
|
|
464
|
+
recurringInterval: "year",
|
|
460
465
|
priceCurrency: "<value>",
|
|
461
|
-
priceAmount:
|
|
466
|
+
priceAmount: 740296,
|
|
462
467
|
},
|
|
463
468
|
],
|
|
464
469
|
benefits: [
|
|
@@ -552,15 +557,21 @@ async function run() {
|
|
|
552
557
|
],
|
|
553
558
|
},
|
|
554
559
|
productPrice: {
|
|
555
|
-
createdAt: new Date("
|
|
556
|
-
modifiedAt: new Date("
|
|
560
|
+
createdAt: new Date("2024-12-13T18:25:33.693Z"),
|
|
561
|
+
modifiedAt: new Date("2023-01-09T04:38:53.436Z"),
|
|
557
562
|
id: "<value>",
|
|
558
563
|
isArchived: false,
|
|
559
564
|
productId: "<value>",
|
|
560
565
|
type: "recurring",
|
|
561
|
-
recurringInterval: "
|
|
562
|
-
|
|
563
|
-
|
|
566
|
+
recurringInterval: "month",
|
|
567
|
+
unitAmount: 199664,
|
|
568
|
+
includedUnits: 440790,
|
|
569
|
+
capAmount: 856200,
|
|
570
|
+
meterId: "<value>",
|
|
571
|
+
meter: {
|
|
572
|
+
id: "<value>",
|
|
573
|
+
name: "<value>",
|
|
574
|
+
},
|
|
564
575
|
},
|
|
565
576
|
discount: {
|
|
566
577
|
duration: "repeating",
|
|
@@ -575,23 +586,16 @@ async function run() {
|
|
|
575
586
|
{
|
|
576
587
|
customFieldId: "<value>",
|
|
577
588
|
customField: {
|
|
578
|
-
createdAt: new Date("
|
|
579
|
-
modifiedAt: new Date("2024-
|
|
589
|
+
createdAt: new Date("2025-05-25T15:20:50.694Z"),
|
|
590
|
+
modifiedAt: new Date("2024-11-27T14:29:40.329Z"),
|
|
580
591
|
id: "<value>",
|
|
581
592
|
metadata: {
|
|
582
|
-
"key":
|
|
593
|
+
"key": false,
|
|
583
594
|
},
|
|
584
595
|
slug: "<value>",
|
|
585
596
|
name: "<value>",
|
|
586
597
|
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
587
|
-
properties: {
|
|
588
|
-
options: [
|
|
589
|
-
{
|
|
590
|
-
value: "<value>",
|
|
591
|
-
label: "<value>",
|
|
592
|
-
},
|
|
593
|
-
],
|
|
594
|
-
},
|
|
598
|
+
properties: {},
|
|
595
599
|
},
|
|
596
600
|
order: 169862,
|
|
597
601
|
required: true,
|
|
@@ -599,8 +603,8 @@ async function run() {
|
|
|
599
603
|
{
|
|
600
604
|
customFieldId: "<value>",
|
|
601
605
|
customField: {
|
|
602
|
-
createdAt: new Date("2024-
|
|
603
|
-
modifiedAt: new Date("2025-
|
|
606
|
+
createdAt: new Date("2024-12-18T06:26:25.293Z"),
|
|
607
|
+
modifiedAt: new Date("2025-03-28T00:06:24.086Z"),
|
|
604
608
|
id: "<value>",
|
|
605
609
|
metadata: {
|
|
606
610
|
"key": "<value>",
|
|
@@ -616,11 +620,11 @@ async function run() {
|
|
|
616
620
|
{
|
|
617
621
|
customFieldId: "<value>",
|
|
618
622
|
customField: {
|
|
619
|
-
createdAt: new Date("2024-
|
|
620
|
-
modifiedAt: new Date("2025-
|
|
623
|
+
createdAt: new Date("2024-06-06T05:15:26.848Z"),
|
|
624
|
+
modifiedAt: new Date("2025-03-10T15:40:27.607Z"),
|
|
621
625
|
id: "<value>",
|
|
622
626
|
metadata: {
|
|
623
|
-
"key":
|
|
627
|
+
"key": false,
|
|
624
628
|
},
|
|
625
629
|
slug: "<value>",
|
|
626
630
|
name: "<value>",
|
package/bin/mcp-server.js
CHANGED
|
@@ -4018,9 +4018,9 @@ var init_config = __esm(() => {
|
|
|
4018
4018
|
SDK_METADATA = {
|
|
4019
4019
|
language: "typescript",
|
|
4020
4020
|
openapiDocVersion: "0.1.0",
|
|
4021
|
-
sdkVersion: "0.32.
|
|
4022
|
-
genVersion: "2.
|
|
4023
|
-
userAgent: "speakeasy-sdk/typescript 0.32.
|
|
4021
|
+
sdkVersion: "0.32.1",
|
|
4022
|
+
genVersion: "2.560.1",
|
|
4023
|
+
userAgent: "speakeasy-sdk/typescript 0.32.1 2.560.1 0.1.0 @polar-sh/sdk"
|
|
4024
4024
|
};
|
|
4025
4025
|
});
|
|
4026
4026
|
|
|
@@ -39781,6 +39781,94 @@ var init_productpricefree = __esm(() => {
|
|
|
39781
39781
|
})(ProductPriceFree$ ||= {});
|
|
39782
39782
|
});
|
|
39783
39783
|
|
|
39784
|
+
// src/models/components/productpricemeter.ts
|
|
39785
|
+
var ProductPriceMeter$inboundSchema, ProductPriceMeter$outboundSchema, ProductPriceMeter$;
|
|
39786
|
+
var init_productpricemeter = __esm(() => {
|
|
39787
|
+
init_lib();
|
|
39788
|
+
ProductPriceMeter$inboundSchema = objectType({
|
|
39789
|
+
id: stringType(),
|
|
39790
|
+
name: stringType()
|
|
39791
|
+
});
|
|
39792
|
+
ProductPriceMeter$outboundSchema = objectType({
|
|
39793
|
+
id: stringType(),
|
|
39794
|
+
name: stringType()
|
|
39795
|
+
});
|
|
39796
|
+
((ProductPriceMeter$) => {
|
|
39797
|
+
ProductPriceMeter$.inboundSchema = ProductPriceMeter$inboundSchema;
|
|
39798
|
+
ProductPriceMeter$.outboundSchema = ProductPriceMeter$outboundSchema;
|
|
39799
|
+
})(ProductPriceMeter$ ||= {});
|
|
39800
|
+
});
|
|
39801
|
+
|
|
39802
|
+
// src/models/components/productpricemeteredunit.ts
|
|
39803
|
+
var ProductPriceMeteredUnit$inboundSchema, ProductPriceMeteredUnit$outboundSchema, ProductPriceMeteredUnit$;
|
|
39804
|
+
var init_productpricemeteredunit = __esm(() => {
|
|
39805
|
+
init_lib();
|
|
39806
|
+
init_primitives();
|
|
39807
|
+
init_productpricemeter();
|
|
39808
|
+
init_productpricetype();
|
|
39809
|
+
init_subscriptionrecurringinterval();
|
|
39810
|
+
ProductPriceMeteredUnit$inboundSchema = objectType({
|
|
39811
|
+
created_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
|
|
39812
|
+
modified_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
|
|
39813
|
+
id: stringType(),
|
|
39814
|
+
amount_type: literalType("metered_unit").optional(),
|
|
39815
|
+
is_archived: booleanType(),
|
|
39816
|
+
product_id: stringType(),
|
|
39817
|
+
type: ProductPriceType$inboundSchema,
|
|
39818
|
+
recurring_interval: nullableType(SubscriptionRecurringInterval$inboundSchema),
|
|
39819
|
+
unit_amount: numberType().int(),
|
|
39820
|
+
included_units: numberType().int(),
|
|
39821
|
+
cap_amount: nullableType(numberType().int()),
|
|
39822
|
+
meter_id: stringType(),
|
|
39823
|
+
meter: ProductPriceMeter$inboundSchema
|
|
39824
|
+
}).transform((v2) => {
|
|
39825
|
+
return remap(v2, {
|
|
39826
|
+
created_at: "createdAt",
|
|
39827
|
+
modified_at: "modifiedAt",
|
|
39828
|
+
amount_type: "amountType",
|
|
39829
|
+
is_archived: "isArchived",
|
|
39830
|
+
product_id: "productId",
|
|
39831
|
+
recurring_interval: "recurringInterval",
|
|
39832
|
+
unit_amount: "unitAmount",
|
|
39833
|
+
included_units: "includedUnits",
|
|
39834
|
+
cap_amount: "capAmount",
|
|
39835
|
+
meter_id: "meterId"
|
|
39836
|
+
});
|
|
39837
|
+
});
|
|
39838
|
+
ProductPriceMeteredUnit$outboundSchema = objectType({
|
|
39839
|
+
createdAt: dateType().transform((v2) => v2.toISOString()),
|
|
39840
|
+
modifiedAt: nullableType(dateType().transform((v2) => v2.toISOString())),
|
|
39841
|
+
id: stringType(),
|
|
39842
|
+
amountType: literalType("metered_unit").default("metered_unit"),
|
|
39843
|
+
isArchived: booleanType(),
|
|
39844
|
+
productId: stringType(),
|
|
39845
|
+
type: ProductPriceType$outboundSchema,
|
|
39846
|
+
recurringInterval: nullableType(SubscriptionRecurringInterval$outboundSchema),
|
|
39847
|
+
unitAmount: numberType().int(),
|
|
39848
|
+
includedUnits: numberType().int(),
|
|
39849
|
+
capAmount: nullableType(numberType().int()),
|
|
39850
|
+
meterId: stringType(),
|
|
39851
|
+
meter: ProductPriceMeter$outboundSchema
|
|
39852
|
+
}).transform((v2) => {
|
|
39853
|
+
return remap(v2, {
|
|
39854
|
+
createdAt: "created_at",
|
|
39855
|
+
modifiedAt: "modified_at",
|
|
39856
|
+
amountType: "amount_type",
|
|
39857
|
+
isArchived: "is_archived",
|
|
39858
|
+
productId: "product_id",
|
|
39859
|
+
recurringInterval: "recurring_interval",
|
|
39860
|
+
unitAmount: "unit_amount",
|
|
39861
|
+
includedUnits: "included_units",
|
|
39862
|
+
capAmount: "cap_amount",
|
|
39863
|
+
meterId: "meter_id"
|
|
39864
|
+
});
|
|
39865
|
+
});
|
|
39866
|
+
((ProductPriceMeteredUnit$) => {
|
|
39867
|
+
ProductPriceMeteredUnit$.inboundSchema = ProductPriceMeteredUnit$inboundSchema;
|
|
39868
|
+
ProductPriceMeteredUnit$.outboundSchema = ProductPriceMeteredUnit$outboundSchema;
|
|
39869
|
+
})(ProductPriceMeteredUnit$ ||= {});
|
|
39870
|
+
});
|
|
39871
|
+
|
|
39784
39872
|
// src/models/components/productprice.ts
|
|
39785
39873
|
var ProductPrice$inboundSchema, ProductPrice$outboundSchema, ProductPrice$;
|
|
39786
39874
|
var init_productprice = __esm(() => {
|
|
@@ -39788,15 +39876,18 @@ var init_productprice = __esm(() => {
|
|
|
39788
39876
|
init_productpricecustom();
|
|
39789
39877
|
init_productpricefixed();
|
|
39790
39878
|
init_productpricefree();
|
|
39879
|
+
init_productpricemeteredunit();
|
|
39791
39880
|
ProductPrice$inboundSchema = unionType([
|
|
39792
39881
|
ProductPriceFree$inboundSchema,
|
|
39793
39882
|
ProductPriceFixed$inboundSchema,
|
|
39794
|
-
ProductPriceCustom$inboundSchema
|
|
39883
|
+
ProductPriceCustom$inboundSchema,
|
|
39884
|
+
ProductPriceMeteredUnit$inboundSchema
|
|
39795
39885
|
]);
|
|
39796
39886
|
ProductPrice$outboundSchema = unionType([
|
|
39797
39887
|
ProductPriceFree$outboundSchema,
|
|
39798
39888
|
ProductPriceFixed$outboundSchema,
|
|
39799
|
-
ProductPriceCustom$outboundSchema
|
|
39889
|
+
ProductPriceCustom$outboundSchema,
|
|
39890
|
+
ProductPriceMeteredUnit$outboundSchema
|
|
39800
39891
|
]);
|
|
39801
39892
|
((ProductPrice$) => {
|
|
39802
39893
|
ProductPrice$.inboundSchema = ProductPrice$inboundSchema;
|
|
@@ -44248,7 +44339,7 @@ Update a subscription.
|
|
|
44248
44339
|
function createMCPServer(deps) {
|
|
44249
44340
|
const server = new McpServer({
|
|
44250
44341
|
name: "Polar",
|
|
44251
|
-
version: "0.32.
|
|
44342
|
+
version: "0.32.1"
|
|
44252
44343
|
});
|
|
44253
44344
|
const client = new PolarCore({
|
|
44254
44345
|
accessToken: deps.accessToken,
|
|
@@ -45510,7 +45601,7 @@ var routes = rn({
|
|
|
45510
45601
|
var app = Ve(routes, {
|
|
45511
45602
|
name: "mcp",
|
|
45512
45603
|
versionInfo: {
|
|
45513
|
-
currentVersion: "0.32.
|
|
45604
|
+
currentVersion: "0.32.1"
|
|
45514
45605
|
}
|
|
45515
45606
|
});
|
|
45516
45607
|
_t(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -45518,5 +45609,5 @@ export {
|
|
|
45518
45609
|
app
|
|
45519
45610
|
};
|
|
45520
45611
|
|
|
45521
|
-
//# debugId=
|
|
45612
|
+
//# debugId=E01D42FC09DE15A364756E2164756E21
|
|
45522
45613
|
//# sourceMappingURL=mcp-server.js.map
|