@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,837 @@
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 { RFCDate } from "../types/index.js";
8
+ import { createTestHTTPClient } from "./testclient.js";
9
+
10
+ test("Jobs Ats Jobs All", async () => {
11
+ const testHttpClient = createTestHTTPClient("ats.jobsAll");
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.jobs.list({
20
+ serviceId: "salesforce",
21
+ passThrough: {
22
+ "search": "San Francisco",
23
+ },
24
+ fields: "id,updated_at",
25
+ });
26
+ expect(result.httpMeta.response.status).toBe(200);
27
+ expect(result.getJobsResponse).toBeDefined();
28
+ expect(result.getJobsResponse).toEqual({
29
+ statusCode: 200,
30
+ status: "OK",
31
+ service: "lever",
32
+ resource: "Jobs",
33
+ operation: "all",
34
+ data: [
35
+ {
36
+ id: "12345",
37
+ slug: "ceo",
38
+ title: "CEO",
39
+ sequence: 3,
40
+ visibility: "internal",
41
+ status: "completed",
42
+ code: "123-OC",
43
+ language: "EN",
44
+ employmentTerms: "full-time",
45
+ experience: "Director/ Vice President",
46
+ location: "San Francisco",
47
+ remote: true,
48
+ requisitionId: "abc123",
49
+ department: {
50
+ id: "12345",
51
+ parentId: "22345",
52
+ name: "R&D",
53
+ code: "2",
54
+ description: "R&D",
55
+ updatedBy: "12345",
56
+ createdBy: "12345",
57
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
58
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
59
+ passThrough: [
60
+ {
61
+ serviceId: "<id>",
62
+ extendPaths: [
63
+ {
64
+ path: "$.nested.property",
65
+ value: {
66
+ "TaxClassificationRef": {
67
+ "value": "EUC-99990201-V1-00020000",
68
+ },
69
+ },
70
+ },
71
+ {
72
+ path: "$.nested.property",
73
+ value: {
74
+ "TaxClassificationRef": {
75
+ "value": "EUC-99990201-V1-00020000",
76
+ },
77
+ },
78
+ },
79
+ {
80
+ path: "$.nested.property",
81
+ value: {
82
+ "TaxClassificationRef": {
83
+ "value": "EUC-99990201-V1-00020000",
84
+ },
85
+ },
86
+ },
87
+ ],
88
+ },
89
+ {
90
+ serviceId: "<id>",
91
+ extendPaths: [
92
+ {
93
+ path: "$.nested.property",
94
+ value: {
95
+ "TaxClassificationRef": {
96
+ "value": "EUC-99990201-V1-00020000",
97
+ },
98
+ },
99
+ },
100
+ ],
101
+ },
102
+ ],
103
+ },
104
+ branch: {
105
+ id: "123",
106
+ name: "HQ NY",
107
+ },
108
+ recruiters: [
109
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
110
+ ],
111
+ hiringManagers: [
112
+ "123456",
113
+ ],
114
+ followers: [
115
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
116
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
117
+ ],
118
+ description: "A description",
119
+ blocks: [
120
+ {
121
+ title: "string",
122
+ content: "string",
123
+ },
124
+ ],
125
+ closing: "The closing section of the job description",
126
+ closingDate: new RFCDate("2020-10-30"),
127
+ salary: {
128
+ min: 8000,
129
+ max: 10000,
130
+ currency: "USD",
131
+ interval: "year",
132
+ },
133
+ links: [
134
+ {
135
+ type: "job_portal",
136
+ url: "https://app.intercom.io/contacts/12345",
137
+ },
138
+ ],
139
+ confidential: false,
140
+ availableToEmployees: false,
141
+ tags: [
142
+ "New",
143
+ ],
144
+ addresses: [
145
+ {
146
+ id: "123",
147
+ type: "primary",
148
+ string: "25 Spring Street, Blackburn, VIC 3130",
149
+ name: "HQ US",
150
+ line1: "Main street",
151
+ line2: "apt #",
152
+ line3: "Suite #",
153
+ line4: "delivery instructions",
154
+ streetNumber: "25",
155
+ city: "San Francisco",
156
+ state: "CA",
157
+ postalCode: "94104",
158
+ country: "US",
159
+ latitude: "40.759211",
160
+ longitude: "-73.984638",
161
+ county: "Santa Clara",
162
+ contactName: "Elon Musk",
163
+ salutation: "Mr",
164
+ phoneNumber: "111-111-1111",
165
+ fax: "122-111-1111",
166
+ email: "elon@musk.com",
167
+ website: "https://elonmusk.com",
168
+ notes: "Address notes or delivery instructions.",
169
+ rowVersion: "1-12345",
170
+ },
171
+ ],
172
+ customFields: [
173
+ {
174
+ id: "2389328923893298",
175
+ name: "employee_level",
176
+ description: "Employee Level",
177
+ value: {},
178
+ },
179
+ {
180
+ id: "2389328923893298",
181
+ name: "employee_level",
182
+ description: "Employee Level",
183
+ value: "Uses Salesforce and Marketo",
184
+ },
185
+ ],
186
+ deleted: true,
187
+ ownerId: "54321",
188
+ publishedAt: new Date("2020-09-30T07:43:32.000Z"),
189
+ updatedBy: "12345",
190
+ createdBy: "12345",
191
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
192
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
193
+ },
194
+ {
195
+ id: "12345",
196
+ slug: "ceo",
197
+ title: "CEO",
198
+ sequence: 3,
199
+ visibility: "internal",
200
+ status: "completed",
201
+ code: "123-OC",
202
+ language: "EN",
203
+ employmentTerms: "full-time",
204
+ experience: "Director/ Vice President",
205
+ location: "San Francisco",
206
+ remote: true,
207
+ requisitionId: "abc123",
208
+ department: {
209
+ id: "12345",
210
+ parentId: "22345",
211
+ name: "R&D",
212
+ code: "2",
213
+ description: "R&D",
214
+ updatedBy: "12345",
215
+ createdBy: "12345",
216
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
217
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
218
+ passThrough: [
219
+ {
220
+ serviceId: "<id>",
221
+ extendPaths: [
222
+ {
223
+ path: "$.nested.property",
224
+ value: {
225
+ "TaxClassificationRef": {
226
+ "value": "EUC-99990201-V1-00020000",
227
+ },
228
+ },
229
+ },
230
+ ],
231
+ },
232
+ {
233
+ serviceId: "<id>",
234
+ extendPaths: [
235
+ {
236
+ path: "$.nested.property",
237
+ value: {
238
+ "TaxClassificationRef": {
239
+ "value": "EUC-99990201-V1-00020000",
240
+ },
241
+ },
242
+ },
243
+ ],
244
+ },
245
+ {
246
+ serviceId: "<id>",
247
+ extendPaths: [
248
+ {
249
+ path: "$.nested.property",
250
+ value: {
251
+ "TaxClassificationRef": {
252
+ "value": "EUC-99990201-V1-00020000",
253
+ },
254
+ },
255
+ },
256
+ {
257
+ path: "$.nested.property",
258
+ value: {
259
+ "TaxClassificationRef": {
260
+ "value": "EUC-99990201-V1-00020000",
261
+ },
262
+ },
263
+ },
264
+ {
265
+ path: "$.nested.property",
266
+ value: {
267
+ "TaxClassificationRef": {
268
+ "value": "EUC-99990201-V1-00020000",
269
+ },
270
+ },
271
+ },
272
+ ],
273
+ },
274
+ ],
275
+ },
276
+ branch: {
277
+ id: "123",
278
+ name: "HQ NY",
279
+ },
280
+ recruiters: [
281
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
282
+ ],
283
+ hiringManagers: [
284
+ "123456",
285
+ ],
286
+ followers: [
287
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
288
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
289
+ ],
290
+ description: "A description",
291
+ blocks: [
292
+ {
293
+ title: "string",
294
+ content: "string",
295
+ },
296
+ ],
297
+ closing: "The closing section of the job description",
298
+ closingDate: new RFCDate("2020-10-30"),
299
+ salary: {
300
+ min: 8000,
301
+ max: 10000,
302
+ currency: "USD",
303
+ interval: "year",
304
+ },
305
+ links: [
306
+ {
307
+ type: "job_portal",
308
+ url: "https://app.intercom.io/contacts/12345",
309
+ },
310
+ {
311
+ type: "job_portal",
312
+ url: "https://app.intercom.io/contacts/12345",
313
+ },
314
+ ],
315
+ confidential: false,
316
+ availableToEmployees: false,
317
+ tags: [
318
+ "New",
319
+ ],
320
+ addresses: [
321
+ {
322
+ id: "123",
323
+ type: "primary",
324
+ string: "25 Spring Street, Blackburn, VIC 3130",
325
+ name: "HQ US",
326
+ line1: "Main street",
327
+ line2: "apt #",
328
+ line3: "Suite #",
329
+ line4: "delivery instructions",
330
+ streetNumber: "25",
331
+ city: "San Francisco",
332
+ state: "CA",
333
+ postalCode: "94104",
334
+ country: "US",
335
+ latitude: "40.759211",
336
+ longitude: "-73.984638",
337
+ county: "Santa Clara",
338
+ contactName: "Elon Musk",
339
+ salutation: "Mr",
340
+ phoneNumber: "111-111-1111",
341
+ fax: "122-111-1111",
342
+ email: "elon@musk.com",
343
+ website: "https://elonmusk.com",
344
+ notes: "Address notes or delivery instructions.",
345
+ rowVersion: "1-12345",
346
+ },
347
+ {
348
+ id: "123",
349
+ type: "primary",
350
+ string: "25 Spring Street, Blackburn, VIC 3130",
351
+ name: "HQ US",
352
+ line1: "Main street",
353
+ line2: "apt #",
354
+ line3: "Suite #",
355
+ line4: "delivery instructions",
356
+ streetNumber: "25",
357
+ city: "San Francisco",
358
+ state: "CA",
359
+ postalCode: "94104",
360
+ country: "US",
361
+ latitude: "40.759211",
362
+ longitude: "-73.984638",
363
+ county: "Santa Clara",
364
+ contactName: "Elon Musk",
365
+ salutation: "Mr",
366
+ phoneNumber: "111-111-1111",
367
+ fax: "122-111-1111",
368
+ email: "elon@musk.com",
369
+ website: "https://elonmusk.com",
370
+ notes: "Address notes or delivery instructions.",
371
+ rowVersion: "1-12345",
372
+ },
373
+ ],
374
+ customFields: [
375
+ {
376
+ id: "2389328923893298",
377
+ name: "employee_level",
378
+ description: "Employee Level",
379
+ value: "Uses Salesforce and Marketo",
380
+ },
381
+ ],
382
+ deleted: true,
383
+ ownerId: "54321",
384
+ publishedAt: new Date("2020-09-30T07:43:32.000Z"),
385
+ updatedBy: "12345",
386
+ createdBy: "12345",
387
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
388
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
389
+ },
390
+ {
391
+ id: "12345",
392
+ slug: "ceo",
393
+ title: "CEO",
394
+ sequence: 3,
395
+ visibility: "internal",
396
+ status: "completed",
397
+ code: "123-OC",
398
+ language: "EN",
399
+ employmentTerms: "full-time",
400
+ experience: "Director/ Vice President",
401
+ location: "San Francisco",
402
+ remote: true,
403
+ requisitionId: "abc123",
404
+ department: {
405
+ id: "12345",
406
+ parentId: "22345",
407
+ name: "R&D",
408
+ code: "2",
409
+ description: "R&D",
410
+ updatedBy: "12345",
411
+ createdBy: "12345",
412
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
413
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
414
+ passThrough: [
415
+ {
416
+ serviceId: "<id>",
417
+ extendPaths: [
418
+ {
419
+ path: "$.nested.property",
420
+ value: {
421
+ "TaxClassificationRef": {
422
+ "value": "EUC-99990201-V1-00020000",
423
+ },
424
+ },
425
+ },
426
+ {
427
+ path: "$.nested.property",
428
+ value: {
429
+ "TaxClassificationRef": {
430
+ "value": "EUC-99990201-V1-00020000",
431
+ },
432
+ },
433
+ },
434
+ ],
435
+ },
436
+ {
437
+ serviceId: "<id>",
438
+ extendPaths: [
439
+ {
440
+ path: "$.nested.property",
441
+ value: {
442
+ "TaxClassificationRef": {
443
+ "value": "EUC-99990201-V1-00020000",
444
+ },
445
+ },
446
+ },
447
+ ],
448
+ },
449
+ ],
450
+ },
451
+ branch: {
452
+ id: "123",
453
+ name: "HQ NY",
454
+ },
455
+ recruiters: [
456
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
457
+ ],
458
+ hiringManagers: [
459
+ "123456",
460
+ ],
461
+ followers: [
462
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
463
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
464
+ ],
465
+ description: "A description",
466
+ blocks: [
467
+ {
468
+ title: "string",
469
+ content: "string",
470
+ },
471
+ ],
472
+ closing: "The closing section of the job description",
473
+ closingDate: new RFCDate("2020-10-30"),
474
+ salary: {
475
+ min: 8000,
476
+ max: 10000,
477
+ currency: "USD",
478
+ interval: "year",
479
+ },
480
+ links: [
481
+ {
482
+ type: "job_portal",
483
+ url: "https://app.intercom.io/contacts/12345",
484
+ },
485
+ {
486
+ type: "job_portal",
487
+ url: "https://app.intercom.io/contacts/12345",
488
+ },
489
+ {
490
+ type: "job_portal",
491
+ url: "https://app.intercom.io/contacts/12345",
492
+ },
493
+ ],
494
+ confidential: false,
495
+ availableToEmployees: false,
496
+ tags: [
497
+ "New",
498
+ ],
499
+ addresses: [
500
+ {
501
+ id: "123",
502
+ type: "primary",
503
+ string: "25 Spring Street, Blackburn, VIC 3130",
504
+ name: "HQ US",
505
+ line1: "Main street",
506
+ line2: "apt #",
507
+ line3: "Suite #",
508
+ line4: "delivery instructions",
509
+ streetNumber: "25",
510
+ city: "San Francisco",
511
+ state: "CA",
512
+ postalCode: "94104",
513
+ country: "US",
514
+ latitude: "40.759211",
515
+ longitude: "-73.984638",
516
+ county: "Santa Clara",
517
+ contactName: "Elon Musk",
518
+ salutation: "Mr",
519
+ phoneNumber: "111-111-1111",
520
+ fax: "122-111-1111",
521
+ email: "elon@musk.com",
522
+ website: "https://elonmusk.com",
523
+ notes: "Address notes or delivery instructions.",
524
+ rowVersion: "1-12345",
525
+ },
526
+ {
527
+ id: "123",
528
+ type: "primary",
529
+ string: "25 Spring Street, Blackburn, VIC 3130",
530
+ name: "HQ US",
531
+ line1: "Main street",
532
+ line2: "apt #",
533
+ line3: "Suite #",
534
+ line4: "delivery instructions",
535
+ streetNumber: "25",
536
+ city: "San Francisco",
537
+ state: "CA",
538
+ postalCode: "94104",
539
+ country: "US",
540
+ latitude: "40.759211",
541
+ longitude: "-73.984638",
542
+ county: "Santa Clara",
543
+ contactName: "Elon Musk",
544
+ salutation: "Mr",
545
+ phoneNumber: "111-111-1111",
546
+ fax: "122-111-1111",
547
+ email: "elon@musk.com",
548
+ website: "https://elonmusk.com",
549
+ notes: "Address notes or delivery instructions.",
550
+ rowVersion: "1-12345",
551
+ },
552
+ ],
553
+ customFields: [
554
+ {
555
+ id: "2389328923893298",
556
+ name: "employee_level",
557
+ description: "Employee Level",
558
+ value: true,
559
+ },
560
+ {
561
+ id: "2389328923893298",
562
+ name: "employee_level",
563
+ description: "Employee Level",
564
+ value: "Uses Salesforce and Marketo",
565
+ },
566
+ {
567
+ id: "2389328923893298",
568
+ name: "employee_level",
569
+ description: "Employee Level",
570
+ value: 10,
571
+ },
572
+ ],
573
+ deleted: true,
574
+ ownerId: "54321",
575
+ publishedAt: new Date("2020-09-30T07:43:32.000Z"),
576
+ updatedBy: "12345",
577
+ createdBy: "12345",
578
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
579
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
580
+ },
581
+ ],
582
+ meta: {
583
+ itemsOnPage: 50,
584
+ cursors: {
585
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
586
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
587
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
588
+ },
589
+ },
590
+ links: {
591
+ previous:
592
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
593
+ current: "https://unify.apideck.com/crm/companies",
594
+ next:
595
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
596
+ },
597
+ });
598
+ });
599
+
600
+ test("Jobs Ats Jobs One", async () => {
601
+ const testHttpClient = createTestHTTPClient("ats.jobsOne");
602
+
603
+ const apideck = new Apideck({
604
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
605
+ httpClient: testHttpClient,
606
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
607
+ });
608
+
609
+ const result = await apideck.ats.jobs.get({
610
+ id: "<id>",
611
+ serviceId: "salesforce",
612
+ fields: "id,updated_at",
613
+ });
614
+ expect(result.httpMeta.response.status).toBe(200);
615
+ expect(result.getJobResponse).toBeDefined();
616
+ expect(result.getJobResponse).toEqual({
617
+ statusCode: 200,
618
+ status: "OK",
619
+ service: "lever",
620
+ resource: "Jobs",
621
+ operation: "one",
622
+ data: {
623
+ id: "12345",
624
+ slug: "ceo",
625
+ title: "CEO",
626
+ sequence: 3,
627
+ visibility: "internal",
628
+ status: "completed",
629
+ code: "123-OC",
630
+ language: "EN",
631
+ employmentTerms: "full-time",
632
+ experience: "Director/ Vice President",
633
+ location: "San Francisco",
634
+ remote: true,
635
+ requisitionId: "abc123",
636
+ department: {
637
+ id: "12345",
638
+ parentId: "22345",
639
+ name: "R&D",
640
+ code: "2",
641
+ description: "R&D",
642
+ updatedBy: "12345",
643
+ createdBy: "12345",
644
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
645
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
646
+ passThrough: [
647
+ {
648
+ serviceId: "<id>",
649
+ extendPaths: [
650
+ {
651
+ path: "$.nested.property",
652
+ value: {
653
+ "TaxClassificationRef": {
654
+ "value": "EUC-99990201-V1-00020000",
655
+ },
656
+ },
657
+ },
658
+ {
659
+ path: "$.nested.property",
660
+ value: {
661
+ "TaxClassificationRef": {
662
+ "value": "EUC-99990201-V1-00020000",
663
+ },
664
+ },
665
+ },
666
+ ],
667
+ },
668
+ {
669
+ serviceId: "<id>",
670
+ extendPaths: [
671
+ {
672
+ path: "$.nested.property",
673
+ value: {
674
+ "TaxClassificationRef": {
675
+ "value": "EUC-99990201-V1-00020000",
676
+ },
677
+ },
678
+ },
679
+ {
680
+ path: "$.nested.property",
681
+ value: {
682
+ "TaxClassificationRef": {
683
+ "value": "EUC-99990201-V1-00020000",
684
+ },
685
+ },
686
+ },
687
+ ],
688
+ },
689
+ {
690
+ serviceId: "<id>",
691
+ extendPaths: [
692
+ {
693
+ path: "$.nested.property",
694
+ value: {
695
+ "TaxClassificationRef": {
696
+ "value": "EUC-99990201-V1-00020000",
697
+ },
698
+ },
699
+ },
700
+ {
701
+ path: "$.nested.property",
702
+ value: {
703
+ "TaxClassificationRef": {
704
+ "value": "EUC-99990201-V1-00020000",
705
+ },
706
+ },
707
+ },
708
+ ],
709
+ },
710
+ ],
711
+ },
712
+ branch: {
713
+ id: "123",
714
+ name: "HQ NY",
715
+ },
716
+ recruiters: [
717
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
718
+ ],
719
+ hiringManagers: [
720
+ "123456",
721
+ ],
722
+ followers: [
723
+ "a0d636c6-43b3-4bde-8c70-85b707d992f4",
724
+ "a98lfd96-43b3-4bde-8c70-85b707d992e6",
725
+ ],
726
+ description: "A description",
727
+ blocks: [
728
+ {
729
+ title: "string",
730
+ content: "string",
731
+ },
732
+ ],
733
+ closing: "The closing section of the job description",
734
+ closingDate: new RFCDate("2020-10-30"),
735
+ salary: {
736
+ min: 8000,
737
+ max: 10000,
738
+ currency: "USD",
739
+ interval: "year",
740
+ },
741
+ links: [
742
+ {
743
+ type: "job_portal",
744
+ url: "https://app.intercom.io/contacts/12345",
745
+ },
746
+ {
747
+ type: "job_portal",
748
+ url: "https://app.intercom.io/contacts/12345",
749
+ },
750
+ {
751
+ type: "job_portal",
752
+ url: "https://app.intercom.io/contacts/12345",
753
+ },
754
+ ],
755
+ confidential: false,
756
+ availableToEmployees: false,
757
+ tags: [
758
+ "New",
759
+ ],
760
+ addresses: [
761
+ {
762
+ id: "123",
763
+ type: "primary",
764
+ string: "25 Spring Street, Blackburn, VIC 3130",
765
+ name: "HQ US",
766
+ line1: "Main street",
767
+ line2: "apt #",
768
+ line3: "Suite #",
769
+ line4: "delivery instructions",
770
+ streetNumber: "25",
771
+ city: "San Francisco",
772
+ state: "CA",
773
+ postalCode: "94104",
774
+ country: "US",
775
+ latitude: "40.759211",
776
+ longitude: "-73.984638",
777
+ county: "Santa Clara",
778
+ contactName: "Elon Musk",
779
+ salutation: "Mr",
780
+ phoneNumber: "111-111-1111",
781
+ fax: "122-111-1111",
782
+ email: "elon@musk.com",
783
+ website: "https://elonmusk.com",
784
+ notes: "Address notes or delivery instructions.",
785
+ rowVersion: "1-12345",
786
+ },
787
+ {
788
+ id: "123",
789
+ type: "primary",
790
+ string: "25 Spring Street, Blackburn, VIC 3130",
791
+ name: "HQ US",
792
+ line1: "Main street",
793
+ line2: "apt #",
794
+ line3: "Suite #",
795
+ line4: "delivery instructions",
796
+ streetNumber: "25",
797
+ city: "San Francisco",
798
+ state: "CA",
799
+ postalCode: "94104",
800
+ country: "US",
801
+ latitude: "40.759211",
802
+ longitude: "-73.984638",
803
+ county: "Santa Clara",
804
+ contactName: "Elon Musk",
805
+ salutation: "Mr",
806
+ phoneNumber: "111-111-1111",
807
+ fax: "122-111-1111",
808
+ email: "elon@musk.com",
809
+ website: "https://elonmusk.com",
810
+ notes: "Address notes or delivery instructions.",
811
+ rowVersion: "1-12345",
812
+ },
813
+ ],
814
+ customFields: [
815
+ {
816
+ id: "2389328923893298",
817
+ name: "employee_level",
818
+ description: "Employee Level",
819
+ value: 10,
820
+ },
821
+ {
822
+ id: "2389328923893298",
823
+ name: "employee_level",
824
+ description: "Employee Level",
825
+ value: 10,
826
+ },
827
+ ],
828
+ deleted: true,
829
+ ownerId: "54321",
830
+ publishedAt: new Date("2020-09-30T07:43:32.000Z"),
831
+ updatedBy: "12345",
832
+ createdBy: "12345",
833
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
834
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
835
+ },
836
+ });
837
+ });