@leaflow/sdk 0.0.0-dev.367.g5d66ccc → 0.0.0-dev.371.gc7cf9b8
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/dist/account/v1/generated/functions.d.ts +76 -2
- package/dist/account/v1/generated/functions.js +77 -1
- package/dist/account/v1/generated/models.d.ts +88 -43
- package/dist/account/v1/generated/models.js +19 -9
- package/dist/account/v1/generated/schemas.zod.d.ts +15 -1
- package/dist/account/v1/generated/schemas.zod.js +14 -1
- package/dist/account/v1/generated/validators/accountDeletionObjectionResource.zod.d.ts +32 -0
- package/dist/account/v1/generated/validators/accountDeletionObjectionResource.zod.js +32 -0
- package/dist/account/v1/generated/validators/accountDeletionResource.zod.d.ts +69 -0
- package/dist/account/v1/generated/validators/accountDeletionResource.zod.js +53 -0
- package/dist/account/v1/generated/validators/accountDeletionState.zod.d.ts +34 -0
- package/dist/account/v1/generated/validators/accountDeletionState.zod.js +29 -0
- package/dist/account/v1/generated/validators/requestAccountDeletionRequestBody.zod.d.ts +31 -0
- package/dist/account/v1/generated/validators/requestAccountDeletionRequestBody.zod.js +31 -0
- package/dist/assistant/v1/generated/validators/platformListResponseBody.zod.d.ts +1 -1
- package/dist/assistant/v1/generated/validators/platformResource.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/models.d.ts +29 -0
- package/dist/billing/type/order/v1/generated/models.js +9 -0
- package/dist/billing/type/order/v1/generated/validators/accountDeletionObjection.zod.d.ts +19 -0
- package/dist/billing/type/order/v1/generated/validators/accountDeletionObjection.zod.js +19 -0
- package/dist/billing/type/order/v1/generated/validators/accountDeletionReadiness.zod.d.ts +45 -0
- package/dist/billing/type/order/v1/generated/validators/accountDeletionReadiness.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/accountDeletionReadinessItem.zod.d.ts +43 -0
- package/dist/billing/type/order/v1/generated/validators/accountDeletionReadinessItem.zod.js +19 -0
- package/dist/billing/type/order/v1/generated/validators/cancellation.zod.d.ts +2 -2
- package/dist/billing/type/order/v1/generated/validators/cancellationItem.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/cancellationList.zod.d.ts +2 -2
- package/dist/billing/type/order/v1/generated/validators/contact.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/contactList.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/discount.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/discountList.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/featureGrant.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/featureGrantList.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/featureGrantStatus.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/invoice.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/invoiceList.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/subscription.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/subscriptionCancellation.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
- package/dist/billing/v1/generated/functions.d.ts +34 -8
- package/dist/billing/v1/generated/functions.js +28 -7
- package/dist/billing/v1/generated/models.d.ts +29 -0
- package/dist/billing/v1/generated/models.js +9 -0
- package/dist/billing/v1/generated/schemas.zod.d.ts +9 -9
- package/dist/billing/v1/generated/schemas.zod.js +7 -7
- package/dist/billing/v1/generated/validators/accountDeletionObjection.zod.d.ts +19 -0
- package/dist/billing/v1/generated/validators/accountDeletionObjection.zod.js +19 -0
- package/dist/billing/v1/generated/validators/accountDeletionReadiness.zod.d.ts +45 -0
- package/dist/billing/v1/generated/validators/accountDeletionReadiness.zod.js +14 -0
- package/dist/billing/v1/generated/validators/accountDeletionReadinessItem.zod.d.ts +43 -0
- package/dist/billing/v1/generated/validators/accountDeletionReadinessItem.zod.js +19 -0
- package/dist/billing/v1/generated/validators/cancellation.zod.d.ts +2 -2
- package/dist/billing/v1/generated/validators/cancellationItem.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/cancellationList.zod.d.ts +2 -2
- package/dist/billing/v1/generated/validators/contact.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/contactList.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/discount.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/discountList.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/featureGrant.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/featureGrantList.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/featureGrantStatus.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/invoice.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/invoiceList.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/listCancellationsParams.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/listFeatureGrantsParams.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/subscription.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/subscriptionCancellation.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/models.d.ts +29 -0
- package/dist/canopy/v1/generated/models.js +9 -0
- package/dist/canopy/v1/generated/validators/accountDeletionObjection.zod.d.ts +52 -0
- package/dist/canopy/v1/generated/validators/accountDeletionObjection.zod.js +52 -0
- package/dist/canopy/v1/generated/validators/accountDeletionReadiness.zod.d.ts +78 -0
- package/dist/canopy/v1/generated/validators/accountDeletionReadiness.zod.js +47 -0
- package/dist/canopy/v1/generated/validators/accountDeletionReadinessItem.zod.d.ts +76 -0
- package/dist/canopy/v1/generated/validators/accountDeletionReadinessItem.zod.js +52 -0
- package/dist/canopy/v1/generated/validators/cancellation.zod.d.ts +2 -2
- package/dist/canopy/v1/generated/validators/cancellationItem.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/cancellationList.zod.d.ts +2 -2
- package/dist/canopy/v1/generated/validators/contact.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/contactList.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/discount.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/discountList.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/featureGrant.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/featureGrantList.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/featureGrantStatus.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/invoice.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/invoiceList.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/subscription.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/subscriptionCancellation.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
- package/dist/membership/v1/generated/functions.d.ts +3 -3
- package/dist/membership/v1/generated/functions.js +3 -3
- package/dist/membership/v1/generated/models.d.ts +29 -0
- package/dist/membership/v1/generated/models.js +9 -0
- package/dist/membership/v1/generated/schemas.zod.d.ts +3 -3
- package/dist/membership/v1/generated/schemas.zod.js +3 -3
- package/dist/membership/v1/generated/validators/accountDeletionObjection.zod.d.ts +19 -0
- package/dist/membership/v1/generated/validators/accountDeletionObjection.zod.js +19 -0
- package/dist/membership/v1/generated/validators/accountDeletionReadiness.zod.d.ts +45 -0
- package/dist/membership/v1/generated/validators/accountDeletionReadiness.zod.js +14 -0
- package/dist/membership/v1/generated/validators/accountDeletionReadinessItem.zod.d.ts +43 -0
- package/dist/membership/v1/generated/validators/accountDeletionReadinessItem.zod.js +19 -0
- package/dist/membership/v1/generated/validators/cancellation.zod.d.ts +2 -2
- package/dist/membership/v1/generated/validators/cancellationItem.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/cancellationList.zod.d.ts +2 -2
- package/dist/membership/v1/generated/validators/contact.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/contactList.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/discount.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/discountList.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/featureGrant.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/featureGrantList.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/featureGrantStatus.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/invoice.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/invoiceList.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/subscription.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/subscriptionCancellation.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/subscriptionList.zod.d.ts +1 -1
- package/dist/routes.d.ts +32 -0
- package/dist/routes.js +36 -0
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Account API
|
|
5
|
+
* Everything that comes before a project is chosen: registration, the account itself, the projects the caller belongs to, and entry into one of them.
|
|
6
|
+
*
|
|
7
|
+
* ## Authentication
|
|
8
|
+
*
|
|
9
|
+
* Every request carries `Authorization: Bearer <access token>`, obtained by signing in at auth.leaflow.net. The endpoints that need no token say so.
|
|
10
|
+
*
|
|
11
|
+
* ## Entering a project
|
|
12
|
+
*
|
|
13
|
+
* 1. `QUERY /account/v1/projects` searches the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
|
|
14
|
+
* 2. `POST /account/v1/projects/{projectId}/scoped-tokens` returns a scoped token for the project chosen.
|
|
15
|
+
* 3. Every other service is called with that scoped token.
|
|
16
|
+
*
|
|
17
|
+
* A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
|
|
18
|
+
*
|
|
19
|
+
* ## Project slugs
|
|
20
|
+
*
|
|
21
|
+
* Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
|
|
22
|
+
*
|
|
23
|
+
* Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
|
|
24
|
+
* OpenAPI spec version: 1.0.0
|
|
25
|
+
*/
|
|
26
|
+
import * as zod from "zod";
|
|
27
|
+
export declare const AccountDeletionState: zod.ZodEnum<{
|
|
28
|
+
none: "none";
|
|
29
|
+
checking: "checking";
|
|
30
|
+
scheduled: "scheduled";
|
|
31
|
+
executing: "executing";
|
|
32
|
+
}>;
|
|
33
|
+
export type AccountDeletionState = zod.input<typeof AccountDeletionState>;
|
|
34
|
+
export type AccountDeletionStateOutput = zod.output<typeof AccountDeletionState>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Account API
|
|
5
|
+
* Everything that comes before a project is chosen: registration, the account itself, the projects the caller belongs to, and entry into one of them.
|
|
6
|
+
*
|
|
7
|
+
* ## Authentication
|
|
8
|
+
*
|
|
9
|
+
* Every request carries `Authorization: Bearer <access token>`, obtained by signing in at auth.leaflow.net. The endpoints that need no token say so.
|
|
10
|
+
*
|
|
11
|
+
* ## Entering a project
|
|
12
|
+
*
|
|
13
|
+
* 1. `QUERY /account/v1/projects` searches the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
|
|
14
|
+
* 2. `POST /account/v1/projects/{projectId}/scoped-tokens` returns a scoped token for the project chosen.
|
|
15
|
+
* 3. Every other service is called with that scoped token.
|
|
16
|
+
*
|
|
17
|
+
* A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
|
|
18
|
+
*
|
|
19
|
+
* ## Project slugs
|
|
20
|
+
*
|
|
21
|
+
* Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
|
|
22
|
+
*
|
|
23
|
+
* Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
|
|
24
|
+
* OpenAPI spec version: 1.0.0
|
|
25
|
+
*/
|
|
26
|
+
import * as zod from "zod";
|
|
27
|
+
export const AccountDeletionState = zod
|
|
28
|
+
.enum(["none", "checking", "scheduled", "executing"])
|
|
29
|
+
.describe("`none` while no deletion is open. `checking` while the services holding data for the account are asked whether it can be closed. `scheduled` once they agree; it is carried out at `scheduled_at` and can be cancelled until then. `executing` once `scheduled_at` has passed; it can no longer be cancelled");
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Account API
|
|
5
|
+
* Everything that comes before a project is chosen: registration, the account itself, the projects the caller belongs to, and entry into one of them.
|
|
6
|
+
*
|
|
7
|
+
* ## Authentication
|
|
8
|
+
*
|
|
9
|
+
* Every request carries `Authorization: Bearer <access token>`, obtained by signing in at auth.leaflow.net. The endpoints that need no token say so.
|
|
10
|
+
*
|
|
11
|
+
* ## Entering a project
|
|
12
|
+
*
|
|
13
|
+
* 1. `QUERY /account/v1/projects` searches the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
|
|
14
|
+
* 2. `POST /account/v1/projects/{projectId}/scoped-tokens` returns a scoped token for the project chosen.
|
|
15
|
+
* 3. Every other service is called with that scoped token.
|
|
16
|
+
*
|
|
17
|
+
* A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
|
|
18
|
+
*
|
|
19
|
+
* ## Project slugs
|
|
20
|
+
*
|
|
21
|
+
* Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
|
|
22
|
+
*
|
|
23
|
+
* Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
|
|
24
|
+
* OpenAPI spec version: 1.0.0
|
|
25
|
+
*/
|
|
26
|
+
import * as zod from "zod";
|
|
27
|
+
export declare const RequestAccountDeletionRequestBody: zod.ZodObject<{
|
|
28
|
+
acknowledge_forfeiture: zod.ZodLiteral<true>;
|
|
29
|
+
}, zod.z.core.$strict>;
|
|
30
|
+
export type RequestAccountDeletionRequestBody = zod.input<typeof RequestAccountDeletionRequestBody>;
|
|
31
|
+
export type RequestAccountDeletionRequestBodyOutput = zod.output<typeof RequestAccountDeletionRequestBody>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Account API
|
|
5
|
+
* Everything that comes before a project is chosen: registration, the account itself, the projects the caller belongs to, and entry into one of them.
|
|
6
|
+
*
|
|
7
|
+
* ## Authentication
|
|
8
|
+
*
|
|
9
|
+
* Every request carries `Authorization: Bearer <access token>`, obtained by signing in at auth.leaflow.net. The endpoints that need no token say so.
|
|
10
|
+
*
|
|
11
|
+
* ## Entering a project
|
|
12
|
+
*
|
|
13
|
+
* 1. `QUERY /account/v1/projects` searches the projects the caller belongs to. The first call registers the account, taking the name and email address from the sign-in claims.
|
|
14
|
+
* 2. `POST /account/v1/projects/{projectId}/scoped-tokens` returns a scoped token for the project chosen.
|
|
15
|
+
* 3. Every other service is called with that scoped token.
|
|
16
|
+
*
|
|
17
|
+
* A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
|
|
18
|
+
*
|
|
19
|
+
* ## Project slugs
|
|
20
|
+
*
|
|
21
|
+
* Every project carries a `slug`, the label naming it in its address. Until a custom slug is chosen the slug is the project's `id`, and the address under the `id` keeps working after a custom slug is chosen. `GET /account/v1/projects/by-slug/{slug}` finds the project named by either label.
|
|
22
|
+
*
|
|
23
|
+
* Looking up slugs and claiming custom slugs are rate limited per account. A request over the limit fails with 429, and `meta.retry_after_seconds` on the error states how many seconds to wait before retrying.
|
|
24
|
+
* OpenAPI spec version: 1.0.0
|
|
25
|
+
*/
|
|
26
|
+
import * as zod from "zod";
|
|
27
|
+
export const RequestAccountDeletionRequestBody = zod.strictObject({
|
|
28
|
+
acknowledge_forfeiture: zod
|
|
29
|
+
.literal(true)
|
|
30
|
+
.describe("Must be true. Confirms that any remaining balance and prepaid benefits are forfeited when the deletion is carried out"),
|
|
31
|
+
});
|
|
@@ -35,9 +35,9 @@ export declare const PlatformListResponseBody: zod.ZodObject<{
|
|
|
35
35
|
name: zod.ZodString;
|
|
36
36
|
resident: zod.ZodBoolean;
|
|
37
37
|
secretSource: zod.ZodEnum<{
|
|
38
|
+
none: "none";
|
|
38
39
|
generated: "generated";
|
|
39
40
|
supplied: "supplied";
|
|
40
|
-
none: "none";
|
|
41
41
|
}>;
|
|
42
42
|
setupChallenge: zod.ZodEnum<{
|
|
43
43
|
none: "none";
|
|
@@ -34,9 +34,9 @@ export declare const PlatformResource: zod.ZodObject<{
|
|
|
34
34
|
name: zod.ZodString;
|
|
35
35
|
resident: zod.ZodBoolean;
|
|
36
36
|
secretSource: zod.ZodEnum<{
|
|
37
|
+
none: "none";
|
|
37
38
|
generated: "generated";
|
|
38
39
|
supplied: "supplied";
|
|
39
|
-
none: "none";
|
|
40
40
|
}>;
|
|
41
41
|
setupChallenge: zod.ZodEnum<{
|
|
42
42
|
none: "none";
|
|
@@ -912,6 +912,35 @@ export interface AccountBalance {
|
|
|
912
912
|
due: Money;
|
|
913
913
|
pending_returns_amount: Money;
|
|
914
914
|
}
|
|
915
|
+
/**
|
|
916
|
+
* `ARREARS`: the balance is negative. `PROJECTS_ASSIGNED`: the account still pays for a project, yours or anyone
|
|
917
|
+
* else's. `ACTIVE_SUBSCRIPTION`: a subscription it bought has not ended. `OPEN_ORDER`: an order is not finished.
|
|
918
|
+
* `UNPAID_INVOICE`: an issued invoice is not settled. `UNBILLED_USAGE`: usage has not been invoiced yet; it is
|
|
919
|
+
* invoiced in the next billing run. `PENDING_TRANSACTION`: a top-up, refund or withdrawal is still pending.
|
|
920
|
+
*/
|
|
921
|
+
export type AccountDeletionObjection = (typeof AccountDeletionObjection)[keyof typeof AccountDeletionObjection];
|
|
922
|
+
export declare const AccountDeletionObjection: {
|
|
923
|
+
readonly ARREARS: "ARREARS";
|
|
924
|
+
readonly PROJECTS_ASSIGNED: "PROJECTS_ASSIGNED";
|
|
925
|
+
readonly ACTIVE_SUBSCRIPTION: "ACTIVE_SUBSCRIPTION";
|
|
926
|
+
readonly OPEN_ORDER: "OPEN_ORDER";
|
|
927
|
+
readonly UNPAID_INVOICE: "UNPAID_INVOICE";
|
|
928
|
+
readonly UNBILLED_USAGE: "UNBILLED_USAGE";
|
|
929
|
+
readonly PENDING_TRANSACTION: "PENDING_TRANSACTION";
|
|
930
|
+
};
|
|
931
|
+
export interface AccountDeletionReadinessItem {
|
|
932
|
+
account: BillingAccount;
|
|
933
|
+
/** Topped-up funds, in the account's currency, forfeited when it closes. Negative means arrears. */
|
|
934
|
+
balance: Money;
|
|
935
|
+
/** Remaining credit, in the account's currency, forfeited when it closes. */
|
|
936
|
+
credits: Money;
|
|
937
|
+
/** What stops this account from closing; empty when it can close. */
|
|
938
|
+
objections: AccountDeletionObjection[];
|
|
939
|
+
}
|
|
940
|
+
export interface AccountDeletionReadiness {
|
|
941
|
+
/** Every billing account you own that is not closed; empty when you own none. */
|
|
942
|
+
accounts: AccountDeletionReadinessItem[];
|
|
943
|
+
}
|
|
915
944
|
/**
|
|
916
945
|
* A project's assignment to a billing account from effective_from until effective_to; an open assignment has no end.
|
|
917
946
|
*/
|
|
@@ -107,6 +107,15 @@ export const PurchaseOperation = {
|
|
|
107
107
|
renew: "renew",
|
|
108
108
|
modify: "modify",
|
|
109
109
|
};
|
|
110
|
+
export const AccountDeletionObjection = {
|
|
111
|
+
ARREARS: "ARREARS",
|
|
112
|
+
PROJECTS_ASSIGNED: "PROJECTS_ASSIGNED",
|
|
113
|
+
ACTIVE_SUBSCRIPTION: "ACTIVE_SUBSCRIPTION",
|
|
114
|
+
OPEN_ORDER: "OPEN_ORDER",
|
|
115
|
+
UNPAID_INVOICE: "UNPAID_INVOICE",
|
|
116
|
+
UNBILLED_USAGE: "UNBILLED_USAGE",
|
|
117
|
+
PENDING_TRANSACTION: "PENDING_TRANSACTION",
|
|
118
|
+
};
|
|
110
119
|
export const TopUpStatus = {
|
|
111
120
|
pending: "pending",
|
|
112
121
|
succeeded: "succeeded",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const AccountDeletionObjection: zod.ZodEnum<{
|
|
10
|
+
ARREARS: "ARREARS";
|
|
11
|
+
PROJECTS_ASSIGNED: "PROJECTS_ASSIGNED";
|
|
12
|
+
ACTIVE_SUBSCRIPTION: "ACTIVE_SUBSCRIPTION";
|
|
13
|
+
OPEN_ORDER: "OPEN_ORDER";
|
|
14
|
+
UNPAID_INVOICE: "UNPAID_INVOICE";
|
|
15
|
+
UNBILLED_USAGE: "UNBILLED_USAGE";
|
|
16
|
+
PENDING_TRANSACTION: "PENDING_TRANSACTION";
|
|
17
|
+
}>;
|
|
18
|
+
export type AccountDeletionObjection = zod.input<typeof AccountDeletionObjection>;
|
|
19
|
+
export type AccountDeletionObjectionOutput = zod.output<typeof AccountDeletionObjection>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export const AccountDeletionObjection = zod
|
|
10
|
+
.enum([
|
|
11
|
+
"ARREARS",
|
|
12
|
+
"PROJECTS_ASSIGNED",
|
|
13
|
+
"ACTIVE_SUBSCRIPTION",
|
|
14
|
+
"OPEN_ORDER",
|
|
15
|
+
"UNPAID_INVOICE",
|
|
16
|
+
"UNBILLED_USAGE",
|
|
17
|
+
"PENDING_TRANSACTION",
|
|
18
|
+
])
|
|
19
|
+
.describe("`ARREARS`: the balance is negative. `PROJECTS_ASSIGNED`: the account still pays for a project, yours or anyone\nelse's. `ACTIVE_SUBSCRIPTION`: a subscription it bought has not ended. `OPEN_ORDER`: an order is not finished.\n`UNPAID_INVOICE`: an issued invoice is not settled. `UNBILLED_USAGE`: usage has not been invoiced yet; it is\ninvoiced in the next billing run. `PENDING_TRANSACTION`: a top-up, refund or withdrawal is still pending.");
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const AccountDeletionReadiness: zod.ZodObject<{
|
|
10
|
+
accounts: zod.ZodArray<zod.ZodObject<{
|
|
11
|
+
account: zod.ZodObject<{
|
|
12
|
+
invoice_contact_id: zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>;
|
|
13
|
+
id: zod.ZodInt;
|
|
14
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
15
|
+
currency: zod.ZodString;
|
|
16
|
+
status: zod.ZodEnum<{
|
|
17
|
+
active: "active";
|
|
18
|
+
suspended: "suspended";
|
|
19
|
+
closed: "closed";
|
|
20
|
+
}>;
|
|
21
|
+
suspended_by: zod.ZodEnum<{
|
|
22
|
+
none: "none";
|
|
23
|
+
operator: "operator";
|
|
24
|
+
owner: "owner";
|
|
25
|
+
}>;
|
|
26
|
+
grace_amount: zod.ZodOptional<zod.ZodString>;
|
|
27
|
+
grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
|
|
28
|
+
closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
|
|
29
|
+
created_at: zod.z.ZodISODateTime;
|
|
30
|
+
}, zod.z.core.$strict>;
|
|
31
|
+
balance: zod.ZodString;
|
|
32
|
+
credits: zod.ZodString;
|
|
33
|
+
objections: zod.ZodArray<zod.ZodEnum<{
|
|
34
|
+
ARREARS: "ARREARS";
|
|
35
|
+
PROJECTS_ASSIGNED: "PROJECTS_ASSIGNED";
|
|
36
|
+
ACTIVE_SUBSCRIPTION: "ACTIVE_SUBSCRIPTION";
|
|
37
|
+
OPEN_ORDER: "OPEN_ORDER";
|
|
38
|
+
UNPAID_INVOICE: "UNPAID_INVOICE";
|
|
39
|
+
UNBILLED_USAGE: "UNBILLED_USAGE";
|
|
40
|
+
PENDING_TRANSACTION: "PENDING_TRANSACTION";
|
|
41
|
+
}>>;
|
|
42
|
+
}, zod.z.core.$strict>>;
|
|
43
|
+
}, zod.z.core.$strict>;
|
|
44
|
+
export type AccountDeletionReadiness = zod.input<typeof AccountDeletionReadiness>;
|
|
45
|
+
export type AccountDeletionReadinessOutput = zod.output<typeof AccountDeletionReadiness>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
import { AccountDeletionReadinessItem } from "./accountDeletionReadinessItem.zod.js";
|
|
10
|
+
export const AccountDeletionReadiness = zod.strictObject({
|
|
11
|
+
accounts: zod
|
|
12
|
+
.array(AccountDeletionReadinessItem)
|
|
13
|
+
.describe("Every billing account you own that is not closed; empty when you own none."),
|
|
14
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const AccountDeletionReadinessItem: zod.ZodObject<{
|
|
10
|
+
account: zod.ZodObject<{
|
|
11
|
+
invoice_contact_id: zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>;
|
|
12
|
+
id: zod.ZodInt;
|
|
13
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
14
|
+
currency: zod.ZodString;
|
|
15
|
+
status: zod.ZodEnum<{
|
|
16
|
+
active: "active";
|
|
17
|
+
suspended: "suspended";
|
|
18
|
+
closed: "closed";
|
|
19
|
+
}>;
|
|
20
|
+
suspended_by: zod.ZodEnum<{
|
|
21
|
+
none: "none";
|
|
22
|
+
operator: "operator";
|
|
23
|
+
owner: "owner";
|
|
24
|
+
}>;
|
|
25
|
+
grace_amount: zod.ZodOptional<zod.ZodString>;
|
|
26
|
+
grace_period_seconds: zod.ZodOptional<zod.ZodInt>;
|
|
27
|
+
closed_at: zod.ZodOptional<zod.ZodNullable<zod.z.ZodISODateTime>>;
|
|
28
|
+
created_at: zod.z.ZodISODateTime;
|
|
29
|
+
}, zod.z.core.$strict>;
|
|
30
|
+
balance: zod.ZodString;
|
|
31
|
+
credits: zod.ZodString;
|
|
32
|
+
objections: zod.ZodArray<zod.ZodEnum<{
|
|
33
|
+
ARREARS: "ARREARS";
|
|
34
|
+
PROJECTS_ASSIGNED: "PROJECTS_ASSIGNED";
|
|
35
|
+
ACTIVE_SUBSCRIPTION: "ACTIVE_SUBSCRIPTION";
|
|
36
|
+
OPEN_ORDER: "OPEN_ORDER";
|
|
37
|
+
UNPAID_INVOICE: "UNPAID_INVOICE";
|
|
38
|
+
UNBILLED_USAGE: "UNBILLED_USAGE";
|
|
39
|
+
PENDING_TRANSACTION: "PENDING_TRANSACTION";
|
|
40
|
+
}>>;
|
|
41
|
+
}, zod.z.core.$strict>;
|
|
42
|
+
export type AccountDeletionReadinessItem = zod.input<typeof AccountDeletionReadinessItem>;
|
|
43
|
+
export type AccountDeletionReadinessItemOutput = zod.output<typeof AccountDeletionReadinessItem>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
import { AccountDeletionObjection } from "./accountDeletionObjection.zod.js";
|
|
10
|
+
import { BillingAccount } from "./billingAccount.zod.js";
|
|
11
|
+
import { Money } from "./money.zod.js";
|
|
12
|
+
export const AccountDeletionReadinessItem = zod.strictObject({
|
|
13
|
+
account: BillingAccount,
|
|
14
|
+
balance: Money.describe("Topped-up funds, in the account's currency, forfeited when it closes. Negative means arrears."),
|
|
15
|
+
credits: Money.describe("Remaining credit, in the account's currency, forfeited when it closes."),
|
|
16
|
+
objections: zod
|
|
17
|
+
.array(AccountDeletionObjection)
|
|
18
|
+
.describe("What stops this account from closing; empty when it can close."),
|
|
19
|
+
});
|
|
@@ -9,10 +9,10 @@ import * as zod from "zod";
|
|
|
9
9
|
export declare const Cancellation: zod.ZodObject<{
|
|
10
10
|
id: zod.ZodUUID;
|
|
11
11
|
status: zod.ZodEnum<{
|
|
12
|
+
scheduled: "scheduled";
|
|
12
13
|
completed: "completed";
|
|
13
14
|
failed: "failed";
|
|
14
15
|
requested: "requested";
|
|
15
|
-
scheduled: "scheduled";
|
|
16
16
|
releasing: "releasing";
|
|
17
17
|
canceled: "canceled";
|
|
18
18
|
}>;
|
|
@@ -48,10 +48,10 @@ export declare const Cancellation: zod.ZodObject<{
|
|
|
48
48
|
metered: "metered";
|
|
49
49
|
}>;
|
|
50
50
|
status: zod.ZodEnum<{
|
|
51
|
+
scheduled: "scheduled";
|
|
51
52
|
completed: "completed";
|
|
52
53
|
failed: "failed";
|
|
53
54
|
requested: "requested";
|
|
54
|
-
scheduled: "scheduled";
|
|
55
55
|
releasing: "releasing";
|
|
56
56
|
canceled: "canceled";
|
|
57
57
|
}>;
|
|
@@ -20,10 +20,10 @@ export declare const CancellationItem: zod.ZodObject<{
|
|
|
20
20
|
metered: "metered";
|
|
21
21
|
}>;
|
|
22
22
|
status: zod.ZodEnum<{
|
|
23
|
+
scheduled: "scheduled";
|
|
23
24
|
completed: "completed";
|
|
24
25
|
failed: "failed";
|
|
25
26
|
requested: "requested";
|
|
26
|
-
scheduled: "scheduled";
|
|
27
27
|
releasing: "releasing";
|
|
28
28
|
canceled: "canceled";
|
|
29
29
|
}>;
|
|
@@ -10,10 +10,10 @@ export declare const CancellationList: zod.ZodObject<{
|
|
|
10
10
|
items: zod.ZodArray<zod.ZodObject<{
|
|
11
11
|
id: zod.ZodUUID;
|
|
12
12
|
status: zod.ZodEnum<{
|
|
13
|
+
scheduled: "scheduled";
|
|
13
14
|
completed: "completed";
|
|
14
15
|
failed: "failed";
|
|
15
16
|
requested: "requested";
|
|
16
|
-
scheduled: "scheduled";
|
|
17
17
|
releasing: "releasing";
|
|
18
18
|
canceled: "canceled";
|
|
19
19
|
}>;
|
|
@@ -49,10 +49,10 @@ export declare const CancellationList: zod.ZodObject<{
|
|
|
49
49
|
metered: "metered";
|
|
50
50
|
}>;
|
|
51
51
|
status: zod.ZodEnum<{
|
|
52
|
+
scheduled: "scheduled";
|
|
52
53
|
completed: "completed";
|
|
53
54
|
failed: "failed";
|
|
54
55
|
requested: "requested";
|
|
55
|
-
scheduled: "scheduled";
|
|
56
56
|
releasing: "releasing";
|
|
57
57
|
canceled: "canceled";
|
|
58
58
|
}>;
|
|
@@ -30,8 +30,8 @@ export declare const Contact: zod.ZodObject<{
|
|
|
30
30
|
address_postal_code: zod.ZodOptional<zod.ZodString>;
|
|
31
31
|
address_country: zod.ZodOptional<zod.ZodString>;
|
|
32
32
|
tax_exempt: zod.ZodEnum<{
|
|
33
|
-
reverse: "reverse";
|
|
34
33
|
none: "none";
|
|
34
|
+
reverse: "reverse";
|
|
35
35
|
exempt: "exempt";
|
|
36
36
|
}>;
|
|
37
37
|
active: zod.ZodBoolean;
|
|
@@ -21,8 +21,8 @@ export declare const ContactList: zod.ZodObject<{
|
|
|
21
21
|
address_postal_code: zod.ZodOptional<zod.ZodString>;
|
|
22
22
|
address_country: zod.ZodOptional<zod.ZodString>;
|
|
23
23
|
tax_exempt: zod.ZodEnum<{
|
|
24
|
-
reverse: "reverse";
|
|
25
24
|
none: "none";
|
|
25
|
+
reverse: "reverse";
|
|
26
26
|
exempt: "exempt";
|
|
27
27
|
}>;
|
|
28
28
|
active: zod.ZodBoolean;
|
|
@@ -12,9 +12,9 @@ export declare const Discount: zod.ZodObject<{
|
|
|
12
12
|
coupon_id: zod.ZodUUID;
|
|
13
13
|
promotion_code_id: zod.ZodOptional<zod.ZodUUID>;
|
|
14
14
|
status: zod.ZodEnum<{
|
|
15
|
+
scheduled: "scheduled";
|
|
15
16
|
active: "active";
|
|
16
17
|
expired: "expired";
|
|
17
|
-
scheduled: "scheduled";
|
|
18
18
|
voided: "voided";
|
|
19
19
|
}>;
|
|
20
20
|
voided_at: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
@@ -13,9 +13,9 @@ export declare const DiscountList: zod.ZodObject<{
|
|
|
13
13
|
coupon_id: zod.ZodUUID;
|
|
14
14
|
promotion_code_id: zod.ZodOptional<zod.ZodUUID>;
|
|
15
15
|
status: zod.ZodEnum<{
|
|
16
|
+
scheduled: "scheduled";
|
|
16
17
|
active: "active";
|
|
17
18
|
expired: "expired";
|
|
18
|
-
scheduled: "scheduled";
|
|
19
19
|
voided: "voided";
|
|
20
20
|
}>;
|
|
21
21
|
voided_at: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
@@ -23,9 +23,9 @@ export declare const FeatureGrant: zod.ZodObject<{
|
|
|
23
23
|
valid_from: zod.z.ZodISODateTime;
|
|
24
24
|
valid_until: zod.ZodNullable<zod.z.ZodISODateTime>;
|
|
25
25
|
status: zod.ZodEnum<{
|
|
26
|
+
scheduled: "scheduled";
|
|
26
27
|
active: "active";
|
|
27
28
|
expired: "expired";
|
|
28
|
-
scheduled: "scheduled";
|
|
29
29
|
voided: "voided";
|
|
30
30
|
}>;
|
|
31
31
|
}, zod.z.core.$strict>;
|
|
@@ -24,9 +24,9 @@ export declare const FeatureGrantList: zod.ZodObject<{
|
|
|
24
24
|
valid_from: zod.z.ZodISODateTime;
|
|
25
25
|
valid_until: zod.ZodNullable<zod.z.ZodISODateTime>;
|
|
26
26
|
status: zod.ZodEnum<{
|
|
27
|
+
scheduled: "scheduled";
|
|
27
28
|
active: "active";
|
|
28
29
|
expired: "expired";
|
|
29
|
-
scheduled: "scheduled";
|
|
30
30
|
voided: "voided";
|
|
31
31
|
}>;
|
|
32
32
|
}, zod.z.core.$strict>>;
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const FeatureGrantStatus: zod.ZodEnum<{
|
|
10
|
+
scheduled: "scheduled";
|
|
10
11
|
active: "active";
|
|
11
12
|
expired: "expired";
|
|
12
|
-
scheduled: "scheduled";
|
|
13
13
|
voided: "voided";
|
|
14
14
|
}>;
|
|
15
15
|
export type FeatureGrantStatus = zod.input<typeof FeatureGrantStatus>;
|
|
@@ -46,8 +46,8 @@ export declare const Invoice: zod.ZodObject<{
|
|
|
46
46
|
customer_email: zod.ZodOptional<zod.ZodString>;
|
|
47
47
|
customer_tax_id: zod.ZodOptional<zod.ZodString>;
|
|
48
48
|
customer_tax_exempt: zod.ZodOptional<zod.ZodEnum<{
|
|
49
|
-
reverse: "reverse";
|
|
50
49
|
none: "none";
|
|
50
|
+
reverse: "reverse";
|
|
51
51
|
exempt: "exempt";
|
|
52
52
|
}>>;
|
|
53
53
|
customer_address_line1: zod.ZodOptional<zod.ZodString>;
|
|
@@ -47,8 +47,8 @@ export declare const InvoiceList: zod.ZodObject<{
|
|
|
47
47
|
customer_email: zod.ZodOptional<zod.ZodString>;
|
|
48
48
|
customer_tax_id: zod.ZodOptional<zod.ZodString>;
|
|
49
49
|
customer_tax_exempt: zod.ZodOptional<zod.ZodEnum<{
|
|
50
|
-
reverse: "reverse";
|
|
51
50
|
none: "none";
|
|
51
|
+
reverse: "reverse";
|
|
52
52
|
exempt: "exempt";
|
|
53
53
|
}>>;
|
|
54
54
|
customer_address_line1: zod.ZodOptional<zod.ZodString>;
|
|
@@ -61,10 +61,10 @@ export declare const Subscription: zod.ZodObject<{
|
|
|
61
61
|
id: zod.ZodUUID;
|
|
62
62
|
subscription_id: zod.ZodUUID;
|
|
63
63
|
status: zod.ZodEnum<{
|
|
64
|
+
scheduled: "scheduled";
|
|
64
65
|
completed: "completed";
|
|
65
66
|
failed: "failed";
|
|
66
67
|
requested: "requested";
|
|
67
|
-
scheduled: "scheduled";
|
|
68
68
|
releasing: "releasing";
|
|
69
69
|
canceled: "canceled";
|
|
70
70
|
}>;
|
|
@@ -12,10 +12,10 @@ export declare const SubscriptionCancellation: zod.ZodObject<{
|
|
|
12
12
|
id: zod.ZodUUID;
|
|
13
13
|
subscription_id: zod.ZodUUID;
|
|
14
14
|
status: zod.ZodEnum<{
|
|
15
|
+
scheduled: "scheduled";
|
|
15
16
|
completed: "completed";
|
|
16
17
|
failed: "failed";
|
|
17
18
|
requested: "requested";
|
|
18
|
-
scheduled: "scheduled";
|
|
19
19
|
releasing: "releasing";
|
|
20
20
|
canceled: "canceled";
|
|
21
21
|
}>;
|
|
@@ -61,10 +61,10 @@ export declare const SubscriptionList: zod.ZodObject<{
|
|
|
61
61
|
id: zod.ZodUUID;
|
|
62
62
|
subscription_id: zod.ZodUUID;
|
|
63
63
|
status: zod.ZodEnum<{
|
|
64
|
+
scheduled: "scheduled";
|
|
64
65
|
completed: "completed";
|
|
65
66
|
failed: "failed";
|
|
66
67
|
requested: "requested";
|
|
67
|
-
scheduled: "scheduled";
|
|
68
68
|
releasing: "releasing";
|
|
69
69
|
canceled: "canceled";
|
|
70
70
|
}>;
|