@leaflow/sdk 0.172.0 → 0.173.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/v1/generated/models.d.ts +52 -10
- package/dist/account/v1/generated/validators/error.zod.d.ts +13 -4
- package/dist/account/v1/generated/validators/error.zod.js +6 -9
- package/dist/account/v1/generated/validators/errorStatus.zod.d.ts +41 -0
- package/dist/account/v1/generated/validators/errorStatus.zod.js +56 -0
- package/dist/account/v1/generated/validators/fieldViolation.zod.d.ts +32 -0
- package/dist/account/v1/generated/validators/fieldViolation.zod.js +35 -0
- package/dist/assistant/v1/generated/models.d.ts +52 -10
- package/dist/assistant/v1/generated/validators/error.zod.d.ts +13 -4
- package/dist/assistant/v1/generated/validators/error.zod.js +6 -9
- package/dist/assistant/v1/generated/validators/errorStatus.zod.d.ts +40 -0
- package/dist/assistant/v1/generated/validators/errorStatus.zod.js +55 -0
- package/dist/assistant/v1/generated/validators/fieldViolation.zod.d.ts +31 -0
- package/dist/assistant/v1/generated/validators/fieldViolation.zod.js +34 -0
- package/dist/billing/v1/generated/models.d.ts +52 -10
- package/dist/billing/v1/generated/validators/error.zod.d.ts +13 -4
- package/dist/billing/v1/generated/validators/error.zod.js +6 -9
- package/dist/billing/v1/generated/validators/errorStatus.zod.d.ts +23 -0
- package/dist/billing/v1/generated/validators/errorStatus.zod.js +38 -0
- package/dist/billing/v1/generated/validators/fieldViolation.zod.d.ts +14 -0
- package/dist/billing/v1/generated/validators/fieldViolation.zod.js +17 -0
- package/dist/canopy/v1/generated/models.d.ts +52 -10
- package/dist/canopy/v1/generated/validators/error.zod.d.ts +13 -4
- package/dist/canopy/v1/generated/validators/error.zod.js +6 -9
- package/dist/canopy/v1/generated/validators/errorStatus.zod.d.ts +56 -0
- package/dist/canopy/v1/generated/validators/errorStatus.zod.js +71 -0
- package/dist/canopy/v1/generated/validators/fieldViolation.zod.d.ts +47 -0
- package/dist/canopy/v1/generated/validators/fieldViolation.zod.js +50 -0
- package/dist/compute/v2/generated/models.d.ts +52 -10
- package/dist/compute/v2/generated/validators/error.zod.d.ts +13 -4
- package/dist/compute/v2/generated/validators/error.zod.js +6 -9
- package/dist/compute/v2/generated/validators/errorStatus.zod.d.ts +50 -0
- package/dist/compute/v2/generated/validators/errorStatus.zod.js +65 -0
- package/dist/compute/v2/generated/validators/fieldViolation.zod.d.ts +41 -0
- package/dist/compute/v2/generated/validators/fieldViolation.zod.js +44 -0
- package/dist/dns/v1/generated/models.d.ts +52 -10
- package/dist/dns/v1/generated/validators/error.zod.d.ts +13 -4
- package/dist/dns/v1/generated/validators/error.zod.js +6 -9
- package/dist/dns/v1/generated/validators/errorStatus.zod.d.ts +66 -0
- package/dist/dns/v1/generated/validators/errorStatus.zod.js +81 -0
- package/dist/dns/v1/generated/validators/fieldViolation.zod.d.ts +57 -0
- package/dist/dns/v1/generated/validators/fieldViolation.zod.js +60 -0
- package/dist/iam/v1/generated/models.d.ts +52 -10
- package/dist/iam/v1/generated/validators/error.zod.d.ts +13 -4
- package/dist/iam/v1/generated/validators/error.zod.js +6 -9
- package/dist/iam/v1/generated/validators/errorStatus.zod.d.ts +30 -0
- package/dist/iam/v1/generated/validators/errorStatus.zod.js +45 -0
- package/dist/iam/v1/generated/validators/fieldViolation.zod.d.ts +21 -0
- package/dist/iam/v1/generated/validators/fieldViolation.zod.js +24 -0
- package/dist/membership/v1/generated/models.d.ts +52 -10
- package/dist/membership/v1/generated/validators/error.zod.d.ts +13 -4
- package/dist/membership/v1/generated/validators/error.zod.js +6 -9
- package/dist/membership/v1/generated/validators/errorStatus.zod.d.ts +23 -0
- package/dist/membership/v1/generated/validators/errorStatus.zod.js +38 -0
- package/dist/membership/v1/generated/validators/fieldViolation.zod.d.ts +14 -0
- package/dist/membership/v1/generated/validators/fieldViolation.zod.js +17 -0
- package/dist/monitoring/v1/generated/models.d.ts +52 -10
- package/dist/monitoring/v1/generated/validators/error.zod.d.ts +13 -4
- package/dist/monitoring/v1/generated/validators/error.zod.js +6 -9
- package/dist/monitoring/v1/generated/validators/errorStatus.zod.d.ts +36 -0
- package/dist/monitoring/v1/generated/validators/errorStatus.zod.js +51 -0
- package/dist/monitoring/v1/generated/validators/fieldViolation.zod.d.ts +27 -0
- package/dist/monitoring/v1/generated/validators/fieldViolation.zod.js +30 -0
- package/dist/notification/v1/generated/models.d.ts +52 -10
- package/dist/notification/v1/generated/validators/error.zod.d.ts +13 -4
- package/dist/notification/v1/generated/validators/error.zod.js +6 -9
- package/dist/notification/v1/generated/validators/errorStatus.zod.d.ts +77 -0
- package/dist/notification/v1/generated/validators/errorStatus.zod.js +92 -0
- package/dist/notification/v1/generated/validators/fieldViolation.zod.d.ts +68 -0
- package/dist/notification/v1/generated/validators/fieldViolation.zod.js +71 -0
- package/dist/support/v1/generated/models.d.ts +52 -10
- package/dist/support/v1/generated/validators/error.zod.d.ts +13 -4
- package/dist/support/v1/generated/validators/error.zod.js +6 -9
- package/dist/support/v1/generated/validators/errorStatus.zod.d.ts +66 -0
- package/dist/support/v1/generated/validators/errorStatus.zod.js +81 -0
- package/dist/support/v1/generated/validators/fieldViolation.zod.d.ts +57 -0
- package/dist/support/v1/generated/validators/fieldViolation.zod.js +60 -0
- package/dist/swas/v1/generated/models.d.ts +52 -10
- package/dist/swas/v1/generated/validators/error.zod.d.ts +13 -4
- package/dist/swas/v1/generated/validators/error.zod.js +6 -9
- package/dist/swas/v1/generated/validators/errorStatus.zod.d.ts +23 -0
- package/dist/swas/v1/generated/validators/errorStatus.zod.js +38 -0
- package/dist/swas/v1/generated/validators/fieldViolation.zod.d.ts +14 -0
- package/dist/swas/v1/generated/validators/fieldViolation.zod.js +17 -0
- package/dist/type/error/v1/generated/models.d.ts +52 -10
- package/dist/type/error/v1/generated/validators/error.zod.d.ts +13 -4
- package/dist/type/error/v1/generated/validators/error.zod.js +6 -9
- package/dist/type/error/v1/generated/validators/errorStatus.zod.d.ts +24 -0
- package/dist/type/error/v1/generated/validators/errorStatus.zod.js +39 -0
- package/dist/type/error/v1/generated/validators/fieldViolation.zod.d.ts +15 -0
- package/dist/type/error/v1/generated/validators/fieldViolation.zod.js +18 -0
- package/package.json +1 -1
|
@@ -23,22 +23,64 @@
|
|
|
23
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
24
|
* OpenAPI spec version: 1.0.0
|
|
25
25
|
*/
|
|
26
|
+
export interface FieldViolation {
|
|
27
|
+
/** The path to the rejected field in the request body, such as `items[2].price_id`. */
|
|
28
|
+
field: string;
|
|
29
|
+
/** Why the field was rejected, such as `REQUIRED` or `OUT_OF_RANGE`. */
|
|
30
|
+
reason?: string;
|
|
31
|
+
}
|
|
26
32
|
/**
|
|
27
|
-
*
|
|
28
|
-
* and
|
|
33
|
+
* Values that belong to `reason`, one set per reason. Clients use them to fill in
|
|
34
|
+
* localized text and never parse `message` to obtain them. Keys are documented per
|
|
35
|
+
* reason; a key that has appeared once keeps appearing.
|
|
29
36
|
*/
|
|
30
|
-
export type
|
|
31
|
-
[key: string]:
|
|
37
|
+
export type ErrorStatusMetadata = {
|
|
38
|
+
[key: string]: string;
|
|
32
39
|
};
|
|
33
|
-
export interface
|
|
34
|
-
code
|
|
40
|
+
export interface ErrorStatus {
|
|
41
|
+
/** The HTTP status code of the response. */
|
|
42
|
+
code: number;
|
|
43
|
+
/** The canonical name of the status, such as `INVALID_ARGUMENT` or `UNAVAILABLE`. */
|
|
44
|
+
status: string;
|
|
45
|
+
/**
|
|
46
|
+
* A description of the failure for developers. It is always English and is not meant
|
|
47
|
+
* to be shown to end users as is.
|
|
48
|
+
*/
|
|
35
49
|
message: string;
|
|
36
50
|
/**
|
|
37
|
-
*
|
|
38
|
-
* and
|
|
51
|
+
* A stable machine-readable code identifying the failure. Clients branch on this value
|
|
52
|
+
* and render their own text; it does not change once published.
|
|
53
|
+
*/
|
|
54
|
+
reason?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Values that belong to `reason`, one set per reason. Clients use them to fill in
|
|
57
|
+
* localized text and never parse `message` to obtain them. Keys are documented per
|
|
58
|
+
* reason; a key that has appeared once keeps appearing.
|
|
59
|
+
*/
|
|
60
|
+
metadata?: ErrorStatusMetadata;
|
|
61
|
+
/**
|
|
62
|
+
* Request fields rejected by the request's constraints. Present on validation
|
|
63
|
+
* failures; one request may violate several fields.
|
|
39
64
|
*/
|
|
40
|
-
|
|
41
|
-
|
|
65
|
+
field_violations?: FieldViolation[];
|
|
66
|
+
/**
|
|
67
|
+
* How long the client should wait before retrying, as a duration string such as
|
|
68
|
+
* `30s`. Present only when waiting can succeed.
|
|
69
|
+
*/
|
|
70
|
+
retry_delay?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The identifier of the request in the service's logs. Quote it when reporting a
|
|
73
|
+
* failure.
|
|
74
|
+
*/
|
|
75
|
+
request_id?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* A failed request. The envelope follows the Google REST error format: `code` is the HTTP
|
|
79
|
+
* status, `status` is its canonical name, and `reason` is the stable machine-readable code
|
|
80
|
+
* that identifies the failure.
|
|
81
|
+
*/
|
|
82
|
+
export interface Error {
|
|
83
|
+
error: ErrorStatus;
|
|
42
84
|
}
|
|
43
85
|
/**
|
|
44
86
|
* VERIFIED_ONLY requires identity verification to have completed; a submission under review does not qualify
|
|
@@ -25,10 +25,19 @@
|
|
|
25
25
|
*/
|
|
26
26
|
import * as zod from "zod";
|
|
27
27
|
export declare const Error: zod.ZodObject<{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
error: zod.ZodObject<{
|
|
29
|
+
code: zod.ZodInt;
|
|
30
|
+
status: zod.ZodString;
|
|
31
|
+
message: zod.ZodString;
|
|
32
|
+
reason: zod.ZodOptional<zod.ZodString>;
|
|
33
|
+
metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
|
|
34
|
+
field_violations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
35
|
+
field: zod.ZodString;
|
|
36
|
+
reason: zod.ZodOptional<zod.ZodString>;
|
|
37
|
+
}, zod.z.core.$strict>>>;
|
|
38
|
+
retry_delay: zod.ZodOptional<zod.ZodString>;
|
|
39
|
+
request_id: zod.ZodOptional<zod.ZodString>;
|
|
40
|
+
}, zod.z.core.$strict>;
|
|
32
41
|
}, zod.z.core.$strict>;
|
|
33
42
|
export type Error = zod.input<typeof Error>;
|
|
34
43
|
export type ErrorOutput = zod.output<typeof Error>;
|
|
@@ -24,12 +24,9 @@
|
|
|
24
24
|
* OpenAPI spec version: 1.0.0
|
|
25
25
|
*/
|
|
26
26
|
import * as zod from "zod";
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
.describe("What a given `code` carries alongside the message. The keys depend on the code,\nand a client that does not recognise one ignores it."),
|
|
34
|
-
status: zod.int(),
|
|
35
|
-
});
|
|
27
|
+
import { ErrorStatus } from "./errorStatus.zod.js";
|
|
28
|
+
export const Error = zod
|
|
29
|
+
.strictObject({
|
|
30
|
+
error: ErrorStatus,
|
|
31
|
+
})
|
|
32
|
+
.describe("A failed request. The envelope follows the Google REST error format: `code` is the HTTP\nstatus, `status` is its canonical name, and `reason` is the stable machine-readable code\nthat identifies the failure.");
|
|
@@ -0,0 +1,41 @@
|
|
|
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 ErrorStatus: zod.ZodObject<{
|
|
28
|
+
code: zod.ZodInt;
|
|
29
|
+
status: zod.ZodString;
|
|
30
|
+
message: zod.ZodString;
|
|
31
|
+
reason: zod.ZodOptional<zod.ZodString>;
|
|
32
|
+
metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
|
|
33
|
+
field_violations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
34
|
+
field: zod.ZodString;
|
|
35
|
+
reason: zod.ZodOptional<zod.ZodString>;
|
|
36
|
+
}, zod.z.core.$strict>>>;
|
|
37
|
+
retry_delay: zod.ZodOptional<zod.ZodString>;
|
|
38
|
+
request_id: zod.ZodOptional<zod.ZodString>;
|
|
39
|
+
}, zod.z.core.$strict>;
|
|
40
|
+
export type ErrorStatus = zod.input<typeof ErrorStatus>;
|
|
41
|
+
export type ErrorStatusOutput = zod.output<typeof ErrorStatus>;
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
import { FieldViolation } from "./fieldViolation.zod.js";
|
|
28
|
+
export const ErrorStatus = zod.strictObject({
|
|
29
|
+
code: zod.int().describe("The HTTP status code of the response."),
|
|
30
|
+
status: zod
|
|
31
|
+
.string()
|
|
32
|
+
.describe("The canonical name of the status, such as `INVALID_ARGUMENT` or `UNAVAILABLE`."),
|
|
33
|
+
message: zod
|
|
34
|
+
.string()
|
|
35
|
+
.describe("A description of the failure for developers. It is always English and is not meant\nto be shown to end users as is."),
|
|
36
|
+
reason: zod
|
|
37
|
+
.string()
|
|
38
|
+
.optional()
|
|
39
|
+
.describe("A stable machine-readable code identifying the failure. Clients branch on this value\nand render their own text; it does not change once published."),
|
|
40
|
+
metadata: zod
|
|
41
|
+
.record(zod.string(), zod.string())
|
|
42
|
+
.optional()
|
|
43
|
+
.describe("Values that belong to `reason`, one set per reason. Clients use them to fill in\nlocalized text and never parse `message` to obtain them. Keys are documented per\nreason; a key that has appeared once keeps appearing."),
|
|
44
|
+
field_violations: zod
|
|
45
|
+
.array(FieldViolation)
|
|
46
|
+
.optional()
|
|
47
|
+
.describe("Request fields rejected by the request's constraints. Present on validation\nfailures; one request may violate several fields."),
|
|
48
|
+
retry_delay: zod
|
|
49
|
+
.string()
|
|
50
|
+
.optional()
|
|
51
|
+
.describe("How long the client should wait before retrying, as a duration string such as\n`30s`. Present only when waiting can succeed."),
|
|
52
|
+
request_id: zod
|
|
53
|
+
.string()
|
|
54
|
+
.optional()
|
|
55
|
+
.describe("The identifier of the request in the service's logs. Quote it when reporting a\nfailure."),
|
|
56
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
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 FieldViolation: zod.ZodObject<{
|
|
28
|
+
field: zod.ZodString;
|
|
29
|
+
reason: zod.ZodOptional<zod.ZodString>;
|
|
30
|
+
}, zod.z.core.$strict>;
|
|
31
|
+
export type FieldViolation = zod.input<typeof FieldViolation>;
|
|
32
|
+
export type FieldViolationOutput = zod.output<typeof FieldViolation>;
|
|
@@ -0,0 +1,35 @@
|
|
|
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 FieldViolation = zod.strictObject({
|
|
28
|
+
field: zod
|
|
29
|
+
.string()
|
|
30
|
+
.describe("The path to the rejected field in the request body, such as `items[2].price_id`."),
|
|
31
|
+
reason: zod
|
|
32
|
+
.string()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe("Why the field was rejected, such as `REQUIRED` or `OUT_OF_RANGE`."),
|
|
35
|
+
});
|
|
@@ -22,22 +22,64 @@
|
|
|
22
22
|
* parts, then complete the upload and send its attachment id in a message.
|
|
23
23
|
* OpenAPI spec version: 2.0.0
|
|
24
24
|
*/
|
|
25
|
+
export interface FieldViolation {
|
|
26
|
+
/** The path to the rejected field in the request body, such as `items[2].price_id`. */
|
|
27
|
+
field: string;
|
|
28
|
+
/** Why the field was rejected, such as `REQUIRED` or `OUT_OF_RANGE`. */
|
|
29
|
+
reason?: string;
|
|
30
|
+
}
|
|
25
31
|
/**
|
|
26
|
-
*
|
|
27
|
-
* and
|
|
32
|
+
* Values that belong to `reason`, one set per reason. Clients use them to fill in
|
|
33
|
+
* localized text and never parse `message` to obtain them. Keys are documented per
|
|
34
|
+
* reason; a key that has appeared once keeps appearing.
|
|
28
35
|
*/
|
|
29
|
-
export type
|
|
30
|
-
[key: string]:
|
|
36
|
+
export type ErrorStatusMetadata = {
|
|
37
|
+
[key: string]: string;
|
|
31
38
|
};
|
|
32
|
-
export interface
|
|
33
|
-
code
|
|
39
|
+
export interface ErrorStatus {
|
|
40
|
+
/** The HTTP status code of the response. */
|
|
41
|
+
code: number;
|
|
42
|
+
/** The canonical name of the status, such as `INVALID_ARGUMENT` or `UNAVAILABLE`. */
|
|
43
|
+
status: string;
|
|
44
|
+
/**
|
|
45
|
+
* A description of the failure for developers. It is always English and is not meant
|
|
46
|
+
* to be shown to end users as is.
|
|
47
|
+
*/
|
|
34
48
|
message: string;
|
|
35
49
|
/**
|
|
36
|
-
*
|
|
37
|
-
* and
|
|
50
|
+
* A stable machine-readable code identifying the failure. Clients branch on this value
|
|
51
|
+
* and render their own text; it does not change once published.
|
|
52
|
+
*/
|
|
53
|
+
reason?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Values that belong to `reason`, one set per reason. Clients use them to fill in
|
|
56
|
+
* localized text and never parse `message` to obtain them. Keys are documented per
|
|
57
|
+
* reason; a key that has appeared once keeps appearing.
|
|
58
|
+
*/
|
|
59
|
+
metadata?: ErrorStatusMetadata;
|
|
60
|
+
/**
|
|
61
|
+
* Request fields rejected by the request's constraints. Present on validation
|
|
62
|
+
* failures; one request may violate several fields.
|
|
38
63
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
64
|
+
field_violations?: FieldViolation[];
|
|
65
|
+
/**
|
|
66
|
+
* How long the client should wait before retrying, as a duration string such as
|
|
67
|
+
* `30s`. Present only when waiting can succeed.
|
|
68
|
+
*/
|
|
69
|
+
retry_delay?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The identifier of the request in the service's logs. Quote it when reporting a
|
|
72
|
+
* failure.
|
|
73
|
+
*/
|
|
74
|
+
request_id?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* A failed request. The envelope follows the Google REST error format: `code` is the HTTP
|
|
78
|
+
* status, `status` is its canonical name, and `reason` is the stable machine-readable code
|
|
79
|
+
* that identifies the failure.
|
|
80
|
+
*/
|
|
81
|
+
export interface Error {
|
|
82
|
+
error: ErrorStatus;
|
|
41
83
|
}
|
|
42
84
|
/**
|
|
43
85
|
* Tokens reported by Canopy. Cache hit rate is cachedInputTokens / inputTokens.
|
|
@@ -24,10 +24,19 @@
|
|
|
24
24
|
*/
|
|
25
25
|
import * as zod from "zod";
|
|
26
26
|
export declare const Error: zod.ZodObject<{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
error: zod.ZodObject<{
|
|
28
|
+
code: zod.ZodInt;
|
|
29
|
+
status: zod.ZodString;
|
|
30
|
+
message: zod.ZodString;
|
|
31
|
+
reason: zod.ZodOptional<zod.ZodString>;
|
|
32
|
+
metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
|
|
33
|
+
field_violations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
34
|
+
field: zod.ZodString;
|
|
35
|
+
reason: zod.ZodOptional<zod.ZodString>;
|
|
36
|
+
}, zod.z.core.$strict>>>;
|
|
37
|
+
retry_delay: zod.ZodOptional<zod.ZodString>;
|
|
38
|
+
request_id: zod.ZodOptional<zod.ZodString>;
|
|
39
|
+
}, zod.z.core.$strict>;
|
|
31
40
|
}, zod.z.core.$strict>;
|
|
32
41
|
export type Error = zod.input<typeof Error>;
|
|
33
42
|
export type ErrorOutput = zod.output<typeof Error>;
|
|
@@ -23,12 +23,9 @@
|
|
|
23
23
|
* OpenAPI spec version: 2.0.0
|
|
24
24
|
*/
|
|
25
25
|
import * as zod from "zod";
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
.describe("What a given `code` carries alongside the message. The keys depend on the code,\nand a client that does not recognise one ignores it."),
|
|
33
|
-
status: zod.int(),
|
|
34
|
-
});
|
|
26
|
+
import { ErrorStatus } from "./errorStatus.zod.js";
|
|
27
|
+
export const Error = zod
|
|
28
|
+
.strictObject({
|
|
29
|
+
error: ErrorStatus,
|
|
30
|
+
})
|
|
31
|
+
.describe("A failed request. The envelope follows the Google REST error format: `code` is the HTTP\nstatus, `status` is its canonical name, and `reason` is the stable machine-readable code\nthat identifies the failure.");
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Assistant API
|
|
5
|
+
* Conversations with agents that operate the Leaflow platform, plus their folders, tasks, files and
|
|
6
|
+
* chat-app channels.
|
|
7
|
+
*
|
|
8
|
+
* A conversation is a thread. A person talks to the main thread; the agent in it can start subagents,
|
|
9
|
+
* which are threads too and run on their own: stopping the main thread does not stop them, and each
|
|
10
|
+
* subagent tells its parent when it ends. A thread runs in turns; each turn records the model and
|
|
11
|
+
* reasoning effort it used and its token usage.
|
|
12
|
+
*
|
|
13
|
+
* Models come from the Canopy catalogue. A new thread uses the model it names, the caller's default
|
|
14
|
+
* from /api/v1/settings, or the first catalogue model that can run an agent. Reasoning models take one
|
|
15
|
+
* of three efforts — low, medium or high — which are sent to the model unchanged.
|
|
16
|
+
*
|
|
17
|
+
* Read a thread's state with get-thread and its transcript with list-thread-items. Follow both live
|
|
18
|
+
* over the WebSocket described under /api/v1/realtime/tickets. list-thread-messages outlines the
|
|
19
|
+
* person's messages for navigating a long conversation.
|
|
20
|
+
*
|
|
21
|
+
* Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
|
|
22
|
+
* parts, then complete the upload and send its attachment id in a message.
|
|
23
|
+
* OpenAPI spec version: 2.0.0
|
|
24
|
+
*/
|
|
25
|
+
import * as zod from "zod";
|
|
26
|
+
export declare const ErrorStatus: zod.ZodObject<{
|
|
27
|
+
code: zod.ZodInt;
|
|
28
|
+
status: zod.ZodString;
|
|
29
|
+
message: zod.ZodString;
|
|
30
|
+
reason: zod.ZodOptional<zod.ZodString>;
|
|
31
|
+
metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
|
|
32
|
+
field_violations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
33
|
+
field: zod.ZodString;
|
|
34
|
+
reason: zod.ZodOptional<zod.ZodString>;
|
|
35
|
+
}, zod.z.core.$strict>>>;
|
|
36
|
+
retry_delay: zod.ZodOptional<zod.ZodString>;
|
|
37
|
+
request_id: zod.ZodOptional<zod.ZodString>;
|
|
38
|
+
}, zod.z.core.$strict>;
|
|
39
|
+
export type ErrorStatus = zod.input<typeof ErrorStatus>;
|
|
40
|
+
export type ErrorStatusOutput = zod.output<typeof ErrorStatus>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Assistant API
|
|
5
|
+
* Conversations with agents that operate the Leaflow platform, plus their folders, tasks, files and
|
|
6
|
+
* chat-app channels.
|
|
7
|
+
*
|
|
8
|
+
* A conversation is a thread. A person talks to the main thread; the agent in it can start subagents,
|
|
9
|
+
* which are threads too and run on their own: stopping the main thread does not stop them, and each
|
|
10
|
+
* subagent tells its parent when it ends. A thread runs in turns; each turn records the model and
|
|
11
|
+
* reasoning effort it used and its token usage.
|
|
12
|
+
*
|
|
13
|
+
* Models come from the Canopy catalogue. A new thread uses the model it names, the caller's default
|
|
14
|
+
* from /api/v1/settings, or the first catalogue model that can run an agent. Reasoning models take one
|
|
15
|
+
* of three efforts — low, medium or high — which are sent to the model unchanged.
|
|
16
|
+
*
|
|
17
|
+
* Read a thread's state with get-thread and its transcript with list-thread-items. Follow both live
|
|
18
|
+
* over the WebSocket described under /api/v1/realtime/tickets. list-thread-messages outlines the
|
|
19
|
+
* person's messages for navigating a long conversation.
|
|
20
|
+
*
|
|
21
|
+
* Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
|
|
22
|
+
* parts, then complete the upload and send its attachment id in a message.
|
|
23
|
+
* OpenAPI spec version: 2.0.0
|
|
24
|
+
*/
|
|
25
|
+
import * as zod from "zod";
|
|
26
|
+
import { FieldViolation } from "./fieldViolation.zod.js";
|
|
27
|
+
export const ErrorStatus = zod.strictObject({
|
|
28
|
+
code: zod.int().describe("The HTTP status code of the response."),
|
|
29
|
+
status: zod
|
|
30
|
+
.string()
|
|
31
|
+
.describe("The canonical name of the status, such as `INVALID_ARGUMENT` or `UNAVAILABLE`."),
|
|
32
|
+
message: zod
|
|
33
|
+
.string()
|
|
34
|
+
.describe("A description of the failure for developers. It is always English and is not meant\nto be shown to end users as is."),
|
|
35
|
+
reason: zod
|
|
36
|
+
.string()
|
|
37
|
+
.optional()
|
|
38
|
+
.describe("A stable machine-readable code identifying the failure. Clients branch on this value\nand render their own text; it does not change once published."),
|
|
39
|
+
metadata: zod
|
|
40
|
+
.record(zod.string(), zod.string())
|
|
41
|
+
.optional()
|
|
42
|
+
.describe("Values that belong to `reason`, one set per reason. Clients use them to fill in\nlocalized text and never parse `message` to obtain them. Keys are documented per\nreason; a key that has appeared once keeps appearing."),
|
|
43
|
+
field_violations: zod
|
|
44
|
+
.array(FieldViolation)
|
|
45
|
+
.optional()
|
|
46
|
+
.describe("Request fields rejected by the request's constraints. Present on validation\nfailures; one request may violate several fields."),
|
|
47
|
+
retry_delay: zod
|
|
48
|
+
.string()
|
|
49
|
+
.optional()
|
|
50
|
+
.describe("How long the client should wait before retrying, as a duration string such as\n`30s`. Present only when waiting can succeed."),
|
|
51
|
+
request_id: zod
|
|
52
|
+
.string()
|
|
53
|
+
.optional()
|
|
54
|
+
.describe("The identifier of the request in the service's logs. Quote it when reporting a\nfailure."),
|
|
55
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Assistant API
|
|
5
|
+
* Conversations with agents that operate the Leaflow platform, plus their folders, tasks, files and
|
|
6
|
+
* chat-app channels.
|
|
7
|
+
*
|
|
8
|
+
* A conversation is a thread. A person talks to the main thread; the agent in it can start subagents,
|
|
9
|
+
* which are threads too and run on their own: stopping the main thread does not stop them, and each
|
|
10
|
+
* subagent tells its parent when it ends. A thread runs in turns; each turn records the model and
|
|
11
|
+
* reasoning effort it used and its token usage.
|
|
12
|
+
*
|
|
13
|
+
* Models come from the Canopy catalogue. A new thread uses the model it names, the caller's default
|
|
14
|
+
* from /api/v1/settings, or the first catalogue model that can run an agent. Reasoning models take one
|
|
15
|
+
* of three efforts — low, medium or high — which are sent to the model unchanged.
|
|
16
|
+
*
|
|
17
|
+
* Read a thread's state with get-thread and its transcript with list-thread-items. Follow both live
|
|
18
|
+
* over the WebSocket described under /api/v1/realtime/tickets. list-thread-messages outlines the
|
|
19
|
+
* person's messages for navigating a long conversation.
|
|
20
|
+
*
|
|
21
|
+
* Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
|
|
22
|
+
* parts, then complete the upload and send its attachment id in a message.
|
|
23
|
+
* OpenAPI spec version: 2.0.0
|
|
24
|
+
*/
|
|
25
|
+
import * as zod from "zod";
|
|
26
|
+
export declare const FieldViolation: zod.ZodObject<{
|
|
27
|
+
field: zod.ZodString;
|
|
28
|
+
reason: zod.ZodOptional<zod.ZodString>;
|
|
29
|
+
}, zod.z.core.$strict>;
|
|
30
|
+
export type FieldViolation = zod.input<typeof FieldViolation>;
|
|
31
|
+
export type FieldViolationOutput = zod.output<typeof FieldViolation>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Assistant API
|
|
5
|
+
* Conversations with agents that operate the Leaflow platform, plus their folders, tasks, files and
|
|
6
|
+
* chat-app channels.
|
|
7
|
+
*
|
|
8
|
+
* A conversation is a thread. A person talks to the main thread; the agent in it can start subagents,
|
|
9
|
+
* which are threads too and run on their own: stopping the main thread does not stop them, and each
|
|
10
|
+
* subagent tells its parent when it ends. A thread runs in turns; each turn records the model and
|
|
11
|
+
* reasoning effort it used and its token usage.
|
|
12
|
+
*
|
|
13
|
+
* Models come from the Canopy catalogue. A new thread uses the model it names, the caller's default
|
|
14
|
+
* from /api/v1/settings, or the first catalogue model that can run an agent. Reasoning models take one
|
|
15
|
+
* of three efforts — low, medium or high — which are sent to the model unchanged.
|
|
16
|
+
*
|
|
17
|
+
* Read a thread's state with get-thread and its transcript with list-thread-items. Follow both live
|
|
18
|
+
* over the WebSocket described under /api/v1/realtime/tickets. list-thread-messages outlines the
|
|
19
|
+
* person's messages for navigating a long conversation.
|
|
20
|
+
*
|
|
21
|
+
* Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
|
|
22
|
+
* parts, then complete the upload and send its attachment id in a message.
|
|
23
|
+
* OpenAPI spec version: 2.0.0
|
|
24
|
+
*/
|
|
25
|
+
import * as zod from "zod";
|
|
26
|
+
export const FieldViolation = zod.strictObject({
|
|
27
|
+
field: zod
|
|
28
|
+
.string()
|
|
29
|
+
.describe("The path to the rejected field in the request body, such as `items[2].price_id`."),
|
|
30
|
+
reason: zod
|
|
31
|
+
.string()
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("Why the field was rejected, such as `REQUIRED` or `OUT_OF_RANGE`."),
|
|
34
|
+
});
|
|
@@ -560,22 +560,64 @@ export interface SubscriptionCancellation {
|
|
|
560
560
|
failure_code?: string;
|
|
561
561
|
failure_reason?: string;
|
|
562
562
|
}
|
|
563
|
+
export interface FieldViolation {
|
|
564
|
+
/** The path to the rejected field in the request body, such as `items[2].price_id`. */
|
|
565
|
+
field: string;
|
|
566
|
+
/** Why the field was rejected, such as `REQUIRED` or `OUT_OF_RANGE`. */
|
|
567
|
+
reason?: string;
|
|
568
|
+
}
|
|
563
569
|
/**
|
|
564
|
-
*
|
|
565
|
-
* and
|
|
570
|
+
* Values that belong to `reason`, one set per reason. Clients use them to fill in
|
|
571
|
+
* localized text and never parse `message` to obtain them. Keys are documented per
|
|
572
|
+
* reason; a key that has appeared once keeps appearing.
|
|
566
573
|
*/
|
|
567
|
-
export type
|
|
568
|
-
[key: string]:
|
|
574
|
+
export type ErrorStatusMetadata = {
|
|
575
|
+
[key: string]: string;
|
|
569
576
|
};
|
|
570
|
-
export interface
|
|
571
|
-
code
|
|
577
|
+
export interface ErrorStatus {
|
|
578
|
+
/** The HTTP status code of the response. */
|
|
579
|
+
code: number;
|
|
580
|
+
/** The canonical name of the status, such as `INVALID_ARGUMENT` or `UNAVAILABLE`. */
|
|
581
|
+
status: string;
|
|
582
|
+
/**
|
|
583
|
+
* A description of the failure for developers. It is always English and is not meant
|
|
584
|
+
* to be shown to end users as is.
|
|
585
|
+
*/
|
|
572
586
|
message: string;
|
|
573
587
|
/**
|
|
574
|
-
*
|
|
575
|
-
* and
|
|
588
|
+
* A stable machine-readable code identifying the failure. Clients branch on this value
|
|
589
|
+
* and render their own text; it does not change once published.
|
|
590
|
+
*/
|
|
591
|
+
reason?: string;
|
|
592
|
+
/**
|
|
593
|
+
* Values that belong to `reason`, one set per reason. Clients use them to fill in
|
|
594
|
+
* localized text and never parse `message` to obtain them. Keys are documented per
|
|
595
|
+
* reason; a key that has appeared once keeps appearing.
|
|
576
596
|
*/
|
|
577
|
-
|
|
578
|
-
|
|
597
|
+
metadata?: ErrorStatusMetadata;
|
|
598
|
+
/**
|
|
599
|
+
* Request fields rejected by the request's constraints. Present on validation
|
|
600
|
+
* failures; one request may violate several fields.
|
|
601
|
+
*/
|
|
602
|
+
field_violations?: FieldViolation[];
|
|
603
|
+
/**
|
|
604
|
+
* How long the client should wait before retrying, as a duration string such as
|
|
605
|
+
* `30s`. Present only when waiting can succeed.
|
|
606
|
+
*/
|
|
607
|
+
retry_delay?: string;
|
|
608
|
+
/**
|
|
609
|
+
* The identifier of the request in the service's logs. Quote it when reporting a
|
|
610
|
+
* failure.
|
|
611
|
+
*/
|
|
612
|
+
request_id?: string;
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* A failed request. The envelope follows the Google REST error format: `code` is the HTTP
|
|
616
|
+
* status, `status` is its canonical name, and `reason` is the stable machine-readable code
|
|
617
|
+
* that identifies the failure.
|
|
618
|
+
*/
|
|
619
|
+
export interface Error {
|
|
620
|
+
error: ErrorStatus;
|
|
579
621
|
}
|
|
580
622
|
export interface Product {
|
|
581
623
|
id: ProductID;
|