weflayr 0.22.1 → 0.23.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/dist/api/generated/facade.gen.d.ts +64 -94
- package/dist/api/generated/facade.gen.js +8 -10
- package/dist/api/generated/index.d.ts +2 -2
- package/dist/api/generated/index.js +8 -10
- package/dist/api/generated/sdk.gen.d.ts +19 -27
- package/dist/api/generated/sdk.gen.js +36 -54
- package/dist/api/generated/types.gen.d.ts +204 -166
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/package.json +1 -1
- package/scripts/generate_facade.mjs +2 -2
- package/src/api/generated/facade.gen.ts +37 -49
- package/src/api/generated/index.ts +2 -2
- package/src/api/generated/sdk.gen.ts +31 -49
- package/src/api/generated/types.gen.ts +211 -181
- package/src/api/index.ts +1 -1
- package/tests/api/index.test.js +176 -69
|
@@ -36,6 +36,38 @@ export type ApiErrorOutput = {
|
|
|
36
36
|
error: string;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* CustomerMarginRow
|
|
41
|
+
*
|
|
42
|
+
* One customer's gross margin for a period.
|
|
43
|
+
*/
|
|
44
|
+
export type CustomerMarginRow = {
|
|
45
|
+
/**
|
|
46
|
+
* Customer Name
|
|
47
|
+
*/
|
|
48
|
+
customer_name: string;
|
|
49
|
+
/**
|
|
50
|
+
* Revenue
|
|
51
|
+
*/
|
|
52
|
+
revenue: number;
|
|
53
|
+
/**
|
|
54
|
+
* Cost
|
|
55
|
+
*/
|
|
56
|
+
cost: number;
|
|
57
|
+
/**
|
|
58
|
+
* Margin
|
|
59
|
+
*/
|
|
60
|
+
margin: number;
|
|
61
|
+
/**
|
|
62
|
+
* Margin Pct
|
|
63
|
+
*/
|
|
64
|
+
margin_pct: number | null;
|
|
65
|
+
/**
|
|
66
|
+
* Profitability Status
|
|
67
|
+
*/
|
|
68
|
+
profitability_status: 'healthy' | 'watch' | 'at_risk' | 'unprofitable' | 'unknown';
|
|
69
|
+
};
|
|
70
|
+
|
|
39
71
|
/**
|
|
40
72
|
* CustomerTags
|
|
41
73
|
*
|
|
@@ -149,11 +181,11 @@ export type KeyMetricOutput = {
|
|
|
149
181
|
*/
|
|
150
182
|
export type KeyMetricRow = {
|
|
151
183
|
/**
|
|
152
|
-
*
|
|
184
|
+
* Metric Id
|
|
153
185
|
*
|
|
154
186
|
* Your own id for this value. Omit it to book a new value; reuse a previous one to update it (needs "upsert": true, see the "upsert" field).
|
|
155
187
|
*/
|
|
156
|
-
|
|
188
|
+
metric_id?: string | null;
|
|
157
189
|
/**
|
|
158
190
|
* User Name
|
|
159
191
|
*/
|
|
@@ -165,7 +197,7 @@ export type KeyMetricRow = {
|
|
|
165
197
|
/**
|
|
166
198
|
* Amount
|
|
167
199
|
*/
|
|
168
|
-
amount: number
|
|
200
|
+
amount: number;
|
|
169
201
|
/**
|
|
170
202
|
* Month
|
|
171
203
|
*/
|
|
@@ -186,10 +218,6 @@ export type KeyMetricRow = {
|
|
|
186
218
|
* One booked key-metric value.
|
|
187
219
|
*/
|
|
188
220
|
export type KeyMetricRowOutput = {
|
|
189
|
-
/**
|
|
190
|
-
* User Defined Id
|
|
191
|
-
*/
|
|
192
|
-
user_defined_id: string;
|
|
193
221
|
/**
|
|
194
222
|
* Metric Name
|
|
195
223
|
*/
|
|
@@ -201,17 +229,42 @@ export type KeyMetricRowOutput = {
|
|
|
201
229
|
/**
|
|
202
230
|
* Amount
|
|
203
231
|
*/
|
|
204
|
-
amount:
|
|
232
|
+
amount: number;
|
|
205
233
|
/**
|
|
206
234
|
* Source
|
|
207
235
|
*/
|
|
208
236
|
source: string;
|
|
237
|
+
/**
|
|
238
|
+
* Metric Id
|
|
239
|
+
*/
|
|
240
|
+
metric_id: string;
|
|
209
241
|
/**
|
|
210
242
|
* User Name
|
|
211
243
|
*/
|
|
212
244
|
user_name: string;
|
|
213
245
|
};
|
|
214
246
|
|
|
247
|
+
/**
|
|
248
|
+
* MarginListOutput
|
|
249
|
+
*
|
|
250
|
+
* Margin GET response: one row per customer with booked revenue, sorted by
|
|
251
|
+
* customer_name ascending.
|
|
252
|
+
*/
|
|
253
|
+
export type MarginListOutput = {
|
|
254
|
+
/**
|
|
255
|
+
* Rows
|
|
256
|
+
*/
|
|
257
|
+
rows: Array<CustomerMarginRow>;
|
|
258
|
+
/**
|
|
259
|
+
* Next Cursor
|
|
260
|
+
*/
|
|
261
|
+
next_cursor: string | null;
|
|
262
|
+
/**
|
|
263
|
+
* Has More
|
|
264
|
+
*/
|
|
265
|
+
has_more: boolean;
|
|
266
|
+
};
|
|
267
|
+
|
|
215
268
|
/**
|
|
216
269
|
* RevenueOrKeyMetricDeletedRowOutput
|
|
217
270
|
*
|
|
@@ -272,11 +325,11 @@ export type RevenueOutput = {
|
|
|
272
325
|
*/
|
|
273
326
|
export type RevenueRow = {
|
|
274
327
|
/**
|
|
275
|
-
*
|
|
328
|
+
* Revenue Id
|
|
276
329
|
*
|
|
277
330
|
* Your own id for this value. Omit it to book a new value; reuse a previous one to update it (needs "upsert": true, see the "upsert" field).
|
|
278
331
|
*/
|
|
279
|
-
|
|
332
|
+
revenue_id?: string | null;
|
|
280
333
|
/**
|
|
281
334
|
* Customer Name
|
|
282
335
|
*/
|
|
@@ -284,7 +337,7 @@ export type RevenueRow = {
|
|
|
284
337
|
/**
|
|
285
338
|
* Amount
|
|
286
339
|
*/
|
|
287
|
-
amount: number
|
|
340
|
+
amount: number;
|
|
288
341
|
/**
|
|
289
342
|
* Month
|
|
290
343
|
*/
|
|
@@ -305,10 +358,6 @@ export type RevenueRow = {
|
|
|
305
358
|
* One booked revenue value.
|
|
306
359
|
*/
|
|
307
360
|
export type RevenueRowOutput = {
|
|
308
|
-
/**
|
|
309
|
-
* User Defined Id
|
|
310
|
-
*/
|
|
311
|
-
user_defined_id: string;
|
|
312
361
|
/**
|
|
313
362
|
* Metric Name
|
|
314
363
|
*/
|
|
@@ -320,11 +369,15 @@ export type RevenueRowOutput = {
|
|
|
320
369
|
/**
|
|
321
370
|
* Amount
|
|
322
371
|
*/
|
|
323
|
-
amount:
|
|
372
|
+
amount: number;
|
|
324
373
|
/**
|
|
325
374
|
* Source
|
|
326
375
|
*/
|
|
327
376
|
source: string;
|
|
377
|
+
/**
|
|
378
|
+
* Revenue Id
|
|
379
|
+
*/
|
|
380
|
+
revenue_id: string;
|
|
328
381
|
/**
|
|
329
382
|
* Customer Name
|
|
330
383
|
*/
|
|
@@ -354,7 +407,7 @@ export type SetCustomerTagsInput = {
|
|
|
354
407
|
*
|
|
355
408
|
* The key-metric values posted to the public API. A user may have
|
|
356
409
|
* several lines of the same metric in the same month; rows are only ever
|
|
357
|
-
* matched against each other by
|
|
410
|
+
* matched against each other by metric_id, never by (user, metric,
|
|
358
411
|
* month).
|
|
359
412
|
*/
|
|
360
413
|
export type SetKeyMetricsInput = {
|
|
@@ -365,7 +418,7 @@ export type SetKeyMetricsInput = {
|
|
|
365
418
|
/**
|
|
366
419
|
* Upsert
|
|
367
420
|
*
|
|
368
|
-
* If a row's
|
|
421
|
+
* If a row's metric_id already exists, overwrite it instead of rejecting the request.
|
|
369
422
|
*/
|
|
370
423
|
upsert?: boolean;
|
|
371
424
|
};
|
|
@@ -375,7 +428,7 @@ export type SetKeyMetricsInput = {
|
|
|
375
428
|
*
|
|
376
429
|
* The revenue values posted to the public API. A customer may have several
|
|
377
430
|
* revenue lines in the same month (e.g. one per product or contract); rows
|
|
378
|
-
* are only ever matched against each other by
|
|
431
|
+
* are only ever matched against each other by revenue_id, never by
|
|
379
432
|
* (customer, month).
|
|
380
433
|
*/
|
|
381
434
|
export type SetRevenueInput = {
|
|
@@ -386,7 +439,7 @@ export type SetRevenueInput = {
|
|
|
386
439
|
/**
|
|
387
440
|
* Upsert
|
|
388
441
|
*
|
|
389
|
-
* If a row's
|
|
442
|
+
* If a row's revenue_id already exists, overwrite it instead of rejecting the request.
|
|
390
443
|
*/
|
|
391
444
|
upsert?: boolean;
|
|
392
445
|
};
|
|
@@ -407,45 +460,78 @@ export type TagsDeletedOutput = {
|
|
|
407
460
|
tags_deleted: number;
|
|
408
461
|
};
|
|
409
462
|
|
|
410
|
-
export type
|
|
463
|
+
export type GetMarginData = {
|
|
411
464
|
body?: never;
|
|
412
465
|
path?: never;
|
|
413
466
|
query?: {
|
|
467
|
+
/**
|
|
468
|
+
* Return only these customers' margin. Omit to return every customer's.
|
|
469
|
+
*/
|
|
470
|
+
customer_names?: Array<string>;
|
|
414
471
|
/**
|
|
415
472
|
* Opaque cursor from a previous page's next_cursor.
|
|
416
473
|
*/
|
|
417
474
|
cursor?: string;
|
|
418
475
|
limit?: number;
|
|
476
|
+
/**
|
|
477
|
+
* Start of the period (inclusive), YYYY-MM-DD. Defaults to 30 days ago.
|
|
478
|
+
*/
|
|
479
|
+
date_from?: string;
|
|
480
|
+
/**
|
|
481
|
+
* End of the period (inclusive), YYYY-MM-DD. Defaults to today.
|
|
482
|
+
*/
|
|
483
|
+
date_to?: string;
|
|
484
|
+
/**
|
|
485
|
+
* Apply free-credit discounts to cost. Defaults to false.
|
|
486
|
+
*/
|
|
487
|
+
apply_credits?: boolean;
|
|
419
488
|
};
|
|
420
|
-
url: '/
|
|
489
|
+
url: '/margin/';
|
|
421
490
|
};
|
|
422
491
|
|
|
423
|
-
export type
|
|
492
|
+
export type GetMarginErrors = {
|
|
493
|
+
/**
|
|
494
|
+
* Invalid request for this project type.
|
|
495
|
+
*/
|
|
496
|
+
400: ApiErrorOutput;
|
|
424
497
|
/**
|
|
425
498
|
* Missing or invalid API key.
|
|
426
499
|
*/
|
|
427
500
|
401: ApiErrorOutput;
|
|
428
501
|
};
|
|
429
502
|
|
|
430
|
-
export type
|
|
503
|
+
export type GetMarginError = GetMarginErrors[keyof GetMarginErrors];
|
|
431
504
|
|
|
432
|
-
export type
|
|
505
|
+
export type GetMarginResponses = {
|
|
433
506
|
/**
|
|
434
507
|
* Success.
|
|
435
508
|
*/
|
|
436
|
-
200:
|
|
509
|
+
200: MarginListOutput;
|
|
437
510
|
};
|
|
438
511
|
|
|
439
|
-
export type
|
|
512
|
+
export type GetMarginResponse = GetMarginResponses[keyof GetMarginResponses];
|
|
440
513
|
|
|
441
|
-
export type
|
|
442
|
-
body
|
|
514
|
+
export type DeleteRevenueData = {
|
|
515
|
+
body?: never;
|
|
443
516
|
path?: never;
|
|
444
|
-
query
|
|
517
|
+
query: {
|
|
518
|
+
/**
|
|
519
|
+
* Delete these customers' API-booked revenue (repeat the param for several).
|
|
520
|
+
*/
|
|
521
|
+
customer_names: Array<string>;
|
|
522
|
+
/**
|
|
523
|
+
* First month to delete (inclusive). Omit both bounds to delete every matching API-booked value.
|
|
524
|
+
*/
|
|
525
|
+
month_start?: string;
|
|
526
|
+
/**
|
|
527
|
+
* Last month to delete (inclusive).
|
|
528
|
+
*/
|
|
529
|
+
month_end?: string;
|
|
530
|
+
};
|
|
445
531
|
url: '/revenue/';
|
|
446
532
|
};
|
|
447
533
|
|
|
448
|
-
export type
|
|
534
|
+
export type DeleteRevenueErrors = {
|
|
449
535
|
/**
|
|
450
536
|
* Missing or invalid API key.
|
|
451
537
|
*/
|
|
@@ -456,36 +542,60 @@ export type SetRevenueErrors = {
|
|
|
456
542
|
422: InvalidPayloadOutput;
|
|
457
543
|
};
|
|
458
544
|
|
|
459
|
-
export type
|
|
545
|
+
export type DeleteRevenueError = DeleteRevenueErrors[keyof DeleteRevenueErrors];
|
|
460
546
|
|
|
461
|
-
export type
|
|
547
|
+
export type DeleteRevenueResponses = {
|
|
462
548
|
/**
|
|
463
549
|
* Success.
|
|
464
550
|
*/
|
|
465
|
-
200:
|
|
551
|
+
200: RevenueOrKeyMetricDeletedRowOutput;
|
|
466
552
|
};
|
|
467
553
|
|
|
468
|
-
export type
|
|
554
|
+
export type DeleteRevenueResponse = DeleteRevenueResponses[keyof DeleteRevenueResponses];
|
|
469
555
|
|
|
470
|
-
export type
|
|
556
|
+
export type GetRevenueData = {
|
|
471
557
|
body?: never;
|
|
472
|
-
path
|
|
473
|
-
customer_name: string;
|
|
474
|
-
};
|
|
558
|
+
path?: never;
|
|
475
559
|
query?: {
|
|
476
560
|
/**
|
|
477
|
-
*
|
|
561
|
+
* Return only these customers' revenue. Omit to return every customer's.
|
|
478
562
|
*/
|
|
479
|
-
|
|
563
|
+
customer_names?: Array<string>;
|
|
480
564
|
/**
|
|
481
|
-
*
|
|
565
|
+
* Opaque cursor from a previous page's next_cursor.
|
|
482
566
|
*/
|
|
483
|
-
|
|
567
|
+
cursor?: string;
|
|
568
|
+
limit?: number;
|
|
484
569
|
};
|
|
485
|
-
url: '/revenue/
|
|
570
|
+
url: '/revenue/';
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
export type GetRevenueErrors = {
|
|
574
|
+
/**
|
|
575
|
+
* Missing or invalid API key.
|
|
576
|
+
*/
|
|
577
|
+
401: ApiErrorOutput;
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
export type GetRevenueError = GetRevenueErrors[keyof GetRevenueErrors];
|
|
581
|
+
|
|
582
|
+
export type GetRevenueResponses = {
|
|
583
|
+
/**
|
|
584
|
+
* Success.
|
|
585
|
+
*/
|
|
586
|
+
200: RevenueOutput;
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
export type GetRevenueResponse = GetRevenueResponses[keyof GetRevenueResponses];
|
|
590
|
+
|
|
591
|
+
export type SetRevenueData = {
|
|
592
|
+
body: SetRevenueInput;
|
|
593
|
+
path?: never;
|
|
594
|
+
query?: never;
|
|
595
|
+
url: '/revenue/';
|
|
486
596
|
};
|
|
487
597
|
|
|
488
|
-
export type
|
|
598
|
+
export type SetRevenueErrors = {
|
|
489
599
|
/**
|
|
490
600
|
* Missing or invalid API key.
|
|
491
601
|
*/
|
|
@@ -496,52 +606,67 @@ export type DeleteCustomerRevenueErrors = {
|
|
|
496
606
|
422: InvalidPayloadOutput;
|
|
497
607
|
};
|
|
498
608
|
|
|
499
|
-
export type
|
|
609
|
+
export type SetRevenueError = SetRevenueErrors[keyof SetRevenueErrors];
|
|
500
610
|
|
|
501
|
-
export type
|
|
611
|
+
export type SetRevenueResponses = {
|
|
502
612
|
/**
|
|
503
613
|
* Success.
|
|
504
614
|
*/
|
|
505
|
-
200:
|
|
615
|
+
200: RevenueOrKeyMetricImportedRowOutput;
|
|
506
616
|
};
|
|
507
617
|
|
|
508
|
-
export type
|
|
618
|
+
export type SetRevenueResponse = SetRevenueResponses[keyof SetRevenueResponses];
|
|
509
619
|
|
|
510
|
-
export type
|
|
620
|
+
export type DeleteKeyMetricsData = {
|
|
511
621
|
body?: never;
|
|
512
|
-
path
|
|
513
|
-
|
|
622
|
+
path?: never;
|
|
623
|
+
query: {
|
|
624
|
+
/**
|
|
625
|
+
* Delete these users' API-booked key metrics (repeat the param for several).
|
|
626
|
+
*/
|
|
627
|
+
user_names: Array<string>;
|
|
628
|
+
/**
|
|
629
|
+
* First month to delete (inclusive). Omit both bounds to delete every matching API-booked value.
|
|
630
|
+
*/
|
|
631
|
+
month_start?: string;
|
|
632
|
+
/**
|
|
633
|
+
* Last month to delete (inclusive).
|
|
634
|
+
*/
|
|
635
|
+
month_end?: string;
|
|
514
636
|
};
|
|
515
|
-
|
|
516
|
-
url: '/revenue/{customer_name}/';
|
|
637
|
+
url: '/key-metrics/';
|
|
517
638
|
};
|
|
518
639
|
|
|
519
|
-
export type
|
|
640
|
+
export type DeleteKeyMetricsErrors = {
|
|
520
641
|
/**
|
|
521
642
|
* Missing or invalid API key.
|
|
522
643
|
*/
|
|
523
644
|
401: ApiErrorOutput;
|
|
524
645
|
/**
|
|
525
|
-
*
|
|
646
|
+
* Invalid payload: every offending field is listed and nothing was written.
|
|
526
647
|
*/
|
|
527
|
-
|
|
648
|
+
422: InvalidPayloadOutput;
|
|
528
649
|
};
|
|
529
650
|
|
|
530
|
-
export type
|
|
651
|
+
export type DeleteKeyMetricsError = DeleteKeyMetricsErrors[keyof DeleteKeyMetricsErrors];
|
|
531
652
|
|
|
532
|
-
export type
|
|
653
|
+
export type DeleteKeyMetricsResponses = {
|
|
533
654
|
/**
|
|
534
655
|
* Success.
|
|
535
656
|
*/
|
|
536
|
-
200:
|
|
657
|
+
200: RevenueOrKeyMetricDeletedRowOutput;
|
|
537
658
|
};
|
|
538
659
|
|
|
539
|
-
export type
|
|
660
|
+
export type DeleteKeyMetricsResponse = DeleteKeyMetricsResponses[keyof DeleteKeyMetricsResponses];
|
|
540
661
|
|
|
541
|
-
export type
|
|
662
|
+
export type GetKeyMetricsData = {
|
|
542
663
|
body?: never;
|
|
543
664
|
path?: never;
|
|
544
665
|
query?: {
|
|
666
|
+
/**
|
|
667
|
+
* Return only these users' key metrics. Omit to return every user's.
|
|
668
|
+
*/
|
|
669
|
+
user_names?: Array<string>;
|
|
545
670
|
/**
|
|
546
671
|
* Opaque cursor from a previous page's next_cursor.
|
|
547
672
|
*/
|
|
@@ -551,23 +676,23 @@ export type GetAllKeyMetricsData = {
|
|
|
551
676
|
url: '/key-metrics/';
|
|
552
677
|
};
|
|
553
678
|
|
|
554
|
-
export type
|
|
679
|
+
export type GetKeyMetricsErrors = {
|
|
555
680
|
/**
|
|
556
681
|
* Missing or invalid API key.
|
|
557
682
|
*/
|
|
558
683
|
401: ApiErrorOutput;
|
|
559
684
|
};
|
|
560
685
|
|
|
561
|
-
export type
|
|
686
|
+
export type GetKeyMetricsError = GetKeyMetricsErrors[keyof GetKeyMetricsErrors];
|
|
562
687
|
|
|
563
|
-
export type
|
|
688
|
+
export type GetKeyMetricsResponses = {
|
|
564
689
|
/**
|
|
565
690
|
* Success.
|
|
566
691
|
*/
|
|
567
692
|
200: KeyMetricOutput;
|
|
568
693
|
};
|
|
569
694
|
|
|
570
|
-
export type
|
|
695
|
+
export type GetKeyMetricsResponse = GetKeyMetricsResponses[keyof GetKeyMetricsResponses];
|
|
571
696
|
|
|
572
697
|
export type SetKeyMetricsData = {
|
|
573
698
|
body: SetKeyMetricsInput;
|
|
@@ -598,25 +723,19 @@ export type SetKeyMetricsResponses = {
|
|
|
598
723
|
|
|
599
724
|
export type SetKeyMetricsResponse = SetKeyMetricsResponses[keyof SetKeyMetricsResponses];
|
|
600
725
|
|
|
601
|
-
export type
|
|
726
|
+
export type DeleteCustomersTagsData = {
|
|
602
727
|
body?: never;
|
|
603
|
-
path
|
|
604
|
-
|
|
605
|
-
};
|
|
606
|
-
query?: {
|
|
607
|
-
/**
|
|
608
|
-
* First month to delete (inclusive). Omit both bounds to delete every matching API-booked value.
|
|
609
|
-
*/
|
|
610
|
-
month_start?: string;
|
|
728
|
+
path?: never;
|
|
729
|
+
query: {
|
|
611
730
|
/**
|
|
612
|
-
*
|
|
731
|
+
* Delete every tag of these customers.
|
|
613
732
|
*/
|
|
614
|
-
|
|
733
|
+
customer_names: Array<string>;
|
|
615
734
|
};
|
|
616
|
-
url: '/
|
|
735
|
+
url: '/customer-tags/';
|
|
617
736
|
};
|
|
618
737
|
|
|
619
|
-
export type
|
|
738
|
+
export type DeleteCustomersTagsErrors = {
|
|
620
739
|
/**
|
|
621
740
|
* Missing or invalid API key.
|
|
622
741
|
*/
|
|
@@ -627,52 +746,25 @@ export type DeleteUserKeyMetricsErrors = {
|
|
|
627
746
|
422: InvalidPayloadOutput;
|
|
628
747
|
};
|
|
629
748
|
|
|
630
|
-
export type
|
|
631
|
-
|
|
632
|
-
export type DeleteUserKeyMetricsResponses = {
|
|
633
|
-
/**
|
|
634
|
-
* Success.
|
|
635
|
-
*/
|
|
636
|
-
200: RevenueOrKeyMetricDeletedRowOutput;
|
|
637
|
-
};
|
|
638
|
-
|
|
639
|
-
export type DeleteUserKeyMetricsResponse = DeleteUserKeyMetricsResponses[keyof DeleteUserKeyMetricsResponses];
|
|
640
|
-
|
|
641
|
-
export type GetUserKeyMetricsData = {
|
|
642
|
-
body?: never;
|
|
643
|
-
path: {
|
|
644
|
-
user_name: string;
|
|
645
|
-
};
|
|
646
|
-
query?: never;
|
|
647
|
-
url: '/key-metrics/{user_name}/';
|
|
648
|
-
};
|
|
649
|
-
|
|
650
|
-
export type GetUserKeyMetricsErrors = {
|
|
651
|
-
/**
|
|
652
|
-
* Missing or invalid API key.
|
|
653
|
-
*/
|
|
654
|
-
401: ApiErrorOutput;
|
|
655
|
-
/**
|
|
656
|
-
* Nothing exists for this customer.
|
|
657
|
-
*/
|
|
658
|
-
404: ApiErrorOutput;
|
|
659
|
-
};
|
|
660
|
-
|
|
661
|
-
export type GetUserKeyMetricsError = GetUserKeyMetricsErrors[keyof GetUserKeyMetricsErrors];
|
|
749
|
+
export type DeleteCustomersTagsError = DeleteCustomersTagsErrors[keyof DeleteCustomersTagsErrors];
|
|
662
750
|
|
|
663
|
-
export type
|
|
751
|
+
export type DeleteCustomersTagsResponses = {
|
|
664
752
|
/**
|
|
665
753
|
* Success.
|
|
666
754
|
*/
|
|
667
|
-
200:
|
|
755
|
+
200: TagsDeletedOutput;
|
|
668
756
|
};
|
|
669
757
|
|
|
670
|
-
export type
|
|
758
|
+
export type DeleteCustomersTagsResponse = DeleteCustomersTagsResponses[keyof DeleteCustomersTagsResponses];
|
|
671
759
|
|
|
672
|
-
export type
|
|
760
|
+
export type GetCustomersTagsData = {
|
|
673
761
|
body?: never;
|
|
674
762
|
path?: never;
|
|
675
763
|
query?: {
|
|
764
|
+
/**
|
|
765
|
+
* Return only these customers' tags. Omit to return every customer's.
|
|
766
|
+
*/
|
|
767
|
+
customer_names?: Array<string>;
|
|
676
768
|
/**
|
|
677
769
|
* Opaque cursor from a previous page's next_cursor.
|
|
678
770
|
*/
|
|
@@ -682,23 +774,23 @@ export type GetAllCustomersTagsData = {
|
|
|
682
774
|
url: '/customer-tags/';
|
|
683
775
|
};
|
|
684
776
|
|
|
685
|
-
export type
|
|
777
|
+
export type GetCustomersTagsErrors = {
|
|
686
778
|
/**
|
|
687
779
|
* Missing or invalid API key.
|
|
688
780
|
*/
|
|
689
781
|
401: ApiErrorOutput;
|
|
690
782
|
};
|
|
691
783
|
|
|
692
|
-
export type
|
|
784
|
+
export type GetCustomersTagsError = GetCustomersTagsErrors[keyof GetCustomersTagsErrors];
|
|
693
785
|
|
|
694
|
-
export type
|
|
786
|
+
export type GetCustomersTagsResponses = {
|
|
695
787
|
/**
|
|
696
788
|
* Success.
|
|
697
789
|
*/
|
|
698
790
|
200: AllCustomerTagsOutput;
|
|
699
791
|
};
|
|
700
792
|
|
|
701
|
-
export type
|
|
793
|
+
export type GetCustomersTagsResponse = GetCustomersTagsResponses[keyof GetCustomersTagsResponses];
|
|
702
794
|
|
|
703
795
|
export type SetCustomersTagsData = {
|
|
704
796
|
body: SetCustomerTagsInput;
|
|
@@ -728,65 +820,3 @@ export type SetCustomersTagsResponses = {
|
|
|
728
820
|
};
|
|
729
821
|
|
|
730
822
|
export type SetCustomersTagsResponse = SetCustomersTagsResponses[keyof SetCustomersTagsResponses];
|
|
731
|
-
|
|
732
|
-
export type DeleteCustomerTagsData = {
|
|
733
|
-
body?: never;
|
|
734
|
-
path: {
|
|
735
|
-
customer_name: string;
|
|
736
|
-
};
|
|
737
|
-
query?: never;
|
|
738
|
-
url: '/customer-tags/{customer_name}/';
|
|
739
|
-
};
|
|
740
|
-
|
|
741
|
-
export type DeleteCustomerTagsErrors = {
|
|
742
|
-
/**
|
|
743
|
-
* Missing or invalid API key.
|
|
744
|
-
*/
|
|
745
|
-
401: ApiErrorOutput;
|
|
746
|
-
/**
|
|
747
|
-
* Nothing exists for this customer.
|
|
748
|
-
*/
|
|
749
|
-
404: ApiErrorOutput;
|
|
750
|
-
};
|
|
751
|
-
|
|
752
|
-
export type DeleteCustomerTagsError = DeleteCustomerTagsErrors[keyof DeleteCustomerTagsErrors];
|
|
753
|
-
|
|
754
|
-
export type DeleteCustomerTagsResponses = {
|
|
755
|
-
/**
|
|
756
|
-
* Success.
|
|
757
|
-
*/
|
|
758
|
-
200: TagsDeletedOutput;
|
|
759
|
-
};
|
|
760
|
-
|
|
761
|
-
export type DeleteCustomerTagsResponse = DeleteCustomerTagsResponses[keyof DeleteCustomerTagsResponses];
|
|
762
|
-
|
|
763
|
-
export type GetCustomerTagsData = {
|
|
764
|
-
body?: never;
|
|
765
|
-
path: {
|
|
766
|
-
customer_name: string;
|
|
767
|
-
};
|
|
768
|
-
query?: never;
|
|
769
|
-
url: '/customer-tags/{customer_name}/';
|
|
770
|
-
};
|
|
771
|
-
|
|
772
|
-
export type GetCustomerTagsErrors = {
|
|
773
|
-
/**
|
|
774
|
-
* Missing or invalid API key.
|
|
775
|
-
*/
|
|
776
|
-
401: ApiErrorOutput;
|
|
777
|
-
/**
|
|
778
|
-
* Nothing exists for this customer.
|
|
779
|
-
*/
|
|
780
|
-
404: ApiErrorOutput;
|
|
781
|
-
};
|
|
782
|
-
|
|
783
|
-
export type GetCustomerTagsError = GetCustomerTagsErrors[keyof GetCustomerTagsErrors];
|
|
784
|
-
|
|
785
|
-
export type GetCustomerTagsResponses = {
|
|
786
|
-
/**
|
|
787
|
-
* Success.
|
|
788
|
-
*/
|
|
789
|
-
200: CustomerTagsOutput;
|
|
790
|
-
};
|
|
791
|
-
|
|
792
|
-
export type GetCustomerTagsResponse = GetCustomerTagsResponses[keyof GetCustomerTagsResponses];
|
package/src/api/index.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* const weflayr = require('weflayr');
|
|
13
13
|
*
|
|
14
14
|
* const apiClient = weflayr.client({ apiKey: 'wf-...' });
|
|
15
|
-
* const { data } = await weflayr.api.
|
|
15
|
+
* const { data } = await weflayr.api.getRevenue({ client: apiClient, throwOnError: true });
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { type Client, createClient, createConfig } from './generated/client';
|