@apideck/unify 0.23.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/models/components/note.d.ts +5 -0
  5. package/models/components/note.d.ts.map +1 -1
  6. package/models/components/note.js +4 -0
  7. package/models/components/note.js.map +1 -1
  8. package/models/components/noteinput.d.ts +5 -0
  9. package/models/components/noteinput.d.ts.map +1 -1
  10. package/models/components/noteinput.js +4 -0
  11. package/models/components/noteinput.js.map +1 -1
  12. package/package.json +5 -1
  13. package/src/__tests__/activities.test.ts +783 -0
  14. package/src/__tests__/agedcreditors.test.ts +279 -0
  15. package/src/__tests__/ageddebtors.test.ts +279 -0
  16. package/src/__tests__/apideckcompanies.test.ts +712 -0
  17. package/src/__tests__/apideckcustomers.test.ts +360 -0
  18. package/src/__tests__/apideckdepartments.test.ts +319 -0
  19. package/src/__tests__/apiresources.test.ts +61 -0
  20. package/src/__tests__/apis.test.ts +214 -0
  21. package/src/__tests__/applicants.test.ts +976 -0
  22. package/src/__tests__/applications.test.ts +329 -0
  23. package/src/__tests__/assertions.ts +13 -0
  24. package/src/__tests__/attachments.test.ts +363 -0
  25. package/src/__tests__/balancesheet.test.ts +451 -0
  26. package/src/__tests__/billpayments.test.ts +666 -0
  27. package/src/__tests__/bills.test.ts +1133 -0
  28. package/src/__tests__/collections.test.ts +115 -0
  29. package/src/__tests__/collectiontags.test.ts +66 -0
  30. package/src/__tests__/collectionticketcomments.test.ts +318 -0
  31. package/src/__tests__/collectiontickets.test.ts +436 -0
  32. package/src/__tests__/collectionusers.test.ts +122 -0
  33. package/src/__tests__/companies.test.ts +1059 -0
  34. package/src/__tests__/companyinfo.test.ts +218 -0
  35. package/src/__tests__/connectioncustommappings.test.ts +67 -0
  36. package/src/__tests__/connections.test.ts +1713 -0
  37. package/src/__tests__/connectionsettings.test.ts +280 -0
  38. package/src/__tests__/connectordocs.test.ts +28 -0
  39. package/src/__tests__/connectors.test.ts +751 -0
  40. package/src/__tests__/consumerrequestcounts.test.ts +41 -0
  41. package/src/__tests__/consumers.test.ts +517 -0
  42. package/src/__tests__/contacts.test.ts +957 -0
  43. package/src/__tests__/createcallback.test.ts +34 -0
  44. package/src/__tests__/creditnotes.test.ts +1362 -0
  45. package/src/__tests__/customers.test.ts +1089 -0
  46. package/src/__tests__/customfields.test.ts +50 -0
  47. package/src/__tests__/custommappings.test.ts +63 -0
  48. package/src/__tests__/departments.test.ts +359 -0
  49. package/src/__tests__/drivegroups.test.ts +318 -0
  50. package/src/__tests__/drives.test.ts +311 -0
  51. package/src/__tests__/employeepayrolls.test.ts +487 -0
  52. package/src/__tests__/employees.test.ts +1682 -0
  53. package/src/__tests__/employeeschedules.test.ts +456 -0
  54. package/src/__tests__/eventlogs.test.ts +157 -0
  55. package/src/__tests__/expenses.test.ts +566 -0
  56. package/src/__tests__/files.test.ts +392 -0
  57. package/src/__tests__/files.ts +56 -0
  58. package/src/__tests__/folders.test.ts +103 -0
  59. package/src/__tests__/invoiceitems.test.ts +586 -0
  60. package/src/__tests__/invoices.test.ts +1561 -0
  61. package/src/__tests__/jobs.test.ts +837 -0
  62. package/src/__tests__/journalentries.test.ts +1053 -0
  63. package/src/__tests__/leads.test.ts +897 -0
  64. package/src/__tests__/ledgeraccounts.test.ts +594 -0
  65. package/src/__tests__/locations.test.ts +561 -0
  66. package/src/__tests__/logs.test.ts +135 -0
  67. package/src/__tests__/messages.test.ts +396 -0
  68. package/src/__tests__/mockserver/README.md +52 -0
  69. package/src/__tests__/notes.test.ts +335 -0
  70. package/src/__tests__/opportunities.test.ts +503 -0
  71. package/src/__tests__/orders.test.ts +849 -0
  72. package/src/__tests__/payments.test.ts +557 -0
  73. package/src/__tests__/payrolls.test.ts +481 -0
  74. package/src/__tests__/pipelines.test.ts +383 -0
  75. package/src/__tests__/products.test.ts +505 -0
  76. package/src/__tests__/profitandloss.test.ts +221 -0
  77. package/src/__tests__/purchaseorders.test.ts +1464 -0
  78. package/src/__tests__/sessions.test.ts +70 -0
  79. package/src/__tests__/sharedlinks.test.ts +331 -0
  80. package/src/__tests__/stores.test.ts +39 -0
  81. package/src/__tests__/subsidiaries.test.ts +316 -0
  82. package/src/__tests__/suppliers.test.ts +1071 -0
  83. package/src/__tests__/taxrates.test.ts +472 -0
  84. package/src/__tests__/testclient.ts +48 -0
  85. package/src/__tests__/timeoffrequests.test.ts +381 -0
  86. package/src/__tests__/trackingcategories.test.ts +329 -0
  87. package/src/__tests__/uploadsessions.test.ts +142 -0
  88. package/src/__tests__/users.test.ts +667 -0
  89. package/src/__tests__/validateconnection.test.ts +32 -0
  90. package/src/__tests__/webhooks.test.ts +248 -0
  91. package/src/lib/config.ts +3 -3
  92. package/src/models/components/note.ts +9 -0
  93. package/src/models/components/noteinput.ts +9 -0
@@ -0,0 +1,61 @@
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("Apiresources Connector Api Resources One", async () => {
10
+ const testHttpClient = createTestHTTPClient("connector.apiResourcesOne");
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.connector.apiResources.get({
19
+ id: "<id>",
20
+ resourceId: "<id>",
21
+ });
22
+ expect(result.httpMeta.response.status).toBe(200);
23
+ expect(result.getApiResourceResponse).toBeDefined();
24
+ expect(result.getApiResourceResponse).toEqual({
25
+ statusCode: 200,
26
+ status: "OK",
27
+ data: {
28
+ id: "companies",
29
+ name: "Companies",
30
+ linkedResources: [
31
+ {
32
+ id: "companies",
33
+ unifiedProperty: "owner_id",
34
+ },
35
+ {
36
+ id: "companies",
37
+ unifiedProperty: "owner_id",
38
+ },
39
+ {
40
+ id: "companies",
41
+ unifiedProperty: "owner_id",
42
+ },
43
+ ],
44
+ },
45
+ meta: {
46
+ itemsOnPage: 50,
47
+ cursors: {
48
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
49
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
50
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
51
+ },
52
+ },
53
+ links: {
54
+ previous:
55
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
56
+ current: "https://unify.apideck.com/crm/companies",
57
+ next:
58
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
59
+ },
60
+ });
61
+ });
@@ -0,0 +1,214 @@
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("Apis Connector Apis All", async () => {
10
+ const testHttpClient = createTestHTTPClient("connector.apisAll");
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.connector.apis.list({
19
+ filter: {
20
+ status: "beta",
21
+ },
22
+ });
23
+ expect(result.httpMeta.response.status).toBe(200);
24
+ expect(result.getApisResponse).toBeDefined();
25
+ expect(result.getApisResponse).toEqual({
26
+ statusCode: 200,
27
+ status: "OK",
28
+ data: [
29
+ {
30
+ id: "file-storage",
31
+ name: "File Storage API",
32
+ description:
33
+ "Manage API keys, access tokens, OAuth flows and integrations.",
34
+ specUrl: "https://specs.apideck.com/file-storage.yml",
35
+ apiReferenceUrl:
36
+ "https://developers.apideck.com/apis/file-storage/reference",
37
+ postmanCollectionId: "1311564-00e7266b-a3d6-4f40-b172-baaa66a3ed6f",
38
+ categories: [
39
+ "files",
40
+ "file-storage",
41
+ "cloud-storage",
42
+ "object-storage",
43
+ ],
44
+ resources: [
45
+ {
46
+ id: "companies",
47
+ name: "Companies",
48
+ excludedFromCoverage: false,
49
+ },
50
+ {
51
+ id: "companies",
52
+ name: "Companies",
53
+ excludedFromCoverage: false,
54
+ },
55
+ ],
56
+ events: [
57
+ "crm.contact.updated",
58
+ "accounting.invoice.created",
59
+ ],
60
+ },
61
+ {
62
+ id: "file-storage",
63
+ name: "File Storage API",
64
+ description:
65
+ "Manage API keys, access tokens, OAuth flows and integrations.",
66
+ specUrl: "https://specs.apideck.com/file-storage.yml",
67
+ apiReferenceUrl:
68
+ "https://developers.apideck.com/apis/file-storage/reference",
69
+ postmanCollectionId: "1311564-00e7266b-a3d6-4f40-b172-baaa66a3ed6f",
70
+ categories: [
71
+ "files",
72
+ "file-storage",
73
+ "cloud-storage",
74
+ "object-storage",
75
+ ],
76
+ resources: [
77
+ {
78
+ id: "companies",
79
+ name: "Companies",
80
+ excludedFromCoverage: false,
81
+ },
82
+ {
83
+ id: "companies",
84
+ name: "Companies",
85
+ excludedFromCoverage: false,
86
+ },
87
+ {
88
+ id: "companies",
89
+ name: "Companies",
90
+ excludedFromCoverage: false,
91
+ },
92
+ ],
93
+ events: [
94
+ "crm.contact.updated",
95
+ "accounting.invoice.created",
96
+ ],
97
+ },
98
+ {
99
+ id: "file-storage",
100
+ name: "File Storage API",
101
+ description:
102
+ "Manage API keys, access tokens, OAuth flows and integrations.",
103
+ specUrl: "https://specs.apideck.com/file-storage.yml",
104
+ apiReferenceUrl:
105
+ "https://developers.apideck.com/apis/file-storage/reference",
106
+ postmanCollectionId: "1311564-00e7266b-a3d6-4f40-b172-baaa66a3ed6f",
107
+ categories: [
108
+ "files",
109
+ "file-storage",
110
+ "cloud-storage",
111
+ "object-storage",
112
+ ],
113
+ resources: [
114
+ {
115
+ id: "companies",
116
+ name: "Companies",
117
+ excludedFromCoverage: false,
118
+ },
119
+ ],
120
+ events: [
121
+ "crm.contact.updated",
122
+ "accounting.invoice.created",
123
+ ],
124
+ },
125
+ ],
126
+ meta: {
127
+ itemsOnPage: 50,
128
+ cursors: {
129
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
130
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
131
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
132
+ },
133
+ },
134
+ links: {
135
+ previous:
136
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
137
+ current: "https://unify.apideck.com/crm/companies",
138
+ next:
139
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
140
+ },
141
+ });
142
+ });
143
+
144
+ test("Apis Connector Apis One", async () => {
145
+ const testHttpClient = createTestHTTPClient("connector.apisOne");
146
+
147
+ const apideck = new Apideck({
148
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
149
+ httpClient: testHttpClient,
150
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
151
+ });
152
+
153
+ const result = await apideck.connector.apis.get({
154
+ id: "<id>",
155
+ });
156
+ expect(result.httpMeta.response.status).toBe(200);
157
+ expect(result.getApiResponse).toBeDefined();
158
+ expect(result.getApiResponse).toEqual({
159
+ statusCode: 200,
160
+ status: "OK",
161
+ data: {
162
+ id: "file-storage",
163
+ name: "File Storage API",
164
+ description:
165
+ "Manage API keys, access tokens, OAuth flows and integrations.",
166
+ specUrl: "https://specs.apideck.com/file-storage.yml",
167
+ apiReferenceUrl:
168
+ "https://developers.apideck.com/apis/file-storage/reference",
169
+ postmanCollectionId: "1311564-00e7266b-a3d6-4f40-b172-baaa66a3ed6f",
170
+ categories: [
171
+ "files",
172
+ "file-storage",
173
+ "cloud-storage",
174
+ "object-storage",
175
+ ],
176
+ resources: [
177
+ {
178
+ id: "companies",
179
+ name: "Companies",
180
+ excludedFromCoverage: false,
181
+ },
182
+ {
183
+ id: "companies",
184
+ name: "Companies",
185
+ excludedFromCoverage: false,
186
+ },
187
+ {
188
+ id: "companies",
189
+ name: "Companies",
190
+ excludedFromCoverage: false,
191
+ },
192
+ ],
193
+ events: [
194
+ "crm.contact.updated",
195
+ "accounting.invoice.created",
196
+ ],
197
+ },
198
+ meta: {
199
+ itemsOnPage: 50,
200
+ cursors: {
201
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
202
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
203
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
204
+ },
205
+ },
206
+ links: {
207
+ previous:
208
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
209
+ current: "https://unify.apideck.com/crm/companies",
210
+ next:
211
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
212
+ },
213
+ });
214
+ });