weflayr 0.22.1 → 0.22.2

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { client } from './client.gen.js';
4
4
  import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
5
- import type { DeleteCustomerRevenueData, DeleteCustomerRevenueErrors, DeleteCustomerRevenueResponses, DeleteCustomerTagsData, DeleteCustomerTagsErrors, DeleteCustomerTagsResponses, DeleteUserKeyMetricsData, DeleteUserKeyMetricsErrors, DeleteUserKeyMetricsResponses, GetAllCustomersTagsData, GetAllCustomersTagsErrors, GetAllCustomersTagsResponses, GetAllKeyMetricsData, GetAllKeyMetricsErrors, GetAllKeyMetricsResponses, GetAllRevenueData, GetAllRevenueErrors, GetAllRevenueResponses, GetCustomerRevenueData, GetCustomerRevenueErrors, GetCustomerRevenueResponses, GetCustomerTagsData, GetCustomerTagsErrors, GetCustomerTagsResponses, GetUserKeyMetricsData, GetUserKeyMetricsErrors, GetUserKeyMetricsResponses, SetCustomersTagsData, SetCustomersTagsErrors, SetCustomersTagsResponses, SetKeyMetricsData, SetKeyMetricsErrors, SetKeyMetricsResponses, SetRevenueData, SetRevenueErrors, SetRevenueResponses } from './types.gen.js';
5
+ import type { DeleteCustomersTagsData, DeleteCustomersTagsErrors, DeleteCustomersTagsResponses, DeleteKeyMetricsData, DeleteKeyMetricsErrors, DeleteKeyMetricsResponses, DeleteRevenueData, DeleteRevenueErrors, DeleteRevenueResponses, GetCustomersTagsData, GetCustomersTagsErrors, GetCustomersTagsResponses, GetKeyMetricsData, GetKeyMetricsErrors, GetKeyMetricsResponses, GetRevenueData, GetRevenueErrors, GetRevenueResponses, SetCustomersTagsData, SetCustomersTagsErrors, SetCustomersTagsResponses, SetKeyMetricsData, SetKeyMetricsErrors, SetKeyMetricsResponses, SetRevenueData, SetRevenueErrors, SetRevenueResponses } from './types.gen.js';
6
6
 
7
7
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
8
8
  /**
@@ -19,9 +19,18 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
19
19
  };
20
20
 
21
21
  /**
22
- * Every revenue value of the project, one row per booked value.
22
+ * Delete the given customers' API-uploaded revenue values.
23
23
  */
24
- export const getAllRevenue = <ThrowOnError extends boolean = false>(options?: Options<GetAllRevenueData, ThrowOnError>): RequestResult<GetAllRevenueResponses, GetAllRevenueErrors, ThrowOnError> => (options?.client ?? client).get<GetAllRevenueResponses, GetAllRevenueErrors, ThrowOnError>({
24
+ export const deleteRevenue = <ThrowOnError extends boolean = false>(options: Options<DeleteRevenueData, ThrowOnError>): RequestResult<DeleteRevenueResponses, DeleteRevenueErrors, ThrowOnError> => (options.client ?? client).delete<DeleteRevenueResponses, DeleteRevenueErrors, ThrowOnError>({
25
+ security: [{ scheme: 'bearer', type: 'http' }],
26
+ url: '/revenue/',
27
+ ...options
28
+ });
29
+
30
+ /**
31
+ * The project's revenue values, one row per booked value; pass customer_names to narrow to specific customers, omit it for every customer's.
32
+ */
33
+ export const getRevenue = <ThrowOnError extends boolean = false>(options?: Options<GetRevenueData, ThrowOnError>): RequestResult<GetRevenueResponses, GetRevenueErrors, ThrowOnError> => (options?.client ?? client).get<GetRevenueResponses, GetRevenueErrors, ThrowOnError>({
25
34
  security: [{ scheme: 'bearer', type: 'http' }],
26
35
  url: '/revenue/',
27
36
  ...options
@@ -41,27 +50,18 @@ export const setRevenue = <ThrowOnError extends boolean = false>(options: Option
41
50
  });
42
51
 
43
52
  /**
44
- * Delete one customer's API-uploaded revenue values.
53
+ * Delete the given users' API-uploaded key-metric values.
45
54
  */
46
- export const deleteCustomerRevenue = <ThrowOnError extends boolean = false>(options: Options<DeleteCustomerRevenueData, ThrowOnError>): RequestResult<DeleteCustomerRevenueResponses, DeleteCustomerRevenueErrors, ThrowOnError> => (options.client ?? client).delete<DeleteCustomerRevenueResponses, DeleteCustomerRevenueErrors, ThrowOnError>({
55
+ export const deleteKeyMetrics = <ThrowOnError extends boolean = false>(options: Options<DeleteKeyMetricsData, ThrowOnError>): RequestResult<DeleteKeyMetricsResponses, DeleteKeyMetricsErrors, ThrowOnError> => (options.client ?? client).delete<DeleteKeyMetricsResponses, DeleteKeyMetricsErrors, ThrowOnError>({
47
56
  security: [{ scheme: 'bearer', type: 'http' }],
48
- url: '/revenue/{customer_name}/',
49
- ...options
50
- });
51
-
52
- /**
53
- * One customer's revenue values; 404 when none are booked.
54
- */
55
- export const getCustomerRevenue = <ThrowOnError extends boolean = false>(options: Options<GetCustomerRevenueData, ThrowOnError>): RequestResult<GetCustomerRevenueResponses, GetCustomerRevenueErrors, ThrowOnError> => (options.client ?? client).get<GetCustomerRevenueResponses, GetCustomerRevenueErrors, ThrowOnError>({
56
- security: [{ scheme: 'bearer', type: 'http' }],
57
- url: '/revenue/{customer_name}/',
57
+ url: '/key-metrics/',
58
58
  ...options
59
59
  });
60
60
 
61
61
  /**
62
- * Every key-metric value of the project, one row per booked value.
62
+ * The project's key-metric values, one row per booked value; pass user_names to narrow to specific users, omit it for every user's.
63
63
  */
64
- export const getAllKeyMetrics = <ThrowOnError extends boolean = false>(options?: Options<GetAllKeyMetricsData, ThrowOnError>): RequestResult<GetAllKeyMetricsResponses, GetAllKeyMetricsErrors, ThrowOnError> => (options?.client ?? client).get<GetAllKeyMetricsResponses, GetAllKeyMetricsErrors, ThrowOnError>({
64
+ export const getKeyMetrics = <ThrowOnError extends boolean = false>(options?: Options<GetKeyMetricsData, ThrowOnError>): RequestResult<GetKeyMetricsResponses, GetKeyMetricsErrors, ThrowOnError> => (options?.client ?? client).get<GetKeyMetricsResponses, GetKeyMetricsErrors, ThrowOnError>({
65
65
  security: [{ scheme: 'bearer', type: 'http' }],
66
66
  url: '/key-metrics/',
67
67
  ...options
@@ -81,27 +81,18 @@ export const setKeyMetrics = <ThrowOnError extends boolean = false>(options: Opt
81
81
  });
82
82
 
83
83
  /**
84
- * Delete one user's API-uploaded key-metric values.
84
+ * Delete every tag of the given customers.
85
85
  */
86
- export const deleteUserKeyMetrics = <ThrowOnError extends boolean = false>(options: Options<DeleteUserKeyMetricsData, ThrowOnError>): RequestResult<DeleteUserKeyMetricsResponses, DeleteUserKeyMetricsErrors, ThrowOnError> => (options.client ?? client).delete<DeleteUserKeyMetricsResponses, DeleteUserKeyMetricsErrors, ThrowOnError>({
86
+ export const deleteCustomersTags = <ThrowOnError extends boolean = false>(options: Options<DeleteCustomersTagsData, ThrowOnError>): RequestResult<DeleteCustomersTagsResponses, DeleteCustomersTagsErrors, ThrowOnError> => (options.client ?? client).delete<DeleteCustomersTagsResponses, DeleteCustomersTagsErrors, ThrowOnError>({
87
87
  security: [{ scheme: 'bearer', type: 'http' }],
88
- url: '/key-metrics/{user_name}/',
89
- ...options
90
- });
91
-
92
- /**
93
- * One user's key-metric values; 404 when none are booked.
94
- */
95
- export const getUserKeyMetrics = <ThrowOnError extends boolean = false>(options: Options<GetUserKeyMetricsData, ThrowOnError>): RequestResult<GetUserKeyMetricsResponses, GetUserKeyMetricsErrors, ThrowOnError> => (options.client ?? client).get<GetUserKeyMetricsResponses, GetUserKeyMetricsErrors, ThrowOnError>({
96
- security: [{ scheme: 'bearer', type: 'http' }],
97
- url: '/key-metrics/{user_name}/',
88
+ url: '/customer-tags/',
98
89
  ...options
99
90
  });
100
91
 
101
92
  /**
102
- * Every known customer of the project with its tags (possibly empty).
93
+ * Every known customer of the project with its tags (possibly empty); pass customer_names to narrow to specific customers, omit it for every customer's.
103
94
  */
104
- export const getAllCustomersTags = <ThrowOnError extends boolean = false>(options?: Options<GetAllCustomersTagsData, ThrowOnError>): RequestResult<GetAllCustomersTagsResponses, GetAllCustomersTagsErrors, ThrowOnError> => (options?.client ?? client).get<GetAllCustomersTagsResponses, GetAllCustomersTagsErrors, ThrowOnError>({
95
+ export const getCustomersTags = <ThrowOnError extends boolean = false>(options?: Options<GetCustomersTagsData, ThrowOnError>): RequestResult<GetCustomersTagsResponses, GetCustomersTagsErrors, ThrowOnError> => (options?.client ?? client).get<GetCustomersTagsResponses, GetCustomersTagsErrors, ThrowOnError>({
105
96
  security: [{ scheme: 'bearer', type: 'http' }],
106
97
  url: '/customer-tags/',
107
98
  ...options
@@ -119,21 +110,3 @@ export const setCustomersTags = <ThrowOnError extends boolean = false>(options:
119
110
  ...options.headers
120
111
  }
121
112
  });
122
-
123
- /**
124
- * Delete every tag of one customer; 404 for a customer Weflayr has never seen.
125
- */
126
- export const deleteCustomerTags = <ThrowOnError extends boolean = false>(options: Options<DeleteCustomerTagsData, ThrowOnError>): RequestResult<DeleteCustomerTagsResponses, DeleteCustomerTagsErrors, ThrowOnError> => (options.client ?? client).delete<DeleteCustomerTagsResponses, DeleteCustomerTagsErrors, ThrowOnError>({
127
- security: [{ scheme: 'bearer', type: 'http' }],
128
- url: '/customer-tags/{customer_name}/',
129
- ...options
130
- });
131
-
132
- /**
133
- * One customer's tags; 404 for a customer Weflayr has never seen.
134
- */
135
- export const getCustomerTags = <ThrowOnError extends boolean = false>(options: Options<GetCustomerTagsData, ThrowOnError>): RequestResult<GetCustomerTagsResponses, GetCustomerTagsErrors, ThrowOnError> => (options.client ?? client).get<GetCustomerTagsResponses, GetCustomerTagsErrors, ThrowOnError>({
136
- security: [{ scheme: 'bearer', type: 'http' }],
137
- url: '/customer-tags/{customer_name}/',
138
- ...options
139
- });
@@ -149,11 +149,11 @@ export type KeyMetricOutput = {
149
149
  */
150
150
  export type KeyMetricRow = {
151
151
  /**
152
- * User Defined Id
152
+ * Metric Id
153
153
  *
154
154
  * 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
155
  */
156
- user_defined_id?: string | null;
156
+ metric_id?: string | null;
157
157
  /**
158
158
  * User Name
159
159
  */
@@ -165,7 +165,7 @@ export type KeyMetricRow = {
165
165
  /**
166
166
  * Amount
167
167
  */
168
- amount: number | string;
168
+ amount: number;
169
169
  /**
170
170
  * Month
171
171
  */
@@ -186,10 +186,6 @@ export type KeyMetricRow = {
186
186
  * One booked key-metric value.
187
187
  */
188
188
  export type KeyMetricRowOutput = {
189
- /**
190
- * User Defined Id
191
- */
192
- user_defined_id: string;
193
189
  /**
194
190
  * Metric Name
195
191
  */
@@ -201,11 +197,15 @@ export type KeyMetricRowOutput = {
201
197
  /**
202
198
  * Amount
203
199
  */
204
- amount: string;
200
+ amount: number;
205
201
  /**
206
202
  * Source
207
203
  */
208
204
  source: string;
205
+ /**
206
+ * Metric Id
207
+ */
208
+ metric_id: string;
209
209
  /**
210
210
  * User Name
211
211
  */
@@ -272,11 +272,11 @@ export type RevenueOutput = {
272
272
  */
273
273
  export type RevenueRow = {
274
274
  /**
275
- * User Defined Id
275
+ * Revenue Id
276
276
  *
277
277
  * 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
278
  */
279
- user_defined_id?: string | null;
279
+ revenue_id?: string | null;
280
280
  /**
281
281
  * Customer Name
282
282
  */
@@ -284,7 +284,7 @@ export type RevenueRow = {
284
284
  /**
285
285
  * Amount
286
286
  */
287
- amount: number | string;
287
+ amount: number;
288
288
  /**
289
289
  * Month
290
290
  */
@@ -305,10 +305,6 @@ export type RevenueRow = {
305
305
  * One booked revenue value.
306
306
  */
307
307
  export type RevenueRowOutput = {
308
- /**
309
- * User Defined Id
310
- */
311
- user_defined_id: string;
312
308
  /**
313
309
  * Metric Name
314
310
  */
@@ -320,11 +316,15 @@ export type RevenueRowOutput = {
320
316
  /**
321
317
  * Amount
322
318
  */
323
- amount: string;
319
+ amount: number;
324
320
  /**
325
321
  * Source
326
322
  */
327
323
  source: string;
324
+ /**
325
+ * Revenue Id
326
+ */
327
+ revenue_id: string;
328
328
  /**
329
329
  * Customer Name
330
330
  */
@@ -354,7 +354,7 @@ export type SetCustomerTagsInput = {
354
354
  *
355
355
  * The key-metric values posted to the public API. A user may have
356
356
  * several lines of the same metric in the same month; rows are only ever
357
- * matched against each other by user_defined_id, never by (user, metric,
357
+ * matched against each other by metric_id, never by (user, metric,
358
358
  * month).
359
359
  */
360
360
  export type SetKeyMetricsInput = {
@@ -365,7 +365,7 @@ export type SetKeyMetricsInput = {
365
365
  /**
366
366
  * Upsert
367
367
  *
368
- * If a row's user_defined_id already exists, overwrite it instead of rejecting the request.
368
+ * If a row's metric_id already exists, overwrite it instead of rejecting the request.
369
369
  */
370
370
  upsert?: boolean;
371
371
  };
@@ -375,7 +375,7 @@ export type SetKeyMetricsInput = {
375
375
  *
376
376
  * The revenue values posted to the public API. A customer may have several
377
377
  * revenue lines in the same month (e.g. one per product or contract); rows
378
- * are only ever matched against each other by user_defined_id, never by
378
+ * are only ever matched against each other by revenue_id, never by
379
379
  * (customer, month).
380
380
  */
381
381
  export type SetRevenueInput = {
@@ -386,7 +386,7 @@ export type SetRevenueInput = {
386
386
  /**
387
387
  * Upsert
388
388
  *
389
- * If a row's user_defined_id already exists, overwrite it instead of rejecting the request.
389
+ * If a row's revenue_id already exists, overwrite it instead of rejecting the request.
390
390
  */
391
391
  upsert?: boolean;
392
392
  };
@@ -407,10 +407,56 @@ export type TagsDeletedOutput = {
407
407
  tags_deleted: number;
408
408
  };
409
409
 
410
- export type GetAllRevenueData = {
410
+ export type DeleteRevenueData = {
411
+ body?: never;
412
+ path?: never;
413
+ query: {
414
+ /**
415
+ * Delete these customers' API-booked revenue (repeat the param for several).
416
+ */
417
+ customer_names: Array<string>;
418
+ /**
419
+ * First month to delete (inclusive). Omit both bounds to delete every matching API-booked value.
420
+ */
421
+ month_start?: string;
422
+ /**
423
+ * Last month to delete (inclusive).
424
+ */
425
+ month_end?: string;
426
+ };
427
+ url: '/revenue/';
428
+ };
429
+
430
+ export type DeleteRevenueErrors = {
431
+ /**
432
+ * Missing or invalid API key.
433
+ */
434
+ 401: ApiErrorOutput;
435
+ /**
436
+ * Invalid payload: every offending field is listed and nothing was written.
437
+ */
438
+ 422: InvalidPayloadOutput;
439
+ };
440
+
441
+ export type DeleteRevenueError = DeleteRevenueErrors[keyof DeleteRevenueErrors];
442
+
443
+ export type DeleteRevenueResponses = {
444
+ /**
445
+ * Success.
446
+ */
447
+ 200: RevenueOrKeyMetricDeletedRowOutput;
448
+ };
449
+
450
+ export type DeleteRevenueResponse = DeleteRevenueResponses[keyof DeleteRevenueResponses];
451
+
452
+ export type GetRevenueData = {
411
453
  body?: never;
412
454
  path?: never;
413
455
  query?: {
456
+ /**
457
+ * Return only these customers' revenue (repeat the param for several). Omit to return every customer's.
458
+ */
459
+ customer_names?: Array<string>;
414
460
  /**
415
461
  * Opaque cursor from a previous page's next_cursor.
416
462
  */
@@ -420,23 +466,23 @@ export type GetAllRevenueData = {
420
466
  url: '/revenue/';
421
467
  };
422
468
 
423
- export type GetAllRevenueErrors = {
469
+ export type GetRevenueErrors = {
424
470
  /**
425
471
  * Missing or invalid API key.
426
472
  */
427
473
  401: ApiErrorOutput;
428
474
  };
429
475
 
430
- export type GetAllRevenueError = GetAllRevenueErrors[keyof GetAllRevenueErrors];
476
+ export type GetRevenueError = GetRevenueErrors[keyof GetRevenueErrors];
431
477
 
432
- export type GetAllRevenueResponses = {
478
+ export type GetRevenueResponses = {
433
479
  /**
434
480
  * Success.
435
481
  */
436
482
  200: RevenueOutput;
437
483
  };
438
484
 
439
- export type GetAllRevenueResponse = GetAllRevenueResponses[keyof GetAllRevenueResponses];
485
+ export type GetRevenueResponse = GetRevenueResponses[keyof GetRevenueResponses];
440
486
 
441
487
  export type SetRevenueData = {
442
488
  body: SetRevenueInput;
@@ -467,12 +513,14 @@ export type SetRevenueResponses = {
467
513
 
468
514
  export type SetRevenueResponse = SetRevenueResponses[keyof SetRevenueResponses];
469
515
 
470
- export type DeleteCustomerRevenueData = {
516
+ export type DeleteKeyMetricsData = {
471
517
  body?: never;
472
- path: {
473
- customer_name: string;
474
- };
475
- query?: {
518
+ path?: never;
519
+ query: {
520
+ /**
521
+ * Delete these users' API-booked key metrics (repeat the param for several).
522
+ */
523
+ user_names: Array<string>;
476
524
  /**
477
525
  * First month to delete (inclusive). Omit both bounds to delete every matching API-booked value.
478
526
  */
@@ -482,10 +530,10 @@ export type DeleteCustomerRevenueData = {
482
530
  */
483
531
  month_end?: string;
484
532
  };
485
- url: '/revenue/{customer_name}/';
533
+ url: '/key-metrics/';
486
534
  };
487
535
 
488
- export type DeleteCustomerRevenueErrors = {
536
+ export type DeleteKeyMetricsErrors = {
489
537
  /**
490
538
  * Missing or invalid API key.
491
539
  */
@@ -496,52 +544,25 @@ export type DeleteCustomerRevenueErrors = {
496
544
  422: InvalidPayloadOutput;
497
545
  };
498
546
 
499
- export type DeleteCustomerRevenueError = DeleteCustomerRevenueErrors[keyof DeleteCustomerRevenueErrors];
547
+ export type DeleteKeyMetricsError = DeleteKeyMetricsErrors[keyof DeleteKeyMetricsErrors];
500
548
 
501
- export type DeleteCustomerRevenueResponses = {
549
+ export type DeleteKeyMetricsResponses = {
502
550
  /**
503
551
  * Success.
504
552
  */
505
553
  200: RevenueOrKeyMetricDeletedRowOutput;
506
554
  };
507
555
 
508
- export type DeleteCustomerRevenueResponse = DeleteCustomerRevenueResponses[keyof DeleteCustomerRevenueResponses];
556
+ export type DeleteKeyMetricsResponse = DeleteKeyMetricsResponses[keyof DeleteKeyMetricsResponses];
509
557
 
510
- export type GetCustomerRevenueData = {
511
- body?: never;
512
- path: {
513
- customer_name: string;
514
- };
515
- query?: never;
516
- url: '/revenue/{customer_name}/';
517
- };
518
-
519
- export type GetCustomerRevenueErrors = {
520
- /**
521
- * Missing or invalid API key.
522
- */
523
- 401: ApiErrorOutput;
524
- /**
525
- * Nothing exists for this customer.
526
- */
527
- 404: ApiErrorOutput;
528
- };
529
-
530
- export type GetCustomerRevenueError = GetCustomerRevenueErrors[keyof GetCustomerRevenueErrors];
531
-
532
- export type GetCustomerRevenueResponses = {
533
- /**
534
- * Success.
535
- */
536
- 200: RevenueOutput;
537
- };
538
-
539
- export type GetCustomerRevenueResponse = GetCustomerRevenueResponses[keyof GetCustomerRevenueResponses];
540
-
541
- export type GetAllKeyMetricsData = {
558
+ export type GetKeyMetricsData = {
542
559
  body?: never;
543
560
  path?: never;
544
561
  query?: {
562
+ /**
563
+ * Return only these users' key metrics (repeat the param for several). Omit to return every user's.
564
+ */
565
+ user_names?: Array<string>;
545
566
  /**
546
567
  * Opaque cursor from a previous page's next_cursor.
547
568
  */
@@ -551,23 +572,23 @@ export type GetAllKeyMetricsData = {
551
572
  url: '/key-metrics/';
552
573
  };
553
574
 
554
- export type GetAllKeyMetricsErrors = {
575
+ export type GetKeyMetricsErrors = {
555
576
  /**
556
577
  * Missing or invalid API key.
557
578
  */
558
579
  401: ApiErrorOutput;
559
580
  };
560
581
 
561
- export type GetAllKeyMetricsError = GetAllKeyMetricsErrors[keyof GetAllKeyMetricsErrors];
582
+ export type GetKeyMetricsError = GetKeyMetricsErrors[keyof GetKeyMetricsErrors];
562
583
 
563
- export type GetAllKeyMetricsResponses = {
584
+ export type GetKeyMetricsResponses = {
564
585
  /**
565
586
  * Success.
566
587
  */
567
588
  200: KeyMetricOutput;
568
589
  };
569
590
 
570
- export type GetAllKeyMetricsResponse = GetAllKeyMetricsResponses[keyof GetAllKeyMetricsResponses];
591
+ export type GetKeyMetricsResponse = GetKeyMetricsResponses[keyof GetKeyMetricsResponses];
571
592
 
572
593
  export type SetKeyMetricsData = {
573
594
  body: SetKeyMetricsInput;
@@ -598,25 +619,19 @@ export type SetKeyMetricsResponses = {
598
619
 
599
620
  export type SetKeyMetricsResponse = SetKeyMetricsResponses[keyof SetKeyMetricsResponses];
600
621
 
601
- export type DeleteUserKeyMetricsData = {
622
+ export type DeleteCustomersTagsData = {
602
623
  body?: never;
603
- path: {
604
- user_name: string;
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;
624
+ path?: never;
625
+ query: {
611
626
  /**
612
- * Last month to delete (inclusive).
627
+ * Delete every tag of these customers (repeat the param for several).
613
628
  */
614
- month_end?: string;
629
+ customer_names: Array<string>;
615
630
  };
616
- url: '/key-metrics/{user_name}/';
631
+ url: '/customer-tags/';
617
632
  };
618
633
 
619
- export type DeleteUserKeyMetricsErrors = {
634
+ export type DeleteCustomersTagsErrors = {
620
635
  /**
621
636
  * Missing or invalid API key.
622
637
  */
@@ -627,52 +642,25 @@ export type DeleteUserKeyMetricsErrors = {
627
642
  422: InvalidPayloadOutput;
628
643
  };
629
644
 
630
- export type DeleteUserKeyMetricsError = DeleteUserKeyMetricsErrors[keyof DeleteUserKeyMetricsErrors];
645
+ export type DeleteCustomersTagsError = DeleteCustomersTagsErrors[keyof DeleteCustomersTagsErrors];
631
646
 
632
- export type DeleteUserKeyMetricsResponses = {
647
+ export type DeleteCustomersTagsResponses = {
633
648
  /**
634
649
  * Success.
635
650
  */
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];
662
-
663
- export type GetUserKeyMetricsResponses = {
664
- /**
665
- * Success.
666
- */
667
- 200: KeyMetricOutput;
651
+ 200: TagsDeletedOutput;
668
652
  };
669
653
 
670
- export type GetUserKeyMetricsResponse = GetUserKeyMetricsResponses[keyof GetUserKeyMetricsResponses];
654
+ export type DeleteCustomersTagsResponse = DeleteCustomersTagsResponses[keyof DeleteCustomersTagsResponses];
671
655
 
672
- export type GetAllCustomersTagsData = {
656
+ export type GetCustomersTagsData = {
673
657
  body?: never;
674
658
  path?: never;
675
659
  query?: {
660
+ /**
661
+ * Return only these customers' tags. Omit to return every customer's.
662
+ */
663
+ customer_names?: Array<string>;
676
664
  /**
677
665
  * Opaque cursor from a previous page's next_cursor.
678
666
  */
@@ -682,23 +670,23 @@ export type GetAllCustomersTagsData = {
682
670
  url: '/customer-tags/';
683
671
  };
684
672
 
685
- export type GetAllCustomersTagsErrors = {
673
+ export type GetCustomersTagsErrors = {
686
674
  /**
687
675
  * Missing or invalid API key.
688
676
  */
689
677
  401: ApiErrorOutput;
690
678
  };
691
679
 
692
- export type GetAllCustomersTagsError = GetAllCustomersTagsErrors[keyof GetAllCustomersTagsErrors];
680
+ export type GetCustomersTagsError = GetCustomersTagsErrors[keyof GetCustomersTagsErrors];
693
681
 
694
- export type GetAllCustomersTagsResponses = {
682
+ export type GetCustomersTagsResponses = {
695
683
  /**
696
684
  * Success.
697
685
  */
698
686
  200: AllCustomerTagsOutput;
699
687
  };
700
688
 
701
- export type GetAllCustomersTagsResponse = GetAllCustomersTagsResponses[keyof GetAllCustomersTagsResponses];
689
+ export type GetCustomersTagsResponse = GetCustomersTagsResponses[keyof GetCustomersTagsResponses];
702
690
 
703
691
  export type SetCustomersTagsData = {
704
692
  body: SetCustomerTagsInput;
@@ -728,65 +716,3 @@ export type SetCustomersTagsResponses = {
728
716
  };
729
717
 
730
718
  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.getAllRevenue({ client: apiClient, throwOnError: true });
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';