@withloops.ai/contracts 0.1.0 → 0.2.0
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/api.d.ts +148 -0
- package/dist/api.js +95 -0
- package/dist/events.d.ts +102 -0
- package/dist/events.js +55 -0
- package/dist/ids.d.ts +26 -0
- package/dist/ids.js +21 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/manifest.d.ts +550 -0
- package/dist/manifest.js +215 -0
- package/dist/registry.d.ts +368 -0
- package/dist/registry.js +86 -0
- package/dist/scopes.d.ts +46 -0
- package/dist/scopes.js +40 -0
- package/package.json +12 -4
- package/src/registry.ts +2 -0
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* App manifest v1 (`loops.manifest.json`). Everything is a Loops App: one manifest, two optional halves —
|
|
4
|
+
* `sync` (declarative CRM connector, run by the one Loops sync engine) and `ui` (LoopKit). Skill §2 #1–#3, §3.
|
|
5
|
+
* Only ever ADD optional fields to v1; a breaking change is manifest v2 and v1 keeps working.
|
|
6
|
+
*/
|
|
7
|
+
/** Loops record kinds a connector maps into. */
|
|
8
|
+
export declare const RecordKind: z.ZodEnum<{
|
|
9
|
+
CONTACT: "CONTACT";
|
|
10
|
+
COMPANY: "COMPANY";
|
|
11
|
+
LEAD: "LEAD";
|
|
12
|
+
DEAL: "DEAL";
|
|
13
|
+
}>;
|
|
14
|
+
export type RecordKind = z.infer<typeof RecordKind>;
|
|
15
|
+
export declare const SyncAuth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
16
|
+
type: z.ZodLiteral<"oauth2">;
|
|
17
|
+
authorizeUrl: z.ZodURL;
|
|
18
|
+
tokenUrl: z.ZodURL;
|
|
19
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
20
|
+
refresh: z.ZodDefault<z.ZodBoolean>;
|
|
21
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
22
|
+
type: z.ZodLiteral<"apiKey">;
|
|
23
|
+
header: z.ZodDefault<z.ZodString>;
|
|
24
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>], "type">;
|
|
26
|
+
export type SyncAuth = z.infer<typeof SyncAuth>;
|
|
27
|
+
/** Who owns a field. The customer's CRM owns its fields (locked in Loops); Loops owns its own. Owner wins, never last-write-wins. */
|
|
28
|
+
export declare const FieldOwner: z.ZodEnum<{
|
|
29
|
+
theirs: "theirs";
|
|
30
|
+
ours: "ours";
|
|
31
|
+
}>;
|
|
32
|
+
export declare const SyncField: z.ZodObject<{
|
|
33
|
+
theirs: z.ZodString;
|
|
34
|
+
ours: z.ZodString;
|
|
35
|
+
owner: z.ZodEnum<{
|
|
36
|
+
theirs: "theirs";
|
|
37
|
+
ours: "ours";
|
|
38
|
+
}>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
export declare const SyncObject: z.ZodObject<{
|
|
41
|
+
theirs: z.ZodString;
|
|
42
|
+
ours: z.ZodEnum<{
|
|
43
|
+
CONTACT: "CONTACT";
|
|
44
|
+
COMPANY: "COMPANY";
|
|
45
|
+
LEAD: "LEAD";
|
|
46
|
+
DEAL: "DEAL";
|
|
47
|
+
}>;
|
|
48
|
+
list: z.ZodObject<{
|
|
49
|
+
path: z.ZodString;
|
|
50
|
+
itemsPath: z.ZodDefault<z.ZodString>;
|
|
51
|
+
cursorParam: z.ZodOptional<z.ZodString>;
|
|
52
|
+
nextCursorPath: z.ZodOptional<z.ZodString>;
|
|
53
|
+
updatedSinceParam: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
56
|
+
theirs: z.ZodString;
|
|
57
|
+
ours: z.ZodString;
|
|
58
|
+
owner: z.ZodEnum<{
|
|
59
|
+
theirs: "theirs";
|
|
60
|
+
ours: "ours";
|
|
61
|
+
}>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
match: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
export declare const SyncLink: z.ZodObject<{
|
|
66
|
+
from: z.ZodEnum<{
|
|
67
|
+
CONTACT: "CONTACT";
|
|
68
|
+
COMPANY: "COMPANY";
|
|
69
|
+
LEAD: "LEAD";
|
|
70
|
+
DEAL: "DEAL";
|
|
71
|
+
}>;
|
|
72
|
+
to: z.ZodEnum<{
|
|
73
|
+
CONTACT: "CONTACT";
|
|
74
|
+
COMPANY: "COMPANY";
|
|
75
|
+
LEAD: "LEAD";
|
|
76
|
+
DEAL: "DEAL";
|
|
77
|
+
}>;
|
|
78
|
+
theirs: z.ZodString;
|
|
79
|
+
role: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
export declare const ChangeFeed: z.ZodObject<{
|
|
82
|
+
webhook: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
signature: z.ZodObject<{
|
|
84
|
+
scheme: z.ZodEnum<{
|
|
85
|
+
"hmac-sha256": "hmac-sha256";
|
|
86
|
+
"hmac-sha1": "hmac-sha1";
|
|
87
|
+
}>;
|
|
88
|
+
header: z.ZodString;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
}, z.core.$strip>>;
|
|
91
|
+
polling: z.ZodOptional<z.ZodObject<{
|
|
92
|
+
everyMinutes: z.ZodNumber;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
/** What Loops writes back to the CRM timeline (Loops owns these). */
|
|
96
|
+
export declare const WriteBackKind: z.ZodEnum<{
|
|
97
|
+
call: "call";
|
|
98
|
+
transcript: "transcript";
|
|
99
|
+
meeting: "meeting";
|
|
100
|
+
note: "note";
|
|
101
|
+
action: "action";
|
|
102
|
+
campaignReply: "campaignReply";
|
|
103
|
+
}>;
|
|
104
|
+
export declare const WriteBack: z.ZodRecord<z.ZodEnum<{
|
|
105
|
+
call: "call";
|
|
106
|
+
transcript: "transcript";
|
|
107
|
+
meeting: "meeting";
|
|
108
|
+
note: "note";
|
|
109
|
+
action: "action";
|
|
110
|
+
campaignReply: "campaignReply";
|
|
111
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
112
|
+
method: z.ZodEnum<{
|
|
113
|
+
POST: "POST";
|
|
114
|
+
PUT: "PUT";
|
|
115
|
+
PATCH: "PATCH";
|
|
116
|
+
}>;
|
|
117
|
+
path: z.ZodString;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
export declare const SyncLimits: z.ZodObject<{
|
|
120
|
+
requestsPerSecond: z.ZodNumber;
|
|
121
|
+
burst: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
retryAfterHeader: z.ZodDefault<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export declare const SyncManifest: z.ZodObject<{
|
|
125
|
+
baseUrl: z.ZodURL;
|
|
126
|
+
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
127
|
+
type: z.ZodLiteral<"oauth2">;
|
|
128
|
+
authorizeUrl: z.ZodURL;
|
|
129
|
+
tokenUrl: z.ZodURL;
|
|
130
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
131
|
+
refresh: z.ZodDefault<z.ZodBoolean>;
|
|
132
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
133
|
+
type: z.ZodLiteral<"apiKey">;
|
|
134
|
+
header: z.ZodDefault<z.ZodString>;
|
|
135
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, z.core.$strip>], "type">;
|
|
137
|
+
objects: z.ZodArray<z.ZodObject<{
|
|
138
|
+
theirs: z.ZodString;
|
|
139
|
+
ours: z.ZodEnum<{
|
|
140
|
+
CONTACT: "CONTACT";
|
|
141
|
+
COMPANY: "COMPANY";
|
|
142
|
+
LEAD: "LEAD";
|
|
143
|
+
DEAL: "DEAL";
|
|
144
|
+
}>;
|
|
145
|
+
list: z.ZodObject<{
|
|
146
|
+
path: z.ZodString;
|
|
147
|
+
itemsPath: z.ZodDefault<z.ZodString>;
|
|
148
|
+
cursorParam: z.ZodOptional<z.ZodString>;
|
|
149
|
+
nextCursorPath: z.ZodOptional<z.ZodString>;
|
|
150
|
+
updatedSinceParam: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
153
|
+
theirs: z.ZodString;
|
|
154
|
+
ours: z.ZodString;
|
|
155
|
+
owner: z.ZodEnum<{
|
|
156
|
+
theirs: "theirs";
|
|
157
|
+
ours: "ours";
|
|
158
|
+
}>;
|
|
159
|
+
}, z.core.$strip>>;
|
|
160
|
+
match: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
161
|
+
}, z.core.$strip>>;
|
|
162
|
+
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
163
|
+
from: z.ZodEnum<{
|
|
164
|
+
CONTACT: "CONTACT";
|
|
165
|
+
COMPANY: "COMPANY";
|
|
166
|
+
LEAD: "LEAD";
|
|
167
|
+
DEAL: "DEAL";
|
|
168
|
+
}>;
|
|
169
|
+
to: z.ZodEnum<{
|
|
170
|
+
CONTACT: "CONTACT";
|
|
171
|
+
COMPANY: "COMPANY";
|
|
172
|
+
LEAD: "LEAD";
|
|
173
|
+
DEAL: "DEAL";
|
|
174
|
+
}>;
|
|
175
|
+
theirs: z.ZodString;
|
|
176
|
+
role: z.ZodOptional<z.ZodString>;
|
|
177
|
+
}, z.core.$strip>>>;
|
|
178
|
+
changeFeed: z.ZodObject<{
|
|
179
|
+
webhook: z.ZodOptional<z.ZodObject<{
|
|
180
|
+
signature: z.ZodObject<{
|
|
181
|
+
scheme: z.ZodEnum<{
|
|
182
|
+
"hmac-sha256": "hmac-sha256";
|
|
183
|
+
"hmac-sha1": "hmac-sha1";
|
|
184
|
+
}>;
|
|
185
|
+
header: z.ZodString;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
}, z.core.$strip>>;
|
|
188
|
+
polling: z.ZodOptional<z.ZodObject<{
|
|
189
|
+
everyMinutes: z.ZodNumber;
|
|
190
|
+
}, z.core.$strip>>;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
writeBack: z.ZodDefault<z.ZodRecord<z.ZodEnum<{
|
|
193
|
+
call: "call";
|
|
194
|
+
transcript: "transcript";
|
|
195
|
+
meeting: "meeting";
|
|
196
|
+
note: "note";
|
|
197
|
+
action: "action";
|
|
198
|
+
campaignReply: "campaignReply";
|
|
199
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
200
|
+
method: z.ZodEnum<{
|
|
201
|
+
POST: "POST";
|
|
202
|
+
PUT: "PUT";
|
|
203
|
+
PATCH: "PATCH";
|
|
204
|
+
}>;
|
|
205
|
+
path: z.ZodString;
|
|
206
|
+
}, z.core.$strip>>>;
|
|
207
|
+
limits: z.ZodObject<{
|
|
208
|
+
requestsPerSecond: z.ZodNumber;
|
|
209
|
+
burst: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
retryAfterHeader: z.ZodDefault<z.ZodString>;
|
|
211
|
+
}, z.core.$strip>;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
export type SyncManifest = z.infer<typeof SyncManifest>;
|
|
214
|
+
export declare const SLOTS: readonly ["recordPanel", "recordTab", "recordAction", "bulkAction", "composerButton", "messageAction", "loopCard", "linkCard", "crmPanelItem", "settingsPage", "dashboardTile", "simiTool"];
|
|
215
|
+
export declare const Slot: z.ZodEnum<{
|
|
216
|
+
recordPanel: "recordPanel";
|
|
217
|
+
recordTab: "recordTab";
|
|
218
|
+
recordAction: "recordAction";
|
|
219
|
+
bulkAction: "bulkAction";
|
|
220
|
+
composerButton: "composerButton";
|
|
221
|
+
messageAction: "messageAction";
|
|
222
|
+
loopCard: "loopCard";
|
|
223
|
+
linkCard: "linkCard";
|
|
224
|
+
crmPanelItem: "crmPanelItem";
|
|
225
|
+
settingsPage: "settingsPage";
|
|
226
|
+
dashboardTile: "dashboardTile";
|
|
227
|
+
simiTool: "simiTool";
|
|
228
|
+
}>;
|
|
229
|
+
export type Slot = z.infer<typeof Slot>;
|
|
230
|
+
/** Things an app may do in Loops (`LoopKit.do`), and the scope each needs. */
|
|
231
|
+
export declare const DOES: {
|
|
232
|
+
readonly 'record.note': "notes:write";
|
|
233
|
+
readonly 'loop.post': "loops:write";
|
|
234
|
+
readonly 'action.add': "actions:write";
|
|
235
|
+
};
|
|
236
|
+
export declare const Does: z.ZodEnum<{
|
|
237
|
+
"record.note": "record.note";
|
|
238
|
+
"loop.post": "loop.post";
|
|
239
|
+
"action.add": "action.add";
|
|
240
|
+
}>;
|
|
241
|
+
/** A field the app reads: `contact.email`, `deal.value`, `loop.title`. */
|
|
242
|
+
export declare const FieldPath: z.ZodString;
|
|
243
|
+
/** Where a sent value comes from: a granted field, the link, or the app's settings. */
|
|
244
|
+
export declare const ValueSource: z.ZodString;
|
|
245
|
+
/** A declared response field type: string, number, boolean, date, or enum:a|b|c. */
|
|
246
|
+
export declare const ReturnType: z.ZodString;
|
|
247
|
+
export declare const Endpoint: z.ZodObject<{
|
|
248
|
+
method: z.ZodEnum<{
|
|
249
|
+
POST: "POST";
|
|
250
|
+
PUT: "PUT";
|
|
251
|
+
PATCH: "PATCH";
|
|
252
|
+
GET: "GET";
|
|
253
|
+
DELETE: "DELETE";
|
|
254
|
+
}>;
|
|
255
|
+
url: z.ZodURL;
|
|
256
|
+
sends: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
257
|
+
returns: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
export type Endpoint = z.infer<typeof Endpoint>;
|
|
260
|
+
export declare const Setting: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
261
|
+
type: z.ZodLiteral<"secret">;
|
|
262
|
+
label: z.ZodString;
|
|
263
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
264
|
+
type: z.ZodLiteral<"text">;
|
|
265
|
+
label: z.ZodString;
|
|
266
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
267
|
+
type: z.ZodLiteral<"choice">;
|
|
268
|
+
label: z.ZodString;
|
|
269
|
+
options: z.ZodArray<z.ZodString>;
|
|
270
|
+
}, z.core.$strip>], "type">;
|
|
271
|
+
export declare const UiManifest: z.ZodObject<{
|
|
272
|
+
apiVersion: z.ZodLiteral<1>;
|
|
273
|
+
slots: z.ZodArray<z.ZodEnum<{
|
|
274
|
+
recordPanel: "recordPanel";
|
|
275
|
+
recordTab: "recordTab";
|
|
276
|
+
recordAction: "recordAction";
|
|
277
|
+
bulkAction: "bulkAction";
|
|
278
|
+
composerButton: "composerButton";
|
|
279
|
+
messageAction: "messageAction";
|
|
280
|
+
loopCard: "loopCard";
|
|
281
|
+
linkCard: "linkCard";
|
|
282
|
+
crmPanelItem: "crmPanelItem";
|
|
283
|
+
settingsPage: "settingsPage";
|
|
284
|
+
dashboardTile: "dashboardTile";
|
|
285
|
+
simiTool: "simiTool";
|
|
286
|
+
}>>;
|
|
287
|
+
uses: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
288
|
+
does: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
289
|
+
"record.note": "record.note";
|
|
290
|
+
"loop.post": "loop.post";
|
|
291
|
+
"action.add": "action.add";
|
|
292
|
+
}>>>;
|
|
293
|
+
hears: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
294
|
+
"contact.created": "contact.created";
|
|
295
|
+
"contact.updated": "contact.updated";
|
|
296
|
+
"contact.deleted": "contact.deleted";
|
|
297
|
+
"company.created": "company.created";
|
|
298
|
+
"company.updated": "company.updated";
|
|
299
|
+
"company.deleted": "company.deleted";
|
|
300
|
+
"lead.created": "lead.created";
|
|
301
|
+
"lead.updated": "lead.updated";
|
|
302
|
+
"lead.deleted": "lead.deleted";
|
|
303
|
+
"deal.created": "deal.created";
|
|
304
|
+
"deal.updated": "deal.updated";
|
|
305
|
+
"deal.deleted": "deal.deleted";
|
|
306
|
+
"loop.message": "loop.message";
|
|
307
|
+
"loop.call.ended": "loop.call.ended";
|
|
308
|
+
"meeting.ended": "meeting.ended";
|
|
309
|
+
"app.installed": "app.installed";
|
|
310
|
+
"app.uninstalled": "app.uninstalled";
|
|
311
|
+
}>>>;
|
|
312
|
+
links: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
313
|
+
settings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
314
|
+
type: z.ZodLiteral<"secret">;
|
|
315
|
+
label: z.ZodString;
|
|
316
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
317
|
+
type: z.ZodLiteral<"text">;
|
|
318
|
+
label: z.ZodString;
|
|
319
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
320
|
+
type: z.ZodLiteral<"choice">;
|
|
321
|
+
label: z.ZodString;
|
|
322
|
+
options: z.ZodArray<z.ZodString>;
|
|
323
|
+
}, z.core.$strip>], "type">>>;
|
|
324
|
+
endpoints: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
325
|
+
method: z.ZodEnum<{
|
|
326
|
+
POST: "POST";
|
|
327
|
+
PUT: "PUT";
|
|
328
|
+
PATCH: "PATCH";
|
|
329
|
+
GET: "GET";
|
|
330
|
+
DELETE: "DELETE";
|
|
331
|
+
}>;
|
|
332
|
+
url: z.ZodURL;
|
|
333
|
+
sends: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
334
|
+
returns: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
335
|
+
}, z.core.$strip>>>;
|
|
336
|
+
entry: z.ZodDefault<z.ZodString>;
|
|
337
|
+
}, z.core.$strip>;
|
|
338
|
+
export type UiManifest = z.infer<typeof UiManifest>;
|
|
339
|
+
export declare const Developer: z.ZodObject<{
|
|
340
|
+
name: z.ZodString;
|
|
341
|
+
email: z.ZodEmail;
|
|
342
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
343
|
+
}, z.core.$strip>;
|
|
344
|
+
export declare const Visibility: z.ZodEnum<{
|
|
345
|
+
private: "private";
|
|
346
|
+
public: "public";
|
|
347
|
+
}>;
|
|
348
|
+
export type Visibility = z.infer<typeof Visibility>;
|
|
349
|
+
export declare const ManifestV1: z.ZodObject<{
|
|
350
|
+
manifestVersion: z.ZodLiteral<1>;
|
|
351
|
+
id: z.ZodString;
|
|
352
|
+
name: z.ZodString;
|
|
353
|
+
version: z.ZodString;
|
|
354
|
+
summary: z.ZodString;
|
|
355
|
+
description: z.ZodOptional<z.ZodString>;
|
|
356
|
+
developer: z.ZodObject<{
|
|
357
|
+
name: z.ZodString;
|
|
358
|
+
email: z.ZodEmail;
|
|
359
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
360
|
+
}, z.core.$strip>;
|
|
361
|
+
visibility: z.ZodDefault<z.ZodEnum<{
|
|
362
|
+
private: "private";
|
|
363
|
+
public: "public";
|
|
364
|
+
}>>;
|
|
365
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
366
|
+
"contacts:read": "contacts:read";
|
|
367
|
+
"contacts:write": "contacts:write";
|
|
368
|
+
"companies:read": "companies:read";
|
|
369
|
+
"companies:write": "companies:write";
|
|
370
|
+
"leads:read": "leads:read";
|
|
371
|
+
"leads:write": "leads:write";
|
|
372
|
+
"deals:read": "deals:read";
|
|
373
|
+
"deals:write": "deals:write";
|
|
374
|
+
"notes:write": "notes:write";
|
|
375
|
+
"actions:write": "actions:write";
|
|
376
|
+
"loops:read": "loops:read";
|
|
377
|
+
"loops:write": "loops:write";
|
|
378
|
+
"calls:read": "calls:read";
|
|
379
|
+
"meetings:read": "meetings:read";
|
|
380
|
+
"webhooks:manage": "webhooks:manage";
|
|
381
|
+
}>>>;
|
|
382
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
383
|
+
baseUrl: z.ZodURL;
|
|
384
|
+
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
385
|
+
type: z.ZodLiteral<"oauth2">;
|
|
386
|
+
authorizeUrl: z.ZodURL;
|
|
387
|
+
tokenUrl: z.ZodURL;
|
|
388
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
389
|
+
refresh: z.ZodDefault<z.ZodBoolean>;
|
|
390
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
391
|
+
type: z.ZodLiteral<"apiKey">;
|
|
392
|
+
header: z.ZodDefault<z.ZodString>;
|
|
393
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
394
|
+
}, z.core.$strip>], "type">;
|
|
395
|
+
objects: z.ZodArray<z.ZodObject<{
|
|
396
|
+
theirs: z.ZodString;
|
|
397
|
+
ours: z.ZodEnum<{
|
|
398
|
+
CONTACT: "CONTACT";
|
|
399
|
+
COMPANY: "COMPANY";
|
|
400
|
+
LEAD: "LEAD";
|
|
401
|
+
DEAL: "DEAL";
|
|
402
|
+
}>;
|
|
403
|
+
list: z.ZodObject<{
|
|
404
|
+
path: z.ZodString;
|
|
405
|
+
itemsPath: z.ZodDefault<z.ZodString>;
|
|
406
|
+
cursorParam: z.ZodOptional<z.ZodString>;
|
|
407
|
+
nextCursorPath: z.ZodOptional<z.ZodString>;
|
|
408
|
+
updatedSinceParam: z.ZodOptional<z.ZodString>;
|
|
409
|
+
}, z.core.$strip>;
|
|
410
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
411
|
+
theirs: z.ZodString;
|
|
412
|
+
ours: z.ZodString;
|
|
413
|
+
owner: z.ZodEnum<{
|
|
414
|
+
theirs: "theirs";
|
|
415
|
+
ours: "ours";
|
|
416
|
+
}>;
|
|
417
|
+
}, z.core.$strip>>;
|
|
418
|
+
match: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
419
|
+
}, z.core.$strip>>;
|
|
420
|
+
links: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
421
|
+
from: z.ZodEnum<{
|
|
422
|
+
CONTACT: "CONTACT";
|
|
423
|
+
COMPANY: "COMPANY";
|
|
424
|
+
LEAD: "LEAD";
|
|
425
|
+
DEAL: "DEAL";
|
|
426
|
+
}>;
|
|
427
|
+
to: z.ZodEnum<{
|
|
428
|
+
CONTACT: "CONTACT";
|
|
429
|
+
COMPANY: "COMPANY";
|
|
430
|
+
LEAD: "LEAD";
|
|
431
|
+
DEAL: "DEAL";
|
|
432
|
+
}>;
|
|
433
|
+
theirs: z.ZodString;
|
|
434
|
+
role: z.ZodOptional<z.ZodString>;
|
|
435
|
+
}, z.core.$strip>>>;
|
|
436
|
+
changeFeed: z.ZodObject<{
|
|
437
|
+
webhook: z.ZodOptional<z.ZodObject<{
|
|
438
|
+
signature: z.ZodObject<{
|
|
439
|
+
scheme: z.ZodEnum<{
|
|
440
|
+
"hmac-sha256": "hmac-sha256";
|
|
441
|
+
"hmac-sha1": "hmac-sha1";
|
|
442
|
+
}>;
|
|
443
|
+
header: z.ZodString;
|
|
444
|
+
}, z.core.$strip>;
|
|
445
|
+
}, z.core.$strip>>;
|
|
446
|
+
polling: z.ZodOptional<z.ZodObject<{
|
|
447
|
+
everyMinutes: z.ZodNumber;
|
|
448
|
+
}, z.core.$strip>>;
|
|
449
|
+
}, z.core.$strip>;
|
|
450
|
+
writeBack: z.ZodDefault<z.ZodRecord<z.ZodEnum<{
|
|
451
|
+
call: "call";
|
|
452
|
+
transcript: "transcript";
|
|
453
|
+
meeting: "meeting";
|
|
454
|
+
note: "note";
|
|
455
|
+
action: "action";
|
|
456
|
+
campaignReply: "campaignReply";
|
|
457
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
458
|
+
method: z.ZodEnum<{
|
|
459
|
+
POST: "POST";
|
|
460
|
+
PUT: "PUT";
|
|
461
|
+
PATCH: "PATCH";
|
|
462
|
+
}>;
|
|
463
|
+
path: z.ZodString;
|
|
464
|
+
}, z.core.$strip>>>;
|
|
465
|
+
limits: z.ZodObject<{
|
|
466
|
+
requestsPerSecond: z.ZodNumber;
|
|
467
|
+
burst: z.ZodOptional<z.ZodNumber>;
|
|
468
|
+
retryAfterHeader: z.ZodDefault<z.ZodString>;
|
|
469
|
+
}, z.core.$strip>;
|
|
470
|
+
}, z.core.$strip>>;
|
|
471
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
472
|
+
apiVersion: z.ZodLiteral<1>;
|
|
473
|
+
slots: z.ZodArray<z.ZodEnum<{
|
|
474
|
+
recordPanel: "recordPanel";
|
|
475
|
+
recordTab: "recordTab";
|
|
476
|
+
recordAction: "recordAction";
|
|
477
|
+
bulkAction: "bulkAction";
|
|
478
|
+
composerButton: "composerButton";
|
|
479
|
+
messageAction: "messageAction";
|
|
480
|
+
loopCard: "loopCard";
|
|
481
|
+
linkCard: "linkCard";
|
|
482
|
+
crmPanelItem: "crmPanelItem";
|
|
483
|
+
settingsPage: "settingsPage";
|
|
484
|
+
dashboardTile: "dashboardTile";
|
|
485
|
+
simiTool: "simiTool";
|
|
486
|
+
}>>;
|
|
487
|
+
uses: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
488
|
+
does: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
489
|
+
"record.note": "record.note";
|
|
490
|
+
"loop.post": "loop.post";
|
|
491
|
+
"action.add": "action.add";
|
|
492
|
+
}>>>;
|
|
493
|
+
hears: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
494
|
+
"contact.created": "contact.created";
|
|
495
|
+
"contact.updated": "contact.updated";
|
|
496
|
+
"contact.deleted": "contact.deleted";
|
|
497
|
+
"company.created": "company.created";
|
|
498
|
+
"company.updated": "company.updated";
|
|
499
|
+
"company.deleted": "company.deleted";
|
|
500
|
+
"lead.created": "lead.created";
|
|
501
|
+
"lead.updated": "lead.updated";
|
|
502
|
+
"lead.deleted": "lead.deleted";
|
|
503
|
+
"deal.created": "deal.created";
|
|
504
|
+
"deal.updated": "deal.updated";
|
|
505
|
+
"deal.deleted": "deal.deleted";
|
|
506
|
+
"loop.message": "loop.message";
|
|
507
|
+
"loop.call.ended": "loop.call.ended";
|
|
508
|
+
"meeting.ended": "meeting.ended";
|
|
509
|
+
"app.installed": "app.installed";
|
|
510
|
+
"app.uninstalled": "app.uninstalled";
|
|
511
|
+
}>>>;
|
|
512
|
+
links: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
513
|
+
settings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
514
|
+
type: z.ZodLiteral<"secret">;
|
|
515
|
+
label: z.ZodString;
|
|
516
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
517
|
+
type: z.ZodLiteral<"text">;
|
|
518
|
+
label: z.ZodString;
|
|
519
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
520
|
+
type: z.ZodLiteral<"choice">;
|
|
521
|
+
label: z.ZodString;
|
|
522
|
+
options: z.ZodArray<z.ZodString>;
|
|
523
|
+
}, z.core.$strip>], "type">>>;
|
|
524
|
+
endpoints: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
525
|
+
method: z.ZodEnum<{
|
|
526
|
+
POST: "POST";
|
|
527
|
+
PUT: "PUT";
|
|
528
|
+
PATCH: "PATCH";
|
|
529
|
+
GET: "GET";
|
|
530
|
+
DELETE: "DELETE";
|
|
531
|
+
}>;
|
|
532
|
+
url: z.ZodURL;
|
|
533
|
+
sends: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
534
|
+
returns: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
535
|
+
}, z.core.$strip>>>;
|
|
536
|
+
entry: z.ZodDefault<z.ZodString>;
|
|
537
|
+
}, z.core.$strip>>;
|
|
538
|
+
}, z.core.$strip>;
|
|
539
|
+
export type ManifestV1 = z.infer<typeof ManifestV1>;
|
|
540
|
+
export type ManifestV1Input = z.input<typeof ManifestV1>;
|
|
541
|
+
/** The manifest file name in an app folder. */
|
|
542
|
+
export declare const MANIFEST_FILE = "loops.manifest.json";
|
|
543
|
+
/** Parse a manifest; errors come back as plain lines ("ui.uses.0: Reading contact.email needs the contacts:read scope"). */
|
|
544
|
+
export declare function parseManifest(input: unknown): {
|
|
545
|
+
ok: true;
|
|
546
|
+
manifest: ManifestV1;
|
|
547
|
+
} | {
|
|
548
|
+
ok: false;
|
|
549
|
+
errors: string[];
|
|
550
|
+
};
|