@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
package/README.md
CHANGED
|
@@ -133,10 +133,6 @@ run();
|
|
|
133
133
|
### [accounting](docs/sdks/accounting/README.md)
|
|
134
134
|
|
|
135
135
|
|
|
136
|
-
#### [accounting.agedCreditors](docs/sdks/agedcreditors/README.md)
|
|
137
|
-
|
|
138
|
-
* [get](docs/sdks/agedcreditors/README.md#get) - Get Aged Creditors
|
|
139
|
-
|
|
140
136
|
#### [accounting.agedDebtors](docs/sdks/ageddebtors/README.md)
|
|
141
137
|
|
|
142
138
|
* [get](docs/sdks/ageddebtors/README.md#get) - Get Aged Debtors
|
|
@@ -404,10 +400,6 @@ run();
|
|
|
404
400
|
#### [crm.pipelines](docs/sdks/pipelines/README.md)
|
|
405
401
|
|
|
406
402
|
* [list](docs/sdks/pipelines/README.md#list) - List pipelines
|
|
407
|
-
* [create](docs/sdks/pipelines/README.md#create) - Create pipeline
|
|
408
|
-
* [get](docs/sdks/pipelines/README.md#get) - Get pipeline
|
|
409
|
-
* [update](docs/sdks/pipelines/README.md#update) - Update pipeline
|
|
410
|
-
* [delete](docs/sdks/pipelines/README.md#delete) - Delete pipeline
|
|
411
403
|
|
|
412
404
|
#### [crm.users](docs/sdks/users/README.md)
|
|
413
405
|
|
|
@@ -674,7 +666,6 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
674
666
|
|
|
675
667
|
<summary>Available standalone functions</summary>
|
|
676
668
|
|
|
677
|
-
- [`accountingAgedCreditorsGet`](docs/sdks/agedcreditors/README.md#get) - Get Aged Creditors
|
|
678
669
|
- [`accountingAgedDebtorsGet`](docs/sdks/ageddebtors/README.md#get) - Get Aged Debtors
|
|
679
670
|
- [`accountingAttachmentsDelete`](docs/sdks/attachments/README.md#delete) - Delete Attachment
|
|
680
671
|
- [`accountingAttachmentsDownload`](docs/sdks/attachments/README.md#download) - Download Attachment
|
|
@@ -818,11 +809,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
818
809
|
- [`crmOpportunitiesGet`](docs/sdks/opportunities/README.md#get) - Get opportunity
|
|
819
810
|
- [`crmOpportunitiesList`](docs/sdks/opportunities/README.md#list) - List opportunities
|
|
820
811
|
- [`crmOpportunitiesUpdate`](docs/sdks/opportunities/README.md#update) - Update opportunity
|
|
821
|
-
- [`crmPipelinesCreate`](docs/sdks/pipelines/README.md#create) - Create pipeline
|
|
822
|
-
- [`crmPipelinesDelete`](docs/sdks/pipelines/README.md#delete) - Delete pipeline
|
|
823
|
-
- [`crmPipelinesGet`](docs/sdks/pipelines/README.md#get) - Get pipeline
|
|
824
812
|
- [`crmPipelinesList`](docs/sdks/pipelines/README.md#list) - List pipelines
|
|
825
|
-
- [`crmPipelinesUpdate`](docs/sdks/pipelines/README.md#update) - Update pipeline
|
|
826
813
|
- [`crmUsersCreate`](docs/sdks/users/README.md#create) - Create user
|
|
827
814
|
- [`crmUsersDelete`](docs/sdks/users/README.md#delete) - Delete user
|
|
828
815
|
- [`crmUsersGet`](docs/sdks/users/README.md#get) - Get user
|
|
@@ -27,6 +27,7 @@ async function run() {
|
|
|
27
27
|
serviceId: "salesforce",
|
|
28
28
|
filter: {
|
|
29
29
|
customerId: "123abc",
|
|
30
|
+
supplierId: "123abc",
|
|
30
31
|
reportAsOfDate: "2024-01-01",
|
|
31
32
|
periodCount: 3,
|
|
32
33
|
periodLength: 30,
|
|
@@ -65,6 +66,7 @@ async function run() {
|
|
|
65
66
|
serviceId: "salesforce",
|
|
66
67
|
filter: {
|
|
67
68
|
customerId: "123abc",
|
|
69
|
+
supplierId: "123abc",
|
|
68
70
|
reportAsOfDate: "2024-01-01",
|
|
69
71
|
periodCount: 3,
|
|
70
72
|
periodLength: 30,
|
|
@@ -6,10 +6,6 @@
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
8
|
* [list](#list) - List pipelines
|
|
9
|
-
* [create](#create) - Create pipeline
|
|
10
|
-
* [get](#get) - Get pipeline
|
|
11
|
-
* [update](#update) - Update pipeline
|
|
12
|
-
* [delete](#delete) - Delete pipeline
|
|
13
9
|
|
|
14
10
|
## list
|
|
15
11
|
|
|
@@ -99,544 +95,6 @@ run();
|
|
|
99
95
|
|
|
100
96
|
### Errors
|
|
101
97
|
|
|
102
|
-
| Error Type | Status Code | Content Type |
|
|
103
|
-
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
104
|
-
| errors.BadRequestResponse | 400 | application/json |
|
|
105
|
-
| errors.UnauthorizedResponse | 401 | application/json |
|
|
106
|
-
| errors.PaymentRequiredResponse | 402 | application/json |
|
|
107
|
-
| errors.NotFoundResponse | 404 | application/json |
|
|
108
|
-
| errors.UnprocessableResponse | 422 | application/json |
|
|
109
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
110
|
-
|
|
111
|
-
## create
|
|
112
|
-
|
|
113
|
-
Create pipeline
|
|
114
|
-
|
|
115
|
-
### Example Usage
|
|
116
|
-
|
|
117
|
-
```typescript
|
|
118
|
-
import { Apideck } from "@apideck/unify";
|
|
119
|
-
|
|
120
|
-
const apideck = new Apideck({
|
|
121
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
122
|
-
consumerId: "test-consumer",
|
|
123
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
async function run() {
|
|
127
|
-
const result = await apideck.crm.pipelines.create({
|
|
128
|
-
serviceId: "salesforce",
|
|
129
|
-
pipeline: {
|
|
130
|
-
id: "default",
|
|
131
|
-
name: "Sales Pipeline",
|
|
132
|
-
currency: "USD",
|
|
133
|
-
archived: false,
|
|
134
|
-
active: false,
|
|
135
|
-
displayOrder: 1,
|
|
136
|
-
winProbabilityEnabled: true,
|
|
137
|
-
stages: [
|
|
138
|
-
{
|
|
139
|
-
name: "Contract Sent",
|
|
140
|
-
value: "CONTRACT_SENT",
|
|
141
|
-
winProbability: 50,
|
|
142
|
-
displayOrder: 1,
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
name: "Contract Sent",
|
|
146
|
-
value: "CONTRACT_SENT",
|
|
147
|
-
winProbability: 50,
|
|
148
|
-
displayOrder: 1,
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
name: "Contract Sent",
|
|
152
|
-
value: "CONTRACT_SENT",
|
|
153
|
-
winProbability: 50,
|
|
154
|
-
displayOrder: 1,
|
|
155
|
-
},
|
|
156
|
-
],
|
|
157
|
-
passThrough: [
|
|
158
|
-
{
|
|
159
|
-
serviceId: "<id>",
|
|
160
|
-
extendPaths: [
|
|
161
|
-
{
|
|
162
|
-
path: "$.nested.property",
|
|
163
|
-
value: {
|
|
164
|
-
"TaxClassificationRef": {
|
|
165
|
-
"value": "EUC-99990201-V1-00020000",
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
],
|
|
170
|
-
},
|
|
171
|
-
],
|
|
172
|
-
},
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
// Handle the result
|
|
176
|
-
console.log(result);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
run();
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### Standalone function
|
|
183
|
-
|
|
184
|
-
The standalone function version of this method:
|
|
185
|
-
|
|
186
|
-
```typescript
|
|
187
|
-
import { ApideckCore } from "@apideck/unify/core.js";
|
|
188
|
-
import { crmPipelinesCreate } from "@apideck/unify/funcs/crmPipelinesCreate.js";
|
|
189
|
-
|
|
190
|
-
// Use `ApideckCore` for best tree-shaking performance.
|
|
191
|
-
// You can create one instance of it to use across an application.
|
|
192
|
-
const apideck = new ApideckCore({
|
|
193
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
194
|
-
consumerId: "test-consumer",
|
|
195
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
async function run() {
|
|
199
|
-
const res = await crmPipelinesCreate(apideck, {
|
|
200
|
-
serviceId: "salesforce",
|
|
201
|
-
pipeline: {
|
|
202
|
-
id: "default",
|
|
203
|
-
name: "Sales Pipeline",
|
|
204
|
-
currency: "USD",
|
|
205
|
-
archived: false,
|
|
206
|
-
active: false,
|
|
207
|
-
displayOrder: 1,
|
|
208
|
-
winProbabilityEnabled: true,
|
|
209
|
-
stages: [
|
|
210
|
-
{
|
|
211
|
-
name: "Contract Sent",
|
|
212
|
-
value: "CONTRACT_SENT",
|
|
213
|
-
winProbability: 50,
|
|
214
|
-
displayOrder: 1,
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
name: "Contract Sent",
|
|
218
|
-
value: "CONTRACT_SENT",
|
|
219
|
-
winProbability: 50,
|
|
220
|
-
displayOrder: 1,
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
name: "Contract Sent",
|
|
224
|
-
value: "CONTRACT_SENT",
|
|
225
|
-
winProbability: 50,
|
|
226
|
-
displayOrder: 1,
|
|
227
|
-
},
|
|
228
|
-
],
|
|
229
|
-
passThrough: [
|
|
230
|
-
{
|
|
231
|
-
serviceId: "<id>",
|
|
232
|
-
extendPaths: [
|
|
233
|
-
{
|
|
234
|
-
path: "$.nested.property",
|
|
235
|
-
value: {
|
|
236
|
-
"TaxClassificationRef": {
|
|
237
|
-
"value": "EUC-99990201-V1-00020000",
|
|
238
|
-
},
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
],
|
|
242
|
-
},
|
|
243
|
-
],
|
|
244
|
-
},
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
if (!res.ok) {
|
|
248
|
-
throw res.error;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
const { value: result } = res;
|
|
252
|
-
|
|
253
|
-
// Handle the result
|
|
254
|
-
console.log(result);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
run();
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### Parameters
|
|
261
|
-
|
|
262
|
-
| Parameter | Type | Required | Description |
|
|
263
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
264
|
-
| `request` | [operations.CrmPipelinesAddRequest](../../models/operations/crmpipelinesaddrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
265
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
266
|
-
| `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. |
|
|
267
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
268
|
-
|
|
269
|
-
### Response
|
|
270
|
-
|
|
271
|
-
**Promise\<[operations.CrmPipelinesAddResponse](../../models/operations/crmpipelinesaddresponse.md)\>**
|
|
272
|
-
|
|
273
|
-
### Errors
|
|
274
|
-
|
|
275
|
-
| Error Type | Status Code | Content Type |
|
|
276
|
-
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
277
|
-
| errors.BadRequestResponse | 400 | application/json |
|
|
278
|
-
| errors.UnauthorizedResponse | 401 | application/json |
|
|
279
|
-
| errors.PaymentRequiredResponse | 402 | application/json |
|
|
280
|
-
| errors.NotFoundResponse | 404 | application/json |
|
|
281
|
-
| errors.UnprocessableResponse | 422 | application/json |
|
|
282
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
283
|
-
|
|
284
|
-
## get
|
|
285
|
-
|
|
286
|
-
Get pipeline
|
|
287
|
-
|
|
288
|
-
### Example Usage
|
|
289
|
-
|
|
290
|
-
```typescript
|
|
291
|
-
import { Apideck } from "@apideck/unify";
|
|
292
|
-
|
|
293
|
-
const apideck = new Apideck({
|
|
294
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
295
|
-
consumerId: "test-consumer",
|
|
296
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
async function run() {
|
|
300
|
-
const result = await apideck.crm.pipelines.get({
|
|
301
|
-
id: "<id>",
|
|
302
|
-
serviceId: "salesforce",
|
|
303
|
-
fields: "id,updated_at",
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
// Handle the result
|
|
307
|
-
console.log(result);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
run();
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
### Standalone function
|
|
314
|
-
|
|
315
|
-
The standalone function version of this method:
|
|
316
|
-
|
|
317
|
-
```typescript
|
|
318
|
-
import { ApideckCore } from "@apideck/unify/core.js";
|
|
319
|
-
import { crmPipelinesGet } from "@apideck/unify/funcs/crmPipelinesGet.js";
|
|
320
|
-
|
|
321
|
-
// Use `ApideckCore` for best tree-shaking performance.
|
|
322
|
-
// You can create one instance of it to use across an application.
|
|
323
|
-
const apideck = new ApideckCore({
|
|
324
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
325
|
-
consumerId: "test-consumer",
|
|
326
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
async function run() {
|
|
330
|
-
const res = await crmPipelinesGet(apideck, {
|
|
331
|
-
id: "<id>",
|
|
332
|
-
serviceId: "salesforce",
|
|
333
|
-
fields: "id,updated_at",
|
|
334
|
-
});
|
|
335
|
-
|
|
336
|
-
if (!res.ok) {
|
|
337
|
-
throw res.error;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
const { value: result } = res;
|
|
341
|
-
|
|
342
|
-
// Handle the result
|
|
343
|
-
console.log(result);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
run();
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
### Parameters
|
|
350
|
-
|
|
351
|
-
| Parameter | Type | Required | Description |
|
|
352
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
353
|
-
| `request` | [operations.CrmPipelinesOneRequest](../../models/operations/crmpipelinesonerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
354
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
355
|
-
| `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. |
|
|
356
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
357
|
-
|
|
358
|
-
### Response
|
|
359
|
-
|
|
360
|
-
**Promise\<[operations.CrmPipelinesOneResponse](../../models/operations/crmpipelinesoneresponse.md)\>**
|
|
361
|
-
|
|
362
|
-
### Errors
|
|
363
|
-
|
|
364
|
-
| Error Type | Status Code | Content Type |
|
|
365
|
-
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
366
|
-
| errors.BadRequestResponse | 400 | application/json |
|
|
367
|
-
| errors.UnauthorizedResponse | 401 | application/json |
|
|
368
|
-
| errors.PaymentRequiredResponse | 402 | application/json |
|
|
369
|
-
| errors.NotFoundResponse | 404 | application/json |
|
|
370
|
-
| errors.UnprocessableResponse | 422 | application/json |
|
|
371
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
372
|
-
|
|
373
|
-
## update
|
|
374
|
-
|
|
375
|
-
Update pipeline
|
|
376
|
-
|
|
377
|
-
### Example Usage
|
|
378
|
-
|
|
379
|
-
```typescript
|
|
380
|
-
import { Apideck } from "@apideck/unify";
|
|
381
|
-
|
|
382
|
-
const apideck = new Apideck({
|
|
383
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
384
|
-
consumerId: "test-consumer",
|
|
385
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
386
|
-
});
|
|
387
|
-
|
|
388
|
-
async function run() {
|
|
389
|
-
const result = await apideck.crm.pipelines.update({
|
|
390
|
-
id: "<id>",
|
|
391
|
-
serviceId: "salesforce",
|
|
392
|
-
pipeline: {
|
|
393
|
-
id: "default",
|
|
394
|
-
name: "Sales Pipeline",
|
|
395
|
-
currency: "USD",
|
|
396
|
-
archived: false,
|
|
397
|
-
active: false,
|
|
398
|
-
displayOrder: 1,
|
|
399
|
-
winProbabilityEnabled: true,
|
|
400
|
-
stages: [
|
|
401
|
-
{
|
|
402
|
-
name: "Contract Sent",
|
|
403
|
-
value: "CONTRACT_SENT",
|
|
404
|
-
winProbability: 50,
|
|
405
|
-
displayOrder: 1,
|
|
406
|
-
},
|
|
407
|
-
{
|
|
408
|
-
name: "Contract Sent",
|
|
409
|
-
value: "CONTRACT_SENT",
|
|
410
|
-
winProbability: 50,
|
|
411
|
-
displayOrder: 1,
|
|
412
|
-
},
|
|
413
|
-
],
|
|
414
|
-
passThrough: [
|
|
415
|
-
{
|
|
416
|
-
serviceId: "<id>",
|
|
417
|
-
extendPaths: [
|
|
418
|
-
{
|
|
419
|
-
path: "$.nested.property",
|
|
420
|
-
value: {
|
|
421
|
-
"TaxClassificationRef": {
|
|
422
|
-
"value": "EUC-99990201-V1-00020000",
|
|
423
|
-
},
|
|
424
|
-
},
|
|
425
|
-
},
|
|
426
|
-
],
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
serviceId: "<id>",
|
|
430
|
-
extendPaths: [
|
|
431
|
-
{
|
|
432
|
-
path: "$.nested.property",
|
|
433
|
-
value: {
|
|
434
|
-
"TaxClassificationRef": {
|
|
435
|
-
"value": "EUC-99990201-V1-00020000",
|
|
436
|
-
},
|
|
437
|
-
},
|
|
438
|
-
},
|
|
439
|
-
],
|
|
440
|
-
},
|
|
441
|
-
],
|
|
442
|
-
},
|
|
443
|
-
});
|
|
444
|
-
|
|
445
|
-
// Handle the result
|
|
446
|
-
console.log(result);
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
run();
|
|
450
|
-
```
|
|
451
|
-
|
|
452
|
-
### Standalone function
|
|
453
|
-
|
|
454
|
-
The standalone function version of this method:
|
|
455
|
-
|
|
456
|
-
```typescript
|
|
457
|
-
import { ApideckCore } from "@apideck/unify/core.js";
|
|
458
|
-
import { crmPipelinesUpdate } from "@apideck/unify/funcs/crmPipelinesUpdate.js";
|
|
459
|
-
|
|
460
|
-
// Use `ApideckCore` for best tree-shaking performance.
|
|
461
|
-
// You can create one instance of it to use across an application.
|
|
462
|
-
const apideck = new ApideckCore({
|
|
463
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
464
|
-
consumerId: "test-consumer",
|
|
465
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
466
|
-
});
|
|
467
|
-
|
|
468
|
-
async function run() {
|
|
469
|
-
const res = await crmPipelinesUpdate(apideck, {
|
|
470
|
-
id: "<id>",
|
|
471
|
-
serviceId: "salesforce",
|
|
472
|
-
pipeline: {
|
|
473
|
-
id: "default",
|
|
474
|
-
name: "Sales Pipeline",
|
|
475
|
-
currency: "USD",
|
|
476
|
-
archived: false,
|
|
477
|
-
active: false,
|
|
478
|
-
displayOrder: 1,
|
|
479
|
-
winProbabilityEnabled: true,
|
|
480
|
-
stages: [
|
|
481
|
-
{
|
|
482
|
-
name: "Contract Sent",
|
|
483
|
-
value: "CONTRACT_SENT",
|
|
484
|
-
winProbability: 50,
|
|
485
|
-
displayOrder: 1,
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
name: "Contract Sent",
|
|
489
|
-
value: "CONTRACT_SENT",
|
|
490
|
-
winProbability: 50,
|
|
491
|
-
displayOrder: 1,
|
|
492
|
-
},
|
|
493
|
-
],
|
|
494
|
-
passThrough: [
|
|
495
|
-
{
|
|
496
|
-
serviceId: "<id>",
|
|
497
|
-
extendPaths: [
|
|
498
|
-
{
|
|
499
|
-
path: "$.nested.property",
|
|
500
|
-
value: {
|
|
501
|
-
"TaxClassificationRef": {
|
|
502
|
-
"value": "EUC-99990201-V1-00020000",
|
|
503
|
-
},
|
|
504
|
-
},
|
|
505
|
-
},
|
|
506
|
-
],
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
serviceId: "<id>",
|
|
510
|
-
extendPaths: [
|
|
511
|
-
{
|
|
512
|
-
path: "$.nested.property",
|
|
513
|
-
value: {
|
|
514
|
-
"TaxClassificationRef": {
|
|
515
|
-
"value": "EUC-99990201-V1-00020000",
|
|
516
|
-
},
|
|
517
|
-
},
|
|
518
|
-
},
|
|
519
|
-
],
|
|
520
|
-
},
|
|
521
|
-
],
|
|
522
|
-
},
|
|
523
|
-
});
|
|
524
|
-
|
|
525
|
-
if (!res.ok) {
|
|
526
|
-
throw res.error;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
const { value: result } = res;
|
|
530
|
-
|
|
531
|
-
// Handle the result
|
|
532
|
-
console.log(result);
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
run();
|
|
536
|
-
```
|
|
537
|
-
|
|
538
|
-
### Parameters
|
|
539
|
-
|
|
540
|
-
| Parameter | Type | Required | Description |
|
|
541
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
542
|
-
| `request` | [operations.CrmPipelinesUpdateRequest](../../models/operations/crmpipelinesupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
543
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
544
|
-
| `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. |
|
|
545
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
546
|
-
|
|
547
|
-
### Response
|
|
548
|
-
|
|
549
|
-
**Promise\<[operations.CrmPipelinesUpdateResponse](../../models/operations/crmpipelinesupdateresponse.md)\>**
|
|
550
|
-
|
|
551
|
-
### Errors
|
|
552
|
-
|
|
553
|
-
| Error Type | Status Code | Content Type |
|
|
554
|
-
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
555
|
-
| errors.BadRequestResponse | 400 | application/json |
|
|
556
|
-
| errors.UnauthorizedResponse | 401 | application/json |
|
|
557
|
-
| errors.PaymentRequiredResponse | 402 | application/json |
|
|
558
|
-
| errors.NotFoundResponse | 404 | application/json |
|
|
559
|
-
| errors.UnprocessableResponse | 422 | application/json |
|
|
560
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
561
|
-
|
|
562
|
-
## delete
|
|
563
|
-
|
|
564
|
-
Delete pipeline
|
|
565
|
-
|
|
566
|
-
### Example Usage
|
|
567
|
-
|
|
568
|
-
```typescript
|
|
569
|
-
import { Apideck } from "@apideck/unify";
|
|
570
|
-
|
|
571
|
-
const apideck = new Apideck({
|
|
572
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
573
|
-
consumerId: "test-consumer",
|
|
574
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
575
|
-
});
|
|
576
|
-
|
|
577
|
-
async function run() {
|
|
578
|
-
const result = await apideck.crm.pipelines.delete({
|
|
579
|
-
id: "<id>",
|
|
580
|
-
serviceId: "salesforce",
|
|
581
|
-
});
|
|
582
|
-
|
|
583
|
-
// Handle the result
|
|
584
|
-
console.log(result);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
run();
|
|
588
|
-
```
|
|
589
|
-
|
|
590
|
-
### Standalone function
|
|
591
|
-
|
|
592
|
-
The standalone function version of this method:
|
|
593
|
-
|
|
594
|
-
```typescript
|
|
595
|
-
import { ApideckCore } from "@apideck/unify/core.js";
|
|
596
|
-
import { crmPipelinesDelete } from "@apideck/unify/funcs/crmPipelinesDelete.js";
|
|
597
|
-
|
|
598
|
-
// Use `ApideckCore` for best tree-shaking performance.
|
|
599
|
-
// You can create one instance of it to use across an application.
|
|
600
|
-
const apideck = new ApideckCore({
|
|
601
|
-
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
602
|
-
consumerId: "test-consumer",
|
|
603
|
-
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
604
|
-
});
|
|
605
|
-
|
|
606
|
-
async function run() {
|
|
607
|
-
const res = await crmPipelinesDelete(apideck, {
|
|
608
|
-
id: "<id>",
|
|
609
|
-
serviceId: "salesforce",
|
|
610
|
-
});
|
|
611
|
-
|
|
612
|
-
if (!res.ok) {
|
|
613
|
-
throw res.error;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
const { value: result } = res;
|
|
617
|
-
|
|
618
|
-
// Handle the result
|
|
619
|
-
console.log(result);
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
run();
|
|
623
|
-
```
|
|
624
|
-
|
|
625
|
-
### Parameters
|
|
626
|
-
|
|
627
|
-
| Parameter | Type | Required | Description |
|
|
628
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
629
|
-
| `request` | [operations.CrmPipelinesDeleteRequest](../../models/operations/crmpipelinesdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
630
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
631
|
-
| `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. |
|
|
632
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
633
|
-
|
|
634
|
-
### Response
|
|
635
|
-
|
|
636
|
-
**Promise\<[operations.CrmPipelinesDeleteResponse](../../models/operations/crmpipelinesdeleteresponse.md)\>**
|
|
637
|
-
|
|
638
|
-
### Errors
|
|
639
|
-
|
|
640
98
|
| Error Type | Status Code | Content Type |
|
|
641
99
|
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
642
100
|
| errors.BadRequestResponse | 400 | application/json |
|
package/lib/config.d.ts
CHANGED
|
@@ -35,8 +35,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
35
35
|
export declare const SDK_METADATA: {
|
|
36
36
|
readonly language: "typescript";
|
|
37
37
|
readonly openapiDocVersion: "10.9.0";
|
|
38
|
-
readonly sdkVersion: "0.13.
|
|
38
|
+
readonly sdkVersion: "0.13.3";
|
|
39
39
|
readonly genVersion: "2.484.0";
|
|
40
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.13.
|
|
40
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.13.3 2.484.0 10.9.0 @apideck/unify";
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=config.d.ts.map
|
package/lib/config.js
CHANGED
|
@@ -28,8 +28,8 @@ function serverURLFromOptions(options) {
|
|
|
28
28
|
exports.SDK_METADATA = {
|
|
29
29
|
language: "typescript",
|
|
30
30
|
openapiDocVersion: "10.9.0",
|
|
31
|
-
sdkVersion: "0.13.
|
|
31
|
+
sdkVersion: "0.13.3",
|
|
32
32
|
genVersion: "2.484.0",
|
|
33
|
-
userAgent: "speakeasy-sdk/typescript 0.13.
|
|
33
|
+
userAgent: "speakeasy-sdk/typescript 0.13.3 2.484.0 10.9.0 @apideck/unify",
|
|
34
34
|
};
|
|
35
35
|
//# sourceMappingURL=config.js.map
|
|
@@ -2,7 +2,7 @@ import * as z from "zod";
|
|
|
2
2
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
3
|
import { RFCDate } from "../../types/rfcdate.js";
|
|
4
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
-
import {
|
|
5
|
+
import { OutstandingBalanceByCustomer, OutstandingBalanceByCustomer$Outbound } from "./outstandingbalancebycustomer.js";
|
|
6
6
|
export type AgedDebtors = {
|
|
7
7
|
/**
|
|
8
8
|
* The exact date and time the report was generated.
|
|
@@ -20,7 +20,7 @@ export type AgedDebtors = {
|
|
|
20
20
|
* Length of each aging period in days.
|
|
21
21
|
*/
|
|
22
22
|
periodLength?: number | undefined;
|
|
23
|
-
outstandingBalances?: Array<
|
|
23
|
+
outstandingBalances?: Array<OutstandingBalanceByCustomer> | undefined;
|
|
24
24
|
};
|
|
25
25
|
/** @internal */
|
|
26
26
|
export declare const AgedDebtors$inboundSchema: z.ZodType<AgedDebtors, z.ZodTypeDef, unknown>;
|
|
@@ -30,7 +30,7 @@ export type AgedDebtors$Outbound = {
|
|
|
30
30
|
report_as_of_date?: string | undefined;
|
|
31
31
|
period_count: number;
|
|
32
32
|
period_length: number;
|
|
33
|
-
outstanding_balances?: Array<
|
|
33
|
+
outstanding_balances?: Array<OutstandingBalanceByCustomer$Outbound> | undefined;
|
|
34
34
|
};
|
|
35
35
|
/** @internal */
|
|
36
36
|
export declare const AgedDebtors$outboundSchema: z.ZodType<AgedDebtors$Outbound, z.ZodTypeDef, AgedDebtors>;
|