@paygentic/sdk 0.10.3 → 0.10.5
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 +19 -62
- package/dist/commonjs/funcs/meGetMe.d.ts +18 -0
- package/dist/commonjs/funcs/meGetMe.d.ts.map +1 -0
- package/dist/commonjs/funcs/meGetMe.js +108 -0
- package/dist/commonjs/funcs/meGetMe.js.map +1 -0
- package/dist/commonjs/funcs/pricesUpdate.d.ts +3 -0
- package/dist/commonjs/funcs/pricesUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/pricesUpdate.js +3 -0
- package/dist/commonjs/funcs/pricesUpdate.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/changereason.d.ts +3 -2
- package/dist/commonjs/models/changereason.d.ts.map +1 -1
- package/dist/commonjs/models/changereason.js +2 -1
- package/dist/commonjs/models/changereason.js.map +1 -1
- package/dist/commonjs/models/editsubscriptionintervalsrequestunion.d.ts +3 -3
- package/dist/commonjs/models/errors/error.d.ts +6 -0
- package/dist/commonjs/models/errors/error.d.ts.map +1 -1
- package/dist/commonjs/models/errors/error.js +3 -0
- package/dist/commonjs/models/errors/error.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +3 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +3 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/me.d.ts +34 -0
- package/dist/commonjs/models/me.d.ts.map +1 -0
- package/dist/commonjs/models/me.js +63 -0
- package/dist/commonjs/models/me.js.map +1 -0
- package/dist/commonjs/models/mecredential.d.ts +31 -0
- package/dist/commonjs/models/mecredential.d.ts.map +1 -0
- package/dist/commonjs/models/mecredential.js +60 -0
- package/dist/commonjs/models/mecredential.js.map +1 -0
- package/dist/commonjs/models/operations/createsubscription.d.ts +1 -1
- package/dist/commonjs/models/operations/terminatesubscription.d.ts +1 -1
- package/dist/commonjs/models/operations/updateprice.d.ts +0 -24
- package/dist/commonjs/models/operations/updateprice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateprice.js +1 -12
- package/dist/commonjs/models/operations/updateprice.js.map +1 -1
- package/dist/commonjs/models/outstandingblock.d.ts +5 -1
- package/dist/commonjs/models/outstandingblock.d.ts.map +1 -1
- package/dist/commonjs/models/outstandingblock.js +1 -0
- package/dist/commonjs/models/outstandingblock.js.map +1 -1
- package/dist/commonjs/models/permission.d.ts +117 -0
- package/dist/commonjs/models/permission.d.ts.map +1 -0
- package/dist/commonjs/models/permission.js +152 -0
- package/dist/commonjs/models/permission.js.map +1 -0
- package/dist/commonjs/models/revenueaccountrow.d.ts +1 -1
- package/dist/commonjs/models/revenueaccounttotal.d.ts +1 -1
- package/dist/commonjs/models/subscription.d.ts +1 -0
- package/dist/commonjs/models/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/subscription.js +1 -0
- package/dist/commonjs/models/subscription.js.map +1 -1
- package/dist/commonjs/models/subscriptionintervalchange.d.ts +1 -1
- package/dist/commonjs/sdk/me.d.ts +12 -0
- package/dist/commonjs/sdk/me.d.ts.map +1 -0
- package/dist/commonjs/sdk/me.js +22 -0
- package/dist/commonjs/sdk/me.js.map +1 -0
- package/dist/commonjs/sdk/prices.d.ts +3 -0
- package/dist/commonjs/sdk/prices.d.ts.map +1 -1
- package/dist/commonjs/sdk/prices.js +3 -0
- package/dist/commonjs/sdk/prices.js.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/meGetMe.d.ts +18 -0
- package/dist/esm/funcs/meGetMe.d.ts.map +1 -0
- package/dist/esm/funcs/meGetMe.js +72 -0
- package/dist/esm/funcs/meGetMe.js.map +1 -0
- package/dist/esm/funcs/pricesUpdate.d.ts +3 -0
- package/dist/esm/funcs/pricesUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/pricesUpdate.js +3 -0
- package/dist/esm/funcs/pricesUpdate.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/changereason.d.ts +3 -2
- package/dist/esm/models/changereason.d.ts.map +1 -1
- package/dist/esm/models/changereason.js +2 -1
- package/dist/esm/models/changereason.js.map +1 -1
- package/dist/esm/models/editsubscriptionintervalsrequestunion.d.ts +3 -3
- package/dist/esm/models/errors/error.d.ts +6 -0
- package/dist/esm/models/errors/error.d.ts.map +1 -1
- package/dist/esm/models/errors/error.js +3 -0
- package/dist/esm/models/errors/error.js.map +1 -1
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +3 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/me.d.ts +34 -0
- package/dist/esm/models/me.d.ts.map +1 -0
- package/dist/esm/models/me.js +26 -0
- package/dist/esm/models/me.js.map +1 -0
- package/dist/esm/models/mecredential.d.ts +31 -0
- package/dist/esm/models/mecredential.d.ts.map +1 -0
- package/dist/esm/models/mecredential.js +23 -0
- package/dist/esm/models/mecredential.js.map +1 -0
- package/dist/esm/models/operations/createsubscription.d.ts +1 -1
- package/dist/esm/models/operations/terminatesubscription.d.ts +1 -1
- package/dist/esm/models/operations/updateprice.d.ts +0 -24
- package/dist/esm/models/operations/updateprice.d.ts.map +1 -1
- package/dist/esm/models/operations/updateprice.js +0 -11
- package/dist/esm/models/operations/updateprice.js.map +1 -1
- package/dist/esm/models/outstandingblock.d.ts +5 -1
- package/dist/esm/models/outstandingblock.d.ts.map +1 -1
- package/dist/esm/models/outstandingblock.js +1 -0
- package/dist/esm/models/outstandingblock.js.map +1 -1
- package/dist/esm/models/permission.d.ts +117 -0
- package/dist/esm/models/permission.d.ts.map +1 -0
- package/dist/esm/models/permission.js +116 -0
- package/dist/esm/models/permission.js.map +1 -0
- package/dist/esm/models/revenueaccountrow.d.ts +1 -1
- package/dist/esm/models/revenueaccounttotal.d.ts +1 -1
- package/dist/esm/models/subscription.d.ts +1 -0
- package/dist/esm/models/subscription.d.ts.map +1 -1
- package/dist/esm/models/subscription.js +1 -0
- package/dist/esm/models/subscription.js.map +1 -1
- package/dist/esm/models/subscriptionintervalchange.d.ts +1 -1
- package/dist/esm/sdk/me.d.ts +12 -0
- package/dist/esm/sdk/me.d.ts.map +1 -0
- package/dist/esm/sdk/me.js +18 -0
- package/dist/esm/sdk/me.js.map +1 -0
- package/dist/esm/sdk/prices.d.ts +3 -0
- package/dist/esm/sdk/prices.d.ts.map +1 -1
- package/dist/esm/sdk/prices.js +3 -0
- package/dist/esm/sdk/prices.js.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/meGetMe.ts +151 -0
- package/src/funcs/pricesUpdate.ts +3 -0
- package/src/lib/config.ts +2 -2
- package/src/models/changereason.ts +3 -2
- package/src/models/editsubscriptionintervalsrequestunion.ts +3 -3
- package/src/models/errors/error.ts +6 -0
- package/src/models/index.ts +3 -0
- package/src/models/me.ts +60 -0
- package/src/models/mecredential.ts +58 -0
- package/src/models/operations/createsubscription.ts +1 -1
- package/src/models/operations/terminatesubscription.ts +1 -1
- package/src/models/operations/updateprice.ts +0 -30
- package/src/models/outstandingblock.ts +6 -1
- package/src/models/permission.ts +123 -0
- package/src/models/revenueaccountrow.ts +1 -1
- package/src/models/revenueaccounttotal.ts +1 -1
- package/src/models/subscription.ts +1 -0
- package/src/models/subscriptionintervalchange.ts +1 -1
- package/src/sdk/me.ts +25 -0
- package/src/sdk/prices.ts +3 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export const MeCredentialType = {
|
|
12
|
+
Session: "session",
|
|
13
|
+
ApiKey: "apiKey",
|
|
14
|
+
Oauth: "oauth",
|
|
15
|
+
System: "system",
|
|
16
|
+
} as const;
|
|
17
|
+
export type MeCredentialType = ClosedEnum<typeof MeCredentialType>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The credential of the call. clientId is set for an OAuth token and apiKeyId for an API key.
|
|
21
|
+
*/
|
|
22
|
+
export type MeCredential = {
|
|
23
|
+
type: MeCredentialType;
|
|
24
|
+
/**
|
|
25
|
+
* The OAuth client of the token.
|
|
26
|
+
*/
|
|
27
|
+
clientId?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The API key of the call.
|
|
30
|
+
*/
|
|
31
|
+
apiKeyId?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const MeCredentialType$inboundSchema: z.ZodNativeEnum<
|
|
36
|
+
typeof MeCredentialType
|
|
37
|
+
> = z.nativeEnum(MeCredentialType);
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const MeCredential$inboundSchema: z.ZodType<
|
|
41
|
+
MeCredential,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.object({
|
|
45
|
+
type: MeCredentialType$inboundSchema,
|
|
46
|
+
clientId: z.string().optional(),
|
|
47
|
+
apiKeyId: z.string().optional(),
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export function meCredentialFromJSON(
|
|
51
|
+
jsonString: string,
|
|
52
|
+
): SafeParseResult<MeCredential, SDKValidationError> {
|
|
53
|
+
return safeParse(
|
|
54
|
+
jsonString,
|
|
55
|
+
(x) => MeCredential$inboundSchema.parse(JSON.parse(x)),
|
|
56
|
+
`Failed to parse 'MeCredential' from JSON`,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -130,7 +130,7 @@ export type CreateSubscriptionRequest = {
|
|
|
130
130
|
*/
|
|
131
131
|
metadata?: { [k: string]: models.SubscriptionMetadata } | undefined;
|
|
132
132
|
/**
|
|
133
|
-
* Why a change was made. `correction`
|
|
133
|
+
* Why a change was made. `correction` repairs data that was entered wrong; `migration` moves a contract from another system; `commercial` is a real change to the deal; `contractual` applies a step the original contract scheduled, such as an annual uplift. Defaults to `unspecified`.
|
|
134
134
|
*/
|
|
135
135
|
changeReason?: models.ChangeReason | undefined;
|
|
136
136
|
/**
|
|
@@ -12,7 +12,7 @@ export type TerminateSubscriptionRequestBody = {
|
|
|
12
12
|
*/
|
|
13
13
|
reason: string;
|
|
14
14
|
/**
|
|
15
|
-
* Why a change was made. `correction`
|
|
15
|
+
* Why a change was made. `correction` repairs data that was entered wrong; `migration` moves a contract from another system; `commercial` is a real change to the deal; `contractual` applies a step the original contract scheduled, such as an annual uplift. Defaults to `unspecified`.
|
|
16
16
|
*/
|
|
17
17
|
changeReason?: models.ChangeReason | undefined;
|
|
18
18
|
};
|
|
@@ -5,23 +5,10 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
10
|
import * as models from "../index.js";
|
|
12
11
|
|
|
13
|
-
/**
|
|
14
|
-
* Billing timing preference: 'in_advance' (prepaid — charged upfront or drawn from a prepaid commitment) or 'in_arrears' (charged at period end).
|
|
15
|
-
*/
|
|
16
|
-
export const UpdatePricePaymentTerm = {
|
|
17
|
-
InArrears: "in_arrears",
|
|
18
|
-
InAdvance: "in_advance",
|
|
19
|
-
} as const;
|
|
20
|
-
/**
|
|
21
|
-
* Billing timing preference: 'in_advance' (prepaid — charged upfront or drawn from a prepaid commitment) or 'in_arrears' (charged at period end).
|
|
22
|
-
*/
|
|
23
|
-
export type UpdatePricePaymentTerm = ClosedEnum<typeof UpdatePricePaymentTerm>;
|
|
24
|
-
|
|
25
12
|
export type UpdatePriceRequestBody = {
|
|
26
13
|
/**
|
|
27
14
|
* Unique identifier for a billable metric
|
|
@@ -44,14 +31,6 @@ export type UpdatePriceRequestBody = {
|
|
|
44
31
|
*/
|
|
45
32
|
model?: models.PriceModelInput | undefined;
|
|
46
33
|
properties?: models.PriceProperties | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* Billing timing preference: 'in_advance' (prepaid — charged upfront or drawn from a prepaid commitment) or 'in_arrears' (charged at period end).
|
|
49
|
-
*/
|
|
50
|
-
paymentTerm?: UpdatePricePaymentTerm | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* ISO 8601 duration for recurring fees (e.g., 'P1M' for monthly, 'P1Y' for yearly, or 'P0D' for one-time)
|
|
53
|
-
*/
|
|
54
|
-
billingCadence?: string | null | undefined;
|
|
55
34
|
/**
|
|
56
35
|
* Feature to associate. Set to null to remove existing feature. Omit to leave unchanged.
|
|
57
36
|
*/
|
|
@@ -92,11 +71,6 @@ export type UpdatePriceDetails = {
|
|
|
92
71
|
subscriptionCount?: number | undefined;
|
|
93
72
|
};
|
|
94
73
|
|
|
95
|
-
/** @internal */
|
|
96
|
-
export const UpdatePricePaymentTerm$outboundSchema: z.ZodNativeEnum<
|
|
97
|
-
typeof UpdatePricePaymentTerm
|
|
98
|
-
> = z.nativeEnum(UpdatePricePaymentTerm);
|
|
99
|
-
|
|
100
74
|
/** @internal */
|
|
101
75
|
export type UpdatePriceRequestBody$Outbound = {
|
|
102
76
|
billableMetricId?: string | undefined;
|
|
@@ -105,8 +79,6 @@ export type UpdatePriceRequestBody$Outbound = {
|
|
|
105
79
|
invoiceDisplayGroup?: string | null | undefined;
|
|
106
80
|
model?: string | undefined;
|
|
107
81
|
properties?: models.PriceProperties$Outbound | undefined;
|
|
108
|
-
paymentTerm?: string | undefined;
|
|
109
|
-
billingCadence?: string | null | undefined;
|
|
110
82
|
feature?: models.PriceFeatureInput$Outbound | null | undefined;
|
|
111
83
|
grantDiscountEnabled?: boolean | undefined;
|
|
112
84
|
isObligation?: boolean | undefined;
|
|
@@ -127,8 +99,6 @@ export const UpdatePriceRequestBody$outboundSchema: z.ZodType<
|
|
|
127
99
|
invoiceDisplayGroup: z.nullable(z.string()).optional(),
|
|
128
100
|
model: models.PriceModelInput$outboundSchema.optional(),
|
|
129
101
|
properties: models.PriceProperties$outboundSchema.optional(),
|
|
130
|
-
paymentTerm: UpdatePricePaymentTerm$outboundSchema.optional(),
|
|
131
|
-
billingCadence: z.nullable(z.string()).optional(),
|
|
132
102
|
feature: z.nullable(models.PriceFeatureInput$outboundSchema).optional(),
|
|
133
103
|
grantDiscountEnabled: z.boolean().optional(),
|
|
134
104
|
isObligation: z.boolean().optional(),
|
|
@@ -9,7 +9,7 @@ import { AccountFigure, AccountFigure$inboundSchema } from "./accountfigure.js";
|
|
|
9
9
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount.
|
|
12
|
+
* What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount. `overdue` is a part of `awaitingPayment`.
|
|
13
13
|
*/
|
|
14
14
|
export type OutstandingBlock = {
|
|
15
15
|
/**
|
|
@@ -28,6 +28,10 @@ export type OutstandingBlock = {
|
|
|
28
28
|
* The part with status `PAYMENT_FAILED`: collection has ended
|
|
29
29
|
*/
|
|
30
30
|
paymentFailed: AccountFigure;
|
|
31
|
+
/**
|
|
32
|
+
* The invoices of `awaitingPayment` past their due date: status `ISSUED`, no card retry scheduled, and a due date before the start of today, UTC. Today is the subscription's test clock when test clocks are enabled. A subset of `awaitingPayment` by count. A credit invoice is never overdue, so the amount can exceed `awaitingPayment.amount`.
|
|
33
|
+
*/
|
|
34
|
+
overdue: AccountFigure;
|
|
31
35
|
};
|
|
32
36
|
|
|
33
37
|
/** @internal */
|
|
@@ -40,6 +44,7 @@ export const OutstandingBlock$inboundSchema: z.ZodType<
|
|
|
40
44
|
amount: z.string(),
|
|
41
45
|
awaitingPayment: AccountFigure$inboundSchema,
|
|
42
46
|
paymentFailed: AccountFigure$inboundSchema,
|
|
47
|
+
overdue: AccountFigure$inboundSchema,
|
|
43
48
|
});
|
|
44
49
|
|
|
45
50
|
export function outstandingBlockFromJSON(
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A permission of the catalog: a resource read or write, or a sensitive action.
|
|
10
|
+
*/
|
|
11
|
+
export const Permission = {
|
|
12
|
+
OrganizationRead: "organization:read",
|
|
13
|
+
MembersRead: "members:read",
|
|
14
|
+
ProfileRead: "profile:read",
|
|
15
|
+
ApiKeysRead: "apiKeys:read",
|
|
16
|
+
MerchantsRead: "merchants:read",
|
|
17
|
+
ConsumersRead: "consumers:read",
|
|
18
|
+
CustomersRead: "customers:read",
|
|
19
|
+
PlansRead: "plans:read",
|
|
20
|
+
PricesRead: "prices:read",
|
|
21
|
+
ProductsRead: "products:read",
|
|
22
|
+
FeaturesRead: "features:read",
|
|
23
|
+
FeesRead: "fees:read",
|
|
24
|
+
BillableMetricsRead: "billableMetrics:read",
|
|
25
|
+
ItemsRead: "items:read",
|
|
26
|
+
PricingUnitsRead: "pricingUnits:read",
|
|
27
|
+
SubscriptionsRead: "subscriptions:read",
|
|
28
|
+
SubscriptionAdjustmentsRead: "subscriptionAdjustments:read",
|
|
29
|
+
DiscountsRead: "discounts:read",
|
|
30
|
+
GrantsRead: "grants:read",
|
|
31
|
+
EntitlementsRead: "entitlements:read",
|
|
32
|
+
CreditPoolsRead: "creditPools:read",
|
|
33
|
+
OrdersRead: "orders:read",
|
|
34
|
+
BillingSchedulesRead: "billingSchedules:read",
|
|
35
|
+
InvoicesRead: "invoices:read",
|
|
36
|
+
PaymentsRead: "payments:read",
|
|
37
|
+
PaymentSessionsRead: "paymentSessions:read",
|
|
38
|
+
PortalSessionsRead: "portalSessions:read",
|
|
39
|
+
PlatformUsersRead: "platformUsers:read",
|
|
40
|
+
PlatformAdminRead: "platformAdmin:read",
|
|
41
|
+
LoginLockoutRead: "loginLockout:read",
|
|
42
|
+
PlatformSystemRead: "platformSystem:read",
|
|
43
|
+
OrganizationCreationRead: "organizationCreation:read",
|
|
44
|
+
ComplianceRead: "compliance:read",
|
|
45
|
+
TaxSettingsRead: "taxSettings:read",
|
|
46
|
+
CostsRead: "costs:read",
|
|
47
|
+
PaymentAccountsRead: "paymentAccounts:read",
|
|
48
|
+
PayoutsRead: "payouts:read",
|
|
49
|
+
ExternalAccountsRead: "externalAccounts:read",
|
|
50
|
+
ExternalReferencesRead: "externalReferences:read",
|
|
51
|
+
MerchantIntegrationsRead: "merchantIntegrations:read",
|
|
52
|
+
WebhooksRead: "webhooks:read",
|
|
53
|
+
TestClocksRead: "testClocks:read",
|
|
54
|
+
ApprovalsRead: "approvals:read",
|
|
55
|
+
SourcesRead: "sources:read",
|
|
56
|
+
RevenueRead: "revenue:read",
|
|
57
|
+
OrganizationWrite: "organization:write",
|
|
58
|
+
MembersWrite: "members:write",
|
|
59
|
+
ProfileWrite: "profile:write",
|
|
60
|
+
ApiKeysWrite: "apiKeys:write",
|
|
61
|
+
MerchantsWrite: "merchants:write",
|
|
62
|
+
ConsumersWrite: "consumers:write",
|
|
63
|
+
CustomersWrite: "customers:write",
|
|
64
|
+
PlansWrite: "plans:write",
|
|
65
|
+
PricesWrite: "prices:write",
|
|
66
|
+
ProductsWrite: "products:write",
|
|
67
|
+
FeaturesWrite: "features:write",
|
|
68
|
+
FeesWrite: "fees:write",
|
|
69
|
+
BillableMetricsWrite: "billableMetrics:write",
|
|
70
|
+
ItemsWrite: "items:write",
|
|
71
|
+
PricingUnitsWrite: "pricingUnits:write",
|
|
72
|
+
SubscriptionsWrite: "subscriptions:write",
|
|
73
|
+
SubscriptionAdjustmentsWrite: "subscriptionAdjustments:write",
|
|
74
|
+
DiscountsWrite: "discounts:write",
|
|
75
|
+
GrantsWrite: "grants:write",
|
|
76
|
+
EntitlementsWrite: "entitlements:write",
|
|
77
|
+
CreditPoolsWrite: "creditPools:write",
|
|
78
|
+
OrdersWrite: "orders:write",
|
|
79
|
+
BillingSchedulesWrite: "billingSchedules:write",
|
|
80
|
+
InvoicesWrite: "invoices:write",
|
|
81
|
+
PaymentsWrite: "payments:write",
|
|
82
|
+
PaymentSessionsWrite: "paymentSessions:write",
|
|
83
|
+
PortalSessionsWrite: "portalSessions:write",
|
|
84
|
+
PlatformUsersWrite: "platformUsers:write",
|
|
85
|
+
PlatformAdminWrite: "platformAdmin:write",
|
|
86
|
+
LoginLockoutWrite: "loginLockout:write",
|
|
87
|
+
PlatformSystemWrite: "platformSystem:write",
|
|
88
|
+
OrganizationCreationWrite: "organizationCreation:write",
|
|
89
|
+
ComplianceWrite: "compliance:write",
|
|
90
|
+
TaxSettingsWrite: "taxSettings:write",
|
|
91
|
+
CostsWrite: "costs:write",
|
|
92
|
+
PaymentAccountsWrite: "paymentAccounts:write",
|
|
93
|
+
PayoutsWrite: "payouts:write",
|
|
94
|
+
ExternalAccountsWrite: "externalAccounts:write",
|
|
95
|
+
ExternalReferencesWrite: "externalReferences:write",
|
|
96
|
+
MerchantIntegrationsWrite: "merchantIntegrations:write",
|
|
97
|
+
WebhooksWrite: "webhooks:write",
|
|
98
|
+
TestClocksWrite: "testClocks:write",
|
|
99
|
+
ApprovalsWrite: "approvals:write",
|
|
100
|
+
SourcesWrite: "sources:write",
|
|
101
|
+
EventsWrite: "events:write",
|
|
102
|
+
InvoicesIssue: "invoices:issue",
|
|
103
|
+
InvoicesVoid: "invoices:void",
|
|
104
|
+
PaymentsRefund: "payments:refund",
|
|
105
|
+
OrganizationDelete: "organization:delete",
|
|
106
|
+
OwnershipTransfer: "ownership:transfer",
|
|
107
|
+
SubscriptionsTerminate: "subscriptions:terminate",
|
|
108
|
+
SubscriptionsTerminateWithReason: "subscriptions:terminateWithReason",
|
|
109
|
+
SubscriptionsReconcile: "subscriptions:reconcile",
|
|
110
|
+
SubscriptionsUpdate: "subscriptions:update",
|
|
111
|
+
SubscriptionsDelete: "subscriptions:delete",
|
|
112
|
+
SubscriptionsTaxExempt: "subscriptions:taxExempt",
|
|
113
|
+
SubscriptionsAutoApprove: "subscriptions:autoApprove",
|
|
114
|
+
OrganizationResetData: "organization:resetData",
|
|
115
|
+
} as const;
|
|
116
|
+
/**
|
|
117
|
+
* A permission of the catalog: a resource read or write, or a sensitive action.
|
|
118
|
+
*/
|
|
119
|
+
export type Permission = ClosedEnum<typeof Permission>;
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const Permission$inboundSchema: z.ZodNativeEnum<typeof Permission> = z
|
|
123
|
+
.nativeEnum(Permission);
|
|
@@ -25,7 +25,7 @@ export type RevenueAccountRow = {
|
|
|
25
25
|
*/
|
|
26
26
|
currency: string;
|
|
27
27
|
/**
|
|
28
|
-
* What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount.
|
|
28
|
+
* What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount. `overdue` is a part of `awaitingPayment`.
|
|
29
29
|
*/
|
|
30
30
|
outstanding: OutstandingBlock;
|
|
31
31
|
};
|
|
@@ -17,7 +17,7 @@ export type RevenueAccountTotal = {
|
|
|
17
17
|
*/
|
|
18
18
|
currency: string;
|
|
19
19
|
/**
|
|
20
|
-
* What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount.
|
|
20
|
+
* What is owed, gross of tax, from any date. `awaitingPayment` and `paymentFailed` add up to it, in count and amount. `overdue` is a part of `awaitingPayment`.
|
|
21
21
|
*/
|
|
22
22
|
outstanding: OutstandingBlock;
|
|
23
23
|
};
|
|
@@ -136,6 +136,7 @@ export const TerminationChangeReason = {
|
|
|
136
136
|
Correction: "correction",
|
|
137
137
|
Migration: "migration",
|
|
138
138
|
Unspecified: "unspecified",
|
|
139
|
+
Contractual: "contractual",
|
|
139
140
|
} as const;
|
|
140
141
|
/**
|
|
141
142
|
* Why the subscription was terminated. Null while it is not terminated.
|
|
@@ -24,7 +24,7 @@ export type SubscriptionIntervalChange = {
|
|
|
24
24
|
merchantId: string;
|
|
25
25
|
subscriptionId: string;
|
|
26
26
|
/**
|
|
27
|
-
* Why a change was made. `correction`
|
|
27
|
+
* Why a change was made. `correction` repairs data that was entered wrong; `migration` moves a contract from another system; `commercial` is a real change to the deal; `contractual` applies a step the original contract scheduled, such as an annual uplift. Defaults to `unspecified`.
|
|
28
28
|
*/
|
|
29
29
|
changeReason: ChangeReason;
|
|
30
30
|
description: string | null;
|
package/src/sdk/me.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { meGetMe } from "../funcs/meGetMe.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as models from "../models/index.js";
|
|
8
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
|
|
10
|
+
export class Me extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* Get the caller
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Returns the caller's identity in its active organization, its roles, and the permissions that its credential holds there. The permissions are the effective set for the credential of the call: for a session or an API key, those of the principal; for an OAuth token, those of the principal narrowed to the scopes of the token.
|
|
16
|
+
*/
|
|
17
|
+
async getMe(
|
|
18
|
+
options?: RequestOptions,
|
|
19
|
+
): Promise<models.Me> {
|
|
20
|
+
return unwrapAsync(meGetMe(
|
|
21
|
+
this,
|
|
22
|
+
options,
|
|
23
|
+
));
|
|
24
|
+
}
|
|
25
|
+
}
|
package/src/sdk/prices.ts
CHANGED
|
@@ -57,6 +57,9 @@ export class Prices extends ClientSDK {
|
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Update
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* Updates a price. `paymentTerm` and `billingCadence` are fixed when the price is created: a request that sends either one is refused with a 400. To change them, create a new price.
|
|
60
63
|
*/
|
|
61
64
|
async update(
|
|
62
65
|
request: operations.UpdatePriceRequest,
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { Features } from "./features.js";
|
|
|
15
15
|
import { Fees } from "./fees.js";
|
|
16
16
|
import { InvoicesV2 } from "./invoicesv2.js";
|
|
17
17
|
import { Items } from "./items.js";
|
|
18
|
+
import { Me } from "./me.js";
|
|
18
19
|
import { MerchantIntegrations } from "./merchantintegrations.js";
|
|
19
20
|
import { Merchants } from "./merchants.js";
|
|
20
21
|
import { Orders } from "./orders.js";
|
|
@@ -33,6 +34,11 @@ import { Users } from "./users.js";
|
|
|
33
34
|
import { Webhooks } from "./webhooks.js";
|
|
34
35
|
|
|
35
36
|
export class Paygentic extends ClientSDK {
|
|
37
|
+
private _me?: Me;
|
|
38
|
+
get me(): Me {
|
|
39
|
+
return (this._me ??= new Me(this._options));
|
|
40
|
+
}
|
|
41
|
+
|
|
36
42
|
private _billableMetrics?: BillableMetrics;
|
|
37
43
|
get billableMetrics(): BillableMetrics {
|
|
38
44
|
return (this._billableMetrics ??= new BillableMetrics(this._options));
|