@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,318 @@
|
|
|
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("Drivegroups File Storage Drive Groups All", async () => {
|
|
10
|
+
const testHttpClient = createTestHTTPClient("fileStorage.driveGroupsAll");
|
|
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.fileStorage.driveGroups.list({
|
|
19
|
+
serviceId: "salesforce",
|
|
20
|
+
filter: {
|
|
21
|
+
parentGroupId: "1234",
|
|
22
|
+
},
|
|
23
|
+
passThrough: {
|
|
24
|
+
"search": "San Francisco",
|
|
25
|
+
},
|
|
26
|
+
fields: "id,updated_at",
|
|
27
|
+
});
|
|
28
|
+
expect(result.httpMeta.response.status).toBe(200);
|
|
29
|
+
expect(result.getDriveGroupsResponse).toBeDefined();
|
|
30
|
+
expect(result.getDriveGroupsResponse).toEqual({
|
|
31
|
+
statusCode: 200,
|
|
32
|
+
status: "OK",
|
|
33
|
+
service: "google-drive",
|
|
34
|
+
resource: "DriveGroups",
|
|
35
|
+
operation: "all",
|
|
36
|
+
data: [
|
|
37
|
+
{
|
|
38
|
+
id: "12345",
|
|
39
|
+
name: "accounting",
|
|
40
|
+
displayName: "accounting",
|
|
41
|
+
description: "A description",
|
|
42
|
+
updatedBy: "12345",
|
|
43
|
+
createdBy: "12345",
|
|
44
|
+
updatedAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
45
|
+
createdAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
46
|
+
passThrough: [
|
|
47
|
+
{
|
|
48
|
+
serviceId: "<id>",
|
|
49
|
+
extendPaths: [
|
|
50
|
+
{
|
|
51
|
+
path: "$.nested.property",
|
|
52
|
+
value: {
|
|
53
|
+
"TaxClassificationRef": {
|
|
54
|
+
"value": "EUC-99990201-V1-00020000",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
path: "$.nested.property",
|
|
60
|
+
value: {
|
|
61
|
+
"TaxClassificationRef": {
|
|
62
|
+
"value": "EUC-99990201-V1-00020000",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
path: "$.nested.property",
|
|
68
|
+
value: {
|
|
69
|
+
"TaxClassificationRef": {
|
|
70
|
+
"value": "EUC-99990201-V1-00020000",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
serviceId: "<id>",
|
|
78
|
+
extendPaths: [
|
|
79
|
+
{
|
|
80
|
+
path: "$.nested.property",
|
|
81
|
+
value: {
|
|
82
|
+
"TaxClassificationRef": {
|
|
83
|
+
"value": "EUC-99990201-V1-00020000",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: "12345",
|
|
93
|
+
name: "accounting",
|
|
94
|
+
displayName: "accounting",
|
|
95
|
+
description: "A description",
|
|
96
|
+
updatedBy: "12345",
|
|
97
|
+
createdBy: "12345",
|
|
98
|
+
updatedAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
99
|
+
createdAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
100
|
+
passThrough: [
|
|
101
|
+
{
|
|
102
|
+
serviceId: "<id>",
|
|
103
|
+
extendPaths: [
|
|
104
|
+
{
|
|
105
|
+
path: "$.nested.property",
|
|
106
|
+
value: {
|
|
107
|
+
"TaxClassificationRef": {
|
|
108
|
+
"value": "EUC-99990201-V1-00020000",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: "12345",
|
|
118
|
+
name: "accounting",
|
|
119
|
+
displayName: "accounting",
|
|
120
|
+
description: "A description",
|
|
121
|
+
updatedBy: "12345",
|
|
122
|
+
createdBy: "12345",
|
|
123
|
+
updatedAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
124
|
+
createdAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
125
|
+
passThrough: [
|
|
126
|
+
{
|
|
127
|
+
serviceId: "<id>",
|
|
128
|
+
extendPaths: [
|
|
129
|
+
{
|
|
130
|
+
path: "$.nested.property",
|
|
131
|
+
value: {
|
|
132
|
+
"TaxClassificationRef": {
|
|
133
|
+
"value": "EUC-99990201-V1-00020000",
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
path: "$.nested.property",
|
|
139
|
+
value: {
|
|
140
|
+
"TaxClassificationRef": {
|
|
141
|
+
"value": "EUC-99990201-V1-00020000",
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
serviceId: "<id>",
|
|
149
|
+
extendPaths: [
|
|
150
|
+
{
|
|
151
|
+
path: "$.nested.property",
|
|
152
|
+
value: {
|
|
153
|
+
"TaxClassificationRef": {
|
|
154
|
+
"value": "EUC-99990201-V1-00020000",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
meta: {
|
|
164
|
+
itemsOnPage: 50,
|
|
165
|
+
cursors: {
|
|
166
|
+
previous: "em9oby1jcm06OnBhZ2U6OjE=",
|
|
167
|
+
current: "em9oby1jcm06OnBhZ2U6OjI=",
|
|
168
|
+
next: "em9oby1jcm06OnBhZ2U6OjM=",
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
links: {
|
|
172
|
+
previous:
|
|
173
|
+
"https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
|
|
174
|
+
current: "https://unify.apideck.com/crm/companies",
|
|
175
|
+
next:
|
|
176
|
+
"https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
it.skip("Drivegroups File Storage Drive Groups Add", async () => {
|
|
182
|
+
assert.fail(
|
|
183
|
+
"incomplete test found please make sure to address the following errors: [`workflow step fileStorage.driveGroupsAdd.test referencing operation fileStorage.driveGroupsAdd with expression in requestBody with type not currently supported`, `workflow step fileStorage.driveGroupsAdd.test referencing operation fileStorage.driveGroupsAdd with expression in requestBody with type not currently supported`, `workflow step fileStorage.driveGroupsAdd.test referencing operation fileStorage.driveGroupsAdd with expression in requestBody with type not currently supported`, `workflow step fileStorage.driveGroupsAdd.test referencing operation fileStorage.driveGroupsAdd with expression in requestBody with type not currently supported`]",
|
|
184
|
+
);
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
test("Drivegroups File Storage Drive Groups One", async () => {
|
|
188
|
+
const testHttpClient = createTestHTTPClient("fileStorage.driveGroupsOne");
|
|
189
|
+
|
|
190
|
+
const apideck = new Apideck({
|
|
191
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
192
|
+
httpClient: testHttpClient,
|
|
193
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
const result = await apideck.fileStorage.driveGroups.get({
|
|
197
|
+
id: "<id>",
|
|
198
|
+
serviceId: "salesforce",
|
|
199
|
+
fields: "id,updated_at",
|
|
200
|
+
});
|
|
201
|
+
expect(result.httpMeta.response.status).toBe(200);
|
|
202
|
+
expect(result.getDriveGroupResponse).toBeDefined();
|
|
203
|
+
expect(result.getDriveGroupResponse).toEqual({
|
|
204
|
+
statusCode: 200,
|
|
205
|
+
status: "OK",
|
|
206
|
+
service: "google-drive",
|
|
207
|
+
resource: "DriveGroups",
|
|
208
|
+
operation: "one",
|
|
209
|
+
data: {
|
|
210
|
+
id: "12345",
|
|
211
|
+
name: "accounting",
|
|
212
|
+
displayName: "accounting",
|
|
213
|
+
description: "A description",
|
|
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
|
+
path: "$.nested.property",
|
|
232
|
+
value: {
|
|
233
|
+
"TaxClassificationRef": {
|
|
234
|
+
"value": "EUC-99990201-V1-00020000",
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
],
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
serviceId: "<id>",
|
|
242
|
+
extendPaths: [
|
|
243
|
+
{
|
|
244
|
+
path: "$.nested.property",
|
|
245
|
+
value: {
|
|
246
|
+
"TaxClassificationRef": {
|
|
247
|
+
"value": "EUC-99990201-V1-00020000",
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
path: "$.nested.property",
|
|
253
|
+
value: {
|
|
254
|
+
"TaxClassificationRef": {
|
|
255
|
+
"value": "EUC-99990201-V1-00020000",
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
serviceId: "<id>",
|
|
263
|
+
extendPaths: [
|
|
264
|
+
{
|
|
265
|
+
path: "$.nested.property",
|
|
266
|
+
value: {
|
|
267
|
+
"TaxClassificationRef": {
|
|
268
|
+
"value": "EUC-99990201-V1-00020000",
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
path: "$.nested.property",
|
|
274
|
+
value: {
|
|
275
|
+
"TaxClassificationRef": {
|
|
276
|
+
"value": "EUC-99990201-V1-00020000",
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
],
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
},
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
it.skip("Drivegroups File Storage Drive Groups Update", async () => {
|
|
288
|
+
assert.fail(
|
|
289
|
+
"incomplete test found please make sure to address the following errors: [`workflow step fileStorage.driveGroupsUpdate.test referencing operation fileStorage.driveGroupsUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.driveGroupsUpdate.test referencing operation fileStorage.driveGroupsUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.driveGroupsUpdate.test referencing operation fileStorage.driveGroupsUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.driveGroupsUpdate.test referencing operation fileStorage.driveGroupsUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.driveGroupsUpdate.test referencing operation fileStorage.driveGroupsUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.driveGroupsUpdate.test referencing operation fileStorage.driveGroupsUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.driveGroupsUpdate.test referencing operation fileStorage.driveGroupsUpdate with expression in requestBody with type not currently supported`]",
|
|
290
|
+
);
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
test("Drivegroups File Storage Drive Groups Delete", async () => {
|
|
294
|
+
const testHttpClient = createTestHTTPClient("fileStorage.driveGroupsDelete");
|
|
295
|
+
|
|
296
|
+
const apideck = new Apideck({
|
|
297
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
298
|
+
httpClient: testHttpClient,
|
|
299
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
const result = await apideck.fileStorage.driveGroups.delete({
|
|
303
|
+
id: "<id>",
|
|
304
|
+
serviceId: "salesforce",
|
|
305
|
+
});
|
|
306
|
+
expect(result.httpMeta.response.status).toBe(200);
|
|
307
|
+
expect(result.deleteDriveGroupResponse).toBeDefined();
|
|
308
|
+
expect(result.deleteDriveGroupResponse).toEqual({
|
|
309
|
+
statusCode: 200,
|
|
310
|
+
status: "OK",
|
|
311
|
+
service: "google-drive",
|
|
312
|
+
resource: "DriveGroups",
|
|
313
|
+
operation: "delete",
|
|
314
|
+
data: {
|
|
315
|
+
id: "12345",
|
|
316
|
+
},
|
|
317
|
+
});
|
|
318
|
+
});
|
|
@@ -0,0 +1,311 @@
|
|
|
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("Drives File Storage Drives All", async () => {
|
|
10
|
+
const testHttpClient = createTestHTTPClient("fileStorage.drivesAll");
|
|
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.fileStorage.drives.list({
|
|
19
|
+
serviceId: "salesforce",
|
|
20
|
+
filter: {
|
|
21
|
+
groupId: "1234",
|
|
22
|
+
},
|
|
23
|
+
fields: "id,updated_at",
|
|
24
|
+
});
|
|
25
|
+
expect(result.httpMeta.response.status).toBe(200);
|
|
26
|
+
expect(result.getDrivesResponse).toBeDefined();
|
|
27
|
+
expect(result.getDrivesResponse).toEqual({
|
|
28
|
+
statusCode: 200,
|
|
29
|
+
status: "OK",
|
|
30
|
+
service: "google-drive",
|
|
31
|
+
resource: "Drives",
|
|
32
|
+
operation: "all",
|
|
33
|
+
data: [
|
|
34
|
+
{
|
|
35
|
+
id: "12345",
|
|
36
|
+
name: "Project Resources",
|
|
37
|
+
description: "A description",
|
|
38
|
+
updatedBy: "12345",
|
|
39
|
+
createdBy: "12345",
|
|
40
|
+
updatedAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
41
|
+
createdAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
42
|
+
passThrough: [
|
|
43
|
+
{
|
|
44
|
+
serviceId: "<id>",
|
|
45
|
+
extendPaths: [
|
|
46
|
+
{
|
|
47
|
+
path: "$.nested.property",
|
|
48
|
+
value: {
|
|
49
|
+
"TaxClassificationRef": {
|
|
50
|
+
"value": "EUC-99990201-V1-00020000",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
path: "$.nested.property",
|
|
56
|
+
value: {
|
|
57
|
+
"TaxClassificationRef": {
|
|
58
|
+
"value": "EUC-99990201-V1-00020000",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
path: "$.nested.property",
|
|
64
|
+
value: {
|
|
65
|
+
"TaxClassificationRef": {
|
|
66
|
+
"value": "EUC-99990201-V1-00020000",
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
serviceId: "<id>",
|
|
74
|
+
extendPaths: [
|
|
75
|
+
{
|
|
76
|
+
path: "$.nested.property",
|
|
77
|
+
value: {
|
|
78
|
+
"TaxClassificationRef": {
|
|
79
|
+
"value": "EUC-99990201-V1-00020000",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "12345",
|
|
89
|
+
name: "Project Resources",
|
|
90
|
+
description: "A description",
|
|
91
|
+
updatedBy: "12345",
|
|
92
|
+
createdBy: "12345",
|
|
93
|
+
updatedAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
94
|
+
createdAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
95
|
+
passThrough: [
|
|
96
|
+
{
|
|
97
|
+
serviceId: "<id>",
|
|
98
|
+
extendPaths: [
|
|
99
|
+
{
|
|
100
|
+
path: "$.nested.property",
|
|
101
|
+
value: {
|
|
102
|
+
"TaxClassificationRef": {
|
|
103
|
+
"value": "EUC-99990201-V1-00020000",
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: "12345",
|
|
113
|
+
name: "Project Resources",
|
|
114
|
+
description: "A description",
|
|
115
|
+
updatedBy: "12345",
|
|
116
|
+
createdBy: "12345",
|
|
117
|
+
updatedAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
118
|
+
createdAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
119
|
+
passThrough: [
|
|
120
|
+
{
|
|
121
|
+
serviceId: "<id>",
|
|
122
|
+
extendPaths: [
|
|
123
|
+
{
|
|
124
|
+
path: "$.nested.property",
|
|
125
|
+
value: {
|
|
126
|
+
"TaxClassificationRef": {
|
|
127
|
+
"value": "EUC-99990201-V1-00020000",
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
path: "$.nested.property",
|
|
133
|
+
value: {
|
|
134
|
+
"TaxClassificationRef": {
|
|
135
|
+
"value": "EUC-99990201-V1-00020000",
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
serviceId: "<id>",
|
|
143
|
+
extendPaths: [
|
|
144
|
+
{
|
|
145
|
+
path: "$.nested.property",
|
|
146
|
+
value: {
|
|
147
|
+
"TaxClassificationRef": {
|
|
148
|
+
"value": "EUC-99990201-V1-00020000",
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
meta: {
|
|
158
|
+
itemsOnPage: 50,
|
|
159
|
+
cursors: {
|
|
160
|
+
previous: "em9oby1jcm06OnBhZ2U6OjE=",
|
|
161
|
+
current: "em9oby1jcm06OnBhZ2U6OjI=",
|
|
162
|
+
next: "em9oby1jcm06OnBhZ2U6OjM=",
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
links: {
|
|
166
|
+
previous:
|
|
167
|
+
"https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
|
|
168
|
+
current: "https://unify.apideck.com/crm/companies",
|
|
169
|
+
next:
|
|
170
|
+
"https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
it.skip("Drives File Storage Drives Add", async () => {
|
|
176
|
+
assert.fail(
|
|
177
|
+
"incomplete test found please make sure to address the following errors: [`workflow step fileStorage.drivesAdd.test referencing operation fileStorage.drivesAdd with expression in requestBody with type not currently supported`, `workflow step fileStorage.drivesAdd.test referencing operation fileStorage.drivesAdd with expression in requestBody with type not currently supported`, `workflow step fileStorage.drivesAdd.test referencing operation fileStorage.drivesAdd with expression in requestBody with type not currently supported`, `workflow step fileStorage.drivesAdd.test referencing operation fileStorage.drivesAdd with expression in requestBody with type not currently supported`]",
|
|
178
|
+
);
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
test("Drives File Storage Drives One", async () => {
|
|
182
|
+
const testHttpClient = createTestHTTPClient("fileStorage.drivesOne");
|
|
183
|
+
|
|
184
|
+
const apideck = new Apideck({
|
|
185
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
186
|
+
httpClient: testHttpClient,
|
|
187
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
const result = await apideck.fileStorage.drives.get({
|
|
191
|
+
id: "<id>",
|
|
192
|
+
serviceId: "salesforce",
|
|
193
|
+
fields: "id,updated_at",
|
|
194
|
+
});
|
|
195
|
+
expect(result.httpMeta.response.status).toBe(200);
|
|
196
|
+
expect(result.getDriveResponse).toBeDefined();
|
|
197
|
+
expect(result.getDriveResponse).toEqual({
|
|
198
|
+
statusCode: 200,
|
|
199
|
+
status: "OK",
|
|
200
|
+
service: "google-drive",
|
|
201
|
+
resource: "Drives",
|
|
202
|
+
operation: "one",
|
|
203
|
+
data: {
|
|
204
|
+
id: "12345",
|
|
205
|
+
name: "Project Resources",
|
|
206
|
+
description: "A description",
|
|
207
|
+
updatedBy: "12345",
|
|
208
|
+
createdBy: "12345",
|
|
209
|
+
updatedAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
210
|
+
createdAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
211
|
+
passThrough: [
|
|
212
|
+
{
|
|
213
|
+
serviceId: "<id>",
|
|
214
|
+
extendPaths: [
|
|
215
|
+
{
|
|
216
|
+
path: "$.nested.property",
|
|
217
|
+
value: {
|
|
218
|
+
"TaxClassificationRef": {
|
|
219
|
+
"value": "EUC-99990201-V1-00020000",
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
path: "$.nested.property",
|
|
225
|
+
value: {
|
|
226
|
+
"TaxClassificationRef": {
|
|
227
|
+
"value": "EUC-99990201-V1-00020000",
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
],
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
serviceId: "<id>",
|
|
235
|
+
extendPaths: [
|
|
236
|
+
{
|
|
237
|
+
path: "$.nested.property",
|
|
238
|
+
value: {
|
|
239
|
+
"TaxClassificationRef": {
|
|
240
|
+
"value": "EUC-99990201-V1-00020000",
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
path: "$.nested.property",
|
|
246
|
+
value: {
|
|
247
|
+
"TaxClassificationRef": {
|
|
248
|
+
"value": "EUC-99990201-V1-00020000",
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
],
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
serviceId: "<id>",
|
|
256
|
+
extendPaths: [
|
|
257
|
+
{
|
|
258
|
+
path: "$.nested.property",
|
|
259
|
+
value: {
|
|
260
|
+
"TaxClassificationRef": {
|
|
261
|
+
"value": "EUC-99990201-V1-00020000",
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
path: "$.nested.property",
|
|
267
|
+
value: {
|
|
268
|
+
"TaxClassificationRef": {
|
|
269
|
+
"value": "EUC-99990201-V1-00020000",
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
},
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
it.skip("Drives File Storage Drives Update", async () => {
|
|
281
|
+
assert.fail(
|
|
282
|
+
"incomplete test found please make sure to address the following errors: [`workflow step fileStorage.drivesUpdate.test referencing operation fileStorage.drivesUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.drivesUpdate.test referencing operation fileStorage.drivesUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.drivesUpdate.test referencing operation fileStorage.drivesUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.drivesUpdate.test referencing operation fileStorage.drivesUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.drivesUpdate.test referencing operation fileStorage.drivesUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.drivesUpdate.test referencing operation fileStorage.drivesUpdate with expression in requestBody with type not currently supported`, `workflow step fileStorage.drivesUpdate.test referencing operation fileStorage.drivesUpdate with expression in requestBody with type not currently supported`]",
|
|
283
|
+
);
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
test("Drives File Storage Drives Delete", async () => {
|
|
287
|
+
const testHttpClient = createTestHTTPClient("fileStorage.drivesDelete");
|
|
288
|
+
|
|
289
|
+
const apideck = new Apideck({
|
|
290
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
291
|
+
httpClient: testHttpClient,
|
|
292
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
const result = await apideck.fileStorage.drives.delete({
|
|
296
|
+
id: "<id>",
|
|
297
|
+
serviceId: "salesforce",
|
|
298
|
+
});
|
|
299
|
+
expect(result.httpMeta.response.status).toBe(200);
|
|
300
|
+
expect(result.deleteDriveResponse).toBeDefined();
|
|
301
|
+
expect(result.deleteDriveResponse).toEqual({
|
|
302
|
+
statusCode: 200,
|
|
303
|
+
status: "OK",
|
|
304
|
+
service: "google-drive",
|
|
305
|
+
resource: "Drives",
|
|
306
|
+
operation: "delete",
|
|
307
|
+
data: {
|
|
308
|
+
id: "12345",
|
|
309
|
+
},
|
|
310
|
+
});
|
|
311
|
+
});
|