@allisall/sdk 0.2.0 → 0.4.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 -2
- package/dist/client.d.ts +6 -0
- package/dist/client.js +8 -0
- package/dist/generated/openapi.d.ts +1820 -47
- package/dist/generated/operations.d.ts +6 -1
- package/dist/generated/operations.js +191 -0
- package/dist/import-mapping.d.ts +10 -0
- package/dist/import-mapping.js +20 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/multipart.d.ts +3 -1
- package/dist/request.d.ts +9 -0
- package/dist/request.js +43 -3
- package/dist/resources/agents.d.ts +7 -0
- package/dist/resources/agents.js +7 -0
- package/dist/resources/calculations.d.ts +21 -1
- package/dist/resources/calculations.js +22 -0
- package/dist/resources/clients.d.ts +28 -0
- package/dist/resources/clients.js +28 -0
- package/dist/resources/cost.d.ts +7 -0
- package/dist/resources/cost.js +7 -0
- package/dist/resources/dashboard.d.ts +8 -0
- package/dist/resources/dashboard.js +8 -0
- package/dist/resources/events.d.ts +70 -1
- package/dist/resources/events.js +78 -2
- package/dist/resources/imports.d.ts +24 -1
- package/dist/resources/imports.js +27 -1
- package/dist/resources/onboarding.d.ts +29 -0
- package/dist/resources/onboarding.js +34 -0
- package/dist/resources/reports.d.ts +16 -1
- package/dist/resources/reports.js +17 -0
- package/dist/resources/value-models.d.ts +7 -0
- package/dist/resources/value-models.js +7 -0
- package/dist/resources/workspace.d.ts +15 -0
- package/dist/resources/workspace.js +18 -0
- package/dist/types.d.ts +28 -1
- package/dist/types.js +6 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -17,6 +17,11 @@ export interface Operation {
|
|
|
17
17
|
readonly idempotent: boolean;
|
|
18
18
|
/** The list kind, or null when it is not a list. */
|
|
19
19
|
readonly list: "keyset" | "offset" | null;
|
|
20
|
+
/**
|
|
21
|
+
* The query parameters the spec marks x-repeatable: each takes an array,
|
|
22
|
+
* written as one parameter per item.
|
|
23
|
+
*/
|
|
24
|
+
readonly repeatable: readonly string[];
|
|
20
25
|
/** The request body it takes. */
|
|
21
26
|
readonly body: "none" | "json" | "merge-patch" | "multipart";
|
|
22
27
|
/** The status of its success response. */
|
|
@@ -30,7 +35,7 @@ export interface Operation {
|
|
|
30
35
|
* The operations the SDK can call, by operationId. Each must be an operation
|
|
31
36
|
* of the generated types, or the table below fails to compile.
|
|
32
37
|
*/
|
|
33
|
-
export type OperationId = Extract<keyof operations, "commitImport" | "createAgent" | "createApiKey" | "createCalculation" | "createClient" | "createCostLineItem" | "createReport" | "createValueModel" | "deleteAgent" | "deleteCalculation" | "deleteClient" | "deleteCostLineItem" | "deleteReport" | "deleteValueModel" | "getAgent" | "getApiKey" | "getCalculation" | "getClient" | "getClientAnomalies" | "getClientCost" | "getClientRoi" | "getClientValue" | "getClientValueModel" | "getCostLineItem" | "getDashboard" | "getHealth" | "getPriceTable" | "getReport" | "getSharedReport" | "getValueModel" | "ingestEvents" | "listAgents" | "listApiKeys" | "listCalculationReports" | "listClientCalculations" | "listClientEvents" | "listClientOutcomeTypes" | "listClients" | "listCostLineItems" | "listOutcomeTypes" | "listRenewals" | "listValueModels" | "listValueTemplates" | "previewImport" | "publishCalculation" | "reopenCalculation" | "revokeApiKey" | "revokeReport" | "setClientAgents" | "setPriceTable" | "setValueModelLineItems" | "shareReport" | "updateAgent" | "updateClient" | "updateCostLineItem" | "updateReport" | "updateValueModel" | "validateCalculation">;
|
|
38
|
+
export type OperationId = Extract<keyof operations, "commitImport" | "createAgent" | "createApiKey" | "createCalculation" | "createClient" | "createCostLineItem" | "createReport" | "createValueModel" | "deleteAgent" | "deleteCalculation" | "deleteClient" | "deleteCostLineItem" | "deleteReport" | "deleteValueModel" | "getAgent" | "getApiKey" | "getCalculation" | "getClient" | "getClientAnomalies" | "getClientCost" | "getClientRoi" | "getClientValue" | "getClientValueModel" | "getCostLineItem" | "getDashboard" | "getEventSummary" | "getHealth" | "getImport" | "getOnboarding" | "getPriceTable" | "getReport" | "getSharedReport" | "getValueModel" | "getWorkspace" | "ingestEvents" | "listAgents" | "listApiKeys" | "listCalculationReports" | "listCalculations" | "listClientCalculations" | "listClientEvents" | "listClientOutcomeTypes" | "listClients" | "listCostLineItems" | "listEventArrivals" | "listEvents" | "listImports" | "listOutcomeTypes" | "listRenewals" | "listReports" | "listValueModels" | "listValueTemplates" | "previewImport" | "publishCalculation" | "reopenCalculation" | "revokeApiKey" | "revokeReport" | "setClientAgents" | "setOnboardingSkippedSteps" | "setPriceTable" | "setValueModelLineItems" | "shareReport" | "updateAgent" | "updateClient" | "updateCostLineItem" | "updateReport" | "updateValueModel" | "validateCalculation">;
|
|
34
39
|
/** The operation table, one entry per operation the SDK can call. */
|
|
35
40
|
export declare const OPERATIONS: {
|
|
36
41
|
readonly [K in OperationId]: Operation;
|
|
@@ -12,6 +12,7 @@ export const OPERATIONS = {
|
|
|
12
12
|
scope: "ingest",
|
|
13
13
|
idempotent: true,
|
|
14
14
|
list: null,
|
|
15
|
+
repeatable: [],
|
|
15
16
|
body: "multipart",
|
|
16
17
|
status: 200,
|
|
17
18
|
requestMoney: [],
|
|
@@ -24,6 +25,7 @@ export const OPERATIONS = {
|
|
|
24
25
|
scope: "write",
|
|
25
26
|
idempotent: true,
|
|
26
27
|
list: null,
|
|
28
|
+
repeatable: [],
|
|
27
29
|
body: "json",
|
|
28
30
|
status: 201,
|
|
29
31
|
requestMoney: [],
|
|
@@ -36,6 +38,7 @@ export const OPERATIONS = {
|
|
|
36
38
|
scope: null,
|
|
37
39
|
idempotent: false,
|
|
38
40
|
list: null,
|
|
41
|
+
repeatable: [],
|
|
39
42
|
body: "json",
|
|
40
43
|
status: 201,
|
|
41
44
|
requestMoney: [],
|
|
@@ -48,6 +51,7 @@ export const OPERATIONS = {
|
|
|
48
51
|
scope: "write",
|
|
49
52
|
idempotent: true,
|
|
50
53
|
list: null,
|
|
54
|
+
repeatable: [],
|
|
51
55
|
body: "json",
|
|
52
56
|
status: 201,
|
|
53
57
|
requestMoney: [],
|
|
@@ -95,6 +99,7 @@ export const OPERATIONS = {
|
|
|
95
99
|
scope: "write",
|
|
96
100
|
idempotent: true,
|
|
97
101
|
list: null,
|
|
102
|
+
repeatable: [],
|
|
98
103
|
body: "json",
|
|
99
104
|
status: 201,
|
|
100
105
|
requestMoney: [],
|
|
@@ -107,6 +112,7 @@ export const OPERATIONS = {
|
|
|
107
112
|
scope: "write",
|
|
108
113
|
idempotent: true,
|
|
109
114
|
list: null,
|
|
115
|
+
repeatable: [],
|
|
110
116
|
body: "json",
|
|
111
117
|
status: 201,
|
|
112
118
|
requestMoney: [["monthly_amount"]],
|
|
@@ -119,6 +125,7 @@ export const OPERATIONS = {
|
|
|
119
125
|
scope: "write",
|
|
120
126
|
idempotent: true,
|
|
121
127
|
list: null,
|
|
128
|
+
repeatable: [],
|
|
122
129
|
body: "none",
|
|
123
130
|
status: 201,
|
|
124
131
|
requestMoney: [],
|
|
@@ -131,6 +138,7 @@ export const OPERATIONS = {
|
|
|
131
138
|
scope: "write",
|
|
132
139
|
idempotent: true,
|
|
133
140
|
list: null,
|
|
141
|
+
repeatable: [],
|
|
134
142
|
body: "json",
|
|
135
143
|
status: 201,
|
|
136
144
|
requestMoney: [],
|
|
@@ -143,6 +151,7 @@ export const OPERATIONS = {
|
|
|
143
151
|
scope: "write",
|
|
144
152
|
idempotent: false,
|
|
145
153
|
list: null,
|
|
154
|
+
repeatable: [],
|
|
146
155
|
body: "none",
|
|
147
156
|
status: 204,
|
|
148
157
|
requestMoney: [],
|
|
@@ -155,6 +164,7 @@ export const OPERATIONS = {
|
|
|
155
164
|
scope: "write",
|
|
156
165
|
idempotent: false,
|
|
157
166
|
list: null,
|
|
167
|
+
repeatable: [],
|
|
158
168
|
body: "none",
|
|
159
169
|
status: 204,
|
|
160
170
|
requestMoney: [],
|
|
@@ -167,6 +177,7 @@ export const OPERATIONS = {
|
|
|
167
177
|
scope: "write",
|
|
168
178
|
idempotent: false,
|
|
169
179
|
list: null,
|
|
180
|
+
repeatable: [],
|
|
170
181
|
body: "none",
|
|
171
182
|
status: 204,
|
|
172
183
|
requestMoney: [],
|
|
@@ -179,6 +190,7 @@ export const OPERATIONS = {
|
|
|
179
190
|
scope: "write",
|
|
180
191
|
idempotent: false,
|
|
181
192
|
list: null,
|
|
193
|
+
repeatable: [],
|
|
182
194
|
body: "none",
|
|
183
195
|
status: 204,
|
|
184
196
|
requestMoney: [],
|
|
@@ -191,6 +203,7 @@ export const OPERATIONS = {
|
|
|
191
203
|
scope: "write",
|
|
192
204
|
idempotent: false,
|
|
193
205
|
list: null,
|
|
206
|
+
repeatable: [],
|
|
194
207
|
body: "none",
|
|
195
208
|
status: 204,
|
|
196
209
|
requestMoney: [],
|
|
@@ -203,6 +216,7 @@ export const OPERATIONS = {
|
|
|
203
216
|
scope: "write",
|
|
204
217
|
idempotent: false,
|
|
205
218
|
list: null,
|
|
219
|
+
repeatable: [],
|
|
206
220
|
body: "none",
|
|
207
221
|
status: 204,
|
|
208
222
|
requestMoney: [],
|
|
@@ -215,6 +229,7 @@ export const OPERATIONS = {
|
|
|
215
229
|
scope: "read",
|
|
216
230
|
idempotent: false,
|
|
217
231
|
list: null,
|
|
232
|
+
repeatable: [],
|
|
218
233
|
body: "none",
|
|
219
234
|
status: 200,
|
|
220
235
|
requestMoney: [],
|
|
@@ -227,6 +242,7 @@ export const OPERATIONS = {
|
|
|
227
242
|
scope: null,
|
|
228
243
|
idempotent: false,
|
|
229
244
|
list: null,
|
|
245
|
+
repeatable: [],
|
|
230
246
|
body: "none",
|
|
231
247
|
status: 200,
|
|
232
248
|
requestMoney: [],
|
|
@@ -239,6 +255,7 @@ export const OPERATIONS = {
|
|
|
239
255
|
scope: "read",
|
|
240
256
|
idempotent: false,
|
|
241
257
|
list: null,
|
|
258
|
+
repeatable: [],
|
|
242
259
|
body: "none",
|
|
243
260
|
status: 200,
|
|
244
261
|
requestMoney: [],
|
|
@@ -286,6 +303,7 @@ export const OPERATIONS = {
|
|
|
286
303
|
scope: "read",
|
|
287
304
|
idempotent: false,
|
|
288
305
|
list: null,
|
|
306
|
+
repeatable: [],
|
|
289
307
|
body: "none",
|
|
290
308
|
status: 200,
|
|
291
309
|
requestMoney: [],
|
|
@@ -298,6 +316,7 @@ export const OPERATIONS = {
|
|
|
298
316
|
scope: "read",
|
|
299
317
|
idempotent: false,
|
|
300
318
|
list: null,
|
|
319
|
+
repeatable: [],
|
|
301
320
|
body: "none",
|
|
302
321
|
status: 200,
|
|
303
322
|
requestMoney: [],
|
|
@@ -313,6 +332,7 @@ export const OPERATIONS = {
|
|
|
313
332
|
scope: "read",
|
|
314
333
|
idempotent: false,
|
|
315
334
|
list: null,
|
|
335
|
+
repeatable: [],
|
|
316
336
|
body: "none",
|
|
317
337
|
status: 200,
|
|
318
338
|
requestMoney: [],
|
|
@@ -341,6 +361,7 @@ export const OPERATIONS = {
|
|
|
341
361
|
scope: "read",
|
|
342
362
|
idempotent: false,
|
|
343
363
|
list: null,
|
|
364
|
+
repeatable: [],
|
|
344
365
|
body: "none",
|
|
345
366
|
status: 200,
|
|
346
367
|
requestMoney: [],
|
|
@@ -378,6 +399,7 @@ export const OPERATIONS = {
|
|
|
378
399
|
scope: "read",
|
|
379
400
|
idempotent: false,
|
|
380
401
|
list: null,
|
|
402
|
+
repeatable: [],
|
|
381
403
|
body: "none",
|
|
382
404
|
status: 200,
|
|
383
405
|
requestMoney: [],
|
|
@@ -394,6 +416,7 @@ export const OPERATIONS = {
|
|
|
394
416
|
scope: "read",
|
|
395
417
|
idempotent: false,
|
|
396
418
|
list: null,
|
|
419
|
+
repeatable: [],
|
|
397
420
|
body: "none",
|
|
398
421
|
status: 200,
|
|
399
422
|
requestMoney: [],
|
|
@@ -406,6 +429,7 @@ export const OPERATIONS = {
|
|
|
406
429
|
scope: "read",
|
|
407
430
|
idempotent: false,
|
|
408
431
|
list: null,
|
|
432
|
+
repeatable: [],
|
|
409
433
|
body: "none",
|
|
410
434
|
status: 200,
|
|
411
435
|
requestMoney: [],
|
|
@@ -418,6 +442,7 @@ export const OPERATIONS = {
|
|
|
418
442
|
scope: "read",
|
|
419
443
|
idempotent: false,
|
|
420
444
|
list: null,
|
|
445
|
+
repeatable: [],
|
|
421
446
|
body: "none",
|
|
422
447
|
status: 200,
|
|
423
448
|
requestMoney: [],
|
|
@@ -440,6 +465,19 @@ export const OPERATIONS = {
|
|
|
440
465
|
["value_total"],
|
|
441
466
|
],
|
|
442
467
|
},
|
|
468
|
+
getEventSummary: {
|
|
469
|
+
method: "GET",
|
|
470
|
+
path: "/v1/events/summary",
|
|
471
|
+
access: "KeyOrSession",
|
|
472
|
+
scope: "read",
|
|
473
|
+
idempotent: false,
|
|
474
|
+
list: null,
|
|
475
|
+
repeatable: [],
|
|
476
|
+
body: "none",
|
|
477
|
+
status: 200,
|
|
478
|
+
requestMoney: [],
|
|
479
|
+
responseMoney: [],
|
|
480
|
+
},
|
|
443
481
|
getHealth: {
|
|
444
482
|
method: "GET",
|
|
445
483
|
path: "/healthz",
|
|
@@ -447,6 +485,33 @@ export const OPERATIONS = {
|
|
|
447
485
|
scope: null,
|
|
448
486
|
idempotent: false,
|
|
449
487
|
list: null,
|
|
488
|
+
repeatable: [],
|
|
489
|
+
body: "none",
|
|
490
|
+
status: 200,
|
|
491
|
+
requestMoney: [],
|
|
492
|
+
responseMoney: [],
|
|
493
|
+
},
|
|
494
|
+
getImport: {
|
|
495
|
+
method: "GET",
|
|
496
|
+
path: "/v1/imports/{id}",
|
|
497
|
+
access: "KeyOrSession",
|
|
498
|
+
scope: "read",
|
|
499
|
+
idempotent: false,
|
|
500
|
+
list: null,
|
|
501
|
+
repeatable: [],
|
|
502
|
+
body: "none",
|
|
503
|
+
status: 200,
|
|
504
|
+
requestMoney: [],
|
|
505
|
+
responseMoney: [],
|
|
506
|
+
},
|
|
507
|
+
getOnboarding: {
|
|
508
|
+
method: "GET",
|
|
509
|
+
path: "/v1/onboarding",
|
|
510
|
+
access: "KeyOrSession",
|
|
511
|
+
scope: "read",
|
|
512
|
+
idempotent: false,
|
|
513
|
+
list: null,
|
|
514
|
+
repeatable: [],
|
|
450
515
|
body: "none",
|
|
451
516
|
status: 200,
|
|
452
517
|
requestMoney: [],
|
|
@@ -459,6 +524,7 @@ export const OPERATIONS = {
|
|
|
459
524
|
scope: "read",
|
|
460
525
|
idempotent: false,
|
|
461
526
|
list: null,
|
|
527
|
+
repeatable: [],
|
|
462
528
|
body: "none",
|
|
463
529
|
status: 200,
|
|
464
530
|
requestMoney: [],
|
|
@@ -474,6 +540,7 @@ export const OPERATIONS = {
|
|
|
474
540
|
scope: "read",
|
|
475
541
|
idempotent: false,
|
|
476
542
|
list: null,
|
|
543
|
+
repeatable: [],
|
|
477
544
|
body: "none",
|
|
478
545
|
status: 200,
|
|
479
546
|
requestMoney: [],
|
|
@@ -496,6 +563,7 @@ export const OPERATIONS = {
|
|
|
496
563
|
scope: null,
|
|
497
564
|
idempotent: false,
|
|
498
565
|
list: null,
|
|
566
|
+
repeatable: [],
|
|
499
567
|
body: "none",
|
|
500
568
|
status: 200,
|
|
501
569
|
requestMoney: [],
|
|
@@ -518,11 +586,25 @@ export const OPERATIONS = {
|
|
|
518
586
|
scope: "read",
|
|
519
587
|
idempotent: false,
|
|
520
588
|
list: null,
|
|
589
|
+
repeatable: [],
|
|
521
590
|
body: "none",
|
|
522
591
|
status: 200,
|
|
523
592
|
requestMoney: [],
|
|
524
593
|
responseMoney: [["line_items", "*", "unit_value"]],
|
|
525
594
|
},
|
|
595
|
+
getWorkspace: {
|
|
596
|
+
method: "GET",
|
|
597
|
+
path: "/v1/workspace",
|
|
598
|
+
access: "KeyOrSession",
|
|
599
|
+
scope: "read",
|
|
600
|
+
idempotent: false,
|
|
601
|
+
list: null,
|
|
602
|
+
repeatable: [],
|
|
603
|
+
body: "none",
|
|
604
|
+
status: 200,
|
|
605
|
+
requestMoney: [],
|
|
606
|
+
responseMoney: [],
|
|
607
|
+
},
|
|
526
608
|
ingestEvents: {
|
|
527
609
|
method: "POST",
|
|
528
610
|
path: "/v1/events",
|
|
@@ -530,6 +612,7 @@ export const OPERATIONS = {
|
|
|
530
612
|
scope: "ingest",
|
|
531
613
|
idempotent: false,
|
|
532
614
|
list: null,
|
|
615
|
+
repeatable: [],
|
|
533
616
|
body: "json",
|
|
534
617
|
status: 200,
|
|
535
618
|
requestMoney: [["events", "*", "cost"]],
|
|
@@ -542,6 +625,7 @@ export const OPERATIONS = {
|
|
|
542
625
|
scope: "read",
|
|
543
626
|
idempotent: false,
|
|
544
627
|
list: "keyset",
|
|
628
|
+
repeatable: [],
|
|
545
629
|
body: "none",
|
|
546
630
|
status: 200,
|
|
547
631
|
requestMoney: [],
|
|
@@ -554,6 +638,7 @@ export const OPERATIONS = {
|
|
|
554
638
|
scope: null,
|
|
555
639
|
idempotent: false,
|
|
556
640
|
list: "keyset",
|
|
641
|
+
repeatable: [],
|
|
557
642
|
body: "none",
|
|
558
643
|
status: 200,
|
|
559
644
|
requestMoney: [],
|
|
@@ -566,11 +651,28 @@ export const OPERATIONS = {
|
|
|
566
651
|
scope: "read",
|
|
567
652
|
idempotent: false,
|
|
568
653
|
list: "keyset",
|
|
654
|
+
repeatable: [],
|
|
569
655
|
body: "none",
|
|
570
656
|
status: 200,
|
|
571
657
|
requestMoney: [],
|
|
572
658
|
responseMoney: [],
|
|
573
659
|
},
|
|
660
|
+
listCalculations: {
|
|
661
|
+
method: "GET",
|
|
662
|
+
path: "/v1/calculations",
|
|
663
|
+
access: "KeyOrSession",
|
|
664
|
+
scope: "read",
|
|
665
|
+
idempotent: false,
|
|
666
|
+
list: "keyset",
|
|
667
|
+
repeatable: [],
|
|
668
|
+
body: "none",
|
|
669
|
+
status: 200,
|
|
670
|
+
requestMoney: [],
|
|
671
|
+
responseMoney: [
|
|
672
|
+
["data", "*", "cost_total"],
|
|
673
|
+
["data", "*", "value_total"],
|
|
674
|
+
],
|
|
675
|
+
},
|
|
574
676
|
listClientCalculations: {
|
|
575
677
|
method: "GET",
|
|
576
678
|
path: "/v1/clients/{id}/calculations",
|
|
@@ -578,6 +680,7 @@ export const OPERATIONS = {
|
|
|
578
680
|
scope: "read",
|
|
579
681
|
idempotent: false,
|
|
580
682
|
list: "keyset",
|
|
683
|
+
repeatable: [],
|
|
581
684
|
body: "none",
|
|
582
685
|
status: 200,
|
|
583
686
|
requestMoney: [],
|
|
@@ -593,6 +696,7 @@ export const OPERATIONS = {
|
|
|
593
696
|
scope: "read",
|
|
594
697
|
idempotent: false,
|
|
595
698
|
list: "offset",
|
|
699
|
+
repeatable: [],
|
|
596
700
|
body: "none",
|
|
597
701
|
status: 200,
|
|
598
702
|
requestMoney: [],
|
|
@@ -605,6 +709,7 @@ export const OPERATIONS = {
|
|
|
605
709
|
scope: "read",
|
|
606
710
|
idempotent: false,
|
|
607
711
|
list: "offset",
|
|
712
|
+
repeatable: [],
|
|
608
713
|
body: "none",
|
|
609
714
|
status: 200,
|
|
610
715
|
requestMoney: [],
|
|
@@ -617,6 +722,7 @@ export const OPERATIONS = {
|
|
|
617
722
|
scope: "read",
|
|
618
723
|
idempotent: false,
|
|
619
724
|
list: "keyset",
|
|
725
|
+
repeatable: [],
|
|
620
726
|
body: "none",
|
|
621
727
|
status: 200,
|
|
622
728
|
requestMoney: [],
|
|
@@ -629,11 +735,51 @@ export const OPERATIONS = {
|
|
|
629
735
|
scope: "read",
|
|
630
736
|
idempotent: false,
|
|
631
737
|
list: "keyset",
|
|
738
|
+
repeatable: [],
|
|
632
739
|
body: "none",
|
|
633
740
|
status: 200,
|
|
634
741
|
requestMoney: [],
|
|
635
742
|
responseMoney: [["data", "*", "monthly_amount"]],
|
|
636
743
|
},
|
|
744
|
+
listEventArrivals: {
|
|
745
|
+
method: "GET",
|
|
746
|
+
path: "/v1/events/arrivals",
|
|
747
|
+
access: "KeyOrSession",
|
|
748
|
+
scope: "read",
|
|
749
|
+
idempotent: false,
|
|
750
|
+
list: "keyset",
|
|
751
|
+
repeatable: [],
|
|
752
|
+
body: "none",
|
|
753
|
+
status: 200,
|
|
754
|
+
requestMoney: [],
|
|
755
|
+
responseMoney: [["data", "*", "cost"]],
|
|
756
|
+
},
|
|
757
|
+
listEvents: {
|
|
758
|
+
method: "GET",
|
|
759
|
+
path: "/v1/events",
|
|
760
|
+
access: "KeyOrSession",
|
|
761
|
+
scope: "read",
|
|
762
|
+
idempotent: false,
|
|
763
|
+
list: "keyset",
|
|
764
|
+
repeatable: [],
|
|
765
|
+
body: "none",
|
|
766
|
+
status: 200,
|
|
767
|
+
requestMoney: [],
|
|
768
|
+
responseMoney: [["data", "*", "cost"]],
|
|
769
|
+
},
|
|
770
|
+
listImports: {
|
|
771
|
+
method: "GET",
|
|
772
|
+
path: "/v1/imports",
|
|
773
|
+
access: "KeyOrSession",
|
|
774
|
+
scope: "read",
|
|
775
|
+
idempotent: false,
|
|
776
|
+
list: "keyset",
|
|
777
|
+
repeatable: [],
|
|
778
|
+
body: "none",
|
|
779
|
+
status: 200,
|
|
780
|
+
requestMoney: [],
|
|
781
|
+
responseMoney: [],
|
|
782
|
+
},
|
|
637
783
|
listOutcomeTypes: {
|
|
638
784
|
method: "GET",
|
|
639
785
|
path: "/v1/outcome-types",
|
|
@@ -641,6 +787,7 @@ export const OPERATIONS = {
|
|
|
641
787
|
scope: "read",
|
|
642
788
|
idempotent: false,
|
|
643
789
|
list: "offset",
|
|
790
|
+
repeatable: [],
|
|
644
791
|
body: "none",
|
|
645
792
|
status: 200,
|
|
646
793
|
requestMoney: [],
|
|
@@ -653,6 +800,20 @@ export const OPERATIONS = {
|
|
|
653
800
|
scope: "read",
|
|
654
801
|
idempotent: false,
|
|
655
802
|
list: "offset",
|
|
803
|
+
repeatable: ["renewal_term"],
|
|
804
|
+
body: "none",
|
|
805
|
+
status: 200,
|
|
806
|
+
requestMoney: [],
|
|
807
|
+
responseMoney: [],
|
|
808
|
+
},
|
|
809
|
+
listReports: {
|
|
810
|
+
method: "GET",
|
|
811
|
+
path: "/v1/reports",
|
|
812
|
+
access: "KeyOrSession",
|
|
813
|
+
scope: "read",
|
|
814
|
+
idempotent: false,
|
|
815
|
+
list: "keyset",
|
|
816
|
+
repeatable: [],
|
|
656
817
|
body: "none",
|
|
657
818
|
status: 200,
|
|
658
819
|
requestMoney: [],
|
|
@@ -665,6 +826,7 @@ export const OPERATIONS = {
|
|
|
665
826
|
scope: "read",
|
|
666
827
|
idempotent: false,
|
|
667
828
|
list: "keyset",
|
|
829
|
+
repeatable: [],
|
|
668
830
|
body: "none",
|
|
669
831
|
status: 200,
|
|
670
832
|
requestMoney: [],
|
|
@@ -677,6 +839,7 @@ export const OPERATIONS = {
|
|
|
677
839
|
scope: "read",
|
|
678
840
|
idempotent: false,
|
|
679
841
|
list: "offset",
|
|
842
|
+
repeatable: [],
|
|
680
843
|
body: "none",
|
|
681
844
|
status: 200,
|
|
682
845
|
requestMoney: [],
|
|
@@ -689,6 +852,7 @@ export const OPERATIONS = {
|
|
|
689
852
|
scope: "ingest",
|
|
690
853
|
idempotent: false,
|
|
691
854
|
list: null,
|
|
855
|
+
repeatable: [],
|
|
692
856
|
body: "multipart",
|
|
693
857
|
status: 200,
|
|
694
858
|
requestMoney: [],
|
|
@@ -701,6 +865,7 @@ export const OPERATIONS = {
|
|
|
701
865
|
scope: null,
|
|
702
866
|
idempotent: false,
|
|
703
867
|
list: null,
|
|
868
|
+
repeatable: [],
|
|
704
869
|
body: "none",
|
|
705
870
|
status: 200,
|
|
706
871
|
requestMoney: [],
|
|
@@ -748,6 +913,7 @@ export const OPERATIONS = {
|
|
|
748
913
|
scope: null,
|
|
749
914
|
idempotent: false,
|
|
750
915
|
list: null,
|
|
916
|
+
repeatable: [],
|
|
751
917
|
body: "none",
|
|
752
918
|
status: 200,
|
|
753
919
|
requestMoney: [],
|
|
@@ -795,6 +961,7 @@ export const OPERATIONS = {
|
|
|
795
961
|
scope: null,
|
|
796
962
|
idempotent: false,
|
|
797
963
|
list: null,
|
|
964
|
+
repeatable: [],
|
|
798
965
|
body: "none",
|
|
799
966
|
status: 200,
|
|
800
967
|
requestMoney: [],
|
|
@@ -807,6 +974,7 @@ export const OPERATIONS = {
|
|
|
807
974
|
scope: null,
|
|
808
975
|
idempotent: false,
|
|
809
976
|
list: null,
|
|
977
|
+
repeatable: [],
|
|
810
978
|
body: "none",
|
|
811
979
|
status: 200,
|
|
812
980
|
requestMoney: [],
|
|
@@ -819,6 +987,20 @@ export const OPERATIONS = {
|
|
|
819
987
|
scope: "write",
|
|
820
988
|
idempotent: false,
|
|
821
989
|
list: null,
|
|
990
|
+
repeatable: [],
|
|
991
|
+
body: "json",
|
|
992
|
+
status: 200,
|
|
993
|
+
requestMoney: [],
|
|
994
|
+
responseMoney: [],
|
|
995
|
+
},
|
|
996
|
+
setOnboardingSkippedSteps: {
|
|
997
|
+
method: "PUT",
|
|
998
|
+
path: "/v1/onboarding/skipped-steps",
|
|
999
|
+
access: "KeyOrSession",
|
|
1000
|
+
scope: "write",
|
|
1001
|
+
idempotent: false,
|
|
1002
|
+
list: null,
|
|
1003
|
+
repeatable: [],
|
|
822
1004
|
body: "json",
|
|
823
1005
|
status: 200,
|
|
824
1006
|
requestMoney: [],
|
|
@@ -831,6 +1013,7 @@ export const OPERATIONS = {
|
|
|
831
1013
|
scope: "write",
|
|
832
1014
|
idempotent: false,
|
|
833
1015
|
list: null,
|
|
1016
|
+
repeatable: [],
|
|
834
1017
|
body: "json",
|
|
835
1018
|
status: 200,
|
|
836
1019
|
requestMoney: [
|
|
@@ -849,6 +1032,7 @@ export const OPERATIONS = {
|
|
|
849
1032
|
scope: "write",
|
|
850
1033
|
idempotent: false,
|
|
851
1034
|
list: null,
|
|
1035
|
+
repeatable: [],
|
|
852
1036
|
body: "json",
|
|
853
1037
|
status: 200,
|
|
854
1038
|
requestMoney: [["line_items", "*", "unit_value"]],
|
|
@@ -861,6 +1045,7 @@ export const OPERATIONS = {
|
|
|
861
1045
|
scope: null,
|
|
862
1046
|
idempotent: false,
|
|
863
1047
|
list: null,
|
|
1048
|
+
repeatable: [],
|
|
864
1049
|
body: "none",
|
|
865
1050
|
status: 200,
|
|
866
1051
|
requestMoney: [],
|
|
@@ -873,6 +1058,7 @@ export const OPERATIONS = {
|
|
|
873
1058
|
scope: "write",
|
|
874
1059
|
idempotent: false,
|
|
875
1060
|
list: null,
|
|
1061
|
+
repeatable: [],
|
|
876
1062
|
body: "merge-patch",
|
|
877
1063
|
status: 200,
|
|
878
1064
|
requestMoney: [],
|
|
@@ -885,6 +1071,7 @@ export const OPERATIONS = {
|
|
|
885
1071
|
scope: "write",
|
|
886
1072
|
idempotent: false,
|
|
887
1073
|
list: null,
|
|
1074
|
+
repeatable: [],
|
|
888
1075
|
body: "merge-patch",
|
|
889
1076
|
status: 200,
|
|
890
1077
|
requestMoney: [],
|
|
@@ -897,6 +1084,7 @@ export const OPERATIONS = {
|
|
|
897
1084
|
scope: "write",
|
|
898
1085
|
idempotent: false,
|
|
899
1086
|
list: null,
|
|
1087
|
+
repeatable: [],
|
|
900
1088
|
body: "merge-patch",
|
|
901
1089
|
status: 200,
|
|
902
1090
|
requestMoney: [["monthly_amount"]],
|
|
@@ -909,6 +1097,7 @@ export const OPERATIONS = {
|
|
|
909
1097
|
scope: "write",
|
|
910
1098
|
idempotent: false,
|
|
911
1099
|
list: null,
|
|
1100
|
+
repeatable: [],
|
|
912
1101
|
body: "merge-patch",
|
|
913
1102
|
status: 200,
|
|
914
1103
|
requestMoney: [],
|
|
@@ -921,6 +1110,7 @@ export const OPERATIONS = {
|
|
|
921
1110
|
scope: "write",
|
|
922
1111
|
idempotent: false,
|
|
923
1112
|
list: null,
|
|
1113
|
+
repeatable: [],
|
|
924
1114
|
body: "merge-patch",
|
|
925
1115
|
status: 200,
|
|
926
1116
|
requestMoney: [],
|
|
@@ -933,6 +1123,7 @@ export const OPERATIONS = {
|
|
|
933
1123
|
scope: null,
|
|
934
1124
|
idempotent: false,
|
|
935
1125
|
list: null,
|
|
1126
|
+
repeatable: [],
|
|
936
1127
|
body: "json",
|
|
937
1128
|
status: 200,
|
|
938
1129
|
requestMoney: [],
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AppliedImportMapping, ImportMapping } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Returns the mapping an import ran with, read from `imports.get`, as the
|
|
4
|
+
* `mapping` of the next `imports.preview` or `imports.commit`.
|
|
5
|
+
*
|
|
6
|
+
* It copies the four members and refuses nothing. A delimiter this SDK
|
|
7
|
+
* does not list is sent as it is, and the API answers it as it answers any
|
|
8
|
+
* mapping.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toImportMapping(applied: AppliedImportMapping): ImportMapping;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Turning the mapping an import ran with into the mapping a commit sends.
|
|
2
|
+
/**
|
|
3
|
+
* Returns the mapping an import ran with, read from `imports.get`, as the
|
|
4
|
+
* `mapping` of the next `imports.preview` or `imports.commit`.
|
|
5
|
+
*
|
|
6
|
+
* It copies the four members and refuses nothing. A delimiter this SDK
|
|
7
|
+
* does not list is sent as it is, and the API answers it as it answers any
|
|
8
|
+
* mapping.
|
|
9
|
+
*/
|
|
10
|
+
export function toImportMapping(applied) {
|
|
11
|
+
return {
|
|
12
|
+
columns: { ...applied.columns },
|
|
13
|
+
constants: { ...applied.constants },
|
|
14
|
+
timezone: applied.timezone,
|
|
15
|
+
// The response's delimiter is an open set and the request's is closed.
|
|
16
|
+
// The API is the check: it refuses a delimiter it does not accept, so a
|
|
17
|
+
// value this SDK does not list is passed through unchanged.
|
|
18
|
+
delimiter: applied.delimiter,
|
|
19
|
+
};
|
|
20
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { Allisall, type ClientOptions } from "./client.js";
|
|
2
2
|
export { type Decimal, decimal } from "./decimal.js";
|
|
3
3
|
export { AllisallError, ApiError, ConnectionError, IngestError, } from "./errors.js";
|
|
4
|
+
export { toImportMapping } from "./import-mapping.js";
|
|
4
5
|
export type { MoneyInput } from "./money.js";
|
|
5
6
|
export type { ImportUpload } from "./multipart.js";
|
|
6
7
|
export type { IdempotentRequestOptions, RequestOptions } from "./options.js";
|
|
7
8
|
export type { Page, PagePromise } from "./pagination.js";
|
|
8
9
|
export { getSharedReport, type SharedReportOptions } from "./share.js";
|
|
9
10
|
export type { FetchLike, TokenProvider } from "./transport.js";
|
|
10
|
-
export type { Agent, AgentCostLine, AgentCreate, AgentDetail, AgentList, AgentListItem, AgentPatch, AgentStats, AgentStatus, Anomalies, ApiKey, ApiKeyCreate, ApiKeyList, ApiKeyWithToken, AssignedAgent, AttributedEvent, Calculation, CalculationCreate, CalculationList, CalculationSnapshot, CalculationState, CalculationSummary, Checklist, ChecklistInput, Client, ClientAgents, ClientAgentsSet, ClientCost, ClientCreate, ClientDetail, ClientEventList, ClientList, ClientPatch, ClientStatus, ClientValue, CostCoverage, CostLineItem, CostLineItemCreate, CostLineItemList, CostLineItemPatch, CostResult, CostTarget, CostTargetInput, CostTargetKind, Dashboard, Disclosure, DisclosureEdit, DisclosureKind, ErrorCode, EventCategory, EventInput, EventSource, FieldError, FieldErrorCode, GetAgentQuery, GetClientAnomaliesQuery, GetClientCostQuery, GetClientRoiQuery, GetClientValueQuery, GetDashboardQuery, Health, HealthDirection, HealthUnavailable, ImportMapping, ImportPreview, ImportResult, ImportRowError, IngestRowError, IngestSummary, ListAgentsQuery, ListApiKeysQuery, ListCalculationReportsQuery, ListClientCalculationsQuery, ListClientEventsQuery, ListClientOutcomeTypesQuery, ListClientsQuery, ListCostLineItemsQuery, ListOutcomeTypesQuery, ListRenewalsQuery, ListValueModelsQuery, ListValueTemplatesQuery, ManualCostLine, ModelRate, ModelRateInput, OutcomeTypeList, OutcomeTypeUsage, Period, PeriodInput, PortfolioClient, PortfolioExclusionReason, PreviewEvent, PreviewRow, PriceTable, PriceTableSet, Problem, PublicReport, Ratios, Renewal, RenewalList, Report, ReportList, ReportPatch, ReportSummary, ReportWithPreview, RoiResult, Scope, TokenCostLine, UnattributedLineItem, UndefinedReason, ValueCoverage, ValueLine, ValueLineItem, ValueLineItemInput, ValueLineItemsSet, ValueModel, ValueModelCreate, ValueModelList, ValueModelPatch, ValueModelRef, ValueModelStatus, ValueModelSummary, ValueResult, ValueTemplate, ValueTemplateLineItem, ValueTemplateList, } from "./types.js";
|
|
11
|
+
export type { Agent, AgentCostLine, AgentCreate, AgentDetail, AgentList, AgentListItem, AgentPatch, AgentStats, AgentStatus, Anomalies, ApiKey, ApiKeyCreate, ApiKeyList, ApiKeyWithToken, AppliedImportMapping, AssignedAgent, AttributedEvent, Calculation, CalculationCreate, CalculationList, CalculationSnapshot, CalculationState, CalculationSummary, Checklist, ChecklistInput, Client, ClientAgents, ClientAgentsSet, ClientCost, ClientCreate, ClientDetail, ClientEventList, ClientList, ClientPatch, ClientStatus, ClientValue, CostCoverage, CostLineItem, CostLineItemCreate, CostLineItemList, CostLineItemPatch, CostResult, CostTarget, CostTargetInput, CostTargetKind, Dashboard, Disclosure, DisclosureEdit, DisclosureKind, ErrorCode, EventArrivalList, EventCategory, EventCategoryCount, EventDayCount, EventInput, EventList, EventSource, EventSummary, FieldError, FieldErrorCode, GetAgentQuery, GetClientAnomaliesQuery, GetClientCostQuery, GetClientRoiQuery, GetClientValueQuery, GetDashboardQuery, GetEventSummaryQuery, Health, HealthDirection, HealthUnavailable, Import, ImportDelimiter, ImportList, ImportMapping, ImportPreview, ImportResult, ImportRowError, ImportSummary, IngestRowError, IngestSummary, ListAgentsQuery, ListApiKeysQuery, ListCalculationReportsQuery, ListCalculationsQuery, ListClientCalculationsQuery, ListClientEventsQuery, ListClientOutcomeTypesQuery, ListClientsQuery, ListCostLineItemsQuery, ListEventArrivalsQuery, ListEventsQuery, ListImportsQuery, ListOutcomeTypesQuery, ListRenewalsQuery, ListReportsQuery, ListValueModelsQuery, ListValueTemplatesQuery, ManualCostLine, ModelRate, ModelRateInput, Onboarding, OnboardingSkippedStepsSet, OnboardingStep, OnboardingStepProgress, OutcomeTypeList, OutcomeTypeUsage, Period, PeriodInput, PortfolioClient, PortfolioExclusionReason, PreviewEvent, PreviewRow, PriceTable, PriceTableSet, Problem, PublicReport, Ratios, Renewal, RenewalList, RenewalTerm, RenewalTermFilter, RenewalWindow, Report, ReportList, ReportPatch, ReportState, ReportSummary, ReportWithPreview, RoiResult, Scope, TokenCostLine, UnattributedLineItem, UndefinedReason, ValueCoverage, ValueLine, ValueLineItem, ValueLineItemInput, ValueLineItemsSet, ValueModel, ValueModelCreate, ValueModelList, ValueModelPatch, ValueModelRef, ValueModelStatus, ValueModelSummary, ValueResult, ValueTemplate, ValueTemplateLineItem, ValueTemplateList, Workspace, WorkspaceCalculationList, WorkspaceReportList, } from "./types.js";
|
package/dist/index.js
CHANGED
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
export { Allisall } from "./client.js";
|
|
3
3
|
export { decimal } from "./decimal.js";
|
|
4
4
|
export { AllisallError, ApiError, ConnectionError, IngestError, } from "./errors.js";
|
|
5
|
+
export { toImportMapping } from "./import-mapping.js";
|
|
5
6
|
export { getSharedReport } from "./share.js";
|
package/dist/multipart.d.ts
CHANGED
|
@@ -12,7 +12,9 @@ export interface ImportUpload {
|
|
|
12
12
|
file: Blob | Uint8Array | string;
|
|
13
13
|
/**
|
|
14
14
|
* The file name the import records. Defaults to the name of a `File`, and
|
|
15
|
-
* otherwise to `upload.csv`; an empty name counts as none.
|
|
15
|
+
* otherwise to `upload.csv`; an empty name counts as none. A name longer
|
|
16
|
+
* than 255 characters, counted after any directory part separated by
|
|
17
|
+
* `/`, is refused with `400` `too_long`.
|
|
16
18
|
*/
|
|
17
19
|
filename?: string | undefined;
|
|
18
20
|
}
|