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