@apideck/unify 0.27.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/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/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
|
|
|
@@ -143,10 +143,91 @@ test("Customobjects Crm Custom Objects All", async () => {
|
|
|
143
143
|
});
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
test("Customobjects Crm Custom Objects Add", async () => {
|
|
147
|
+
const testHttpClient = createTestHTTPClient("crm.customObjectsAdd");
|
|
148
|
+
|
|
149
|
+
const apideck = new Apideck({
|
|
150
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
151
|
+
httpClient: testHttpClient,
|
|
152
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
const result = await apideck.crm.customObjects.create({
|
|
156
|
+
consumerId: "test-consumer",
|
|
157
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
158
|
+
serviceId: "salesforce",
|
|
159
|
+
objectId: "<id>",
|
|
160
|
+
customObject: {
|
|
161
|
+
name: "project",
|
|
162
|
+
fields: [
|
|
163
|
+
{
|
|
164
|
+
name: "name",
|
|
165
|
+
value: "string",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: "name",
|
|
169
|
+
value: "string",
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "name",
|
|
173
|
+
value: "string",
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
passThrough: [
|
|
177
|
+
{
|
|
178
|
+
serviceId: "<id>",
|
|
179
|
+
extendPaths: [
|
|
180
|
+
{
|
|
181
|
+
path: "$.nested.property",
|
|
182
|
+
value: {
|
|
183
|
+
"TaxClassificationRef": {
|
|
184
|
+
"value": "EUC-99990201-V1-00020000",
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
serviceId: "<id>",
|
|
192
|
+
extendPaths: [
|
|
193
|
+
{
|
|
194
|
+
path: "$.nested.property",
|
|
195
|
+
value: {
|
|
196
|
+
"TaxClassificationRef": {
|
|
197
|
+
"value": "EUC-99990201-V1-00020000",
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
serviceId: "<id>",
|
|
205
|
+
extendPaths: [
|
|
206
|
+
{
|
|
207
|
+
path: "$.nested.property",
|
|
208
|
+
value: {
|
|
209
|
+
"TaxClassificationRef": {
|
|
210
|
+
"value": "EUC-99990201-V1-00020000",
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
expect(result.httpMeta.response.status).toBe(201);
|
|
220
|
+
expect(result.createCustomObjectResponse).toBeDefined();
|
|
221
|
+
expect(result.createCustomObjectResponse).toEqual({
|
|
222
|
+
statusCode: 200,
|
|
223
|
+
status: "OK",
|
|
224
|
+
service: "zoho-crm",
|
|
225
|
+
resource: "custom-objects",
|
|
226
|
+
operation: "add",
|
|
227
|
+
data: {
|
|
228
|
+
id: "12345",
|
|
229
|
+
},
|
|
230
|
+
});
|
|
150
231
|
});
|
|
151
232
|
|
|
152
233
|
test("Customobjects Crm Custom Objects One", async () => {
|
|
@@ -230,10 +311,70 @@ test("Customobjects Crm Custom Objects One", async () => {
|
|
|
230
311
|
});
|
|
231
312
|
});
|
|
232
313
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
314
|
+
test("Customobjects Crm Custom Objects Update", async () => {
|
|
315
|
+
const testHttpClient = createTestHTTPClient("crm.customObjectsUpdate");
|
|
316
|
+
|
|
317
|
+
const apideck = new Apideck({
|
|
318
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
319
|
+
httpClient: testHttpClient,
|
|
320
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
const result = await apideck.crm.customObjects.update({
|
|
324
|
+
id: "<id>",
|
|
325
|
+
objectId: "<id>",
|
|
326
|
+
consumerId: "test-consumer",
|
|
327
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
328
|
+
serviceId: "salesforce",
|
|
329
|
+
customObject: {
|
|
330
|
+
name: "project",
|
|
331
|
+
fields: [
|
|
332
|
+
{
|
|
333
|
+
name: "name",
|
|
334
|
+
value: "string",
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
name: "name",
|
|
338
|
+
value: "string",
|
|
339
|
+
},
|
|
340
|
+
],
|
|
341
|
+
passThrough: [
|
|
342
|
+
{
|
|
343
|
+
serviceId: "<id>",
|
|
344
|
+
extendPaths: [
|
|
345
|
+
{
|
|
346
|
+
path: "$.nested.property",
|
|
347
|
+
value: {
|
|
348
|
+
"TaxClassificationRef": {
|
|
349
|
+
"value": "EUC-99990201-V1-00020000",
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
path: "$.nested.property",
|
|
355
|
+
value: {
|
|
356
|
+
"TaxClassificationRef": {
|
|
357
|
+
"value": "EUC-99990201-V1-00020000",
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
],
|
|
362
|
+
},
|
|
363
|
+
],
|
|
364
|
+
},
|
|
365
|
+
});
|
|
366
|
+
expect(result.httpMeta.response.status).toBe(200);
|
|
367
|
+
expect(result.updateCustomObjectResponse).toBeDefined();
|
|
368
|
+
expect(result.updateCustomObjectResponse).toEqual({
|
|
369
|
+
statusCode: 200,
|
|
370
|
+
status: "OK",
|
|
371
|
+
service: "zoho-crm",
|
|
372
|
+
resource: "custom-objects",
|
|
373
|
+
operation: "update",
|
|
374
|
+
data: {
|
|
375
|
+
id: "12345",
|
|
376
|
+
},
|
|
377
|
+
});
|
|
237
378
|
});
|
|
238
379
|
|
|
239
380
|
test("Customobjects Crm Custom Objects 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
|
|
|
@@ -267,10 +267,148 @@ test("Customobjectschemas Crm Custom Object Schemas All", async () => {
|
|
|
267
267
|
});
|
|
268
268
|
});
|
|
269
269
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
test("Customobjectschemas Crm Custom Object Schemas Add", async () => {
|
|
271
|
+
const testHttpClient = createTestHTTPClient("crm.customObjectSchemasAdd");
|
|
272
|
+
|
|
273
|
+
const apideck = new Apideck({
|
|
274
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
275
|
+
httpClient: testHttpClient,
|
|
276
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
const result = await apideck.crm.customObjectSchemas.create({
|
|
280
|
+
consumerId: "test-consumer",
|
|
281
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
282
|
+
serviceId: "salesforce",
|
|
283
|
+
customObjectSchema: {
|
|
284
|
+
name: "project",
|
|
285
|
+
description: "This schema defines a project custom object",
|
|
286
|
+
fields: [
|
|
287
|
+
{
|
|
288
|
+
id: "field_123",
|
|
289
|
+
name: "project_name",
|
|
290
|
+
description: "Name of the project",
|
|
291
|
+
type: "string",
|
|
292
|
+
required: true,
|
|
293
|
+
options: [
|
|
294
|
+
{
|
|
295
|
+
value: "option1",
|
|
296
|
+
label: "Option 1",
|
|
297
|
+
},
|
|
298
|
+
],
|
|
299
|
+
defaultValue: "New Project",
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
visible: true,
|
|
303
|
+
active: true,
|
|
304
|
+
passThrough: [
|
|
305
|
+
{
|
|
306
|
+
serviceId: "<id>",
|
|
307
|
+
extendPaths: [
|
|
308
|
+
{
|
|
309
|
+
path: "$.nested.property",
|
|
310
|
+
value: {
|
|
311
|
+
"TaxClassificationRef": {
|
|
312
|
+
"value": "EUC-99990201-V1-00020000",
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
],
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
serviceId: "<id>",
|
|
320
|
+
extendPaths: [
|
|
321
|
+
{
|
|
322
|
+
path: "$.nested.property",
|
|
323
|
+
value: {
|
|
324
|
+
"TaxClassificationRef": {
|
|
325
|
+
"value": "EUC-99990201-V1-00020000",
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
],
|
|
330
|
+
},
|
|
331
|
+
],
|
|
332
|
+
},
|
|
333
|
+
});
|
|
334
|
+
expect(result.httpMeta.response.status).toBe(201);
|
|
335
|
+
expect(result.createCustomObjectSchemaResponse).toBeDefined();
|
|
336
|
+
expect(result.createCustomObjectSchemaResponse).toEqual({
|
|
337
|
+
statusCode: 201,
|
|
338
|
+
status: "Created",
|
|
339
|
+
service: "zoho-crm",
|
|
340
|
+
resource: "custom-object-schemas",
|
|
341
|
+
operation: "add",
|
|
342
|
+
data: {
|
|
343
|
+
id: "cos_12345",
|
|
344
|
+
name: "project",
|
|
345
|
+
description: "This schema defines a project custom object",
|
|
346
|
+
fields: [
|
|
347
|
+
{
|
|
348
|
+
id: "field_123",
|
|
349
|
+
name: "project_name",
|
|
350
|
+
description: "Name of the project",
|
|
351
|
+
type: "string",
|
|
352
|
+
required: true,
|
|
353
|
+
options: [
|
|
354
|
+
{
|
|
355
|
+
value: "option1",
|
|
356
|
+
label: "Option 1",
|
|
357
|
+
},
|
|
358
|
+
],
|
|
359
|
+
defaultValue: "New Project",
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
id: "field_123",
|
|
363
|
+
name: "project_name",
|
|
364
|
+
description: "Name of the project",
|
|
365
|
+
type: "string",
|
|
366
|
+
required: true,
|
|
367
|
+
options: [
|
|
368
|
+
{
|
|
369
|
+
value: "option1",
|
|
370
|
+
label: "Option 1",
|
|
371
|
+
},
|
|
372
|
+
],
|
|
373
|
+
defaultValue: "New Project",
|
|
374
|
+
},
|
|
375
|
+
],
|
|
376
|
+
visible: true,
|
|
377
|
+
active: true,
|
|
378
|
+
createdBy: "12345",
|
|
379
|
+
updatedBy: "12345",
|
|
380
|
+
updatedAt: "2020-09-30T07:43:32.000Z",
|
|
381
|
+
createdAt: "2020-09-30T07:43:32.000Z",
|
|
382
|
+
passThrough: [
|
|
383
|
+
{
|
|
384
|
+
serviceId: "<id>",
|
|
385
|
+
extendPaths: [
|
|
386
|
+
{
|
|
387
|
+
path: "$.nested.property",
|
|
388
|
+
value: {
|
|
389
|
+
"TaxClassificationRef": {
|
|
390
|
+
"value": "EUC-99990201-V1-00020000",
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
],
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
serviceId: "<id>",
|
|
398
|
+
extendPaths: [
|
|
399
|
+
{
|
|
400
|
+
path: "$.nested.property",
|
|
401
|
+
value: {
|
|
402
|
+
"TaxClassificationRef": {
|
|
403
|
+
"value": "EUC-99990201-V1-00020000",
|
|
404
|
+
},
|
|
405
|
+
},
|
|
406
|
+
},
|
|
407
|
+
],
|
|
408
|
+
},
|
|
409
|
+
],
|
|
410
|
+
},
|
|
411
|
+
});
|
|
274
412
|
});
|
|
275
413
|
|
|
276
414
|
test("Customobjectschemas Crm Custom Object Schemas One", async () => {
|
|
@@ -386,10 +524,184 @@ test("Customobjectschemas Crm Custom Object Schemas One", async () => {
|
|
|
386
524
|
});
|
|
387
525
|
});
|
|
388
526
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
527
|
+
test("Customobjectschemas Crm Custom Object Schemas Update", async () => {
|
|
528
|
+
const testHttpClient = createTestHTTPClient("crm.customObjectSchemasUpdate");
|
|
529
|
+
|
|
530
|
+
const apideck = new Apideck({
|
|
531
|
+
serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
|
|
532
|
+
httpClient: testHttpClient,
|
|
533
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "value",
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
const result = await apideck.crm.customObjectSchemas.update({
|
|
537
|
+
id: "<id>",
|
|
538
|
+
consumerId: "test-consumer",
|
|
539
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
540
|
+
serviceId: "salesforce",
|
|
541
|
+
customObjectSchema: {
|
|
542
|
+
name: "project",
|
|
543
|
+
description: "This schema defines a project custom object",
|
|
544
|
+
fields: [
|
|
545
|
+
{
|
|
546
|
+
id: "field_123",
|
|
547
|
+
name: "project_name",
|
|
548
|
+
description: "Name of the project",
|
|
549
|
+
type: "string",
|
|
550
|
+
required: true,
|
|
551
|
+
options: [
|
|
552
|
+
{
|
|
553
|
+
value: "option1",
|
|
554
|
+
label: "Option 1",
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
value: "option1",
|
|
558
|
+
label: "Option 1",
|
|
559
|
+
},
|
|
560
|
+
],
|
|
561
|
+
defaultValue: "New Project",
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
id: "field_123",
|
|
565
|
+
name: "project_name",
|
|
566
|
+
description: "Name of the project",
|
|
567
|
+
type: "string",
|
|
568
|
+
required: true,
|
|
569
|
+
options: [
|
|
570
|
+
{
|
|
571
|
+
value: "option1",
|
|
572
|
+
label: "Option 1",
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
value: "option1",
|
|
576
|
+
label: "Option 1",
|
|
577
|
+
},
|
|
578
|
+
],
|
|
579
|
+
defaultValue: "New Project",
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
id: "field_123",
|
|
583
|
+
name: "project_name",
|
|
584
|
+
description: "Name of the project",
|
|
585
|
+
type: "string",
|
|
586
|
+
required: true,
|
|
587
|
+
options: [
|
|
588
|
+
{
|
|
589
|
+
value: "option1",
|
|
590
|
+
label: "Option 1",
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
value: "option1",
|
|
594
|
+
label: "Option 1",
|
|
595
|
+
},
|
|
596
|
+
],
|
|
597
|
+
defaultValue: "New Project",
|
|
598
|
+
},
|
|
599
|
+
],
|
|
600
|
+
visible: true,
|
|
601
|
+
active: true,
|
|
602
|
+
passThrough: [
|
|
603
|
+
{
|
|
604
|
+
serviceId: "<id>",
|
|
605
|
+
extendPaths: [
|
|
606
|
+
{
|
|
607
|
+
path: "$.nested.property",
|
|
608
|
+
value: {
|
|
609
|
+
"TaxClassificationRef": {
|
|
610
|
+
"value": "EUC-99990201-V1-00020000",
|
|
611
|
+
},
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
path: "$.nested.property",
|
|
616
|
+
value: {
|
|
617
|
+
"TaxClassificationRef": {
|
|
618
|
+
"value": "EUC-99990201-V1-00020000",
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
path: "$.nested.property",
|
|
624
|
+
value: {
|
|
625
|
+
"TaxClassificationRef": {
|
|
626
|
+
"value": "EUC-99990201-V1-00020000",
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
},
|
|
630
|
+
],
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
serviceId: "<id>",
|
|
634
|
+
extendPaths: [
|
|
635
|
+
{
|
|
636
|
+
path: "$.nested.property",
|
|
637
|
+
value: {
|
|
638
|
+
"TaxClassificationRef": {
|
|
639
|
+
"value": "EUC-99990201-V1-00020000",
|
|
640
|
+
},
|
|
641
|
+
},
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
path: "$.nested.property",
|
|
645
|
+
value: {
|
|
646
|
+
"TaxClassificationRef": {
|
|
647
|
+
"value": "EUC-99990201-V1-00020000",
|
|
648
|
+
},
|
|
649
|
+
},
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
path: "$.nested.property",
|
|
653
|
+
value: {
|
|
654
|
+
"TaxClassificationRef": {
|
|
655
|
+
"value": "EUC-99990201-V1-00020000",
|
|
656
|
+
},
|
|
657
|
+
},
|
|
658
|
+
},
|
|
659
|
+
],
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
serviceId: "<id>",
|
|
663
|
+
extendPaths: [
|
|
664
|
+
{
|
|
665
|
+
path: "$.nested.property",
|
|
666
|
+
value: {
|
|
667
|
+
"TaxClassificationRef": {
|
|
668
|
+
"value": "EUC-99990201-V1-00020000",
|
|
669
|
+
},
|
|
670
|
+
},
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
path: "$.nested.property",
|
|
674
|
+
value: {
|
|
675
|
+
"TaxClassificationRef": {
|
|
676
|
+
"value": "EUC-99990201-V1-00020000",
|
|
677
|
+
},
|
|
678
|
+
},
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
path: "$.nested.property",
|
|
682
|
+
value: {
|
|
683
|
+
"TaxClassificationRef": {
|
|
684
|
+
"value": "EUC-99990201-V1-00020000",
|
|
685
|
+
},
|
|
686
|
+
},
|
|
687
|
+
},
|
|
688
|
+
],
|
|
689
|
+
},
|
|
690
|
+
],
|
|
691
|
+
},
|
|
692
|
+
});
|
|
693
|
+
expect(result.httpMeta.response.status).toBe(200);
|
|
694
|
+
expect(result.updateCustomObjectSchemaResponse).toBeDefined();
|
|
695
|
+
expect(result.updateCustomObjectSchemaResponse).toEqual({
|
|
696
|
+
statusCode: 200,
|
|
697
|
+
status: "OK",
|
|
698
|
+
service: "zoho-crm",
|
|
699
|
+
resource: "custom-object-schemas",
|
|
700
|
+
operation: "update",
|
|
701
|
+
data: {
|
|
702
|
+
id: "12345",
|
|
703
|
+
},
|
|
704
|
+
});
|
|
393
705
|
});
|
|
394
706
|
|
|
395
707
|
test("Customobjectschemas Crm Custom Object Schemas Delete", async () => {
|