@workwae/sdk 0.0.0-stage → 0.1.0-alpha.2
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 +233 -2
- package/client.d.ts +36 -0
- package/contract/accounts/models.d.ts +766 -0
- package/contract/accounts/routes.d.ts +1480 -0
- package/contract/ai/models.d.ts +29 -0
- package/contract/ai/routes.d.ts +98 -0
- package/contract/audit-log/models.d.ts +121 -0
- package/contract/audit-log/routes.d.ts +81 -0
- package/contract/calendar/models.d.ts +1012 -0
- package/contract/calendar/routes.d.ts +1843 -0
- package/contract/connect/models.d.ts +284 -0
- package/contract/connect/routes.d.ts +570 -0
- package/contract/contacts/models.d.ts +259 -0
- package/contract/contacts/routes.d.ts +648 -0
- package/contract/email-validation/models.d.ts +119 -0
- package/contract/email-validation/routes.d.ts +106 -0
- package/contract/errors.d.ts +116 -0
- package/contract/events/models.d.ts +2424 -0
- package/contract/events/routes.d.ts +117 -0
- package/contract/exports/models.d.ts +67 -0
- package/contract/exports/routes.d.ts +206 -0
- package/contract/identities/models.d.ts +98 -0
- package/contract/identities/routes.d.ts +318 -0
- package/contract/limits.d.ts +118 -0
- package/contract/mail/models.d.ts +571 -0
- package/contract/mail/routes.d.ts +1189 -0
- package/contract/mcp-keys/models.d.ts +125 -0
- package/contract/mcp-keys/routes.d.ts +151 -0
- package/contract/meetings/models.d.ts +227 -0
- package/contract/meetings/routes.d.ts +405 -0
- package/contract/oauth-apps/models.d.ts +86 -0
- package/contract/oauth-apps/routes.d.ts +195 -0
- package/contract/org-connections/models.d.ts +427 -0
- package/contract/org-connections/routes.d.ts +1107 -0
- package/contract/plans/credit-packs.d.ts +30 -0
- package/contract/plans/models.d.ts +208 -0
- package/contract/primitives.d.ts +85 -0
- package/contract/public.d.ts +32 -0
- package/contract/reasons.d.ts +1222 -0
- package/contract/router.d.ts +12986 -0
- package/contract/scheduling/models.d.ts +405 -0
- package/contract/scheduling/routes.d.ts +756 -0
- package/contract/send/models.d.ts +787 -0
- package/contract/send/routes.d.ts +1488 -0
- package/contract/settings/models.d.ts +163 -0
- package/contract/settings/routes.d.ts +162 -0
- package/contract/suppressions/models.d.ts +224 -0
- package/contract/suppressions/routes.d.ts +365 -0
- package/contract/templates/models.d.ts +155 -0
- package/contract/templates/routes.d.ts +305 -0
- package/contract/threads/models.d.ts +112 -0
- package/contract/threads/routes.d.ts +376 -0
- package/contract/tracking-domain/models.d.ts +41 -0
- package/contract/tracking-domain/routes.d.ts +193 -0
- package/contract/usage/models.d.ts +185 -0
- package/contract/usage/routes.d.ts +109 -0
- package/contract/webhooks/models.d.ts +894 -0
- package/contract/webhooks/routes.d.ts +882 -0
- package/contract/webhooks/signing.d.ts +19 -0
- package/errors.d.ts +15 -0
- package/index.d.ts +6 -0
- package/index.js +1 -0
- package/package.json +44 -4
- package/pagination.d.ts +40 -0
- package/webhooks.d.ts +28 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const Reachability: z.ZodEnum<{
|
|
3
|
+
unknown: "unknown";
|
|
4
|
+
safe: "safe";
|
|
5
|
+
risky: "risky";
|
|
6
|
+
invalid: "invalid";
|
|
7
|
+
}>;
|
|
8
|
+
export type Reachability = z.infer<typeof Reachability>;
|
|
9
|
+
export declare const CreateEmailValidation: z.ZodObject<{
|
|
10
|
+
addresses: z.ZodArray<z.ZodEmail>;
|
|
11
|
+
suppressInvalid: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
refresh: z.ZodDefault<z.ZodBoolean>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type CreateEmailValidation = z.infer<typeof CreateEmailValidation>;
|
|
15
|
+
export declare const EmailValidationResult: z.ZodObject<{
|
|
16
|
+
address: z.ZodString;
|
|
17
|
+
reachability: z.ZodEnum<{
|
|
18
|
+
unknown: "unknown";
|
|
19
|
+
safe: "safe";
|
|
20
|
+
risky: "risky";
|
|
21
|
+
invalid: "invalid";
|
|
22
|
+
}>;
|
|
23
|
+
validSyntax: z.ZodBoolean;
|
|
24
|
+
domainAcceptsMail: z.ZodNullable<z.ZodBoolean>;
|
|
25
|
+
deliverable: z.ZodNullable<z.ZodBoolean>;
|
|
26
|
+
disabled: z.ZodNullable<z.ZodBoolean>;
|
|
27
|
+
fullInbox: z.ZodNullable<z.ZodBoolean>;
|
|
28
|
+
catchAll: z.ZodNullable<z.ZodBoolean>;
|
|
29
|
+
disposable: z.ZodNullable<z.ZodBoolean>;
|
|
30
|
+
roleAccount: z.ZodNullable<z.ZodBoolean>;
|
|
31
|
+
suppressed: z.ZodBoolean;
|
|
32
|
+
cached: z.ZodBoolean;
|
|
33
|
+
checkedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type EmailValidationResult = z.infer<typeof EmailValidationResult>;
|
|
36
|
+
export declare const EmailValidation: z.ZodObject<{
|
|
37
|
+
results: z.ZodArray<z.ZodObject<{
|
|
38
|
+
address: z.ZodString;
|
|
39
|
+
reachability: z.ZodEnum<{
|
|
40
|
+
unknown: "unknown";
|
|
41
|
+
safe: "safe";
|
|
42
|
+
risky: "risky";
|
|
43
|
+
invalid: "invalid";
|
|
44
|
+
}>;
|
|
45
|
+
validSyntax: z.ZodBoolean;
|
|
46
|
+
domainAcceptsMail: z.ZodNullable<z.ZodBoolean>;
|
|
47
|
+
deliverable: z.ZodNullable<z.ZodBoolean>;
|
|
48
|
+
disabled: z.ZodNullable<z.ZodBoolean>;
|
|
49
|
+
fullInbox: z.ZodNullable<z.ZodBoolean>;
|
|
50
|
+
catchAll: z.ZodNullable<z.ZodBoolean>;
|
|
51
|
+
disposable: z.ZodNullable<z.ZodBoolean>;
|
|
52
|
+
roleAccount: z.ZodNullable<z.ZodBoolean>;
|
|
53
|
+
suppressed: z.ZodBoolean;
|
|
54
|
+
cached: z.ZodBoolean;
|
|
55
|
+
checkedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
export type EmailValidation = z.infer<typeof EmailValidation>;
|
|
59
|
+
export declare const EmailValidationRecord: z.ZodObject<{
|
|
60
|
+
address: z.ZodString;
|
|
61
|
+
reachability: z.ZodEnum<{
|
|
62
|
+
unknown: "unknown";
|
|
63
|
+
safe: "safe";
|
|
64
|
+
risky: "risky";
|
|
65
|
+
invalid: "invalid";
|
|
66
|
+
}>;
|
|
67
|
+
validSyntax: z.ZodBoolean;
|
|
68
|
+
domainAcceptsMail: z.ZodNullable<z.ZodBoolean>;
|
|
69
|
+
deliverable: z.ZodNullable<z.ZodBoolean>;
|
|
70
|
+
disabled: z.ZodNullable<z.ZodBoolean>;
|
|
71
|
+
fullInbox: z.ZodNullable<z.ZodBoolean>;
|
|
72
|
+
catchAll: z.ZodNullable<z.ZodBoolean>;
|
|
73
|
+
disposable: z.ZodNullable<z.ZodBoolean>;
|
|
74
|
+
roleAccount: z.ZodNullable<z.ZodBoolean>;
|
|
75
|
+
suppressed: z.ZodBoolean;
|
|
76
|
+
cached: z.ZodBoolean;
|
|
77
|
+
checkedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
78
|
+
id: z.ZodUUID;
|
|
79
|
+
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
export type EmailValidationRecord = z.infer<typeof EmailValidationRecord>;
|
|
82
|
+
export declare const EmailValidationRecordPage: z.ZodObject<{
|
|
83
|
+
items: z.ZodArray<z.ZodObject<{
|
|
84
|
+
address: z.ZodString;
|
|
85
|
+
reachability: z.ZodEnum<{
|
|
86
|
+
unknown: "unknown";
|
|
87
|
+
safe: "safe";
|
|
88
|
+
risky: "risky";
|
|
89
|
+
invalid: "invalid";
|
|
90
|
+
}>;
|
|
91
|
+
validSyntax: z.ZodBoolean;
|
|
92
|
+
domainAcceptsMail: z.ZodNullable<z.ZodBoolean>;
|
|
93
|
+
deliverable: z.ZodNullable<z.ZodBoolean>;
|
|
94
|
+
disabled: z.ZodNullable<z.ZodBoolean>;
|
|
95
|
+
fullInbox: z.ZodNullable<z.ZodBoolean>;
|
|
96
|
+
catchAll: z.ZodNullable<z.ZodBoolean>;
|
|
97
|
+
disposable: z.ZodNullable<z.ZodBoolean>;
|
|
98
|
+
roleAccount: z.ZodNullable<z.ZodBoolean>;
|
|
99
|
+
suppressed: z.ZodBoolean;
|
|
100
|
+
cached: z.ZodBoolean;
|
|
101
|
+
checkedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
102
|
+
id: z.ZodUUID;
|
|
103
|
+
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
export type EmailValidationRecordPage = z.infer<typeof EmailValidationRecordPage>;
|
|
108
|
+
export declare const ListEmailValidationsQuery: z.ZodObject<{
|
|
109
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
110
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
111
|
+
address: z.ZodOptional<z.ZodString>;
|
|
112
|
+
reachability: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
unknown: "unknown";
|
|
114
|
+
safe: "safe";
|
|
115
|
+
risky: "risky";
|
|
116
|
+
invalid: "invalid";
|
|
117
|
+
}>>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
export type ListEmailValidationsQuery = z.infer<typeof ListEmailValidationsQuery>;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export declare const emailValidations: {
|
|
2
|
+
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
3
|
+
addresses: import("zod").ZodArray<import("zod").ZodEmail>;
|
|
4
|
+
suppressInvalid: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
5
|
+
refresh: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
6
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
7
|
+
results: import("zod").ZodArray<import("zod").ZodObject<{
|
|
8
|
+
address: import("zod").ZodString;
|
|
9
|
+
reachability: import("zod").ZodEnum<{
|
|
10
|
+
unknown: "unknown";
|
|
11
|
+
safe: "safe";
|
|
12
|
+
risky: "risky";
|
|
13
|
+
invalid: "invalid";
|
|
14
|
+
}>;
|
|
15
|
+
validSyntax: import("zod").ZodBoolean;
|
|
16
|
+
domainAcceptsMail: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
17
|
+
deliverable: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
18
|
+
disabled: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
19
|
+
fullInbox: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
20
|
+
catchAll: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
21
|
+
disposable: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
22
|
+
roleAccount: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
23
|
+
suppressed: import("zod").ZodBoolean;
|
|
24
|
+
cached: import("zod").ZodBoolean;
|
|
25
|
+
checkedAt: import("zod").ZodPreprocess<import("zod").ZodDate, Date>;
|
|
26
|
+
}, import("zod/v4/core").$strip>>;
|
|
27
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
28
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
29
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
30
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
31
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
32
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
33
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
34
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
35
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
36
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
37
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
38
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
39
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
40
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
41
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
42
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
43
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
44
|
+
}>>, import("../errors.js").DeclaredErrors<{
|
|
45
|
+
readonly email_validation_disabled: "Email validation is unavailable.";
|
|
46
|
+
readonly email_validation_unavailable: "The validation service fails or does not answer in time; no address is suppressed.";
|
|
47
|
+
readonly email_validation_suspended: "The validation service refuses Workwae's requests for now; try again later.";
|
|
48
|
+
readonly plan_limit_validations: "The addresses to check again exceed what the plan allows today (UTC); nothing was checked.";
|
|
49
|
+
readonly plan_required: "The workspace has no plan and is not its owner's Free workspace (the Free plan covers one workspace per owner): choose a plan under Billing.";
|
|
50
|
+
readonly validation_credits_exhausted: "The tenant has fewer email validation credits than the addresses to check again; data.balance and data.needed say how many; nothing was checked.";
|
|
51
|
+
}>>, Record<never, never>>;
|
|
52
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
53
|
+
limit: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
|
|
54
|
+
cursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
|
+
address: import("zod").ZodOptional<import("zod").ZodString>;
|
|
56
|
+
reachability: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
57
|
+
unknown: "unknown";
|
|
58
|
+
safe: "safe";
|
|
59
|
+
risky: "risky";
|
|
60
|
+
invalid: "invalid";
|
|
61
|
+
}>>;
|
|
62
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
63
|
+
items: import("zod").ZodArray<import("zod").ZodObject<{
|
|
64
|
+
address: import("zod").ZodString;
|
|
65
|
+
reachability: import("zod").ZodEnum<{
|
|
66
|
+
unknown: "unknown";
|
|
67
|
+
safe: "safe";
|
|
68
|
+
risky: "risky";
|
|
69
|
+
invalid: "invalid";
|
|
70
|
+
}>;
|
|
71
|
+
validSyntax: import("zod").ZodBoolean;
|
|
72
|
+
domainAcceptsMail: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
73
|
+
deliverable: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
74
|
+
disabled: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
75
|
+
fullInbox: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
76
|
+
catchAll: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
77
|
+
disposable: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
78
|
+
roleAccount: import("zod").ZodNullable<import("zod").ZodBoolean>;
|
|
79
|
+
suppressed: import("zod").ZodBoolean;
|
|
80
|
+
cached: import("zod").ZodBoolean;
|
|
81
|
+
checkedAt: import("zod").ZodPreprocess<import("zod").ZodDate, Date>;
|
|
82
|
+
id: import("zod").ZodUUID;
|
|
83
|
+
createdAt: import("zod").ZodPreprocess<import("zod").ZodDate, Date>;
|
|
84
|
+
}, import("zod/v4/core").$strip>>;
|
|
85
|
+
nextCursor: import("zod").ZodNullable<import("zod").ZodString>;
|
|
86
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
87
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
88
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
89
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
90
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
91
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
92
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
93
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
94
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
95
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
96
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
97
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
98
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
99
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
100
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
101
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
102
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
103
|
+
}>>, import("../errors.js").DeclaredErrors<{
|
|
104
|
+
readonly invalid_cursor: "The cursor is not one this list issued.";
|
|
105
|
+
}>>, Record<never, never>>;
|
|
106
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { type ErrorReason, type ReasonDataSchema, type ReasonStatus, type ReasonTable } from "./reasons.js";
|
|
2
|
+
export type DeclaredError<R extends ErrorReason> = {
|
|
3
|
+
status: ReasonStatus<R>;
|
|
4
|
+
message: string;
|
|
5
|
+
} & (ReasonDataSchema<R> extends undefined ? unknown : {
|
|
6
|
+
data: ReasonDataSchema<R>;
|
|
7
|
+
});
|
|
8
|
+
export type DeclaredErrors<C> = {
|
|
9
|
+
[R in keyof C & ErrorReason]: DeclaredError<R>;
|
|
10
|
+
};
|
|
11
|
+
export declare function errorMap(table: ReasonTable, conditions: Record<string, string | undefined>): Record<string, {
|
|
12
|
+
status: number;
|
|
13
|
+
message: string;
|
|
14
|
+
data?: unknown;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function errors<const C extends {
|
|
17
|
+
[R in ErrorReason]?: string;
|
|
18
|
+
}>(conditions: C): DeclaredErrors<C>;
|
|
19
|
+
export declare const GLOBAL_ERRORS: DeclaredErrors<{
|
|
20
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
21
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
22
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
23
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
24
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
25
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
26
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
27
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
28
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
29
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
30
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
31
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
32
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
33
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
34
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
35
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
36
|
+
}>;
|
|
37
|
+
export declare const base: import("@orpc/contract").ContractBuilder<import("@orpc/contract").Schema<unknown, unknown>, import("@orpc/contract").Schema<unknown, unknown>, import("@orpc/contract").MergedErrorMap<Record<never, never>, DeclaredErrors<{
|
|
38
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
39
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
40
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
41
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
42
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
43
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
44
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
45
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
46
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
47
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
48
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
49
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
50
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
51
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
52
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
53
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
54
|
+
}>>, Record<never, never>>;
|
|
55
|
+
export declare const SESSION_ONLY: DeclaredErrors<{
|
|
56
|
+
readonly session_required: "The caller is not a console session (only console sessions may call this).";
|
|
57
|
+
}>;
|
|
58
|
+
export declare const OWNER_ONLY: DeclaredErrors<{
|
|
59
|
+
readonly session_required: "The caller is not a console session (only console sessions may call this).";
|
|
60
|
+
readonly owner_required: "The caller does not own the organization.";
|
|
61
|
+
}>;
|
|
62
|
+
export declare const PLATFORM_ONLY: DeclaredErrors<{
|
|
63
|
+
readonly session_required: "The caller is not a console session (only console sessions may call this).";
|
|
64
|
+
readonly platform_admin_required: "The caller is not a platform administrator.";
|
|
65
|
+
readonly email_verification_required: "The platform administrator has not verified their email address yet.";
|
|
66
|
+
}>;
|
|
67
|
+
export declare const ACCOUNT_NOT_FOUND: DeclaredErrors<{
|
|
68
|
+
readonly account_not_found: "The account does not exist, or the caller is an account token for another account.";
|
|
69
|
+
}>;
|
|
70
|
+
export declare const MAIL_ACCOUNT: {
|
|
71
|
+
mail_disabled: {
|
|
72
|
+
status: 409;
|
|
73
|
+
message: string;
|
|
74
|
+
};
|
|
75
|
+
account_not_found: {
|
|
76
|
+
status: 404;
|
|
77
|
+
message: string;
|
|
78
|
+
};
|
|
79
|
+
plan_module_unavailable: {
|
|
80
|
+
status: 403;
|
|
81
|
+
message: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export declare function accountState(account?: string): DeclaredErrors<{
|
|
85
|
+
readonly account_paused: `${string} is paused.`;
|
|
86
|
+
readonly account_disabled: `${string} is disabled.`;
|
|
87
|
+
readonly account_reauth_required: `${string} must be reconnected: its stored grant or login no longer works.`;
|
|
88
|
+
readonly account_misconfigured: `${string}'s stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable).`;
|
|
89
|
+
}>;
|
|
90
|
+
export declare const PROVIDER_FAILURES: DeclaredErrors<{
|
|
91
|
+
readonly provider_throttled: "The provider asked us to slow down (with Retry-After when it named a wait).";
|
|
92
|
+
readonly provider_unavailable: "The provider could not be reached (with Retry-After when it named a wait).";
|
|
93
|
+
}>;
|
|
94
|
+
export declare function bodyStorage(field: string): DeclaredErrors<{
|
|
95
|
+
readonly storage_unavailable: `${string} is cache or full and no object store is configured.`;
|
|
96
|
+
readonly plan_limit_storage: `${string} is cache or full and the tenant's plan does not include body storage.`;
|
|
97
|
+
}>;
|
|
98
|
+
export declare function planModule(module: string): DeclaredErrors<{
|
|
99
|
+
readonly plan_module_unavailable: `The tenant's plan does not include ${string}.`;
|
|
100
|
+
}>;
|
|
101
|
+
export declare const PLAN_REQUIRED_CONDITION = "The workspace has no plan and is not its owner's Free workspace (the Free plan covers one workspace per owner): choose a plan under Billing.";
|
|
102
|
+
export declare const PLAN_REQUIRED: DeclaredErrors<{
|
|
103
|
+
readonly plan_required: "The workspace has no plan and is not its owner's Free workspace (the Free plan covers one workspace per owner): choose a plan under Billing.";
|
|
104
|
+
}>;
|
|
105
|
+
export declare function spendCapCondition(what: string): string;
|
|
106
|
+
export declare const PLAN_LIMIT_ACCOUNTS: DeclaredErrors<{
|
|
107
|
+
readonly plan_limit_accounts: "The tenant already has as many accounts as its plan allows.";
|
|
108
|
+
readonly plan_required: "The workspace has no plan and is not its owner's Free workspace (the Free plan covers one workspace per owner): choose a plan under Billing.";
|
|
109
|
+
readonly spend_cap_reached: string;
|
|
110
|
+
}>;
|
|
111
|
+
export declare const BILLING_PAST_DUE: DeclaredErrors<{
|
|
112
|
+
readonly billing_past_due: "The tenant's payment is past due beyond the grace period (sends already queued or scheduled still go out).";
|
|
113
|
+
}>;
|
|
114
|
+
export declare const INVALID_CURSOR: DeclaredErrors<{
|
|
115
|
+
readonly invalid_cursor: "The cursor is not one this list issued.";
|
|
116
|
+
}>;
|