@apideck/unify 0.39.6 → 0.40.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/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/config.js.map +1 -1
- package/lib/encodings.d.ts +1 -0
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +7 -0
- package/lib/encodings.js.map +1 -1
- package/package.json +2 -6
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +9 -0
- package/src/__tests__/activities.test.ts +0 -1141
- package/src/__tests__/agedcreditors.test.ts +0 -280
- package/src/__tests__/ageddebtors.test.ts +0 -280
- package/src/__tests__/apideckcompanies.test.ts +0 -1082
- package/src/__tests__/apideckcustomers.test.ts +0 -364
- package/src/__tests__/apideckdepartments.test.ts +0 -497
- package/src/__tests__/apiresources.test.ts +0 -62
- package/src/__tests__/apis.test.ts +0 -216
- package/src/__tests__/applicants.test.ts +0 -1445
- package/src/__tests__/applications.test.ts +0 -515
- package/src/__tests__/assertions.ts +0 -13
- package/src/__tests__/attachments.test.ts +0 -371
- package/src/__tests__/balancesheet.test.ts +0 -453
- package/src/__tests__/bankaccounts.test.ts +0 -324
- package/src/__tests__/bankfeedaccounts.test.ts +0 -343
- package/src/__tests__/bankfeedstatements.test.ts +0 -408
- package/src/__tests__/billpayments.test.ts +0 -1031
- package/src/__tests__/bills.test.ts +0 -1630
- package/src/__tests__/categories.test.ts +0 -127
- package/src/__tests__/collections.test.ts +0 -120
- package/src/__tests__/collectiontags.test.ts +0 -68
- package/src/__tests__/collectionticketcomments.test.ts +0 -501
- package/src/__tests__/collectiontickets.test.ts +0 -627
- package/src/__tests__/collectionusers.test.ts +0 -126
- package/src/__tests__/companies.test.ts +0 -1642
- package/src/__tests__/companyinfo.test.ts +0 -219
- package/src/__tests__/connectionconsent.test.ts +0 -89
- package/src/__tests__/connectionconsents.test.ts +0 -31
- package/src/__tests__/connectioncustommappings.test.ts +0 -69
- package/src/__tests__/connections.test.ts +0 -2127
- package/src/__tests__/connectionsettings.test.ts +0 -687
- package/src/__tests__/connectordocs.test.ts +0 -29
- package/src/__tests__/connectors.test.ts +0 -753
- package/src/__tests__/consumerrequestcounts.test.ts +0 -42
- package/src/__tests__/consumers.test.ts +0 -523
- package/src/__tests__/contacts.test.ts +0 -1421
- package/src/__tests__/createcallback.test.ts +0 -36
- package/src/__tests__/creditnotes.test.ts +0 -2040
- package/src/__tests__/customers.test.ts +0 -1600
- package/src/__tests__/customfields.test.ts +0 -52
- package/src/__tests__/custommappings.test.ts +0 -65
- package/src/__tests__/customobjects.test.ts +0 -408
- package/src/__tests__/customobjectschemas.test.ts +0 -734
- package/src/__tests__/departments.test.ts +0 -529
- package/src/__tests__/drivegroups.test.ts +0 -496
- package/src/__tests__/drives.test.ts +0 -487
- package/src/__tests__/employeepayrolls.test.ts +0 -491
- package/src/__tests__/employees.test.ts +0 -2968
- package/src/__tests__/employeeschedules.test.ts +0 -457
- package/src/__tests__/eventlogs.test.ts +0 -158
- package/src/__tests__/expensecategories.test.ts +0 -324
- package/src/__tests__/expensereports.test.ts +0 -634
- package/src/__tests__/expenses.test.ts +0 -867
- package/src/__tests__/files.test.ts +0 -506
- package/src/__tests__/files.ts +0 -56
- package/src/__tests__/folders.test.ts +0 -390
- package/src/__tests__/invoiceitems.test.ts +0 -855
- package/src/__tests__/invoices.test.ts +0 -2173
- package/src/__tests__/jobs.test.ts +0 -1150
- package/src/__tests__/journalentries.test.ts +0 -1542
- package/src/__tests__/leads.test.ts +0 -1341
- package/src/__tests__/ledgeraccounts.test.ts +0 -829
- package/src/__tests__/locations.test.ts +0 -856
- package/src/__tests__/logs.test.ts +0 -137
- package/src/__tests__/messages.test.ts +0 -588
- package/src/__tests__/notes.test.ts +0 -523
- package/src/__tests__/opportunities.test.ts +0 -718
- package/src/__tests__/orders.test.ts +0 -854
- package/src/__tests__/payments.test.ts +0 -867
- package/src/__tests__/payrolls.test.ts +0 -485
- package/src/__tests__/pipelines.test.ts +0 -574
- package/src/__tests__/products.test.ts +0 -509
- package/src/__tests__/profitandloss.test.ts +0 -223
- package/src/__tests__/projects.test.ts +0 -480
- package/src/__tests__/proxy.test.ts +0 -41
- package/src/__tests__/purchaseorders.test.ts +0 -2139
- package/src/__tests__/quotes.test.ts +0 -678
- package/src/__tests__/refunds.test.ts +0 -812
- package/src/__tests__/sessions.test.ts +0 -72
- package/src/__tests__/sharedlinks.test.ts +0 -511
- package/src/__tests__/stores.test.ts +0 -41
- package/src/__tests__/subsidiaries.test.ts +0 -496
- package/src/__tests__/suppliers.test.ts +0 -1574
- package/src/__tests__/taxrates.test.ts +0 -701
- package/src/__tests__/testclient.ts +0 -48
- package/src/__tests__/timeoffrequests.test.ts +0 -588
- package/src/__tests__/trackingcategories.test.ts +0 -515
- package/src/__tests__/uploadsessions.test.ts +0 -221
- package/src/__tests__/users.test.ts +0 -1020
- package/src/__tests__/validateconnection.test.ts +0 -34
- package/src/__tests__/webhooks.test.ts +0 -254
|
@@ -1,127 +0,0 @@
|
|
|
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("Categories Accounting Categories All", async () => {
|
|
10
|
-
const testHttpClient = createTestHTTPClient("accounting.categoriesAll");
|
|
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.accounting.categories.list({
|
|
19
|
-
consumerId: "test-consumer",
|
|
20
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
21
|
-
serviceId: "salesforce",
|
|
22
|
-
fields: "id,updated_at",
|
|
23
|
-
});
|
|
24
|
-
expect(result.httpMeta.response.status).toBe(200);
|
|
25
|
-
expect(result.getCategoriesResponse).toBeDefined();
|
|
26
|
-
expect(result.getCategoriesResponse).toEqual({
|
|
27
|
-
statusCode: 200,
|
|
28
|
-
status: "OK",
|
|
29
|
-
service: "xero",
|
|
30
|
-
resource: "categories",
|
|
31
|
-
operation: "all",
|
|
32
|
-
data: [
|
|
33
|
-
{
|
|
34
|
-
id: "12345",
|
|
35
|
-
name: "Insurance",
|
|
36
|
-
status: "active",
|
|
37
|
-
rowVersion: "1-12345",
|
|
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
|
-
},
|
|
56
|
-
],
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
meta: {
|
|
60
|
-
itemsOnPage: 50,
|
|
61
|
-
cursors: {
|
|
62
|
-
previous: "em9oby1jcm06OnBhZ2U6OjE=",
|
|
63
|
-
current: "em9oby1jcm06OnBhZ2U6OjI=",
|
|
64
|
-
next: "em9oby1jcm06OnBhZ2U6OjM=",
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
links: {
|
|
68
|
-
previous:
|
|
69
|
-
"https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
|
|
70
|
-
current: "https://unify.apideck.com/crm/companies",
|
|
71
|
-
next:
|
|
72
|
-
"https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
test("Categories Accounting Categories One", async () => {
|
|
78
|
-
const testHttpClient = createTestHTTPClient("accounting.categoriesOne");
|
|
79
|
-
|
|
80
|
-
const apideck = new Apideck({
|
|
81
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
82
|
-
httpClient: testHttpClient,
|
|
83
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
const result = await apideck.accounting.categories.get({
|
|
87
|
-
id: "<id>",
|
|
88
|
-
consumerId: "test-consumer",
|
|
89
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
90
|
-
serviceId: "salesforce",
|
|
91
|
-
fields: "id,updated_at",
|
|
92
|
-
});
|
|
93
|
-
expect(result.httpMeta.response.status).toBe(200);
|
|
94
|
-
expect(result.getCategoryResponse).toBeDefined();
|
|
95
|
-
expect(result.getCategoryResponse).toEqual({
|
|
96
|
-
statusCode: 200,
|
|
97
|
-
status: "OK",
|
|
98
|
-
service: "xero",
|
|
99
|
-
resource: "categories",
|
|
100
|
-
operation: "one",
|
|
101
|
-
data: {
|
|
102
|
-
id: "12345",
|
|
103
|
-
name: "Insurance",
|
|
104
|
-
status: "active",
|
|
105
|
-
rowVersion: "1-12345",
|
|
106
|
-
updatedBy: "12345",
|
|
107
|
-
createdBy: "12345",
|
|
108
|
-
updatedAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
109
|
-
createdAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
110
|
-
passThrough: [
|
|
111
|
-
{
|
|
112
|
-
serviceId: "<id>",
|
|
113
|
-
extendPaths: [
|
|
114
|
-
{
|
|
115
|
-
path: "$.nested.property",
|
|
116
|
-
value: {
|
|
117
|
-
"TaxClassificationRef": {
|
|
118
|
-
"value": "EUC-99990201-V1-00020000",
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
},
|
|
124
|
-
],
|
|
125
|
-
},
|
|
126
|
-
});
|
|
127
|
-
});
|
|
@@ -1,120 +0,0 @@
|
|
|
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("Collections Issue Tracking Collections All", async () => {
|
|
10
|
-
const testHttpClient = createTestHTTPClient("issueTracking.collectionsAll");
|
|
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.issueTracking.collections.list({
|
|
19
|
-
consumerId: "test-consumer",
|
|
20
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
21
|
-
serviceId: "salesforce",
|
|
22
|
-
sort: {
|
|
23
|
-
by: "name",
|
|
24
|
-
direction: "desc",
|
|
25
|
-
},
|
|
26
|
-
passThrough: {
|
|
27
|
-
"search": "San Francisco",
|
|
28
|
-
},
|
|
29
|
-
fields: "id,updated_at",
|
|
30
|
-
});
|
|
31
|
-
expect(result.httpMeta.response.status).toBe(200);
|
|
32
|
-
expect(result.getCollectionsResponse).toBeDefined();
|
|
33
|
-
expect(result.getCollectionsResponse).toEqual({
|
|
34
|
-
statusCode: 200,
|
|
35
|
-
status: "OK",
|
|
36
|
-
service: "jira",
|
|
37
|
-
resource: "Tickets",
|
|
38
|
-
operation: "all",
|
|
39
|
-
data: [
|
|
40
|
-
{
|
|
41
|
-
id: "12345",
|
|
42
|
-
parentId: "12345",
|
|
43
|
-
type: "Technical",
|
|
44
|
-
name: "Main IT Issues",
|
|
45
|
-
description: "IT Issues",
|
|
46
|
-
updatedAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
47
|
-
createdAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: "12345",
|
|
51
|
-
parentId: "12345",
|
|
52
|
-
type: "Technical",
|
|
53
|
-
name: "Main IT Issues",
|
|
54
|
-
description: "IT Issues",
|
|
55
|
-
updatedAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
56
|
-
createdAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
id: "12345",
|
|
60
|
-
parentId: "12345",
|
|
61
|
-
type: "Technical",
|
|
62
|
-
name: "Main IT Issues",
|
|
63
|
-
description: "IT Issues",
|
|
64
|
-
updatedAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
65
|
-
createdAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
meta: {
|
|
69
|
-
itemsOnPage: 50,
|
|
70
|
-
cursors: {
|
|
71
|
-
previous: "em9oby1jcm06OnBhZ2U6OjE=",
|
|
72
|
-
current: "em9oby1jcm06OnBhZ2U6OjI=",
|
|
73
|
-
next: "em9oby1jcm06OnBhZ2U6OjM=",
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
links: {
|
|
77
|
-
previous:
|
|
78
|
-
"https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
|
|
79
|
-
current: "https://unify.apideck.com/crm/companies",
|
|
80
|
-
next:
|
|
81
|
-
"https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
|
|
82
|
-
},
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
test("Collections Issue Tracking Collections One", async () => {
|
|
87
|
-
const testHttpClient = createTestHTTPClient("issueTracking.collectionsOne");
|
|
88
|
-
|
|
89
|
-
const apideck = new Apideck({
|
|
90
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
91
|
-
httpClient: testHttpClient,
|
|
92
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
const result = await apideck.issueTracking.collections.get({
|
|
96
|
-
collectionId: "apideck-io",
|
|
97
|
-
consumerId: "test-consumer",
|
|
98
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
99
|
-
serviceId: "salesforce",
|
|
100
|
-
fields: "id,updated_at",
|
|
101
|
-
});
|
|
102
|
-
expect(result.httpMeta.response.status).toBe(200);
|
|
103
|
-
expect(result.getCollectionResponse).toBeDefined();
|
|
104
|
-
expect(result.getCollectionResponse).toEqual({
|
|
105
|
-
statusCode: 200,
|
|
106
|
-
status: "OK",
|
|
107
|
-
service: "jira",
|
|
108
|
-
resource: "Tickets",
|
|
109
|
-
operation: "one",
|
|
110
|
-
data: {
|
|
111
|
-
id: "12345",
|
|
112
|
-
parentId: "12345",
|
|
113
|
-
type: "Technical",
|
|
114
|
-
name: "Main IT Issues",
|
|
115
|
-
description: "IT Issues",
|
|
116
|
-
updatedAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
117
|
-
createdAt: new Date("2020-09-30T07:43:32.000Z"),
|
|
118
|
-
},
|
|
119
|
-
});
|
|
120
|
-
});
|
|
@@ -1,68 +0,0 @@
|
|
|
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("Collectiontags Issue Tracking Collection Tags All", async () => {
|
|
10
|
-
const testHttpClient = createTestHTTPClient(
|
|
11
|
-
"issueTracking.collectionTagsAll",
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
const apideck = new Apideck({
|
|
15
|
-
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
16
|
-
httpClient: testHttpClient,
|
|
17
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const result = await apideck.issueTracking.collectionTags.list({
|
|
21
|
-
collectionId: "apideck-io",
|
|
22
|
-
consumerId: "test-consumer",
|
|
23
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
24
|
-
serviceId: "salesforce",
|
|
25
|
-
passThrough: {
|
|
26
|
-
"search": "San Francisco",
|
|
27
|
-
},
|
|
28
|
-
fields: "id,updated_at",
|
|
29
|
-
});
|
|
30
|
-
expect(result.httpMeta.response.status).toBe(200);
|
|
31
|
-
expect(result.getCollectionTagsResponse).toBeDefined();
|
|
32
|
-
expect(result.getCollectionTagsResponse).toEqual({
|
|
33
|
-
statusCode: 200,
|
|
34
|
-
status: "OK",
|
|
35
|
-
service: "jira",
|
|
36
|
-
resource: "Tickets",
|
|
37
|
-
operation: "all",
|
|
38
|
-
data: [
|
|
39
|
-
{
|
|
40
|
-
id: "12345",
|
|
41
|
-
name: "User Experience",
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: "12345",
|
|
45
|
-
name: "User Experience",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: "12345",
|
|
49
|
-
name: "User Experience",
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
meta: {
|
|
53
|
-
itemsOnPage: 50,
|
|
54
|
-
cursors: {
|
|
55
|
-
previous: "em9oby1jcm06OnBhZ2U6OjE=",
|
|
56
|
-
current: "em9oby1jcm06OnBhZ2U6OjI=",
|
|
57
|
-
next: "em9oby1jcm06OnBhZ2U6OjM=",
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
links: {
|
|
61
|
-
previous:
|
|
62
|
-
"https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
|
|
63
|
-
current: "https://unify.apideck.com/crm/companies",
|
|
64
|
-
next:
|
|
65
|
-
"https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
});
|