@workwae/sdk 0.1.0-alpha.1 → 0.1.0-alpha.3
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 +7 -7
- package/client.d.ts +1 -1
- package/contract/accounts/models.d.ts +85 -45
- package/contract/accounts/routes.d.ts +191 -29
- package/contract/ai/models.d.ts +0 -1
- package/contract/ai/routes.d.ts +9 -0
- package/contract/audit-log/models.d.ts +22 -5
- package/contract/audit-log/routes.d.ts +11 -1
- package/contract/calendar/models.d.ts +249 -74
- package/contract/calendar/routes.d.ts +574 -30
- package/contract/connect/models.d.ts +30 -16
- package/contract/connect/routes.d.ts +51 -7
- package/contract/connect-domain/models.d.ts +41 -0
- package/contract/connect-domain/routes.d.ts +197 -0
- package/contract/contacts/models.d.ts +0 -10
- package/contract/contacts/routes.d.ts +14 -0
- package/contract/custom-domain.d.ts +12 -0
- package/contract/email-validation/models.d.ts +119 -0
- package/contract/email-validation/routes.d.ts +106 -0
- package/contract/errors.d.ts +28 -20
- package/contract/events/models.d.ts +139 -79
- package/contract/events/routes.d.ts +54 -44
- package/contract/exports/routes.d.ts +10 -0
- package/contract/identities/models.d.ts +7 -9
- package/contract/identities/routes.d.ts +79 -10
- package/contract/limits.d.ts +27 -73
- package/contract/mail/models.d.ts +230 -50
- package/contract/mail/routes.d.ts +649 -59
- package/contract/mcp-keys/models.d.ts +125 -0
- package/contract/mcp-keys/routes.d.ts +151 -0
- package/contract/meetings/models.d.ts +39 -33
- package/contract/meetings/routes.d.ts +121 -23
- package/contract/oauth-apps/models.d.ts +6 -6
- package/contract/oauth-apps/routes.d.ts +34 -4
- package/contract/org-connections/models.d.ts +93 -39
- package/contract/org-connections/routes.d.ts +352 -43
- package/contract/plans/credit-packs.d.ts +30 -0
- package/contract/plans/models.d.ts +208 -0
- package/contract/primitives.d.ts +7 -62
- package/contract/public.d.ts +7 -0
- package/contract/reasons.d.ts +559 -21
- package/contract/router.d.ts +6447 -2719
- package/contract/scheduling/models.d.ts +405 -0
- package/contract/scheduling/routes.d.ts +756 -0
- package/contract/send/models.d.ts +140 -45
- package/contract/send/routes.d.ts +310 -31
- package/contract/settings/models.d.ts +73 -13
- package/contract/settings/routes.d.ts +56 -4
- package/contract/suppressions/models.d.ts +21 -28
- package/contract/suppressions/routes.d.ts +62 -14
- package/contract/templates/models.d.ts +0 -14
- package/contract/templates/routes.d.ts +30 -6
- package/contract/threads/models.d.ts +0 -5
- package/contract/threads/routes.d.ts +40 -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 +98 -126
- package/contract/usage/routes.d.ts +48 -20
- package/contract/webhooks/models.d.ts +45 -30
- package/contract/webhooks/routes.d.ts +52 -9
- package/contract/webhooks/signing.d.ts +0 -16
- package/index.js +1 -4334
- package/package.json +6 -7
- package/index.js.map +0 -59
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export interface PackTerms {
|
|
3
|
+
credits: number;
|
|
4
|
+
amount: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const PlanCreditPack: z.ZodObject<{
|
|
7
|
+
credits: z.ZodNumber;
|
|
8
|
+
amount: z.ZodNumber;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type PlanCreditPack = z.infer<typeof PlanCreditPack>;
|
|
11
|
+
export declare const PlanCreditPacks: z.ZodArray<z.ZodObject<{
|
|
12
|
+
credits: z.ZodNumber;
|
|
13
|
+
amount: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
export interface CreditPackProblem {
|
|
16
|
+
index: number;
|
|
17
|
+
field: "credits" | "amount";
|
|
18
|
+
message: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function creditPackProblems(packs: readonly PackTerms[]): CreditPackProblem[];
|
|
21
|
+
export interface PackLine<P extends PackTerms> {
|
|
22
|
+
pack: P;
|
|
23
|
+
count: number;
|
|
24
|
+
}
|
|
25
|
+
export interface PackPurchase<P extends PackTerms> {
|
|
26
|
+
lines: PackLine<P>[];
|
|
27
|
+
credits: number;
|
|
28
|
+
amount: number;
|
|
29
|
+
}
|
|
30
|
+
export declare function cheapestPurchase<P extends PackTerms>(ladder: readonly P[], credits: number): PackPurchase<P> | null;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const PlanModules: z.ZodObject<{
|
|
3
|
+
mail: z.ZodBoolean;
|
|
4
|
+
calendar: z.ZodBoolean;
|
|
5
|
+
contacts: z.ZodBoolean;
|
|
6
|
+
tracking: z.ZodBoolean;
|
|
7
|
+
ai: z.ZodBoolean;
|
|
8
|
+
meetings: z.ZodBoolean;
|
|
9
|
+
sharedMailboxes: z.ZodBoolean;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type PlanModules = z.infer<typeof PlanModules>;
|
|
12
|
+
export type PlanModule = keyof PlanModules;
|
|
13
|
+
export declare const PLAN_MODULE_IDS: readonly [
|
|
14
|
+
"mail",
|
|
15
|
+
"calendar",
|
|
16
|
+
"contacts",
|
|
17
|
+
"tracking",
|
|
18
|
+
"ai",
|
|
19
|
+
"meetings",
|
|
20
|
+
"sharedMailboxes"
|
|
21
|
+
];
|
|
22
|
+
export declare const BILLING_COMPONENTS: readonly [
|
|
23
|
+
"mail",
|
|
24
|
+
"calendarContacts",
|
|
25
|
+
"ai",
|
|
26
|
+
"sharedMailboxes",
|
|
27
|
+
"meetings"
|
|
28
|
+
];
|
|
29
|
+
export type BillingComponent = (typeof BILLING_COMPONENTS)[number];
|
|
30
|
+
export declare const COMPONENT_MODULES: {
|
|
31
|
+
readonly mail: readonly [
|
|
32
|
+
"mail"
|
|
33
|
+
];
|
|
34
|
+
readonly calendarContacts: readonly [
|
|
35
|
+
"calendar",
|
|
36
|
+
"contacts"
|
|
37
|
+
];
|
|
38
|
+
readonly ai: readonly [
|
|
39
|
+
"ai"
|
|
40
|
+
];
|
|
41
|
+
readonly sharedMailboxes: readonly [
|
|
42
|
+
"sharedMailboxes"
|
|
43
|
+
];
|
|
44
|
+
readonly meetings: readonly [
|
|
45
|
+
"meetings"
|
|
46
|
+
];
|
|
47
|
+
};
|
|
48
|
+
export declare const MODULE_TOGGLES: readonly [
|
|
49
|
+
"mail",
|
|
50
|
+
"calendarContacts",
|
|
51
|
+
"ai",
|
|
52
|
+
"sharedMailboxes",
|
|
53
|
+
"meetings",
|
|
54
|
+
"tracking"
|
|
55
|
+
];
|
|
56
|
+
export type ModuleToggle = (typeof MODULE_TOGGLES)[number];
|
|
57
|
+
export declare const PLAN_MODULE_NAMES: Record<ModuleToggle | PlanModule, string>;
|
|
58
|
+
export declare const TOGGLE_MODULES: {
|
|
59
|
+
readonly tracking: readonly [
|
|
60
|
+
"tracking"
|
|
61
|
+
];
|
|
62
|
+
readonly mail: readonly [
|
|
63
|
+
"mail"
|
|
64
|
+
];
|
|
65
|
+
readonly calendarContacts: readonly [
|
|
66
|
+
"calendar",
|
|
67
|
+
"contacts"
|
|
68
|
+
];
|
|
69
|
+
readonly ai: readonly [
|
|
70
|
+
"ai"
|
|
71
|
+
];
|
|
72
|
+
readonly sharedMailboxes: readonly [
|
|
73
|
+
"sharedMailboxes"
|
|
74
|
+
];
|
|
75
|
+
readonly meetings: readonly [
|
|
76
|
+
"meetings"
|
|
77
|
+
];
|
|
78
|
+
};
|
|
79
|
+
export declare const ACCOUNT_COUNTS: readonly [
|
|
80
|
+
"mailAccounts",
|
|
81
|
+
"calendarContactsAccounts",
|
|
82
|
+
"meetingAccounts"
|
|
83
|
+
];
|
|
84
|
+
export type AccountCount = (typeof ACCOUNT_COUNTS)[number];
|
|
85
|
+
export declare const COMPONENT_COUNT: {
|
|
86
|
+
readonly mail: "mailAccounts";
|
|
87
|
+
readonly calendarContacts: "calendarContactsAccounts";
|
|
88
|
+
readonly ai: "mailAccounts";
|
|
89
|
+
readonly sharedMailboxes: "mailAccounts";
|
|
90
|
+
readonly meetings: "meetingAccounts";
|
|
91
|
+
};
|
|
92
|
+
export declare function componentsOf(modules: PlanModules): BillingComponent[];
|
|
93
|
+
export declare const METERS: readonly [
|
|
94
|
+
"mailAccounts",
|
|
95
|
+
"calendarContactsAccounts",
|
|
96
|
+
"meetingAccounts",
|
|
97
|
+
"sends",
|
|
98
|
+
"aiClassifications",
|
|
99
|
+
"aiDrafts",
|
|
100
|
+
"storage"
|
|
101
|
+
];
|
|
102
|
+
export declare const Meter: z.ZodEnum<{
|
|
103
|
+
mailAccounts: "mailAccounts";
|
|
104
|
+
calendarContactsAccounts: "calendarContactsAccounts";
|
|
105
|
+
meetingAccounts: "meetingAccounts";
|
|
106
|
+
sends: "sends";
|
|
107
|
+
aiClassifications: "aiClassifications";
|
|
108
|
+
aiDrafts: "aiDrafts";
|
|
109
|
+
storage: "storage";
|
|
110
|
+
}>;
|
|
111
|
+
export type Meter = z.infer<typeof Meter>;
|
|
112
|
+
export declare const PlanIncluded: z.ZodObject<{
|
|
113
|
+
mailAccounts: z.ZodNullable<z.ZodNumber>;
|
|
114
|
+
calendarContactsAccounts: z.ZodNullable<z.ZodNumber>;
|
|
115
|
+
meetingAccounts: z.ZodNullable<z.ZodNumber>;
|
|
116
|
+
sendsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
117
|
+
aiClassificationsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
118
|
+
aiDraftsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
119
|
+
storageBytes: z.ZodNullable<z.ZodNumber>;
|
|
120
|
+
validationCredits: z.ZodNullable<z.ZodNumber>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export type PlanIncluded = z.infer<typeof PlanIncluded>;
|
|
123
|
+
export declare const PlanPricing: z.ZodObject<{
|
|
124
|
+
currency: z.ZodString;
|
|
125
|
+
baseMonthly: z.ZodNumber;
|
|
126
|
+
baseAnnual: z.ZodNullable<z.ZodNumber>;
|
|
127
|
+
components: z.ZodObject<{
|
|
128
|
+
mail: z.ZodNumber;
|
|
129
|
+
calendarContacts: z.ZodNumber;
|
|
130
|
+
ai: z.ZodNumber;
|
|
131
|
+
sharedMailboxes: z.ZodNumber;
|
|
132
|
+
meetings: z.ZodNumber;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
sendsPer1k: z.ZodNumber;
|
|
135
|
+
aiClassificationsPer1k: z.ZodNumber;
|
|
136
|
+
aiDraftsPer1k: z.ZodNumber;
|
|
137
|
+
storagePerGbMonth: z.ZodNumber;
|
|
138
|
+
creditPacks: z.ZodArray<z.ZodObject<{
|
|
139
|
+
credits: z.ZodNumber;
|
|
140
|
+
amount: z.ZodNumber;
|
|
141
|
+
}, z.core.$strip>>;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export type PlanPricing = z.infer<typeof PlanPricing>;
|
|
144
|
+
export declare const MIN_AUDIT_LOG_RETENTION_DAYS = 1;
|
|
145
|
+
export declare const MAX_AUDIT_LOG_RETENTION_DAYS = 3650;
|
|
146
|
+
export declare const PlanFeatures: z.ZodObject<{
|
|
147
|
+
sso: z.ZodBoolean;
|
|
148
|
+
scim: z.ZodBoolean;
|
|
149
|
+
auditLogRetentionDays: z.ZodNullable<z.ZodNumber>;
|
|
150
|
+
sla: z.ZodBoolean;
|
|
151
|
+
customDpa: z.ZodBoolean;
|
|
152
|
+
prioritySupport: z.ZodBoolean;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
export type PlanFeatures = z.infer<typeof PlanFeatures>;
|
|
155
|
+
export declare const GATED_PLAN_FEATURES: readonly [
|
|
156
|
+
"sso",
|
|
157
|
+
"scim"
|
|
158
|
+
];
|
|
159
|
+
export type GatedPlanFeature = (typeof GATED_PLAN_FEATURES)[number];
|
|
160
|
+
export declare const PlanLimits: z.ZodObject<{
|
|
161
|
+
maxAccounts: z.ZodNullable<z.ZodNumber>;
|
|
162
|
+
sendsPerDay: z.ZodNullable<z.ZodNumber>;
|
|
163
|
+
emailValidationsPerDay: z.ZodNullable<z.ZodNumber>;
|
|
164
|
+
apiCallsPerMinute: z.ZodNullable<z.ZodNumber>;
|
|
165
|
+
apiCallsPerMinutePerKey: z.ZodNullable<z.ZodNumber>;
|
|
166
|
+
webhookEndpoints: z.ZodNullable<z.ZodNumber>;
|
|
167
|
+
bodyStorageAllowed: z.ZodBoolean;
|
|
168
|
+
storageBytes: z.ZodNullable<z.ZodNumber>;
|
|
169
|
+
included: z.ZodObject<{
|
|
170
|
+
mailAccounts: z.ZodNullable<z.ZodNumber>;
|
|
171
|
+
calendarContactsAccounts: z.ZodNullable<z.ZodNumber>;
|
|
172
|
+
meetingAccounts: z.ZodNullable<z.ZodNumber>;
|
|
173
|
+
sendsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
174
|
+
aiClassificationsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
175
|
+
aiDraftsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
176
|
+
storageBytes: z.ZodNullable<z.ZodNumber>;
|
|
177
|
+
validationCredits: z.ZodNullable<z.ZodNumber>;
|
|
178
|
+
}, z.core.$strip>;
|
|
179
|
+
pricing: z.ZodNullable<z.ZodObject<{
|
|
180
|
+
currency: z.ZodString;
|
|
181
|
+
baseMonthly: z.ZodNumber;
|
|
182
|
+
baseAnnual: z.ZodNullable<z.ZodNumber>;
|
|
183
|
+
components: z.ZodObject<{
|
|
184
|
+
mail: z.ZodNumber;
|
|
185
|
+
calendarContacts: z.ZodNumber;
|
|
186
|
+
ai: z.ZodNumber;
|
|
187
|
+
sharedMailboxes: z.ZodNumber;
|
|
188
|
+
meetings: z.ZodNumber;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
sendsPer1k: z.ZodNumber;
|
|
191
|
+
aiClassificationsPer1k: z.ZodNumber;
|
|
192
|
+
aiDraftsPer1k: z.ZodNumber;
|
|
193
|
+
storagePerGbMonth: z.ZodNumber;
|
|
194
|
+
creditPacks: z.ZodArray<z.ZodObject<{
|
|
195
|
+
credits: z.ZodNumber;
|
|
196
|
+
amount: z.ZodNumber;
|
|
197
|
+
}, z.core.$strip>>;
|
|
198
|
+
}, z.core.$strip>>;
|
|
199
|
+
features: z.ZodObject<{
|
|
200
|
+
sso: z.ZodBoolean;
|
|
201
|
+
scim: z.ZodBoolean;
|
|
202
|
+
auditLogRetentionDays: z.ZodNullable<z.ZodNumber>;
|
|
203
|
+
sla: z.ZodBoolean;
|
|
204
|
+
customDpa: z.ZodBoolean;
|
|
205
|
+
prioritySupport: z.ZodBoolean;
|
|
206
|
+
}, z.core.$strip>;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
export type PlanLimits = z.infer<typeof PlanLimits>;
|
package/contract/primitives.d.ts
CHANGED
|
@@ -1,131 +1,76 @@
|
|
|
1
1
|
import type { OpenAPI } from "@orpc/contract";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
/** Every schema registered as an OpenAPI component, by its name. The API's document generator
|
|
4
|
-
* emits each under components/schemas and refers to it with $ref wherever it appears. */
|
|
5
3
|
export declare const openApiComponents: Map<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
6
|
-
/** Registers `schema` as the OpenAPI component `name`, which is its TypeScript name too. */
|
|
7
4
|
export declare function named<T extends z.ZodType>(name: string, schema: T): T;
|
|
8
|
-
/** A uuid: every id workwae issues. */
|
|
9
5
|
export declare const Id: z.ZodUUID;
|
|
10
|
-
/** An opaque non-uuid id: one a provider issues (thread, attachment, directory user). */
|
|
11
6
|
export declare const ProviderId: z.ZodString;
|
|
12
|
-
/** An event's sequence id, as decimal digits: the webhook-id header and the dedupe key. */
|
|
13
7
|
export declare const EventId: z.ZodString;
|
|
14
|
-
/** Opaque pagination cursor. */
|
|
15
8
|
export declare const Cursor: z.ZodString;
|
|
16
9
|
export declare const Email: z.ZodEmail;
|
|
17
|
-
/** Every date-time a response carries. */
|
|
18
10
|
export declare const Timestamp: z.ZodPreprocess<z.ZodDate, Date>;
|
|
19
|
-
/** A date-time a query string or a request body carries: a Date, or ISO 8601 text. */
|
|
20
11
|
export declare const QueryTimestamp: z.ZodPreprocess<z.ZodDate, string | Date>;
|
|
21
|
-
/** A calendar date without a time, YYYY-MM-DD. */
|
|
22
12
|
export declare const DateOnly: z.ZodISODate;
|
|
23
|
-
/** Non-empty text, trimmed, of at most `max` characters. */
|
|
24
13
|
export declare function trimmed(max: number): z.ZodString;
|
|
25
|
-
/** See MAX_NAME_LENGTH. */
|
|
26
14
|
export declare const Name: z.ZodString;
|
|
27
15
|
export declare const ExternalRef: z.ZodString;
|
|
28
|
-
/** An address with its display name, as a message, an event or a contact carries it. */
|
|
29
16
|
export declare const Address: z.ZodObject<{
|
|
30
17
|
name: z.ZodNullable<z.ZodString>;
|
|
31
18
|
address: z.ZodString;
|
|
32
19
|
}, z.core.$strip>;
|
|
33
20
|
export type Address = z.infer<typeof Address>;
|
|
34
|
-
/** An address a request names; the name is optional. */
|
|
35
21
|
export declare const AddressInput: z.ZodObject<{
|
|
36
22
|
name: z.ZodOptional<z.ZodString>;
|
|
37
23
|
address: z.ZodEmail;
|
|
38
24
|
}, z.core.$strip>;
|
|
39
25
|
export type AddressInput = z.infer<typeof AddressInput>;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
26
|
+
export declare const QueryBoolean: z.ZodPipe<z.ZodUnion<readonly [
|
|
27
|
+
z.ZodBoolean,
|
|
28
|
+
z.ZodEnum<{
|
|
29
|
+
true: "true";
|
|
30
|
+
false: "false";
|
|
31
|
+
}>
|
|
32
|
+
]>, z.ZodTransform<boolean, boolean | "true" | "false">>;
|
|
46
33
|
export interface Page<T> {
|
|
47
34
|
items: T[];
|
|
48
|
-
/** Pass back as `cursor` for the next page; null on the last one. */
|
|
49
35
|
nextCursor: string | null;
|
|
50
36
|
}
|
|
51
|
-
/** The fields of a page of `item`, for a page that adds envelope fields of its own (SearchPage). */
|
|
52
37
|
export declare const pageFields: <T extends z.ZodType>(item: T) => {
|
|
53
38
|
items: z.ZodArray<T>;
|
|
54
39
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
55
40
|
};
|
|
56
|
-
/** The page of a named entity `X`, registered as the component `XPage`. */
|
|
57
41
|
export declare const Page: <T extends z.ZodType>(item: T) => z.ZodObject<{
|
|
58
42
|
items: z.ZodArray<T>;
|
|
59
43
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
60
44
|
}, z.core.$strip>;
|
|
61
|
-
/**
|
|
62
|
-
* The one cursor loop every paged reader runs (the SDK's pages and change feed, the board's
|
|
63
|
-
* listings): pages from `cursor` on, each fetched with the cursor `next` read off the page
|
|
64
|
-
* before, until `next` answers undefined.
|
|
65
|
-
*/
|
|
66
45
|
export declare function followCursor<P>(fetch: (cursor: string | undefined) => PromiseLike<P>, cursor: string | undefined, next: (page: P) => string | undefined): AsyncGenerator<P, void, undefined>;
|
|
67
|
-
/** The fields of a list of `item`, for a list that adds envelope fields of its own. */
|
|
68
46
|
export declare const listFields: <T extends z.ZodType>(item: T) => {
|
|
69
47
|
items: z.ZodArray<T>;
|
|
70
48
|
};
|
|
71
|
-
/** A small bounded list of a named entity `X`, registered as the component `XList`. */
|
|
72
49
|
export declare const List: <T extends z.ZodType>(item: T) => z.ZodObject<{
|
|
73
50
|
items: z.ZodArray<T>;
|
|
74
51
|
}, z.core.$strip>;
|
|
75
|
-
/**
|
|
76
|
-
* The API error reason a refinement's issue answers with instead of invalid_input, carried in the
|
|
77
|
-
* zod issue's `params.reason`. The gate answers a validation failure whose issues all carry the
|
|
78
|
-
* same reason with that reason.
|
|
79
|
-
*/
|
|
80
52
|
export declare function issueReason(issue: unknown): string | null;
|
|
81
|
-
/** A day in milliseconds: what a range's span in days is checked against (withDateRange). */
|
|
82
53
|
export declare const DAY_MS = 86400000;
|
|
83
|
-
/**
|
|
84
|
-
* `schema` refined so its `to` field comes after its `from` field (on or after it when
|
|
85
|
-
* `inclusive`, as date-only ranges are), spanning at most `maxSpanMs`. Either end left out is not
|
|
86
|
-
* checked. A violation answers invalid_range (issueReason), so services need not check again.
|
|
87
|
-
* Apply it last: zod refuses to extend a refined object.
|
|
88
|
-
*/
|
|
89
54
|
export declare function withDateRange<T extends z.ZodObject, K extends keyof z.output<T> & string>(schema: T, range: {
|
|
90
55
|
from: K;
|
|
91
56
|
to: K;
|
|
92
57
|
maxSpanMs?: number;
|
|
93
58
|
inclusive?: boolean;
|
|
94
59
|
}): T;
|
|
95
|
-
/** A page size of at most `max`, `fallback` when omitted. */
|
|
96
60
|
export declare function pageLimit(max: number, fallback: number): z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
97
|
-
/** A page size; listings that allow more or fewer say so with their own pageLimit. */
|
|
98
61
|
export declare const Limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
99
|
-
/** The paging fields of a listing that takes the default page size. */
|
|
100
62
|
export declare const Paged: {
|
|
101
63
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
102
64
|
cursor: z.ZodOptional<z.ZodString>;
|
|
103
65
|
};
|
|
104
|
-
/** The account a route is scoped to: /v1/accounts/{accountId}/... */
|
|
105
66
|
export declare const AccountIdInput: z.ZodObject<{
|
|
106
67
|
accountId: z.ZodUUID;
|
|
107
68
|
}, z.core.$strip>;
|
|
108
69
|
export type AccountIdInput = z.infer<typeof AccountIdInput>;
|
|
109
|
-
/**
|
|
110
|
-
* A download the API streams: the handler answers the bytes as a ReadableStream, with their type,
|
|
111
|
-
* name and size in the response headers, and a client receives them as a File (which is what the
|
|
112
|
-
* SDK's response validation then sees, so it passes too). For /v1 only: the RPC protocol carries
|
|
113
|
-
* a file as multipart, so a download the board reads (a contact photo) stays a z.file().
|
|
114
|
-
*/
|
|
115
70
|
export declare const StreamedFile: z.ZodPipe<z.ZodCustom<ReadableStream<Uint8Array<ArrayBufferLike>>, ReadableStream<Uint8Array<ArrayBufferLike>>>, z.ZodTransform<File, ReadableStream<Uint8Array<ArrayBufferLike>>>>;
|
|
116
|
-
/** Whether a procedure's output is a file, its bytes the response body, rather than JSON. */
|
|
117
71
|
export declare function isFileOutput(schema: unknown): boolean;
|
|
118
72
|
type Operation = OpenAPI.OperationObject;
|
|
119
|
-
/**
|
|
120
|
-
* A route's `spec` for an operation that takes no bearer: the token in its path is the credential
|
|
121
|
-
* (the hosted connect page's routes).
|
|
122
|
-
*/
|
|
123
73
|
export declare const publicOperation: (operation: Operation) => Operation;
|
|
124
|
-
/**
|
|
125
|
-
* A route's `spec` for a file output, which the generator documents as any media type and nothing
|
|
126
|
-
* more: names the media type (a wildcard where the type is the file's own), the
|
|
127
|
-
* Content-Disposition the handler sets, and any further headers.
|
|
128
|
-
*/
|
|
129
74
|
export declare function fileResponse(file: {
|
|
130
75
|
mediaType: string;
|
|
131
76
|
description: string;
|
package/contract/public.d.ts
CHANGED
|
@@ -3,24 +3,31 @@ export * from "./ai/models.js";
|
|
|
3
3
|
export * from "./audit-log/models.js";
|
|
4
4
|
export * from "./calendar/models.js";
|
|
5
5
|
export * from "./connect/models.js";
|
|
6
|
+
export * from "./connect-domain/models.js";
|
|
6
7
|
export * from "./contacts/models.js";
|
|
8
|
+
export * from "./email-validation/models.js";
|
|
7
9
|
export * from "./errors.js";
|
|
8
10
|
export * from "./events/models.js";
|
|
9
11
|
export * from "./exports/models.js";
|
|
10
12
|
export * from "./identities/models.js";
|
|
11
13
|
export * from "./limits.js";
|
|
12
14
|
export * from "./mail/models.js";
|
|
15
|
+
export * from "./mcp-keys/models.js";
|
|
13
16
|
export * from "./meetings/models.js";
|
|
14
17
|
export * from "./oauth-apps/models.js";
|
|
15
18
|
export * from "./org-connections/models.js";
|
|
19
|
+
export * from "./plans/credit-packs.js";
|
|
20
|
+
export * from "./plans/models.js";
|
|
16
21
|
export * from "./primitives.js";
|
|
17
22
|
export * from "./reasons.js";
|
|
18
23
|
export * from "./router.js";
|
|
24
|
+
export * from "./scheduling/models.js";
|
|
19
25
|
export * from "./send/models.js";
|
|
20
26
|
export * from "./settings/models.js";
|
|
21
27
|
export * from "./suppressions/models.js";
|
|
22
28
|
export * from "./templates/models.js";
|
|
23
29
|
export * from "./threads/models.js";
|
|
30
|
+
export * from "./tracking-domain/models.js";
|
|
24
31
|
export * from "./usage/models.js";
|
|
25
32
|
export * from "./webhooks/models.js";
|
|
26
33
|
export * from "./webhooks/signing.js";
|