@flexprice/mcp-server 2.1.17 → 2.1.18
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/bin/mcp-server.js +544 -210
- package/bin/mcp-server.js.map +54 -43
- package/bun.lock +19 -17
- package/esm/funcs/subscriptionsExecuteSubscriptionModify.d.ts +1 -1
- package/esm/funcs/subscriptionsExecuteSubscriptionModify.js +1 -1
- package/esm/funcs/subscriptionsPreviewSubscriptionModify.d.ts +1 -1
- package/esm/funcs/subscriptionsPreviewSubscriptionModify.js +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.js +1 -1
- package/esm/lib/encodings.js.map +1 -1
- package/esm/lib/primitives.d.ts +1 -0
- package/esm/lib/primitives.d.ts.map +1 -1
- package/esm/lib/primitives.js +17 -0
- package/esm/lib/primitives.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +1 -1
- package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.js +1 -1
- package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.js.map +1 -1
- package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.js +1 -1
- package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.js.map +1 -1
- package/esm/models/attributedtocustomerresult.d.ts +11 -0
- package/esm/models/attributedtocustomerresult.d.ts.map +1 -0
- package/esm/models/attributedtocustomerresult.js +13 -0
- package/esm/models/attributedtocustomerresult.js.map +1 -0
- package/esm/models/bucket.d.ts +7 -0
- package/esm/models/bucket.d.ts.map +1 -0
- package/esm/models/bucket.js +9 -0
- package/esm/models/bucket.js.map +1 -0
- package/esm/models/bucketsummary.d.ts +18 -0
- package/esm/models/bucketsummary.d.ts.map +1 -0
- package/esm/models/bucketsummary.js +20 -0
- package/esm/models/bucketsummary.js.map +1 -0
- package/esm/models/cancelsubscriptionrequest.d.ts.map +1 -1
- package/esm/models/cancelsubscriptionrequest.js +1 -1
- package/esm/models/cancelsubscriptionrequest.js.map +1 -1
- package/esm/models/commitmentbucketrequest.d.ts +16 -0
- package/esm/models/commitmentbucketrequest.d.ts.map +1 -0
- package/esm/models/commitmentbucketrequest.js +18 -0
- package/esm/models/commitmentbucketrequest.js.map +1 -0
- package/esm/models/coupon.d.ts +1 -0
- package/esm/models/coupon.d.ts.map +1 -1
- package/esm/models/coupon.js +1 -0
- package/esm/models/coupon.js.map +1 -1
- package/esm/models/createsubscriptionlineitemrequest.d.ts +2 -0
- package/esm/models/createsubscriptionlineitemrequest.d.ts.map +1 -1
- package/esm/models/createsubscriptionlineitemrequest.js +3 -0
- package/esm/models/createsubscriptionlineitemrequest.js.map +1 -1
- package/esm/models/createsubscriptionrequest.d.ts +2 -0
- package/esm/models/createsubscriptionrequest.d.ts.map +1 -1
- package/esm/models/createsubscriptionrequest.js +6 -2
- package/esm/models/createsubscriptionrequest.js.map +1 -1
- package/esm/models/creditgrantexpirydurationunit.d.ts +1 -1
- package/esm/models/debugtracker.d.ts +2 -0
- package/esm/models/debugtracker.d.ts.map +1 -1
- package/esm/models/debugtracker.js +2 -0
- package/esm/models/debugtracker.js.map +1 -1
- package/esm/models/debugtrackerstatus.d.ts +4 -0
- package/esm/models/debugtrackerstatus.d.ts.map +1 -1
- package/esm/models/debugtrackerstatus.js +4 -0
- package/esm/models/debugtrackerstatus.js.map +1 -1
- package/esm/models/eventprocessingstatustype.d.ts +1 -1
- package/esm/models/executesubscriptionmodifyrequest.d.ts +4 -0
- package/esm/models/executesubscriptionmodifyrequest.d.ts.map +1 -1
- package/esm/models/executesubscriptionmodifyrequest.js +4 -0
- package/esm/models/executesubscriptionmodifyrequest.js.map +1 -1
- package/esm/models/failurepointtype.d.ts +2 -0
- package/esm/models/failurepointtype.d.ts.map +1 -1
- package/esm/models/failurepointtype.js +2 -0
- package/esm/models/failurepointtype.js.map +1 -1
- package/esm/models/getusageanalyticsrequest.d.ts +1 -0
- package/esm/models/getusageanalyticsrequest.d.ts.map +1 -1
- package/esm/models/getusageanalyticsrequest.js +1 -0
- package/esm/models/getusageanalyticsrequest.js.map +1 -1
- package/esm/models/inheritanceaction.d.ts +12 -0
- package/esm/models/inheritanceaction.d.ts.map +1 -0
- package/esm/models/inheritanceaction.js +13 -0
- package/esm/models/inheritanceaction.js.map +1 -0
- package/esm/models/lineitemcommitmentconfig.d.ts +2 -0
- package/esm/models/lineitemcommitmentconfig.d.ts.map +1 -1
- package/esm/models/lineitemcommitmentconfig.js +3 -0
- package/esm/models/lineitemcommitmentconfig.js.map +1 -1
- package/esm/models/meterusageattribution.d.ts +8 -0
- package/esm/models/meterusageattribution.d.ts.map +1 -0
- package/esm/models/meterusageattribution.js +10 -0
- package/esm/models/meterusageattribution.js.map +1 -0
- package/esm/models/pricefilter.d.ts +2 -0
- package/esm/models/pricefilter.d.ts.map +1 -1
- package/esm/models/pricefilter.js +2 -0
- package/esm/models/pricefilter.js.map +1 -1
- package/esm/models/submodifycouponaction.d.ts +12 -0
- package/esm/models/submodifycouponaction.d.ts.map +1 -0
- package/esm/models/submodifycouponaction.js +13 -0
- package/esm/models/submodifycouponaction.js.map +1 -0
- package/esm/models/submodifycouponparams.d.ts +14 -0
- package/esm/models/submodifycouponparams.d.ts.map +1 -0
- package/esm/models/submodifycouponparams.js +16 -0
- package/esm/models/submodifycouponparams.js.map +1 -0
- package/esm/models/submodifyinheritancerequest.d.ts +3 -0
- package/esm/models/submodifyinheritancerequest.d.ts.map +1 -1
- package/esm/models/submodifyinheritancerequest.js +5 -1
- package/esm/models/submodifyinheritancerequest.js.map +1 -1
- package/esm/models/submodifytaxaction.d.ts +12 -0
- package/esm/models/submodifytaxaction.d.ts.map +1 -0
- package/esm/models/submodifytaxaction.js +13 -0
- package/esm/models/submodifytaxaction.js.map +1 -0
- package/esm/models/submodifytaxparams.d.ts +10 -0
- package/esm/models/submodifytaxparams.d.ts.map +1 -0
- package/esm/models/submodifytaxparams.js +13 -0
- package/esm/models/submodifytaxparams.js.map +1 -0
- package/esm/models/subscriptioncouponinput.d.ts +9 -0
- package/esm/models/subscriptioncouponinput.d.ts.map +1 -0
- package/esm/models/subscriptioncouponinput.js +11 -0
- package/esm/models/subscriptioncouponinput.js.map +1 -0
- package/esm/models/subscriptionlineitemresponse.d.ts +2 -0
- package/esm/models/subscriptionlineitemresponse.d.ts.map +1 -1
- package/esm/models/subscriptionlineitemresponse.js +2 -0
- package/esm/models/subscriptionlineitemresponse.js.map +1 -1
- package/esm/models/subscriptionmodifytype.d.ts +4 -0
- package/esm/models/subscriptionmodifytype.d.ts.map +1 -1
- package/esm/models/subscriptionmodifytype.js +4 -0
- package/esm/models/subscriptionmodifytype.js.map +1 -1
- package/esm/models/subscriptionphasecreaterequest.d.ts +2 -0
- package/esm/models/subscriptionphasecreaterequest.d.ts.map +1 -1
- package/esm/models/subscriptionphasecreaterequest.js +5 -2
- package/esm/models/subscriptionphasecreaterequest.js.map +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.d.ts +2 -0
- package/esm/models/subscriptionsubscriptionlineitem.d.ts.map +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.js +2 -0
- package/esm/models/subscriptionsubscriptionlineitem.js.map +1 -1
- package/esm/models/timeofdaybucket.d.ts +15 -0
- package/esm/models/timeofdaybucket.d.ts.map +1 -0
- package/esm/models/timeofdaybucket.js +17 -0
- package/esm/models/timeofdaybucket.js.map +1 -0
- package/esm/models/updatesubscriptionlineitemrequest.d.ts +2 -0
- package/esm/models/updatesubscriptionlineitemrequest.d.ts.map +1 -1
- package/esm/models/updatesubscriptionlineitemrequest.js +3 -0
- package/esm/models/updatesubscriptionlineitemrequest.js.map +1 -1
- package/esm/models/usageanalyticitem.d.ts +2 -0
- package/esm/models/usageanalyticitem.d.ts.map +1 -1
- package/esm/models/usageanalyticitem.js +2 -0
- package/esm/models/usageanalyticitem.js.map +1 -1
- package/esm/models/usageanalyticpoint.d.ts +2 -0
- package/esm/models/usageanalyticpoint.d.ts.map +1 -1
- package/esm/models/usageanalyticpoint.js +2 -0
- package/esm/models/usageanalyticpoint.js.map +1 -1
- package/esm/models/userresponse.d.ts +1 -0
- package/esm/models/userresponse.d.ts.map +1 -1
- package/esm/models/userresponse.js +1 -0
- package/esm/models/userresponse.js.map +1 -1
- package/esm/models/windowsize.d.ts +2 -2
- package/esm/models/windowsize.js +2 -2
- package/esm/models/windowsize.js.map +1 -1
- package/esm/tool-names.js +2 -2
- package/esm/tool-names.js.map +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/esm/types/async.d.ts.map +1 -1
- package/esm/types/async.js +6 -6
- package/esm/types/async.js.map +1 -1
- package/manifest.json +3 -3
- package/package.json +1 -1
- package/src/funcs/subscriptionsExecuteSubscriptionModify.ts +1 -1
- package/src/funcs/subscriptionsPreviewSubscriptionModify.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +1 -1
- package/src/lib/primitives.ts +16 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/subscriptionsExecuteSubscriptionModify.ts +1 -1
- package/src/mcp-server/tools/subscriptionsPreviewSubscriptionModify.ts +1 -1
- package/src/models/attributedtocustomerresult.ts +28 -0
- package/src/models/bucket.ts +12 -0
- package/src/models/bucketsummary.ts +40 -0
- package/src/models/cancelsubscriptionrequest.ts +3 -1
- package/src/models/commitmentbucketrequest.ts +35 -0
- package/src/models/coupon.ts +2 -0
- package/src/models/createsubscriptionlineitemrequest.ts +7 -0
- package/src/models/createsubscriptionrequest.ts +14 -2
- package/src/models/debugtracker.ts +6 -0
- package/src/models/debugtrackerstatus.ts +4 -0
- package/src/models/executesubscriptionmodifyrequest.ts +12 -0
- package/src/models/failurepointtype.ts +2 -0
- package/src/models/getusageanalyticsrequest.ts +4 -0
- package/src/models/inheritanceaction.ts +17 -0
- package/src/models/lineitemcommitmentconfig.ts +9 -0
- package/src/models/meterusageattribution.ts +18 -0
- package/src/models/pricefilter.ts +3 -0
- package/src/models/submodifycouponaction.ts +17 -0
- package/src/models/submodifycouponparams.ts +46 -0
- package/src/models/submodifyinheritancerequest.ts +14 -1
- package/src/models/submodifytaxaction.ts +17 -0
- package/src/models/submodifytaxparams.ts +30 -0
- package/src/models/subscriptioncouponinput.ts +29 -0
- package/src/models/subscriptionlineitemresponse.ts +6 -0
- package/src/models/subscriptionmodifytype.ts +4 -0
- package/src/models/subscriptionphasecreaterequest.ts +11 -4
- package/src/models/subscriptionsubscriptionlineitem.ts +6 -0
- package/src/models/timeofdaybucket.ts +33 -0
- package/src/models/updatesubscriptionlineitemrequest.ts +9 -0
- package/src/models/usageanalyticitem.ts +5 -0
- package/src/models/usageanalyticpoint.ts +6 -0
- package/src/models/userresponse.ts +2 -0
- package/src/models/windowsize.ts +2 -2
- package/src/tool-names.ts +2 -2
- package/src/types/async.ts +8 -7
- package/esm/lib/dlv.d.ts +0 -14
- package/esm/lib/dlv.d.ts.map +0 -1
- package/esm/lib/dlv.js +0 -46
- package/esm/lib/dlv.js.map +0 -1
- package/esm/lib/is-plain-object.d.ts +0 -2
- package/esm/lib/is-plain-object.d.ts.map +0 -1
- package/esm/lib/is-plain-object.js +0 -38
- package/esm/lib/is-plain-object.js.map +0 -1
- package/src/lib/dlv.ts +0 -53
- package/src/lib/is-plain-object.ts +0 -43
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
SubModifyCouponAction,
|
|
8
|
+
SubModifyCouponAction$zodSchema,
|
|
9
|
+
} from "./submodifycouponaction.js";
|
|
10
|
+
|
|
11
|
+
export type SubModifyCouponParams = {
|
|
12
|
+
action: SubModifyCouponAction;
|
|
13
|
+
association_id?: string | undefined;
|
|
14
|
+
coupon_code?: string | undefined;
|
|
15
|
+
effective_date?: string | undefined;
|
|
16
|
+
end_date?: string | undefined;
|
|
17
|
+
start_date?: string | undefined;
|
|
18
|
+
subscription_id?: string | undefined;
|
|
19
|
+
subscription_line_item_id?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const SubModifyCouponParams$zodSchema: z.ZodType<SubModifyCouponParams> =
|
|
23
|
+
z.object({
|
|
24
|
+
action: SubModifyCouponAction$zodSchema,
|
|
25
|
+
association_id: z.string().optional().describe(
|
|
26
|
+
"Required when action=\"remove\". ID of the CouponAssociation to soft-delete.",
|
|
27
|
+
),
|
|
28
|
+
coupon_code: z.string().optional().describe(
|
|
29
|
+
"Required for action=\"add\". Coupon code of the coupon to attach.",
|
|
30
|
+
),
|
|
31
|
+
effective_date: z.iso.datetime({ offset: true }).optional().describe(
|
|
32
|
+
"Optional. When to apply the change; defaults to now if omitted.",
|
|
33
|
+
),
|
|
34
|
+
end_date: z.iso.datetime({ offset: true }).optional().describe(
|
|
35
|
+
"Optional. When the coupon association ends.",
|
|
36
|
+
),
|
|
37
|
+
start_date: z.iso.datetime({ offset: true }).optional().describe(
|
|
38
|
+
"Optional. When the coupon association starts; defaults to EffectiveDate.",
|
|
39
|
+
),
|
|
40
|
+
subscription_id: z.string().optional().describe(
|
|
41
|
+
"Optional. Apply at subscription level. Mutually exclusive with SubscriptionLineItemID.",
|
|
42
|
+
),
|
|
43
|
+
subscription_line_item_id: z.string().optional().describe(
|
|
44
|
+
"Optional. Apply at a specific line item. Mutually exclusive with SubscriptionID.",
|
|
45
|
+
),
|
|
46
|
+
});
|
|
@@ -3,13 +3,26 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
InheritanceAction,
|
|
8
|
+
InheritanceAction$zodSchema,
|
|
9
|
+
} from "./inheritanceaction.js";
|
|
6
10
|
|
|
7
11
|
export type SubModifyInheritanceRequest = {
|
|
12
|
+
action?: InheritanceAction | undefined;
|
|
8
13
|
external_customer_ids_to_inherit_subscription?: Array<string> | undefined;
|
|
14
|
+
external_customer_ids_to_remove?: Array<string> | undefined;
|
|
9
15
|
};
|
|
10
16
|
|
|
11
17
|
export const SubModifyInheritanceRequest$zodSchema: z.ZodType<
|
|
12
18
|
SubModifyInheritanceRequest
|
|
13
19
|
> = z.object({
|
|
14
|
-
|
|
20
|
+
action: InheritanceAction$zodSchema.optional(),
|
|
21
|
+
external_customer_ids_to_inherit_subscription: z.array(z.string()).optional()
|
|
22
|
+
.describe(
|
|
23
|
+
"ExternalCustomerIDsToInheritSubscription is used for action=\"add\".",
|
|
24
|
+
),
|
|
25
|
+
external_customer_ids_to_remove: z.array(z.string()).optional().describe(
|
|
26
|
+
"ExternalCustomerIDsToRemove is used for action=\"remove\".",
|
|
27
|
+
),
|
|
15
28
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const SubModifyTaxAction = {
|
|
9
|
+
Add: "add",
|
|
10
|
+
Remove: "remove",
|
|
11
|
+
} as const;
|
|
12
|
+
export type SubModifyTaxAction = ClosedEnum<typeof SubModifyTaxAction>;
|
|
13
|
+
|
|
14
|
+
export const SubModifyTaxAction$zodSchema = z.enum([
|
|
15
|
+
"add",
|
|
16
|
+
"remove",
|
|
17
|
+
]);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
SubModifyTaxAction,
|
|
8
|
+
SubModifyTaxAction$zodSchema,
|
|
9
|
+
} from "./submodifytaxaction.js";
|
|
10
|
+
|
|
11
|
+
export type SubModifyTaxParams = {
|
|
12
|
+
action: SubModifyTaxAction;
|
|
13
|
+
association_id?: string | undefined;
|
|
14
|
+
effective_date?: string | undefined;
|
|
15
|
+
tax_rate_id?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const SubModifyTaxParams$zodSchema: z.ZodType<SubModifyTaxParams> = z
|
|
19
|
+
.object({
|
|
20
|
+
action: SubModifyTaxAction$zodSchema,
|
|
21
|
+
association_id: z.string().optional().describe(
|
|
22
|
+
"Required when action=\"remove\". ID of the TaxAssociation to soft-delete.",
|
|
23
|
+
),
|
|
24
|
+
effective_date: z.iso.datetime({ offset: true }).optional().describe(
|
|
25
|
+
"Optional. When to apply the change; defaults to now if omitted.",
|
|
26
|
+
),
|
|
27
|
+
tax_rate_id: z.string().optional().describe(
|
|
28
|
+
"Required when action=\"add\". ID of the active tax rate to attach.",
|
|
29
|
+
),
|
|
30
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type SubscriptionCouponInput = {
|
|
8
|
+
coupon_code: string;
|
|
9
|
+
end_date?: string | undefined;
|
|
10
|
+
price_id?: string | undefined;
|
|
11
|
+
start_date?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const SubscriptionCouponInput$zodSchema: z.ZodType<
|
|
15
|
+
SubscriptionCouponInput
|
|
16
|
+
> = z.object({
|
|
17
|
+
coupon_code: z.string().describe(
|
|
18
|
+
"CouponCode is the coupon's human-readable code (case-insensitive). Required.",
|
|
19
|
+
),
|
|
20
|
+
end_date: z.iso.datetime({ offset: true }).optional().describe(
|
|
21
|
+
"EndDate is when the coupon ends; overrides duration_in_periods calculation.",
|
|
22
|
+
),
|
|
23
|
+
price_id: z.string().optional().describe(
|
|
24
|
+
"PriceID is the price ID of the line item to target; omit for subscription-level.",
|
|
25
|
+
),
|
|
26
|
+
start_date: z.iso.datetime({ offset: true }).optional().describe(
|
|
27
|
+
"StartDate is when the coupon starts; defaults to subscription/phase StartDate.",
|
|
28
|
+
),
|
|
29
|
+
});
|
|
@@ -13,6 +13,10 @@ import {
|
|
|
13
13
|
SubscriptionLineItemEntityType,
|
|
14
14
|
SubscriptionLineItemEntityType$zodSchema,
|
|
15
15
|
} from "./subscriptionlineitementitytype.js";
|
|
16
|
+
import {
|
|
17
|
+
TimeOfDayBucket,
|
|
18
|
+
TimeOfDayBucket$zodSchema,
|
|
19
|
+
} from "./timeofdaybucket.js";
|
|
16
20
|
|
|
17
21
|
export type SubscriptionLineItemResponse = {
|
|
18
22
|
addon_association_id?: string | undefined;
|
|
@@ -22,6 +26,7 @@ export type SubscriptionLineItemResponse = {
|
|
|
22
26
|
commitment_duration?: BillingPeriod | undefined;
|
|
23
27
|
commitment_overage_factor?: string | undefined;
|
|
24
28
|
commitment_quantity?: string | undefined;
|
|
29
|
+
commitment_time_buckets?: Array<TimeOfDayBucket> | undefined;
|
|
25
30
|
commitment_true_up_enabled?: boolean | undefined;
|
|
26
31
|
commitment_type?: CommitmentType | undefined;
|
|
27
32
|
commitment_windowed?: boolean | undefined;
|
|
@@ -67,6 +72,7 @@ export const SubscriptionLineItemResponse$zodSchema: z.ZodType<
|
|
|
67
72
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
68
73
|
commitment_overage_factor: z.string().optional(),
|
|
69
74
|
commitment_quantity: z.string().optional(),
|
|
75
|
+
commitment_time_buckets: z.array(TimeOfDayBucket$zodSchema).optional(),
|
|
70
76
|
commitment_true_up_enabled: z.boolean().optional(),
|
|
71
77
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
72
78
|
commitment_windowed: z.boolean().optional(),
|
|
@@ -10,6 +10,8 @@ export const SubscriptionModifyType = {
|
|
|
10
10
|
QuantityChange: "quantity_change",
|
|
11
11
|
GroupedInvoicing: "grouped_invoicing",
|
|
12
12
|
TrialEnd: "trial_end",
|
|
13
|
+
Coupon: "coupon",
|
|
14
|
+
Tax: "tax",
|
|
13
15
|
} as const;
|
|
14
16
|
export type SubscriptionModifyType = ClosedEnum<typeof SubscriptionModifyType>;
|
|
15
17
|
|
|
@@ -18,4 +20,6 @@ export const SubscriptionModifyType$zodSchema = z.enum([
|
|
|
18
20
|
"quantity_change",
|
|
19
21
|
"grouped_invoicing",
|
|
20
22
|
"trial_end",
|
|
23
|
+
"coupon",
|
|
24
|
+
"tax",
|
|
21
25
|
]);
|
|
@@ -11,6 +11,10 @@ import {
|
|
|
11
11
|
OverrideLineItemRequest,
|
|
12
12
|
OverrideLineItemRequest$zodSchema,
|
|
13
13
|
} from "./overridelineitemrequest.js";
|
|
14
|
+
import {
|
|
15
|
+
SubscriptionCouponInput,
|
|
16
|
+
SubscriptionCouponInput$zodSchema,
|
|
17
|
+
} from "./subscriptioncouponinput.js";
|
|
14
18
|
|
|
15
19
|
export type SubscriptionPhaseCreateRequest = {
|
|
16
20
|
coupons?: Array<string> | undefined;
|
|
@@ -20,19 +24,18 @@ export type SubscriptionPhaseCreateRequest = {
|
|
|
20
24
|
metadata?: { [k: string]: string } | undefined;
|
|
21
25
|
override_line_items?: Array<OverrideLineItemRequest> | undefined;
|
|
22
26
|
start_date: string;
|
|
27
|
+
subscription_coupons?: Array<SubscriptionCouponInput> | undefined;
|
|
23
28
|
};
|
|
24
29
|
|
|
25
30
|
export const SubscriptionPhaseCreateRequest$zodSchema: z.ZodType<
|
|
26
31
|
SubscriptionPhaseCreateRequest
|
|
27
32
|
> = z.object({
|
|
28
33
|
coupons: z.array(z.string()).optional().describe(
|
|
29
|
-
"
|
|
34
|
+
"Deprecated: use SubscriptionCoupons instead.",
|
|
30
35
|
),
|
|
31
36
|
end_date: z.iso.datetime({ offset: true }).optional(),
|
|
32
37
|
line_item_coupons: z.record(z.string(), z.array(z.string())).optional()
|
|
33
|
-
.describe(
|
|
34
|
-
"LineItemCoupons represents line item-level coupons (map of line_item_id to coupon IDs)",
|
|
35
|
-
),
|
|
38
|
+
.describe("Deprecated: use SubscriptionCoupons instead."),
|
|
36
39
|
line_items: z.array(CreateSubscriptionLineItemRequest$zodSchema).optional()
|
|
37
40
|
.describe(
|
|
38
41
|
"LineItems are extra line items to add during this phase, primarily one-time charges.\nEach item's start_date defaults to the phase's start_date when not provided.",
|
|
@@ -43,4 +46,8 @@ export const SubscriptionPhaseCreateRequest$zodSchema: z.ZodType<
|
|
|
43
46
|
"OverrideLineItems allows customizing specific prices for this phase\nIf not provided, phase will use the same line items as the subscription (plan prices)",
|
|
44
47
|
),
|
|
45
48
|
start_date: z.iso.datetime({ offset: true }),
|
|
49
|
+
subscription_coupons: z.array(SubscriptionCouponInput$zodSchema).optional()
|
|
50
|
+
.describe(
|
|
51
|
+
"SubscriptionCoupons is the preferred way to attach coupons to this phase.",
|
|
52
|
+
),
|
|
46
53
|
});
|
|
@@ -13,6 +13,10 @@ import {
|
|
|
13
13
|
SubscriptionLineItemEntityType,
|
|
14
14
|
SubscriptionLineItemEntityType$zodSchema,
|
|
15
15
|
} from "./subscriptionlineitementitytype.js";
|
|
16
|
+
import {
|
|
17
|
+
TimeOfDayBucket,
|
|
18
|
+
TimeOfDayBucket$zodSchema,
|
|
19
|
+
} from "./timeofdaybucket.js";
|
|
16
20
|
|
|
17
21
|
export type SubscriptionSubscriptionLineItem = {
|
|
18
22
|
addon_association_id?: string | undefined;
|
|
@@ -22,6 +26,7 @@ export type SubscriptionSubscriptionLineItem = {
|
|
|
22
26
|
commitment_duration?: BillingPeriod | undefined;
|
|
23
27
|
commitment_overage_factor?: string | undefined;
|
|
24
28
|
commitment_quantity?: string | undefined;
|
|
29
|
+
commitment_time_buckets?: Array<TimeOfDayBucket> | undefined;
|
|
25
30
|
commitment_true_up_enabled?: boolean | undefined;
|
|
26
31
|
commitment_type?: CommitmentType | undefined;
|
|
27
32
|
commitment_windowed?: boolean | undefined;
|
|
@@ -67,6 +72,7 @@ export const SubscriptionSubscriptionLineItem$zodSchema: z.ZodType<
|
|
|
67
72
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
68
73
|
commitment_overage_factor: z.string().optional(),
|
|
69
74
|
commitment_quantity: z.string().optional(),
|
|
75
|
+
commitment_time_buckets: z.array(TimeOfDayBucket$zodSchema).optional(),
|
|
70
76
|
commitment_true_up_enabled: z.boolean().optional(),
|
|
71
77
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
72
78
|
commitment_windowed: z.boolean().optional(),
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { Bucket, Bucket$zodSchema } from "./bucket.js";
|
|
7
|
+
import { CommitmentType, CommitmentType$zodSchema } from "./commitmenttype.js";
|
|
8
|
+
|
|
9
|
+
export type TimeOfDayBucket = {
|
|
10
|
+
commitment_type?: CommitmentType | undefined;
|
|
11
|
+
commitment_value?: string | undefined;
|
|
12
|
+
end?: Bucket | undefined;
|
|
13
|
+
id?: string | undefined;
|
|
14
|
+
overage_factor?: number | undefined;
|
|
15
|
+
price_id?: string | undefined;
|
|
16
|
+
start?: Bucket | undefined;
|
|
17
|
+
true_up_enabled?: boolean | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const TimeOfDayBucket$zodSchema: z.ZodType<TimeOfDayBucket> = z.object({
|
|
21
|
+
commitment_type: CommitmentType$zodSchema.optional(),
|
|
22
|
+
commitment_value: z.string().optional(),
|
|
23
|
+
end: Bucket$zodSchema.optional(),
|
|
24
|
+
id: z.string().optional().describe(
|
|
25
|
+
"ID is server-assigned. Stable for the lifetime of the line item;\ninvoice breakdown and analytics responses reference this ID.",
|
|
26
|
+
),
|
|
27
|
+
overage_factor: z.number().optional(),
|
|
28
|
+
price_id: z.string().optional().describe(
|
|
29
|
+
"PriceID is the SUBSCRIPTION-scoped price created at bucket-creation time.\nImmutable post-create; changing pricing requires a successor line item.",
|
|
30
|
+
),
|
|
31
|
+
start: Bucket$zodSchema.optional(),
|
|
32
|
+
true_up_enabled: z.boolean().optional(),
|
|
33
|
+
});
|
|
@@ -6,6 +6,10 @@ import * as z from "zod";
|
|
|
6
6
|
import { BillingModel, BillingModel$zodSchema } from "./billingmodel.js";
|
|
7
7
|
import { BillingPeriod, BillingPeriod$zodSchema } from "./billingperiod.js";
|
|
8
8
|
import { BillingTier, BillingTier$zodSchema } from "./billingtier.js";
|
|
9
|
+
import {
|
|
10
|
+
CommitmentBucketRequest,
|
|
11
|
+
CommitmentBucketRequest$zodSchema,
|
|
12
|
+
} from "./commitmentbucketrequest.js";
|
|
9
13
|
import { CommitmentType, CommitmentType$zodSchema } from "./commitmenttype.js";
|
|
10
14
|
import {
|
|
11
15
|
CreatePriceTier,
|
|
@@ -23,6 +27,7 @@ export type UpdateSubscriptionLineItemRequest = {
|
|
|
23
27
|
commitment_duration?: BillingPeriod | undefined;
|
|
24
28
|
commitment_overage_factor?: number | undefined;
|
|
25
29
|
commitment_quantity?: number | undefined;
|
|
30
|
+
commitment_time_buckets?: Array<CommitmentBucketRequest> | undefined;
|
|
26
31
|
commitment_true_up_enabled?: boolean | undefined;
|
|
27
32
|
commitment_type?: CommitmentType | undefined;
|
|
28
33
|
commitment_windowed?: boolean | undefined;
|
|
@@ -44,6 +49,10 @@ export const UpdateSubscriptionLineItemRequest$zodSchema: z.ZodType<
|
|
|
44
49
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
45
50
|
commitment_overage_factor: z.number().optional(),
|
|
46
51
|
commitment_quantity: z.number().optional(),
|
|
52
|
+
commitment_time_buckets: z.array(CommitmentBucketRequest$zodSchema).optional()
|
|
53
|
+
.describe(
|
|
54
|
+
"Pointer so an explicit empty array can clear existing buckets (omission keeps them).",
|
|
55
|
+
),
|
|
47
56
|
commitment_true_up_enabled: z.boolean().optional(),
|
|
48
57
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
49
58
|
commitment_windowed: z.boolean().optional(),
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
AggregationType,
|
|
9
9
|
AggregationType$zodSchema,
|
|
10
10
|
} from "./aggregationtype.js";
|
|
11
|
+
import { BucketSummary, BucketSummary$zodSchema } from "./bucketsummary.js";
|
|
11
12
|
import { CommitmentInfo, CommitmentInfo$zodSchema } from "./commitmentinfo.js";
|
|
12
13
|
import { Feature, Feature$zodSchema } from "./feature.js";
|
|
13
14
|
import { GroupGroup, GroupGroup$zodSchema } from "./groupgroup.js";
|
|
@@ -29,6 +30,7 @@ export type UsageAnalyticItem = {
|
|
|
29
30
|
add_on_id?: string | undefined;
|
|
30
31
|
addon?: Addon | undefined;
|
|
31
32
|
aggregation_type?: AggregationType | undefined;
|
|
33
|
+
bucket_summaries?: Array<BucketSummary> | undefined;
|
|
32
34
|
commitment_info?: CommitmentInfo | undefined;
|
|
33
35
|
currency?: string | undefined;
|
|
34
36
|
event_count?: number | undefined;
|
|
@@ -64,6 +66,9 @@ export const UsageAnalyticItem$zodSchema: z.ZodType<UsageAnalyticItem> = z
|
|
|
64
66
|
add_on_id: z.string().optional(),
|
|
65
67
|
addon: Addon$zodSchema.optional(),
|
|
66
68
|
aggregation_type: AggregationType$zodSchema.optional(),
|
|
69
|
+
bucket_summaries: z.array(BucketSummary$zodSchema).optional().describe(
|
|
70
|
+
"BucketSummaries is populated only when BreakdownBucket=true. Contains one\nentry per defined CommitmentTimeBucket plus one for out-of-bucket usage.",
|
|
71
|
+
),
|
|
67
72
|
commitment_info: CommitmentInfo$zodSchema.optional(),
|
|
68
73
|
currency: z.string().optional(),
|
|
69
74
|
event_count: z.int().optional().describe(
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
|
|
7
7
|
export type UsageAnalyticPoint = {
|
|
8
|
+
bucket_id?: string | undefined;
|
|
9
|
+
bucket_price_id?: string | undefined;
|
|
8
10
|
computed_commitment_utilized_amount?: string | undefined;
|
|
9
11
|
computed_overage_amount?: string | undefined;
|
|
10
12
|
computed_true_up_amount?: string | undefined;
|
|
@@ -16,6 +18,10 @@ export type UsageAnalyticPoint = {
|
|
|
16
18
|
|
|
17
19
|
export const UsageAnalyticPoint$zodSchema: z.ZodType<UsageAnalyticPoint> = z
|
|
18
20
|
.object({
|
|
21
|
+
bucket_id: z.string().optional().describe(
|
|
22
|
+
"Bucket identity (only populated when BreakdownBucket=true and the line item\nhas CommitmentTimeBuckets). Empty strings indicate out-of-bucket windows.",
|
|
23
|
+
),
|
|
24
|
+
bucket_price_id: z.string().optional(),
|
|
19
25
|
computed_commitment_utilized_amount: z.string().optional().describe(
|
|
20
26
|
"Commitment breakdown (only populated for windowed commitments)",
|
|
21
27
|
),
|
|
@@ -10,6 +10,7 @@ export type UserResponse = {
|
|
|
10
10
|
email?: string | undefined;
|
|
11
11
|
id?: string | undefined;
|
|
12
12
|
metadata?: { [k: string]: string } | undefined;
|
|
13
|
+
name?: string | undefined;
|
|
13
14
|
roles?: Array<string> | undefined;
|
|
14
15
|
tenant?: TenantResponse | undefined;
|
|
15
16
|
type?: UserType | undefined;
|
|
@@ -19,6 +20,7 @@ export const UserResponse$zodSchema: z.ZodType<UserResponse> = z.object({
|
|
|
19
20
|
email: z.string().optional().describe("Empty for service accounts"),
|
|
20
21
|
id: z.string().optional(),
|
|
21
22
|
metadata: z.record(z.string(), z.string()).optional(),
|
|
23
|
+
name: z.string().optional(),
|
|
22
24
|
roles: z.array(z.string()).optional(),
|
|
23
25
|
tenant: TenantResponse$zodSchema.optional(),
|
|
24
26
|
type: UserType$zodSchema.optional(),
|
package/src/models/windowsize.ts
CHANGED
|
@@ -6,7 +6,6 @@ import * as z from "zod";
|
|
|
6
6
|
import { ClosedEnum } from "../types/enums.js";
|
|
7
7
|
|
|
8
8
|
export const WindowSize = {
|
|
9
|
-
Month: "MONTH",
|
|
10
9
|
Minute: "MINUTE",
|
|
11
10
|
FifteenMIN: "15MIN",
|
|
12
11
|
ThirtyMIN: "30MIN",
|
|
@@ -16,11 +15,11 @@ export const WindowSize = {
|
|
|
16
15
|
TwelveHOUR: "12HOUR",
|
|
17
16
|
Day: "DAY",
|
|
18
17
|
Week: "WEEK",
|
|
18
|
+
Month: "MONTH",
|
|
19
19
|
} as const;
|
|
20
20
|
export type WindowSize = ClosedEnum<typeof WindowSize>;
|
|
21
21
|
|
|
22
22
|
export const WindowSize$zodSchema = z.enum([
|
|
23
|
-
"MONTH",
|
|
24
23
|
"MINUTE",
|
|
25
24
|
"15MIN",
|
|
26
25
|
"30MIN",
|
|
@@ -30,4 +29,5 @@ export const WindowSize$zodSchema = z.enum([
|
|
|
30
29
|
"12HOUR",
|
|
31
30
|
"DAY",
|
|
32
31
|
"WEEK",
|
|
32
|
+
"MONTH",
|
|
33
33
|
]);
|
package/src/tool-names.ts
CHANGED
|
@@ -254,11 +254,11 @@ export const toolNames: Array<{ name: string; description: string }>= [
|
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
"name": "execute-subscription-modify",
|
|
257
|
-
"description": "Execute subscription modification\n\nExecute a mid-cycle subscription modification (inheritance
|
|
257
|
+
"description": "Execute subscription modification\n\nExecute a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax)."
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
"name": "preview-subscription-modify",
|
|
261
|
-
"description": "Preview subscription modification\n\nPreview the impact of a mid-cycle subscription modification without committing changes."
|
|
261
|
+
"description": "Preview subscription modification\n\nPreview the impact of a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax) without committing changes."
|
|
262
262
|
},
|
|
263
263
|
{
|
|
264
264
|
"name": "get-subscription-v2",
|
package/src/types/async.ts
CHANGED
|
@@ -21,16 +21,17 @@ export type APICall =
|
|
|
21
21
|
|
|
22
22
|
export class APIPromise<T> implements Promise<T> {
|
|
23
23
|
readonly #promise: Promise<[T, APICall]>;
|
|
24
|
-
|
|
24
|
+
#unwrapped: Promise<T> | null;
|
|
25
25
|
|
|
26
26
|
readonly [Symbol.toStringTag] = "APIPromise";
|
|
27
27
|
|
|
28
28
|
constructor(p: [T, APICall] | Promise<[T, APICall]>) {
|
|
29
29
|
this.#promise = p instanceof Promise ? p : Promise.resolve(p);
|
|
30
|
-
this.#unwrapped =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
this.#unwrapped = p instanceof Promise ? null : Promise.resolve(p[0]);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#getUnwrapped(): Promise<T> {
|
|
34
|
+
return (this.#unwrapped ??= this.#promise.then(([value]) => value));
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
then<TResult1 = T, TResult2 = never>(
|
|
@@ -55,11 +56,11 @@ export class APIPromise<T> implements Promise<T> {
|
|
|
55
56
|
| null
|
|
56
57
|
| undefined,
|
|
57
58
|
): Promise<T | TResult> {
|
|
58
|
-
return this.#
|
|
59
|
+
return this.#getUnwrapped().catch(onrejected);
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
finally(onfinally?: (() => void) | null | undefined): Promise<T> {
|
|
62
|
-
return this.#
|
|
63
|
+
return this.#getUnwrapped().finally(onfinally);
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
$inspect(): Promise<[T, APICall]> {
|
package/esm/lib/dlv.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param obj The object to walk
|
|
3
|
-
* @param key The key path to walk the object with
|
|
4
|
-
* @param def A default value to return if the result is undefined
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* dlv(obj, "a.b.c.d")
|
|
8
|
-
* @example
|
|
9
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
10
|
-
* @example
|
|
11
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
12
|
-
*/
|
|
13
|
-
export declare function dlv<T = any>(obj: any, key: string | string[], def?: T, p?: number, undef?: never): T | undefined;
|
|
14
|
-
//# sourceMappingURL=dlv.d.ts.map
|
package/esm/lib/dlv.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dlv.d.ts","sourceRoot":"","sources":["../../src/lib/dlv.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;;;GAWG;AACH,wBAAgB,GAAG,CAAC,CAAC,GAAG,GAAG,EACzB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EACtB,GAAG,CAAC,EAAE,CAAC,EACP,CAAC,CAAC,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,KAAK,GACZ,CAAC,GAAG,SAAS,CAOf"}
|
package/esm/lib/dlv.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
/*
|
|
5
|
-
MIT License
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2024 Jason Miller <jason@developit.ca> (http://jasonformat.com)
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
10
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
11
|
-
the Software without restriction, including without limitation the rights to
|
|
12
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
13
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
14
|
-
subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in all
|
|
17
|
-
copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
21
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
22
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
23
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
24
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* @param obj The object to walk
|
|
28
|
-
* @param key The key path to walk the object with
|
|
29
|
-
* @param def A default value to return if the result is undefined
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* dlv(obj, "a.b.c.d")
|
|
33
|
-
* @example
|
|
34
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
35
|
-
* @example
|
|
36
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
37
|
-
*/
|
|
38
|
-
export function dlv(obj, key, def, p, undef) {
|
|
39
|
-
key = Array.isArray(key) ? key : key.split(".");
|
|
40
|
-
for (p = 0; p < key.length; p++) {
|
|
41
|
-
const k = key[p];
|
|
42
|
-
obj = k != null && obj ? obj[k] : undef;
|
|
43
|
-
}
|
|
44
|
-
return obj === undef ? def : obj;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=dlv.js.map
|
package/esm/lib/dlv.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dlv.js","sourceRoot":"","sources":["../../src/lib/dlv.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;EAqBE;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,GAAG,CACjB,GAAQ,EACR,GAAsB,EACtB,GAAO,EACP,CAAU,EACV,KAAa;IAEb,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChD,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACjB,GAAG,GAAG,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1C,CAAC;IACD,OAAO,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AACnC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.d.ts","sourceRoot":"","sources":["../../src/lib/is-plain-object.ts"],"names":[],"mappings":"AA6BA,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAa7D"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
/*
|
|
5
|
-
MIT License
|
|
6
|
-
|
|
7
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
10
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
11
|
-
the Software without restriction, including without limitation the rights to
|
|
12
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
13
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
14
|
-
subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in all
|
|
17
|
-
copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
21
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
22
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
23
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
24
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
|
-
*/
|
|
26
|
-
// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js
|
|
27
|
-
export function isPlainObject(value) {
|
|
28
|
-
if (typeof value !== "object" || value === null) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
const prototype = Object.getPrototypeOf(value);
|
|
32
|
-
return ((prototype === null ||
|
|
33
|
-
prototype === Object.prototype ||
|
|
34
|
-
Object.getPrototypeOf(prototype) === null) &&
|
|
35
|
-
!(Symbol.toStringTag in value) &&
|
|
36
|
-
!(Symbol.iterator in value));
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=is-plain-object.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-plain-object.js","sourceRoot":"","sources":["../../src/lib/is-plain-object.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;EAqBE;AAEF,iHAAiH;AAEjH,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/C,OAAO,CACL,CAAC,SAAS,KAAK,IAAI;QACjB,SAAS,KAAK,MAAM,CAAC,SAAS;QAC9B,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;QAC5C,CAAC,CAAC,MAAM,CAAC,WAAW,IAAI,KAAK,CAAC;QAC9B,CAAC,CAAC,MAAM,CAAC,QAAQ,IAAI,KAAK,CAAC,CAC5B,CAAC;AACJ,CAAC"}
|
package/src/lib/dlv.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
MIT License
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2024 Jason Miller <jason@developit.ca> (http://jasonformat.com)
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
11
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
12
|
-
the Software without restriction, including without limitation the rights to
|
|
13
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
14
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
15
|
-
subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
22
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
23
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
24
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
25
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @param obj The object to walk
|
|
30
|
-
* @param key The key path to walk the object with
|
|
31
|
-
* @param def A default value to return if the result is undefined
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* dlv(obj, "a.b.c.d")
|
|
35
|
-
* @example
|
|
36
|
-
* dlv(object, ["a", "b", "c", "d"])
|
|
37
|
-
* @example
|
|
38
|
-
* dlv(object, "foo.bar.baz", "Hello, default value!")
|
|
39
|
-
*/
|
|
40
|
-
export function dlv<T = any>(
|
|
41
|
-
obj: any,
|
|
42
|
-
key: string | string[],
|
|
43
|
-
def?: T,
|
|
44
|
-
p?: number,
|
|
45
|
-
undef?: never,
|
|
46
|
-
): T | undefined {
|
|
47
|
-
key = Array.isArray(key) ? key : key.split(".");
|
|
48
|
-
for (p = 0; p < key.length; p++) {
|
|
49
|
-
const k = key[p];
|
|
50
|
-
obj = k != null && obj ? obj[k] : undef;
|
|
51
|
-
}
|
|
52
|
-
return obj === undef ? def : obj;
|
|
53
|
-
}
|