@diagonal-hq/workflows 0.3.0 → 0.4.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/README.md +47 -9
- package/dist/chunks/{chunk-RTCHH3JG.js → chunk-EU2ME5WR.js} +98 -1
- package/dist/chunks/chunk-QLQ4NOFV.js +433 -0
- package/dist/data.d.ts +7 -1
- package/dist/generated/capabilities.d.ts +70 -1
- package/dist/generated/profiles/test.d.ts +190 -0
- package/dist/index.js +45 -389
- package/dist/notifications.d.ts +4 -3
- package/dist/profiles/shared.d.ts +4 -0
- package/dist/profiles/test.d.ts +8 -2
- package/dist/profiles/test.js +282 -4
- package/dist/testing/context.d.ts +6 -0
- package/dist/testing/index.d.ts +8 -5
- package/dist/testing/index.js +37 -26
- package/dist/workflow-config.d.ts +7 -0
- package/dist/workflow.d.ts +23 -6
- package/package.json +1 -5
- package/dist/chunks/chunk-3EO3FSI5.js +0 -94
- package/dist/chunks/chunk-NUFRM6SI.js +0 -0
- package/dist/profiles/migration.d.ts +0 -3
- package/dist/profiles/migration.js +0 -21
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ResourceKeyWith } from "../data.js";
|
|
2
2
|
import type { ContentDocument } from "../input.js";
|
|
3
|
-
export declare const SDK_VERSION =
|
|
3
|
+
export declare const SDK_VERSION = 62;
|
|
4
4
|
export interface AiDecideInput {
|
|
5
5
|
state: unknown;
|
|
6
6
|
questions: Array<{
|
|
@@ -75,6 +75,12 @@ export interface ChartDistributionInput {
|
|
|
75
75
|
categoryField: string;
|
|
76
76
|
valueField?: string | null;
|
|
77
77
|
filters?: unknown;
|
|
78
|
+
/**
|
|
79
|
+
* Maximum number of categories to show.
|
|
80
|
+
* From 1 to 50.
|
|
81
|
+
* @minimum 1
|
|
82
|
+
* @maximum 50
|
|
83
|
+
*/
|
|
78
84
|
limit?: number | null;
|
|
79
85
|
}
|
|
80
86
|
export type ChartDistributionOutput = Array<{
|
|
@@ -101,6 +107,12 @@ export interface ChartLeaderboardInput {
|
|
|
101
107
|
valueField?: string | null;
|
|
102
108
|
metricName: string;
|
|
103
109
|
filters?: unknown;
|
|
110
|
+
/**
|
|
111
|
+
* Number of top entries to return.
|
|
112
|
+
* From 1 to 100.
|
|
113
|
+
* @minimum 1
|
|
114
|
+
* @maximum 100
|
|
115
|
+
*/
|
|
104
116
|
limit: number;
|
|
105
117
|
}
|
|
106
118
|
export type ChartLeaderboardOutput = Array<{
|
|
@@ -120,6 +132,12 @@ export interface ChartTimeSeriesInput {
|
|
|
120
132
|
[key: string]: unknown;
|
|
121
133
|
}>;
|
|
122
134
|
filters?: unknown;
|
|
135
|
+
/**
|
|
136
|
+
* Maximum number of time periods to return.
|
|
137
|
+
* From 1 to 1000.
|
|
138
|
+
* @minimum 1
|
|
139
|
+
* @maximum 1000
|
|
140
|
+
*/
|
|
123
141
|
limit?: number | null;
|
|
124
142
|
}
|
|
125
143
|
export type ChartTimeSeriesOutput = Array<Record<string, unknown>>;
|
|
@@ -139,6 +157,12 @@ export interface DataAggregateMetricsInput {
|
|
|
139
157
|
direction?: "asc" | "desc";
|
|
140
158
|
[key: string]: unknown;
|
|
141
159
|
}>;
|
|
160
|
+
/**
|
|
161
|
+
* Maximum number of groups to return.
|
|
162
|
+
* From 1 to 1000.
|
|
163
|
+
* @minimum 1
|
|
164
|
+
* @maximum 1000
|
|
165
|
+
*/
|
|
142
166
|
limit?: number | null;
|
|
143
167
|
}
|
|
144
168
|
export type DataAggregateMetricsOutput = Array<Record<string, unknown>>;
|
|
@@ -153,7 +177,18 @@ export interface DataCountInput {
|
|
|
153
177
|
}>;
|
|
154
178
|
relations?: Array<string>;
|
|
155
179
|
recordScope?: "active" | "archived" | "activeOrArchived" | null;
|
|
180
|
+
/**
|
|
181
|
+
* The page number.
|
|
182
|
+
* At least 1.
|
|
183
|
+
* @minimum 1
|
|
184
|
+
*/
|
|
156
185
|
page?: number | null;
|
|
186
|
+
/**
|
|
187
|
+
* The number of records per page.
|
|
188
|
+
* From 1 to 100.
|
|
189
|
+
* @minimum 1
|
|
190
|
+
* @maximum 100
|
|
191
|
+
*/
|
|
157
192
|
pageSize?: number | null;
|
|
158
193
|
}
|
|
159
194
|
export type DataCountOutput = number;
|
|
@@ -253,7 +288,18 @@ export interface DataSearchInput {
|
|
|
253
288
|
}>;
|
|
254
289
|
relations?: Array<string>;
|
|
255
290
|
recordScope?: "active" | "archived" | "activeOrArchived" | null;
|
|
291
|
+
/**
|
|
292
|
+
* The page number.
|
|
293
|
+
* At least 1.
|
|
294
|
+
* @minimum 1
|
|
295
|
+
*/
|
|
256
296
|
page?: number | null;
|
|
297
|
+
/**
|
|
298
|
+
* The number of records per page.
|
|
299
|
+
* From 1 to 100.
|
|
300
|
+
* @minimum 1
|
|
301
|
+
* @maximum 100
|
|
302
|
+
*/
|
|
257
303
|
pageSize?: number | null;
|
|
258
304
|
paging?: "cursor" | "page" | null;
|
|
259
305
|
after?: string | null;
|
|
@@ -273,6 +319,12 @@ export interface DataSemanticSearchInput {
|
|
|
273
319
|
resource: string;
|
|
274
320
|
query: string;
|
|
275
321
|
filters?: unknown;
|
|
322
|
+
/**
|
|
323
|
+
* The maximum number of records to return.
|
|
324
|
+
* From 1 to 100.
|
|
325
|
+
* @minimum 1
|
|
326
|
+
* @maximum 100
|
|
327
|
+
*/
|
|
276
328
|
topK?: number | null;
|
|
277
329
|
recordScope?: "active" | "archived" | "activeOrArchived" | null;
|
|
278
330
|
}
|
|
@@ -292,7 +344,18 @@ export interface DataSumInput {
|
|
|
292
344
|
}>;
|
|
293
345
|
relations?: Array<string>;
|
|
294
346
|
recordScope?: "active" | "archived" | "activeOrArchived" | null;
|
|
347
|
+
/**
|
|
348
|
+
* The page number.
|
|
349
|
+
* At least 1.
|
|
350
|
+
* @minimum 1
|
|
351
|
+
*/
|
|
295
352
|
page?: number | null;
|
|
353
|
+
/**
|
|
354
|
+
* The number of records per page.
|
|
355
|
+
* From 1 to 100.
|
|
356
|
+
* @minimum 1
|
|
357
|
+
* @maximum 100
|
|
358
|
+
*/
|
|
296
359
|
pageSize?: number | null;
|
|
297
360
|
field: string;
|
|
298
361
|
}
|
|
@@ -476,6 +539,12 @@ export interface MailSearchInput {
|
|
|
476
539
|
statuses?: Array<"bounced" | "deferred" | "delivered" | "dropped" | "failed" | "sending" | "sent" | "spam_reported" | "suppressed"> | null;
|
|
477
540
|
dateFrom?: string | null;
|
|
478
541
|
dateBefore?: string | null;
|
|
542
|
+
/**
|
|
543
|
+
* Maximum number of emails to return, newest first. Total still counts every match.
|
|
544
|
+
* From 1 to 100.
|
|
545
|
+
* @minimum 1
|
|
546
|
+
* @maximum 100
|
|
547
|
+
*/
|
|
479
548
|
limit?: number | null;
|
|
480
549
|
}
|
|
481
550
|
export type MailSearchOutput = {
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { data as rootData } from "../../data.js";
|
|
2
|
+
import { ai as rootAi, calendar as rootCalendar, callback as rootCallback, chart as rootChart, date as rootDate, file as rootFile, guard as rootGuard, http as rootHttp, lifecycle as rootLifecycle, mail as rootMail, markdown as rootMarkdown, mediaLibrary as rootMediaLibrary, money as rootMoney, notification as rootNotification, number as rootNumber, package as rootPackage, page as rootPage, payables as rootPayables, payment as rootPayment, payments as rootPayments, phone as rootPhone, scheduling as rootScheduling, schema as rootSchema, security as rootSecurity, sms as rootSms, subscriptions as rootSubscriptions, text as rootText, time as rootTime, timezone as rootTimezone, tiptap as rootTiptap, user as rootUser, web as rootWeb, workflow as rootWorkflow, workspace as rootWorkspace } from "../capabilities.js";
|
|
3
|
+
export declare const ai: {
|
|
4
|
+
decide: typeof rootAi.decide;
|
|
5
|
+
runPrompt: typeof rootAi.runPrompt;
|
|
6
|
+
};
|
|
7
|
+
export declare const calendar: {
|
|
8
|
+
generateLink: typeof rootCalendar.generateLink;
|
|
9
|
+
searchEvents: typeof rootCalendar.searchEvents;
|
|
10
|
+
};
|
|
11
|
+
export declare const callback: {
|
|
12
|
+
get: typeof rootCallback.get;
|
|
13
|
+
remove: typeof rootCallback.remove;
|
|
14
|
+
set: typeof rootCallback.set;
|
|
15
|
+
};
|
|
16
|
+
export declare const chart: {
|
|
17
|
+
distribution: typeof rootChart.distribution;
|
|
18
|
+
kpi: typeof rootChart.kpi;
|
|
19
|
+
leaderboard: typeof rootChart.leaderboard;
|
|
20
|
+
timeSeries: typeof rootChart.timeSeries;
|
|
21
|
+
};
|
|
22
|
+
export declare const data: {
|
|
23
|
+
aggregateMetrics: typeof rootData.aggregateMetrics;
|
|
24
|
+
count: typeof rootData.count;
|
|
25
|
+
create: typeof rootData.create;
|
|
26
|
+
createMany: typeof rootData.createMany;
|
|
27
|
+
delete: typeof rootData.delete;
|
|
28
|
+
deleteMany: typeof rootData.deleteMany;
|
|
29
|
+
find: typeof rootData.find;
|
|
30
|
+
findOrCreate: typeof rootData.findOrCreate;
|
|
31
|
+
relation: {
|
|
32
|
+
attach: typeof rootData.relation.attach;
|
|
33
|
+
attachMany: typeof rootData.relation.attachMany;
|
|
34
|
+
detach: typeof rootData.relation.detach;
|
|
35
|
+
detachMany: typeof rootData.relation.detachMany;
|
|
36
|
+
sync: typeof rootData.relation.sync;
|
|
37
|
+
};
|
|
38
|
+
restore: typeof rootData.restore;
|
|
39
|
+
search: typeof rootData.search;
|
|
40
|
+
semanticSearch: typeof rootData.semanticSearch;
|
|
41
|
+
sum: typeof rootData.sum;
|
|
42
|
+
update: typeof rootData.update;
|
|
43
|
+
updateOrCreate: typeof rootData.updateOrCreate;
|
|
44
|
+
validate: typeof rootData.validate;
|
|
45
|
+
};
|
|
46
|
+
export declare const date: {
|
|
47
|
+
add: typeof rootDate.add;
|
|
48
|
+
diff: typeof rootDate.diff;
|
|
49
|
+
endOf: typeof rootDate.endOf;
|
|
50
|
+
format: typeof rootDate.format;
|
|
51
|
+
startOf: typeof rootDate.startOf;
|
|
52
|
+
subtract: typeof rootDate.subtract;
|
|
53
|
+
};
|
|
54
|
+
export declare const file: {
|
|
55
|
+
changeVisibility: typeof rootFile.changeVisibility;
|
|
56
|
+
createFromUrl: typeof rootFile.createFromUrl;
|
|
57
|
+
createMediaLibraryItem: typeof rootFile.createMediaLibraryItem;
|
|
58
|
+
createQrCode: typeof rootFile.createQrCode;
|
|
59
|
+
};
|
|
60
|
+
export declare const guard: {
|
|
61
|
+
validate: typeof rootGuard.validate;
|
|
62
|
+
};
|
|
63
|
+
export declare const http: {
|
|
64
|
+
request: typeof rootHttp.request;
|
|
65
|
+
};
|
|
66
|
+
export declare const lifecycle: {
|
|
67
|
+
output: typeof rootLifecycle.output;
|
|
68
|
+
};
|
|
69
|
+
export declare const mail: {
|
|
70
|
+
search: typeof rootMail.search;
|
|
71
|
+
send: typeof rootMail.send;
|
|
72
|
+
sendNotification: typeof rootMail.sendNotification;
|
|
73
|
+
};
|
|
74
|
+
export declare const markdown: {
|
|
75
|
+
fromContent: typeof rootMarkdown.fromContent;
|
|
76
|
+
toContent: typeof rootMarkdown.toContent;
|
|
77
|
+
};
|
|
78
|
+
export declare const mediaLibrary: {
|
|
79
|
+
createFolder: typeof rootMediaLibrary.createFolder;
|
|
80
|
+
deleteItem: typeof rootMediaLibrary.deleteItem;
|
|
81
|
+
moveItems: typeof rootMediaLibrary.moveItems;
|
|
82
|
+
updateItem: typeof rootMediaLibrary.updateItem;
|
|
83
|
+
};
|
|
84
|
+
export declare const money: {
|
|
85
|
+
format: typeof rootMoney.format;
|
|
86
|
+
};
|
|
87
|
+
export declare const notification: {
|
|
88
|
+
send: typeof rootNotification.send;
|
|
89
|
+
sendBulkNotifications: typeof rootNotification.sendBulkNotifications;
|
|
90
|
+
sendNotification: typeof rootNotification.sendNotification;
|
|
91
|
+
setConsent: typeof rootNotification.setConsent;
|
|
92
|
+
};
|
|
93
|
+
export declare const number: {
|
|
94
|
+
format: typeof rootNumber.format;
|
|
95
|
+
};
|
|
96
|
+
declare const package_: {
|
|
97
|
+
installInput: typeof rootPackage.installInput;
|
|
98
|
+
};
|
|
99
|
+
export { package_ as package };
|
|
100
|
+
export declare const page: {
|
|
101
|
+
url: typeof rootPage.url;
|
|
102
|
+
};
|
|
103
|
+
export declare const payables: {
|
|
104
|
+
void: typeof rootPayables.void;
|
|
105
|
+
writeOff: typeof rootPayables.writeOff;
|
|
106
|
+
};
|
|
107
|
+
export declare const payment: {
|
|
108
|
+
createManual: typeof rootPayment.createManual;
|
|
109
|
+
};
|
|
110
|
+
export declare const payments: {
|
|
111
|
+
charge: typeof rootPayments.charge;
|
|
112
|
+
checkout: typeof rootPayments.checkout;
|
|
113
|
+
confirm: typeof rootPayments.confirm;
|
|
114
|
+
refund: typeof rootPayments.refund;
|
|
115
|
+
};
|
|
116
|
+
export declare const phone: {
|
|
117
|
+
format: typeof rootPhone.format;
|
|
118
|
+
};
|
|
119
|
+
export declare const scheduling: {
|
|
120
|
+
bookSlot: typeof rootScheduling.bookSlot;
|
|
121
|
+
findSlots: typeof rootScheduling.findSlots;
|
|
122
|
+
};
|
|
123
|
+
export declare const schema: {
|
|
124
|
+
toJsonSchema: typeof rootSchema.toJsonSchema;
|
|
125
|
+
};
|
|
126
|
+
export declare const security: {
|
|
127
|
+
randomPassword: typeof rootSecurity.randomPassword;
|
|
128
|
+
};
|
|
129
|
+
export declare const sms: {
|
|
130
|
+
sendNotification: typeof rootSms.sendNotification;
|
|
131
|
+
};
|
|
132
|
+
export declare const subscriptions: {
|
|
133
|
+
activate: typeof rootSubscriptions.activate;
|
|
134
|
+
cancel: typeof rootSubscriptions.cancel;
|
|
135
|
+
changeItems: typeof rootSubscriptions.changeItems;
|
|
136
|
+
create: typeof rootSubscriptions.create;
|
|
137
|
+
generateInvoice: typeof rootSubscriptions.generateInvoice;
|
|
138
|
+
pause: typeof rootSubscriptions.pause;
|
|
139
|
+
preview: typeof rootSubscriptions.preview;
|
|
140
|
+
previewChange: typeof rootSubscriptions.previewChange;
|
|
141
|
+
resume: typeof rootSubscriptions.resume;
|
|
142
|
+
setUpcomingItems: typeof rootSubscriptions.setUpcomingItems;
|
|
143
|
+
};
|
|
144
|
+
export declare const text: {
|
|
145
|
+
generate: typeof rootText.generate;
|
|
146
|
+
hash: typeof rootText.hash;
|
|
147
|
+
randomUuid: typeof rootText.randomUuid;
|
|
148
|
+
toContent: typeof rootText.toContent;
|
|
149
|
+
};
|
|
150
|
+
export declare const time: {
|
|
151
|
+
add: typeof rootTime.add;
|
|
152
|
+
diff: typeof rootTime.diff;
|
|
153
|
+
endOf: typeof rootTime.endOf;
|
|
154
|
+
format: typeof rootTime.format;
|
|
155
|
+
startOf: typeof rootTime.startOf;
|
|
156
|
+
subtract: typeof rootTime.subtract;
|
|
157
|
+
};
|
|
158
|
+
export declare const timezone: {
|
|
159
|
+
format: typeof rootTimezone.format;
|
|
160
|
+
interpret: typeof rootTimezone.interpret;
|
|
161
|
+
};
|
|
162
|
+
export declare const tiptap: {
|
|
163
|
+
parse: typeof rootTiptap.parse;
|
|
164
|
+
};
|
|
165
|
+
export declare const user: {
|
|
166
|
+
authorize: typeof rootUser.authorize;
|
|
167
|
+
};
|
|
168
|
+
export declare const web: {
|
|
169
|
+
agent: typeof rootWeb.agent;
|
|
170
|
+
batchScrape: typeof rootWeb.batchScrape;
|
|
171
|
+
crawl: typeof rootWeb.crawl;
|
|
172
|
+
extract: typeof rootWeb.extract;
|
|
173
|
+
googleSearch: typeof rootWeb.googleSearch;
|
|
174
|
+
map: typeof rootWeb.map;
|
|
175
|
+
pdf: typeof rootWeb.pdf;
|
|
176
|
+
scrape: typeof rootWeb.scrape;
|
|
177
|
+
screenshot: typeof rootWeb.screenshot;
|
|
178
|
+
searchRanked: typeof rootWeb.searchRanked;
|
|
179
|
+
};
|
|
180
|
+
export declare const workflow: {
|
|
181
|
+
run: typeof rootWorkflow.run;
|
|
182
|
+
url: typeof rootWorkflow.url;
|
|
183
|
+
};
|
|
184
|
+
export declare const workspace: {
|
|
185
|
+
loginUrl: typeof rootWorkspace.loginUrl;
|
|
186
|
+
setValue: typeof rootWorkspace.setValue;
|
|
187
|
+
setValues: typeof rootWorkspace.setValues;
|
|
188
|
+
value: typeof rootWorkspace.value;
|
|
189
|
+
values: typeof rootWorkspace.values;
|
|
190
|
+
};
|