@prismatic-io/components-domo 0.0.0-stage → 0.1.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.
@@ -0,0 +1,4242 @@
1
+ let _prismatic_io_spectral = require("@prismatic-io/spectral");
2
+ let _prismatic_io_spectral_http = require("@prismatic-io/spectral/http");
3
+ //#region src/constants.ts
4
+ const BASE_URL = "https://api.domo.com/v1";
5
+ const OAUTH_URL = "https://api.domo.com/oauth";
6
+ const RESOURCE_CONFIG = {
7
+ datasets: {
8
+ label: "DataSets",
9
+ endpoint: "/datasets",
10
+ maxPerPage: 50,
11
+ createdAtField: "createdAt",
12
+ updatedAtField: "updatedAt"
13
+ },
14
+ streams: {
15
+ label: "Streams",
16
+ endpoint: "/streams",
17
+ maxPerPage: 500,
18
+ createdAtField: "createdAt",
19
+ updatedAtField: "modifiedAt"
20
+ },
21
+ users: {
22
+ label: "Users",
23
+ endpoint: "/users",
24
+ maxPerPage: 500,
25
+ createdAtField: "createdAt",
26
+ updatedAtField: "updatedAt"
27
+ },
28
+ projects: {
29
+ label: "Projects",
30
+ endpoint: "/projects",
31
+ maxPerPage: 500,
32
+ createdAtField: "createdDate",
33
+ updatedAtField: null
34
+ },
35
+ groups: {
36
+ label: "Groups",
37
+ endpoint: "/groups",
38
+ maxPerPage: 500,
39
+ createdAtField: null,
40
+ updatedAtField: null
41
+ },
42
+ pages: {
43
+ label: "Pages",
44
+ endpoint: "/pages",
45
+ maxPerPage: 500,
46
+ createdAtField: null,
47
+ updatedAtField: null
48
+ }
49
+ };
50
+ const resourceModel = Object.entries(RESOURCE_CONFIG).map(([value, { label }]) => ({
51
+ label,
52
+ value
53
+ }));
54
+ //#endregion
55
+ //#region src/client.ts
56
+ async function getToken(domoConnection, debug) {
57
+ const clientId = domoConnection?.fields?.clientId;
58
+ const clientSecret = domoConnection?.fields?.clientSecret;
59
+ const scope = domoConnection?.fields?.scopes;
60
+ const credentials = `${clientId}:${clientSecret}`;
61
+ const client = (0, _prismatic_io_spectral_http.createClient)({
62
+ baseUrl: OAUTH_URL,
63
+ headers: { Authorization: `Basic ${Buffer.from(credentials).toString("base64")}` },
64
+ debug
65
+ });
66
+ try {
67
+ const { data } = await client.get("/token", { params: {
68
+ grant_type: "client_credentials",
69
+ scope
70
+ } });
71
+ return data.access_token;
72
+ } catch (error) {
73
+ const handled = (0, _prismatic_io_spectral_http.handleErrors)(error);
74
+ const serialized = _prismatic_io_spectral.util.types.toJSON(handled);
75
+ throw new Error(serialized);
76
+ }
77
+ }
78
+ const getDomoClient = async (domoConnection, debug) => {
79
+ return (0, _prismatic_io_spectral_http.createClient)({
80
+ baseUrl: BASE_URL,
81
+ headers: { authorization: `Bearer ${await getToken(domoConnection, debug)}` },
82
+ debug
83
+ });
84
+ };
85
+ //#endregion
86
+ //#region src/examplePayloads/accounts.ts
87
+ const getAccountsExamplePayload = { data: {
88
+ id: "username-password",
89
+ name: "Username / Password",
90
+ authScheme: "fields",
91
+ fields: [
92
+ {
93
+ key: "username",
94
+ name: "Username",
95
+ type: "TEXT"
96
+ },
97
+ {
98
+ key: "password",
99
+ name: "Password",
100
+ type: "SENSITIVE"
101
+ },
102
+ {
103
+ key: "url",
104
+ name: "URL",
105
+ type: "TEXT"
106
+ },
107
+ {
108
+ key: "authenticateBy",
109
+ name: "Authenticate By",
110
+ type: "TEXT"
111
+ }
112
+ ]
113
+ } };
114
+ const listAccountsExamplePayload = { data: [{
115
+ id: 10045,
116
+ name: "Salesforce Production",
117
+ type: {
118
+ id: "username-password",
119
+ name: "Username / Password"
120
+ },
121
+ valid: true,
122
+ userId: 87264918
123
+ }, {
124
+ id: 10046,
125
+ name: "MySQL Data Warehouse",
126
+ type: {
127
+ id: "username-password",
128
+ name: "Username / Password"
129
+ },
130
+ valid: true,
131
+ userId: 54320910
132
+ }] };
133
+ const createAccountExamplePayload = { data: {
134
+ id: 10047,
135
+ name: "HubSpot Marketing",
136
+ type: {
137
+ id: "username-password",
138
+ name: "Username / Password",
139
+ properties: {
140
+ username: "api_user@example.com",
141
+ url: "https://api.hubspot.com",
142
+ authenticateBy: "token"
143
+ }
144
+ },
145
+ valid: true,
146
+ userId: 87264918
147
+ } };
148
+ const updateAccountExamplePayload = { data: {
149
+ ...createAccountExamplePayload.data,
150
+ name: "HubSpot Marketing (Updated)"
151
+ } };
152
+ const deleteAccountExamplePayload = { data: null };
153
+ const shareAccountExamplePayload = { data: null };
154
+ //#endregion
155
+ //#region src/examplePayloads/activityLog.ts
156
+ const getActivityLogEntriesExamplePayload = { data: [{
157
+ userName: "Jane Smith",
158
+ userId: 87264918,
159
+ userType: "USER",
160
+ actionType: "DATASET_UPDATED",
161
+ additionalComment: "Updated schema for Monthly Sales Report",
162
+ eventText: "Jane Smith updated the DataSet 'Monthly Sales Report'",
163
+ time: 17119296e5,
164
+ device: "WEB",
165
+ browserDetails: "Chrome/123.0.0.0",
166
+ ipAddress: "192.168.1.45",
167
+ objectName: "Monthly Sales Report",
168
+ objectId: "4405ff58-1957-45f4-b159-8e7a88cc7dcc",
169
+ objectType: "DATASET"
170
+ }, {
171
+ userName: "Carlos Rivera",
172
+ userId: 54320910,
173
+ userType: "USER",
174
+ actionType: "USER_LOGIN",
175
+ additionalComment: null,
176
+ eventText: "Carlos Rivera logged in",
177
+ time: 17119152e5,
178
+ device: "WEB",
179
+ browserDetails: "Firefox/124.0",
180
+ ipAddress: "10.0.0.22",
181
+ objectName: null,
182
+ objectId: null,
183
+ objectType: null
184
+ }] };
185
+ //#endregion
186
+ //#region src/examplePayloads/attachments.ts
187
+ const addAttachmentExamplePayload = { data: {
188
+ id: 5001,
189
+ name: "requirements-doc.pdf",
190
+ mediaType: "application/pdf",
191
+ fileSize: 204800,
192
+ taskId: 2001,
193
+ projectId: 7,
194
+ uploadedBy: 87264918,
195
+ uploadedAt: "2024-03-22T11:00:00.000Z"
196
+ } };
197
+ const deleteAttachmentExamplePayload = { data: null };
198
+ const downloadAttachmentExamplePayload = { data: "<binary file content>" };
199
+ const getListOfAttachmentsExamplePayload = { data: [addAttachmentExamplePayload.data, {
200
+ id: 5002,
201
+ name: "schema-diagram.png",
202
+ mediaType: "image/png",
203
+ fileSize: 98304,
204
+ taskId: 2001,
205
+ projectId: 7,
206
+ uploadedBy: 54320910,
207
+ uploadedAt: "2024-03-23T09:15:00.000Z"
208
+ }] };
209
+ //#endregion
210
+ //#region src/examplePayloads/datasets.ts
211
+ const getDataSetExamplePayload = { data: {
212
+ id: "4405ff58-1957-45f4-b159-8e7a88cc7dcc",
213
+ name: "Monthly Sales Report",
214
+ description: "Monthly sales data aggregated by region",
215
+ rows: 1250,
216
+ columns: 5,
217
+ schema: { columns: [
218
+ {
219
+ type: "STRING",
220
+ name: "region"
221
+ },
222
+ {
223
+ type: "STRING",
224
+ name: "product"
225
+ },
226
+ {
227
+ type: "LONG",
228
+ name: "units_sold"
229
+ },
230
+ {
231
+ type: "DOUBLE",
232
+ name: "revenue"
233
+ },
234
+ {
235
+ type: "DATE",
236
+ name: "sale_date"
237
+ }
238
+ ] },
239
+ owner: {
240
+ id: 87264918,
241
+ name: "Jane Smith"
242
+ },
243
+ pdpEnabled: false,
244
+ createdAt: "2024-01-15T08:30:00.000Z",
245
+ updatedAt: "2024-03-10T14:22:00.000Z"
246
+ } };
247
+ const listDataSetsExamplePayload = { data: [getDataSetExamplePayload.data, {
248
+ id: "7b3e8f21-3c6d-4a11-9e2f-5d8b12c45e90",
249
+ name: "Customer Churn Analysis",
250
+ description: "Weekly customer churn metrics",
251
+ rows: 4300,
252
+ columns: 8,
253
+ schema: { columns: [
254
+ {
255
+ type: "LONG",
256
+ name: "customer_id"
257
+ },
258
+ {
259
+ type: "STRING",
260
+ name: "segment"
261
+ },
262
+ {
263
+ type: "DATE",
264
+ name: "churn_date"
265
+ },
266
+ {
267
+ type: "DOUBLE",
268
+ name: "lifetime_value"
269
+ },
270
+ {
271
+ type: "STRING",
272
+ name: "churn_reason"
273
+ },
274
+ {
275
+ type: "STRING",
276
+ name: "plan_type"
277
+ },
278
+ {
279
+ type: "LONG",
280
+ name: "tenure_days"
281
+ },
282
+ {
283
+ type: "STRING",
284
+ name: "region"
285
+ }
286
+ ] },
287
+ owner: {
288
+ id: 54320910,
289
+ name: "Carlos Rivera"
290
+ },
291
+ pdpEnabled: true,
292
+ createdAt: "2023-11-02T10:00:00.000Z",
293
+ updatedAt: "2024-03-08T09:15:00.000Z"
294
+ }] };
295
+ const createDataSetExamplePayload = getDataSetExamplePayload;
296
+ const updateDataSetExamplePayload = { data: {
297
+ ...getDataSetExamplePayload.data,
298
+ name: "Monthly Sales Report (Updated)",
299
+ updatedAt: "2024-04-01T11:00:00.000Z"
300
+ } };
301
+ const deleteDataSetExamplePayload = { data: null };
302
+ const exportDataFromDataSetExamplePayload = { data: "region,product,units_sold,revenue,sale_date\nNorth,Widget A,150,7500.00,2024-01-01\nSouth,Widget B,200,9800.00,2024-01-01\n" };
303
+ const importDataIntoDataSetExamplePayload = { data: null };
304
+ const queryDataSetExamplePayload = { data: {
305
+ datasource: "4405ff58-1957-45f4-b159-8e7a88cc7dcc",
306
+ columns: [
307
+ "region",
308
+ "product",
309
+ "units_sold"
310
+ ],
311
+ metadata: [
312
+ {
313
+ type: "STRING",
314
+ dataSourceId: "4405ff58-1957-45f4-b159-8e7a88cc7dcc",
315
+ maxLength: 0,
316
+ minLength: 0,
317
+ periodIndex: -1,
318
+ name: "region"
319
+ },
320
+ {
321
+ type: "STRING",
322
+ dataSourceId: "4405ff58-1957-45f4-b159-8e7a88cc7dcc",
323
+ maxLength: 0,
324
+ minLength: 0,
325
+ periodIndex: -1,
326
+ name: "product"
327
+ },
328
+ {
329
+ type: "LONG",
330
+ dataSourceId: "4405ff58-1957-45f4-b159-8e7a88cc7dcc",
331
+ maxLength: 0,
332
+ minLength: 0,
333
+ periodIndex: -1,
334
+ name: "units_sold"
335
+ }
336
+ ],
337
+ rows: [
338
+ [
339
+ "North",
340
+ "Widget A",
341
+ 150
342
+ ],
343
+ [
344
+ "South",
345
+ "Widget B",
346
+ 200
347
+ ],
348
+ [
349
+ "East",
350
+ "Widget C",
351
+ 175
352
+ ]
353
+ ],
354
+ numRows: 3,
355
+ numColumns: 3,
356
+ fromcache: false
357
+ } };
358
+ //#endregion
359
+ //#region src/examplePayloads/general.ts
360
+ const rawRequestExamplePayload = { data: {
361
+ statusCode: 200,
362
+ headers: {
363
+ "content-type": "application/json;charset=UTF-8",
364
+ "x-domo-sdk-version": "1"
365
+ },
366
+ body: {
367
+ id: "4405ff58-1957-45f4-b159-8e7a88cc7dcc",
368
+ name: "Monthly Sales Report",
369
+ rows: 1250
370
+ }
371
+ } };
372
+ //#endregion
373
+ //#region src/examplePayloads/groups.ts
374
+ const getGroupExamplePayload = { data: {
375
+ id: 400112,
376
+ name: "Analytics Team",
377
+ isActive: true,
378
+ creatorId: 87264918,
379
+ default: false,
380
+ userCount: 8,
381
+ memberCount: 8
382
+ } };
383
+ const listGroupsExamplePayload = { data: [getGroupExamplePayload.data, {
384
+ id: 400205,
385
+ name: "Executive Dashboard Viewers",
386
+ isActive: true,
387
+ creatorId: 87264918,
388
+ default: false,
389
+ userCount: 12,
390
+ memberCount: 12
391
+ }] };
392
+ const createGroupExamplePayload = getGroupExamplePayload;
393
+ const updateGroupExamplePayload = { data: {
394
+ ...getGroupExamplePayload.data,
395
+ name: "Analytics Team (Updated)"
396
+ } };
397
+ const deleteGroupExamplePayload = { data: null };
398
+ const listUsersInGroupExamplePayload = { data: [
399
+ 87264918,
400
+ 54320910,
401
+ 66011234,
402
+ 72980045
403
+ ] };
404
+ const addUserToGroupExamplePayload = { data: null };
405
+ const removeUserFromGroupExamplePayload = { data: null };
406
+ //#endregion
407
+ //#region src/examplePayloads/pages.ts
408
+ const getPageExamplePayload = { data: {
409
+ id: 1102458,
410
+ name: "Sales Performance Dashboard",
411
+ parentId: 0,
412
+ ownerId: 87264918,
413
+ locked: false,
414
+ collectionIds: [],
415
+ cardIds: [
416
+ 88012,
417
+ 88013,
418
+ 88014
419
+ ],
420
+ visibility: {
421
+ userIds: [87264918, 54320910],
422
+ groupIds: [400112]
423
+ },
424
+ userIds: [87264918, 54320910],
425
+ groupIds: [400112]
426
+ } };
427
+ const listPagesExamplePayload = { data: [getPageExamplePayload.data, {
428
+ id: 1102501,
429
+ name: "Executive Overview",
430
+ parentId: 0,
431
+ ownerId: 87264918,
432
+ locked: true,
433
+ collectionIds: [],
434
+ cardIds: [88100, 88101],
435
+ visibility: {
436
+ userIds: [],
437
+ groupIds: [400205]
438
+ },
439
+ userIds: [],
440
+ groupIds: [400205]
441
+ }] };
442
+ const createPageExamplePayload = getPageExamplePayload;
443
+ const updatePageExamplePayload = { data: {
444
+ ...getPageExamplePayload.data,
445
+ name: "Sales Performance Dashboard (Updated)",
446
+ locked: true
447
+ } };
448
+ const deletePageExamplePayload = { data: null };
449
+ //#endregion
450
+ //#region src/examplePayloads/projects.ts
451
+ const getProjectExamplePayload = { data: {
452
+ id: 7,
453
+ name: "Q2 Data Integration Initiative",
454
+ description: "Integrate new data sources for Q2 reporting",
455
+ dueDate: "2024-06-30",
456
+ public: false,
457
+ createdDate: "2024-01-20",
458
+ members: [
459
+ 87264918,
460
+ 54320910,
461
+ 66011234
462
+ ]
463
+ } };
464
+ const listProjectsExamplePayload = { data: [getProjectExamplePayload.data, {
465
+ id: 8,
466
+ name: "Customer 360 Rebuild",
467
+ description: "Rebuild the customer 360 dashboard with new data pipelines",
468
+ dueDate: "2024-09-15",
469
+ public: true,
470
+ createdDate: "2024-02-05",
471
+ members: [87264918, 72980045]
472
+ }] };
473
+ const createProjectExamplePayload = getProjectExamplePayload;
474
+ ({ ...getProjectExamplePayload.data });
475
+ const deleteProjectExamplePayload = { data: null };
476
+ const getProjectMembersExamplePayload = { data: [
477
+ 87264918,
478
+ 54320910,
479
+ 66011234
480
+ ] };
481
+ const updateProjectMembersExamplePayload = { data: null };
482
+ const getListExamplePayload = { data: {
483
+ id: 101,
484
+ name: "To Do",
485
+ type: "TODO",
486
+ index: 0,
487
+ projectId: 7
488
+ } };
489
+ const listProjectListsExamplePayload = { data: [
490
+ getListExamplePayload.data,
491
+ {
492
+ id: 102,
493
+ name: "In Progress",
494
+ type: "ACTIVE",
495
+ index: 1,
496
+ projectId: 7
497
+ },
498
+ {
499
+ id: 103,
500
+ name: "Done",
501
+ type: "DONE",
502
+ index: 2,
503
+ projectId: 7
504
+ }
505
+ ] };
506
+ const createListExamplePayload = getListExamplePayload;
507
+ const updateListExamplePayload = { data: {
508
+ ...getListExamplePayload.data,
509
+ name: "Backlog",
510
+ index: 0
511
+ } };
512
+ const deleteListExamplePayload = { data: null };
513
+ const getTaskExamplePayload = { data: {
514
+ id: 2001,
515
+ taskName: "Connect Salesforce data source",
516
+ description: "Configure the Salesforce connector and map fields to the schema",
517
+ dueDate: "2024-05-15",
518
+ ownedBy: 87264918,
519
+ contributors: [54320910],
520
+ priority: "HIGH",
521
+ tags: ["salesforce", "etl"],
522
+ projectId: 7,
523
+ listId: 101,
524
+ attachmentCount: 1,
525
+ createdDate: "2024-02-01",
526
+ lastModified: "2024-03-22"
527
+ } };
528
+ const listProjectListTasksExamplePayload = { data: [getTaskExamplePayload.data, {
529
+ id: 2002,
530
+ taskName: "Write DataSet transformation SQL",
531
+ description: "Write the SQL transformations for the new DataSet",
532
+ dueDate: "2024-05-20",
533
+ ownedBy: 54320910,
534
+ contributors: [87264918],
535
+ priority: "MEDIUM",
536
+ tags: ["sql", "dataset"],
537
+ projectId: 7,
538
+ listId: 101,
539
+ attachmentCount: 0,
540
+ createdDate: "2024-02-03",
541
+ lastModified: "2024-03-18"
542
+ }] };
543
+ const createTaskExamplePayload = getTaskExamplePayload;
544
+ const updateTaskExamplePayload = { data: {
545
+ ...getTaskExamplePayload.data,
546
+ taskName: "Connect Salesforce data source (Updated)",
547
+ priority: "CRITICAL",
548
+ lastModified: "2024-04-01"
549
+ } };
550
+ //#endregion
551
+ //#region src/examplePayloads/streams.ts
552
+ const getStreamExamplePayload = { data: {
553
+ id: 32,
554
+ dataSet: {
555
+ id: "4405ff58-1957-45f4-b159-8e7a88cc7dcc",
556
+ name: "Monthly Sales Report",
557
+ description: "Monthly sales data aggregated by region",
558
+ rows: 1250,
559
+ columns: 5,
560
+ owner: {
561
+ id: 87264918,
562
+ name: "Jane Smith"
563
+ },
564
+ createdAt: "2024-01-15T08:30:00.000Z",
565
+ updatedAt: "2024-03-10T14:22:00.000Z",
566
+ pdpEnabled: false
567
+ },
568
+ updateMethod: "APPEND",
569
+ createdAt: "2024-01-15T08:30:00.000Z",
570
+ modifiedAt: "2024-03-10T14:22:00.000Z"
571
+ } };
572
+ const listStreamsExamplePayload = { data: [getStreamExamplePayload.data, {
573
+ id: 45,
574
+ dataSet: {
575
+ id: "7b3e8f21-3c6d-4a11-9e2f-5d8b12c45e90",
576
+ name: "Customer Churn Analysis",
577
+ description: "Weekly customer churn metrics",
578
+ rows: 4300,
579
+ columns: 8,
580
+ owner: {
581
+ id: 54320910,
582
+ name: "Carlos Rivera"
583
+ },
584
+ createdAt: "2023-11-02T10:00:00.000Z",
585
+ updatedAt: "2024-03-08T09:15:00.000Z",
586
+ pdpEnabled: true
587
+ },
588
+ updateMethod: "REPLACE",
589
+ createdAt: "2023-11-02T10:00:00.000Z",
590
+ modifiedAt: "2024-03-08T09:15:00.000Z"
591
+ }] };
592
+ const createStreamExamplePayload = getStreamExamplePayload;
593
+ const updateStreamExamplePayload = { data: {
594
+ ...getStreamExamplePayload.data,
595
+ updateMethod: "REPLACE",
596
+ modifiedAt: "2024-04-01T10:00:00.000Z"
597
+ } };
598
+ const deleteStreamExamplePayload = { data: null };
599
+ const searchStreamExamplePayload = listStreamsExamplePayload;
600
+ const getStreamExecutionExamplePayload = { data: {
601
+ id: 1,
602
+ startedAt: "2024-03-10T14:00:00.000Z",
603
+ endedAt: "2024-03-10T14:05:32.000Z",
604
+ currentState: "SUCCESS",
605
+ createdAt: "2024-03-10T14:00:00.000Z",
606
+ modifiedAt: "2024-03-10T14:05:32.000Z"
607
+ } };
608
+ const listStreamExecutionExamplePayload = { data: [getStreamExecutionExamplePayload.data, {
609
+ id: 2,
610
+ startedAt: "2024-03-11T14:00:00.000Z",
611
+ endedAt: "2024-03-11T14:04:10.000Z",
612
+ currentState: "SUCCESS",
613
+ createdAt: "2024-03-11T14:00:00.000Z",
614
+ modifiedAt: "2024-03-11T14:04:10.000Z"
615
+ }] };
616
+ const createStreamExecutionExamplePayload = { data: {
617
+ id: 3,
618
+ startedAt: "2024-04-01T10:00:00.000Z",
619
+ endedAt: null,
620
+ currentState: "ACTIVE",
621
+ createdAt: "2024-04-01T10:00:00.000Z",
622
+ modifiedAt: "2024-04-01T10:00:00.000Z"
623
+ } };
624
+ const commitStreamExecutionExamplePayload = { data: {
625
+ id: 3,
626
+ startedAt: "2024-04-01T10:00:00.000Z",
627
+ endedAt: "2024-04-01T10:03:45.000Z",
628
+ currentState: "SUCCESS",
629
+ createdAt: "2024-04-01T10:00:00.000Z",
630
+ modifiedAt: "2024-04-01T10:03:45.000Z"
631
+ } };
632
+ const abortStreamExecutionExamplePayload = { data: null };
633
+ const uploadDataPartExamplePayload = { data: null };
634
+ //#endregion
635
+ //#region src/examplePayloads/users.ts
636
+ const getUserExamplePayload = { data: {
637
+ id: 87264918,
638
+ name: "Jane Smith",
639
+ email: "jane.smith@example.com",
640
+ alternateEmail: "jsmith@personal.com",
641
+ role: "Admin",
642
+ title: "Data Engineering Lead",
643
+ phone: "+1-512-555-0142",
644
+ location: "Austin, TX",
645
+ timezone: "America/Chicago",
646
+ locale: "en-US",
647
+ employeeNumber: "EMP-1042",
648
+ createdAt: "2022-06-15T13:00:00.000Z",
649
+ updatedAt: "2024-02-20T09:30:00.000Z",
650
+ image: "https://example.domo.com/avatar/87264918",
651
+ groups: [{
652
+ id: 400112,
653
+ name: "Analytics Team"
654
+ }],
655
+ active: true
656
+ } };
657
+ const listUsersExamplePayload = { data: [getUserExamplePayload.data, {
658
+ id: 54320910,
659
+ name: "Carlos Rivera",
660
+ email: "carlos.rivera@example.com",
661
+ alternateEmail: null,
662
+ role: "Participant",
663
+ title: "Business Analyst",
664
+ phone: "+1-737-555-0185",
665
+ location: "Denver, CO",
666
+ timezone: "America/Denver",
667
+ locale: "en-US",
668
+ employeeNumber: "EMP-2078",
669
+ createdAt: "2023-01-10T08:00:00.000Z",
670
+ updatedAt: "2024-01-05T16:45:00.000Z",
671
+ image: null,
672
+ groups: [],
673
+ active: true
674
+ }] };
675
+ const createUserExamplePayload = getUserExamplePayload;
676
+ const updateUserExamplePayload = { data: {
677
+ ...getUserExamplePayload.data,
678
+ title: "Senior Data Engineering Lead",
679
+ updatedAt: "2024-04-01T10:00:00.000Z"
680
+ } };
681
+ const deleteUserExamplePayload = { data: null };
682
+ //#endregion
683
+ //#region src/inputs/common.ts
684
+ const fetchAll = (0, _prismatic_io_spectral.input)({
685
+ label: "Fetch All",
686
+ type: "boolean",
687
+ required: false,
688
+ default: "false",
689
+ comments: "When true, automatically fetches all pages of results using pagination.",
690
+ clean: _prismatic_io_spectral.util.types.toBool
691
+ });
692
+ const connection$1 = (0, _prismatic_io_spectral.input)({
693
+ label: "Connection",
694
+ type: "connection",
695
+ required: true,
696
+ comments: "The Domo connection to use."
697
+ });
698
+ const name = (0, _prismatic_io_spectral.input)({
699
+ label: "Name",
700
+ type: "string",
701
+ required: false,
702
+ comments: "The display name for the resource.",
703
+ placeholder: "Enter name",
704
+ example: "John Doe",
705
+ clean: _prismatic_io_spectral.util.types.toString
706
+ });
707
+ const id = (0, _prismatic_io_spectral.input)({
708
+ label: "ID",
709
+ type: "string",
710
+ required: false,
711
+ comments: "The unique identifier for the resource.",
712
+ placeholder: "Enter ID",
713
+ example: "123456",
714
+ clean: _prismatic_io_spectral.util.types.toString
715
+ });
716
+ const description = (0, _prismatic_io_spectral.input)({
717
+ label: "Description",
718
+ comments: "A summary of the DataSet contents and purpose.",
719
+ type: "string",
720
+ required: true,
721
+ placeholder: "Enter description",
722
+ example: "Sales data for Q1 2024",
723
+ clean: _prismatic_io_spectral.util.types.toString
724
+ });
725
+ const limit = (0, _prismatic_io_spectral.input)({
726
+ label: "Limit",
727
+ type: "string",
728
+ required: false,
729
+ comments: "The maximum number of results to return (default is 50, maximum of 1000).",
730
+ placeholder: "Enter limit",
731
+ example: "100",
732
+ clean: _prismatic_io_spectral.util.types.toString
733
+ });
734
+ const offset = (0, _prismatic_io_spectral.input)({
735
+ label: "Offset",
736
+ type: "string",
737
+ required: false,
738
+ comments: "The 0-based offset position to begin retrieving results from.",
739
+ placeholder: "Enter offset",
740
+ example: "0",
741
+ clean: _prismatic_io_spectral.util.types.toString
742
+ });
743
+ const dueDate = (0, _prismatic_io_spectral.input)({
744
+ label: "Due Date",
745
+ comments: "The due date for the project. Format: ISO 8601.",
746
+ type: "string",
747
+ required: false,
748
+ placeholder: "Enter due date (ISO 8601 format)",
749
+ example: "2024-12-31T23:59:59Z",
750
+ clean: _prismatic_io_spectral.util.types.toString
751
+ });
752
+ //#endregion
753
+ //#region src/inputs/accounts.ts
754
+ const accountId = (0, _prismatic_io_spectral.input)({
755
+ label: "Account ID",
756
+ type: "string",
757
+ required: true,
758
+ comments: "The unique identifier for the Domo account.",
759
+ placeholder: "Enter Account ID",
760
+ example: "12345",
761
+ dataSource: "accounts",
762
+ clean: _prismatic_io_spectral.util.types.toString
763
+ });
764
+ const accountTypeId = (0, _prismatic_io_spectral.input)({
765
+ label: "Account Type ID",
766
+ type: "string",
767
+ required: true,
768
+ comments: "The unique identifier for the Domo account type.",
769
+ placeholder: "Enter Account Type ID",
770
+ example: "12345",
771
+ dataSource: "accountTypes",
772
+ clean: _prismatic_io_spectral.util.types.toString
773
+ });
774
+ const password = (0, _prismatic_io_spectral.input)({
775
+ label: "Password",
776
+ type: "password",
777
+ required: false,
778
+ comments: "The password used for account authentication.",
779
+ placeholder: "Enter password",
780
+ clean: _prismatic_io_spectral.util.types.toString
781
+ });
782
+ const authenticateBy = (0, _prismatic_io_spectral.input)({
783
+ label: "Authenticate By",
784
+ type: "string",
785
+ required: false,
786
+ comments: "The authentication method used for the account (e.g., basic, token).",
787
+ placeholder: "Enter authentication method",
788
+ example: "basic",
789
+ clean: _prismatic_io_spectral.util.types.toString
790
+ });
791
+ const url = (0, _prismatic_io_spectral.input)({
792
+ label: "URL",
793
+ type: "string",
794
+ required: false,
795
+ comments: "The URL of the account endpoint.",
796
+ placeholder: "Enter URL",
797
+ example: "https://example.com",
798
+ clean: _prismatic_io_spectral.util.types.toString
799
+ });
800
+ const username = (0, _prismatic_io_spectral.input)({
801
+ label: "Username",
802
+ type: "string",
803
+ required: false,
804
+ comments: "The username for account authentication.",
805
+ placeholder: "Enter username",
806
+ example: "john.doe",
807
+ clean: _prismatic_io_spectral.util.types.toString
808
+ });
809
+ const userArray = (0, _prismatic_io_spectral.input)({
810
+ label: "User",
811
+ comments: "The User to share the Account with.",
812
+ type: "string",
813
+ collection: "valuelist",
814
+ required: true,
815
+ placeholder: "Enter User IDs",
816
+ example: "[\"959463190\", \"871428330\"]",
817
+ clean: (stringsArray) => (Array.isArray(stringsArray) ? stringsArray : []).map((string) => _prismatic_io_spectral.util.types.toString(string))
818
+ });
819
+ const updateAccountBody = (0, _prismatic_io_spectral.input)({
820
+ label: "Update Account Body",
821
+ type: "code",
822
+ language: "json",
823
+ required: true,
824
+ comments: "The account object to update.",
825
+ example: JSON.stringify({
826
+ name: "My Account",
827
+ type: {
828
+ id: "123",
829
+ properties: {
830
+ password: "password123",
831
+ authenticateBy: "basic",
832
+ url: "https://example.com",
833
+ username: "john.doe"
834
+ }
835
+ }
836
+ }, null, 2),
837
+ clean: _prismatic_io_spectral.util.types.toString
838
+ });
839
+ const createAccountInputs = {
840
+ connection: connection$1,
841
+ name,
842
+ id,
843
+ password,
844
+ authenticateBy,
845
+ url,
846
+ username
847
+ };
848
+ const deleteAccountInputs = {
849
+ connection: connection$1,
850
+ accountId
851
+ };
852
+ const getAccountsInputs = {
853
+ connection: connection$1,
854
+ accountTypeId
855
+ };
856
+ const listAccountsInputs = {
857
+ connection: connection$1,
858
+ fetchAll,
859
+ pagination: (0, _prismatic_io_spectral.structuredObjectInput)({
860
+ label: "Pagination",
861
+ required: false,
862
+ comments: "Page and page-size controls.",
863
+ inputs: {
864
+ limit: (0, _prismatic_io_spectral.input)({
865
+ ...limit,
866
+ required: false,
867
+ comments: "The number of Accounts to return in the list. The default is 50 and the maximum is 500."
868
+ }),
869
+ offset: (0, _prismatic_io_spectral.input)({
870
+ ...offset,
871
+ required: false,
872
+ comments: "The offset of Accounts to begin the list of Accounts within the response."
873
+ })
874
+ }
875
+ })
876
+ };
877
+ const shareAccountInputs = {
878
+ connection: connection$1,
879
+ userArray,
880
+ accountId: (0, _prismatic_io_spectral.input)({
881
+ ...accountId,
882
+ required: true,
883
+ comments: "The ID of the Account."
884
+ })
885
+ };
886
+ const updateAccountInputs = {
887
+ connection: connection$1,
888
+ accountId: (0, _prismatic_io_spectral.input)({
889
+ ...accountId,
890
+ required: true,
891
+ comments: "The ID of the account to update."
892
+ }),
893
+ updateAccountBody
894
+ };
895
+ //#endregion
896
+ //#region src/inputs/datasets.ts
897
+ const datasetId = (0, _prismatic_io_spectral.input)({
898
+ label: "DataSet ID",
899
+ type: "string",
900
+ required: true,
901
+ comments: "The unique identifier for the Domo DataSet.",
902
+ placeholder: "Enter DataSet ID",
903
+ example: "5168da8d-1c72-4e31-ba74-f609f73071dd",
904
+ dataSource: "selectDataSet",
905
+ clean: _prismatic_io_spectral.util.types.toString
906
+ });
907
+ const rows = (0, _prismatic_io_spectral.input)({
908
+ label: "Rows",
909
+ type: "string",
910
+ required: false,
911
+ comments: "The total number of rows to include in the DataSet.",
912
+ placeholder: "Enter number of rows",
913
+ example: "1000",
914
+ clean: _prismatic_io_spectral.util.types.toString
915
+ });
916
+ const columns = (0, _prismatic_io_spectral.input)({
917
+ label: "Columns",
918
+ type: "code",
919
+ language: "json",
920
+ required: true,
921
+ comments: "A JSON array defining the column schema for the DataSet, including type and name for each column.",
922
+ example: JSON.stringify([{
923
+ type: "STRING",
924
+ name: "Friend"
925
+ }, {
926
+ type: "STRING",
927
+ name: "Attending"
928
+ }], null, 2),
929
+ clean: _prismatic_io_spectral.util.types.toString
930
+ });
931
+ const fileName = (0, _prismatic_io_spectral.input)({
932
+ label: "File Name",
933
+ type: "string",
934
+ required: false,
935
+ comments: "The output filename for the exported CSV data.",
936
+ placeholder: "Enter file name",
937
+ example: "export_data.csv",
938
+ clean: _prismatic_io_spectral.util.types.toString
939
+ });
940
+ const includeHeader = (0, _prismatic_io_spectral.input)({
941
+ label: "Include Header",
942
+ comments: "When true, includes table header in export.",
943
+ type: "string",
944
+ required: false,
945
+ default: "",
946
+ placeholder: "Select header option",
947
+ model: [
948
+ {
949
+ label: "",
950
+ value: ""
951
+ },
952
+ {
953
+ label: "TRUE",
954
+ value: "true"
955
+ },
956
+ {
957
+ label: "FALSE",
958
+ value: "false"
959
+ }
960
+ ],
961
+ clean: _prismatic_io_spectral.util.types.toString
962
+ });
963
+ const csvBody = (0, _prismatic_io_spectral.input)({
964
+ label: "CSV Body",
965
+ type: "text",
966
+ required: true,
967
+ comments: "The CSV-formatted data to import into the DataSet.",
968
+ placeholder: "Enter CSV data",
969
+ example: "Name,Email\nJohn Doe,john@example.com\nJane Smith,jane@example.com",
970
+ clean: _prismatic_io_spectral.util.types.toString
971
+ });
972
+ const nameLike = (0, _prismatic_io_spectral.input)({
973
+ label: "Name Like",
974
+ type: "string",
975
+ required: false,
976
+ comments: "A case-insensitive filter that limits the list to DataSets with names containing this string.",
977
+ placeholder: "Enter name filter",
978
+ example: "sales",
979
+ clean: _prismatic_io_spectral.util.types.toString
980
+ });
981
+ const sort = (0, _prismatic_io_spectral.input)({
982
+ label: "Sort",
983
+ type: "string",
984
+ required: false,
985
+ comments: "The DataSet field to sort by. Prefix with a negative sign to reverse the sort (e.g., '-name').",
986
+ placeholder: "Enter sort field",
987
+ example: "name",
988
+ clean: _prismatic_io_spectral.util.types.toString
989
+ });
990
+ const sql = (0, _prismatic_io_spectral.input)({
991
+ label: "SQL",
992
+ type: "string",
993
+ required: true,
994
+ comments: "The SQL query to run against the DataSet.",
995
+ placeholder: "Enter SQL query",
996
+ example: "SELECT * FROM dataset WHERE status = 'active'",
997
+ clean: _prismatic_io_spectral.util.types.toString
998
+ });
999
+ const updateDataSetBody = (0, _prismatic_io_spectral.input)({
1000
+ label: "Update DataSet Body",
1001
+ type: "code",
1002
+ language: "json",
1003
+ required: false,
1004
+ comments: "The DataSet object to update.",
1005
+ example: JSON.stringify({
1006
+ name: "Leonhard Euler Birthday Bash",
1007
+ description: "VIP Guest List",
1008
+ pdpEnabled: true
1009
+ }, null, 2),
1010
+ clean: _prismatic_io_spectral.util.types.toString
1011
+ });
1012
+ const createDataSetInputs = {
1013
+ connection: connection$1,
1014
+ name: (0, _prismatic_io_spectral.input)({
1015
+ ...name,
1016
+ required: true,
1017
+ comments: "Name of the DataSet to create"
1018
+ }),
1019
+ description,
1020
+ rows,
1021
+ columns
1022
+ };
1023
+ const deleteDataSetInputs = {
1024
+ connection: connection$1,
1025
+ datasetId
1026
+ };
1027
+ const exportDataFromDataSetInputs = {
1028
+ connection: connection$1,
1029
+ datasetId,
1030
+ fileName,
1031
+ includeHeader
1032
+ };
1033
+ const getDataSetInputs = {
1034
+ connection: connection$1,
1035
+ datasetId
1036
+ };
1037
+ const importDataIntoDataSetInputs = {
1038
+ connection: connection$1,
1039
+ datasetId,
1040
+ csvBody
1041
+ };
1042
+ const listDataSetsInputs = {
1043
+ connection: connection$1,
1044
+ fetchAll,
1045
+ nameLike,
1046
+ sort,
1047
+ pagination: (0, _prismatic_io_spectral.structuredObjectInput)({
1048
+ label: "Pagination",
1049
+ required: false,
1050
+ comments: "Page and page-size controls.",
1051
+ inputs: {
1052
+ limit: (0, _prismatic_io_spectral.input)({
1053
+ ...limit,
1054
+ required: false,
1055
+ comments: "The amount of DataSets to return in the list. The default is 50 and the maximum is 50."
1056
+ }),
1057
+ offset: (0, _prismatic_io_spectral.input)({
1058
+ ...offset,
1059
+ required: false,
1060
+ comments: "The offset of the DataSet ID to begin list of users within the response."
1061
+ })
1062
+ }
1063
+ })
1064
+ };
1065
+ const queryDataSetInputs = {
1066
+ connection: connection$1,
1067
+ datasetId,
1068
+ sql
1069
+ };
1070
+ const updateDataSetInputs = {
1071
+ connection: connection$1,
1072
+ datasetId,
1073
+ updateDataSetBody
1074
+ };
1075
+ //#endregion
1076
+ //#region src/inputs/users.ts
1077
+ const userId = (0, _prismatic_io_spectral.input)({
1078
+ label: "User ID",
1079
+ comments: "The unique identifier for the Domo user.",
1080
+ type: "string",
1081
+ required: true,
1082
+ placeholder: "Enter User ID",
1083
+ example: "959463190",
1084
+ dataSource: "selectUser",
1085
+ clean: _prismatic_io_spectral.util.types.toString
1086
+ });
1087
+ const email = (0, _prismatic_io_spectral.input)({
1088
+ label: "Email",
1089
+ type: "string",
1090
+ required: true,
1091
+ comments: "The primary email address associated with the Domo user profile.",
1092
+ placeholder: "Enter email address",
1093
+ example: "john.doe@example.com",
1094
+ clean: _prismatic_io_spectral.util.types.toString
1095
+ });
1096
+ const role = (0, _prismatic_io_spectral.input)({
1097
+ label: "Role",
1098
+ type: "string",
1099
+ required: true,
1100
+ comments: "The permission level assigned to the user (Admin, Privileged, or Participant).",
1101
+ default: "Admin",
1102
+ placeholder: "Select role",
1103
+ model: [
1104
+ {
1105
+ label: "Admin",
1106
+ value: "Admin"
1107
+ },
1108
+ {
1109
+ label: "Privileged",
1110
+ value: "Privileged"
1111
+ },
1112
+ {
1113
+ label: "Participant",
1114
+ value: "Participant"
1115
+ }
1116
+ ],
1117
+ clean: _prismatic_io_spectral.util.types.toString
1118
+ });
1119
+ const roled = (0, _prismatic_io_spectral.input)({
1120
+ label: "Role Id",
1121
+ type: "string",
1122
+ required: false,
1123
+ comments: "The unique identifier for the custom or system role assigned to the user.",
1124
+ placeholder: "Enter role ID",
1125
+ example: "123",
1126
+ clean: _prismatic_io_spectral.util.types.toString
1127
+ });
1128
+ const alternateEmail = (0, _prismatic_io_spectral.input)({
1129
+ label: "Alternate Email",
1130
+ type: "string",
1131
+ required: false,
1132
+ comments: "The secondary email address associated with the Domo user profile.",
1133
+ placeholder: "Enter alternate email address",
1134
+ example: "john.doe.alternate@example.com",
1135
+ clean: _prismatic_io_spectral.util.types.toString
1136
+ });
1137
+ const employeeNumber = (0, _prismatic_io_spectral.input)({
1138
+ label: "Employee Number",
1139
+ type: "string",
1140
+ required: false,
1141
+ comments: "The employee identification number within the organization.",
1142
+ placeholder: "Enter employee number",
1143
+ example: "23432",
1144
+ clean: _prismatic_io_spectral.util.types.toString
1145
+ });
1146
+ const locale = (0, _prismatic_io_spectral.input)({
1147
+ label: "Locale",
1148
+ type: "string",
1149
+ required: false,
1150
+ comments: "The locale code used to display system settings throughout the Domo application.",
1151
+ placeholder: "Enter locale",
1152
+ example: "en_US",
1153
+ clean: _prismatic_io_spectral.util.types.toString
1154
+ });
1155
+ const location = (0, _prismatic_io_spectral.input)({
1156
+ label: "Location",
1157
+ type: "string",
1158
+ required: false,
1159
+ comments: "The office location or geographic area for the user profile.",
1160
+ placeholder: "Enter location",
1161
+ example: "American Fork",
1162
+ clean: _prismatic_io_spectral.util.types.toString
1163
+ });
1164
+ const phone = (0, _prismatic_io_spectral.input)({
1165
+ label: "Phone",
1166
+ type: "string",
1167
+ required: false,
1168
+ comments: "The primary phone number for the Domo user profile.",
1169
+ placeholder: "Enter phone number",
1170
+ example: "888-361-1078",
1171
+ clean: _prismatic_io_spectral.util.types.toString
1172
+ });
1173
+ const sendInvite = (0, _prismatic_io_spectral.input)({
1174
+ label: "Send Invite",
1175
+ type: "string",
1176
+ required: false,
1177
+ comments: "When true, sends an email invitation to the newly created user.",
1178
+ placeholder: "Enter true or false",
1179
+ example: "true",
1180
+ clean: _prismatic_io_spectral.util.types.toString
1181
+ });
1182
+ const timezone = (0, _prismatic_io_spectral.input)({
1183
+ label: "Timezone",
1184
+ type: "string",
1185
+ required: false,
1186
+ comments: "The IANA timezone identifier used to display system times throughout the Domo application.",
1187
+ placeholder: "Enter timezone",
1188
+ example: "America/Denver",
1189
+ clean: _prismatic_io_spectral.util.types.toString
1190
+ });
1191
+ const title = (0, _prismatic_io_spectral.input)({
1192
+ label: "Title",
1193
+ type: "string",
1194
+ required: false,
1195
+ comments: "The job title for the Domo user profile.",
1196
+ placeholder: "Enter job title",
1197
+ example: "Software Engineer",
1198
+ clean: _prismatic_io_spectral.util.types.toString
1199
+ });
1200
+ const userBody = (0, _prismatic_io_spectral.input)({
1201
+ label: "User Body",
1202
+ type: "code",
1203
+ language: "json",
1204
+ required: false,
1205
+ comments: "The user object to create.",
1206
+ example: JSON.stringify({
1207
+ title: "Software Engineer",
1208
+ email: "leonhard.euler@domo.com",
1209
+ alternateEmail: "leonhardeuler@email.com",
1210
+ role: "Admin",
1211
+ phone: "888-361-1078",
1212
+ name: "Leonhard Euler",
1213
+ location: "American Fork",
1214
+ timezone: "America/Denver",
1215
+ locale: "en_US",
1216
+ employeeNumber: 23432
1217
+ }, null, 2),
1218
+ clean: _prismatic_io_spectral.util.types.toString
1219
+ });
1220
+ const updateUserBody = (0, _prismatic_io_spectral.input)({
1221
+ label: "Update User Body",
1222
+ type: "code",
1223
+ language: "json",
1224
+ required: false,
1225
+ comments: "The user object to update.",
1226
+ example: JSON.stringify({
1227
+ email: "leonhard.euler@domo.com",
1228
+ role: "Admin",
1229
+ name: "Leonhard Euler"
1230
+ }, null, 2),
1231
+ clean: _prismatic_io_spectral.util.types.toString
1232
+ });
1233
+ const createUserInputs = {
1234
+ connection: connection$1,
1235
+ email,
1236
+ role,
1237
+ name,
1238
+ sendInvite,
1239
+ profile: (0, _prismatic_io_spectral.structuredObjectInput)({
1240
+ label: "Contact Information",
1241
+ required: false,
1242
+ comments: "Additional user profile details.",
1243
+ inputs: {
1244
+ alternateEmail,
1245
+ employeeNumber,
1246
+ locale,
1247
+ location,
1248
+ phone,
1249
+ timezone,
1250
+ title
1251
+ }
1252
+ }),
1253
+ userBody
1254
+ };
1255
+ const deleteUserInputs = {
1256
+ connection: connection$1,
1257
+ userId
1258
+ };
1259
+ const getUserInputs = {
1260
+ connection: connection$1,
1261
+ userId
1262
+ };
1263
+ const listUsersInputs = {
1264
+ connection: connection$1,
1265
+ fetchAll,
1266
+ pagination: (0, _prismatic_io_spectral.structuredObjectInput)({
1267
+ label: "Pagination",
1268
+ required: false,
1269
+ comments: "Page and page-size controls.",
1270
+ inputs: {
1271
+ limit: (0, _prismatic_io_spectral.input)({
1272
+ ...limit,
1273
+ required: false,
1274
+ comments: "The amount of users to return in the list. The default is 50 and the maximum is 500."
1275
+ }),
1276
+ offset: (0, _prismatic_io_spectral.input)({
1277
+ ...offset,
1278
+ required: false,
1279
+ comments: "The offset of the user ID to begin list of users within the response."
1280
+ })
1281
+ }
1282
+ })
1283
+ };
1284
+ const updateUserInputs = {
1285
+ connection: connection$1,
1286
+ userId,
1287
+ email: (0, _prismatic_io_spectral.input)({
1288
+ ...email,
1289
+ required: false
1290
+ }),
1291
+ name: (0, _prismatic_io_spectral.input)({
1292
+ ...name,
1293
+ required: false,
1294
+ comments: "User's full name"
1295
+ }),
1296
+ role: (0, _prismatic_io_spectral.input)({
1297
+ ...role,
1298
+ required: false,
1299
+ comments: "The system role of the user"
1300
+ }),
1301
+ roled,
1302
+ profile: (0, _prismatic_io_spectral.structuredObjectInput)({
1303
+ label: "Contact Information",
1304
+ required: false,
1305
+ comments: "Additional user profile details.",
1306
+ inputs: {
1307
+ alternateEmail,
1308
+ employeeNumber,
1309
+ locale,
1310
+ location,
1311
+ phone,
1312
+ timezone,
1313
+ title
1314
+ }
1315
+ }),
1316
+ updateUserBody
1317
+ };
1318
+ //#endregion
1319
+ //#region src/inputs/groups.ts
1320
+ const groupId = (0, _prismatic_io_spectral.input)({
1321
+ label: "Group ID",
1322
+ comments: "The unique identifier for the group.",
1323
+ type: "string",
1324
+ required: true,
1325
+ placeholder: "Enter Group ID",
1326
+ example: "871428330",
1327
+ dataSource: "groups",
1328
+ clean: _prismatic_io_spectral.util.types.toString
1329
+ });
1330
+ const updateGroupBody = (0, _prismatic_io_spectral.input)({
1331
+ label: "Update Group Body",
1332
+ type: "code",
1333
+ language: "json",
1334
+ required: false,
1335
+ comments: "The group object to update.",
1336
+ example: JSON.stringify({
1337
+ name: "Groupy McGroup",
1338
+ active: true
1339
+ }, null, 2),
1340
+ clean: _prismatic_io_spectral.util.types.toString
1341
+ });
1342
+ const addUserToGroupInputs = {
1343
+ connection: connection$1,
1344
+ groupId,
1345
+ userId
1346
+ };
1347
+ const createGroupInputs = {
1348
+ connection: connection$1,
1349
+ name: (0, _prismatic_io_spectral.input)({
1350
+ ...name,
1351
+ required: true,
1352
+ comments: "The name of the group."
1353
+ })
1354
+ };
1355
+ const deleteGroupInputs = {
1356
+ connection: connection$1,
1357
+ groupId: (0, _prismatic_io_spectral.input)({
1358
+ ...groupId,
1359
+ required: true,
1360
+ comments: "The ID of the group to delete."
1361
+ })
1362
+ };
1363
+ const getGroupInputs = {
1364
+ connection: connection$1,
1365
+ groupId
1366
+ };
1367
+ const listGroupsInputs = {
1368
+ connection: connection$1,
1369
+ fetchAll,
1370
+ pagination: (0, _prismatic_io_spectral.structuredObjectInput)({
1371
+ label: "Pagination",
1372
+ required: false,
1373
+ comments: "Page and page-size controls.",
1374
+ inputs: {
1375
+ limit: (0, _prismatic_io_spectral.input)({
1376
+ ...limit,
1377
+ required: false,
1378
+ comments: "The amount of groups to return in the list. The default is 50 and the maximum is 500."
1379
+ }),
1380
+ offset: (0, _prismatic_io_spectral.input)({
1381
+ ...offset,
1382
+ required: false,
1383
+ comments: "The offset of the group ID to begin list of groups within the response."
1384
+ })
1385
+ }
1386
+ })
1387
+ };
1388
+ const listUsersInGroupInputs = {
1389
+ connection: connection$1,
1390
+ groupId,
1391
+ fetchAll,
1392
+ pagination: (0, _prismatic_io_spectral.structuredObjectInput)({
1393
+ label: "Pagination",
1394
+ required: false,
1395
+ comments: "Page and page-size controls.",
1396
+ inputs: {
1397
+ limit: (0, _prismatic_io_spectral.input)({
1398
+ ...limit,
1399
+ required: false,
1400
+ comments: "The amount of groups to return in the list. The default is 50 and the maximum is 500."
1401
+ }),
1402
+ offset: (0, _prismatic_io_spectral.input)({
1403
+ ...offset,
1404
+ required: false,
1405
+ comments: "The offset of the group ID to begin list of groups within the response."
1406
+ })
1407
+ }
1408
+ })
1409
+ };
1410
+ const removeUserFromGroupInputs = {
1411
+ connection: connection$1,
1412
+ groupId,
1413
+ userId
1414
+ };
1415
+ const updateGroupInputs = {
1416
+ connection: connection$1,
1417
+ groupId,
1418
+ updateGroupBody
1419
+ };
1420
+ const getActivityLogEntriesInputs = {
1421
+ connection: connection$1,
1422
+ start: (0, _prismatic_io_spectral.input)({
1423
+ label: "Start",
1424
+ type: "string",
1425
+ required: true,
1426
+ comments: "The start time in milliseconds for the activity log query range.",
1427
+ placeholder: "Enter start time (milliseconds)",
1428
+ example: "1609459200000",
1429
+ clean: _prismatic_io_spectral.util.types.toString
1430
+ }),
1431
+ end: (0, _prismatic_io_spectral.input)({
1432
+ label: "End",
1433
+ type: "string",
1434
+ required: false,
1435
+ comments: "The end time in milliseconds for the activity log query range.",
1436
+ placeholder: "Enter end time (milliseconds)",
1437
+ example: "1640995200000",
1438
+ clean: _prismatic_io_spectral.util.types.toString
1439
+ }),
1440
+ fetchAll,
1441
+ user: (0, _prismatic_io_spectral.input)({
1442
+ label: "User",
1443
+ type: "string",
1444
+ required: false,
1445
+ comments: "The unique identifier for the user to filter activity log entries by.",
1446
+ placeholder: "Enter User ID",
1447
+ example: "959463190",
1448
+ clean: _prismatic_io_spectral.util.types.toString
1449
+ }),
1450
+ pagination: (0, _prismatic_io_spectral.structuredObjectInput)({
1451
+ label: "Pagination",
1452
+ required: false,
1453
+ comments: "Page and page-size controls.",
1454
+ inputs: {
1455
+ limit,
1456
+ offset
1457
+ }
1458
+ })
1459
+ };
1460
+ //#endregion
1461
+ //#region src/inputs/pages.ts
1462
+ const pageId = (0, _prismatic_io_spectral.input)({
1463
+ label: "Page ID",
1464
+ type: "string",
1465
+ required: true,
1466
+ comments: "The unique identifier for the Domo page.",
1467
+ placeholder: "Enter Page ID",
1468
+ example: "123456",
1469
+ dataSource: "pages",
1470
+ clean: _prismatic_io_spectral.util.types.toString
1471
+ });
1472
+ const parentId = (0, _prismatic_io_spectral.input)({
1473
+ label: "Parent ID",
1474
+ comments: "The unique identifier of the parent page. If provided, the page will be created as a subpage.",
1475
+ type: "string",
1476
+ required: false,
1477
+ placeholder: "Enter Parent ID",
1478
+ example: "123456",
1479
+ clean: _prismatic_io_spectral.util.types.toString
1480
+ });
1481
+ const locked = (0, _prismatic_io_spectral.input)({
1482
+ label: "Locked",
1483
+ comments: "When true, restricts other users the ability to make edits to page or its content.",
1484
+ type: "string",
1485
+ required: false,
1486
+ default: "",
1487
+ placeholder: "Select lock status",
1488
+ model: [
1489
+ {
1490
+ label: "",
1491
+ value: ""
1492
+ },
1493
+ {
1494
+ label: "TRUE",
1495
+ value: "TRUE"
1496
+ },
1497
+ {
1498
+ label: "FALSE",
1499
+ value: "FALSE"
1500
+ }
1501
+ ],
1502
+ clean: _prismatic_io_spectral.util.types.toString
1503
+ });
1504
+ const cardIds = (0, _prismatic_io_spectral.input)({
1505
+ label: "Card ID",
1506
+ comments: "The ID of the card to add to the page.",
1507
+ type: "string",
1508
+ collection: "valuelist",
1509
+ required: false,
1510
+ placeholder: "Enter Card IDs",
1511
+ example: "[\"123\", \"456\"]",
1512
+ clean: (stringsArray) => (Array.isArray(stringsArray) ? stringsArray : []).map((string) => _prismatic_io_spectral.util.types.toInt(string))
1513
+ });
1514
+ const userIds = (0, _prismatic_io_spectral.input)({
1515
+ label: "User ID",
1516
+ comments: "The ID of the user that will be given access to view the page.",
1517
+ type: "string",
1518
+ collection: "valuelist",
1519
+ required: false,
1520
+ placeholder: "Enter User IDs",
1521
+ example: "[\"959463190\", \"871428330\"]",
1522
+ clean: (stringsArray) => (Array.isArray(stringsArray) ? stringsArray : []).map((string) => _prismatic_io_spectral.util.types.toInt(string))
1523
+ });
1524
+ const groupIds = (0, _prismatic_io_spectral.input)({
1525
+ label: "Group ID",
1526
+ comments: "The ID of the group that will be given access to view the page.",
1527
+ type: "string",
1528
+ collection: "valuelist",
1529
+ required: false,
1530
+ placeholder: "Enter Group IDs",
1531
+ example: "[\"100\", \"200\"]",
1532
+ clean: (stringsArray) => (Array.isArray(stringsArray) ? stringsArray : []).map((string) => _prismatic_io_spectral.util.types.toInt(string))
1533
+ });
1534
+ const updatePageBody = (0, _prismatic_io_spectral.input)({
1535
+ label: "Update Page Body",
1536
+ type: "code",
1537
+ language: "json",
1538
+ required: true,
1539
+ comments: "The page object to update.",
1540
+ example: JSON.stringify({
1541
+ page_id: 0,
1542
+ name: "Sales Dashboard",
1543
+ parentId: 0,
1544
+ locked: true,
1545
+ collectionIds: [0],
1546
+ cardIds: [0],
1547
+ visibility: {
1548
+ userIds: [0],
1549
+ groupIds: [0]
1550
+ }
1551
+ }, null, 2),
1552
+ clean: _prismatic_io_spectral.util.types.toString
1553
+ });
1554
+ const createPageInputs = {
1555
+ connection: connection$1,
1556
+ name: (0, _prismatic_io_spectral.input)({
1557
+ ...name,
1558
+ comments: "The name of the page."
1559
+ }),
1560
+ parentId,
1561
+ locked,
1562
+ cardIds,
1563
+ userIds,
1564
+ groupIds
1565
+ };
1566
+ const deletePageInputs = {
1567
+ connection: connection$1,
1568
+ pageId
1569
+ };
1570
+ const getPageInputs = {
1571
+ connection: connection$1,
1572
+ pageId
1573
+ };
1574
+ const listPagesInputs = {
1575
+ connection: connection$1,
1576
+ fetchAll,
1577
+ pagination: (0, _prismatic_io_spectral.structuredObjectInput)({
1578
+ label: "Pagination",
1579
+ required: false,
1580
+ comments: "Page and page-size controls.",
1581
+ inputs: {
1582
+ limit: (0, _prismatic_io_spectral.input)({
1583
+ ...limit,
1584
+ required: false,
1585
+ comments: "The amount of pages to return in the list. The default is 50 and the maximum is 500."
1586
+ }),
1587
+ offset: (0, _prismatic_io_spectral.input)({
1588
+ ...offset,
1589
+ required: false,
1590
+ comments: "The offset of the page ID to begin list of pages within the response."
1591
+ })
1592
+ }
1593
+ })
1594
+ };
1595
+ const updatePageInputs = {
1596
+ connection: connection$1,
1597
+ pageId,
1598
+ updatePageBody
1599
+ };
1600
+ //#endregion
1601
+ //#region src/inputs/projects.ts
1602
+ const projectId = (0, _prismatic_io_spectral.input)({
1603
+ label: "Project ID",
1604
+ comments: "The unique identifier for the project.",
1605
+ type: "string",
1606
+ required: true,
1607
+ placeholder: "Enter Project ID",
1608
+ example: "123",
1609
+ dataSource: "projects",
1610
+ clean: _prismatic_io_spectral.util.types.toString
1611
+ });
1612
+ const listId = (0, _prismatic_io_spectral.input)({
1613
+ label: "List ID",
1614
+ comments: "The unique identifier for the project list.",
1615
+ type: "string",
1616
+ required: true,
1617
+ placeholder: "Enter List ID",
1618
+ example: "456",
1619
+ dataSource: "projectLists",
1620
+ clean: _prismatic_io_spectral.util.types.toString
1621
+ });
1622
+ const taskId = (0, _prismatic_io_spectral.input)({
1623
+ label: "Task ID",
1624
+ comments: "The unique identifier for the task within a project list.",
1625
+ type: "string",
1626
+ required: true,
1627
+ placeholder: "Enter Task ID",
1628
+ example: "789",
1629
+ dataSource: "selectTask",
1630
+ clean: _prismatic_io_spectral.util.types.toString
1631
+ });
1632
+ const attachmentId = (0, _prismatic_io_spectral.input)({
1633
+ label: "Attachment ID",
1634
+ type: "string",
1635
+ required: true,
1636
+ comments: "The unique identifier for the project attachment.",
1637
+ placeholder: "Enter Attachment ID",
1638
+ example: "67890",
1639
+ clean: _prismatic_io_spectral.util.types.toString
1640
+ });
1641
+ const members = (0, _prismatic_io_spectral.input)({
1642
+ label: "Members",
1643
+ comments: "Array of user IDs that will be assigned as members of the project.",
1644
+ type: "string",
1645
+ required: true,
1646
+ placeholder: "Enter member user IDs",
1647
+ example: "[27, 105, 93]",
1648
+ clean: _prismatic_io_spectral.util.types.toString
1649
+ });
1650
+ const publicInput = (0, _prismatic_io_spectral.input)({
1651
+ label: "Public",
1652
+ comments: "When true, the project will be publicly available to other Domo users.",
1653
+ type: "string",
1654
+ required: true,
1655
+ default: "true",
1656
+ placeholder: "Select visibility",
1657
+ model: [{
1658
+ label: "TRUE",
1659
+ value: "true"
1660
+ }, {
1661
+ label: "FALSE",
1662
+ value: "false"
1663
+ }],
1664
+ clean: _prismatic_io_spectral.util.types.toString
1665
+ });
1666
+ const membersArray = (0, _prismatic_io_spectral.input)({
1667
+ label: "Member ID",
1668
+ type: "string",
1669
+ collection: "valuelist",
1670
+ comments: "User IDs of members to include in the project.",
1671
+ required: false,
1672
+ placeholder: "Enter Member IDs",
1673
+ example: "[\"27\", \"105\", \"93\"]",
1674
+ clean: (stringsArray) => (Array.isArray(stringsArray) ? stringsArray : []).map((string) => _prismatic_io_spectral.util.types.toInt(string))
1675
+ });
1676
+ const publicBody = (0, _prismatic_io_spectral.input)({
1677
+ label: "Public Body",
1678
+ type: "string",
1679
+ required: false,
1680
+ comments: "When true, makes the resource publicly visible to other Domo users.",
1681
+ default: "",
1682
+ placeholder: "Select public visibility",
1683
+ model: [
1684
+ {
1685
+ label: "",
1686
+ value: ""
1687
+ },
1688
+ {
1689
+ label: "TRUE",
1690
+ value: "TRUE"
1691
+ },
1692
+ {
1693
+ label: "FALSE",
1694
+ value: "FALSE"
1695
+ }
1696
+ ],
1697
+ clean: _prismatic_io_spectral.util.types.toString
1698
+ });
1699
+ const type = (0, _prismatic_io_spectral.input)({
1700
+ label: "Type",
1701
+ comments: "The workflow status category for the list (e.g., TODO, WORKING_ON, COMPLETED).",
1702
+ type: "string",
1703
+ required: true,
1704
+ model: [
1705
+ {
1706
+ label: "TODO",
1707
+ value: "TODO"
1708
+ },
1709
+ {
1710
+ label: "WORKING_ON",
1711
+ value: "WORKING_ON"
1712
+ },
1713
+ {
1714
+ label: "COMPLETED",
1715
+ value: "COMPLETED"
1716
+ }
1717
+ ],
1718
+ clean: _prismatic_io_spectral.util.types.toString
1719
+ });
1720
+ const index = (0, _prismatic_io_spectral.input)({
1721
+ label: "Index",
1722
+ comments: "The ordered position of the list within the project. Setting this property will re-order other lists to maintain sequential order. Defaults to 1 if not provided.",
1723
+ type: "string",
1724
+ required: false,
1725
+ placeholder: "Enter index position",
1726
+ example: "1",
1727
+ clean: _prismatic_io_spectral.util.types.toString
1728
+ });
1729
+ const taskName = (0, _prismatic_io_spectral.input)({
1730
+ label: "Task Name",
1731
+ type: "string",
1732
+ required: true,
1733
+ comments: "A descriptive label for the task within the project list.",
1734
+ placeholder: "Enter task name",
1735
+ example: "Complete project review",
1736
+ clean: _prismatic_io_spectral.util.types.toString
1737
+ });
1738
+ const contributors = (0, _prismatic_io_spectral.input)({
1739
+ label: "Contributors",
1740
+ type: "string",
1741
+ required: false,
1742
+ comments: "A JSON array of user IDs assigned as contributors to the task.",
1743
+ placeholder: "Enter contributor user IDs",
1744
+ example: "[27, 105]",
1745
+ clean: _prismatic_io_spectral.util.types.toString
1746
+ });
1747
+ const ownedBy = (0, _prismatic_io_spectral.input)({
1748
+ label: "Owned By",
1749
+ type: "string",
1750
+ required: false,
1751
+ comments: "The unique identifier of the Domo user that owns the task.",
1752
+ placeholder: "Enter owner user ID",
1753
+ example: "959463190",
1754
+ clean: _prismatic_io_spectral.util.types.toString
1755
+ });
1756
+ const priority = (0, _prismatic_io_spectral.input)({
1757
+ label: "Priority",
1758
+ type: "string",
1759
+ required: false,
1760
+ comments: "The priority position of the task within the list. Setting this property re-orders other tasks to maintain sequential order. Defaults to 1 if not provided.",
1761
+ placeholder: "Enter priority",
1762
+ example: "3",
1763
+ clean: _prismatic_io_spectral.util.types.toString
1764
+ });
1765
+ const tags = (0, _prismatic_io_spectral.input)({
1766
+ label: "Tags",
1767
+ type: "string",
1768
+ required: false,
1769
+ comments: "A JSON array of tag labels to assign to the task for categorization.",
1770
+ placeholder: "Enter tags",
1771
+ example: "[\"urgent\", \"review\"]",
1772
+ clean: _prismatic_io_spectral.util.types.toString
1773
+ });
1774
+ const taskObjectBody = (0, _prismatic_io_spectral.input)({
1775
+ label: "Task Object",
1776
+ type: "code",
1777
+ language: "json",
1778
+ required: false,
1779
+ comments: "The task object to create or update.",
1780
+ example: JSON.stringify({
1781
+ id: "3",
1782
+ projectId: "2",
1783
+ projectListId: "4",
1784
+ taskName: "Business Plan Review",
1785
+ priority: 3,
1786
+ contributors: [27],
1787
+ tags: [],
1788
+ archived: false
1789
+ }, null, 2),
1790
+ clean: _prismatic_io_spectral.util.types.toString
1791
+ });
1792
+ const updateProjectMembersBody = (0, _prismatic_io_spectral.input)({
1793
+ label: "Update Project Members Body",
1794
+ type: "code",
1795
+ language: "json",
1796
+ required: false,
1797
+ comments: "Array of user IDs to assign as members of the project.",
1798
+ example: JSON.stringify([
1799
+ 27,
1800
+ 105,
1801
+ 93,
1802
+ 84,
1803
+ 107
1804
+ ], null, 2),
1805
+ clean: _prismatic_io_spectral.util.types.toString
1806
+ });
1807
+ const updateTaskBody = (0, _prismatic_io_spectral.input)({
1808
+ label: "Update Task Body",
1809
+ type: "code",
1810
+ language: "json",
1811
+ required: false,
1812
+ comments: "The task object to update.",
1813
+ example: JSON.stringify({
1814
+ id: "3",
1815
+ projectId: "2",
1816
+ projectListId: "4",
1817
+ taskName: "Project Scaffolding and Infrastructure",
1818
+ priority: 3,
1819
+ contributors: [27],
1820
+ tags: [],
1821
+ archived: false
1822
+ }, null, 2),
1823
+ clean: _prismatic_io_spectral.util.types.toString
1824
+ });
1825
+ const updateListBody = (0, _prismatic_io_spectral.input)({
1826
+ label: "Update List Body",
1827
+ type: "code",
1828
+ language: "json",
1829
+ required: false,
1830
+ comments: "The list object to update.",
1831
+ example: JSON.stringify({
1832
+ name: "Needs QA",
1833
+ type: "TODO",
1834
+ index: 3
1835
+ }, null, 2),
1836
+ clean: _prismatic_io_spectral.util.types.toString
1837
+ });
1838
+ const updateProjectBody = (0, _prismatic_io_spectral.input)({
1839
+ label: "Update Project Body",
1840
+ type: "code",
1841
+ language: "json",
1842
+ required: false,
1843
+ comments: "The project object to update.",
1844
+ example: JSON.stringify({ name: "Marketing Campaign" }, null, 2),
1845
+ clean: _prismatic_io_spectral.util.types.toString
1846
+ });
1847
+ const createListInputs = {
1848
+ connection: connection$1,
1849
+ name: (0, _prismatic_io_spectral.input)({
1850
+ ...name,
1851
+ required: true,
1852
+ comments: "The name of the list."
1853
+ }),
1854
+ type,
1855
+ index,
1856
+ projectId
1857
+ };
1858
+ const createProjectInputs = {
1859
+ connection: connection$1,
1860
+ members,
1861
+ name: (0, _prismatic_io_spectral.input)({
1862
+ ...name,
1863
+ required: true,
1864
+ comments: "The name of the project."
1865
+ }),
1866
+ publicInput,
1867
+ description: (0, _prismatic_io_spectral.input)({
1868
+ ...description,
1869
+ required: false,
1870
+ comments: "The description of the project."
1871
+ }),
1872
+ dueDate,
1873
+ membersArray,
1874
+ publicBody,
1875
+ bodyName: (0, _prismatic_io_spectral.input)({
1876
+ ...name,
1877
+ required: false,
1878
+ comments: "Body name"
1879
+ })
1880
+ };
1881
+ const createTaskInputs = {
1882
+ connection: connection$1,
1883
+ projectId: (0, _prismatic_io_spectral.input)({
1884
+ ...projectId,
1885
+ required: true,
1886
+ comments: "The ID of the project that the task belongs to."
1887
+ }),
1888
+ listId: (0, _prismatic_io_spectral.input)({
1889
+ ...listId,
1890
+ required: true,
1891
+ comments: "The ID of the list within a project that the task belongs to."
1892
+ }),
1893
+ taskName,
1894
+ taskDetails: (0, _prismatic_io_spectral.structuredObjectInput)({
1895
+ label: "Task Details",
1896
+ required: false,
1897
+ comments: "Additional task attributes.",
1898
+ inputs: {
1899
+ contributors,
1900
+ description: (0, _prismatic_io_spectral.input)({
1901
+ ...description,
1902
+ required: false,
1903
+ comments: "An optional description of the task."
1904
+ }),
1905
+ dueDate: (0, _prismatic_io_spectral.input)({
1906
+ ...dueDate,
1907
+ required: false,
1908
+ comments: "The date the task is expected to be completed."
1909
+ }),
1910
+ ownedBy,
1911
+ priority,
1912
+ tags,
1913
+ taskObjectBody
1914
+ }
1915
+ })
1916
+ };
1917
+ const deleteListInputs = {
1918
+ connection: connection$1,
1919
+ projectId,
1920
+ listId
1921
+ };
1922
+ const deleteProjectInputs = {
1923
+ connection: connection$1,
1924
+ projectId
1925
+ };
1926
+ const getListInputs = {
1927
+ connection: connection$1,
1928
+ projectId,
1929
+ listId
1930
+ };
1931
+ const getListOfAttachmentsInputs = {
1932
+ connection: connection$1,
1933
+ projectId,
1934
+ listId,
1935
+ taskId
1936
+ };
1937
+ const getProjectInputs = {
1938
+ connection: connection$1,
1939
+ projectId
1940
+ };
1941
+ const getProjectMembersInputs = {
1942
+ connection: connection$1,
1943
+ projectId
1944
+ };
1945
+ const getTaskInputs = {
1946
+ connection: connection$1,
1947
+ listId,
1948
+ projectId,
1949
+ taskId
1950
+ };
1951
+ const listProjectListsInputs = {
1952
+ connection: connection$1,
1953
+ projectId
1954
+ };
1955
+ const listProjectListTasksInputs = {
1956
+ connection: connection$1,
1957
+ projectId,
1958
+ listId,
1959
+ fetchAll,
1960
+ pagination: (0, _prismatic_io_spectral.structuredObjectInput)({
1961
+ label: "Pagination",
1962
+ required: false,
1963
+ comments: "Page and page-size controls.",
1964
+ inputs: {
1965
+ limit: (0, _prismatic_io_spectral.input)({
1966
+ ...limit,
1967
+ required: false,
1968
+ comments: "The maximum number of results to return (defaults to 10 with a maximum of 50)."
1969
+ }),
1970
+ offset: (0, _prismatic_io_spectral.input)({
1971
+ ...offset,
1972
+ required: false,
1973
+ comments: "The number of records to skip from the beginning of the result list (defaults to 0)."
1974
+ })
1975
+ }
1976
+ })
1977
+ };
1978
+ const listProjectsInputs = { connection: connection$1 };
1979
+ const updateListInputs = {
1980
+ connection: connection$1,
1981
+ listId,
1982
+ projectId,
1983
+ index: (0, _prismatic_io_spectral.input)({
1984
+ ...index,
1985
+ required: true,
1986
+ comments: "The updated index of the list within the project. Updating the index of a list may also change the order of the other lists in the project to remain sequential."
1987
+ }),
1988
+ name: (0, _prismatic_io_spectral.input)({
1989
+ ...name,
1990
+ required: true,
1991
+ comments: "The updated name of the list."
1992
+ }),
1993
+ type,
1994
+ updateListBody
1995
+ };
1996
+ const updateProjectInputs = {
1997
+ connection: connection$1,
1998
+ projectId,
1999
+ projectDetails: (0, _prismatic_io_spectral.structuredObjectInput)({
2000
+ label: "Project Details",
2001
+ required: false,
2002
+ comments: "Project attributes to update.",
2003
+ inputs: {
2004
+ description: (0, _prismatic_io_spectral.input)({
2005
+ ...description,
2006
+ required: false,
2007
+ comments: "Updates the description of the project."
2008
+ }),
2009
+ dueDate: (0, _prismatic_io_spectral.input)({
2010
+ ...dueDate,
2011
+ required: false,
2012
+ comments: "Updates the due date of the project."
2013
+ }),
2014
+ name: (0, _prismatic_io_spectral.input)({
2015
+ ...name,
2016
+ required: false,
2017
+ comments: "Updates the name of the project."
2018
+ }),
2019
+ publicUpdate: (0, _prismatic_io_spectral.input)({
2020
+ ...publicInput,
2021
+ required: false,
2022
+ comments: "Updates whether or not the project is publicly available to Domo users.",
2023
+ default: "",
2024
+ model: [
2025
+ {
2026
+ label: "",
2027
+ value: ""
2028
+ },
2029
+ {
2030
+ label: "TRUE",
2031
+ value: "true"
2032
+ },
2033
+ {
2034
+ label: "FALSE",
2035
+ value: "false"
2036
+ }
2037
+ ]
2038
+ }),
2039
+ updateProjectBody
2040
+ }
2041
+ })
2042
+ };
2043
+ const updateProjectMembersInputs = {
2044
+ connection: connection$1,
2045
+ projectId,
2046
+ updateProjectMembersBody
2047
+ };
2048
+ const updateTaskInputs = {
2049
+ connection: connection$1,
2050
+ taskId,
2051
+ listId,
2052
+ projectId,
2053
+ taskName,
2054
+ taskDetails: (0, _prismatic_io_spectral.structuredObjectInput)({
2055
+ label: "Task Details",
2056
+ required: false,
2057
+ comments: "Additional task attributes.",
2058
+ inputs: {
2059
+ description,
2060
+ contributors,
2061
+ dueDate,
2062
+ ownedBy,
2063
+ priority,
2064
+ tags,
2065
+ updateTaskBody
2066
+ }
2067
+ })
2068
+ };
2069
+ const addAttachmentInputs = {
2070
+ connection: connection$1,
2071
+ projectId,
2072
+ listId,
2073
+ taskId
2074
+ };
2075
+ const deleteAttachmentInputs = {
2076
+ connection: connection$1,
2077
+ projectId: (0, _prismatic_io_spectral.input)({
2078
+ ...projectId,
2079
+ required: true,
2080
+ comments: "The ID of the project that the attachment belongs to."
2081
+ }),
2082
+ taskId: (0, _prismatic_io_spectral.input)({
2083
+ ...taskId,
2084
+ required: true,
2085
+ comments: "The ID of the task that the attachment belongs to."
2086
+ }),
2087
+ attachmentId
2088
+ };
2089
+ const downloadAttachmentInputs = {
2090
+ connection: connection$1,
2091
+ listId,
2092
+ projectId,
2093
+ taskId,
2094
+ attachmentId
2095
+ };
2096
+ //#endregion
2097
+ //#region src/inputs/streams.ts
2098
+ const streamId = (0, _prismatic_io_spectral.input)({
2099
+ label: "Stream ID",
2100
+ comments: "The ID of the Stream of data being imported into a DataSet.",
2101
+ type: "string",
2102
+ required: true,
2103
+ placeholder: "Enter Stream ID",
2104
+ example: "67890",
2105
+ dataSource: "streams",
2106
+ clean: _prismatic_io_spectral.util.types.toString
2107
+ });
2108
+ const executionId = (0, _prismatic_io_spectral.input)({
2109
+ label: "Execution ID",
2110
+ comments: "The unique identifier for the Stream execution. If not provided, the current Stream execution will be aborted.",
2111
+ type: "string",
2112
+ required: true,
2113
+ placeholder: "Enter Execution ID",
2114
+ example: "12345",
2115
+ dataSource: "selectStreamExecution",
2116
+ clean: _prismatic_io_spectral.util.types.toString
2117
+ });
2118
+ const partId = (0, _prismatic_io_spectral.input)({
2119
+ label: "Part ID",
2120
+ comments: "The ID of the data part being used to upload a subset of data within the Stream execution.",
2121
+ type: "string",
2122
+ required: true,
2123
+ placeholder: "Enter Part ID",
2124
+ example: "1",
2125
+ clean: _prismatic_io_spectral.util.types.toString
2126
+ });
2127
+ const dataSet = (0, _prismatic_io_spectral.input)({
2128
+ label: "DataSet Object",
2129
+ comments: "The DataSet object associated with this Stream.",
2130
+ type: "string",
2131
+ collection: "valuelist",
2132
+ required: true,
2133
+ placeholder: "Enter DataSet fields",
2134
+ example: "[\"id\", \"name\", \"description\"]",
2135
+ clean: (stringsArray) => (Array.isArray(stringsArray) ? stringsArray : []).map((string) => _prismatic_io_spectral.util.types.toString(string))
2136
+ });
2137
+ const updateMethod = (0, _prismatic_io_spectral.input)({
2138
+ label: "Update Method",
2139
+ type: "string",
2140
+ required: false,
2141
+ default: "",
2142
+ comments: "The data import behavior.",
2143
+ placeholder: "Select update method",
2144
+ model: [
2145
+ {
2146
+ label: "",
2147
+ value: ""
2148
+ },
2149
+ {
2150
+ label: "APPEND",
2151
+ value: "APPEND"
2152
+ },
2153
+ {
2154
+ label: "REPLACE",
2155
+ value: "REPLACE"
2156
+ }
2157
+ ],
2158
+ clean: _prismatic_io_spectral.util.types.toString
2159
+ });
2160
+ const updateMethodString = (0, _prismatic_io_spectral.input)({
2161
+ label: "Update Method",
2162
+ type: "string",
2163
+ required: true,
2164
+ comments: "The data import behavior.",
2165
+ placeholder: "Enter update method",
2166
+ example: "REPLACE",
2167
+ clean: _prismatic_io_spectral.util.types.toString
2168
+ });
2169
+ const updateMethodBody = (0, _prismatic_io_spectral.input)({
2170
+ label: "Update Method Body",
2171
+ type: "code",
2172
+ language: "json",
2173
+ required: false,
2174
+ comments: "The update method configuration.",
2175
+ example: JSON.stringify({ updateMethod: "REPLACE" }, null, 2),
2176
+ clean: _prismatic_io_spectral.util.types.toString
2177
+ });
2178
+ const fields = (0, _prismatic_io_spectral.input)({
2179
+ label: "Fields",
2180
+ type: "string",
2181
+ required: false,
2182
+ comments: "The fields to include in the response: all, id, dataset, updateMethod, createdAt, or modifiedAt.",
2183
+ placeholder: "Enter fields",
2184
+ example: "all",
2185
+ clean: _prismatic_io_spectral.util.types.toString
2186
+ });
2187
+ const qualifiers = (0, _prismatic_io_spectral.input)({
2188
+ label: "Qualifiers",
2189
+ type: "string",
2190
+ required: true,
2191
+ comments: "The search qualifier expression to filter streams (e.g., dataSource.id or dataSource.owner.id).",
2192
+ placeholder: "Enter qualifiers",
2193
+ example: "dataSource.id:123",
2194
+ clean: _prismatic_io_spectral.util.types.toString
2195
+ });
2196
+ const abortStreamExecutionInputs = {
2197
+ connection: connection$1,
2198
+ streamId,
2199
+ executionId
2200
+ };
2201
+ const commitStreamExecutionInputs = {
2202
+ connection: connection$1,
2203
+ streamId,
2204
+ executionId: (0, _prismatic_io_spectral.input)({
2205
+ ...executionId,
2206
+ comments: "The ID of the Stream execution within the Stream"
2207
+ })
2208
+ };
2209
+ const createStreamInputs = {
2210
+ connection: connection$1,
2211
+ dataSet,
2212
+ updateMethod,
2213
+ name,
2214
+ description: (0, _prismatic_io_spectral.input)({
2215
+ ...description,
2216
+ required: false,
2217
+ comments: "A summary of the stream DataSet contents and purpose."
2218
+ }),
2219
+ columns: (0, _prismatic_io_spectral.input)({
2220
+ ...columns,
2221
+ required: false,
2222
+ comments: "The column schema definition for the stream DataSet, specified as a JSON array of column objects."
2223
+ }),
2224
+ updateMethodBody: (0, _prismatic_io_spectral.input)({
2225
+ ...updateMethod,
2226
+ required: false,
2227
+ comments: "Update method for body."
2228
+ })
2229
+ };
2230
+ const createStreamExecutionInputs = {
2231
+ connection: connection$1,
2232
+ streamId: (0, _prismatic_io_spectral.input)({
2233
+ ...streamId,
2234
+ required: true,
2235
+ comments: "The ID of the Stream."
2236
+ })
2237
+ };
2238
+ const deleteStreamInputs = {
2239
+ connection: connection$1,
2240
+ streamId: (0, _prismatic_io_spectral.input)({
2241
+ ...streamId,
2242
+ required: true,
2243
+ comments: "The ID of the Stream to delete."
2244
+ })
2245
+ };
2246
+ const getStreamInputs = {
2247
+ connection: connection$1,
2248
+ streamId: (0, _prismatic_io_spectral.input)({
2249
+ ...streamId,
2250
+ required: true,
2251
+ comments: "The id of the stream."
2252
+ }),
2253
+ fields
2254
+ };
2255
+ const getStreamExecutionInputs = {
2256
+ connection: connection$1,
2257
+ streamId: (0, _prismatic_io_spectral.input)({
2258
+ ...streamId,
2259
+ required: true,
2260
+ comments: "The ID of the Stream of data being imported into a DataSet."
2261
+ }),
2262
+ executionId: (0, _prismatic_io_spectral.input)({
2263
+ ...executionId,
2264
+ required: true,
2265
+ comments: "The ID of the Stream execution within the Stream."
2266
+ })
2267
+ };
2268
+ const listStreamExecutionInputs = {
2269
+ connection: connection$1,
2270
+ fetchAll,
2271
+ streamId: (0, _prismatic_io_spectral.input)({
2272
+ ...streamId,
2273
+ required: true,
2274
+ comments: "The ID of the Stream"
2275
+ }),
2276
+ pagination: (0, _prismatic_io_spectral.structuredObjectInput)({
2277
+ label: "Pagination",
2278
+ required: false,
2279
+ comments: "Page and page-size controls.",
2280
+ inputs: {
2281
+ limit: (0, _prismatic_io_spectral.input)({
2282
+ ...limit,
2283
+ required: false,
2284
+ comments: "The amount of Stream to return in the list. The default is 50 and the maximum is 500."
2285
+ }),
2286
+ offset: (0, _prismatic_io_spectral.input)({
2287
+ ...offset,
2288
+ required: false,
2289
+ comments: "The offset of the Stream ID to begin list of users within the response."
2290
+ })
2291
+ }
2292
+ })
2293
+ };
2294
+ const listStreamsInputs = {
2295
+ connection: connection$1,
2296
+ fetchAll,
2297
+ pagination: (0, _prismatic_io_spectral.structuredObjectInput)({
2298
+ label: "Pagination",
2299
+ required: false,
2300
+ comments: "Page and page-size controls.",
2301
+ inputs: {
2302
+ limit: (0, _prismatic_io_spectral.input)({
2303
+ ...limit,
2304
+ required: false,
2305
+ comments: "The amount of Stream to return in the list. The default is 50 and the maximum is 500."
2306
+ }),
2307
+ offset: (0, _prismatic_io_spectral.input)({
2308
+ ...offset,
2309
+ required: false,
2310
+ comments: "The offset of the Stream ID to begin list of users within the response."
2311
+ })
2312
+ }
2313
+ })
2314
+ };
2315
+ const searchStreamInputs = {
2316
+ connection: connection$1,
2317
+ qualifiers,
2318
+ fields
2319
+ };
2320
+ const updateStreamInputs = {
2321
+ connection: connection$1,
2322
+ streamId: (0, _prismatic_io_spectral.input)({
2323
+ ...streamId,
2324
+ required: true,
2325
+ comments: "The ID of the stream to update."
2326
+ }),
2327
+ updateMethodString,
2328
+ updateMethodBody
2329
+ };
2330
+ const uploadDataPartInputs = {
2331
+ connection: connection$1,
2332
+ streamId,
2333
+ executionId: (0, _prismatic_io_spectral.input)({
2334
+ ...executionId,
2335
+ required: true,
2336
+ comments: "The ID of the Stream execution within the Stream."
2337
+ }),
2338
+ partId
2339
+ };
2340
+ //#endregion
2341
+ //#region src/util/buildPollingResult.ts
2342
+ const buildPollingResult = (payload, data) => {
2343
+ const totalChanges = data.created.length + data.updated.length;
2344
+ return {
2345
+ payload: {
2346
+ ...payload,
2347
+ body: { data }
2348
+ },
2349
+ polledNoChanges: totalChanges === 0
2350
+ };
2351
+ };
2352
+ //#endregion
2353
+ //#region src/util/fetchAllRecords.ts
2354
+ const fetchAllRecords = async (client, config) => {
2355
+ const allRecords = [];
2356
+ let offset = 0;
2357
+ while (true) {
2358
+ const { data } = await client.get(config.endpoint, {
2359
+ params: {
2360
+ limit: config.maxPerPage,
2361
+ offset
2362
+ },
2363
+ headers: { Accept: "application/json" }
2364
+ });
2365
+ if (!Array.isArray(data) || data.length === 0) break;
2366
+ allRecords.push(...data);
2367
+ if (data.length < config.maxPerPage) break;
2368
+ offset += data.length;
2369
+ }
2370
+ return allRecords;
2371
+ };
2372
+ //#endregion
2373
+ //#region src/util/filterByNewIds.ts
2374
+ const filterByNewIds = (records, knownIds) => {
2375
+ const knownSet = new Set(knownIds.map(String));
2376
+ return records.filter((record) => !knownSet.has(String(record.id)));
2377
+ };
2378
+ //#endregion
2379
+ //#region src/util/filterByTimestamp.ts
2380
+ const filterByTimestamp = (records, lastPolled, createdAtField, updatedAtField) => {
2381
+ const lastPolledDate = new Date(lastPolled);
2382
+ const created = [];
2383
+ const updated = [];
2384
+ for (const record of records) {
2385
+ const createdAt = createdAtField ? record[createdAtField] : null;
2386
+ const updatedAt = updatedAtField ? record[updatedAtField] : null;
2387
+ if (createdAt && new Date(createdAt) > lastPolledDate) created.push(record);
2388
+ else if (updatedAt && new Date(updatedAt) > lastPolledDate) updated.push(record);
2389
+ }
2390
+ return {
2391
+ created,
2392
+ updated
2393
+ };
2394
+ };
2395
+ //#endregion
2396
+ //#region src/util/getLastPolled.ts
2397
+ const getLastPolled = (state, now, lookBackDate) => state?.lastPolled ?? (lookBackDate || now);
2398
+ //#endregion
2399
+ //#region src/util/lookBackDateClean.ts
2400
+ const LOOK_BACK_DATE_PATTERN = /^(\d{4})-(\d{2})-(\d{2})$/;
2401
+ const lookBackDateClean = (value) => {
2402
+ if (value === void 0 || value === null) return "";
2403
+ const raw = typeof value === "string" ? value.trim() : String(value);
2404
+ if (raw === "") return "";
2405
+ const match = typeof value === "string" ? raw.match(LOOK_BACK_DATE_PATTERN) : null;
2406
+ if (!match) throw new Error(`Look-back Date must be a date in YYYY-MM-DD format. Received: ${raw}`);
2407
+ const [, yearStr, monthStr, dayStr] = match;
2408
+ const year = Number(yearStr);
2409
+ const month = Number(monthStr);
2410
+ const day = Number(dayStr);
2411
+ const parsed = new Date(Date.UTC(year, month - 1, day));
2412
+ if (parsed.getUTCFullYear() !== year || parsed.getUTCMonth() !== month - 1 || parsed.getUTCDate() !== day) throw new Error(`Look-back Date must be a date in YYYY-MM-DD format. Received: ${raw}`);
2413
+ if (parsed.getTime() > Date.now()) throw new Error(`Look-back Date cannot be a future date. Received: ${raw}`);
2414
+ return parsed.toISOString();
2415
+ };
2416
+ //#endregion
2417
+ //#region src/util/resolvePollingRecordChanges.ts
2418
+ const resolvePollingRecordChanges = (data) => {
2419
+ const changesObject = data ?? {};
2420
+ return [...(changesObject.created ?? []).map((record) => ({
2421
+ changeType: "created",
2422
+ record
2423
+ })), ...(changesObject.updated ?? []).map((record) => ({
2424
+ changeType: "updated",
2425
+ record
2426
+ }))];
2427
+ };
2428
+ const pollChangesTriggerInputs = {
2429
+ connection: connection$1,
2430
+ resourceType: (0, _prismatic_io_spectral.input)({
2431
+ label: "Resource Type",
2432
+ type: "string",
2433
+ required: true,
2434
+ model: resourceModel,
2435
+ comments: "The type of resource to monitor for changes.",
2436
+ clean: _prismatic_io_spectral.util.types.toString
2437
+ }),
2438
+ lookBackDate: (0, _prismatic_io_spectral.input)({
2439
+ label: "Look-back Date",
2440
+ placeholder: "Enter look-back date (YYYY-MM-DD)",
2441
+ type: "string",
2442
+ required: false,
2443
+ comments: "The date the initial sync starts from, in YYYY-MM-DD format. Cannot be a future date. Leave empty to start from the first recurrence with no backfill. When set, the initial sync seeds each record created or modified on or after this date once, ignoring the visibility filters.",
2444
+ example: "2026-01-01",
2445
+ clean: lookBackDateClean
2446
+ }),
2447
+ showNewRecords: (0, _prismatic_io_spectral.input)({
2448
+ label: "Show New Records",
2449
+ type: "boolean",
2450
+ required: false,
2451
+ default: "true",
2452
+ comments: "When true, includes newly created records in the results.",
2453
+ clean: _prismatic_io_spectral.util.types.toBool
2454
+ }),
2455
+ showUpdatedRecords: (0, _prismatic_io_spectral.input)({
2456
+ label: "Show Updated Records",
2457
+ type: "boolean",
2458
+ required: false,
2459
+ default: "true",
2460
+ comments: "When true, includes updated records in the results. Only available for resource types that support update tracking (DataSets, Streams, Users).",
2461
+ clean: _prismatic_io_spectral.util.types.toBool
2462
+ })
2463
+ };
2464
+ //#endregion
2465
+ //#region src/actions/accounts/createAccount.ts
2466
+ const createAccount = (0, _prismatic_io_spectral.action)({
2467
+ display: {
2468
+ label: "Create Account",
2469
+ description: "Creates a new account in a Domo instance with the specified account type properties."
2470
+ },
2471
+ examplePayload: createAccountExamplePayload,
2472
+ perform: async (context, { connection, name, id, password, authenticateBy, url, username }) => {
2473
+ const client = await getDomoClient(connection, context.debug.enabled);
2474
+ const body = {
2475
+ name,
2476
+ type: {
2477
+ id,
2478
+ properties: {
2479
+ password,
2480
+ authenticateBy,
2481
+ url,
2482
+ username
2483
+ }
2484
+ }
2485
+ };
2486
+ const { data } = await client.post(`/accounts`, body, { headers: {
2487
+ "Content-Type": "application/json",
2488
+ Accept: "application/json"
2489
+ } });
2490
+ return { data };
2491
+ },
2492
+ inputs: createAccountInputs
2493
+ });
2494
+ //#endregion
2495
+ //#region src/actions/accounts/deleteAccount.ts
2496
+ const deleteAccount = (0, _prismatic_io_spectral.action)({
2497
+ display: {
2498
+ label: "Delete Account",
2499
+ description: "Deletes an account from a Domo instance."
2500
+ },
2501
+ examplePayload: deleteAccountExamplePayload,
2502
+ perform: async (context, { connection, accountId }) => {
2503
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).delete(`/accounts/${accountId}`);
2504
+ return { data };
2505
+ },
2506
+ inputs: deleteAccountInputs
2507
+ });
2508
+ //#endregion
2509
+ //#region src/actions/accounts/getAccounts.ts
2510
+ const getAccounts = (0, _prismatic_io_spectral.action)({
2511
+ display: {
2512
+ label: "Get Accounts",
2513
+ description: "Retrieves the details of an account type."
2514
+ },
2515
+ examplePayload: getAccountsExamplePayload,
2516
+ perform: async (context, { connection, accountTypeId }) => {
2517
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/account-types/${accountTypeId}`, { headers: { Accept: "application/json" } });
2518
+ return { data };
2519
+ },
2520
+ inputs: getAccountsInputs
2521
+ });
2522
+ //#endregion
2523
+ //#region src/utils/pagination.ts
2524
+ const MAX_PAGES = 100;
2525
+ const DEFAULT_LIMIT = 50;
2526
+ const paginateResults = async (client, endpoint, fetchAll, params = {}, defaultLimit = DEFAULT_LIMIT) => {
2527
+ if (!fetchAll) {
2528
+ const { data } = await client.get(endpoint, {
2529
+ params,
2530
+ headers: { Accept: "application/json" }
2531
+ });
2532
+ return { data };
2533
+ }
2534
+ const limit = params.limit ? _prismatic_io_spectral.util.types.toNumber(params.limit, 10) : defaultLimit;
2535
+ const allResults = [];
2536
+ let currentOffset = 0;
2537
+ let pagesFetched = 0;
2538
+ const { limit: _l, offset: _o, ...otherParams } = params;
2539
+ let hasMore = true;
2540
+ while (hasMore && pagesFetched < MAX_PAGES) {
2541
+ const { data } = await client.get(endpoint, {
2542
+ params: {
2543
+ ...otherParams,
2544
+ limit: _prismatic_io_spectral.util.types.toString(limit),
2545
+ offset: _prismatic_io_spectral.util.types.toString(currentOffset)
2546
+ },
2547
+ headers: { Accept: "application/json" }
2548
+ });
2549
+ pagesFetched++;
2550
+ if (!Array.isArray(data) || data.length === 0) break;
2551
+ allResults.push(...data);
2552
+ if (data.length < limit) hasMore = false;
2553
+ else currentOffset += limit;
2554
+ }
2555
+ return { data: allResults };
2556
+ };
2557
+ //#endregion
2558
+ //#region src/actions/accounts/listAccounts.ts
2559
+ const listAccounts = (0, _prismatic_io_spectral.action)({
2560
+ display: {
2561
+ label: "List Accounts",
2562
+ description: "Lists all accounts the authenticated user has permissions for."
2563
+ },
2564
+ examplePayload: listAccountsExamplePayload,
2565
+ perform: async (context, { connection, fetchAll, pagination }) => {
2566
+ const client = await getDomoClient(connection, context.debug.enabled);
2567
+ const queryParams = {};
2568
+ if (pagination.limit.length) queryParams.limit = pagination.limit;
2569
+ if (pagination.offset.length) queryParams.offset = pagination.offset;
2570
+ return await paginateResults(client, "/accounts", fetchAll, queryParams);
2571
+ },
2572
+ inputs: listAccountsInputs
2573
+ });
2574
+ //#endregion
2575
+ //#region src/actions/accounts/shareAccount.ts
2576
+ const shareAccount = (0, _prismatic_io_spectral.action)({
2577
+ display: {
2578
+ label: "Share Account",
2579
+ description: "Shares an account with one or more users."
2580
+ },
2581
+ examplePayload: shareAccountExamplePayload,
2582
+ perform: async (context, { connection, accountId, userArray }) => {
2583
+ const client = await getDomoClient(connection, context.debug.enabled);
2584
+ let queryParams = "?";
2585
+ for (let index = 0; index < userArray.length; index++) {
2586
+ const user = userArray[index];
2587
+ if (index > 0) queryParams += `&user=${user}`;
2588
+ else queryParams += `user=${user}`;
2589
+ }
2590
+ const { data } = await client.get(`/accounts/${accountId}/shares${queryParams}`);
2591
+ return { data };
2592
+ },
2593
+ inputs: shareAccountInputs
2594
+ });
2595
+ //#endregion
2596
+ //#region src/actions/accounts/updateAccount.ts
2597
+ const updateAccount = (0, _prismatic_io_spectral.action)({
2598
+ display: {
2599
+ label: "Update Account",
2600
+ description: "Updates the specified account's metadata and type properties."
2601
+ },
2602
+ examplePayload: updateAccountExamplePayload,
2603
+ perform: async (context, { connection, accountId, updateAccountBody }) => {
2604
+ const client = await getDomoClient(connection, context.debug.enabled);
2605
+ const body = JSON.parse(updateAccountBody);
2606
+ const { data } = await client.patch(`/accounts/${accountId}`, body, { headers: {
2607
+ "Content-Type": "application/json",
2608
+ Accept: "application/json"
2609
+ } });
2610
+ return { data };
2611
+ },
2612
+ inputs: updateAccountInputs
2613
+ });
2614
+ //#endregion
2615
+ //#region src/actions/datasets/createDataSet.ts
2616
+ const createDataSet = (0, _prismatic_io_spectral.action)({
2617
+ display: {
2618
+ label: "Create Data Set",
2619
+ description: "Creates a new DataSet in a Domo instance."
2620
+ },
2621
+ examplePayload: createDataSetExamplePayload,
2622
+ perform: async (context, { connection, name, description, rows, columns }) => {
2623
+ const client = await getDomoClient(connection, context.debug.enabled);
2624
+ const body = {
2625
+ name,
2626
+ description,
2627
+ ...rows.length && { rows: _prismatic_io_spectral.util.types.toNumber(rows) },
2628
+ schema: { columns: JSON.parse(columns) }
2629
+ };
2630
+ const { data } = await client.post(`/datasets`, body, { headers: {
2631
+ "Content-Type": "application/json",
2632
+ Accept: "application/json"
2633
+ } });
2634
+ return { data };
2635
+ },
2636
+ inputs: createDataSetInputs
2637
+ });
2638
+ //#endregion
2639
+ //#region src/actions/datasets/deleteDataSet.ts
2640
+ const deleteDataSet = (0, _prismatic_io_spectral.action)({
2641
+ display: {
2642
+ label: "Delete Data Set",
2643
+ description: "Permanently deletes a DataSet from a Domo instance."
2644
+ },
2645
+ examplePayload: deleteDataSetExamplePayload,
2646
+ perform: async (context, { connection, datasetId }) => {
2647
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).delete(`/datasets/${datasetId}`, { headers: { Accept: "application/json" } });
2648
+ return { data };
2649
+ },
2650
+ inputs: deleteDataSetInputs
2651
+ });
2652
+ //#endregion
2653
+ //#region src/actions/datasets/exportDataFromDataSet.ts
2654
+ const exportDataFromDataSet = (0, _prismatic_io_spectral.action)({
2655
+ display: {
2656
+ label: "Export Data From DataSet",
2657
+ description: "Exports data from a DataSet in a Domo instance."
2658
+ },
2659
+ examplePayload: exportDataFromDataSetExamplePayload,
2660
+ perform: async (context, { connection, fileName, includeHeader }) => {
2661
+ const client = await getDomoClient(connection, context.debug.enabled);
2662
+ const queryParams = {};
2663
+ if (fileName.length) queryParams.fileName = fileName;
2664
+ if (includeHeader.length) queryParams.includeHeader = includeHeader;
2665
+ const { data } = await client.get(`/datasets/${datasetId}/data`, {
2666
+ params: queryParams,
2667
+ headers: { Accept: "application/json" }
2668
+ });
2669
+ return { data };
2670
+ },
2671
+ inputs: exportDataFromDataSetInputs
2672
+ });
2673
+ //#endregion
2674
+ //#region src/actions/datasets/getDataSet.ts
2675
+ const getDataSet = (0, _prismatic_io_spectral.action)({
2676
+ display: {
2677
+ label: "Get Data Set",
2678
+ description: "Retrieves the details of an existing DataSet."
2679
+ },
2680
+ examplePayload: getDataSetExamplePayload,
2681
+ perform: async (context, { connection, datasetId }) => {
2682
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/datasets/${datasetId}`, { headers: { Accept: "application/json" } });
2683
+ return { data };
2684
+ },
2685
+ inputs: getDataSetInputs
2686
+ });
2687
+ //#endregion
2688
+ //#region src/actions/datasets/importDataIntoDataSet.ts
2689
+ const importDataIntoDataSet = (0, _prismatic_io_spectral.action)({
2690
+ display: {
2691
+ label: "Import Data Into DataSet",
2692
+ description: "Imports data into a DataSet in a Domo instance, replacing the existing data."
2693
+ },
2694
+ examplePayload: importDataIntoDataSetExamplePayload,
2695
+ perform: async (context, { connection, datasetId, csvBody }) => {
2696
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).put(`/datasets/${datasetId}/data`, csvBody, { headers: {
2697
+ Accept: "application/json",
2698
+ "Content-Type": "text/csv"
2699
+ } });
2700
+ return { data };
2701
+ },
2702
+ inputs: importDataIntoDataSetInputs
2703
+ });
2704
+ //#endregion
2705
+ //#region src/actions/datasets/listDataSets.ts
2706
+ const listDataSets = (0, _prismatic_io_spectral.action)({
2707
+ display: {
2708
+ label: "List DataSets",
2709
+ description: "Lists all DataSets in a Domo instance."
2710
+ },
2711
+ examplePayload: listDataSetsExamplePayload,
2712
+ perform: async (context, { connection, fetchAll, nameLike, sort, pagination }) => {
2713
+ const client = await getDomoClient(connection, context.debug.enabled);
2714
+ const queryParams = {};
2715
+ if (pagination.limit.length) queryParams.limit = pagination.limit;
2716
+ if (nameLike.length) queryParams.nameLike = nameLike;
2717
+ if (pagination.offset.length) queryParams.offset = pagination.offset;
2718
+ if (sort.length) queryParams.sort = sort;
2719
+ return await paginateResults(client, "/datasets", fetchAll, queryParams);
2720
+ },
2721
+ inputs: listDataSetsInputs
2722
+ });
2723
+ //#endregion
2724
+ //#region src/actions/datasets/queryDataSet.ts
2725
+ const queryDataSet = (0, _prismatic_io_spectral.action)({
2726
+ display: {
2727
+ label: "Query Data Set",
2728
+ description: "Queries the data in an existing Domo DataSet."
2729
+ },
2730
+ examplePayload: queryDataSetExamplePayload,
2731
+ perform: async (context, { connection, datasetId, sql }) => {
2732
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).post(`/datasets/query/execute/${datasetId}`, { sql }, { headers: {
2733
+ Accept: "application/json",
2734
+ "Content-Type": "application/json"
2735
+ } });
2736
+ return { data };
2737
+ },
2738
+ inputs: queryDataSetInputs
2739
+ });
2740
+ //#endregion
2741
+ //#region src/actions/datasets/updateDataSet.ts
2742
+ const updateDataSet = (0, _prismatic_io_spectral.action)({
2743
+ display: {
2744
+ label: "Update Data Set",
2745
+ description: "Updates the specified DataSet's metadata."
2746
+ },
2747
+ examplePayload: updateDataSetExamplePayload,
2748
+ perform: async (context, { connection, datasetId, updateDataSetBody }) => {
2749
+ const client = await getDomoClient(connection, context.debug.enabled);
2750
+ let body = {};
2751
+ if (updateDataSetBody.length) body = JSON.parse(updateDataSetBody);
2752
+ const { data } = await client.put(`/datasets/${datasetId}`, body, { headers: {
2753
+ Accept: "application/json",
2754
+ "Content-Type": "application/json"
2755
+ } });
2756
+ return { data };
2757
+ },
2758
+ inputs: updateDataSetInputs
2759
+ });
2760
+ //#endregion
2761
+ //#region src/actions/groups/addUserToGroup.ts
2762
+ const addUserToGroup = (0, _prismatic_io_spectral.action)({
2763
+ display: {
2764
+ label: "Add User To Group",
2765
+ description: "Adds a user to a group in a Domo instance."
2766
+ },
2767
+ examplePayload: addUserToGroupExamplePayload,
2768
+ perform: async (context, { connection, groupId, userId }) => {
2769
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).put(`/groups/${groupId}/users/${userId}`, void 0, { headers: { "Content-Type": "application/json" } });
2770
+ return { data };
2771
+ },
2772
+ inputs: addUserToGroupInputs
2773
+ });
2774
+ //#endregion
2775
+ //#region src/actions/groups/createGroup.ts
2776
+ const createGroup = (0, _prismatic_io_spectral.action)({
2777
+ display: {
2778
+ label: "Create Group",
2779
+ description: "Creates a new group in a Domo instance."
2780
+ },
2781
+ examplePayload: createGroupExamplePayload,
2782
+ perform: async (context, { connection, name }) => {
2783
+ const client = await getDomoClient(connection, context.debug.enabled);
2784
+ const body = { name };
2785
+ const { data } = await client.post(`/groups`, body);
2786
+ return { data };
2787
+ },
2788
+ inputs: createGroupInputs
2789
+ });
2790
+ //#endregion
2791
+ //#region src/actions/groups/deleteGroup.ts
2792
+ const deleteGroup = (0, _prismatic_io_spectral.action)({
2793
+ display: {
2794
+ label: "Delete Group",
2795
+ description: "Permanently deletes a group from a Domo instance."
2796
+ },
2797
+ examplePayload: deleteGroupExamplePayload,
2798
+ perform: async (context, { connection, groupId }) => {
2799
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).delete(`/groups/${groupId}`);
2800
+ return { data };
2801
+ },
2802
+ inputs: deleteGroupInputs
2803
+ });
2804
+ //#endregion
2805
+ //#region src/actions/groups/getGroup.ts
2806
+ const getGroup = (0, _prismatic_io_spectral.action)({
2807
+ display: {
2808
+ label: "Get Group",
2809
+ description: "Retrieves the details of an existing group."
2810
+ },
2811
+ examplePayload: getGroupExamplePayload,
2812
+ perform: async (context, { connection, groupId }) => {
2813
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/groups/${groupId}`, { headers: { Accept: "application/json" } });
2814
+ return { data };
2815
+ },
2816
+ inputs: getGroupInputs
2817
+ });
2818
+ //#endregion
2819
+ //#region src/actions/groups/listGroups.ts
2820
+ const listGroups = (0, _prismatic_io_spectral.action)({
2821
+ display: {
2822
+ label: "List Groups",
2823
+ description: "Lists all groups in a Domo instance."
2824
+ },
2825
+ examplePayload: listGroupsExamplePayload,
2826
+ perform: async (context, { connection, fetchAll, pagination }) => {
2827
+ const client = await getDomoClient(connection, context.debug.enabled);
2828
+ const queryParams = {};
2829
+ if (pagination.limit.length) queryParams.limit = pagination.limit;
2830
+ if (pagination.offset.length) queryParams.offset = pagination.offset;
2831
+ return await paginateResults(client, "/groups", fetchAll, queryParams);
2832
+ },
2833
+ inputs: listGroupsInputs
2834
+ });
2835
+ //#endregion
2836
+ //#region src/actions/groups/listUsersInGroup.ts
2837
+ const listUsersInGroup = (0, _prismatic_io_spectral.action)({
2838
+ display: {
2839
+ label: "List Users In Group",
2840
+ description: "Lists the users in a group in a Domo instance."
2841
+ },
2842
+ examplePayload: listUsersInGroupExamplePayload,
2843
+ perform: async (context, { connection, groupId, pagination, fetchAll }) => {
2844
+ const client = await getDomoClient(connection, context.debug.enabled);
2845
+ const queryParams = {};
2846
+ if (pagination.limit.length) queryParams.limit = pagination.limit;
2847
+ if (pagination.offset.length) queryParams.offset = pagination.offset;
2848
+ return await paginateResults(client, `/groups/${groupId}/users`, fetchAll, queryParams);
2849
+ },
2850
+ inputs: listUsersInGroupInputs
2851
+ });
2852
+ //#endregion
2853
+ //#region src/actions/groups/removeUserFromGroup.ts
2854
+ const removeUserFromGroup = (0, _prismatic_io_spectral.action)({
2855
+ display: {
2856
+ label: "Remove User From Group",
2857
+ description: "Removes a user from a group in a Domo instance."
2858
+ },
2859
+ examplePayload: removeUserFromGroupExamplePayload,
2860
+ perform: async (context, { connection, groupId, userId }) => {
2861
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).delete(`/groups/${groupId}/users/${userId}`);
2862
+ return { data };
2863
+ },
2864
+ inputs: removeUserFromGroupInputs
2865
+ });
2866
+ //#endregion
2867
+ //#region src/actions/groups/updateGroup.ts
2868
+ const updateGroup = (0, _prismatic_io_spectral.action)({
2869
+ display: {
2870
+ label: "Update Group",
2871
+ description: "Updates the specified group's attributes in a Domo instance."
2872
+ },
2873
+ examplePayload: updateGroupExamplePayload,
2874
+ perform: async (context, { connection, groupId, updateGroupBody }) => {
2875
+ const client = await getDomoClient(connection, context.debug.enabled);
2876
+ let body = {};
2877
+ if (updateGroupBody.length) body = JSON.parse(updateGroupBody);
2878
+ const { data } = await client.put(`/groups/${groupId}`, body, { headers: { "Content-Type": "application/json" } });
2879
+ return { data };
2880
+ },
2881
+ inputs: updateGroupInputs
2882
+ });
2883
+ //#endregion
2884
+ //#region src/actions/misc/getActivityLogEntries.ts
2885
+ const getActivityLogEntries = (0, _prismatic_io_spectral.action)({
2886
+ display: {
2887
+ label: "Get Activity Log Entries",
2888
+ description: "Retrieves activity log entries."
2889
+ },
2890
+ examplePayload: getActivityLogEntriesExamplePayload,
2891
+ perform: async (context, { connection, start, end, user, fetchAll, pagination }) => {
2892
+ const client = await getDomoClient(connection, context.debug.enabled);
2893
+ const queryParams = { start };
2894
+ if (end.length) queryParams.end = end;
2895
+ if (pagination.limit.length) queryParams.limit = pagination.limit;
2896
+ if (pagination.offset.length) queryParams.offset = pagination.offset;
2897
+ if (user.length) queryParams.user = user;
2898
+ return await paginateResults(client, `/audit`, fetchAll, queryParams);
2899
+ },
2900
+ inputs: getActivityLogEntriesInputs
2901
+ });
2902
+ //#endregion
2903
+ //#region src/actions/misc/rawRequest.ts
2904
+ const { debugRequest: _, ...rawRequestInputs } = _prismatic_io_spectral_http.inputs;
2905
+ const rawRequest = (0, _prismatic_io_spectral.action)({
2906
+ display: {
2907
+ label: "Raw Request",
2908
+ description: "Sends a raw HTTP request to the Domo API."
2909
+ },
2910
+ examplePayload: rawRequestExamplePayload,
2911
+ inputs: {
2912
+ connection: connection$1,
2913
+ ...rawRequestInputs,
2914
+ url: {
2915
+ ...rawRequestInputs.url,
2916
+ example: "/datasets"
2917
+ }
2918
+ },
2919
+ perform: async (context, { connection, ...rawRequestInputs }) => {
2920
+ const domoToken = await getToken(connection, context.debug.enabled);
2921
+ const { data } = await (0, _prismatic_io_spectral_http.sendRawRequest)(BASE_URL, {
2922
+ ...rawRequestInputs,
2923
+ debugRequest: context.debug.enabled
2924
+ }, { Authorization: `Bearer ${domoToken}` });
2925
+ return { data };
2926
+ }
2927
+ });
2928
+ //#endregion
2929
+ //#region src/actions/pages/createPage.ts
2930
+ const createPage = (0, _prismatic_io_spectral.action)({
2931
+ display: {
2932
+ label: "Create Page",
2933
+ description: "Creates a new page in a Domo instance."
2934
+ },
2935
+ examplePayload: createPageExamplePayload,
2936
+ perform: async (context, { connection, name, parentId, locked, cardIds, userIds, groupIds }) => {
2937
+ const client = await getDomoClient(connection, context.debug.enabled);
2938
+ const body = {
2939
+ ...name.length && { name },
2940
+ ...parentId.length && { parentId: _prismatic_io_spectral.util.types.toInt(parentId) },
2941
+ ...locked.length && { locked },
2942
+ ...cardIds.length && { cardIds },
2943
+ ...(userIds.length || groupIds.length) && { visibility: {
2944
+ ...userIds.length && { userIds },
2945
+ ...groupIds.length && { groupIds }
2946
+ } }
2947
+ };
2948
+ const { data } = await client.post(`/pages`, body, { headers: {
2949
+ "Content-Type": "application/json",
2950
+ Accept: "application/json"
2951
+ } });
2952
+ return { data };
2953
+ },
2954
+ inputs: createPageInputs
2955
+ });
2956
+ //#endregion
2957
+ //#region src/actions/pages/deletePage.ts
2958
+ const deletePage = (0, _prismatic_io_spectral.action)({
2959
+ display: {
2960
+ label: "Delete Page",
2961
+ description: "Permanently deletes a page from a Domo instance."
2962
+ },
2963
+ examplePayload: deletePageExamplePayload,
2964
+ perform: async (context, { connection, pageId }) => {
2965
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).delete(`/pages/${pageId}`);
2966
+ return { data };
2967
+ },
2968
+ inputs: deletePageInputs
2969
+ });
2970
+ //#endregion
2971
+ //#region src/actions/pages/getPage.ts
2972
+ const getPage = (0, _prismatic_io_spectral.action)({
2973
+ display: {
2974
+ label: "Get Page",
2975
+ description: "Retrieves the details of an existing page."
2976
+ },
2977
+ examplePayload: getPageExamplePayload,
2978
+ perform: async (context, { connection, pageId }) => {
2979
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/pages/${pageId}`, { headers: { Accept: "application/json" } });
2980
+ return { data };
2981
+ },
2982
+ inputs: getPageInputs
2983
+ });
2984
+ //#endregion
2985
+ //#region src/actions/pages/listPages.ts
2986
+ const listPages = (0, _prismatic_io_spectral.action)({
2987
+ display: {
2988
+ label: "List Pages",
2989
+ description: "Lists all pages in a Domo instance."
2990
+ },
2991
+ examplePayload: listPagesExamplePayload,
2992
+ perform: async (context, { connection, fetchAll, pagination }) => {
2993
+ const client = await getDomoClient(connection, context.debug.enabled);
2994
+ const queryParams = {};
2995
+ if (pagination.limit.length) queryParams.limit = pagination.limit;
2996
+ if (pagination.offset.length) queryParams.offset = pagination.offset;
2997
+ return await paginateResults(client, "/pages", fetchAll, queryParams);
2998
+ },
2999
+ inputs: listPagesInputs
3000
+ });
3001
+ //#endregion
3002
+ //#region src/actions/pages/updatePage.ts
3003
+ const updatePage = (0, _prismatic_io_spectral.action)({
3004
+ display: {
3005
+ label: "Update Page",
3006
+ description: "Updates the specified page's attributes in a Domo instance."
3007
+ },
3008
+ examplePayload: updatePageExamplePayload,
3009
+ perform: async (context, { connection, pageId, updatePageBody }) => {
3010
+ const client = await getDomoClient(connection, context.debug.enabled);
3011
+ const body = JSON.parse(updatePageBody);
3012
+ const { data } = await client.put(`/pages/${pageId}`, body, { headers: { "Content-Type": "application/json" } });
3013
+ return { data };
3014
+ },
3015
+ inputs: updatePageInputs
3016
+ });
3017
+ //#endregion
3018
+ //#region src/actions/projects/addAttachment.ts
3019
+ const addAttachment = (0, _prismatic_io_spectral.action)({
3020
+ display: {
3021
+ label: "Add Attachment",
3022
+ description: "Adds a multipart form file to a task item as an attachment."
3023
+ },
3024
+ examplePayload: addAttachmentExamplePayload,
3025
+ perform: async (context, { connection, projectId, listId, taskId }) => {
3026
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).post(`/projects/${projectId}/lists/${listId}/tasks/${taskId}/attachments`, void 0, { headers: {
3027
+ "Content-Type": "application/json",
3028
+ Accept: "application/json"
3029
+ } });
3030
+ return { data };
3031
+ },
3032
+ inputs: addAttachmentInputs
3033
+ });
3034
+ //#endregion
3035
+ //#region src/actions/projects/createList.ts
3036
+ const createList = (0, _prismatic_io_spectral.action)({
3037
+ display: {
3038
+ label: "Create List",
3039
+ description: "Creates a new list within a given project."
3040
+ },
3041
+ examplePayload: createListExamplePayload,
3042
+ perform: async (context, { connection, projectId, name, type, index }) => {
3043
+ const client = await getDomoClient(connection, context.debug.enabled);
3044
+ const body = {
3045
+ name,
3046
+ type,
3047
+ ...index.length && { index: _prismatic_io_spectral.util.types.toNumber(index) }
3048
+ };
3049
+ const { data } = await client.post(`/projects/${projectId}/lists`, body, { headers: {
3050
+ "Content-Type": "application/json",
3051
+ Accept: "application/json"
3052
+ } });
3053
+ return { data };
3054
+ },
3055
+ inputs: createListInputs
3056
+ });
3057
+ //#endregion
3058
+ //#region src/actions/projects/createProject.ts
3059
+ const createProject = (0, _prismatic_io_spectral.action)({
3060
+ display: {
3061
+ label: "Create Project",
3062
+ description: "Creates a new project in a Domo instance."
3063
+ },
3064
+ examplePayload: createProjectExamplePayload,
3065
+ perform: async (context, { connection, members, name, publicInput, description, dueDate, membersArray, publicBody, bodyName }) => {
3066
+ const client = await getDomoClient(connection, context.debug.enabled);
3067
+ const body = {
3068
+ ...bodyName.length && { name: bodyName },
3069
+ ...membersArray.length && { members: membersArray },
3070
+ ...publicBody.length && { public: publicBody }
3071
+ };
3072
+ const { data } = await client.post(`/projects?members=${members}&name=${name}&public=${publicInput}
3073
+ ${description.length ? `&description=${description}` : ""}
3074
+ ${dueDate.length ? `&dueDate=${dueDate}` : ""}`, body, { headers: {
3075
+ "Content-Type": "application/json",
3076
+ Accept: "application/json"
3077
+ } });
3078
+ return { data };
3079
+ },
3080
+ inputs: createProjectInputs
3081
+ });
3082
+ //#endregion
3083
+ //#region src/actions/projects/createTask.ts
3084
+ const createTask = (0, _prismatic_io_spectral.action)({
3085
+ display: {
3086
+ label: "Create Task",
3087
+ description: "Adds a task to a project list."
3088
+ },
3089
+ examplePayload: createTaskExamplePayload,
3090
+ perform: async (context, { connection, projectId, listId, taskName, taskDetails }) => {
3091
+ const client = await getDomoClient(connection, context.debug.enabled);
3092
+ let body = {};
3093
+ if (taskDetails.taskObjectBody.length) body = JSON.parse(taskDetails.taskObjectBody);
3094
+ const { data } = await client.put(`/projects/${projectId}/lists/${listId}/tasks?taskName=${taskName}
3095
+ ${taskDetails.contributors.length ? `&contributors=${taskDetails.contributors}` : ""}
3096
+ ${taskDetails.description.length ? `&description=${taskDetails.description}` : ""}
3097
+ ${taskDetails.dueDate.length ? `&dueDate=${taskDetails.dueDate}` : ""}
3098
+ ${taskDetails.ownedBy.length ? `&ownedBy=${taskDetails.ownedBy}` : ""}
3099
+ ${taskDetails.priority.length ? `&priority=${taskDetails.priority}` : ""}
3100
+ ${taskDetails.tags.length ? `&tags=${taskDetails.tags}` : ""}`, body, { headers: {
3101
+ "Content-Type": "application/json",
3102
+ Accept: "application/json"
3103
+ } });
3104
+ return { data };
3105
+ },
3106
+ inputs: createTaskInputs
3107
+ });
3108
+ //#endregion
3109
+ //#region src/actions/projects/deleteAttachment.ts
3110
+ const deleteAttachment = (0, _prismatic_io_spectral.action)({
3111
+ display: {
3112
+ label: "Delete Attachment",
3113
+ description: "Permanently deletes an attachment from a task."
3114
+ },
3115
+ examplePayload: deleteAttachmentExamplePayload,
3116
+ perform: async (context, { connection, projectId, taskId, attachmentId }) => {
3117
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).delete(`/project/${projectId}/tasks/${taskId}/attachments/${attachmentId}`);
3118
+ return { data };
3119
+ },
3120
+ inputs: deleteAttachmentInputs
3121
+ });
3122
+ //#endregion
3123
+ //#region src/actions/projects/deleteList.ts
3124
+ const deleteList = (0, _prismatic_io_spectral.action)({
3125
+ display: {
3126
+ label: "Delete List",
3127
+ description: "Permanently deletes a list from a Domo instance."
3128
+ },
3129
+ examplePayload: deleteListExamplePayload,
3130
+ perform: async (context, { connection, projectId, listId }) => {
3131
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).delete(`/projects/${projectId}/lists/${listId}`);
3132
+ return { data };
3133
+ },
3134
+ inputs: deleteListInputs
3135
+ });
3136
+ //#endregion
3137
+ //#region src/actions/projects/deleteProject.ts
3138
+ const deleteProject = (0, _prismatic_io_spectral.action)({
3139
+ display: {
3140
+ label: "Delete Project",
3141
+ description: "Permanently deletes a project from a Domo instance."
3142
+ },
3143
+ examplePayload: deleteProjectExamplePayload,
3144
+ perform: async (context, { connection, projectId }) => {
3145
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).delete(`/projects/${projectId}`);
3146
+ return { data };
3147
+ },
3148
+ inputs: deleteProjectInputs
3149
+ });
3150
+ //#endregion
3151
+ //#region src/actions/projects/downloadAttachment.ts
3152
+ const downloadAttachment = (0, _prismatic_io_spectral.action)({
3153
+ display: {
3154
+ label: "Download Attachment",
3155
+ description: "Downloads an individual attachment by ID."
3156
+ },
3157
+ examplePayload: downloadAttachmentExamplePayload,
3158
+ perform: async (context, { connection, listId, projectId, taskId, attachmentId }) => {
3159
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/projects/${projectId}/lists/${listId}/tasks/${taskId}/attachments/${attachmentId}`);
3160
+ return { data };
3161
+ },
3162
+ inputs: downloadAttachmentInputs
3163
+ });
3164
+ //#endregion
3165
+ //#region src/actions/projects/getList.ts
3166
+ const getList = (0, _prismatic_io_spectral.action)({
3167
+ display: {
3168
+ label: "Get List",
3169
+ description: "Retrieves the details of an individual list given a project id and a list id."
3170
+ },
3171
+ examplePayload: getListExamplePayload,
3172
+ perform: async (context, { connection, projectId, listId }) => {
3173
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/projects/${projectId}/lists/${listId}`, { headers: { Accept: "application/json" } });
3174
+ return { data };
3175
+ },
3176
+ inputs: getListInputs
3177
+ });
3178
+ //#endregion
3179
+ //#region src/actions/projects/getListOfAttachments.ts
3180
+ const getListOfAttachments = (0, _prismatic_io_spectral.action)({
3181
+ display: {
3182
+ label: "Get List Of Attachments",
3183
+ description: "Retrieves all attachments belonging to a particular task."
3184
+ },
3185
+ examplePayload: getListOfAttachmentsExamplePayload,
3186
+ perform: async (context, { connection, projectId, listId, taskId }) => {
3187
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/projects/${projectId}/lists/${listId}/tasks/${taskId}/attachments`, { headers: { Accept: "application/json" } });
3188
+ return { data };
3189
+ },
3190
+ inputs: getListOfAttachmentsInputs
3191
+ });
3192
+ //#endregion
3193
+ //#region src/actions/projects/getProject.ts
3194
+ const getProject = (0, _prismatic_io_spectral.action)({
3195
+ display: {
3196
+ label: "Get Project",
3197
+ description: "Retrieves the details of an existing project by ID."
3198
+ },
3199
+ examplePayload: getProjectExamplePayload,
3200
+ perform: async (context, { connection, projectId }) => {
3201
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/projects/${projectId}`, { headers: { Accept: "application/json" } });
3202
+ return { data };
3203
+ },
3204
+ inputs: getProjectInputs
3205
+ });
3206
+ //#endregion
3207
+ //#region src/actions/projects/getProjectMembers.ts
3208
+ const getProjectMembers = (0, _prismatic_io_spectral.action)({
3209
+ display: {
3210
+ label: "Get Project Members",
3211
+ description: "Retrieves the member user IDs for a given project."
3212
+ },
3213
+ examplePayload: getProjectMembersExamplePayload,
3214
+ perform: async (context, { connection, projectId }) => {
3215
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/projects/${projectId}/members`, { headers: { Accept: "application/json" } });
3216
+ return { data };
3217
+ },
3218
+ inputs: getProjectMembersInputs
3219
+ });
3220
+ //#endregion
3221
+ //#region src/actions/projects/getTask.ts
3222
+ const getTask = (0, _prismatic_io_spectral.action)({
3223
+ display: {
3224
+ label: "Get Task",
3225
+ description: "Retrieves an individual task from a given project id and list id."
3226
+ },
3227
+ examplePayload: getTaskExamplePayload,
3228
+ perform: async (context, { connection, listId, projectId, taskId }) => {
3229
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/projects/${projectId}/lists/${listId}/tasks/${taskId}`, { headers: { Accept: "application/json" } });
3230
+ return { data };
3231
+ },
3232
+ inputs: getTaskInputs
3233
+ });
3234
+ //#endregion
3235
+ //#region src/actions/projects/listProjectLists.ts
3236
+ const listProjectLists = (0, _prismatic_io_spectral.action)({
3237
+ display: {
3238
+ label: "List Project Lists",
3239
+ description: "Retrieves all lists available within a given project."
3240
+ },
3241
+ examplePayload: listProjectListsExamplePayload,
3242
+ perform: async (context, { connection, projectId }) => {
3243
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/projects/${projectId}/lists`, { headers: { Accept: "application/json" } });
3244
+ return { data };
3245
+ },
3246
+ inputs: listProjectListsInputs
3247
+ });
3248
+ //#endregion
3249
+ //#region src/actions/projects/listProjectListTasks.ts
3250
+ const listProjectListTasks = (0, _prismatic_io_spectral.action)({
3251
+ display: {
3252
+ label: "List Project List Tasks",
3253
+ description: "Retrieves all tasks from a given project list."
3254
+ },
3255
+ examplePayload: listProjectListTasksExamplePayload,
3256
+ perform: async (context, { connection, projectId, listId, pagination, fetchAll }) => {
3257
+ const client = await getDomoClient(connection, context.debug.enabled);
3258
+ const queryParams = {};
3259
+ if (pagination.limit.length) queryParams.limit = pagination.limit;
3260
+ if (pagination.offset.length) queryParams.offset = pagination.offset;
3261
+ return await paginateResults(client, `/projects/${projectId}/lists/${listId}/tasks`, fetchAll, queryParams);
3262
+ },
3263
+ inputs: listProjectListTasksInputs
3264
+ });
3265
+ //#endregion
3266
+ //#region src/actions/projects/listProjects.ts
3267
+ const listProjects = (0, _prismatic_io_spectral.action)({
3268
+ display: {
3269
+ label: "List Projects",
3270
+ description: "Retrieves a list of all accessible projects."
3271
+ },
3272
+ examplePayload: listProjectsExamplePayload,
3273
+ perform: async (context, { connection }) => {
3274
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/projects`, { headers: { Accept: "application/json" } });
3275
+ return { data };
3276
+ },
3277
+ inputs: listProjectsInputs
3278
+ });
3279
+ //#endregion
3280
+ //#region src/actions/projects/updateList.ts
3281
+ const updateList = (0, _prismatic_io_spectral.action)({
3282
+ display: {
3283
+ label: "Update List",
3284
+ description: "Updates the details of a list within a project."
3285
+ },
3286
+ examplePayload: updateListExamplePayload,
3287
+ perform: async (context, { connection, projectId, listId, index, name, type, updateListBody }) => {
3288
+ const client = await getDomoClient(connection, context.debug.enabled);
3289
+ const queryParams = {
3290
+ index: _prismatic_io_spectral.util.types.toNumber(index),
3291
+ name,
3292
+ type
3293
+ };
3294
+ let body = {};
3295
+ if (updateListBody.length) body = JSON.parse(updateListBody);
3296
+ const { data } = await client.put(`/projects/${projectId}/lists/${listId}`, body, {
3297
+ params: queryParams,
3298
+ headers: {
3299
+ "Content-Type": "application/json",
3300
+ Accept: "application/json"
3301
+ }
3302
+ });
3303
+ return { data };
3304
+ },
3305
+ inputs: updateListInputs
3306
+ });
3307
+ //#endregion
3308
+ //#region src/actions/projects/updateProject.ts
3309
+ const updateProject = (0, _prismatic_io_spectral.action)({
3310
+ display: {
3311
+ label: "Update Project",
3312
+ description: "Updates attributes of an existing project in a Domo instance."
3313
+ },
3314
+ perform: async (context, { connection, projectId, projectDetails }) => {
3315
+ const client = await getDomoClient(connection, context.debug.enabled);
3316
+ const queryParams = {};
3317
+ if (projectDetails.description.length) queryParams.description = projectDetails.description;
3318
+ if (projectDetails.dueDate.length) queryParams.dueDate = projectDetails.dueDate;
3319
+ if (projectDetails.name.length) queryParams.name = projectDetails.name;
3320
+ if (projectDetails.publicUpdate.length) queryParams.public = projectDetails.publicUpdate;
3321
+ let body = {};
3322
+ if (projectDetails.updateProjectBody.length) body = JSON.parse(projectDetails.updateProjectBody);
3323
+ const { data } = await client.put(`/projects/${projectId}`, body, {
3324
+ params: queryParams,
3325
+ headers: {
3326
+ "Content-Type": "application/json",
3327
+ Accept: "application/json"
3328
+ }
3329
+ });
3330
+ return { data };
3331
+ },
3332
+ inputs: updateProjectInputs
3333
+ });
3334
+ //#endregion
3335
+ //#region src/actions/projects/updateProjectMembers.ts
3336
+ const updateProjectMembers = (0, _prismatic_io_spectral.action)({
3337
+ display: {
3338
+ label: "Update Project Members",
3339
+ description: "Updates the members of a given project."
3340
+ },
3341
+ examplePayload: updateProjectMembersExamplePayload,
3342
+ perform: async (context, { connection, projectId, updateProjectMembersBody }) => {
3343
+ const client = await getDomoClient(connection, context.debug.enabled);
3344
+ let body = {};
3345
+ if (updateProjectMembersBody.length) body = JSON.parse(updateProjectMembersBody);
3346
+ const { data } = await client.put(`/projects/${projectId}/members`, body, { headers: { "Content-Type": "application/json" } });
3347
+ return { data };
3348
+ },
3349
+ inputs: updateProjectMembersInputs
3350
+ });
3351
+ //#endregion
3352
+ //#region src/actions/projects/updateTask.ts
3353
+ const updateTask = (0, _prismatic_io_spectral.action)({
3354
+ display: {
3355
+ label: "Update Task",
3356
+ description: "Updates the details of a task within a project list."
3357
+ },
3358
+ examplePayload: updateTaskExamplePayload,
3359
+ perform: async (context, { connection, taskId, listId, projectId, taskName, taskDetails }) => {
3360
+ const client = await getDomoClient(connection, context.debug.enabled);
3361
+ const queryParams = {};
3362
+ if (taskDetails.contributors.length) queryParams.contributors = taskDetails.contributors;
3363
+ if (taskDetails.description.length) queryParams.description = taskDetails.description;
3364
+ if (taskDetails.dueDate.length) queryParams.dueDate = taskDetails.dueDate;
3365
+ if (taskDetails.ownedBy.length) queryParams.ownedBy = taskDetails.ownedBy;
3366
+ if (taskDetails.priority.length) queryParams.priority = taskDetails.priority;
3367
+ if (taskDetails.tags.length) queryParams.tags = taskDetails.tags;
3368
+ if (taskName.length) queryParams.taskName = taskName;
3369
+ let body = {};
3370
+ if (taskDetails.updateTaskBody.length) body = JSON.parse(taskDetails.updateTaskBody);
3371
+ const { data } = await client.put(`/projects/${projectId}/lists/${listId}/tasks/${taskId}`, body, {
3372
+ params: queryParams,
3373
+ headers: {
3374
+ "Content-Type": "application/json",
3375
+ Accept: "application/json"
3376
+ }
3377
+ });
3378
+ return { data };
3379
+ },
3380
+ inputs: updateTaskInputs
3381
+ });
3382
+ //#endregion
3383
+ //#region src/actions/streams/abortStreamExecution.ts
3384
+ const abortStreamExecution = (0, _prismatic_io_spectral.action)({
3385
+ display: {
3386
+ label: "Abort Stream Execution",
3387
+ description: "Aborts an entire stream execution in progress."
3388
+ },
3389
+ examplePayload: abortStreamExecutionExamplePayload,
3390
+ perform: async (context, { connection, streamId, executionId }) => {
3391
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).put(`/streams/${streamId}/executions/${executionId}/abort`, void 0, { headers: { "Content-Type": "application/json" } });
3392
+ return { data };
3393
+ },
3394
+ inputs: abortStreamExecutionInputs
3395
+ });
3396
+ //#endregion
3397
+ //#region src/actions/streams/commitStreamExecution.ts
3398
+ const commitStreamExecution = (0, _prismatic_io_spectral.action)({
3399
+ display: {
3400
+ label: "Commit Stream Execution",
3401
+ description: "Commits a stream execution to import the combined set of data parts that have been successfully uploaded."
3402
+ },
3403
+ examplePayload: commitStreamExecutionExamplePayload,
3404
+ perform: async (context, { connection, streamId, executionId }) => {
3405
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).put(`/streams/${streamId}/executions/${executionId}/commit`, void 0, { headers: {
3406
+ "Content-Type": "application/json",
3407
+ Accept: "application/json"
3408
+ } });
3409
+ return { data };
3410
+ },
3411
+ inputs: commitStreamExecutionInputs
3412
+ });
3413
+ //#endregion
3414
+ //#region src/actions/streams/createStream.ts
3415
+ const createStream = (0, _prismatic_io_spectral.action)({
3416
+ display: {
3417
+ label: "Create Stream",
3418
+ description: "Creates a new stream and its associated DataSet in Domo."
3419
+ },
3420
+ examplePayload: createStreamExamplePayload,
3421
+ perform: async (context, { connection, dataSet, updateMethod, name, description, columns, updateMethodBody }) => {
3422
+ const client = await getDomoClient(connection, context.debug.enabled);
3423
+ let dataSetParams = "";
3424
+ dataSet.forEach((param, index) => {
3425
+ if (index > 0) dataSetParams += "&";
3426
+ dataSetParams += `dataSet=${param}`;
3427
+ });
3428
+ const columnsArray = JSON.parse(columns);
3429
+ const body = { ...(name.length || description.length || columnsArray.length || updateMethodBody.length) && { dataSet: {
3430
+ ...name.length && { name },
3431
+ ...description.length && { description },
3432
+ ...columnsArray.length && { schema: { columns: columnsArray } },
3433
+ ...updateMethodBody.length && { updateMethod: updateMethodBody }
3434
+ } } };
3435
+ const { data } = await client.post(`/streams?${dataSetParams}
3436
+ ${updateMethod.length ? `&updateMethod=${updateMethod}` : ""}`, body, { headers: {
3437
+ "Content-Type": "application/json",
3438
+ Accept: "application/json"
3439
+ } });
3440
+ return { data };
3441
+ },
3442
+ inputs: createStreamInputs
3443
+ });
3444
+ //#endregion
3445
+ //#region src/actions/streams/createStreamExecution.ts
3446
+ const createStreamExecution = (0, _prismatic_io_spectral.action)({
3447
+ display: {
3448
+ label: "Create Stream Execution",
3449
+ description: "Creates a new stream execution to begin uploading data to a DataSet via a stream."
3450
+ },
3451
+ examplePayload: createStreamExecutionExamplePayload,
3452
+ perform: async (context, { connection, streamId }) => {
3453
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).post(`/streams/${streamId}/executions`, void 0, { headers: {
3454
+ "Content-Type": "application/json",
3455
+ Accept: "application/json"
3456
+ } });
3457
+ return { data };
3458
+ },
3459
+ inputs: createStreamExecutionInputs
3460
+ });
3461
+ //#endregion
3462
+ //#region src/actions/streams/deleteStream.ts
3463
+ const deleteStream = (0, _prismatic_io_spectral.action)({
3464
+ display: {
3465
+ label: "Delete Stream",
3466
+ description: "Deletes a stream from a Domo instance without deleting the associated DataSet."
3467
+ },
3468
+ examplePayload: deleteStreamExamplePayload,
3469
+ perform: async (context, { connection, streamId }) => {
3470
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).delete(`/streams/${streamId}`);
3471
+ return { data };
3472
+ },
3473
+ inputs: deleteStreamInputs
3474
+ });
3475
+ //#endregion
3476
+ //#region src/actions/streams/getStream.ts
3477
+ const getStream = (0, _prismatic_io_spectral.action)({
3478
+ display: {
3479
+ label: "Get Stream",
3480
+ description: "Retrieves the details of an existing stream."
3481
+ },
3482
+ examplePayload: getStreamExamplePayload,
3483
+ perform: async (context, { connection, streamId, fields }) => {
3484
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/streams/${streamId}
3485
+ ${fields.length ? `?fields=${fields}` : ""}`, { headers: { Accept: "application/json" } });
3486
+ return { data };
3487
+ },
3488
+ inputs: getStreamInputs
3489
+ });
3490
+ //#endregion
3491
+ //#region src/actions/streams/getStreamExecution.ts
3492
+ const getStreamExecution = (0, _prismatic_io_spectral.action)({
3493
+ display: {
3494
+ label: "Get Stream Execution",
3495
+ description: "Retrieves the details of an existing stream execution."
3496
+ },
3497
+ examplePayload: getStreamExecutionExamplePayload,
3498
+ perform: async (context, { connection, streamId, executionId }) => {
3499
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/streams/${streamId}/executions/${executionId}`, { headers: { Accept: "application/json" } });
3500
+ return { data };
3501
+ },
3502
+ inputs: getStreamExecutionInputs
3503
+ });
3504
+ //#endregion
3505
+ //#region src/actions/streams/listStreamExecution.ts
3506
+ const listStreamExecution = (0, _prismatic_io_spectral.action)({
3507
+ display: {
3508
+ label: "List Stream Execution",
3509
+ description: "Lists all stream executions that match the specified criteria."
3510
+ },
3511
+ examplePayload: listStreamExecutionExamplePayload,
3512
+ perform: async (context, { connection, streamId, pagination, fetchAll }) => {
3513
+ const client = await getDomoClient(connection, context.debug.enabled);
3514
+ const queryParams = {};
3515
+ if (pagination.limit.length) queryParams.limit = pagination.limit;
3516
+ if (pagination.offset.length) queryParams.offset = pagination.offset;
3517
+ return await paginateResults(client, `/streams/${streamId}/executions`, fetchAll, queryParams);
3518
+ },
3519
+ inputs: listStreamExecutionInputs
3520
+ });
3521
+ //#endregion
3522
+ //#region src/actions/streams/listStreams.ts
3523
+ const listStreams = (0, _prismatic_io_spectral.action)({
3524
+ display: {
3525
+ label: "List Streams",
3526
+ description: "Lists all streams the authenticated user has view permissions for."
3527
+ },
3528
+ examplePayload: listStreamsExamplePayload,
3529
+ perform: async (context, { connection, fetchAll, pagination }) => {
3530
+ const client = await getDomoClient(connection, context.debug.enabled);
3531
+ const queryParams = {};
3532
+ if (pagination.limit.length) queryParams.limit = pagination.limit;
3533
+ if (pagination.offset.length) queryParams.offset = pagination.offset;
3534
+ return await paginateResults(client, "/streams", fetchAll, queryParams);
3535
+ },
3536
+ inputs: listStreamsInputs
3537
+ });
3538
+ //#endregion
3539
+ //#region src/actions/streams/searchStream.ts
3540
+ const searchStream = (0, _prismatic_io_spectral.action)({
3541
+ display: {
3542
+ label: "Search Stream",
3543
+ description: "Searches for streams that match the specified criteria."
3544
+ },
3545
+ examplePayload: searchStreamExamplePayload,
3546
+ perform: async (context, { connection, qualifiers, fields }) => {
3547
+ const client = await getDomoClient(connection, context.debug.enabled);
3548
+ const queryParams = { qualifiers };
3549
+ if (fields.length) queryParams.fields = fields;
3550
+ const { data } = await client.get(`/streams/search`, {
3551
+ params: queryParams,
3552
+ headers: { Accept: "application/json" }
3553
+ });
3554
+ return { data };
3555
+ },
3556
+ inputs: searchStreamInputs
3557
+ });
3558
+ //#endregion
3559
+ //#region src/actions/streams/updateStream.ts
3560
+ const updateStream = (0, _prismatic_io_spectral.action)({
3561
+ display: {
3562
+ label: "Update Stream",
3563
+ description: "Updates the specified stream's metadata."
3564
+ },
3565
+ examplePayload: updateStreamExamplePayload,
3566
+ perform: async (context, { connection, streamId, updateMethodString, updateMethodBody }) => {
3567
+ const client = await getDomoClient(connection, context.debug.enabled);
3568
+ let body = {};
3569
+ if (updateMethodBody.length) body = JSON.parse(updateMethodBody);
3570
+ const { data } = await client.patch(`/streams/${streamId}`, body, {
3571
+ params: { updateMethod: updateMethodString },
3572
+ headers: {
3573
+ "Content-Type": "application/json",
3574
+ Accept: "application/json"
3575
+ }
3576
+ });
3577
+ return { data };
3578
+ },
3579
+ inputs: updateStreamInputs
3580
+ });
3581
+ //#endregion
3582
+ //#region src/actions/streams/uploadDataPart.ts
3583
+ const uploadDataPart = (0, _prismatic_io_spectral.action)({
3584
+ display: {
3585
+ label: "Upload Data Part",
3586
+ description: "Uploads a data part within a stream execution to add rows to the DataSet."
3587
+ },
3588
+ examplePayload: uploadDataPartExamplePayload,
3589
+ perform: async (context, { connection, streamId, executionId, partId }) => {
3590
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).put(`/streams/${streamId}/executions/${executionId}/part/${partId}`, void 0, { headers: {
3591
+ "Content-Type": "application/json",
3592
+ Accept: "application/json"
3593
+ } });
3594
+ return { data };
3595
+ },
3596
+ inputs: uploadDataPartInputs
3597
+ });
3598
+ //#endregion
3599
+ //#region src/actions/users/createUser.ts
3600
+ const createUser = (0, _prismatic_io_spectral.action)({
3601
+ display: {
3602
+ label: "Create User",
3603
+ description: "Creates a new user in a Domo instance."
3604
+ },
3605
+ examplePayload: createUserExamplePayload,
3606
+ perform: async (context, { connection, email, name, role, sendInvite, profile, userBody }) => {
3607
+ const client = await getDomoClient(connection, context.debug.enabled);
3608
+ let body = {};
3609
+ if (userBody.length) body = JSON.parse(userBody);
3610
+ const { data } = await client.post(`/users?email=${email}&name=${name}&role=${role}
3611
+ ${profile.alternateEmail.length ? `&alternateEmail=${profile.alternateEmail}` : ""}
3612
+ ${profile.employeeNumber.length ? `&employeeNumber=${profile.employeeNumber}` : ""}
3613
+ ${profile.locale.length ? `&locale=${profile.locale}` : ""}
3614
+ ${profile.location.length ? `&location=${profile.location}` : ""}
3615
+ ${profile.phone.length ? `&phone=${profile.phone}` : ""}
3616
+ ${sendInvite.length ? `&sendInvite=${sendInvite}` : ""}
3617
+ ${profile.timezone.length ? `&timezone=${profile.timezone}` : ""}
3618
+ ${profile.title.length ? `&title=${profile.title}` : ""}`, body, { headers: {
3619
+ "Content-Type": "application/json",
3620
+ Accept: "application/json"
3621
+ } });
3622
+ return { data };
3623
+ },
3624
+ inputs: createUserInputs
3625
+ });
3626
+ //#endregion
3627
+ //#region src/actions/users/deleteUser.ts
3628
+ const deleteUser = (0, _prismatic_io_spectral.action)({
3629
+ display: {
3630
+ label: "Delete User",
3631
+ description: "Permanently deletes a user from a Domo instance."
3632
+ },
3633
+ examplePayload: deleteUserExamplePayload,
3634
+ perform: async (context, { connection, userId }) => {
3635
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).delete(`/users/${userId}`);
3636
+ return { data };
3637
+ },
3638
+ inputs: deleteUserInputs
3639
+ });
3640
+ //#endregion
3641
+ //#region src/actions/users/getUser.ts
3642
+ const getUser = (0, _prismatic_io_spectral.action)({
3643
+ display: {
3644
+ label: "Get User",
3645
+ description: "Retrieves the details of an existing user."
3646
+ },
3647
+ examplePayload: getUserExamplePayload,
3648
+ perform: async (context, { connection, userId }) => {
3649
+ const { data } = await (await getDomoClient(connection, context.debug.enabled)).get(`/users/${userId}`, { headers: { Accept: "application/json" } });
3650
+ return { data };
3651
+ },
3652
+ inputs: getUserInputs
3653
+ });
3654
+ //#endregion
3655
+ //#region src/actions/index.ts
3656
+ var actions_default = {
3657
+ listAccounts,
3658
+ getAccounts,
3659
+ createAccount,
3660
+ updateAccount,
3661
+ deleteAccount,
3662
+ shareAccount,
3663
+ listUsers: (0, _prismatic_io_spectral.action)({
3664
+ display: {
3665
+ label: "List Users",
3666
+ description: "Lists all users in a Domo instance."
3667
+ },
3668
+ examplePayload: listUsersExamplePayload,
3669
+ perform: async (context, { connection, fetchAll, pagination }) => {
3670
+ const client = await getDomoClient(connection, context.debug.enabled);
3671
+ const queryParams = {};
3672
+ if (pagination.limit.length) queryParams.limit = pagination.limit;
3673
+ if (pagination.offset.length) queryParams.offset = pagination.offset;
3674
+ return await paginateResults(client, "/users", fetchAll, queryParams);
3675
+ },
3676
+ inputs: listUsersInputs
3677
+ }),
3678
+ getUser,
3679
+ createUser,
3680
+ updateUser: (0, _prismatic_io_spectral.action)({
3681
+ display: {
3682
+ label: "Update User",
3683
+ description: "Updates the specified user's attributes in a Domo instance."
3684
+ },
3685
+ examplePayload: updateUserExamplePayload,
3686
+ perform: async (context, { connection, userId, email, name, role, roled, profile, updateUserBody }) => {
3687
+ const client = await getDomoClient(connection, context.debug.enabled);
3688
+ const queryParams = {};
3689
+ if (profile.alternateEmail.length) queryParams.alternateEmail = profile.alternateEmail;
3690
+ if (email.length) queryParams.email = email;
3691
+ if (profile.employeeNumber.length) queryParams.employeeNumber = profile.employeeNumber;
3692
+ if (profile.locale.length) queryParams.locale = profile.locale;
3693
+ if (profile.location.length) queryParams.location = profile.location;
3694
+ if (name.length) queryParams.name = name;
3695
+ if (profile.phone.length) queryParams.phone = profile.phone;
3696
+ if (role.length) queryParams.role = role;
3697
+ if (roled.length) queryParams.roled = _prismatic_io_spectral.util.types.toNumber(roled);
3698
+ if (profile.timezone.length) queryParams.timezone = profile.timezone;
3699
+ if (profile.title.length) queryParams.title = profile.title;
3700
+ let body = {};
3701
+ if (updateUserBody.length) body = JSON.parse(updateUserBody);
3702
+ const { data } = await client.put(`/users/${userId}`, body, {
3703
+ params: queryParams,
3704
+ headers: { "Content-Type": "application/json" }
3705
+ });
3706
+ return { data };
3707
+ },
3708
+ inputs: updateUserInputs
3709
+ }),
3710
+ deleteUser,
3711
+ getActivityLogEntries,
3712
+ listDataSets,
3713
+ getDataSet,
3714
+ createDataSet,
3715
+ updateDataSet,
3716
+ deleteDataSet,
3717
+ queryDataSet,
3718
+ importDataIntoDataSet,
3719
+ exportDataFromDataSet,
3720
+ listGroups,
3721
+ getGroup,
3722
+ createGroup,
3723
+ updateGroup,
3724
+ deleteGroup,
3725
+ addUserToGroup,
3726
+ removeUserFromGroup,
3727
+ listUsersInGroup,
3728
+ listPages,
3729
+ getPage,
3730
+ createPage,
3731
+ updatePage,
3732
+ deletePage,
3733
+ listProjects,
3734
+ getProject,
3735
+ createProject,
3736
+ updateProject,
3737
+ deleteProject,
3738
+ addAttachment,
3739
+ downloadAttachment,
3740
+ deleteAttachment,
3741
+ getListOfAttachments,
3742
+ getProjectMembers,
3743
+ updateProjectMembers,
3744
+ listProjectLists,
3745
+ getList,
3746
+ createList,
3747
+ updateList,
3748
+ deleteList,
3749
+ listProjectListTasks,
3750
+ getTask,
3751
+ createTask,
3752
+ updateTask,
3753
+ listStreams,
3754
+ getStream,
3755
+ createStream,
3756
+ updateStream,
3757
+ deleteStream,
3758
+ searchStream,
3759
+ listStreamExecution,
3760
+ getStreamExecution,
3761
+ createStreamExecution,
3762
+ uploadDataPart,
3763
+ commitStreamExecution,
3764
+ abortStreamExecution,
3765
+ rawRequest
3766
+ };
3767
+ var connections_default = [(0, _prismatic_io_spectral.connection)({
3768
+ key: "oauth",
3769
+ display: {
3770
+ label: "OAuth 2.0 Client Credentials",
3771
+ description: "Authenticate against the Domo API using OAuth 2.0 client credentials."
3772
+ },
3773
+ inputs: {
3774
+ clientId: {
3775
+ label: "Client ID",
3776
+ placeholder: "Enter Client ID",
3777
+ type: "string",
3778
+ required: true,
3779
+ shown: true,
3780
+ comments: "The Client Identifier of the Domo app for API authentication."
3781
+ },
3782
+ clientSecret: {
3783
+ label: "Client Secret",
3784
+ placeholder: "Enter Client Secret",
3785
+ type: "password",
3786
+ required: true,
3787
+ comments: "The Client Secret of the Domo app for API authentication."
3788
+ },
3789
+ scopes: {
3790
+ label: "Scopes",
3791
+ placeholder: "Enter scopes",
3792
+ type: "string",
3793
+ required: true,
3794
+ comments: "The space-separated OAuth permission scopes for the API.",
3795
+ example: "data workflow audit buzz user account dashboard",
3796
+ default: ""
3797
+ }
3798
+ }
3799
+ })];
3800
+ var accounts_default = {
3801
+ accounts: (0, _prismatic_io_spectral.dataSource)({
3802
+ display: {
3803
+ label: "Select Account",
3804
+ description: "Selects a Domo account."
3805
+ },
3806
+ dataSourceType: "picklist",
3807
+ perform: async (_context, { connection, limit, offset }) => {
3808
+ const client = await getDomoClient(connection, false);
3809
+ const queryParams = {};
3810
+ if (limit.length) queryParams.limit = limit;
3811
+ if (offset.length) queryParams.offset = offset;
3812
+ const { data } = await client.get(`/accounts`, {
3813
+ params: queryParams,
3814
+ headers: { Accept: "application/json" }
3815
+ });
3816
+ return { result: data.map((account) => ({
3817
+ label: account.name,
3818
+ key: String(account.id)
3819
+ })) };
3820
+ },
3821
+ inputs: {
3822
+ connection: connection$1,
3823
+ limit: (0, _prismatic_io_spectral.input)({
3824
+ ...limit,
3825
+ required: false,
3826
+ comments: "The number of Accounts to return in the list. The default is 50 and the maximum is 500."
3827
+ }),
3828
+ offset: (0, _prismatic_io_spectral.input)({
3829
+ ...offset,
3830
+ required: false,
3831
+ comments: "The offset of Accounts to begin the list of Accounts within the response."
3832
+ })
3833
+ }
3834
+ }),
3835
+ accountTypes: (0, _prismatic_io_spectral.dataSource)({
3836
+ display: {
3837
+ label: "Select Account Type",
3838
+ description: "Selects a Domo account type."
3839
+ },
3840
+ dataSourceType: "picklist",
3841
+ perform: async (_context, { connection, limit, offset }) => {
3842
+ const client = await getDomoClient(connection, false);
3843
+ const queryParams = {};
3844
+ if (limit.length) queryParams.limit = limit;
3845
+ if (offset.length) queryParams.offset = offset;
3846
+ const { data } = await client.get(`/account-types`, {
3847
+ params: queryParams,
3848
+ headers: { Accept: "application/json" }
3849
+ });
3850
+ return { result: data.map((accountType) => ({
3851
+ label: accountType.name,
3852
+ key: String(accountType.id)
3853
+ })) };
3854
+ },
3855
+ inputs: {
3856
+ connection: connection$1,
3857
+ limit: (0, _prismatic_io_spectral.input)({
3858
+ ...limit,
3859
+ required: false,
3860
+ comments: "The number of Account Types to return in the list. The default is 50 and the maximum is 500."
3861
+ }),
3862
+ offset: (0, _prismatic_io_spectral.input)({
3863
+ ...offset,
3864
+ required: false,
3865
+ comments: "The offset of the Account Types to begin list of Account Types within the response."
3866
+ })
3867
+ }
3868
+ })
3869
+ };
3870
+ var datasets_default = { selectDataSet: (0, _prismatic_io_spectral.dataSource)({
3871
+ display: {
3872
+ label: "Select DataSet",
3873
+ description: "Selects a Domo DataSet."
3874
+ },
3875
+ dataSourceType: "picklist",
3876
+ perform: async (_context, { connection, limit, offset }) => {
3877
+ const client = await getDomoClient(connection, false);
3878
+ const queryParams = {};
3879
+ if (limit.length) queryParams.limit = limit;
3880
+ if (offset.length) queryParams.offset = offset;
3881
+ const { data } = await client.get(`/datasets`, {
3882
+ params: queryParams,
3883
+ headers: { Accept: "application/json" }
3884
+ });
3885
+ return { result: data.map((dataset) => ({
3886
+ label: dataset.name,
3887
+ key: dataset.id.toString()
3888
+ })).sort((a, b) => a.label < b.label ? -1 : 1) };
3889
+ },
3890
+ inputs: {
3891
+ connection: connection$1,
3892
+ limit: (0, _prismatic_io_spectral.input)({
3893
+ ...limit,
3894
+ required: false,
3895
+ comments: "The amount of DataSets to return in the list. The default is 50 and the maximum is 50."
3896
+ }),
3897
+ offset: (0, _prismatic_io_spectral.input)({
3898
+ ...offset,
3899
+ required: false,
3900
+ comments: "The offset of the DataSet ID to begin list of DataSets within the response."
3901
+ })
3902
+ },
3903
+ examplePayload: { result: [{
3904
+ label: "Leonhard Euler Birthday Bash",
3905
+ key: "1"
3906
+ }] }
3907
+ }) };
3908
+ var groups_default = { groups: (0, _prismatic_io_spectral.dataSource)({
3909
+ display: {
3910
+ label: "Select Group",
3911
+ description: "Selects a Domo group."
3912
+ },
3913
+ dataSourceType: "picklist",
3914
+ perform: async (_context, { connection, limit, offset }) => {
3915
+ const client = await getDomoClient(connection, false);
3916
+ const queryParams = {};
3917
+ if (limit.length) queryParams.limit = limit;
3918
+ if (offset.length) queryParams.offset = offset;
3919
+ const { data } = await client.get(`/groups`, {
3920
+ params: queryParams,
3921
+ headers: { Accept: "application/json" }
3922
+ });
3923
+ return { result: data.map((group) => ({
3924
+ label: group.name,
3925
+ key: String(group.id)
3926
+ })) };
3927
+ },
3928
+ inputs: {
3929
+ connection: connection$1,
3930
+ limit: (0, _prismatic_io_spectral.input)({
3931
+ ...limit,
3932
+ required: false,
3933
+ comments: "The amount of groups to return in the list. The default is 50 and the maximum is 500."
3934
+ }),
3935
+ offset: (0, _prismatic_io_spectral.input)({
3936
+ ...offset,
3937
+ required: false,
3938
+ comments: "The offset of the group ID to begin list of groups within the response."
3939
+ })
3940
+ }
3941
+ }) };
3942
+ var pages_default = { pages: (0, _prismatic_io_spectral.dataSource)({
3943
+ display: {
3944
+ label: "Select Page",
3945
+ description: "Selects a Domo page."
3946
+ },
3947
+ dataSourceType: "picklist",
3948
+ perform: async (_context, { connection, limit, offset }) => {
3949
+ const client = await getDomoClient(connection, false);
3950
+ const queryParams = {};
3951
+ if (limit.length) queryParams.limit = limit;
3952
+ if (offset.length) queryParams.offset = offset;
3953
+ const { data } = await client.get(`/pages`, {
3954
+ params: queryParams,
3955
+ headers: { Accept: "application/json" }
3956
+ });
3957
+ return { result: data.map((page) => ({
3958
+ label: page.name,
3959
+ key: String(page.id)
3960
+ })) };
3961
+ },
3962
+ inputs: {
3963
+ connection: connection$1,
3964
+ limit: (0, _prismatic_io_spectral.input)({
3965
+ ...limit,
3966
+ required: false,
3967
+ comments: "The amount of pages to return in the list. The default is 50 and the maximum is 500."
3968
+ }),
3969
+ offset: (0, _prismatic_io_spectral.input)({
3970
+ ...offset,
3971
+ required: false,
3972
+ comments: "The offset of the page ID to begin list of pages within the response."
3973
+ })
3974
+ }
3975
+ }) };
3976
+ var projects_default = {
3977
+ projects: (0, _prismatic_io_spectral.dataSource)({
3978
+ display: {
3979
+ label: "Select Project",
3980
+ description: "Selects a Domo project."
3981
+ },
3982
+ dataSourceType: "picklist",
3983
+ perform: async (_context, { connection }) => {
3984
+ const { data } = await (await getDomoClient(connection, false)).get(`/projects`, { headers: { Accept: "application/json" } });
3985
+ return { result: data.map((project) => ({
3986
+ label: project.name,
3987
+ key: String(project.id)
3988
+ })) };
3989
+ },
3990
+ inputs: { connection: connection$1 }
3991
+ }),
3992
+ projectLists: (0, _prismatic_io_spectral.dataSource)({
3993
+ display: {
3994
+ label: "Select Project List",
3995
+ description: "Selects a Domo project list."
3996
+ },
3997
+ dataSourceType: "picklist",
3998
+ perform: async (_context, { connection, projectId }) => {
3999
+ const { data } = await (await getDomoClient(connection, false)).get(`/projects/${projectId}/lists`, { headers: { Accept: "application/json" } });
4000
+ return { result: data.map((projectList) => ({
4001
+ label: projectList.name,
4002
+ key: String(projectList.id)
4003
+ })) };
4004
+ },
4005
+ inputs: {
4006
+ connection: connection$1,
4007
+ projectId: {
4008
+ ...projectId,
4009
+ dataSource: void 0
4010
+ }
4011
+ }
4012
+ }),
4013
+ selectTask: (0, _prismatic_io_spectral.dataSource)({
4014
+ display: {
4015
+ label: "Select Task",
4016
+ description: "Selects a Domo project task."
4017
+ },
4018
+ dataSourceType: "picklist",
4019
+ perform: async (_context, { connection, projectId, listId, limit, offset }) => {
4020
+ const client = await getDomoClient(connection, false);
4021
+ const queryParams = {};
4022
+ if (limit.length) queryParams.limit = limit;
4023
+ if (offset.length) queryParams.offset = offset;
4024
+ const { data } = await client.get(`/projects/${projectId}/lists/${listId}/tasks`, {
4025
+ params: queryParams,
4026
+ headers: { Accept: "application/json" }
4027
+ });
4028
+ return { result: data.map((task) => ({
4029
+ label: task.taskName || String(task.id),
4030
+ key: String(task.id)
4031
+ })) };
4032
+ },
4033
+ inputs: {
4034
+ connection: connection$1,
4035
+ projectId: {
4036
+ ...projectId,
4037
+ dataSource: void 0
4038
+ },
4039
+ listId: {
4040
+ ...listId,
4041
+ dataSource: void 0
4042
+ },
4043
+ limit: (0, _prismatic_io_spectral.input)({
4044
+ ...limit,
4045
+ required: false,
4046
+ comments: "The number of tasks to return in the list. The default is 10 and the maximum is 50."
4047
+ }),
4048
+ offset: (0, _prismatic_io_spectral.input)({
4049
+ ...offset,
4050
+ required: false,
4051
+ comments: "The offset of tasks to begin the list within the response."
4052
+ })
4053
+ }
4054
+ })
4055
+ };
4056
+ var streams_default = {
4057
+ streams: (0, _prismatic_io_spectral.dataSource)({
4058
+ display: {
4059
+ label: "Select Stream",
4060
+ description: "Selects a Domo stream."
4061
+ },
4062
+ dataSourceType: "picklist",
4063
+ perform: async (_context, { connection, limit, offset }) => {
4064
+ const client = await getDomoClient(connection, false);
4065
+ const queryParams = {};
4066
+ if (limit.length) queryParams.limit = limit;
4067
+ if (offset.length) queryParams.offset = offset;
4068
+ const { data } = await client.get(`/streams`, {
4069
+ params: queryParams,
4070
+ headers: { Accept: "application/json" }
4071
+ });
4072
+ return { result: data.map((stream) => ({
4073
+ label: `Stream ${stream.id} (${stream.updateMethod})`,
4074
+ key: String(stream.id)
4075
+ })) };
4076
+ },
4077
+ inputs: {
4078
+ connection: connection$1,
4079
+ limit: (0, _prismatic_io_spectral.input)({
4080
+ ...limit,
4081
+ required: false,
4082
+ comments: "The amount of Stream to return in the list. The default is 50 and the maximum is 500."
4083
+ }),
4084
+ offset: (0, _prismatic_io_spectral.input)({
4085
+ ...offset,
4086
+ required: false,
4087
+ comments: "The offset of the Stream ID to begin list of users within the response."
4088
+ })
4089
+ }
4090
+ }),
4091
+ selectStreamExecution: (0, _prismatic_io_spectral.dataSource)({
4092
+ display: {
4093
+ label: "Select Stream Execution",
4094
+ description: "Selects a Domo stream execution."
4095
+ },
4096
+ dataSourceType: "picklist",
4097
+ perform: async (_context, { connection, streamId, limit, offset }) => {
4098
+ const client = await getDomoClient(connection, false);
4099
+ const queryParams = {};
4100
+ if (limit.length) queryParams.limit = limit;
4101
+ if (offset.length) queryParams.offset = offset;
4102
+ const { data } = await client.get(`/streams/${streamId}/executions`, {
4103
+ params: queryParams,
4104
+ headers: { Accept: "application/json" }
4105
+ });
4106
+ return { result: data.map((execution) => ({
4107
+ label: `${execution.id} (${execution.currentState})`,
4108
+ key: String(execution.id)
4109
+ })) };
4110
+ },
4111
+ inputs: {
4112
+ connection: connection$1,
4113
+ streamId: {
4114
+ ...streamId,
4115
+ dataSource: void 0
4116
+ },
4117
+ limit: (0, _prismatic_io_spectral.input)({
4118
+ ...limit,
4119
+ required: false,
4120
+ comments: "The number of Stream Executions to return in the list. The default is 50 and the maximum is 500."
4121
+ }),
4122
+ offset: (0, _prismatic_io_spectral.input)({
4123
+ ...offset,
4124
+ required: false,
4125
+ comments: "The offset of the Stream Execution to begin list within the response."
4126
+ })
4127
+ }
4128
+ })
4129
+ };
4130
+ var users_default = { selectUser: (0, _prismatic_io_spectral.dataSource)({
4131
+ display: {
4132
+ label: "Select User",
4133
+ description: "Selects a Domo user."
4134
+ },
4135
+ dataSourceType: "picklist",
4136
+ perform: async (_context, { connection, limit, offset }) => {
4137
+ const client = await getDomoClient(connection, false);
4138
+ const queryParams = {};
4139
+ if (limit.length) queryParams.limit = limit;
4140
+ if (offset.length) queryParams.offset = offset;
4141
+ const { data } = await client.get(`/users`, {
4142
+ params: queryParams,
4143
+ headers: { Accept: "application/json" }
4144
+ });
4145
+ return { result: data.map((user) => ({
4146
+ label: user.name || user.email || user.id,
4147
+ key: user.id.toString()
4148
+ })).sort((a, b) => a.label < b.label ? -1 : 1) };
4149
+ },
4150
+ inputs: {
4151
+ connection: connection$1,
4152
+ limit: (0, _prismatic_io_spectral.input)({
4153
+ ...limit,
4154
+ required: false,
4155
+ comments: "The amount of users to return in the list. The default is 50 and the maximum is 500."
4156
+ }),
4157
+ offset: (0, _prismatic_io_spectral.input)({
4158
+ ...offset,
4159
+ required: false,
4160
+ comments: "The offset of the user ID to begin list of users within the response."
4161
+ })
4162
+ },
4163
+ examplePayload: { result: [{
4164
+ label: "Leonhard Euler",
4165
+ key: "27"
4166
+ }] }
4167
+ }) };
4168
+ //#endregion
4169
+ //#region src/dataSources/index.ts
4170
+ var dataSources_default = {
4171
+ ...accounts_default,
4172
+ ...datasets_default,
4173
+ ...groups_default,
4174
+ ...pages_default,
4175
+ ...projects_default,
4176
+ ...streams_default,
4177
+ ...users_default
4178
+ };
4179
+ //#endregion
4180
+ //#region src/triggers/index.ts
4181
+ var triggers_default = { pollChangesTrigger: (0, _prismatic_io_spectral.pollingTrigger)({
4182
+ display: {
4183
+ label: "New and Updated Records",
4184
+ description: "Retrieves existing and ongoing records for a specified Domo resource type. Load history once, check for changes on a schedule, or both."
4185
+ },
4186
+ inputs: pollChangesTriggerInputs,
4187
+ triggerResolverSupport: "valid",
4188
+ batchConfig: { batchSize: 50 },
4189
+ triggerResolver: { resolveItems: (_context, { payload }) => resolvePollingRecordChanges(payload.body.data) },
4190
+ perform: async (context, payload, { connection, resourceType, lookBackDate, showNewRecords, showUpdatedRecords }) => {
4191
+ const now = (/* @__PURE__ */ new Date()).toISOString();
4192
+ const lastState = context.polling.getState();
4193
+ const config = RESOURCE_CONFIG[resourceType];
4194
+ if (!config) throw new Error(`Unsupported resource type: ${resourceType}`);
4195
+ const records = await fetchAllRecords(await getDomoClient(connection, context.debug.enabled), config);
4196
+ const hasTimestamps = config.createdAtField !== null;
4197
+ const lastPolled = getLastPolled(lastState, now, lookBackDate);
4198
+ const isInitialSync = hasTimestamps && !lastState?.lastPolled && Boolean(lookBackDate);
4199
+ let result;
4200
+ if (hasTimestamps && lastPolled) {
4201
+ const filtered = filterByTimestamp(records, lastPolled, config.createdAtField, config.updatedAtField);
4202
+ result = {
4203
+ created: isInitialSync || showNewRecords ? filtered.created : [],
4204
+ updated: isInitialSync || showUpdatedRecords ? filtered.updated : []
4205
+ };
4206
+ } else {
4207
+ const newRecords = filterByNewIds(records, lastState?.knownIds ?? []);
4208
+ result = {
4209
+ created: showNewRecords ? newRecords : [],
4210
+ updated: []
4211
+ };
4212
+ }
4213
+ const newState = { lastPolled: now };
4214
+ if (!hasTimestamps) newState.knownIds = records.map((r) => r.id);
4215
+ context.polling.setState(newState);
4216
+ if (context.debug.enabled) context.logger.debug(`Polled ${resourceType}: ${records.length} total, ${result.created.length} new, ${result.updated.length} updated`);
4217
+ return buildPollingResult(payload, result);
4218
+ }
4219
+ }) };
4220
+ //#endregion
4221
+ //#region src/index.ts
4222
+ var src_default = (0, _prismatic_io_spectral.component)({
4223
+ key: "domo",
4224
+ public: true,
4225
+ display: {
4226
+ label: "Domo",
4227
+ category: "Application Connectors",
4228
+ description: "Manage datasets, streams, users, groups, pages, and projects in Domo.",
4229
+ iconPath: "icon.png"
4230
+ },
4231
+ actions: actions_default,
4232
+ triggers: triggers_default,
4233
+ connections: connections_default,
4234
+ dataSources: dataSources_default,
4235
+ documentationUrl: "https://prismatic.io/docs/components/domo/",
4236
+ hooks: { error: _prismatic_io_spectral_http.handleErrors }
4237
+ });
4238
+ //#endregion
4239
+ //#region npm-dist/.entry.ts
4240
+ var _entry_default = (0, _prismatic_io_spectral.callableComponent)(src_default);
4241
+ //#endregion
4242
+ module.exports = _entry_default;