@apideck/unify 0.13.1 → 0.13.3
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 +0 -13
- package/docs/sdks/ageddebtors/README.md +2 -0
- package/docs/sdks/pipelines/README.md +0 -542
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/ageddebtors.d.ts +3 -3
- package/models/components/ageddebtors.d.ts.map +1 -1
- package/models/components/ageddebtors.js +5 -3
- package/models/components/ageddebtors.js.map +1 -1
- package/models/components/agedreportfilter.d.ts +5 -0
- package/models/components/agedreportfilter.d.ts.map +1 -1
- package/models/components/agedreportfilter.js +4 -0
- package/models/components/agedreportfilter.js.map +1 -1
- package/models/components/balancebyperiod.d.ts +6 -6
- package/models/components/balancebyperiod.d.ts.map +1 -1
- package/models/components/balancebyperiod.js +6 -4
- package/models/components/balancebyperiod.js.map +1 -1
- package/models/components/balancebytransaction.d.ts +8 -3
- package/models/components/balancebytransaction.d.ts.map +1 -1
- package/models/components/balancebytransaction.js +5 -1
- package/models/components/balancebytransaction.js.map +1 -1
- package/models/components/bill.d.ts +5 -0
- package/models/components/bill.d.ts.map +1 -1
- package/models/components/bill.js +9 -0
- package/models/components/bill.js.map +1 -1
- package/models/components/index.d.ts +1 -8
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -8
- package/models/components/index.js.map +1 -1
- package/models/components/ledgeraccount.d.ts +5 -0
- package/models/components/ledgeraccount.d.ts.map +1 -1
- package/models/components/ledgeraccount.js +9 -0
- package/models/components/ledgeraccount.js.map +1 -1
- package/models/components/outstandingbalancebycurrency.d.ts +5 -0
- package/models/components/outstandingbalancebycurrency.d.ts.map +1 -1
- package/models/components/outstandingbalancebycurrency.js +4 -0
- package/models/components/outstandingbalancebycurrency.js.map +1 -1
- package/models/components/outstandingbalancebycustomer.d.ts +40 -0
- package/models/components/outstandingbalancebycustomer.d.ts.map +1 -0
- package/models/components/{outstandingbalance.js → outstandingbalancebycustomer.js} +17 -17
- package/models/components/outstandingbalancebycustomer.js.map +1 -0
- package/models/components/supplier.d.ts +5 -0
- package/models/components/supplier.d.ts.map +1 -1
- package/models/components/supplier.js +9 -0
- package/models/components/supplier.js.map +1 -1
- package/models/operations/index.d.ts +0 -5
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -5
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/accounting.d.ts +0 -3
- package/sdk/accounting.d.ts.map +1 -1
- package/sdk/accounting.js +0 -4
- package/sdk/accounting.js.map +1 -1
- package/sdk/pipelines.d.ts +0 -28
- package/sdk/pipelines.d.ts.map +1 -1
- package/sdk/pipelines.js +0 -41
- package/sdk/pipelines.js.map +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/ageddebtors.ts +13 -9
- package/src/models/components/agedreportfilter.ts +9 -0
- package/src/models/components/balancebyperiod.ts +12 -10
- package/src/models/components/balancebytransaction.ts +10 -1
- package/src/models/components/bill.ts +18 -0
- package/src/models/components/index.ts +1 -8
- package/src/models/components/ledgeraccount.ts +18 -0
- package/src/models/components/outstandingbalancebycurrency.ts +9 -0
- package/src/models/components/{outstandingbalance.ts → outstandingbalancebycustomer.ts} +25 -23
- package/src/models/components/supplier.ts +18 -0
- package/src/models/operations/index.ts +0 -5
- package/src/sdk/accounting.ts +0 -6
- package/src/sdk/pipelines.ts +0 -73
- package/docs/sdks/agedcreditors/README.md +0 -113
- package/funcs/accountingAgedCreditorsGet.d.ts +0 -16
- package/funcs/accountingAgedCreditorsGet.d.ts.map +0 -1
- package/funcs/accountingAgedCreditorsGet.js +0 -122
- package/funcs/accountingAgedCreditorsGet.js.map +0 -1
- package/funcs/crmPipelinesCreate.d.ts +0 -16
- package/funcs/crmPipelinesCreate.d.ts.map +0 -1
- package/funcs/crmPipelinesCreate.js +0 -121
- package/funcs/crmPipelinesCreate.js.map +0 -1
- package/funcs/crmPipelinesDelete.d.ts +0 -16
- package/funcs/crmPipelinesDelete.d.ts.map +0 -1
- package/funcs/crmPipelinesDelete.js +0 -126
- package/funcs/crmPipelinesDelete.js.map +0 -1
- package/funcs/crmPipelinesGet.d.ts +0 -16
- package/funcs/crmPipelinesGet.d.ts.map +0 -1
- package/funcs/crmPipelinesGet.js +0 -127
- package/funcs/crmPipelinesGet.js.map +0 -1
- package/funcs/crmPipelinesUpdate.d.ts +0 -16
- package/funcs/crmPipelinesUpdate.d.ts.map +0 -1
- package/funcs/crmPipelinesUpdate.js +0 -127
- package/funcs/crmPipelinesUpdate.js.map +0 -1
- package/models/components/agedcreditors.d.ts +0 -51
- package/models/components/agedcreditors.d.ts.map +0 -1
- package/models/components/agedcreditors.js +0 -86
- package/models/components/agedcreditors.js.map +0 -1
- package/models/components/createpipelineresponse.d.ts +0 -58
- package/models/components/createpipelineresponse.d.ts.map +0 -1
- package/models/components/createpipelineresponse.js +0 -79
- package/models/components/createpipelineresponse.js.map +0 -1
- package/models/components/deletepipelineresponse.d.ts +0 -58
- package/models/components/deletepipelineresponse.d.ts.map +0 -1
- package/models/components/deletepipelineresponse.js +0 -79
- package/models/components/deletepipelineresponse.js.map +0 -1
- package/models/components/getagedcreditorsresponse.d.ts +0 -58
- package/models/components/getagedcreditorsresponse.d.ts.map +0 -1
- package/models/components/getagedcreditorsresponse.js +0 -79
- package/models/components/getagedcreditorsresponse.js.map +0 -1
- package/models/components/getpipelineresponse.d.ts +0 -58
- package/models/components/getpipelineresponse.d.ts.map +0 -1
- package/models/components/getpipelineresponse.js +0 -79
- package/models/components/getpipelineresponse.js.map +0 -1
- package/models/components/outstandingbalance.d.ts +0 -40
- package/models/components/outstandingbalance.d.ts.map +0 -1
- package/models/components/outstandingbalance.js.map +0 -1
- package/models/components/pipelineinput.d.ts +0 -117
- package/models/components/pipelineinput.d.ts.map +0 -1
- package/models/components/pipelineinput.js +0 -133
- package/models/components/pipelineinput.js.map +0 -1
- package/models/components/updatepipelineresponse.d.ts +0 -58
- package/models/components/updatepipelineresponse.d.ts.map +0 -1
- package/models/components/updatepipelineresponse.js +0 -79
- package/models/components/updatepipelineresponse.js.map +0 -1
- package/models/operations/accountingagedcreditorsone.d.ts +0 -125
- package/models/operations/accountingagedcreditorsone.d.ts.map +0 -1
- package/models/operations/accountingagedcreditorsone.js +0 -153
- package/models/operations/accountingagedcreditorsone.js.map +0 -1
- package/models/operations/crmpipelinesadd.d.ts +0 -108
- package/models/operations/crmpipelinesadd.d.ts.map +0 -1
- package/models/operations/crmpipelinesadd.js +0 -149
- package/models/operations/crmpipelinesadd.js.map +0 -1
- package/models/operations/crmpipelinesdelete.d.ts +0 -111
- package/models/operations/crmpipelinesdelete.d.ts.map +0 -1
- package/models/operations/crmpipelinesdelete.js +0 -141
- package/models/operations/crmpipelinesdelete.js.map +0 -1
- package/models/operations/crmpipelinesone.d.ts +0 -116
- package/models/operations/crmpipelinesone.d.ts.map +0 -1
- package/models/operations/crmpipelinesone.js +0 -141
- package/models/operations/crmpipelinesone.js.map +0 -1
- package/models/operations/crmpipelinesupdate.d.ts +0 -113
- package/models/operations/crmpipelinesupdate.d.ts.map +0 -1
- package/models/operations/crmpipelinesupdate.js +0 -151
- package/models/operations/crmpipelinesupdate.js.map +0 -1
- package/sdk/agedcreditors.d.ts +0 -12
- package/sdk/agedcreditors.d.ts.map +0 -1
- package/sdk/agedcreditors.js +0 -22
- package/sdk/agedcreditors.js.map +0 -1
- package/src/funcs/accountingAgedCreditorsGet.ts +0 -193
- package/src/funcs/crmPipelinesCreate.ts +0 -179
- package/src/funcs/crmPipelinesDelete.ts +0 -185
- package/src/funcs/crmPipelinesGet.ts +0 -186
- package/src/funcs/crmPipelinesUpdate.ts +0 -186
- package/src/models/components/agedcreditors.ts +0 -116
- package/src/models/components/createpipelineresponse.ts +0 -119
- package/src/models/components/deletepipelineresponse.ts +0 -119
- package/src/models/components/getagedcreditorsresponse.ts +0 -119
- package/src/models/components/getpipelineresponse.ts +0 -119
- package/src/models/components/pipelineinput.ts +0 -233
- package/src/models/components/updatepipelineresponse.ts +0 -119
- package/src/models/operations/accountingagedcreditorsone.ts +0 -277
- package/src/models/operations/crmpipelinesadd.ts +0 -250
- package/src/models/operations/crmpipelinesdelete.ts +0 -245
- package/src/models/operations/crmpipelinesone.ts +0 -248
- package/src/models/operations/crmpipelinesupdate.ts +0 -257
- package/src/sdk/agedcreditors.ts +0 -27
|
@@ -25,6 +25,12 @@ import {
|
|
|
25
25
|
Currency$inboundSchema,
|
|
26
26
|
Currency$outboundSchema,
|
|
27
27
|
} from "./currency.js";
|
|
28
|
+
import {
|
|
29
|
+
CustomField,
|
|
30
|
+
CustomField$inboundSchema,
|
|
31
|
+
CustomField$Outbound,
|
|
32
|
+
CustomField$outboundSchema,
|
|
33
|
+
} from "./customfield.js";
|
|
28
34
|
import {
|
|
29
35
|
CustomMappings,
|
|
30
36
|
CustomMappings$inboundSchema,
|
|
@@ -173,6 +179,7 @@ export type Supplier = {
|
|
|
173
179
|
* When custom mappings are configured on the resource, the result is included here.
|
|
174
180
|
*/
|
|
175
181
|
customMappings?: CustomMappings | null | undefined;
|
|
182
|
+
customFields?: Array<CustomField> | undefined;
|
|
176
183
|
/**
|
|
177
184
|
* The user who last updated the object.
|
|
178
185
|
*/
|
|
@@ -269,6 +276,7 @@ export type SupplierInput = {
|
|
|
269
276
|
* The channel through which the transaction is processed.
|
|
270
277
|
*/
|
|
271
278
|
channel?: string | null | undefined;
|
|
279
|
+
customFields?: Array<CustomField> | undefined;
|
|
272
280
|
/**
|
|
273
281
|
* A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.
|
|
274
282
|
*/
|
|
@@ -336,6 +344,7 @@ export const Supplier$inboundSchema: z.ZodType<
|
|
|
336
344
|
payment_method: z.nullable(z.string()).optional(),
|
|
337
345
|
channel: z.nullable(z.string()).optional(),
|
|
338
346
|
custom_mappings: z.nullable(CustomMappings$inboundSchema).optional(),
|
|
347
|
+
custom_fields: z.array(CustomField$inboundSchema).optional(),
|
|
339
348
|
updated_by: z.nullable(z.string()).optional(),
|
|
340
349
|
created_by: z.nullable(z.string()).optional(),
|
|
341
350
|
updated_at: z.nullable(
|
|
@@ -363,6 +372,7 @@ export const Supplier$inboundSchema: z.ZodType<
|
|
|
363
372
|
"tax_number": "taxNumber",
|
|
364
373
|
"payment_method": "paymentMethod",
|
|
365
374
|
"custom_mappings": "customMappings",
|
|
375
|
+
"custom_fields": "customFields",
|
|
366
376
|
"updated_by": "updatedBy",
|
|
367
377
|
"created_by": "createdBy",
|
|
368
378
|
"updated_at": "updatedAt",
|
|
@@ -401,6 +411,7 @@ export type Supplier$Outbound = {
|
|
|
401
411
|
payment_method?: string | null | undefined;
|
|
402
412
|
channel?: string | null | undefined;
|
|
403
413
|
custom_mappings?: CustomMappings$Outbound | null | undefined;
|
|
414
|
+
custom_fields?: Array<CustomField$Outbound> | undefined;
|
|
404
415
|
updated_by?: string | null | undefined;
|
|
405
416
|
created_by?: string | null | undefined;
|
|
406
417
|
updated_at?: string | null | undefined;
|
|
@@ -442,6 +453,7 @@ export const Supplier$outboundSchema: z.ZodType<
|
|
|
442
453
|
paymentMethod: z.nullable(z.string()).optional(),
|
|
443
454
|
channel: z.nullable(z.string()).optional(),
|
|
444
455
|
customMappings: z.nullable(CustomMappings$outboundSchema).optional(),
|
|
456
|
+
customFields: z.array(CustomField$outboundSchema).optional(),
|
|
445
457
|
updatedBy: z.nullable(z.string()).optional(),
|
|
446
458
|
createdBy: z.nullable(z.string()).optional(),
|
|
447
459
|
updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
@@ -465,6 +477,7 @@ export const Supplier$outboundSchema: z.ZodType<
|
|
|
465
477
|
taxNumber: "tax_number",
|
|
466
478
|
paymentMethod: "payment_method",
|
|
467
479
|
customMappings: "custom_mappings",
|
|
480
|
+
customFields: "custom_fields",
|
|
468
481
|
updatedBy: "updated_by",
|
|
469
482
|
createdBy: "created_by",
|
|
470
483
|
updatedAt: "updated_at",
|
|
@@ -531,6 +544,7 @@ export const SupplierInput$inboundSchema: z.ZodType<
|
|
|
531
544
|
status: z.nullable(SupplierStatus$inboundSchema).optional(),
|
|
532
545
|
payment_method: z.nullable(z.string()).optional(),
|
|
533
546
|
channel: z.nullable(z.string()).optional(),
|
|
547
|
+
custom_fields: z.array(CustomField$inboundSchema).optional(),
|
|
534
548
|
row_version: z.nullable(z.string()).optional(),
|
|
535
549
|
pass_through: z.array(PassThroughBody$inboundSchema).optional(),
|
|
536
550
|
subsidiary_id: z.string().optional(),
|
|
@@ -548,6 +562,7 @@ export const SupplierInput$inboundSchema: z.ZodType<
|
|
|
548
562
|
"tax_rate": "taxRate",
|
|
549
563
|
"tax_number": "taxNumber",
|
|
550
564
|
"payment_method": "paymentMethod",
|
|
565
|
+
"custom_fields": "customFields",
|
|
551
566
|
"row_version": "rowVersion",
|
|
552
567
|
"pass_through": "passThrough",
|
|
553
568
|
"subsidiary_id": "subsidiaryId",
|
|
@@ -579,6 +594,7 @@ export type SupplierInput$Outbound = {
|
|
|
579
594
|
status?: string | null | undefined;
|
|
580
595
|
payment_method?: string | null | undefined;
|
|
581
596
|
channel?: string | null | undefined;
|
|
597
|
+
custom_fields?: Array<CustomField$Outbound> | undefined;
|
|
582
598
|
row_version?: string | null | undefined;
|
|
583
599
|
pass_through?: Array<PassThroughBody$Outbound> | undefined;
|
|
584
600
|
subsidiary_id?: string | undefined;
|
|
@@ -613,6 +629,7 @@ export const SupplierInput$outboundSchema: z.ZodType<
|
|
|
613
629
|
status: z.nullable(SupplierStatus$outboundSchema).optional(),
|
|
614
630
|
paymentMethod: z.nullable(z.string()).optional(),
|
|
615
631
|
channel: z.nullable(z.string()).optional(),
|
|
632
|
+
customFields: z.array(CustomField$outboundSchema).optional(),
|
|
616
633
|
rowVersion: z.nullable(z.string()).optional(),
|
|
617
634
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
618
635
|
subsidiaryId: z.string().optional(),
|
|
@@ -630,6 +647,7 @@ export const SupplierInput$outboundSchema: z.ZodType<
|
|
|
630
647
|
taxRate: "tax_rate",
|
|
631
648
|
taxNumber: "tax_number",
|
|
632
649
|
paymentMethod: "payment_method",
|
|
650
|
+
customFields: "custom_fields",
|
|
633
651
|
rowVersion: "row_version",
|
|
634
652
|
passThrough: "pass_through",
|
|
635
653
|
subsidiaryId: "subsidiary_id",
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
export * from "./accountingagedcreditorsone.js";
|
|
6
5
|
export * from "./accountingageddebtorsone.js";
|
|
7
6
|
export * from "./accountingattachmentsall.js";
|
|
8
7
|
export * from "./accountingattachmentsdelete.js";
|
|
@@ -146,11 +145,7 @@ export * from "./crmopportunitiesall.js";
|
|
|
146
145
|
export * from "./crmopportunitiesdelete.js";
|
|
147
146
|
export * from "./crmopportunitiesone.js";
|
|
148
147
|
export * from "./crmopportunitiesupdate.js";
|
|
149
|
-
export * from "./crmpipelinesadd.js";
|
|
150
148
|
export * from "./crmpipelinesall.js";
|
|
151
|
-
export * from "./crmpipelinesdelete.js";
|
|
152
|
-
export * from "./crmpipelinesone.js";
|
|
153
|
-
export * from "./crmpipelinesupdate.js";
|
|
154
149
|
export * from "./crmusersadd.js";
|
|
155
150
|
export * from "./crmusersall.js";
|
|
156
151
|
export * from "./crmusersdelete.js";
|
package/src/sdk/accounting.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { ClientSDK } from "../lib/sdks.js";
|
|
6
|
-
import { AgedCreditors } from "./agedcreditors.js";
|
|
7
6
|
import { AgedDebtors } from "./ageddebtors.js";
|
|
8
7
|
import { Attachments } from "./attachments.js";
|
|
9
8
|
import { BalanceSheet } from "./balancesheet.js";
|
|
@@ -133,11 +132,6 @@ export class Accounting extends ClientSDK {
|
|
|
133
132
|
return (this._expenses ??= new Expenses(this._options));
|
|
134
133
|
}
|
|
135
134
|
|
|
136
|
-
private _agedCreditors?: AgedCreditors;
|
|
137
|
-
get agedCreditors(): AgedCreditors {
|
|
138
|
-
return (this._agedCreditors ??= new AgedCreditors(this._options));
|
|
139
|
-
}
|
|
140
|
-
|
|
141
135
|
private _agedDebtors?: AgedDebtors;
|
|
142
136
|
get agedDebtors(): AgedDebtors {
|
|
143
137
|
return (this._agedDebtors ??= new AgedDebtors(this._options));
|
package/src/sdk/pipelines.ts
CHANGED
|
@@ -2,14 +2,9 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { crmPipelinesCreate } from "../funcs/crmPipelinesCreate.js";
|
|
6
|
-
import { crmPipelinesDelete } from "../funcs/crmPipelinesDelete.js";
|
|
7
|
-
import { crmPipelinesGet } from "../funcs/crmPipelinesGet.js";
|
|
8
5
|
import { crmPipelinesList } from "../funcs/crmPipelinesList.js";
|
|
9
|
-
import { crmPipelinesUpdate } from "../funcs/crmPipelinesUpdate.js";
|
|
10
6
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
7
|
import * as operations from "../models/operations/index.js";
|
|
12
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
13
8
|
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
14
9
|
|
|
15
10
|
export class Pipelines extends ClientSDK {
|
|
@@ -31,72 +26,4 @@ export class Pipelines extends ClientSDK {
|
|
|
31
26
|
options,
|
|
32
27
|
));
|
|
33
28
|
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Create pipeline
|
|
37
|
-
*
|
|
38
|
-
* @remarks
|
|
39
|
-
* Create pipeline
|
|
40
|
-
*/
|
|
41
|
-
async create(
|
|
42
|
-
request: operations.CrmPipelinesAddRequest,
|
|
43
|
-
options?: RequestOptions,
|
|
44
|
-
): Promise<operations.CrmPipelinesAddResponse> {
|
|
45
|
-
return unwrapAsync(crmPipelinesCreate(
|
|
46
|
-
this,
|
|
47
|
-
request,
|
|
48
|
-
options,
|
|
49
|
-
));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Get pipeline
|
|
54
|
-
*
|
|
55
|
-
* @remarks
|
|
56
|
-
* Get pipeline
|
|
57
|
-
*/
|
|
58
|
-
async get(
|
|
59
|
-
request: operations.CrmPipelinesOneRequest,
|
|
60
|
-
options?: RequestOptions,
|
|
61
|
-
): Promise<operations.CrmPipelinesOneResponse> {
|
|
62
|
-
return unwrapAsync(crmPipelinesGet(
|
|
63
|
-
this,
|
|
64
|
-
request,
|
|
65
|
-
options,
|
|
66
|
-
));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Update pipeline
|
|
71
|
-
*
|
|
72
|
-
* @remarks
|
|
73
|
-
* Update pipeline
|
|
74
|
-
*/
|
|
75
|
-
async update(
|
|
76
|
-
request: operations.CrmPipelinesUpdateRequest,
|
|
77
|
-
options?: RequestOptions,
|
|
78
|
-
): Promise<operations.CrmPipelinesUpdateResponse> {
|
|
79
|
-
return unwrapAsync(crmPipelinesUpdate(
|
|
80
|
-
this,
|
|
81
|
-
request,
|
|
82
|
-
options,
|
|
83
|
-
));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Delete pipeline
|
|
88
|
-
*
|
|
89
|
-
* @remarks
|
|
90
|
-
* Delete pipeline
|
|
91
|
-
*/
|
|
92
|
-
async delete(
|
|
93
|
-
request: operations.CrmPipelinesDeleteRequest,
|
|
94
|
-
options?: RequestOptions,
|
|
95
|
-
): Promise<operations.CrmPipelinesDeleteResponse> {
|
|
96
|
-
return unwrapAsync(crmPipelinesDelete(
|
|
97
|
-
this,
|
|
98
|
-
request,
|
|
99
|
-
options,
|
|
100
|
-
));
|
|
101
|
-
}
|
|
102
29
|
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
# AgedCreditors
|
|
2
|
-
(*accounting.agedCreditors*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [get](#get) - Get Aged Creditors
|
|
9
|
-
|
|
10
|
-
## get
|
|
11
|
-
|
|
12
|
-
Get Aged Creditors
|
|
13
|
-
|
|
14
|
-
### Example Usage
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
import { Apideck } from "@apideck/unify";
|
|
18
|
-
|
|
19
|
-
const apideck = new Apideck({
|
|
20
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
21
|
-
consumerId: "test-consumer",
|
|
22
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
async function run() {
|
|
26
|
-
const result = await apideck.accounting.agedCreditors.get({
|
|
27
|
-
serviceId: "salesforce",
|
|
28
|
-
filter: {
|
|
29
|
-
customerId: "123abc",
|
|
30
|
-
reportAsOfDate: "2024-01-01",
|
|
31
|
-
periodCount: 3,
|
|
32
|
-
periodLength: 30,
|
|
33
|
-
},
|
|
34
|
-
passThrough: {
|
|
35
|
-
"search": "San Francisco",
|
|
36
|
-
},
|
|
37
|
-
fields: "id,updated_at",
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// Handle the result
|
|
41
|
-
console.log(result);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
run();
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Standalone function
|
|
48
|
-
|
|
49
|
-
The standalone function version of this method:
|
|
50
|
-
|
|
51
|
-
```typescript
|
|
52
|
-
import { ApideckCore } from "@apideck/unify/core.js";
|
|
53
|
-
import { accountingAgedCreditorsGet } from "@apideck/unify/funcs/accountingAgedCreditorsGet.js";
|
|
54
|
-
|
|
55
|
-
// Use `ApideckCore` for best tree-shaking performance.
|
|
56
|
-
// You can create one instance of it to use across an application.
|
|
57
|
-
const apideck = new ApideckCore({
|
|
58
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
59
|
-
consumerId: "test-consumer",
|
|
60
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
async function run() {
|
|
64
|
-
const res = await accountingAgedCreditorsGet(apideck, {
|
|
65
|
-
serviceId: "salesforce",
|
|
66
|
-
filter: {
|
|
67
|
-
customerId: "123abc",
|
|
68
|
-
reportAsOfDate: "2024-01-01",
|
|
69
|
-
periodCount: 3,
|
|
70
|
-
periodLength: 30,
|
|
71
|
-
},
|
|
72
|
-
passThrough: {
|
|
73
|
-
"search": "San Francisco",
|
|
74
|
-
},
|
|
75
|
-
fields: "id,updated_at",
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
if (!res.ok) {
|
|
79
|
-
throw res.error;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const { value: result } = res;
|
|
83
|
-
|
|
84
|
-
// Handle the result
|
|
85
|
-
console.log(result);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
run();
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Parameters
|
|
92
|
-
|
|
93
|
-
| Parameter | Type | Required | Description |
|
|
94
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
95
|
-
| `request` | [operations.AccountingAgedCreditorsOneRequest](../../models/operations/accountingagedcreditorsonerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
96
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
97
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
98
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
99
|
-
|
|
100
|
-
### Response
|
|
101
|
-
|
|
102
|
-
**Promise\<[operations.AccountingAgedCreditorsOneResponse](../../models/operations/accountingagedcreditorsoneresponse.md)\>**
|
|
103
|
-
|
|
104
|
-
### Errors
|
|
105
|
-
|
|
106
|
-
| Error Type | Status Code | Content Type |
|
|
107
|
-
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
108
|
-
| errors.BadRequestResponse | 400 | application/json |
|
|
109
|
-
| errors.UnauthorizedResponse | 401 | application/json |
|
|
110
|
-
| errors.PaymentRequiredResponse | 402 | application/json |
|
|
111
|
-
| errors.NotFoundResponse | 404 | application/json |
|
|
112
|
-
| errors.UnprocessableResponse | 422 | application/json |
|
|
113
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ApideckCore } from "../core.js";
|
|
2
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
-
import { APIError } from "../models/errors/apierror.js";
|
|
4
|
-
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
-
import * as errors from "../models/errors/index.js";
|
|
6
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
7
|
-
import * as operations from "../models/operations/index.js";
|
|
8
|
-
import { Result } from "../types/fp.js";
|
|
9
|
-
/**
|
|
10
|
-
* Get Aged Creditors
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* Get Aged Creditors
|
|
14
|
-
*/
|
|
15
|
-
export declare function accountingAgedCreditorsGet(client: ApideckCore, request: operations.AccountingAgedCreditorsOneRequest, options?: RequestOptions): Promise<Result<operations.AccountingAgedCreditorsOneResponse, errors.BadRequestResponse | errors.UnauthorizedResponse | errors.PaymentRequiredResponse | errors.NotFoundResponse | errors.UnprocessableResponse | APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
16
|
-
//# sourceMappingURL=accountingAgedCreditorsGet.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accountingAgedCreditorsGet.d.ts","sourceRoot":"","sources":["../src/funcs/accountingAgedCreditorsGet.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AASzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,UAAU,CAAC,iCAAiC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,kCAAkC,EAC3C,MAAM,CAAC,kBAAkB,GACzB,MAAM,CAAC,oBAAoB,GAC3B,MAAM,CAAC,uBAAuB,GAC9B,MAAM,CAAC,gBAAgB,GACvB,MAAM,CAAC,qBAAqB,GAC5B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAyIA"}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.accountingAgedCreditorsGet = accountingAgedCreditorsGet;
|
|
30
|
-
const encodings_js_1 = require("../lib/encodings.js");
|
|
31
|
-
const M = __importStar(require("../lib/matchers.js"));
|
|
32
|
-
const schemas_js_1 = require("../lib/schemas.js");
|
|
33
|
-
const security_js_1 = require("../lib/security.js");
|
|
34
|
-
const url_js_1 = require("../lib/url.js");
|
|
35
|
-
const errors = __importStar(require("../models/errors/index.js"));
|
|
36
|
-
const operations = __importStar(require("../models/operations/index.js"));
|
|
37
|
-
/**
|
|
38
|
-
* Get Aged Creditors
|
|
39
|
-
*
|
|
40
|
-
* @remarks
|
|
41
|
-
* Get Aged Creditors
|
|
42
|
-
*/
|
|
43
|
-
async function accountingAgedCreditorsGet(client, request, options) {
|
|
44
|
-
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.AccountingAgedCreditorsOneRequest$outboundSchema.parse(value), "Input validation failed");
|
|
45
|
-
if (!parsed.ok) {
|
|
46
|
-
return parsed;
|
|
47
|
-
}
|
|
48
|
-
const payload = parsed.value;
|
|
49
|
-
const body = null;
|
|
50
|
-
const path = (0, url_js_1.pathToFunc)("/accounting/aged-creditors")();
|
|
51
|
-
const query = (0, encodings_js_1.queryJoin)((0, encodings_js_1.encodeDeepObjectQuery)({
|
|
52
|
-
"filter": payload.filter,
|
|
53
|
-
"pass_through": payload.pass_through,
|
|
54
|
-
}), (0, encodings_js_1.encodeFormQuery)({
|
|
55
|
-
"fields": payload.fields,
|
|
56
|
-
"raw": payload.raw,
|
|
57
|
-
}));
|
|
58
|
-
const headers = new Headers({
|
|
59
|
-
Accept: "application/json",
|
|
60
|
-
"x-apideck-service-id": (0, encodings_js_1.encodeSimple)("x-apideck-service-id", payload.serviceId, { explode: false, charEncoding: "none" }),
|
|
61
|
-
"x-apideck-app-id": (0, encodings_js_1.encodeSimple)("x-apideck-app-id", client._options.appId, { explode: false, charEncoding: "none" }),
|
|
62
|
-
"x-apideck-consumer-id": (0, encodings_js_1.encodeSimple)("x-apideck-consumer-id", client._options.consumerId, { explode: false, charEncoding: "none" }),
|
|
63
|
-
});
|
|
64
|
-
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
65
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
66
|
-
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
67
|
-
const context = {
|
|
68
|
-
operationID: "accounting.agedCreditorsOne",
|
|
69
|
-
oAuth2Scopes: [],
|
|
70
|
-
resolvedSecurity: requestSecurity,
|
|
71
|
-
securitySource: client._options.apiKey,
|
|
72
|
-
retryConfig: options?.retries
|
|
73
|
-
|| client._options.retryConfig
|
|
74
|
-
|| {
|
|
75
|
-
strategy: "backoff",
|
|
76
|
-
backoff: {
|
|
77
|
-
initialInterval: 500,
|
|
78
|
-
maxInterval: 60000,
|
|
79
|
-
exponent: 1.5,
|
|
80
|
-
maxElapsedTime: 3600000,
|
|
81
|
-
},
|
|
82
|
-
retryConnectionErrors: true,
|
|
83
|
-
}
|
|
84
|
-
|| { strategy: "none" },
|
|
85
|
-
retryCodes: options?.retryCodes || ["5XX"],
|
|
86
|
-
};
|
|
87
|
-
const requestRes = client._createRequest(context, {
|
|
88
|
-
security: requestSecurity,
|
|
89
|
-
method: "GET",
|
|
90
|
-
baseURL: options?.serverURL,
|
|
91
|
-
path: path,
|
|
92
|
-
headers: headers,
|
|
93
|
-
query: query,
|
|
94
|
-
body: body,
|
|
95
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
96
|
-
}, options);
|
|
97
|
-
if (!requestRes.ok) {
|
|
98
|
-
return requestRes;
|
|
99
|
-
}
|
|
100
|
-
const req = requestRes.value;
|
|
101
|
-
const doResult = await client._do(req, {
|
|
102
|
-
context,
|
|
103
|
-
errorCodes: ["400", "401", "402", "404", "422", "4XX", "5XX"],
|
|
104
|
-
retryConfig: context.retryConfig,
|
|
105
|
-
retryCodes: context.retryCodes,
|
|
106
|
-
});
|
|
107
|
-
if (!doResult.ok) {
|
|
108
|
-
return doResult;
|
|
109
|
-
}
|
|
110
|
-
const response = doResult.value;
|
|
111
|
-
const responseFields = {
|
|
112
|
-
HttpMeta: { Response: response, Request: req },
|
|
113
|
-
};
|
|
114
|
-
const [result] = await M.match(M.json(200, operations.AccountingAgedCreditorsOneResponse$inboundSchema, {
|
|
115
|
-
key: "GetAgedCreditorsResponse",
|
|
116
|
-
}), M.jsonErr(400, errors.BadRequestResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponse$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponse$inboundSchema), M.jsonErr(404, errors.NotFoundResponse$inboundSchema), M.jsonErr(422, errors.UnprocessableResponse$inboundSchema), M.fail(["4XX", "5XX"]), M.json("default", operations.AccountingAgedCreditorsOneResponse$inboundSchema, { key: "UnexpectedErrorResponse" }))(response, req, { extraFields: responseFields });
|
|
117
|
-
if (!result.ok) {
|
|
118
|
-
return result;
|
|
119
|
-
}
|
|
120
|
-
return result;
|
|
121
|
-
}
|
|
122
|
-
//# sourceMappingURL=accountingAgedCreditorsGet.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accountingAgedCreditorsGet.js","sourceRoot":"","sources":["../src/funcs/accountingAgedCreditorsGet.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAiCH,gEA6JC;AA3LD,sDAK6B;AAC7B,sDAAwC;AACxC,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAS3C,kEAAoD;AAEpD,0EAA4D;AAG5D;;;;;GAKG;AACI,KAAK,UAAU,0BAA0B,CAC9C,MAAmB,EACnB,OAAqD,EACrD,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,gDAAgD,CAAC,KAAK,CAAC,KAAK,CAAC,EAC1E,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,4BAA4B,CAAC,EAAE,CAAC;IAExD,MAAM,KAAK,GAAG,IAAA,wBAAS,EACrB,IAAA,oC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,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAe5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,gDAAgD,EAAE;QACvE,GAAG,EAAE,0BAA0B;KAChC,CAAC,EACF,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,gCAAgC,CAAC,EACvD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,kCAAkC,CAAC,EACzD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,qCAAqC,CAAC,EAC5D,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,8BAA8B,CAAC,EACrD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,mCAAmC,CAAC,EAC1D,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,EACtB,CAAC,CAAC,IAAI,CACJ,SAAS,EACT,UAAU,CAAC,gDAAgD,EAC3D,EAAE,GAAG,EAAE,yBAAyB,EAAE,CACnC,CACF,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ApideckCore } from "../core.js";
|
|
2
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
-
import { APIError } from "../models/errors/apierror.js";
|
|
4
|
-
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
-
import * as errors from "../models/errors/index.js";
|
|
6
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
7
|
-
import * as operations from "../models/operations/index.js";
|
|
8
|
-
import { Result } from "../types/fp.js";
|
|
9
|
-
/**
|
|
10
|
-
* Create pipeline
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* Create pipeline
|
|
14
|
-
*/
|
|
15
|
-
export declare function crmPipelinesCreate(client: ApideckCore, request: operations.CrmPipelinesAddRequest, options?: RequestOptions): Promise<Result<operations.CrmPipelinesAddResponse, errors.BadRequestResponse | errors.UnauthorizedResponse | errors.PaymentRequiredResponse | errors.NotFoundResponse | errors.UnprocessableResponse | APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
16
|
-
//# sourceMappingURL=crmPipelinesCreate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crmPipelinesCreate.d.ts","sourceRoot":"","sources":["../src/funcs/crmPipelinesCreate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,uBAAuB,EAChC,MAAM,CAAC,kBAAkB,GACzB,MAAM,CAAC,oBAAoB,GAC3B,MAAM,CAAC,uBAAuB,GAC9B,MAAM,CAAC,gBAAgB,GACvB,MAAM,CAAC,qBAAqB,GAC5B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAgIA"}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.crmPipelinesCreate = crmPipelinesCreate;
|
|
30
|
-
const encodings_js_1 = require("../lib/encodings.js");
|
|
31
|
-
const M = __importStar(require("../lib/matchers.js"));
|
|
32
|
-
const schemas_js_1 = require("../lib/schemas.js");
|
|
33
|
-
const security_js_1 = require("../lib/security.js");
|
|
34
|
-
const url_js_1 = require("../lib/url.js");
|
|
35
|
-
const errors = __importStar(require("../models/errors/index.js"));
|
|
36
|
-
const operations = __importStar(require("../models/operations/index.js"));
|
|
37
|
-
/**
|
|
38
|
-
* Create pipeline
|
|
39
|
-
*
|
|
40
|
-
* @remarks
|
|
41
|
-
* Create pipeline
|
|
42
|
-
*/
|
|
43
|
-
async function crmPipelinesCreate(client, request, options) {
|
|
44
|
-
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.CrmPipelinesAddRequest$outboundSchema.parse(value), "Input validation failed");
|
|
45
|
-
if (!parsed.ok) {
|
|
46
|
-
return parsed;
|
|
47
|
-
}
|
|
48
|
-
const payload = parsed.value;
|
|
49
|
-
const body = (0, encodings_js_1.encodeJSON)("body", payload.Pipeline, { explode: true });
|
|
50
|
-
const path = (0, url_js_1.pathToFunc)("/crm/pipelines")();
|
|
51
|
-
const query = (0, encodings_js_1.encodeFormQuery)({
|
|
52
|
-
"raw": payload.raw,
|
|
53
|
-
});
|
|
54
|
-
const headers = new Headers({
|
|
55
|
-
"Content-Type": "application/json",
|
|
56
|
-
Accept: "application/json",
|
|
57
|
-
"x-apideck-service-id": (0, encodings_js_1.encodeSimple)("x-apideck-service-id", payload.serviceId, { explode: false, charEncoding: "none" }),
|
|
58
|
-
"x-apideck-app-id": (0, encodings_js_1.encodeSimple)("x-apideck-app-id", client._options.appId, { explode: false, charEncoding: "none" }),
|
|
59
|
-
"x-apideck-consumer-id": (0, encodings_js_1.encodeSimple)("x-apideck-consumer-id", client._options.consumerId, { explode: false, charEncoding: "none" }),
|
|
60
|
-
});
|
|
61
|
-
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
62
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
63
|
-
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
64
|
-
const context = {
|
|
65
|
-
operationID: "crm.pipelinesAdd",
|
|
66
|
-
oAuth2Scopes: [],
|
|
67
|
-
resolvedSecurity: requestSecurity,
|
|
68
|
-
securitySource: client._options.apiKey,
|
|
69
|
-
retryConfig: options?.retries
|
|
70
|
-
|| client._options.retryConfig
|
|
71
|
-
|| {
|
|
72
|
-
strategy: "backoff",
|
|
73
|
-
backoff: {
|
|
74
|
-
initialInterval: 500,
|
|
75
|
-
maxInterval: 60000,
|
|
76
|
-
exponent: 1.5,
|
|
77
|
-
maxElapsedTime: 3600000,
|
|
78
|
-
},
|
|
79
|
-
retryConnectionErrors: true,
|
|
80
|
-
}
|
|
81
|
-
|| { strategy: "none" },
|
|
82
|
-
retryCodes: options?.retryCodes || ["5XX"],
|
|
83
|
-
};
|
|
84
|
-
const requestRes = client._createRequest(context, {
|
|
85
|
-
security: requestSecurity,
|
|
86
|
-
method: "POST",
|
|
87
|
-
baseURL: options?.serverURL,
|
|
88
|
-
path: path,
|
|
89
|
-
headers: headers,
|
|
90
|
-
query: query,
|
|
91
|
-
body: body,
|
|
92
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
93
|
-
}, options);
|
|
94
|
-
if (!requestRes.ok) {
|
|
95
|
-
return requestRes;
|
|
96
|
-
}
|
|
97
|
-
const req = requestRes.value;
|
|
98
|
-
const doResult = await client._do(req, {
|
|
99
|
-
context,
|
|
100
|
-
errorCodes: ["400", "401", "402", "404", "422", "4XX", "5XX"],
|
|
101
|
-
retryConfig: context.retryConfig,
|
|
102
|
-
retryCodes: context.retryCodes,
|
|
103
|
-
});
|
|
104
|
-
if (!doResult.ok) {
|
|
105
|
-
return doResult;
|
|
106
|
-
}
|
|
107
|
-
const response = doResult.value;
|
|
108
|
-
const responseFields = {
|
|
109
|
-
HttpMeta: { Response: response, Request: req },
|
|
110
|
-
};
|
|
111
|
-
const [result] = await M.match(M.json(201, operations.CrmPipelinesAddResponse$inboundSchema, {
|
|
112
|
-
key: "CreatePipelineResponse",
|
|
113
|
-
}), M.jsonErr(400, errors.BadRequestResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponse$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponse$inboundSchema), M.jsonErr(404, errors.NotFoundResponse$inboundSchema), M.jsonErr(422, errors.UnprocessableResponse$inboundSchema), M.fail(["4XX", "5XX"]), M.json("default", operations.CrmPipelinesAddResponse$inboundSchema, {
|
|
114
|
-
key: "UnexpectedErrorResponse",
|
|
115
|
-
}))(response, req, { extraFields: responseFields });
|
|
116
|
-
if (!result.ok) {
|
|
117
|
-
return result;
|
|
118
|
-
}
|
|
119
|
-
return result;
|
|
120
|
-
}
|
|
121
|
-
//# sourceMappingURL=crmPipelinesCreate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crmPipelinesCreate.js","sourceRoot":"","sources":["../src/funcs/crmPipelinesCreate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AA4BH,gDAoJC;AA7KD,sDAAgF;AAChF,sDAAwC;AACxC,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAS3C,kEAAoD;AAEpD,0EAA4D;AAG5D;;;;;GAKG;AACI,KAAK,UAAU,kBAAkB,CACtC,MAAmB,EACnB,OAA0C,EAC1C,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,qCAAqC,CAAC,KAAK,CAAC,KAAK,CAAC,EACxE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CA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