@apideck/unify 0.23.0 → 0.23.1

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 (93) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/models/components/note.d.ts +5 -0
  5. package/models/components/note.d.ts.map +1 -1
  6. package/models/components/note.js +4 -0
  7. package/models/components/note.js.map +1 -1
  8. package/models/components/noteinput.d.ts +5 -0
  9. package/models/components/noteinput.d.ts.map +1 -1
  10. package/models/components/noteinput.js +4 -0
  11. package/models/components/noteinput.js.map +1 -1
  12. package/package.json +5 -1
  13. package/src/__tests__/activities.test.ts +783 -0
  14. package/src/__tests__/agedcreditors.test.ts +279 -0
  15. package/src/__tests__/ageddebtors.test.ts +279 -0
  16. package/src/__tests__/apideckcompanies.test.ts +712 -0
  17. package/src/__tests__/apideckcustomers.test.ts +360 -0
  18. package/src/__tests__/apideckdepartments.test.ts +319 -0
  19. package/src/__tests__/apiresources.test.ts +61 -0
  20. package/src/__tests__/apis.test.ts +214 -0
  21. package/src/__tests__/applicants.test.ts +976 -0
  22. package/src/__tests__/applications.test.ts +329 -0
  23. package/src/__tests__/assertions.ts +13 -0
  24. package/src/__tests__/attachments.test.ts +363 -0
  25. package/src/__tests__/balancesheet.test.ts +451 -0
  26. package/src/__tests__/billpayments.test.ts +666 -0
  27. package/src/__tests__/bills.test.ts +1133 -0
  28. package/src/__tests__/collections.test.ts +115 -0
  29. package/src/__tests__/collectiontags.test.ts +66 -0
  30. package/src/__tests__/collectionticketcomments.test.ts +318 -0
  31. package/src/__tests__/collectiontickets.test.ts +436 -0
  32. package/src/__tests__/collectionusers.test.ts +122 -0
  33. package/src/__tests__/companies.test.ts +1059 -0
  34. package/src/__tests__/companyinfo.test.ts +218 -0
  35. package/src/__tests__/connectioncustommappings.test.ts +67 -0
  36. package/src/__tests__/connections.test.ts +1713 -0
  37. package/src/__tests__/connectionsettings.test.ts +280 -0
  38. package/src/__tests__/connectordocs.test.ts +28 -0
  39. package/src/__tests__/connectors.test.ts +751 -0
  40. package/src/__tests__/consumerrequestcounts.test.ts +41 -0
  41. package/src/__tests__/consumers.test.ts +517 -0
  42. package/src/__tests__/contacts.test.ts +957 -0
  43. package/src/__tests__/createcallback.test.ts +34 -0
  44. package/src/__tests__/creditnotes.test.ts +1362 -0
  45. package/src/__tests__/customers.test.ts +1089 -0
  46. package/src/__tests__/customfields.test.ts +50 -0
  47. package/src/__tests__/custommappings.test.ts +63 -0
  48. package/src/__tests__/departments.test.ts +359 -0
  49. package/src/__tests__/drivegroups.test.ts +318 -0
  50. package/src/__tests__/drives.test.ts +311 -0
  51. package/src/__tests__/employeepayrolls.test.ts +487 -0
  52. package/src/__tests__/employees.test.ts +1682 -0
  53. package/src/__tests__/employeeschedules.test.ts +456 -0
  54. package/src/__tests__/eventlogs.test.ts +157 -0
  55. package/src/__tests__/expenses.test.ts +566 -0
  56. package/src/__tests__/files.test.ts +392 -0
  57. package/src/__tests__/files.ts +56 -0
  58. package/src/__tests__/folders.test.ts +103 -0
  59. package/src/__tests__/invoiceitems.test.ts +586 -0
  60. package/src/__tests__/invoices.test.ts +1561 -0
  61. package/src/__tests__/jobs.test.ts +837 -0
  62. package/src/__tests__/journalentries.test.ts +1053 -0
  63. package/src/__tests__/leads.test.ts +897 -0
  64. package/src/__tests__/ledgeraccounts.test.ts +594 -0
  65. package/src/__tests__/locations.test.ts +561 -0
  66. package/src/__tests__/logs.test.ts +135 -0
  67. package/src/__tests__/messages.test.ts +396 -0
  68. package/src/__tests__/mockserver/README.md +52 -0
  69. package/src/__tests__/notes.test.ts +335 -0
  70. package/src/__tests__/opportunities.test.ts +503 -0
  71. package/src/__tests__/orders.test.ts +849 -0
  72. package/src/__tests__/payments.test.ts +557 -0
  73. package/src/__tests__/payrolls.test.ts +481 -0
  74. package/src/__tests__/pipelines.test.ts +383 -0
  75. package/src/__tests__/products.test.ts +505 -0
  76. package/src/__tests__/profitandloss.test.ts +221 -0
  77. package/src/__tests__/purchaseorders.test.ts +1464 -0
  78. package/src/__tests__/sessions.test.ts +70 -0
  79. package/src/__tests__/sharedlinks.test.ts +331 -0
  80. package/src/__tests__/stores.test.ts +39 -0
  81. package/src/__tests__/subsidiaries.test.ts +316 -0
  82. package/src/__tests__/suppliers.test.ts +1071 -0
  83. package/src/__tests__/taxrates.test.ts +472 -0
  84. package/src/__tests__/testclient.ts +48 -0
  85. package/src/__tests__/timeoffrequests.test.ts +381 -0
  86. package/src/__tests__/trackingcategories.test.ts +329 -0
  87. package/src/__tests__/uploadsessions.test.ts +142 -0
  88. package/src/__tests__/users.test.ts +667 -0
  89. package/src/__tests__/validateconnection.test.ts +32 -0
  90. package/src/__tests__/webhooks.test.ts +248 -0
  91. package/src/lib/config.ts +3 -3
  92. package/src/models/components/note.ts +9 -0
  93. package/src/models/components/noteinput.ts +9 -0
@@ -0,0 +1,712 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { assert, expect, it, test } from "vitest";
6
+ import { Apideck } from "../index.js";
7
+ import { createTestHTTPClient } from "./testclient.js";
8
+
9
+ test("Apideck Companies Hris Companies All", async () => {
10
+ const testHttpClient = createTestHTTPClient("hris.companiesAll");
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.hris.companies.list({
19
+ serviceId: "salesforce",
20
+ passThrough: {
21
+ "search": "San Francisco",
22
+ },
23
+ fields: "id,updated_at",
24
+ });
25
+ expect(result.httpMeta.response.status).toBe(200);
26
+ expect(result.getHrisCompaniesResponse).toBeDefined();
27
+ expect(result.getHrisCompaniesResponse).toEqual({
28
+ statusCode: 200,
29
+ status: "OK",
30
+ service: "undefined",
31
+ resource: "Companies",
32
+ operation: "all",
33
+ data: [
34
+ {
35
+ id: "12345",
36
+ legalName: "SpaceX",
37
+ displayName: "SpaceX",
38
+ subdomain: "company",
39
+ status: "active",
40
+ companyNumber: "123456-AB",
41
+ currency: "USD",
42
+ addresses: [
43
+ {
44
+ id: "123",
45
+ type: "primary",
46
+ string: "25 Spring Street, Blackburn, VIC 3130",
47
+ name: "HQ US",
48
+ line1: "Main street",
49
+ line2: "apt #",
50
+ line3: "Suite #",
51
+ line4: "delivery instructions",
52
+ streetNumber: "25",
53
+ city: "San Francisco",
54
+ state: "CA",
55
+ postalCode: "94104",
56
+ country: "US",
57
+ latitude: "40.759211",
58
+ longitude: "-73.984638",
59
+ county: "Santa Clara",
60
+ contactName: "Elon Musk",
61
+ salutation: "Mr",
62
+ phoneNumber: "111-111-1111",
63
+ fax: "122-111-1111",
64
+ email: "elon@musk.com",
65
+ website: "https://elonmusk.com",
66
+ notes: "Address notes or delivery instructions.",
67
+ rowVersion: "1-12345",
68
+ },
69
+ {
70
+ id: "123",
71
+ type: "primary",
72
+ string: "25 Spring Street, Blackburn, VIC 3130",
73
+ name: "HQ US",
74
+ line1: "Main street",
75
+ line2: "apt #",
76
+ line3: "Suite #",
77
+ line4: "delivery instructions",
78
+ streetNumber: "25",
79
+ city: "San Francisco",
80
+ state: "CA",
81
+ postalCode: "94104",
82
+ country: "US",
83
+ latitude: "40.759211",
84
+ longitude: "-73.984638",
85
+ county: "Santa Clara",
86
+ contactName: "Elon Musk",
87
+ salutation: "Mr",
88
+ phoneNumber: "111-111-1111",
89
+ fax: "122-111-1111",
90
+ email: "elon@musk.com",
91
+ website: "https://elonmusk.com",
92
+ notes: "Address notes or delivery instructions.",
93
+ rowVersion: "1-12345",
94
+ },
95
+ ],
96
+ phoneNumbers: [
97
+ {
98
+ id: "12345",
99
+ countryCode: "1",
100
+ areaCode: "323",
101
+ number: "111-111-1111",
102
+ extension: "105",
103
+ type: "primary",
104
+ },
105
+ {
106
+ id: "12345",
107
+ countryCode: "1",
108
+ areaCode: "323",
109
+ number: "111-111-1111",
110
+ extension: "105",
111
+ type: "primary",
112
+ },
113
+ {
114
+ id: "12345",
115
+ countryCode: "1",
116
+ areaCode: "323",
117
+ number: "111-111-1111",
118
+ extension: "105",
119
+ type: "primary",
120
+ },
121
+ ],
122
+ emails: [
123
+ {
124
+ id: "123",
125
+ email: "elon@musk.com",
126
+ type: "primary",
127
+ },
128
+ ],
129
+ websites: [
130
+ {
131
+ id: "12345",
132
+ url: "http://example.com",
133
+ type: "primary",
134
+ },
135
+ ],
136
+ debtorId: "12345",
137
+ deleted: false,
138
+ updatedBy: "12345",
139
+ createdBy: "12345",
140
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
141
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
142
+ passThrough: [
143
+ {
144
+ serviceId: "<id>",
145
+ extendPaths: [
146
+ {
147
+ path: "$.nested.property",
148
+ value: {
149
+ "TaxClassificationRef": {
150
+ "value": "EUC-99990201-V1-00020000",
151
+ },
152
+ },
153
+ },
154
+ {
155
+ path: "$.nested.property",
156
+ value: {
157
+ "TaxClassificationRef": {
158
+ "value": "EUC-99990201-V1-00020000",
159
+ },
160
+ },
161
+ },
162
+ ],
163
+ },
164
+ ],
165
+ },
166
+ {
167
+ id: "12345",
168
+ legalName: "SpaceX",
169
+ displayName: "SpaceX",
170
+ subdomain: "company",
171
+ status: "active",
172
+ companyNumber: "123456-AB",
173
+ currency: "USD",
174
+ addresses: [
175
+ {
176
+ id: "123",
177
+ type: "primary",
178
+ string: "25 Spring Street, Blackburn, VIC 3130",
179
+ name: "HQ US",
180
+ line1: "Main street",
181
+ line2: "apt #",
182
+ line3: "Suite #",
183
+ line4: "delivery instructions",
184
+ streetNumber: "25",
185
+ city: "San Francisco",
186
+ state: "CA",
187
+ postalCode: "94104",
188
+ country: "US",
189
+ latitude: "40.759211",
190
+ longitude: "-73.984638",
191
+ county: "Santa Clara",
192
+ contactName: "Elon Musk",
193
+ salutation: "Mr",
194
+ phoneNumber: "111-111-1111",
195
+ fax: "122-111-1111",
196
+ email: "elon@musk.com",
197
+ website: "https://elonmusk.com",
198
+ notes: "Address notes or delivery instructions.",
199
+ rowVersion: "1-12345",
200
+ },
201
+ {
202
+ id: "123",
203
+ type: "primary",
204
+ string: "25 Spring Street, Blackburn, VIC 3130",
205
+ name: "HQ US",
206
+ line1: "Main street",
207
+ line2: "apt #",
208
+ line3: "Suite #",
209
+ line4: "delivery instructions",
210
+ streetNumber: "25",
211
+ city: "San Francisco",
212
+ state: "CA",
213
+ postalCode: "94104",
214
+ country: "US",
215
+ latitude: "40.759211",
216
+ longitude: "-73.984638",
217
+ county: "Santa Clara",
218
+ contactName: "Elon Musk",
219
+ salutation: "Mr",
220
+ phoneNumber: "111-111-1111",
221
+ fax: "122-111-1111",
222
+ email: "elon@musk.com",
223
+ website: "https://elonmusk.com",
224
+ notes: "Address notes or delivery instructions.",
225
+ rowVersion: "1-12345",
226
+ },
227
+ ],
228
+ phoneNumbers: [
229
+ {
230
+ id: "12345",
231
+ countryCode: "1",
232
+ areaCode: "323",
233
+ number: "111-111-1111",
234
+ extension: "105",
235
+ type: "primary",
236
+ },
237
+ ],
238
+ emails: [
239
+ {
240
+ id: "123",
241
+ email: "elon@musk.com",
242
+ type: "primary",
243
+ },
244
+ {
245
+ id: "123",
246
+ email: "elon@musk.com",
247
+ type: "primary",
248
+ },
249
+ {
250
+ id: "123",
251
+ email: "elon@musk.com",
252
+ type: "primary",
253
+ },
254
+ ],
255
+ websites: [
256
+ {
257
+ id: "12345",
258
+ url: "http://example.com",
259
+ type: "primary",
260
+ },
261
+ ],
262
+ debtorId: "12345",
263
+ deleted: false,
264
+ updatedBy: "12345",
265
+ createdBy: "12345",
266
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
267
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
268
+ passThrough: [
269
+ {
270
+ serviceId: "<id>",
271
+ extendPaths: [
272
+ {
273
+ path: "$.nested.property",
274
+ value: {
275
+ "TaxClassificationRef": {
276
+ "value": "EUC-99990201-V1-00020000",
277
+ },
278
+ },
279
+ },
280
+ {
281
+ path: "$.nested.property",
282
+ value: {
283
+ "TaxClassificationRef": {
284
+ "value": "EUC-99990201-V1-00020000",
285
+ },
286
+ },
287
+ },
288
+ {
289
+ path: "$.nested.property",
290
+ value: {
291
+ "TaxClassificationRef": {
292
+ "value": "EUC-99990201-V1-00020000",
293
+ },
294
+ },
295
+ },
296
+ ],
297
+ },
298
+ ],
299
+ },
300
+ {
301
+ id: "12345",
302
+ legalName: "SpaceX",
303
+ displayName: "SpaceX",
304
+ subdomain: "company",
305
+ status: "active",
306
+ companyNumber: "123456-AB",
307
+ currency: "USD",
308
+ addresses: [
309
+ {
310
+ id: "123",
311
+ type: "primary",
312
+ string: "25 Spring Street, Blackburn, VIC 3130",
313
+ name: "HQ US",
314
+ line1: "Main street",
315
+ line2: "apt #",
316
+ line3: "Suite #",
317
+ line4: "delivery instructions",
318
+ streetNumber: "25",
319
+ city: "San Francisco",
320
+ state: "CA",
321
+ postalCode: "94104",
322
+ country: "US",
323
+ latitude: "40.759211",
324
+ longitude: "-73.984638",
325
+ county: "Santa Clara",
326
+ contactName: "Elon Musk",
327
+ salutation: "Mr",
328
+ phoneNumber: "111-111-1111",
329
+ fax: "122-111-1111",
330
+ email: "elon@musk.com",
331
+ website: "https://elonmusk.com",
332
+ notes: "Address notes or delivery instructions.",
333
+ rowVersion: "1-12345",
334
+ },
335
+ {
336
+ id: "123",
337
+ type: "primary",
338
+ string: "25 Spring Street, Blackburn, VIC 3130",
339
+ name: "HQ US",
340
+ line1: "Main street",
341
+ line2: "apt #",
342
+ line3: "Suite #",
343
+ line4: "delivery instructions",
344
+ streetNumber: "25",
345
+ city: "San Francisco",
346
+ state: "CA",
347
+ postalCode: "94104",
348
+ country: "US",
349
+ latitude: "40.759211",
350
+ longitude: "-73.984638",
351
+ county: "Santa Clara",
352
+ contactName: "Elon Musk",
353
+ salutation: "Mr",
354
+ phoneNumber: "111-111-1111",
355
+ fax: "122-111-1111",
356
+ email: "elon@musk.com",
357
+ website: "https://elonmusk.com",
358
+ notes: "Address notes or delivery instructions.",
359
+ rowVersion: "1-12345",
360
+ },
361
+ ],
362
+ phoneNumbers: [
363
+ {
364
+ id: "12345",
365
+ countryCode: "1",
366
+ areaCode: "323",
367
+ number: "111-111-1111",
368
+ extension: "105",
369
+ type: "primary",
370
+ },
371
+ {
372
+ id: "12345",
373
+ countryCode: "1",
374
+ areaCode: "323",
375
+ number: "111-111-1111",
376
+ extension: "105",
377
+ type: "primary",
378
+ },
379
+ ],
380
+ emails: [
381
+ {
382
+ id: "123",
383
+ email: "elon@musk.com",
384
+ type: "primary",
385
+ },
386
+ ],
387
+ websites: [
388
+ {
389
+ id: "12345",
390
+ url: "http://example.com",
391
+ type: "primary",
392
+ },
393
+ ],
394
+ debtorId: "12345",
395
+ deleted: false,
396
+ updatedBy: "12345",
397
+ createdBy: "12345",
398
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
399
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
400
+ passThrough: [
401
+ {
402
+ serviceId: "<id>",
403
+ extendPaths: [
404
+ {
405
+ path: "$.nested.property",
406
+ value: {
407
+ "TaxClassificationRef": {
408
+ "value": "EUC-99990201-V1-00020000",
409
+ },
410
+ },
411
+ },
412
+ {
413
+ path: "$.nested.property",
414
+ value: {
415
+ "TaxClassificationRef": {
416
+ "value": "EUC-99990201-V1-00020000",
417
+ },
418
+ },
419
+ },
420
+ ],
421
+ },
422
+ {
423
+ serviceId: "<id>",
424
+ extendPaths: [
425
+ {
426
+ path: "$.nested.property",
427
+ value: {
428
+ "TaxClassificationRef": {
429
+ "value": "EUC-99990201-V1-00020000",
430
+ },
431
+ },
432
+ },
433
+ ],
434
+ },
435
+ ],
436
+ },
437
+ ],
438
+ meta: {
439
+ itemsOnPage: 50,
440
+ cursors: {
441
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
442
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
443
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
444
+ },
445
+ },
446
+ links: {
447
+ previous:
448
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
449
+ current: "https://unify.apideck.com/crm/companies",
450
+ next:
451
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
452
+ },
453
+ });
454
+ });
455
+
456
+ it.skip("Apideck Companies Hris Companies Add", async () => {
457
+ assert.fail(
458
+ "incomplete test found please make sure to address the following errors: [`workflow step hris.companiesAdd.test referencing operation hris.companiesAdd with expression in requestBody with type not currently supported`, `workflow step hris.companiesAdd.test referencing operation hris.companiesAdd with expression in requestBody with type not currently supported`, `workflow step hris.companiesAdd.test referencing operation hris.companiesAdd with expression in requestBody with type not currently supported`]",
459
+ );
460
+ });
461
+
462
+ test("Apideck Companies Hris Companies One", async () => {
463
+ const testHttpClient = createTestHTTPClient("hris.companiesOne");
464
+
465
+ const apideck = new Apideck({
466
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
467
+ httpClient: testHttpClient,
468
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
469
+ });
470
+
471
+ const result = await apideck.hris.companies.get({
472
+ id: "<id>",
473
+ serviceId: "salesforce",
474
+ fields: "id,updated_at",
475
+ });
476
+ expect(result.httpMeta.response.status).toBe(200);
477
+ expect(result.getHrisCompanyResponse).toBeDefined();
478
+ expect(result.getHrisCompanyResponse).toEqual({
479
+ statusCode: 200,
480
+ status: "OK",
481
+ service: "undefined",
482
+ resource: "Companies",
483
+ operation: "one",
484
+ data: {
485
+ id: "12345",
486
+ legalName: "SpaceX",
487
+ displayName: "SpaceX",
488
+ subdomain: "company",
489
+ status: "active",
490
+ companyNumber: "123456-AB",
491
+ currency: "USD",
492
+ addresses: [
493
+ {
494
+ id: "123",
495
+ type: "primary",
496
+ string: "25 Spring Street, Blackburn, VIC 3130",
497
+ name: "HQ US",
498
+ line1: "Main street",
499
+ line2: "apt #",
500
+ line3: "Suite #",
501
+ line4: "delivery instructions",
502
+ streetNumber: "25",
503
+ city: "San Francisco",
504
+ state: "CA",
505
+ postalCode: "94104",
506
+ country: "US",
507
+ latitude: "40.759211",
508
+ longitude: "-73.984638",
509
+ county: "Santa Clara",
510
+ contactName: "Elon Musk",
511
+ salutation: "Mr",
512
+ phoneNumber: "111-111-1111",
513
+ fax: "122-111-1111",
514
+ email: "elon@musk.com",
515
+ website: "https://elonmusk.com",
516
+ notes: "Address notes or delivery instructions.",
517
+ rowVersion: "1-12345",
518
+ },
519
+ {
520
+ id: "123",
521
+ type: "primary",
522
+ string: "25 Spring Street, Blackburn, VIC 3130",
523
+ name: "HQ US",
524
+ line1: "Main street",
525
+ line2: "apt #",
526
+ line3: "Suite #",
527
+ line4: "delivery instructions",
528
+ streetNumber: "25",
529
+ city: "San Francisco",
530
+ state: "CA",
531
+ postalCode: "94104",
532
+ country: "US",
533
+ latitude: "40.759211",
534
+ longitude: "-73.984638",
535
+ county: "Santa Clara",
536
+ contactName: "Elon Musk",
537
+ salutation: "Mr",
538
+ phoneNumber: "111-111-1111",
539
+ fax: "122-111-1111",
540
+ email: "elon@musk.com",
541
+ website: "https://elonmusk.com",
542
+ notes: "Address notes or delivery instructions.",
543
+ rowVersion: "1-12345",
544
+ },
545
+ {
546
+ id: "123",
547
+ type: "primary",
548
+ string: "25 Spring Street, Blackburn, VIC 3130",
549
+ name: "HQ US",
550
+ line1: "Main street",
551
+ line2: "apt #",
552
+ line3: "Suite #",
553
+ line4: "delivery instructions",
554
+ streetNumber: "25",
555
+ city: "San Francisco",
556
+ state: "CA",
557
+ postalCode: "94104",
558
+ country: "US",
559
+ latitude: "40.759211",
560
+ longitude: "-73.984638",
561
+ county: "Santa Clara",
562
+ contactName: "Elon Musk",
563
+ salutation: "Mr",
564
+ phoneNumber: "111-111-1111",
565
+ fax: "122-111-1111",
566
+ email: "elon@musk.com",
567
+ website: "https://elonmusk.com",
568
+ notes: "Address notes or delivery instructions.",
569
+ rowVersion: "1-12345",
570
+ },
571
+ ],
572
+ phoneNumbers: [
573
+ {
574
+ id: "12345",
575
+ countryCode: "1",
576
+ areaCode: "323",
577
+ number: "111-111-1111",
578
+ extension: "105",
579
+ type: "primary",
580
+ },
581
+ {
582
+ id: "12345",
583
+ countryCode: "1",
584
+ areaCode: "323",
585
+ number: "111-111-1111",
586
+ extension: "105",
587
+ type: "primary",
588
+ },
589
+ ],
590
+ emails: [
591
+ {
592
+ id: "123",
593
+ email: "elon@musk.com",
594
+ type: "primary",
595
+ },
596
+ {
597
+ id: "123",
598
+ email: "elon@musk.com",
599
+ type: "primary",
600
+ },
601
+ ],
602
+ websites: [
603
+ {
604
+ id: "12345",
605
+ url: "http://example.com",
606
+ type: "primary",
607
+ },
608
+ {
609
+ id: "12345",
610
+ url: "http://example.com",
611
+ type: "primary",
612
+ },
613
+ ],
614
+ debtorId: "12345",
615
+ deleted: false,
616
+ updatedBy: "12345",
617
+ createdBy: "12345",
618
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
619
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
620
+ passThrough: [
621
+ {
622
+ serviceId: "<id>",
623
+ extendPaths: [
624
+ {
625
+ path: "$.nested.property",
626
+ value: {
627
+ "TaxClassificationRef": {
628
+ "value": "EUC-99990201-V1-00020000",
629
+ },
630
+ },
631
+ },
632
+ {
633
+ path: "$.nested.property",
634
+ value: {
635
+ "TaxClassificationRef": {
636
+ "value": "EUC-99990201-V1-00020000",
637
+ },
638
+ },
639
+ },
640
+ ],
641
+ },
642
+ {
643
+ serviceId: "<id>",
644
+ extendPaths: [
645
+ {
646
+ path: "$.nested.property",
647
+ value: {
648
+ "TaxClassificationRef": {
649
+ "value": "EUC-99990201-V1-00020000",
650
+ },
651
+ },
652
+ },
653
+ {
654
+ path: "$.nested.property",
655
+ value: {
656
+ "TaxClassificationRef": {
657
+ "value": "EUC-99990201-V1-00020000",
658
+ },
659
+ },
660
+ },
661
+ ],
662
+ },
663
+ {
664
+ serviceId: "<id>",
665
+ extendPaths: [
666
+ {
667
+ path: "$.nested.property",
668
+ value: {
669
+ "TaxClassificationRef": {
670
+ "value": "EUC-99990201-V1-00020000",
671
+ },
672
+ },
673
+ },
674
+ ],
675
+ },
676
+ ],
677
+ },
678
+ });
679
+ });
680
+
681
+ it.skip("Apideck Companies Hris Companies Update", async () => {
682
+ assert.fail(
683
+ "incomplete test found please make sure to address the following errors: [`workflow step hris.companiesUpdate.test referencing operation hris.companiesUpdate with expression in requestBody with type not currently supported`, `workflow step hris.companiesUpdate.test referencing operation hris.companiesUpdate with expression in requestBody with type not currently supported`, `workflow step hris.companiesUpdate.test referencing operation hris.companiesUpdate with expression in requestBody with type not currently supported`, `workflow step hris.companiesUpdate.test referencing operation hris.companiesUpdate with expression in requestBody with type not currently supported`, `workflow step hris.companiesUpdate.test referencing operation hris.companiesUpdate with expression in requestBody with type not currently supported`]",
684
+ );
685
+ });
686
+
687
+ test("Apideck Companies Hris Companies Delete", async () => {
688
+ const testHttpClient = createTestHTTPClient("hris.companiesDelete");
689
+
690
+ const apideck = new Apideck({
691
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
692
+ httpClient: testHttpClient,
693
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
694
+ });
695
+
696
+ const result = await apideck.hris.companies.delete({
697
+ id: "<id>",
698
+ serviceId: "salesforce",
699
+ });
700
+ expect(result.httpMeta.response.status).toBe(200);
701
+ expect(result.deleteHrisCompanyResponse).toBeDefined();
702
+ expect(result.deleteHrisCompanyResponse).toEqual({
703
+ statusCode: 200,
704
+ status: "OK",
705
+ service: "undefined",
706
+ resource: "Companies",
707
+ operation: "delete",
708
+ data: {
709
+ id: "12345",
710
+ },
711
+ });
712
+ });