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
|
@@ -31,6 +31,37 @@ export type ApiErrorOutput = {
|
|
|
31
31
|
*/
|
|
32
32
|
error: string;
|
|
33
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* CustomerMarginRow
|
|
36
|
+
*
|
|
37
|
+
* One customer's gross margin for a period.
|
|
38
|
+
*/
|
|
39
|
+
export type CustomerMarginRow = {
|
|
40
|
+
/**
|
|
41
|
+
* Customer Name
|
|
42
|
+
*/
|
|
43
|
+
customer_name: string;
|
|
44
|
+
/**
|
|
45
|
+
* Revenue
|
|
46
|
+
*/
|
|
47
|
+
revenue: number;
|
|
48
|
+
/**
|
|
49
|
+
* Cost
|
|
50
|
+
*/
|
|
51
|
+
cost: number;
|
|
52
|
+
/**
|
|
53
|
+
* Margin
|
|
54
|
+
*/
|
|
55
|
+
margin: number;
|
|
56
|
+
/**
|
|
57
|
+
* Margin Pct
|
|
58
|
+
*/
|
|
59
|
+
margin_pct: number | null;
|
|
60
|
+
/**
|
|
61
|
+
* Profitability Status
|
|
62
|
+
*/
|
|
63
|
+
profitability_status: 'healthy' | 'watch' | 'at_risk' | 'unprofitable' | 'unknown';
|
|
64
|
+
};
|
|
34
65
|
/**
|
|
35
66
|
* CustomerTags
|
|
36
67
|
*
|
|
@@ -138,11 +169,11 @@ export type KeyMetricOutput = {
|
|
|
138
169
|
*/
|
|
139
170
|
export type KeyMetricRow = {
|
|
140
171
|
/**
|
|
141
|
-
*
|
|
172
|
+
* Metric Id
|
|
142
173
|
*
|
|
143
174
|
* 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).
|
|
144
175
|
*/
|
|
145
|
-
|
|
176
|
+
metric_id?: string | null;
|
|
146
177
|
/**
|
|
147
178
|
* User Name
|
|
148
179
|
*/
|
|
@@ -154,7 +185,7 @@ export type KeyMetricRow = {
|
|
|
154
185
|
/**
|
|
155
186
|
* Amount
|
|
156
187
|
*/
|
|
157
|
-
amount: number
|
|
188
|
+
amount: number;
|
|
158
189
|
/**
|
|
159
190
|
* Month
|
|
160
191
|
*/
|
|
@@ -174,10 +205,6 @@ export type KeyMetricRow = {
|
|
|
174
205
|
* One booked key-metric value.
|
|
175
206
|
*/
|
|
176
207
|
export type KeyMetricRowOutput = {
|
|
177
|
-
/**
|
|
178
|
-
* User Defined Id
|
|
179
|
-
*/
|
|
180
|
-
user_defined_id: string;
|
|
181
208
|
/**
|
|
182
209
|
* Metric Name
|
|
183
210
|
*/
|
|
@@ -189,16 +216,40 @@ export type KeyMetricRowOutput = {
|
|
|
189
216
|
/**
|
|
190
217
|
* Amount
|
|
191
218
|
*/
|
|
192
|
-
amount:
|
|
219
|
+
amount: number;
|
|
193
220
|
/**
|
|
194
221
|
* Source
|
|
195
222
|
*/
|
|
196
223
|
source: string;
|
|
224
|
+
/**
|
|
225
|
+
* Metric Id
|
|
226
|
+
*/
|
|
227
|
+
metric_id: string;
|
|
197
228
|
/**
|
|
198
229
|
* User Name
|
|
199
230
|
*/
|
|
200
231
|
user_name: string;
|
|
201
232
|
};
|
|
233
|
+
/**
|
|
234
|
+
* MarginListOutput
|
|
235
|
+
*
|
|
236
|
+
* Margin GET response: one row per customer with booked revenue, sorted by
|
|
237
|
+
* customer_name ascending.
|
|
238
|
+
*/
|
|
239
|
+
export type MarginListOutput = {
|
|
240
|
+
/**
|
|
241
|
+
* Rows
|
|
242
|
+
*/
|
|
243
|
+
rows: Array<CustomerMarginRow>;
|
|
244
|
+
/**
|
|
245
|
+
* Next Cursor
|
|
246
|
+
*/
|
|
247
|
+
next_cursor: string | null;
|
|
248
|
+
/**
|
|
249
|
+
* Has More
|
|
250
|
+
*/
|
|
251
|
+
has_more: boolean;
|
|
252
|
+
};
|
|
202
253
|
/**
|
|
203
254
|
* RevenueOrKeyMetricDeletedRowOutput
|
|
204
255
|
*
|
|
@@ -256,11 +307,11 @@ export type RevenueOutput = {
|
|
|
256
307
|
*/
|
|
257
308
|
export type RevenueRow = {
|
|
258
309
|
/**
|
|
259
|
-
*
|
|
310
|
+
* Revenue Id
|
|
260
311
|
*
|
|
261
312
|
* 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).
|
|
262
313
|
*/
|
|
263
|
-
|
|
314
|
+
revenue_id?: string | null;
|
|
264
315
|
/**
|
|
265
316
|
* Customer Name
|
|
266
317
|
*/
|
|
@@ -268,7 +319,7 @@ export type RevenueRow = {
|
|
|
268
319
|
/**
|
|
269
320
|
* Amount
|
|
270
321
|
*/
|
|
271
|
-
amount: number
|
|
322
|
+
amount: number;
|
|
272
323
|
/**
|
|
273
324
|
* Month
|
|
274
325
|
*/
|
|
@@ -288,10 +339,6 @@ export type RevenueRow = {
|
|
|
288
339
|
* One booked revenue value.
|
|
289
340
|
*/
|
|
290
341
|
export type RevenueRowOutput = {
|
|
291
|
-
/**
|
|
292
|
-
* User Defined Id
|
|
293
|
-
*/
|
|
294
|
-
user_defined_id: string;
|
|
295
342
|
/**
|
|
296
343
|
* Metric Name
|
|
297
344
|
*/
|
|
@@ -303,11 +350,15 @@ export type RevenueRowOutput = {
|
|
|
303
350
|
/**
|
|
304
351
|
* Amount
|
|
305
352
|
*/
|
|
306
|
-
amount:
|
|
353
|
+
amount: number;
|
|
307
354
|
/**
|
|
308
355
|
* Source
|
|
309
356
|
*/
|
|
310
357
|
source: string;
|
|
358
|
+
/**
|
|
359
|
+
* Revenue Id
|
|
360
|
+
*/
|
|
361
|
+
revenue_id: string;
|
|
311
362
|
/**
|
|
312
363
|
* Customer Name
|
|
313
364
|
*/
|
|
@@ -335,7 +386,7 @@ export type SetCustomerTagsInput = {
|
|
|
335
386
|
*
|
|
336
387
|
* The key-metric values posted to the public API. A user may have
|
|
337
388
|
* several lines of the same metric in the same month; rows are only ever
|
|
338
|
-
* matched against each other by
|
|
389
|
+
* matched against each other by metric_id, never by (user, metric,
|
|
339
390
|
* month).
|
|
340
391
|
*/
|
|
341
392
|
export type SetKeyMetricsInput = {
|
|
@@ -346,7 +397,7 @@ export type SetKeyMetricsInput = {
|
|
|
346
397
|
/**
|
|
347
398
|
* Upsert
|
|
348
399
|
*
|
|
349
|
-
* If a row's
|
|
400
|
+
* If a row's metric_id already exists, overwrite it instead of rejecting the request.
|
|
350
401
|
*/
|
|
351
402
|
upsert?: boolean;
|
|
352
403
|
};
|
|
@@ -355,7 +406,7 @@ export type SetKeyMetricsInput = {
|
|
|
355
406
|
*
|
|
356
407
|
* The revenue values posted to the public API. A customer may have several
|
|
357
408
|
* revenue lines in the same month (e.g. one per product or contract); rows
|
|
358
|
-
* are only ever matched against each other by
|
|
409
|
+
* are only ever matched against each other by revenue_id, never by
|
|
359
410
|
* (customer, month).
|
|
360
411
|
*/
|
|
361
412
|
export type SetRevenueInput = {
|
|
@@ -366,7 +417,7 @@ export type SetRevenueInput = {
|
|
|
366
417
|
/**
|
|
367
418
|
* Upsert
|
|
368
419
|
*
|
|
369
|
-
* If a row's
|
|
420
|
+
* If a row's revenue_id already exists, overwrite it instead of rejecting the request.
|
|
370
421
|
*/
|
|
371
422
|
upsert?: boolean;
|
|
372
423
|
};
|
|
@@ -385,39 +436,72 @@ export type TagsDeletedOutput = {
|
|
|
385
436
|
*/
|
|
386
437
|
tags_deleted: number;
|
|
387
438
|
};
|
|
388
|
-
export type
|
|
439
|
+
export type GetMarginData = {
|
|
389
440
|
body?: never;
|
|
390
441
|
path?: never;
|
|
391
442
|
query?: {
|
|
443
|
+
/**
|
|
444
|
+
* Return only these customers' margin. Omit to return every customer's.
|
|
445
|
+
*/
|
|
446
|
+
customer_names?: Array<string>;
|
|
392
447
|
/**
|
|
393
448
|
* Opaque cursor from a previous page's next_cursor.
|
|
394
449
|
*/
|
|
395
450
|
cursor?: string;
|
|
396
451
|
limit?: number;
|
|
452
|
+
/**
|
|
453
|
+
* Start of the period (inclusive), YYYY-MM-DD. Defaults to 30 days ago.
|
|
454
|
+
*/
|
|
455
|
+
date_from?: string;
|
|
456
|
+
/**
|
|
457
|
+
* End of the period (inclusive), YYYY-MM-DD. Defaults to today.
|
|
458
|
+
*/
|
|
459
|
+
date_to?: string;
|
|
460
|
+
/**
|
|
461
|
+
* Apply free-credit discounts to cost. Defaults to false.
|
|
462
|
+
*/
|
|
463
|
+
apply_credits?: boolean;
|
|
397
464
|
};
|
|
398
|
-
url: '/
|
|
465
|
+
url: '/margin/';
|
|
399
466
|
};
|
|
400
|
-
export type
|
|
467
|
+
export type GetMarginErrors = {
|
|
468
|
+
/**
|
|
469
|
+
* Invalid request for this project type.
|
|
470
|
+
*/
|
|
471
|
+
400: ApiErrorOutput;
|
|
401
472
|
/**
|
|
402
473
|
* Missing or invalid API key.
|
|
403
474
|
*/
|
|
404
475
|
401: ApiErrorOutput;
|
|
405
476
|
};
|
|
406
|
-
export type
|
|
407
|
-
export type
|
|
477
|
+
export type GetMarginError = GetMarginErrors[keyof GetMarginErrors];
|
|
478
|
+
export type GetMarginResponses = {
|
|
408
479
|
/**
|
|
409
480
|
* Success.
|
|
410
481
|
*/
|
|
411
|
-
200:
|
|
482
|
+
200: MarginListOutput;
|
|
412
483
|
};
|
|
413
|
-
export type
|
|
414
|
-
export type
|
|
415
|
-
body
|
|
484
|
+
export type GetMarginResponse = GetMarginResponses[keyof GetMarginResponses];
|
|
485
|
+
export type DeleteRevenueData = {
|
|
486
|
+
body?: never;
|
|
416
487
|
path?: never;
|
|
417
|
-
query
|
|
488
|
+
query: {
|
|
489
|
+
/**
|
|
490
|
+
* Delete these customers' API-booked revenue (repeat the param for several).
|
|
491
|
+
*/
|
|
492
|
+
customer_names: Array<string>;
|
|
493
|
+
/**
|
|
494
|
+
* First month to delete (inclusive). Omit both bounds to delete every matching API-booked value.
|
|
495
|
+
*/
|
|
496
|
+
month_start?: string;
|
|
497
|
+
/**
|
|
498
|
+
* Last month to delete (inclusive).
|
|
499
|
+
*/
|
|
500
|
+
month_end?: string;
|
|
501
|
+
};
|
|
418
502
|
url: '/revenue/';
|
|
419
503
|
};
|
|
420
|
-
export type
|
|
504
|
+
export type DeleteRevenueErrors = {
|
|
421
505
|
/**
|
|
422
506
|
* Missing or invalid API key.
|
|
423
507
|
*/
|
|
@@ -427,32 +511,51 @@ export type SetRevenueErrors = {
|
|
|
427
511
|
*/
|
|
428
512
|
422: InvalidPayloadOutput;
|
|
429
513
|
};
|
|
430
|
-
export type
|
|
431
|
-
export type
|
|
514
|
+
export type DeleteRevenueError = DeleteRevenueErrors[keyof DeleteRevenueErrors];
|
|
515
|
+
export type DeleteRevenueResponses = {
|
|
432
516
|
/**
|
|
433
517
|
* Success.
|
|
434
518
|
*/
|
|
435
|
-
200:
|
|
519
|
+
200: RevenueOrKeyMetricDeletedRowOutput;
|
|
436
520
|
};
|
|
437
|
-
export type
|
|
438
|
-
export type
|
|
521
|
+
export type DeleteRevenueResponse = DeleteRevenueResponses[keyof DeleteRevenueResponses];
|
|
522
|
+
export type GetRevenueData = {
|
|
439
523
|
body?: never;
|
|
440
|
-
path
|
|
441
|
-
customer_name: string;
|
|
442
|
-
};
|
|
524
|
+
path?: never;
|
|
443
525
|
query?: {
|
|
444
526
|
/**
|
|
445
|
-
*
|
|
527
|
+
* Return only these customers' revenue. Omit to return every customer's.
|
|
446
528
|
*/
|
|
447
|
-
|
|
529
|
+
customer_names?: Array<string>;
|
|
448
530
|
/**
|
|
449
|
-
*
|
|
531
|
+
* Opaque cursor from a previous page's next_cursor.
|
|
450
532
|
*/
|
|
451
|
-
|
|
533
|
+
cursor?: string;
|
|
534
|
+
limit?: number;
|
|
452
535
|
};
|
|
453
|
-
url: '/revenue/
|
|
536
|
+
url: '/revenue/';
|
|
537
|
+
};
|
|
538
|
+
export type GetRevenueErrors = {
|
|
539
|
+
/**
|
|
540
|
+
* Missing or invalid API key.
|
|
541
|
+
*/
|
|
542
|
+
401: ApiErrorOutput;
|
|
543
|
+
};
|
|
544
|
+
export type GetRevenueError = GetRevenueErrors[keyof GetRevenueErrors];
|
|
545
|
+
export type GetRevenueResponses = {
|
|
546
|
+
/**
|
|
547
|
+
* Success.
|
|
548
|
+
*/
|
|
549
|
+
200: RevenueOutput;
|
|
550
|
+
};
|
|
551
|
+
export type GetRevenueResponse = GetRevenueResponses[keyof GetRevenueResponses];
|
|
552
|
+
export type SetRevenueData = {
|
|
553
|
+
body: SetRevenueInput;
|
|
554
|
+
path?: never;
|
|
555
|
+
query?: never;
|
|
556
|
+
url: '/revenue/';
|
|
454
557
|
};
|
|
455
|
-
export type
|
|
558
|
+
export type SetRevenueErrors = {
|
|
456
559
|
/**
|
|
457
560
|
* Missing or invalid API key.
|
|
458
561
|
*/
|
|
@@ -462,44 +565,59 @@ export type DeleteCustomerRevenueErrors = {
|
|
|
462
565
|
*/
|
|
463
566
|
422: InvalidPayloadOutput;
|
|
464
567
|
};
|
|
465
|
-
export type
|
|
466
|
-
export type
|
|
568
|
+
export type SetRevenueError = SetRevenueErrors[keyof SetRevenueErrors];
|
|
569
|
+
export type SetRevenueResponses = {
|
|
467
570
|
/**
|
|
468
571
|
* Success.
|
|
469
572
|
*/
|
|
470
|
-
200:
|
|
573
|
+
200: RevenueOrKeyMetricImportedRowOutput;
|
|
471
574
|
};
|
|
472
|
-
export type
|
|
473
|
-
export type
|
|
575
|
+
export type SetRevenueResponse = SetRevenueResponses[keyof SetRevenueResponses];
|
|
576
|
+
export type DeleteKeyMetricsData = {
|
|
474
577
|
body?: never;
|
|
475
|
-
path
|
|
476
|
-
|
|
578
|
+
path?: never;
|
|
579
|
+
query: {
|
|
580
|
+
/**
|
|
581
|
+
* Delete these users' API-booked key metrics (repeat the param for several).
|
|
582
|
+
*/
|
|
583
|
+
user_names: Array<string>;
|
|
584
|
+
/**
|
|
585
|
+
* First month to delete (inclusive). Omit both bounds to delete every matching API-booked value.
|
|
586
|
+
*/
|
|
587
|
+
month_start?: string;
|
|
588
|
+
/**
|
|
589
|
+
* Last month to delete (inclusive).
|
|
590
|
+
*/
|
|
591
|
+
month_end?: string;
|
|
477
592
|
};
|
|
478
|
-
|
|
479
|
-
url: '/revenue/{customer_name}/';
|
|
593
|
+
url: '/key-metrics/';
|
|
480
594
|
};
|
|
481
|
-
export type
|
|
595
|
+
export type DeleteKeyMetricsErrors = {
|
|
482
596
|
/**
|
|
483
597
|
* Missing or invalid API key.
|
|
484
598
|
*/
|
|
485
599
|
401: ApiErrorOutput;
|
|
486
600
|
/**
|
|
487
|
-
*
|
|
601
|
+
* Invalid payload: every offending field is listed and nothing was written.
|
|
488
602
|
*/
|
|
489
|
-
|
|
603
|
+
422: InvalidPayloadOutput;
|
|
490
604
|
};
|
|
491
|
-
export type
|
|
492
|
-
export type
|
|
605
|
+
export type DeleteKeyMetricsError = DeleteKeyMetricsErrors[keyof DeleteKeyMetricsErrors];
|
|
606
|
+
export type DeleteKeyMetricsResponses = {
|
|
493
607
|
/**
|
|
494
608
|
* Success.
|
|
495
609
|
*/
|
|
496
|
-
200:
|
|
610
|
+
200: RevenueOrKeyMetricDeletedRowOutput;
|
|
497
611
|
};
|
|
498
|
-
export type
|
|
499
|
-
export type
|
|
612
|
+
export type DeleteKeyMetricsResponse = DeleteKeyMetricsResponses[keyof DeleteKeyMetricsResponses];
|
|
613
|
+
export type GetKeyMetricsData = {
|
|
500
614
|
body?: never;
|
|
501
615
|
path?: never;
|
|
502
616
|
query?: {
|
|
617
|
+
/**
|
|
618
|
+
* Return only these users' key metrics. Omit to return every user's.
|
|
619
|
+
*/
|
|
620
|
+
user_names?: Array<string>;
|
|
503
621
|
/**
|
|
504
622
|
* Opaque cursor from a previous page's next_cursor.
|
|
505
623
|
*/
|
|
@@ -508,20 +626,20 @@ export type GetAllKeyMetricsData = {
|
|
|
508
626
|
};
|
|
509
627
|
url: '/key-metrics/';
|
|
510
628
|
};
|
|
511
|
-
export type
|
|
629
|
+
export type GetKeyMetricsErrors = {
|
|
512
630
|
/**
|
|
513
631
|
* Missing or invalid API key.
|
|
514
632
|
*/
|
|
515
633
|
401: ApiErrorOutput;
|
|
516
634
|
};
|
|
517
|
-
export type
|
|
518
|
-
export type
|
|
635
|
+
export type GetKeyMetricsError = GetKeyMetricsErrors[keyof GetKeyMetricsErrors];
|
|
636
|
+
export type GetKeyMetricsResponses = {
|
|
519
637
|
/**
|
|
520
638
|
* Success.
|
|
521
639
|
*/
|
|
522
640
|
200: KeyMetricOutput;
|
|
523
641
|
};
|
|
524
|
-
export type
|
|
642
|
+
export type GetKeyMetricsResponse = GetKeyMetricsResponses[keyof GetKeyMetricsResponses];
|
|
525
643
|
export type SetKeyMetricsData = {
|
|
526
644
|
body: SetKeyMetricsInput;
|
|
527
645
|
path?: never;
|
|
@@ -546,24 +664,18 @@ export type SetKeyMetricsResponses = {
|
|
|
546
664
|
200: RevenueOrKeyMetricImportedRowOutput;
|
|
547
665
|
};
|
|
548
666
|
export type SetKeyMetricsResponse = SetKeyMetricsResponses[keyof SetKeyMetricsResponses];
|
|
549
|
-
export type
|
|
667
|
+
export type DeleteCustomersTagsData = {
|
|
550
668
|
body?: never;
|
|
551
|
-
path
|
|
552
|
-
|
|
553
|
-
};
|
|
554
|
-
query?: {
|
|
555
|
-
/**
|
|
556
|
-
* First month to delete (inclusive). Omit both bounds to delete every matching API-booked value.
|
|
557
|
-
*/
|
|
558
|
-
month_start?: string;
|
|
669
|
+
path?: never;
|
|
670
|
+
query: {
|
|
559
671
|
/**
|
|
560
|
-
*
|
|
672
|
+
* Delete every tag of these customers.
|
|
561
673
|
*/
|
|
562
|
-
|
|
674
|
+
customer_names: Array<string>;
|
|
563
675
|
};
|
|
564
|
-
url: '/
|
|
676
|
+
url: '/customer-tags/';
|
|
565
677
|
};
|
|
566
|
-
export type
|
|
678
|
+
export type DeleteCustomersTagsErrors = {
|
|
567
679
|
/**
|
|
568
680
|
* Missing or invalid API key.
|
|
569
681
|
*/
|
|
@@ -573,44 +685,22 @@ export type DeleteUserKeyMetricsErrors = {
|
|
|
573
685
|
*/
|
|
574
686
|
422: InvalidPayloadOutput;
|
|
575
687
|
};
|
|
576
|
-
export type
|
|
577
|
-
export type
|
|
688
|
+
export type DeleteCustomersTagsError = DeleteCustomersTagsErrors[keyof DeleteCustomersTagsErrors];
|
|
689
|
+
export type DeleteCustomersTagsResponses = {
|
|
578
690
|
/**
|
|
579
691
|
* Success.
|
|
580
692
|
*/
|
|
581
|
-
200:
|
|
582
|
-
};
|
|
583
|
-
export type DeleteUserKeyMetricsResponse = DeleteUserKeyMetricsResponses[keyof DeleteUserKeyMetricsResponses];
|
|
584
|
-
export type GetUserKeyMetricsData = {
|
|
585
|
-
body?: never;
|
|
586
|
-
path: {
|
|
587
|
-
user_name: string;
|
|
588
|
-
};
|
|
589
|
-
query?: never;
|
|
590
|
-
url: '/key-metrics/{user_name}/';
|
|
591
|
-
};
|
|
592
|
-
export type GetUserKeyMetricsErrors = {
|
|
593
|
-
/**
|
|
594
|
-
* Missing or invalid API key.
|
|
595
|
-
*/
|
|
596
|
-
401: ApiErrorOutput;
|
|
597
|
-
/**
|
|
598
|
-
* Nothing exists for this customer.
|
|
599
|
-
*/
|
|
600
|
-
404: ApiErrorOutput;
|
|
601
|
-
};
|
|
602
|
-
export type GetUserKeyMetricsError = GetUserKeyMetricsErrors[keyof GetUserKeyMetricsErrors];
|
|
603
|
-
export type GetUserKeyMetricsResponses = {
|
|
604
|
-
/**
|
|
605
|
-
* Success.
|
|
606
|
-
*/
|
|
607
|
-
200: KeyMetricOutput;
|
|
693
|
+
200: TagsDeletedOutput;
|
|
608
694
|
};
|
|
609
|
-
export type
|
|
610
|
-
export type
|
|
695
|
+
export type DeleteCustomersTagsResponse = DeleteCustomersTagsResponses[keyof DeleteCustomersTagsResponses];
|
|
696
|
+
export type GetCustomersTagsData = {
|
|
611
697
|
body?: never;
|
|
612
698
|
path?: never;
|
|
613
699
|
query?: {
|
|
700
|
+
/**
|
|
701
|
+
* Return only these customers' tags. Omit to return every customer's.
|
|
702
|
+
*/
|
|
703
|
+
customer_names?: Array<string>;
|
|
614
704
|
/**
|
|
615
705
|
* Opaque cursor from a previous page's next_cursor.
|
|
616
706
|
*/
|
|
@@ -619,20 +709,20 @@ export type GetAllCustomersTagsData = {
|
|
|
619
709
|
};
|
|
620
710
|
url: '/customer-tags/';
|
|
621
711
|
};
|
|
622
|
-
export type
|
|
712
|
+
export type GetCustomersTagsErrors = {
|
|
623
713
|
/**
|
|
624
714
|
* Missing or invalid API key.
|
|
625
715
|
*/
|
|
626
716
|
401: ApiErrorOutput;
|
|
627
717
|
};
|
|
628
|
-
export type
|
|
629
|
-
export type
|
|
718
|
+
export type GetCustomersTagsError = GetCustomersTagsErrors[keyof GetCustomersTagsErrors];
|
|
719
|
+
export type GetCustomersTagsResponses = {
|
|
630
720
|
/**
|
|
631
721
|
* Success.
|
|
632
722
|
*/
|
|
633
723
|
200: AllCustomerTagsOutput;
|
|
634
724
|
};
|
|
635
|
-
export type
|
|
725
|
+
export type GetCustomersTagsResponse = GetCustomersTagsResponses[keyof GetCustomersTagsResponses];
|
|
636
726
|
export type SetCustomersTagsData = {
|
|
637
727
|
body: SetCustomerTagsInput;
|
|
638
728
|
path?: never;
|
|
@@ -657,55 +747,3 @@ export type SetCustomersTagsResponses = {
|
|
|
657
747
|
200: CustomersUpdatedOutput;
|
|
658
748
|
};
|
|
659
749
|
export type SetCustomersTagsResponse = SetCustomersTagsResponses[keyof SetCustomersTagsResponses];
|
|
660
|
-
export type DeleteCustomerTagsData = {
|
|
661
|
-
body?: never;
|
|
662
|
-
path: {
|
|
663
|
-
customer_name: string;
|
|
664
|
-
};
|
|
665
|
-
query?: never;
|
|
666
|
-
url: '/customer-tags/{customer_name}/';
|
|
667
|
-
};
|
|
668
|
-
export type DeleteCustomerTagsErrors = {
|
|
669
|
-
/**
|
|
670
|
-
* Missing or invalid API key.
|
|
671
|
-
*/
|
|
672
|
-
401: ApiErrorOutput;
|
|
673
|
-
/**
|
|
674
|
-
* Nothing exists for this customer.
|
|
675
|
-
*/
|
|
676
|
-
404: ApiErrorOutput;
|
|
677
|
-
};
|
|
678
|
-
export type DeleteCustomerTagsError = DeleteCustomerTagsErrors[keyof DeleteCustomerTagsErrors];
|
|
679
|
-
export type DeleteCustomerTagsResponses = {
|
|
680
|
-
/**
|
|
681
|
-
* Success.
|
|
682
|
-
*/
|
|
683
|
-
200: TagsDeletedOutput;
|
|
684
|
-
};
|
|
685
|
-
export type DeleteCustomerTagsResponse = DeleteCustomerTagsResponses[keyof DeleteCustomerTagsResponses];
|
|
686
|
-
export type GetCustomerTagsData = {
|
|
687
|
-
body?: never;
|
|
688
|
-
path: {
|
|
689
|
-
customer_name: string;
|
|
690
|
-
};
|
|
691
|
-
query?: never;
|
|
692
|
-
url: '/customer-tags/{customer_name}/';
|
|
693
|
-
};
|
|
694
|
-
export type GetCustomerTagsErrors = {
|
|
695
|
-
/**
|
|
696
|
-
* Missing or invalid API key.
|
|
697
|
-
*/
|
|
698
|
-
401: ApiErrorOutput;
|
|
699
|
-
/**
|
|
700
|
-
* Nothing exists for this customer.
|
|
701
|
-
*/
|
|
702
|
-
404: ApiErrorOutput;
|
|
703
|
-
};
|
|
704
|
-
export type GetCustomerTagsError = GetCustomerTagsErrors[keyof GetCustomerTagsErrors];
|
|
705
|
-
export type GetCustomerTagsResponses = {
|
|
706
|
-
/**
|
|
707
|
-
* Success.
|
|
708
|
-
*/
|
|
709
|
-
200: CustomerTagsOutput;
|
|
710
|
-
};
|
|
711
|
-
export type GetCustomerTagsResponse = GetCustomerTagsResponses[keyof GetCustomerTagsResponses];
|
package/dist/api/index.d.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
|
import { type Client } from './generated/client';
|
|
18
18
|
export declare const DEFAULT_BASE_URL = "https://app.weflayr.com/api";
|
package/dist/api/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* const weflayr = require('weflayr');
|
|
14
14
|
*
|
|
15
15
|
* const apiClient = weflayr.client({ apiKey: 'wf-...' });
|
|
16
|
-
* const { data } = await weflayr.api.
|
|
16
|
+
* const { data } = await weflayr.api.getRevenue({ client: apiClient, throwOnError: true });
|
|
17
17
|
*/
|
|
18
18
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
19
19
|
if (k2 === undefined) k2 = k;
|
package/package.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// overwritten on every run.
|
|
11
11
|
//
|
|
12
12
|
// @hey-api/openapi-ts names an operation's request/response types after its
|
|
13
|
-
// PascalCase operation name (e.g. operation `
|
|
14
|
-
// `
|
|
13
|
+
// PascalCase operation name (e.g. operation `getRevenue` gets types
|
|
14
|
+
// `GetRevenueData`, `GetRevenueResponse`, `GetRevenueError`), so the
|
|
15
15
|
// only thing this script needs from the generated source is the list of
|
|
16
16
|
// operation names - the type names, and the per-endpoint camelCase/snake_case
|
|
17
17
|
// conversion, follow mechanically from there.
|