@apideck/unify 0.40.0 → 0.41.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.
Files changed (96) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +4 -4
  3. package/lib/config.js +4 -4
  4. package/package.json +6 -2
  5. package/src/__tests__/activities.test.ts +1141 -0
  6. package/src/__tests__/agedcreditors.test.ts +280 -0
  7. package/src/__tests__/ageddebtors.test.ts +280 -0
  8. package/src/__tests__/apideckcompanies.test.ts +1082 -0
  9. package/src/__tests__/apideckcustomers.test.ts +364 -0
  10. package/src/__tests__/apideckdepartments.test.ts +497 -0
  11. package/src/__tests__/apiresources.test.ts +62 -0
  12. package/src/__tests__/apis.test.ts +216 -0
  13. package/src/__tests__/applicants.test.ts +1445 -0
  14. package/src/__tests__/applications.test.ts +515 -0
  15. package/src/__tests__/assertions.ts +13 -0
  16. package/src/__tests__/attachments.test.ts +371 -0
  17. package/src/__tests__/balancesheet.test.ts +453 -0
  18. package/src/__tests__/bankaccounts.test.ts +324 -0
  19. package/src/__tests__/bankfeedaccounts.test.ts +343 -0
  20. package/src/__tests__/bankfeedstatements.test.ts +408 -0
  21. package/src/__tests__/billpayments.test.ts +1031 -0
  22. package/src/__tests__/bills.test.ts +1630 -0
  23. package/src/__tests__/categories.test.ts +127 -0
  24. package/src/__tests__/collections.test.ts +120 -0
  25. package/src/__tests__/collectiontags.test.ts +68 -0
  26. package/src/__tests__/collectionticketcomments.test.ts +501 -0
  27. package/src/__tests__/collectiontickets.test.ts +627 -0
  28. package/src/__tests__/collectionusers.test.ts +126 -0
  29. package/src/__tests__/companies.test.ts +1642 -0
  30. package/src/__tests__/companyinfo.test.ts +219 -0
  31. package/src/__tests__/connectionconsent.test.ts +89 -0
  32. package/src/__tests__/connectionconsents.test.ts +31 -0
  33. package/src/__tests__/connectioncustommappings.test.ts +69 -0
  34. package/src/__tests__/connections.test.ts +2127 -0
  35. package/src/__tests__/connectionsettings.test.ts +687 -0
  36. package/src/__tests__/connectordocs.test.ts +29 -0
  37. package/src/__tests__/connectors.test.ts +753 -0
  38. package/src/__tests__/consumerrequestcounts.test.ts +42 -0
  39. package/src/__tests__/consumers.test.ts +523 -0
  40. package/src/__tests__/contacts.test.ts +1421 -0
  41. package/src/__tests__/createcallback.test.ts +36 -0
  42. package/src/__tests__/creditnotes.test.ts +2040 -0
  43. package/src/__tests__/customers.test.ts +1600 -0
  44. package/src/__tests__/customfields.test.ts +52 -0
  45. package/src/__tests__/custommappings.test.ts +65 -0
  46. package/src/__tests__/customobjects.test.ts +408 -0
  47. package/src/__tests__/customobjectschemas.test.ts +734 -0
  48. package/src/__tests__/departments.test.ts +529 -0
  49. package/src/__tests__/drivegroups.test.ts +496 -0
  50. package/src/__tests__/drives.test.ts +487 -0
  51. package/src/__tests__/employeepayrolls.test.ts +491 -0
  52. package/src/__tests__/employees.test.ts +2968 -0
  53. package/src/__tests__/employeeschedules.test.ts +457 -0
  54. package/src/__tests__/eventlogs.test.ts +158 -0
  55. package/src/__tests__/expensecategories.test.ts +324 -0
  56. package/src/__tests__/expensereports.test.ts +634 -0
  57. package/src/__tests__/expenses.test.ts +867 -0
  58. package/src/__tests__/files.test.ts +506 -0
  59. package/src/__tests__/files.ts +56 -0
  60. package/src/__tests__/folders.test.ts +390 -0
  61. package/src/__tests__/invoiceitems.test.ts +855 -0
  62. package/src/__tests__/invoices.test.ts +2173 -0
  63. package/src/__tests__/jobs.test.ts +1150 -0
  64. package/src/__tests__/journalentries.test.ts +1542 -0
  65. package/src/__tests__/leads.test.ts +1341 -0
  66. package/src/__tests__/ledgeraccounts.test.ts +829 -0
  67. package/src/__tests__/locations.test.ts +856 -0
  68. package/src/__tests__/logs.test.ts +137 -0
  69. package/src/__tests__/messages.test.ts +588 -0
  70. package/src/__tests__/notes.test.ts +523 -0
  71. package/src/__tests__/opportunities.test.ts +718 -0
  72. package/src/__tests__/orders.test.ts +854 -0
  73. package/src/__tests__/payments.test.ts +867 -0
  74. package/src/__tests__/payrolls.test.ts +485 -0
  75. package/src/__tests__/pipelines.test.ts +574 -0
  76. package/src/__tests__/products.test.ts +509 -0
  77. package/src/__tests__/profitandloss.test.ts +223 -0
  78. package/src/__tests__/projects.test.ts +480 -0
  79. package/src/__tests__/proxy.test.ts +41 -0
  80. package/src/__tests__/purchaseorders.test.ts +2139 -0
  81. package/src/__tests__/quotes.test.ts +678 -0
  82. package/src/__tests__/refunds.test.ts +812 -0
  83. package/src/__tests__/sessions.test.ts +72 -0
  84. package/src/__tests__/sharedlinks.test.ts +511 -0
  85. package/src/__tests__/stores.test.ts +41 -0
  86. package/src/__tests__/subsidiaries.test.ts +496 -0
  87. package/src/__tests__/suppliers.test.ts +1574 -0
  88. package/src/__tests__/taxrates.test.ts +701 -0
  89. package/src/__tests__/testclient.ts +48 -0
  90. package/src/__tests__/timeoffrequests.test.ts +588 -0
  91. package/src/__tests__/trackingcategories.test.ts +515 -0
  92. package/src/__tests__/uploadsessions.test.ts +221 -0
  93. package/src/__tests__/users.test.ts +1020 -0
  94. package/src/__tests__/validateconnection.test.ts +34 -0
  95. package/src/__tests__/webhooks.test.ts +254 -0
  96. package/src/lib/config.ts +4 -4
@@ -0,0 +1,687 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { expect, test } from "vitest";
6
+ import { Apideck } from "../index.js";
7
+ import { createTestHTTPClient } from "./testclient.js";
8
+
9
+ test("Connectionsettings Vault Connection Settings All", async () => {
10
+ const testHttpClient = createTestHTTPClient("vault.connectionSettingsAll");
11
+
12
+ const apideck = new Apideck({
13
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
14
+ httpClient: testHttpClient,
15
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
16
+ });
17
+
18
+ const result = await apideck.vault.connectionSettings.list({
19
+ consumerId: "test-consumer",
20
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
21
+ unifiedApi: "crm",
22
+ serviceId: "pipedrive",
23
+ resource: "leads",
24
+ });
25
+ expect(result.httpMeta.response.status).toBe(200);
26
+ expect(result.getConnectionResponse).toBeDefined();
27
+ expect(result.getConnectionResponse).toEqual({
28
+ statusCode: 200,
29
+ status: "OK",
30
+ data: {
31
+ id: "crm+salesforce",
32
+ serviceId: "salesforce",
33
+ name: "Salesforce",
34
+ tagLine:
35
+ "CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.",
36
+ unifiedApi: "crm",
37
+ state: "authorized",
38
+ integrationState: "configured",
39
+ authType: "oauth2",
40
+ oauthGrantType: "authorization_code",
41
+ enabled: true,
42
+ website: "https://www.salesforce.com",
43
+ icon:
44
+ "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
45
+ logo:
46
+ "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
47
+ authorizeUrl:
48
+ "https://unify.apideck.com/vault/authorize/salesforce/<application-id>?state=<state>",
49
+ revokeUrl:
50
+ "https://unify.apideck.com/vault/revoke/salesforce/<application-id>?state=<state>",
51
+ settings: {
52
+ "instance_url": "https://eu28.salesforce.com",
53
+ "api_key": "12345xxxxxx",
54
+ },
55
+ metadata: {
56
+ "account": {
57
+ "name": "My Company",
58
+ "id": "c01458a5-7276-41ce-bc19-639906b0450a",
59
+ },
60
+ "plan": "enterprise",
61
+ },
62
+ formFields: [
63
+ {
64
+ id: "instance_url",
65
+ label: "Instance url",
66
+ placeholder: "",
67
+ type: "text",
68
+ required: true,
69
+ customField: false,
70
+ allowCustomValues: false,
71
+ disabled: false,
72
+ sensitive: false,
73
+ },
74
+ {
75
+ id: "api_key",
76
+ label: "API Key",
77
+ placeholder: "",
78
+ type: "text",
79
+ required: true,
80
+ customField: false,
81
+ allowCustomValues: false,
82
+ disabled: false,
83
+ sensitive: true,
84
+ },
85
+ ],
86
+ configuration: [
87
+ {
88
+ resource: "leads",
89
+ defaults: [
90
+ {
91
+ target: "custom_fields",
92
+ id: "ProductInterest",
93
+ options: [
94
+ {
95
+ label: "General Channel",
96
+ value: 123,
97
+ optionType: "simple",
98
+ },
99
+ {
100
+ label: "General Channel",
101
+ value: true,
102
+ optionType: "simple",
103
+ },
104
+ {
105
+ id: "1234",
106
+ label: "General Channel",
107
+ options: [],
108
+ optionType: "group",
109
+ },
110
+ ],
111
+ value: true,
112
+ },
113
+ {
114
+ target: "custom_fields",
115
+ id: "ProductInterest",
116
+ options: [
117
+ {
118
+ label: "General Channel",
119
+ value: true,
120
+ optionType: "simple",
121
+ },
122
+ ],
123
+ value: 10.5,
124
+ },
125
+ ],
126
+ },
127
+ {
128
+ resource: "leads",
129
+ defaults: [
130
+ {
131
+ target: "custom_fields",
132
+ id: "ProductInterest",
133
+ options: [
134
+ {
135
+ label: "General Channel",
136
+ value: 123,
137
+ optionType: "simple",
138
+ },
139
+ ],
140
+ value: 10.5,
141
+ },
142
+ {
143
+ target: "custom_fields",
144
+ id: "ProductInterest",
145
+ options: [
146
+ {
147
+ id: "1234",
148
+ label: "General Channel",
149
+ options: [
150
+ {
151
+ label: "General Channel",
152
+ value: [
153
+ "team",
154
+ "general",
155
+ ],
156
+ optionType: "simple",
157
+ },
158
+ {
159
+ label: "General Channel",
160
+ value: 12.5,
161
+ optionType: "simple",
162
+ },
163
+ ],
164
+ optionType: "group",
165
+ },
166
+ ],
167
+ value: "GC5000 series",
168
+ },
169
+ ],
170
+ },
171
+ {
172
+ resource: "leads",
173
+ defaults: [
174
+ {
175
+ target: "custom_fields",
176
+ id: "ProductInterest",
177
+ options: [
178
+ {
179
+ label: "General Channel",
180
+ value: [
181
+ "team",
182
+ "general",
183
+ ],
184
+ optionType: "simple",
185
+ },
186
+ {
187
+ label: "General Channel",
188
+ value: [
189
+ "team",
190
+ "general",
191
+ ],
192
+ optionType: "simple",
193
+ },
194
+ {
195
+ label: "General Channel",
196
+ value: "general",
197
+ optionType: "simple",
198
+ },
199
+ ],
200
+ value: [],
201
+ },
202
+ ],
203
+ },
204
+ ],
205
+ configurableResources: [
206
+ "opportunities",
207
+ "companies",
208
+ "contacts",
209
+ "leads",
210
+ ],
211
+ resourceSchemaSupport: [
212
+ "leads",
213
+ ],
214
+ resourceSettingsSupport: [
215
+ "leads",
216
+ ],
217
+ settingsRequiredForAuthorization: [
218
+ "client_id",
219
+ "client_secret",
220
+ ],
221
+ subscriptions: [
222
+ {
223
+ downstreamId: "5f5f5f5f5f5f5f5f5f5f5f5f",
224
+ unifyEventTypes: [
225
+ "crm.contact.created",
226
+ ],
227
+ downstreamEventTypes: [
228
+ "contacts.CREATED",
229
+ ],
230
+ executeUrl:
231
+ "https://unify.apideck.com/webhook/w/{lookupIdToken}/{serviceId}?e={downstreamEventType}",
232
+ createdAt: "2020-10-01T12:00:00.000Z",
233
+ },
234
+ {
235
+ downstreamId: "5f5f5f5f5f5f5f5f5f5f5f5f",
236
+ unifyEventTypes: [
237
+ "crm.contact.created",
238
+ ],
239
+ downstreamEventTypes: [
240
+ "contacts.CREATED",
241
+ ],
242
+ executeUrl:
243
+ "https://unify.apideck.com/webhook/w/{lookupIdToken}/{serviceId}?e={downstreamEventType}",
244
+ createdAt: "2020-10-01T12:00:00.000Z",
245
+ },
246
+ ],
247
+ hasGuide: true,
248
+ customMappings: [
249
+ {
250
+ id: "hris+employees+first_aid_training",
251
+ label: "First Aid Training",
252
+ description: "First Aid Training completed after 2019-01-01",
253
+ value: "$.root.training.first_aid",
254
+ key: "first_aid_training",
255
+ required: false,
256
+ customField: true,
257
+ consumerId: "test_user_id",
258
+ example: "Some value",
259
+ },
260
+ {
261
+ id: "hris+employees+first_aid_training",
262
+ label: "First Aid Training",
263
+ description: "First Aid Training completed after 2019-01-01",
264
+ value: "$.root.training.first_aid",
265
+ key: "first_aid_training",
266
+ required: false,
267
+ customField: true,
268
+ consumerId: "test_user_id",
269
+ example: "Some value",
270
+ },
271
+ ],
272
+ createdAt: 1615563533390,
273
+ updatedAt: 1616662325753,
274
+ },
275
+ });
276
+ });
277
+
278
+ test("Connectionsettings Vault Connection Settings Update", async () => {
279
+ const testHttpClient = createTestHTTPClient("vault.connectionSettingsUpdate");
280
+
281
+ const apideck = new Apideck({
282
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
283
+ httpClient: testHttpClient,
284
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
285
+ });
286
+
287
+ const result = await apideck.vault.connectionSettings.update({
288
+ consumerId: "test-consumer",
289
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
290
+ serviceId: "pipedrive",
291
+ unifiedApi: "crm",
292
+ resource: "leads",
293
+ connection: {
294
+ enabled: true,
295
+ settings: {
296
+ "api_key": "12345xxxxxx",
297
+ "instance_url": "https://eu28.salesforce.com",
298
+ },
299
+ metadata: {
300
+ "account": {
301
+ "id": "c01458a5-7276-41ce-bc19-639906b0450a",
302
+ "name": "My Company",
303
+ },
304
+ "plan": "enterprise",
305
+ },
306
+ configuration: [
307
+ {
308
+ resource: "leads",
309
+ defaults: [
310
+ {
311
+ id: "ProductInterest",
312
+ options: [
313
+ {
314
+ id: "1234",
315
+ label: "General Channel",
316
+ options: [
317
+ {
318
+ label: "General Channel",
319
+ value: 12.5,
320
+ optionType: "simple",
321
+ },
322
+ {
323
+ label: "General Channel",
324
+ value: [
325
+ "team",
326
+ "general",
327
+ ],
328
+ optionType: "simple",
329
+ },
330
+ ],
331
+ optionType: "group",
332
+ },
333
+ {
334
+ label: "General Channel",
335
+ value: [
336
+ "team",
337
+ "general",
338
+ ],
339
+ optionType: "simple",
340
+ },
341
+ ],
342
+ value: 10.5,
343
+ },
344
+ {
345
+ id: "ProductInterest",
346
+ options: [
347
+ {
348
+ label: "General Channel",
349
+ value: "general",
350
+ optionType: "simple",
351
+ },
352
+ ],
353
+ value: true,
354
+ },
355
+ ],
356
+ },
357
+ {
358
+ resource: "leads",
359
+ defaults: [
360
+ {
361
+ id: "ProductInterest",
362
+ options: [
363
+ {
364
+ label: "General Channel",
365
+ value: true,
366
+ optionType: "simple",
367
+ },
368
+ ],
369
+ value: true,
370
+ },
371
+ {
372
+ id: "ProductInterest",
373
+ options: [
374
+ {
375
+ label: "General Channel",
376
+ value: true,
377
+ optionType: "simple",
378
+ },
379
+ {
380
+ id: "1234",
381
+ label: "General Channel",
382
+ options: [
383
+ {
384
+ label: "General Channel",
385
+ value: 12.5,
386
+ optionType: "simple",
387
+ },
388
+ ],
389
+ optionType: "group",
390
+ },
391
+ ],
392
+ value: "GC5000 series",
393
+ },
394
+ {
395
+ id: "ProductInterest",
396
+ options: [
397
+ {
398
+ label: "General Channel",
399
+ value: [
400
+ "team",
401
+ "general",
402
+ ],
403
+ optionType: "simple",
404
+ },
405
+ ],
406
+ value: [
407
+ 10.5,
408
+ 10,
409
+ "GC6000 series",
410
+ ],
411
+ },
412
+ ],
413
+ },
414
+ {
415
+ resource: "leads",
416
+ defaults: [
417
+ {
418
+ id: "ProductInterest",
419
+ options: [
420
+ {
421
+ id: "1234",
422
+ label: "General Channel",
423
+ options: [
424
+ {
425
+ label: "General Channel",
426
+ value: "general",
427
+ optionType: "simple",
428
+ },
429
+ {
430
+ label: "General Channel",
431
+ value: "general",
432
+ optionType: "simple",
433
+ },
434
+ {
435
+ label: "General Channel",
436
+ value: 123,
437
+ optionType: "simple",
438
+ },
439
+ ],
440
+ optionType: "group",
441
+ },
442
+ {
443
+ id: "1234",
444
+ label: "General Channel",
445
+ options: [],
446
+ optionType: "group",
447
+ },
448
+ ],
449
+ value: true,
450
+ },
451
+ {
452
+ id: "ProductInterest",
453
+ options: [
454
+ {
455
+ label: "General Channel",
456
+ value: "general",
457
+ optionType: "simple",
458
+ },
459
+ ],
460
+ value: true,
461
+ },
462
+ ],
463
+ },
464
+ ],
465
+ customMappings: [
466
+ {
467
+ value: "$.root.training.first_aid",
468
+ },
469
+ {
470
+ value: "$.root.training.first_aid",
471
+ },
472
+ ],
473
+ },
474
+ });
475
+ expect(result.httpMeta.response.status).toBe(200);
476
+ expect(result.updateConnectionResponse).toBeDefined();
477
+ expect(result.updateConnectionResponse).toEqual({
478
+ statusCode: 200,
479
+ status: "OK",
480
+ data: {
481
+ id: "crm+salesforce",
482
+ serviceId: "salesforce",
483
+ name: "Salesforce",
484
+ tagLine:
485
+ "CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.",
486
+ unifiedApi: "crm",
487
+ state: "authorized",
488
+ integrationState: "configured",
489
+ authType: "oauth2",
490
+ oauthGrantType: "authorization_code",
491
+ enabled: true,
492
+ website: "https://www.salesforce.com",
493
+ icon:
494
+ "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
495
+ logo:
496
+ "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
497
+ authorizeUrl:
498
+ "https://unify.apideck.com/vault/authorize/salesforce/<application-id>?state=<state>",
499
+ revokeUrl:
500
+ "https://unify.apideck.com/vault/revoke/salesforce/<application-id>?state=<state>",
501
+ settings: {
502
+ "instance_url": "https://eu28.salesforce.com",
503
+ "api_key": "12345xxxxxx",
504
+ },
505
+ metadata: {
506
+ "account": {
507
+ "name": "My Company",
508
+ "id": "c01458a5-7276-41ce-bc19-639906b0450a",
509
+ },
510
+ "plan": "enterprise",
511
+ },
512
+ formFields: [
513
+ {
514
+ id: "instance_url",
515
+ label: "Instance url",
516
+ placeholder: "",
517
+ type: "text",
518
+ required: true,
519
+ customField: false,
520
+ allowCustomValues: false,
521
+ disabled: false,
522
+ sensitive: false,
523
+ },
524
+ {
525
+ id: "api_key",
526
+ label: "API Key",
527
+ placeholder: "",
528
+ type: "text",
529
+ required: true,
530
+ customField: false,
531
+ allowCustomValues: false,
532
+ disabled: false,
533
+ sensitive: true,
534
+ },
535
+ ],
536
+ configuration: [
537
+ {
538
+ resource: "leads",
539
+ defaults: [
540
+ {
541
+ target: "custom_fields",
542
+ id: "ProductInterest",
543
+ options: [
544
+ {
545
+ id: "1234",
546
+ label: "General Channel",
547
+ options: [
548
+ {
549
+ label: "General Channel",
550
+ value: 12.5,
551
+ optionType: "simple",
552
+ },
553
+ {
554
+ label: "General Channel",
555
+ value: 123,
556
+ optionType: "simple",
557
+ },
558
+ {
559
+ label: "General Channel",
560
+ value: 123,
561
+ optionType: "simple",
562
+ },
563
+ ],
564
+ optionType: "group",
565
+ },
566
+ ],
567
+ value: 10.5,
568
+ },
569
+ {
570
+ target: "custom_fields",
571
+ id: "ProductInterest",
572
+ options: [
573
+ {
574
+ id: "1234",
575
+ label: "General Channel",
576
+ options: [
577
+ {
578
+ label: "General Channel",
579
+ value: true,
580
+ optionType: "simple",
581
+ },
582
+ {
583
+ label: "General Channel",
584
+ value: 123,
585
+ optionType: "simple",
586
+ },
587
+ {
588
+ label: "General Channel",
589
+ value: true,
590
+ optionType: "simple",
591
+ },
592
+ ],
593
+ optionType: "group",
594
+ },
595
+ {
596
+ label: "General Channel",
597
+ value: 123,
598
+ optionType: "simple",
599
+ },
600
+ {
601
+ label: "General Channel",
602
+ value: 123,
603
+ optionType: "simple",
604
+ },
605
+ ],
606
+ value: true,
607
+ },
608
+ ],
609
+ },
610
+ {
611
+ resource: "leads",
612
+ defaults: [
613
+ {
614
+ target: "custom_fields",
615
+ id: "ProductInterest",
616
+ options: [
617
+ {
618
+ label: "General Channel",
619
+ value: "general",
620
+ optionType: "simple",
621
+ },
622
+ ],
623
+ value: 10.5,
624
+ },
625
+ ],
626
+ },
627
+ ],
628
+ configurableResources: [
629
+ "opportunities",
630
+ "companies",
631
+ "contacts",
632
+ "leads",
633
+ ],
634
+ resourceSchemaSupport: [
635
+ "leads",
636
+ ],
637
+ resourceSettingsSupport: [
638
+ "leads",
639
+ ],
640
+ settingsRequiredForAuthorization: [
641
+ "client_id",
642
+ "client_secret",
643
+ ],
644
+ subscriptions: [
645
+ {
646
+ downstreamId: "5f5f5f5f5f5f5f5f5f5f5f5f",
647
+ unifyEventTypes: [
648
+ "crm.contact.created",
649
+ ],
650
+ downstreamEventTypes: [
651
+ "contacts.CREATED",
652
+ ],
653
+ executeUrl:
654
+ "https://unify.apideck.com/webhook/w/{lookupIdToken}/{serviceId}?e={downstreamEventType}",
655
+ createdAt: "2020-10-01T12:00:00.000Z",
656
+ },
657
+ ],
658
+ hasGuide: true,
659
+ customMappings: [
660
+ {
661
+ id: "hris+employees+first_aid_training",
662
+ label: "First Aid Training",
663
+ description: "First Aid Training completed after 2019-01-01",
664
+ value: "$.root.training.first_aid",
665
+ key: "first_aid_training",
666
+ required: false,
667
+ customField: true,
668
+ consumerId: "test_user_id",
669
+ example: "Some value",
670
+ },
671
+ {
672
+ id: "hris+employees+first_aid_training",
673
+ label: "First Aid Training",
674
+ description: "First Aid Training completed after 2019-01-01",
675
+ value: "$.root.training.first_aid",
676
+ key: "first_aid_training",
677
+ required: false,
678
+ customField: true,
679
+ consumerId: "test_user_id",
680
+ example: "Some value",
681
+ },
682
+ ],
683
+ createdAt: 1615563533390,
684
+ updatedAt: 1616662325753,
685
+ },
686
+ });
687
+ });
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { expect, test } from "vitest";
6
+ import { Apideck } from "../index.js";
7
+ import { GetAcceptEnum } from "../sdk/connectordocs.js";
8
+ import { createTestHTTPClient } from "./testclient.js";
9
+
10
+ test("Connectordocs Connector Connector Docs One", async () => {
11
+ const testHttpClient = createTestHTTPClient("connector.connectorDocsOne");
12
+
13
+ const apideck = new Apideck({
14
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
15
+ httpClient: testHttpClient,
16
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
17
+ });
18
+
19
+ const result = await apideck.connector.connectorDocs.get({
20
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
21
+ id: "<id>",
22
+ docId: "application_owner+oauth_credentials",
23
+ }, {
24
+ acceptHeaderOverride: GetAcceptEnum.textMarkdown,
25
+ });
26
+ expect(result.httpMeta.response.status).toBe(200);
27
+ expect(result.getConnectorDocResponse).toBeDefined();
28
+ expect(result.getConnectorDocResponse).toEqual("<value>");
29
+ });