@apideck/unify 0.26.0 → 0.28.0
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/README.md +5 -5
- package/docs/sdks/companies/README.md +4 -4
- package/examples/README.md +26 -0
- package/examples/accountingTaxRatesList.example.ts +41 -0
- package/examples/package-lock.json +613 -0
- package/examples/package.json +18 -0
- package/funcs/crmCompaniesCreate.js +1 -1
- package/funcs/crmCompaniesCreate.js.map +1 -1
- package/funcs/crmCompaniesUpdate.js +1 -1
- package/funcs/crmCompaniesUpdate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/bankaccount.d.ts +5 -0
- package/models/components/bankaccount.d.ts.map +1 -1
- package/models/components/bankaccount.js +2 -0
- package/models/components/bankaccount.js.map +1 -1
- package/models/components/bankaccount1.d.ts +123 -0
- package/models/components/bankaccount1.d.ts.map +1 -0
- package/models/components/bankaccount1.js +128 -0
- package/models/components/bankaccount1.js.map +1 -0
- package/models/components/{company.d.ts → company1.d.ts} +32 -32
- package/models/components/company1.d.ts.map +1 -0
- package/models/components/{company.js → company1.js} +37 -37
- package/models/components/company1.js.map +1 -0
- package/models/components/companyinfo.d.ts +5 -0
- package/models/components/companyinfo.d.ts.map +1 -1
- package/models/components/companyinfo.js +4 -0
- package/models/components/companyinfo.js.map +1 -1
- package/models/components/getcompaniesresponse.d.ts +3 -3
- package/models/components/getcompaniesresponse.d.ts.map +1 -1
- package/models/components/getcompaniesresponse.js +3 -3
- package/models/components/getcompaniesresponse.js.map +1 -1
- package/models/components/getcompanyresponse.d.ts +3 -3
- package/models/components/getcompanyresponse.d.ts.map +1 -1
- package/models/components/getcompanyresponse.js +3 -3
- package/models/components/getcompanyresponse.js.map +1 -1
- package/models/components/index.d.ts +2 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -1
- package/models/components/index.js.map +1 -1
- package/models/components/ledgeraccount.d.ts +9 -9
- package/models/components/ledgeraccount.d.ts.map +1 -1
- package/models/components/ledgeraccount.js +19 -15
- package/models/components/ledgeraccount.js.map +1 -1
- package/models/components/ledgeraccountsfilter.d.ts +61 -0
- package/models/components/ledgeraccountsfilter.d.ts.map +1 -1
- package/models/components/ledgeraccountsfilter.js +33 -1
- package/models/components/ledgeraccountsfilter.js.map +1 -1
- package/models/components/supplier.d.ts +10 -0
- package/models/components/supplier.d.ts.map +1 -1
- package/models/components/supplier.js +4 -0
- package/models/components/supplier.js.map +1 -1
- package/models/errors/apierror.d.ts.map +1 -1
- package/models/errors/apierror.js +8 -2
- package/models/errors/apierror.js.map +1 -1
- package/models/errors/badrequestresponse.js +1 -1
- package/models/errors/badrequestresponse.js.map +1 -1
- package/models/errors/notfoundresponse.js +1 -1
- package/models/errors/notfoundresponse.js.map +1 -1
- package/models/errors/paymentrequiredresponse.js +1 -1
- package/models/errors/paymentrequiredresponse.js.map +1 -1
- package/models/errors/unauthorizedresponse.js +1 -1
- package/models/errors/unauthorizedresponse.js.map +1 -1
- package/models/errors/unprocessableresponse.js +1 -1
- package/models/errors/unprocessableresponse.js.map +1 -1
- package/models/operations/crmcompaniesadd.d.ts +2 -2
- package/models/operations/crmcompaniesadd.d.ts.map +1 -1
- package/models/operations/crmcompaniesadd.js +4 -4
- package/models/operations/crmcompaniesadd.js.map +1 -1
- package/models/operations/crmcompaniesupdate.d.ts +2 -2
- package/models/operations/crmcompaniesupdate.d.ts.map +1 -1
- package/models/operations/crmcompaniesupdate.js +4 -4
- package/models/operations/crmcompaniesupdate.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/activities.test.ts +360 -9
- package/src/__tests__/apideckcompanies.test.ts +373 -9
- package/src/__tests__/apideckdepartments.test.ts +181 -9
- package/src/__tests__/applicants.test.ts +473 -9
- package/src/__tests__/applications.test.ts +189 -9
- package/src/__tests__/billpayments.test.ts +367 -9
- package/src/__tests__/bills.test.ts +500 -9
- package/src/__tests__/collectionticketcomments.test.ts +183 -7
- package/src/__tests__/collectiontickets.test.ts +191 -7
- package/src/__tests__/companies.test.ts +538 -9
- package/src/__tests__/connections.test.ts +409 -5
- package/src/__tests__/connectionsettings.test.ts +410 -5
- package/src/__tests__/contacts.test.ts +466 -9
- package/src/__tests__/creditnotes.test.ts +758 -87
- package/src/__tests__/customers.test.ts +513 -9
- package/src/__tests__/customobjects.test.ts +150 -9
- package/src/__tests__/customobjectschemas.test.ts +321 -9
- package/src/__tests__/departments.test.ts +173 -9
- package/src/__tests__/drivegroups.test.ts +181 -9
- package/src/__tests__/drives.test.ts +179 -9
- package/src/__tests__/employees.test.ts +829 -94
- package/src/__tests__/expenses.test.ts +332 -9
- package/src/__tests__/files.test.ts +106 -5
- package/src/__tests__/folders.test.ts +296 -13
- package/src/__tests__/invoiceitems.test.ts +272 -9
- package/src/__tests__/invoices.test.ts +673 -67
- package/src/__tests__/journalentries.test.ts +490 -8
- package/src/__tests__/leads.test.ts +446 -9
- package/src/__tests__/ledgeraccounts.test.ts +237 -8
- package/src/__tests__/locations.test.ts +298 -9
- package/src/__tests__/messages.test.ts +195 -9
- package/src/__tests__/notes.test.ts +191 -9
- package/src/__tests__/opportunities.test.ts +218 -9
- package/src/__tests__/payments.test.ts +312 -9
- package/src/__tests__/pipelines.test.ts +194 -9
- package/src/__tests__/purchaseorders.test.ts +773 -104
- package/src/__tests__/sharedlinks.test.ts +183 -9
- package/src/__tests__/subsidiaries.test.ts +183 -9
- package/src/__tests__/suppliers.test.ts +505 -9
- package/src/__tests__/taxrates.test.ts +232 -9
- package/src/__tests__/timeoffrequests.test.ts +210 -9
- package/src/__tests__/trackingcategories.test.ts +187 -7
- package/src/__tests__/uploadsessions.test.ts +78 -5
- package/src/__tests__/users.test.ts +356 -9
- package/src/funcs/crmCompaniesCreate.ts +1 -1
- package/src/funcs/crmCompaniesUpdate.ts +1 -1
- package/src/lib/config.ts +4 -4
- package/src/models/components/bankaccount.ts +7 -0
- package/src/models/components/bankaccount1.ts +207 -0
- package/src/models/components/{company.ts → company1.ts} +131 -128
- package/src/models/components/companyinfo.ts +9 -0
- package/src/models/components/getcompaniesresponse.ts +9 -9
- package/src/models/components/getcompanyresponse.ts +9 -9
- package/src/models/components/index.ts +2 -1
- package/src/models/components/ledgeraccount.ts +25 -19
- package/src/models/components/ledgeraccountsfilter.ts +49 -0
- package/src/models/components/supplier.ts +14 -0
- package/src/models/errors/apierror.ts +8 -2
- package/src/models/errors/badrequestresponse.ts +1 -1
- package/src/models/errors/notfoundresponse.ts +1 -1
- package/src/models/errors/paymentrequiredresponse.ts +1 -1
- package/src/models/errors/unauthorizedresponse.ts +1 -1
- package/src/models/errors/unprocessableresponse.ts +1 -1
- package/src/models/operations/crmcompaniesadd.ts +6 -6
- package/src/models/operations/crmcompaniesupdate.ts +6 -6
- package/models/components/company.d.ts.map +0 -1
- package/models/components/company.js.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { expect, test } from "vitest";
|
|
6
6
|
import { Apideck } from "../index.js";
|
|
7
7
|
import { createTestHTTPClient } from "./testclient.js";
|
|
8
8
|
|
|
@@ -227,10 +227,82 @@ test("Departments Accounting Departments All", async () => {
|
|
|
227
227
|
});
|
|
228
228
|
});
|
|
229
229
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
230
|
+
test("Departments Accounting Departments Add", async () => {
|
|
231
|
+
const testHttpClient = createTestHTTPClient("accounting.departmentsAdd");
|
|
232
|
+
|
|
233
|
+
const apideck = new Apideck({
|
|
234
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
235
|
+
httpClient: testHttpClient,
|
|
236
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
const result = await apideck.accounting.departments.create({
|
|
240
|
+
consumerId: "test-consumer",
|
|
241
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
242
|
+
serviceId: "salesforce",
|
|
243
|
+
accountingDepartment: {
|
|
244
|
+
parentId: "12345",
|
|
245
|
+
name: "Sales",
|
|
246
|
+
status: "active",
|
|
247
|
+
subsidiaries: [
|
|
248
|
+
{
|
|
249
|
+
name: "SpaceX",
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: "SpaceX",
|
|
253
|
+
},
|
|
254
|
+
],
|
|
255
|
+
rowVersion: "1-12345",
|
|
256
|
+
passThrough: [
|
|
257
|
+
{
|
|
258
|
+
serviceId: "<id>",
|
|
259
|
+
extendPaths: [
|
|
260
|
+
{
|
|
261
|
+
path: "$.nested.property",
|
|
262
|
+
value: {
|
|
263
|
+
"TaxClassificationRef": {
|
|
264
|
+
"value": "EUC-99990201-V1-00020000",
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
path: "$.nested.property",
|
|
270
|
+
value: {
|
|
271
|
+
"TaxClassificationRef": {
|
|
272
|
+
"value": "EUC-99990201-V1-00020000",
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
serviceId: "<id>",
|
|
280
|
+
extendPaths: [
|
|
281
|
+
{
|
|
282
|
+
path: "$.nested.property",
|
|
283
|
+
value: {
|
|
284
|
+
"TaxClassificationRef": {
|
|
285
|
+
"value": "EUC-99990201-V1-00020000",
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
],
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
},
|
|
293
|
+
});
|
|
294
|
+
expect(result.httpMeta.response.status).toBe(201);
|
|
295
|
+
expect(result.createAccountingDepartmentResponse).toBeDefined();
|
|
296
|
+
expect(result.createAccountingDepartmentResponse).toEqual({
|
|
297
|
+
statusCode: 200,
|
|
298
|
+
status: "OK",
|
|
299
|
+
service: "quickbooks",
|
|
300
|
+
resource: "departments",
|
|
301
|
+
operation: "add",
|
|
302
|
+
data: {
|
|
303
|
+
id: "12345",
|
|
304
|
+
},
|
|
305
|
+
});
|
|
234
306
|
});
|
|
235
307
|
|
|
236
308
|
test("Departments Accounting Departments One", async () => {
|
|
@@ -329,10 +401,102 @@ test("Departments Accounting Departments One", async () => {
|
|
|
329
401
|
});
|
|
330
402
|
});
|
|
331
403
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
404
|
+
test("Departments Accounting Departments Update", async () => {
|
|
405
|
+
const testHttpClient = createTestHTTPClient("accounting.departmentsUpdate");
|
|
406
|
+
|
|
407
|
+
const apideck = new Apideck({
|
|
408
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
409
|
+
httpClient: testHttpClient,
|
|
410
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
const result = await apideck.accounting.departments.update({
|
|
414
|
+
id: "<id>",
|
|
415
|
+
consumerId: "test-consumer",
|
|
416
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
417
|
+
serviceId: "salesforce",
|
|
418
|
+
accountingDepartment: {
|
|
419
|
+
parentId: "12345",
|
|
420
|
+
name: "Sales",
|
|
421
|
+
status: "active",
|
|
422
|
+
subsidiaries: [
|
|
423
|
+
{
|
|
424
|
+
name: "SpaceX",
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
name: "SpaceX",
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
name: "SpaceX",
|
|
431
|
+
},
|
|
432
|
+
],
|
|
433
|
+
rowVersion: "1-12345",
|
|
434
|
+
passThrough: [
|
|
435
|
+
{
|
|
436
|
+
serviceId: "<id>",
|
|
437
|
+
extendPaths: [
|
|
438
|
+
{
|
|
439
|
+
path: "$.nested.property",
|
|
440
|
+
value: {
|
|
441
|
+
"TaxClassificationRef": {
|
|
442
|
+
"value": "EUC-99990201-V1-00020000",
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
path: "$.nested.property",
|
|
448
|
+
value: {
|
|
449
|
+
"TaxClassificationRef": {
|
|
450
|
+
"value": "EUC-99990201-V1-00020000",
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
],
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
serviceId: "<id>",
|
|
458
|
+
extendPaths: [
|
|
459
|
+
{
|
|
460
|
+
path: "$.nested.property",
|
|
461
|
+
value: {
|
|
462
|
+
"TaxClassificationRef": {
|
|
463
|
+
"value": "EUC-99990201-V1-00020000",
|
|
464
|
+
},
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
path: "$.nested.property",
|
|
469
|
+
value: {
|
|
470
|
+
"TaxClassificationRef": {
|
|
471
|
+
"value": "EUC-99990201-V1-00020000",
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
path: "$.nested.property",
|
|
477
|
+
value: {
|
|
478
|
+
"TaxClassificationRef": {
|
|
479
|
+
"value": "EUC-99990201-V1-00020000",
|
|
480
|
+
},
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
],
|
|
484
|
+
},
|
|
485
|
+
],
|
|
486
|
+
},
|
|
487
|
+
});
|
|
488
|
+
expect(result.httpMeta.response.status).toBe(200);
|
|
489
|
+
expect(result.updateAccountingDepartmentResponse).toBeDefined();
|
|
490
|
+
expect(result.updateAccountingDepartmentResponse).toEqual({
|
|
491
|
+
statusCode: 200,
|
|
492
|
+
status: "OK",
|
|
493
|
+
service: "quickbooks",
|
|
494
|
+
resource: "departments",
|
|
495
|
+
operation: "update",
|
|
496
|
+
data: {
|
|
497
|
+
id: "12345",
|
|
498
|
+
},
|
|
499
|
+
});
|
|
336
500
|
});
|
|
337
501
|
|
|
338
502
|
test("Departments Accounting Departments Delete", async () => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { expect, test } from "vitest";
|
|
6
6
|
import { Apideck } from "../index.js";
|
|
7
7
|
import { createTestHTTPClient } from "./testclient.js";
|
|
8
8
|
|
|
@@ -180,10 +180,81 @@ test("Drivegroups File Storage Drive Groups All", async () => {
|
|
|
180
180
|
});
|
|
181
181
|
});
|
|
182
182
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
test("Drivegroups File Storage Drive Groups Add", async () => {
|
|
184
|
+
const testHttpClient = createTestHTTPClient("fileStorage.driveGroupsAdd");
|
|
185
|
+
|
|
186
|
+
const apideck = new Apideck({
|
|
187
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
188
|
+
httpClient: testHttpClient,
|
|
189
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
const result = await apideck.fileStorage.driveGroups.create({
|
|
193
|
+
consumerId: "test-consumer",
|
|
194
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
195
|
+
serviceId: "salesforce",
|
|
196
|
+
driveGroup: {
|
|
197
|
+
name: "accounting",
|
|
198
|
+
displayName: "accounting",
|
|
199
|
+
description: "A description",
|
|
200
|
+
passThrough: [
|
|
201
|
+
{
|
|
202
|
+
serviceId: "<id>",
|
|
203
|
+
extendPaths: [
|
|
204
|
+
{
|
|
205
|
+
path: "$.nested.property",
|
|
206
|
+
value: {
|
|
207
|
+
"TaxClassificationRef": {
|
|
208
|
+
"value": "EUC-99990201-V1-00020000",
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
path: "$.nested.property",
|
|
214
|
+
value: {
|
|
215
|
+
"TaxClassificationRef": {
|
|
216
|
+
"value": "EUC-99990201-V1-00020000",
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
serviceId: "<id>",
|
|
224
|
+
extendPaths: [
|
|
225
|
+
{
|
|
226
|
+
path: "$.nested.property",
|
|
227
|
+
value: {
|
|
228
|
+
"TaxClassificationRef": {
|
|
229
|
+
"value": "EUC-99990201-V1-00020000",
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
path: "$.nested.property",
|
|
235
|
+
value: {
|
|
236
|
+
"TaxClassificationRef": {
|
|
237
|
+
"value": "EUC-99990201-V1-00020000",
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
],
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
},
|
|
245
|
+
});
|
|
246
|
+
expect(result.httpMeta.response.status).toBe(201);
|
|
247
|
+
expect(result.createDriveGroupResponse).toBeDefined();
|
|
248
|
+
expect(result.createDriveGroupResponse).toEqual({
|
|
249
|
+
statusCode: 200,
|
|
250
|
+
status: "OK",
|
|
251
|
+
service: "google-drive",
|
|
252
|
+
resource: "DriveGroups",
|
|
253
|
+
operation: "add",
|
|
254
|
+
data: {
|
|
255
|
+
id: "12345",
|
|
256
|
+
},
|
|
257
|
+
});
|
|
187
258
|
});
|
|
188
259
|
|
|
189
260
|
test("Drivegroups File Storage Drive Groups One", async () => {
|
|
@@ -288,10 +359,111 @@ test("Drivegroups File Storage Drive Groups One", async () => {
|
|
|
288
359
|
});
|
|
289
360
|
});
|
|
290
361
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
362
|
+
test("Drivegroups File Storage Drive Groups Update", async () => {
|
|
363
|
+
const testHttpClient = createTestHTTPClient("fileStorage.driveGroupsUpdate");
|
|
364
|
+
|
|
365
|
+
const apideck = new Apideck({
|
|
366
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
367
|
+
httpClient: testHttpClient,
|
|
368
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
const result = await apideck.fileStorage.driveGroups.update({
|
|
372
|
+
id: "<id>",
|
|
373
|
+
consumerId: "test-consumer",
|
|
374
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
375
|
+
serviceId: "salesforce",
|
|
376
|
+
driveGroup: {
|
|
377
|
+
name: "accounting",
|
|
378
|
+
displayName: "accounting",
|
|
379
|
+
description: "A description",
|
|
380
|
+
passThrough: [
|
|
381
|
+
{
|
|
382
|
+
serviceId: "<id>",
|
|
383
|
+
extendPaths: [
|
|
384
|
+
{
|
|
385
|
+
path: "$.nested.property",
|
|
386
|
+
value: {
|
|
387
|
+
"TaxClassificationRef": {
|
|
388
|
+
"value": "EUC-99990201-V1-00020000",
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
path: "$.nested.property",
|
|
394
|
+
value: {
|
|
395
|
+
"TaxClassificationRef": {
|
|
396
|
+
"value": "EUC-99990201-V1-00020000",
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
],
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
serviceId: "<id>",
|
|
404
|
+
extendPaths: [
|
|
405
|
+
{
|
|
406
|
+
path: "$.nested.property",
|
|
407
|
+
value: {
|
|
408
|
+
"TaxClassificationRef": {
|
|
409
|
+
"value": "EUC-99990201-V1-00020000",
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
path: "$.nested.property",
|
|
415
|
+
value: {
|
|
416
|
+
"TaxClassificationRef": {
|
|
417
|
+
"value": "EUC-99990201-V1-00020000",
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
],
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
serviceId: "<id>",
|
|
425
|
+
extendPaths: [
|
|
426
|
+
{
|
|
427
|
+
path: "$.nested.property",
|
|
428
|
+
value: {
|
|
429
|
+
"TaxClassificationRef": {
|
|
430
|
+
"value": "EUC-99990201-V1-00020000",
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
path: "$.nested.property",
|
|
436
|
+
value: {
|
|
437
|
+
"TaxClassificationRef": {
|
|
438
|
+
"value": "EUC-99990201-V1-00020000",
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
path: "$.nested.property",
|
|
444
|
+
value: {
|
|
445
|
+
"TaxClassificationRef": {
|
|
446
|
+
"value": "EUC-99990201-V1-00020000",
|
|
447
|
+
},
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
],
|
|
451
|
+
},
|
|
452
|
+
],
|
|
453
|
+
},
|
|
454
|
+
});
|
|
455
|
+
expect(result.httpMeta.response.status).toBe(200);
|
|
456
|
+
expect(result.updateDriveGroupResponse).toBeDefined();
|
|
457
|
+
expect(result.updateDriveGroupResponse).toEqual({
|
|
458
|
+
statusCode: 200,
|
|
459
|
+
status: "OK",
|
|
460
|
+
service: "google-drive",
|
|
461
|
+
resource: "DriveGroups",
|
|
462
|
+
operation: "update",
|
|
463
|
+
data: {
|
|
464
|
+
id: "12345",
|
|
465
|
+
},
|
|
466
|
+
});
|
|
295
467
|
});
|
|
296
468
|
|
|
297
469
|
test("Drivegroups File Storage Drive Groups Delete", async () => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { expect, test } from "vitest";
|
|
6
6
|
import { Apideck } from "../index.js";
|
|
7
7
|
import { createTestHTTPClient } from "./testclient.js";
|
|
8
8
|
|
|
@@ -174,10 +174,80 @@ test("Drives File Storage Drives All", async () => {
|
|
|
174
174
|
});
|
|
175
175
|
});
|
|
176
176
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
test("Drives File Storage Drives Add", async () => {
|
|
178
|
+
const testHttpClient = createTestHTTPClient("fileStorage.drivesAdd");
|
|
179
|
+
|
|
180
|
+
const apideck = new Apideck({
|
|
181
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
182
|
+
httpClient: testHttpClient,
|
|
183
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
const result = await apideck.fileStorage.drives.create({
|
|
187
|
+
consumerId: "test-consumer",
|
|
188
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
189
|
+
serviceId: "salesforce",
|
|
190
|
+
drive: {
|
|
191
|
+
name: "Project Resources",
|
|
192
|
+
description: "A description",
|
|
193
|
+
passThrough: [
|
|
194
|
+
{
|
|
195
|
+
serviceId: "<id>",
|
|
196
|
+
extendPaths: [
|
|
197
|
+
{
|
|
198
|
+
path: "$.nested.property",
|
|
199
|
+
value: {
|
|
200
|
+
"TaxClassificationRef": {
|
|
201
|
+
"value": "EUC-99990201-V1-00020000",
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
path: "$.nested.property",
|
|
207
|
+
value: {
|
|
208
|
+
"TaxClassificationRef": {
|
|
209
|
+
"value": "EUC-99990201-V1-00020000",
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
],
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
serviceId: "<id>",
|
|
217
|
+
extendPaths: [
|
|
218
|
+
{
|
|
219
|
+
path: "$.nested.property",
|
|
220
|
+
value: {
|
|
221
|
+
"TaxClassificationRef": {
|
|
222
|
+
"value": "EUC-99990201-V1-00020000",
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
path: "$.nested.property",
|
|
228
|
+
value: {
|
|
229
|
+
"TaxClassificationRef": {
|
|
230
|
+
"value": "EUC-99990201-V1-00020000",
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
expect(result.httpMeta.response.status).toBe(201);
|
|
240
|
+
expect(result.createDriveResponse).toBeDefined();
|
|
241
|
+
expect(result.createDriveResponse).toEqual({
|
|
242
|
+
statusCode: 200,
|
|
243
|
+
status: "OK",
|
|
244
|
+
service: "google-drive",
|
|
245
|
+
resource: "Drives",
|
|
246
|
+
operation: "add",
|
|
247
|
+
data: {
|
|
248
|
+
id: "12345",
|
|
249
|
+
},
|
|
250
|
+
});
|
|
181
251
|
});
|
|
182
252
|
|
|
183
253
|
test("Drives File Storage Drives One", async () => {
|
|
@@ -281,10 +351,110 @@ test("Drives File Storage Drives One", async () => {
|
|
|
281
351
|
});
|
|
282
352
|
});
|
|
283
353
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
354
|
+
test("Drives File Storage Drives Update", async () => {
|
|
355
|
+
const testHttpClient = createTestHTTPClient("fileStorage.drivesUpdate");
|
|
356
|
+
|
|
357
|
+
const apideck = new Apideck({
|
|
358
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
359
|
+
httpClient: testHttpClient,
|
|
360
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
const result = await apideck.fileStorage.drives.update({
|
|
364
|
+
id: "<id>",
|
|
365
|
+
consumerId: "test-consumer",
|
|
366
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
367
|
+
serviceId: "salesforce",
|
|
368
|
+
drive: {
|
|
369
|
+
name: "Project Resources",
|
|
370
|
+
description: "A description",
|
|
371
|
+
passThrough: [
|
|
372
|
+
{
|
|
373
|
+
serviceId: "<id>",
|
|
374
|
+
extendPaths: [
|
|
375
|
+
{
|
|
376
|
+
path: "$.nested.property",
|
|
377
|
+
value: {
|
|
378
|
+
"TaxClassificationRef": {
|
|
379
|
+
"value": "EUC-99990201-V1-00020000",
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
path: "$.nested.property",
|
|
385
|
+
value: {
|
|
386
|
+
"TaxClassificationRef": {
|
|
387
|
+
"value": "EUC-99990201-V1-00020000",
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
],
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
serviceId: "<id>",
|
|
395
|
+
extendPaths: [
|
|
396
|
+
{
|
|
397
|
+
path: "$.nested.property",
|
|
398
|
+
value: {
|
|
399
|
+
"TaxClassificationRef": {
|
|
400
|
+
"value": "EUC-99990201-V1-00020000",
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
path: "$.nested.property",
|
|
406
|
+
value: {
|
|
407
|
+
"TaxClassificationRef": {
|
|
408
|
+
"value": "EUC-99990201-V1-00020000",
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
],
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
serviceId: "<id>",
|
|
416
|
+
extendPaths: [
|
|
417
|
+
{
|
|
418
|
+
path: "$.nested.property",
|
|
419
|
+
value: {
|
|
420
|
+
"TaxClassificationRef": {
|
|
421
|
+
"value": "EUC-99990201-V1-00020000",
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
path: "$.nested.property",
|
|
427
|
+
value: {
|
|
428
|
+
"TaxClassificationRef": {
|
|
429
|
+
"value": "EUC-99990201-V1-00020000",
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
path: "$.nested.property",
|
|
435
|
+
value: {
|
|
436
|
+
"TaxClassificationRef": {
|
|
437
|
+
"value": "EUC-99990201-V1-00020000",
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
],
|
|
442
|
+
},
|
|
443
|
+
],
|
|
444
|
+
},
|
|
445
|
+
});
|
|
446
|
+
expect(result.httpMeta.response.status).toBe(200);
|
|
447
|
+
expect(result.updateDriveResponse).toBeDefined();
|
|
448
|
+
expect(result.updateDriveResponse).toEqual({
|
|
449
|
+
statusCode: 200,
|
|
450
|
+
status: "OK",
|
|
451
|
+
service: "google-drive",
|
|
452
|
+
resource: "Drives",
|
|
453
|
+
operation: "update",
|
|
454
|
+
data: {
|
|
455
|
+
id: "12345",
|
|
456
|
+
},
|
|
457
|
+
});
|
|
288
458
|
});
|
|
289
459
|
|
|
290
460
|
test("Drives File Storage Drives Delete", async () => {
|