@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,976 @@
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 { RFCDate } from "../types/index.js";
8
+ import { createTestHTTPClient } from "./testclient.js";
9
+
10
+ test("Applicants Ats Applicants All", async () => {
11
+ const testHttpClient = createTestHTTPClient("ats.applicantsAll");
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.ats.applicants.list({
20
+ serviceId: "salesforce",
21
+ filter: {
22
+ jobId: "1234",
23
+ },
24
+ passThrough: {
25
+ "search": "San Francisco",
26
+ },
27
+ fields: "id,updated_at",
28
+ });
29
+ expect(result.httpMeta.response.status).toBe(200);
30
+ expect(result.getApplicantsResponse).toBeDefined();
31
+ expect(result.getApplicantsResponse).toEqual({
32
+ statusCode: 200,
33
+ status: "OK",
34
+ service: "lever",
35
+ resource: "Applicants",
36
+ operation: "all",
37
+ data: [
38
+ {
39
+ id: "12345",
40
+ name: "Elon Musk",
41
+ firstName: "Elon",
42
+ lastName: "Musk",
43
+ middleName: "D.",
44
+ initials: "EM",
45
+ birthday: new RFCDate("2000-08-12"),
46
+ coverLetter:
47
+ "I submit this application to express my sincere interest in the API developer position. In the previous role, I was responsible for leadership and ...",
48
+ jobUrl: "https://democompany.recruitee.com/o/example-talent-pool",
49
+ photoUrl: "https://unavatar.io/elon-musk",
50
+ headline: "PepsiCo, Inc, Central Perk",
51
+ title: "CEO",
52
+ emails: [
53
+ {
54
+ id: "123",
55
+ email: "elon@musk.com",
56
+ type: "primary",
57
+ },
58
+ {
59
+ id: "123",
60
+ email: "elon@musk.com",
61
+ type: "primary",
62
+ },
63
+ ],
64
+ customFields: [
65
+ {
66
+ id: "2389328923893298",
67
+ name: "employee_level",
68
+ description: "Employee Level",
69
+ value: 10,
70
+ },
71
+ {
72
+ id: "2389328923893298",
73
+ name: "employee_level",
74
+ description: "Employee Level",
75
+ value: 10,
76
+ },
77
+ {
78
+ id: "2389328923893298",
79
+ name: "employee_level",
80
+ description: "Employee Level",
81
+ value: "Uses Salesforce and Marketo",
82
+ },
83
+ ],
84
+ phoneNumbers: [
85
+ {
86
+ id: "12345",
87
+ countryCode: "1",
88
+ areaCode: "323",
89
+ number: "111-111-1111",
90
+ extension: "105",
91
+ type: "primary",
92
+ },
93
+ {
94
+ id: "12345",
95
+ countryCode: "1",
96
+ areaCode: "323",
97
+ number: "111-111-1111",
98
+ extension: "105",
99
+ type: "primary",
100
+ },
101
+ ],
102
+ addresses: [
103
+ {
104
+ id: "123",
105
+ type: "primary",
106
+ string: "25 Spring Street, Blackburn, VIC 3130",
107
+ name: "HQ US",
108
+ line1: "Main street",
109
+ line2: "apt #",
110
+ line3: "Suite #",
111
+ line4: "delivery instructions",
112
+ streetNumber: "25",
113
+ city: "San Francisco",
114
+ state: "CA",
115
+ postalCode: "94104",
116
+ country: "US",
117
+ latitude: "40.759211",
118
+ longitude: "-73.984638",
119
+ county: "Santa Clara",
120
+ contactName: "Elon Musk",
121
+ salutation: "Mr",
122
+ phoneNumber: "111-111-1111",
123
+ fax: "122-111-1111",
124
+ email: "elon@musk.com",
125
+ website: "https://elonmusk.com",
126
+ notes: "Address notes or delivery instructions.",
127
+ rowVersion: "1-12345",
128
+ },
129
+ {
130
+ id: "123",
131
+ type: "primary",
132
+ string: "25 Spring Street, Blackburn, VIC 3130",
133
+ name: "HQ US",
134
+ line1: "Main street",
135
+ line2: "apt #",
136
+ line3: "Suite #",
137
+ line4: "delivery instructions",
138
+ streetNumber: "25",
139
+ city: "San Francisco",
140
+ state: "CA",
141
+ postalCode: "94104",
142
+ country: "US",
143
+ latitude: "40.759211",
144
+ longitude: "-73.984638",
145
+ county: "Santa Clara",
146
+ contactName: "Elon Musk",
147
+ salutation: "Mr",
148
+ phoneNumber: "111-111-1111",
149
+ fax: "122-111-1111",
150
+ email: "elon@musk.com",
151
+ website: "https://elonmusk.com",
152
+ notes: "Address notes or delivery instructions.",
153
+ rowVersion: "1-12345",
154
+ },
155
+ ],
156
+ websites: [
157
+ {
158
+ id: "12345",
159
+ url: "http://example.com",
160
+ type: "primary",
161
+ },
162
+ ],
163
+ socialLinks: [
164
+ {
165
+ id: "12345",
166
+ url: "https://www.twitter.com/apideck",
167
+ type: "twitter",
168
+ },
169
+ {
170
+ id: "12345",
171
+ url: "https://www.twitter.com/apideck",
172
+ type: "twitter",
173
+ },
174
+ {
175
+ id: "12345",
176
+ url: "https://www.twitter.com/apideck",
177
+ type: "twitter",
178
+ },
179
+ ],
180
+ stageId: "12345",
181
+ recruiterId: "12345",
182
+ coordinatorId: "12345",
183
+ applicationIds: [
184
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
185
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
186
+ ],
187
+ applications: [
188
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
189
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
190
+ ],
191
+ followers: [
192
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
193
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
194
+ ],
195
+ sources: [
196
+ "Job site",
197
+ ],
198
+ sourceId: "12345",
199
+ confidential: false,
200
+ anonymized: true,
201
+ tags: [
202
+ "New",
203
+ ],
204
+ archived: false,
205
+ lastInteractionAt: new Date("2020-09-30T07:43:32.000Z"),
206
+ ownerId: "54321",
207
+ sourcedBy: "12345",
208
+ cvUrl:
209
+ "https://recruitee-main.s3.eu-central-1.amazonaws.com/candidates/36615291/pdf_cv_38swhu4w42k1.pdf?response-content-disposition=inline&response-content-type=application%2Fpdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAQYHB7CA5RLR4Y3ON%2F20220514%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20220514T235654Z&X-Amz-Expires=36000&X-Amz-SignedHeaders=host&X-Amz-Signature=72c0621f5976db75b54de487eb821a8e73480d7f2a6a4a9713ab997944b0561f",
210
+ recordUrl: "https://app.intercom.io/contacts/12345",
211
+ rejectedAt: new Date("2020-09-30T07:43:32.000Z"),
212
+ deleted: true,
213
+ deletedBy: "12345",
214
+ deletedAt: new Date("2020-09-30T07:43:32.000Z"),
215
+ updatedBy: "12345",
216
+ createdBy: "12345",
217
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
218
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
219
+ passThrough: [
220
+ {
221
+ serviceId: "<id>",
222
+ extendPaths: [
223
+ {
224
+ path: "$.nested.property",
225
+ value: {
226
+ "TaxClassificationRef": {
227
+ "value": "EUC-99990201-V1-00020000",
228
+ },
229
+ },
230
+ },
231
+ ],
232
+ },
233
+ ],
234
+ },
235
+ {
236
+ id: "12345",
237
+ name: "Elon Musk",
238
+ firstName: "Elon",
239
+ lastName: "Musk",
240
+ middleName: "D.",
241
+ initials: "EM",
242
+ birthday: new RFCDate("2000-08-12"),
243
+ coverLetter:
244
+ "I submit this application to express my sincere interest in the API developer position. In the previous role, I was responsible for leadership and ...",
245
+ jobUrl: "https://democompany.recruitee.com/o/example-talent-pool",
246
+ photoUrl: "https://unavatar.io/elon-musk",
247
+ headline: "PepsiCo, Inc, Central Perk",
248
+ title: "CEO",
249
+ emails: [
250
+ {
251
+ id: "123",
252
+ email: "elon@musk.com",
253
+ type: "primary",
254
+ },
255
+ {
256
+ id: "123",
257
+ email: "elon@musk.com",
258
+ type: "primary",
259
+ },
260
+ {
261
+ id: "123",
262
+ email: "elon@musk.com",
263
+ type: "primary",
264
+ },
265
+ ],
266
+ customFields: [
267
+ {
268
+ id: "2389328923893298",
269
+ name: "employee_level",
270
+ description: "Employee Level",
271
+ value: {},
272
+ },
273
+ {
274
+ id: "2389328923893298",
275
+ name: "employee_level",
276
+ description: "Employee Level",
277
+ value: "Uses Salesforce and Marketo",
278
+ },
279
+ ],
280
+ phoneNumbers: [
281
+ {
282
+ id: "12345",
283
+ countryCode: "1",
284
+ areaCode: "323",
285
+ number: "111-111-1111",
286
+ extension: "105",
287
+ type: "primary",
288
+ },
289
+ ],
290
+ addresses: [
291
+ {
292
+ id: "123",
293
+ type: "primary",
294
+ string: "25 Spring Street, Blackburn, VIC 3130",
295
+ name: "HQ US",
296
+ line1: "Main street",
297
+ line2: "apt #",
298
+ line3: "Suite #",
299
+ line4: "delivery instructions",
300
+ streetNumber: "25",
301
+ city: "San Francisco",
302
+ state: "CA",
303
+ postalCode: "94104",
304
+ country: "US",
305
+ latitude: "40.759211",
306
+ longitude: "-73.984638",
307
+ county: "Santa Clara",
308
+ contactName: "Elon Musk",
309
+ salutation: "Mr",
310
+ phoneNumber: "111-111-1111",
311
+ fax: "122-111-1111",
312
+ email: "elon@musk.com",
313
+ website: "https://elonmusk.com",
314
+ notes: "Address notes or delivery instructions.",
315
+ rowVersion: "1-12345",
316
+ },
317
+ {
318
+ id: "123",
319
+ type: "primary",
320
+ string: "25 Spring Street, Blackburn, VIC 3130",
321
+ name: "HQ US",
322
+ line1: "Main street",
323
+ line2: "apt #",
324
+ line3: "Suite #",
325
+ line4: "delivery instructions",
326
+ streetNumber: "25",
327
+ city: "San Francisco",
328
+ state: "CA",
329
+ postalCode: "94104",
330
+ country: "US",
331
+ latitude: "40.759211",
332
+ longitude: "-73.984638",
333
+ county: "Santa Clara",
334
+ contactName: "Elon Musk",
335
+ salutation: "Mr",
336
+ phoneNumber: "111-111-1111",
337
+ fax: "122-111-1111",
338
+ email: "elon@musk.com",
339
+ website: "https://elonmusk.com",
340
+ notes: "Address notes or delivery instructions.",
341
+ rowVersion: "1-12345",
342
+ },
343
+ ],
344
+ websites: [
345
+ {
346
+ id: "12345",
347
+ url: "http://example.com",
348
+ type: "primary",
349
+ },
350
+ {
351
+ id: "12345",
352
+ url: "http://example.com",
353
+ type: "primary",
354
+ },
355
+ ],
356
+ socialLinks: [
357
+ {
358
+ id: "12345",
359
+ url: "https://www.twitter.com/apideck",
360
+ type: "twitter",
361
+ },
362
+ ],
363
+ stageId: "12345",
364
+ recruiterId: "12345",
365
+ coordinatorId: "12345",
366
+ applicationIds: [
367
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
368
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
369
+ ],
370
+ applications: [
371
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
372
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
373
+ ],
374
+ followers: [
375
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
376
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
377
+ ],
378
+ sources: [
379
+ "Job site",
380
+ ],
381
+ sourceId: "12345",
382
+ confidential: false,
383
+ anonymized: true,
384
+ tags: [
385
+ "New",
386
+ ],
387
+ archived: false,
388
+ lastInteractionAt: new Date("2020-09-30T07:43:32.000Z"),
389
+ ownerId: "54321",
390
+ sourcedBy: "12345",
391
+ cvUrl:
392
+ "https://recruitee-main.s3.eu-central-1.amazonaws.com/candidates/36615291/pdf_cv_38swhu4w42k1.pdf?response-content-disposition=inline&response-content-type=application%2Fpdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAQYHB7CA5RLR4Y3ON%2F20220514%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20220514T235654Z&X-Amz-Expires=36000&X-Amz-SignedHeaders=host&X-Amz-Signature=72c0621f5976db75b54de487eb821a8e73480d7f2a6a4a9713ab997944b0561f",
393
+ recordUrl: "https://app.intercom.io/contacts/12345",
394
+ rejectedAt: new Date("2020-09-30T07:43:32.000Z"),
395
+ deleted: true,
396
+ deletedBy: "12345",
397
+ deletedAt: new Date("2020-09-30T07:43:32.000Z"),
398
+ updatedBy: "12345",
399
+ createdBy: "12345",
400
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
401
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
402
+ passThrough: [
403
+ {
404
+ serviceId: "<id>",
405
+ extendPaths: [
406
+ {
407
+ path: "$.nested.property",
408
+ value: {
409
+ "TaxClassificationRef": {
410
+ "value": "EUC-99990201-V1-00020000",
411
+ },
412
+ },
413
+ },
414
+ {
415
+ path: "$.nested.property",
416
+ value: {
417
+ "TaxClassificationRef": {
418
+ "value": "EUC-99990201-V1-00020000",
419
+ },
420
+ },
421
+ },
422
+ ],
423
+ },
424
+ {
425
+ serviceId: "<id>",
426
+ extendPaths: [
427
+ {
428
+ path: "$.nested.property",
429
+ value: {
430
+ "TaxClassificationRef": {
431
+ "value": "EUC-99990201-V1-00020000",
432
+ },
433
+ },
434
+ },
435
+ {
436
+ path: "$.nested.property",
437
+ value: {
438
+ "TaxClassificationRef": {
439
+ "value": "EUC-99990201-V1-00020000",
440
+ },
441
+ },
442
+ },
443
+ {
444
+ path: "$.nested.property",
445
+ value: {
446
+ "TaxClassificationRef": {
447
+ "value": "EUC-99990201-V1-00020000",
448
+ },
449
+ },
450
+ },
451
+ ],
452
+ },
453
+ {
454
+ serviceId: "<id>",
455
+ extendPaths: [
456
+ {
457
+ path: "$.nested.property",
458
+ value: {
459
+ "TaxClassificationRef": {
460
+ "value": "EUC-99990201-V1-00020000",
461
+ },
462
+ },
463
+ },
464
+ {
465
+ path: "$.nested.property",
466
+ value: {
467
+ "TaxClassificationRef": {
468
+ "value": "EUC-99990201-V1-00020000",
469
+ },
470
+ },
471
+ },
472
+ ],
473
+ },
474
+ ],
475
+ },
476
+ {
477
+ id: "12345",
478
+ name: "Elon Musk",
479
+ firstName: "Elon",
480
+ lastName: "Musk",
481
+ middleName: "D.",
482
+ initials: "EM",
483
+ birthday: new RFCDate("2000-08-12"),
484
+ coverLetter:
485
+ "I submit this application to express my sincere interest in the API developer position. In the previous role, I was responsible for leadership and ...",
486
+ jobUrl: "https://democompany.recruitee.com/o/example-talent-pool",
487
+ photoUrl: "https://unavatar.io/elon-musk",
488
+ headline: "PepsiCo, Inc, Central Perk",
489
+ title: "CEO",
490
+ emails: [
491
+ {
492
+ id: "123",
493
+ email: "elon@musk.com",
494
+ type: "primary",
495
+ },
496
+ ],
497
+ customFields: [
498
+ {
499
+ id: "2389328923893298",
500
+ name: "employee_level",
501
+ description: "Employee Level",
502
+ value: {},
503
+ },
504
+ ],
505
+ phoneNumbers: [
506
+ {
507
+ id: "12345",
508
+ countryCode: "1",
509
+ areaCode: "323",
510
+ number: "111-111-1111",
511
+ extension: "105",
512
+ type: "primary",
513
+ },
514
+ {
515
+ id: "12345",
516
+ countryCode: "1",
517
+ areaCode: "323",
518
+ number: "111-111-1111",
519
+ extension: "105",
520
+ type: "primary",
521
+ },
522
+ {
523
+ id: "12345",
524
+ countryCode: "1",
525
+ areaCode: "323",
526
+ number: "111-111-1111",
527
+ extension: "105",
528
+ type: "primary",
529
+ },
530
+ ],
531
+ addresses: [
532
+ {
533
+ id: "123",
534
+ type: "primary",
535
+ string: "25 Spring Street, Blackburn, VIC 3130",
536
+ name: "HQ US",
537
+ line1: "Main street",
538
+ line2: "apt #",
539
+ line3: "Suite #",
540
+ line4: "delivery instructions",
541
+ streetNumber: "25",
542
+ city: "San Francisco",
543
+ state: "CA",
544
+ postalCode: "94104",
545
+ country: "US",
546
+ latitude: "40.759211",
547
+ longitude: "-73.984638",
548
+ county: "Santa Clara",
549
+ contactName: "Elon Musk",
550
+ salutation: "Mr",
551
+ phoneNumber: "111-111-1111",
552
+ fax: "122-111-1111",
553
+ email: "elon@musk.com",
554
+ website: "https://elonmusk.com",
555
+ notes: "Address notes or delivery instructions.",
556
+ rowVersion: "1-12345",
557
+ },
558
+ {
559
+ id: "123",
560
+ type: "primary",
561
+ string: "25 Spring Street, Blackburn, VIC 3130",
562
+ name: "HQ US",
563
+ line1: "Main street",
564
+ line2: "apt #",
565
+ line3: "Suite #",
566
+ line4: "delivery instructions",
567
+ streetNumber: "25",
568
+ city: "San Francisco",
569
+ state: "CA",
570
+ postalCode: "94104",
571
+ country: "US",
572
+ latitude: "40.759211",
573
+ longitude: "-73.984638",
574
+ county: "Santa Clara",
575
+ contactName: "Elon Musk",
576
+ salutation: "Mr",
577
+ phoneNumber: "111-111-1111",
578
+ fax: "122-111-1111",
579
+ email: "elon@musk.com",
580
+ website: "https://elonmusk.com",
581
+ notes: "Address notes or delivery instructions.",
582
+ rowVersion: "1-12345",
583
+ },
584
+ ],
585
+ websites: [
586
+ {
587
+ id: "12345",
588
+ url: "http://example.com",
589
+ type: "primary",
590
+ },
591
+ {
592
+ id: "12345",
593
+ url: "http://example.com",
594
+ type: "primary",
595
+ },
596
+ {
597
+ id: "12345",
598
+ url: "http://example.com",
599
+ type: "primary",
600
+ },
601
+ ],
602
+ socialLinks: [
603
+ {
604
+ id: "12345",
605
+ url: "https://www.twitter.com/apideck",
606
+ type: "twitter",
607
+ },
608
+ ],
609
+ stageId: "12345",
610
+ recruiterId: "12345",
611
+ coordinatorId: "12345",
612
+ applicationIds: [
613
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
614
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
615
+ ],
616
+ applications: [
617
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
618
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
619
+ ],
620
+ followers: [
621
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
622
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
623
+ ],
624
+ sources: [
625
+ "Job site",
626
+ ],
627
+ sourceId: "12345",
628
+ confidential: false,
629
+ anonymized: true,
630
+ tags: [
631
+ "New",
632
+ ],
633
+ archived: false,
634
+ lastInteractionAt: new Date("2020-09-30T07:43:32.000Z"),
635
+ ownerId: "54321",
636
+ sourcedBy: "12345",
637
+ cvUrl:
638
+ "https://recruitee-main.s3.eu-central-1.amazonaws.com/candidates/36615291/pdf_cv_38swhu4w42k1.pdf?response-content-disposition=inline&response-content-type=application%2Fpdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAQYHB7CA5RLR4Y3ON%2F20220514%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20220514T235654Z&X-Amz-Expires=36000&X-Amz-SignedHeaders=host&X-Amz-Signature=72c0621f5976db75b54de487eb821a8e73480d7f2a6a4a9713ab997944b0561f",
639
+ recordUrl: "https://app.intercom.io/contacts/12345",
640
+ rejectedAt: new Date("2020-09-30T07:43:32.000Z"),
641
+ deleted: true,
642
+ deletedBy: "12345",
643
+ deletedAt: new Date("2020-09-30T07:43:32.000Z"),
644
+ updatedBy: "12345",
645
+ createdBy: "12345",
646
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
647
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
648
+ passThrough: [
649
+ {
650
+ serviceId: "<id>",
651
+ extendPaths: [
652
+ {
653
+ path: "$.nested.property",
654
+ value: {
655
+ "TaxClassificationRef": {
656
+ "value": "EUC-99990201-V1-00020000",
657
+ },
658
+ },
659
+ },
660
+ {
661
+ path: "$.nested.property",
662
+ value: {
663
+ "TaxClassificationRef": {
664
+ "value": "EUC-99990201-V1-00020000",
665
+ },
666
+ },
667
+ },
668
+ {
669
+ path: "$.nested.property",
670
+ value: {
671
+ "TaxClassificationRef": {
672
+ "value": "EUC-99990201-V1-00020000",
673
+ },
674
+ },
675
+ },
676
+ ],
677
+ },
678
+ ],
679
+ },
680
+ ],
681
+ meta: {
682
+ itemsOnPage: 50,
683
+ cursors: {
684
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
685
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
686
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
687
+ },
688
+ },
689
+ links: {
690
+ previous:
691
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
692
+ current: "https://unify.apideck.com/crm/companies",
693
+ next:
694
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
695
+ },
696
+ });
697
+ });
698
+
699
+ it.skip("Applicants Ats Applicants Add", async () => {
700
+ assert.fail(
701
+ "incomplete test found please make sure to address the following errors: [`workflow step ats.applicantsAdd.test referencing operation ats.applicantsAdd with expression in requestBody with type not currently supported`]",
702
+ );
703
+ });
704
+
705
+ test("Applicants Ats Applicants One", async () => {
706
+ const testHttpClient = createTestHTTPClient("ats.applicantsOne");
707
+
708
+ const apideck = new Apideck({
709
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
710
+ httpClient: testHttpClient,
711
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
712
+ });
713
+
714
+ const result = await apideck.ats.applicants.get({
715
+ id: "<id>",
716
+ serviceId: "salesforce",
717
+ fields: "id,updated_at",
718
+ });
719
+ expect(result.httpMeta.response.status).toBe(200);
720
+ expect(result.getApplicantResponse).toBeDefined();
721
+ expect(result.getApplicantResponse).toEqual({
722
+ statusCode: 200,
723
+ status: "OK",
724
+ service: "lever",
725
+ resource: "Applicants",
726
+ operation: "one",
727
+ data: {
728
+ id: "12345",
729
+ name: "Elon Musk",
730
+ firstName: "Elon",
731
+ lastName: "Musk",
732
+ middleName: "D.",
733
+ initials: "EM",
734
+ birthday: new RFCDate("2000-08-12"),
735
+ coverLetter:
736
+ "I submit this application to express my sincere interest in the API developer position. In the previous role, I was responsible for leadership and ...",
737
+ jobUrl: "https://democompany.recruitee.com/o/example-talent-pool",
738
+ photoUrl: "https://unavatar.io/elon-musk",
739
+ headline: "PepsiCo, Inc, Central Perk",
740
+ title: "CEO",
741
+ emails: [
742
+ {
743
+ id: "123",
744
+ email: "elon@musk.com",
745
+ type: "primary",
746
+ },
747
+ {
748
+ id: "123",
749
+ email: "elon@musk.com",
750
+ type: "primary",
751
+ },
752
+ {
753
+ id: "123",
754
+ email: "elon@musk.com",
755
+ type: "primary",
756
+ },
757
+ ],
758
+ customFields: [
759
+ {
760
+ id: "2389328923893298",
761
+ name: "employee_level",
762
+ description: "Employee Level",
763
+ value: {},
764
+ },
765
+ {
766
+ id: "2389328923893298",
767
+ name: "employee_level",
768
+ description: "Employee Level",
769
+ value: {},
770
+ },
771
+ ],
772
+ phoneNumbers: [
773
+ {
774
+ id: "12345",
775
+ countryCode: "1",
776
+ areaCode: "323",
777
+ number: "111-111-1111",
778
+ extension: "105",
779
+ type: "primary",
780
+ },
781
+ {
782
+ id: "12345",
783
+ countryCode: "1",
784
+ areaCode: "323",
785
+ number: "111-111-1111",
786
+ extension: "105",
787
+ type: "primary",
788
+ },
789
+ {
790
+ id: "12345",
791
+ countryCode: "1",
792
+ areaCode: "323",
793
+ number: "111-111-1111",
794
+ extension: "105",
795
+ type: "primary",
796
+ },
797
+ ],
798
+ addresses: [
799
+ {
800
+ id: "123",
801
+ type: "primary",
802
+ string: "25 Spring Street, Blackburn, VIC 3130",
803
+ name: "HQ US",
804
+ line1: "Main street",
805
+ line2: "apt #",
806
+ line3: "Suite #",
807
+ line4: "delivery instructions",
808
+ streetNumber: "25",
809
+ city: "San Francisco",
810
+ state: "CA",
811
+ postalCode: "94104",
812
+ country: "US",
813
+ latitude: "40.759211",
814
+ longitude: "-73.984638",
815
+ county: "Santa Clara",
816
+ contactName: "Elon Musk",
817
+ salutation: "Mr",
818
+ phoneNumber: "111-111-1111",
819
+ fax: "122-111-1111",
820
+ email: "elon@musk.com",
821
+ website: "https://elonmusk.com",
822
+ notes: "Address notes or delivery instructions.",
823
+ rowVersion: "1-12345",
824
+ },
825
+ {
826
+ id: "123",
827
+ type: "primary",
828
+ string: "25 Spring Street, Blackburn, VIC 3130",
829
+ name: "HQ US",
830
+ line1: "Main street",
831
+ line2: "apt #",
832
+ line3: "Suite #",
833
+ line4: "delivery instructions",
834
+ streetNumber: "25",
835
+ city: "San Francisco",
836
+ state: "CA",
837
+ postalCode: "94104",
838
+ country: "US",
839
+ latitude: "40.759211",
840
+ longitude: "-73.984638",
841
+ county: "Santa Clara",
842
+ contactName: "Elon Musk",
843
+ salutation: "Mr",
844
+ phoneNumber: "111-111-1111",
845
+ fax: "122-111-1111",
846
+ email: "elon@musk.com",
847
+ website: "https://elonmusk.com",
848
+ notes: "Address notes or delivery instructions.",
849
+ rowVersion: "1-12345",
850
+ },
851
+ ],
852
+ websites: [
853
+ {
854
+ id: "12345",
855
+ url: "http://example.com",
856
+ type: "primary",
857
+ },
858
+ {
859
+ id: "12345",
860
+ url: "http://example.com",
861
+ type: "primary",
862
+ },
863
+ ],
864
+ socialLinks: [
865
+ {
866
+ id: "12345",
867
+ url: "https://www.twitter.com/apideck",
868
+ type: "twitter",
869
+ },
870
+ ],
871
+ stageId: "12345",
872
+ recruiterId: "12345",
873
+ coordinatorId: "12345",
874
+ applicationIds: [
875
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
876
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
877
+ ],
878
+ applications: [
879
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
880
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
881
+ ],
882
+ followers: [
883
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
884
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
885
+ ],
886
+ sources: [
887
+ "Job site",
888
+ ],
889
+ sourceId: "12345",
890
+ confidential: false,
891
+ anonymized: true,
892
+ tags: [
893
+ "New",
894
+ ],
895
+ archived: false,
896
+ lastInteractionAt: new Date("2020-09-30T07:43:32.000Z"),
897
+ ownerId: "54321",
898
+ sourcedBy: "12345",
899
+ cvUrl:
900
+ "https://recruitee-main.s3.eu-central-1.amazonaws.com/candidates/36615291/pdf_cv_38swhu4w42k1.pdf?response-content-disposition=inline&response-content-type=application%2Fpdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAQYHB7CA5RLR4Y3ON%2F20220514%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20220514T235654Z&X-Amz-Expires=36000&X-Amz-SignedHeaders=host&X-Amz-Signature=72c0621f5976db75b54de487eb821a8e73480d7f2a6a4a9713ab997944b0561f",
901
+ recordUrl: "https://app.intercom.io/contacts/12345",
902
+ rejectedAt: new Date("2020-09-30T07:43:32.000Z"),
903
+ deleted: true,
904
+ deletedBy: "12345",
905
+ deletedAt: new Date("2020-09-30T07:43:32.000Z"),
906
+ updatedBy: "12345",
907
+ createdBy: "12345",
908
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
909
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
910
+ passThrough: [
911
+ {
912
+ serviceId: "<id>",
913
+ extendPaths: [
914
+ {
915
+ path: "$.nested.property",
916
+ value: {
917
+ "TaxClassificationRef": {
918
+ "value": "EUC-99990201-V1-00020000",
919
+ },
920
+ },
921
+ },
922
+ {
923
+ path: "$.nested.property",
924
+ value: {
925
+ "TaxClassificationRef": {
926
+ "value": "EUC-99990201-V1-00020000",
927
+ },
928
+ },
929
+ },
930
+ {
931
+ path: "$.nested.property",
932
+ value: {
933
+ "TaxClassificationRef": {
934
+ "value": "EUC-99990201-V1-00020000",
935
+ },
936
+ },
937
+ },
938
+ ],
939
+ },
940
+ ],
941
+ },
942
+ });
943
+ });
944
+
945
+ it.skip("Applicants Ats Applicants Update", async () => {
946
+ assert.fail(
947
+ "incomplete test found please make sure to address the following errors: [`workflow step ats.applicantsUpdate.test referencing operation ats.applicantsUpdate with expression in requestBody with type not currently supported`, `workflow step ats.applicantsUpdate.test referencing operation ats.applicantsUpdate with expression in requestBody with type not currently supported`]",
948
+ );
949
+ });
950
+
951
+ test("Applicants Ats Applicants Delete", async () => {
952
+ const testHttpClient = createTestHTTPClient("ats.applicantsDelete");
953
+
954
+ const apideck = new Apideck({
955
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
956
+ httpClient: testHttpClient,
957
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
958
+ });
959
+
960
+ const result = await apideck.ats.applicants.delete({
961
+ id: "<id>",
962
+ serviceId: "salesforce",
963
+ });
964
+ expect(result.httpMeta.response.status).toBe(200);
965
+ expect(result.deleteApplicantResponse).toBeDefined();
966
+ expect(result.deleteApplicantResponse).toEqual({
967
+ statusCode: 200,
968
+ status: "OK",
969
+ service: "lever",
970
+ resource: "Applicants",
971
+ operation: "delete",
972
+ data: {
973
+ id: "12345",
974
+ },
975
+ });
976
+ });