weflayr 0.22.0 → 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.
Files changed (77) hide show
  1. package/.prettierignore +2 -0
  2. package/dist/api/caseConversion.d.ts +16 -0
  3. package/dist/api/caseConversion.js +45 -0
  4. package/dist/api/generated/client/client.gen.d.ts +2 -0
  5. package/dist/api/generated/client/client.gen.js +220 -0
  6. package/dist/api/generated/client/index.d.ts +10 -0
  7. package/dist/api/generated/client/index.js +17 -0
  8. package/dist/api/generated/client/types.gen.d.ts +120 -0
  9. package/dist/api/generated/client/types.gen.js +3 -0
  10. package/dist/api/generated/client/utils.gen.d.ts +37 -0
  11. package/dist/api/generated/client/utils.gen.js +239 -0
  12. package/dist/api/generated/client.gen.d.ts +12 -0
  13. package/dist/api/generated/client.gen.js +6 -0
  14. package/dist/api/generated/core/auth.gen.d.ts +25 -0
  15. package/dist/api/generated/core/auth.gen.js +18 -0
  16. package/dist/api/generated/core/bodySerializer.gen.d.ts +25 -0
  17. package/dist/api/generated/core/bodySerializer.gen.js +60 -0
  18. package/dist/api/generated/core/params.gen.d.ts +43 -0
  19. package/dist/api/generated/core/params.gen.js +112 -0
  20. package/dist/api/generated/core/pathSerializer.gen.d.ts +33 -0
  21. package/dist/api/generated/core/pathSerializer.gen.js +115 -0
  22. package/dist/api/generated/core/queryKeySerializer.gen.d.ts +18 -0
  23. package/dist/api/generated/core/queryKeySerializer.gen.js +98 -0
  24. package/dist/api/generated/core/serverSentEvents.gen.d.ts +71 -0
  25. package/dist/api/generated/core/serverSentEvents.gen.js +135 -0
  26. package/dist/api/generated/core/types.gen.d.ts +83 -0
  27. package/dist/api/generated/core/types.gen.js +3 -0
  28. package/dist/api/generated/core/utils.gen.d.ts +19 -0
  29. package/dist/api/generated/core/utils.gen.js +93 -0
  30. package/dist/api/generated/facade.gen.d.ts +153 -0
  31. package/dist/api/generated/facade.gen.js +49 -0
  32. package/dist/api/generated/index.d.ts +2 -0
  33. package/dist/api/generated/index.js +14 -0
  34. package/dist/api/generated/sdk.gen.d.ts +51 -0
  35. package/dist/api/generated/sdk.gen.js +98 -0
  36. package/dist/api/generated/types.gen.d.ts +652 -0
  37. package/dist/api/generated/types.gen.js +3 -0
  38. package/dist/api/index.d.ts +27 -0
  39. package/dist/api/index.js +48 -0
  40. package/dist/api/makeEndpoint.d.ts +27 -0
  41. package/dist/api/makeEndpoint.js +37 -0
  42. package/index.d.ts +24 -15
  43. package/openapi-ts.config.mjs +9 -0
  44. package/package.json +9 -2
  45. package/scripts/generate_facade.mjs +86 -0
  46. package/src/api/caseConversion.ts +58 -0
  47. package/src/api/generated/client/client.gen.ts +277 -0
  48. package/src/api/generated/client/index.ts +27 -0
  49. package/src/api/generated/client/types.gen.ts +218 -0
  50. package/src/api/generated/client/utils.gen.ts +316 -0
  51. package/src/api/generated/client.gen.ts +16 -0
  52. package/src/api/generated/core/auth.gen.ts +48 -0
  53. package/src/api/generated/core/bodySerializer.gen.ts +82 -0
  54. package/src/api/generated/core/params.gen.ts +178 -0
  55. package/src/api/generated/core/pathSerializer.gen.ts +171 -0
  56. package/src/api/generated/core/queryKeySerializer.gen.ts +117 -0
  57. package/src/api/generated/core/serverSentEvents.gen.ts +242 -0
  58. package/src/api/generated/core/types.gen.ts +110 -0
  59. package/src/api/generated/core/utils.gen.ts +140 -0
  60. package/src/api/generated/facade.gen.ts +62 -0
  61. package/src/api/generated/index.ts +4 -0
  62. package/src/api/generated/sdk.gen.ts +112 -0
  63. package/src/api/generated/types.gen.ts +718 -0
  64. package/src/api/index.ts +45 -0
  65. package/src/api/makeEndpoint.ts +54 -0
  66. package/src/auto-instrument.js +19 -6
  67. package/src/index.js +5 -0
  68. package/src/instrumentation/google/get_provider_name.js +2 -1
  69. package/src/instrumentation/vercel/full_instrumentation.js +44 -0
  70. package/src/otel/propagation.js +21 -12
  71. package/src/otel/span-processor.js +11 -1
  72. package/src/otel/vercel-ai-sdk-span-filter.js +79 -0
  73. package/tests/api/index.test.js +361 -0
  74. package/tests/index.test.js +48 -15
  75. package/tests/instrumentation/vercel/full_instrumentation.test.js +16 -0
  76. package/tests/otel/vercel-ai-sdk-span-filter.test.js +159 -0
  77. package/tsconfig.json +18 -0
@@ -0,0 +1,652 @@
1
+ export type ClientOptions = {
2
+ baseUrl: 'https://app.weflayr.com/api' | (string & {});
3
+ };
4
+ /**
5
+ * AllCustomerTagsOutput
6
+ *
7
+ * The customer-tags GET response: every known customer of the project.
8
+ */
9
+ export type AllCustomerTagsOutput = {
10
+ /**
11
+ * Customers
12
+ */
13
+ customers: Array<CustomerTagsOutput>;
14
+ /**
15
+ * Next Cursor
16
+ */
17
+ next_cursor: string | null;
18
+ /**
19
+ * Has More
20
+ */
21
+ has_more: boolean;
22
+ };
23
+ /**
24
+ * ApiErrorOutput
25
+ *
26
+ * A refusal with a single human-readable message (401 and 404 bodies).
27
+ */
28
+ export type ApiErrorOutput = {
29
+ /**
30
+ * Error
31
+ */
32
+ error: string;
33
+ };
34
+ /**
35
+ * CustomerTags
36
+ *
37
+ * One customer's tag updates: a string value sets the tag, null deletes it.
38
+ */
39
+ export type CustomerTags = {
40
+ /**
41
+ * Customer Name
42
+ */
43
+ customer_name: string;
44
+ /**
45
+ * Tags
46
+ */
47
+ tags: {
48
+ [key: string]: string | null;
49
+ };
50
+ };
51
+ /**
52
+ * CustomerTagsOutput
53
+ *
54
+ * One customer with its tags (possibly empty).
55
+ */
56
+ export type CustomerTagsOutput = {
57
+ /**
58
+ * Customer Name
59
+ */
60
+ customer_name: string;
61
+ /**
62
+ * Tags
63
+ */
64
+ tags: {
65
+ [key: string]: string;
66
+ };
67
+ };
68
+ /**
69
+ * CustomersUpdatedOutput
70
+ *
71
+ * A successful tags upsert: how many customers were touched.
72
+ */
73
+ export type CustomersUpdatedOutput = {
74
+ /**
75
+ * Ok
76
+ */
77
+ ok: boolean;
78
+ /**
79
+ * Customers Updated
80
+ */
81
+ customers_updated: number;
82
+ };
83
+ /**
84
+ * InvalidFieldDetail
85
+ *
86
+ * One offending field of a rejected payload.
87
+ */
88
+ export type InvalidFieldDetail = {
89
+ /**
90
+ * Field
91
+ */
92
+ field: string;
93
+ /**
94
+ * Error
95
+ */
96
+ error: string;
97
+ };
98
+ /**
99
+ * InvalidPayloadOutput
100
+ *
101
+ * The all-or-nothing 422 body: every offending field, nothing written.
102
+ */
103
+ export type InvalidPayloadOutput = {
104
+ /**
105
+ * Error
106
+ */
107
+ error: string;
108
+ /**
109
+ * Detail
110
+ */
111
+ detail: Array<InvalidFieldDetail>;
112
+ };
113
+ /**
114
+ * KeyMetricOutput
115
+ *
116
+ * A key-metric GET response: one row per booked value.
117
+ */
118
+ export type KeyMetricOutput = {
119
+ /**
120
+ * Rows
121
+ */
122
+ rows: Array<KeyMetricRowOutput>;
123
+ /**
124
+ * Next Cursor
125
+ */
126
+ next_cursor: string | null;
127
+ /**
128
+ * Has More
129
+ */
130
+ has_more: boolean;
131
+ };
132
+ /**
133
+ * KeyMetricRow
134
+ *
135
+ * One booked key-metric value: the user, the metric, the amount, and
136
+ * either its month or the month_start/month_end period it should be split
137
+ * across.
138
+ */
139
+ export type KeyMetricRow = {
140
+ /**
141
+ * Metric Id
142
+ *
143
+ * 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
+ */
145
+ metric_id?: string | null;
146
+ /**
147
+ * User Name
148
+ */
149
+ user_name: string;
150
+ /**
151
+ * Metric Name
152
+ */
153
+ metric_name: string;
154
+ /**
155
+ * Amount
156
+ */
157
+ amount: number;
158
+ /**
159
+ * Month
160
+ */
161
+ month?: string | null;
162
+ /**
163
+ * Month Start
164
+ */
165
+ month_start?: string | null;
166
+ /**
167
+ * Month End
168
+ */
169
+ month_end?: string | null;
170
+ };
171
+ /**
172
+ * KeyMetricRowOutput
173
+ *
174
+ * One booked key-metric value.
175
+ */
176
+ export type KeyMetricRowOutput = {
177
+ /**
178
+ * Metric Name
179
+ */
180
+ metric_name: string;
181
+ /**
182
+ * Month
183
+ */
184
+ month: string;
185
+ /**
186
+ * Amount
187
+ */
188
+ amount: number;
189
+ /**
190
+ * Source
191
+ */
192
+ source: string;
193
+ /**
194
+ * Metric Id
195
+ */
196
+ metric_id: string;
197
+ /**
198
+ * User Name
199
+ */
200
+ user_name: string;
201
+ };
202
+ /**
203
+ * RevenueOrKeyMetricDeletedRowOutput
204
+ *
205
+ * A successful values deletion: how many rows were removed.
206
+ */
207
+ export type RevenueOrKeyMetricDeletedRowOutput = {
208
+ /**
209
+ * Ok
210
+ */
211
+ ok: boolean;
212
+ /**
213
+ * Rows Deleted
214
+ */
215
+ rows_deleted: number;
216
+ };
217
+ /**
218
+ * RevenueOrKeyMetricImportedRowOutput
219
+ *
220
+ * A successful values upsert: how many rows were imported.
221
+ */
222
+ export type RevenueOrKeyMetricImportedRowOutput = {
223
+ /**
224
+ * Ok
225
+ */
226
+ ok: boolean;
227
+ /**
228
+ * Rows Inserted
229
+ */
230
+ rows_inserted: number;
231
+ };
232
+ /**
233
+ * RevenueOutput
234
+ *
235
+ * A revenue GET response: one row per booked value.
236
+ */
237
+ export type RevenueOutput = {
238
+ /**
239
+ * Rows
240
+ */
241
+ rows: Array<RevenueRowOutput>;
242
+ /**
243
+ * Next Cursor
244
+ */
245
+ next_cursor: string | null;
246
+ /**
247
+ * Has More
248
+ */
249
+ has_more: boolean;
250
+ };
251
+ /**
252
+ * RevenueRow
253
+ *
254
+ * One booked revenue value: the customer, the amount, and either its
255
+ * month or the month_start/month_end period it should be split across.
256
+ */
257
+ export type RevenueRow = {
258
+ /**
259
+ * Revenue Id
260
+ *
261
+ * 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
+ */
263
+ revenue_id?: string | null;
264
+ /**
265
+ * Customer Name
266
+ */
267
+ customer_name: string;
268
+ /**
269
+ * Amount
270
+ */
271
+ amount: number;
272
+ /**
273
+ * Month
274
+ */
275
+ month?: string | null;
276
+ /**
277
+ * Month Start
278
+ */
279
+ month_start?: string | null;
280
+ /**
281
+ * Month End
282
+ */
283
+ month_end?: string | null;
284
+ };
285
+ /**
286
+ * RevenueRowOutput
287
+ *
288
+ * One booked revenue value.
289
+ */
290
+ export type RevenueRowOutput = {
291
+ /**
292
+ * Metric Name
293
+ */
294
+ metric_name: string;
295
+ /**
296
+ * Month
297
+ */
298
+ month: string;
299
+ /**
300
+ * Amount
301
+ */
302
+ amount: number;
303
+ /**
304
+ * Source
305
+ */
306
+ source: string;
307
+ /**
308
+ * Revenue Id
309
+ */
310
+ revenue_id: string;
311
+ /**
312
+ * Customer Name
313
+ */
314
+ customer_name: string;
315
+ };
316
+ /**
317
+ * SetCustomerTagsInput
318
+ *
319
+ * The tag updates posted to the public API, one entry per customer.
320
+ */
321
+ export type SetCustomerTagsInput = {
322
+ /**
323
+ * Customers
324
+ */
325
+ customers: Array<CustomerTags>;
326
+ /**
327
+ * Upsert
328
+ *
329
+ * If a customer's tag key already exists, overwrite it instead of rejecting the request.
330
+ */
331
+ upsert?: boolean;
332
+ };
333
+ /**
334
+ * SetKeyMetricsInput
335
+ *
336
+ * The key-metric values posted to the public API. A user may have
337
+ * several lines of the same metric in the same month; rows are only ever
338
+ * matched against each other by metric_id, never by (user, metric,
339
+ * month).
340
+ */
341
+ export type SetKeyMetricsInput = {
342
+ /**
343
+ * Rows
344
+ */
345
+ rows: Array<KeyMetricRow>;
346
+ /**
347
+ * Upsert
348
+ *
349
+ * If a row's metric_id already exists, overwrite it instead of rejecting the request.
350
+ */
351
+ upsert?: boolean;
352
+ };
353
+ /**
354
+ * SetRevenueInput
355
+ *
356
+ * The revenue values posted to the public API. A customer may have several
357
+ * revenue lines in the same month (e.g. one per product or contract); rows
358
+ * are only ever matched against each other by revenue_id, never by
359
+ * (customer, month).
360
+ */
361
+ export type SetRevenueInput = {
362
+ /**
363
+ * Rows
364
+ */
365
+ rows: Array<RevenueRow>;
366
+ /**
367
+ * Upsert
368
+ *
369
+ * If a row's revenue_id already exists, overwrite it instead of rejecting the request.
370
+ */
371
+ upsert?: boolean;
372
+ };
373
+ /**
374
+ * TagsDeletedOutput
375
+ *
376
+ * A successful tags deletion: how many tags were removed.
377
+ */
378
+ export type TagsDeletedOutput = {
379
+ /**
380
+ * Ok
381
+ */
382
+ ok: boolean;
383
+ /**
384
+ * Tags Deleted
385
+ */
386
+ tags_deleted: number;
387
+ };
388
+ export type DeleteRevenueData = {
389
+ body?: never;
390
+ path?: never;
391
+ query: {
392
+ /**
393
+ * Delete these customers' API-booked revenue (repeat the param for several).
394
+ */
395
+ customer_names: Array<string>;
396
+ /**
397
+ * First month to delete (inclusive). Omit both bounds to delete every matching API-booked value.
398
+ */
399
+ month_start?: string;
400
+ /**
401
+ * Last month to delete (inclusive).
402
+ */
403
+ month_end?: string;
404
+ };
405
+ url: '/revenue/';
406
+ };
407
+ export type DeleteRevenueErrors = {
408
+ /**
409
+ * Missing or invalid API key.
410
+ */
411
+ 401: ApiErrorOutput;
412
+ /**
413
+ * Invalid payload: every offending field is listed and nothing was written.
414
+ */
415
+ 422: InvalidPayloadOutput;
416
+ };
417
+ export type DeleteRevenueError = DeleteRevenueErrors[keyof DeleteRevenueErrors];
418
+ export type DeleteRevenueResponses = {
419
+ /**
420
+ * Success.
421
+ */
422
+ 200: RevenueOrKeyMetricDeletedRowOutput;
423
+ };
424
+ export type DeleteRevenueResponse = DeleteRevenueResponses[keyof DeleteRevenueResponses];
425
+ export type GetRevenueData = {
426
+ body?: never;
427
+ path?: never;
428
+ query?: {
429
+ /**
430
+ * Return only these customers' revenue (repeat the param for several). Omit to return every customer's.
431
+ */
432
+ customer_names?: Array<string>;
433
+ /**
434
+ * Opaque cursor from a previous page's next_cursor.
435
+ */
436
+ cursor?: string;
437
+ limit?: number;
438
+ };
439
+ url: '/revenue/';
440
+ };
441
+ export type GetRevenueErrors = {
442
+ /**
443
+ * Missing or invalid API key.
444
+ */
445
+ 401: ApiErrorOutput;
446
+ };
447
+ export type GetRevenueError = GetRevenueErrors[keyof GetRevenueErrors];
448
+ export type GetRevenueResponses = {
449
+ /**
450
+ * Success.
451
+ */
452
+ 200: RevenueOutput;
453
+ };
454
+ export type GetRevenueResponse = GetRevenueResponses[keyof GetRevenueResponses];
455
+ export type SetRevenueData = {
456
+ body: SetRevenueInput;
457
+ path?: never;
458
+ query?: never;
459
+ url: '/revenue/';
460
+ };
461
+ export type SetRevenueErrors = {
462
+ /**
463
+ * Missing or invalid API key.
464
+ */
465
+ 401: ApiErrorOutput;
466
+ /**
467
+ * Invalid payload: every offending field is listed and nothing was written.
468
+ */
469
+ 422: InvalidPayloadOutput;
470
+ };
471
+ export type SetRevenueError = SetRevenueErrors[keyof SetRevenueErrors];
472
+ export type SetRevenueResponses = {
473
+ /**
474
+ * Success.
475
+ */
476
+ 200: RevenueOrKeyMetricImportedRowOutput;
477
+ };
478
+ export type SetRevenueResponse = SetRevenueResponses[keyof SetRevenueResponses];
479
+ export type DeleteKeyMetricsData = {
480
+ body?: never;
481
+ path?: never;
482
+ query: {
483
+ /**
484
+ * Delete these users' API-booked key metrics (repeat the param for several).
485
+ */
486
+ user_names: Array<string>;
487
+ /**
488
+ * First month to delete (inclusive). Omit both bounds to delete every matching API-booked value.
489
+ */
490
+ month_start?: string;
491
+ /**
492
+ * Last month to delete (inclusive).
493
+ */
494
+ month_end?: string;
495
+ };
496
+ url: '/key-metrics/';
497
+ };
498
+ export type DeleteKeyMetricsErrors = {
499
+ /**
500
+ * Missing or invalid API key.
501
+ */
502
+ 401: ApiErrorOutput;
503
+ /**
504
+ * Invalid payload: every offending field is listed and nothing was written.
505
+ */
506
+ 422: InvalidPayloadOutput;
507
+ };
508
+ export type DeleteKeyMetricsError = DeleteKeyMetricsErrors[keyof DeleteKeyMetricsErrors];
509
+ export type DeleteKeyMetricsResponses = {
510
+ /**
511
+ * Success.
512
+ */
513
+ 200: RevenueOrKeyMetricDeletedRowOutput;
514
+ };
515
+ export type DeleteKeyMetricsResponse = DeleteKeyMetricsResponses[keyof DeleteKeyMetricsResponses];
516
+ export type GetKeyMetricsData = {
517
+ body?: never;
518
+ path?: never;
519
+ query?: {
520
+ /**
521
+ * Return only these users' key metrics (repeat the param for several). Omit to return every user's.
522
+ */
523
+ user_names?: Array<string>;
524
+ /**
525
+ * Opaque cursor from a previous page's next_cursor.
526
+ */
527
+ cursor?: string;
528
+ limit?: number;
529
+ };
530
+ url: '/key-metrics/';
531
+ };
532
+ export type GetKeyMetricsErrors = {
533
+ /**
534
+ * Missing or invalid API key.
535
+ */
536
+ 401: ApiErrorOutput;
537
+ };
538
+ export type GetKeyMetricsError = GetKeyMetricsErrors[keyof GetKeyMetricsErrors];
539
+ export type GetKeyMetricsResponses = {
540
+ /**
541
+ * Success.
542
+ */
543
+ 200: KeyMetricOutput;
544
+ };
545
+ export type GetKeyMetricsResponse = GetKeyMetricsResponses[keyof GetKeyMetricsResponses];
546
+ export type SetKeyMetricsData = {
547
+ body: SetKeyMetricsInput;
548
+ path?: never;
549
+ query?: never;
550
+ url: '/key-metrics/';
551
+ };
552
+ export type SetKeyMetricsErrors = {
553
+ /**
554
+ * Missing or invalid API key.
555
+ */
556
+ 401: ApiErrorOutput;
557
+ /**
558
+ * Invalid payload: every offending field is listed and nothing was written.
559
+ */
560
+ 422: InvalidPayloadOutput;
561
+ };
562
+ export type SetKeyMetricsError = SetKeyMetricsErrors[keyof SetKeyMetricsErrors];
563
+ export type SetKeyMetricsResponses = {
564
+ /**
565
+ * Success.
566
+ */
567
+ 200: RevenueOrKeyMetricImportedRowOutput;
568
+ };
569
+ export type SetKeyMetricsResponse = SetKeyMetricsResponses[keyof SetKeyMetricsResponses];
570
+ export type DeleteCustomersTagsData = {
571
+ body?: never;
572
+ path?: never;
573
+ query: {
574
+ /**
575
+ * Delete every tag of these customers (repeat the param for several).
576
+ */
577
+ customer_names: Array<string>;
578
+ };
579
+ url: '/customer-tags/';
580
+ };
581
+ export type DeleteCustomersTagsErrors = {
582
+ /**
583
+ * Missing or invalid API key.
584
+ */
585
+ 401: ApiErrorOutput;
586
+ /**
587
+ * Invalid payload: every offending field is listed and nothing was written.
588
+ */
589
+ 422: InvalidPayloadOutput;
590
+ };
591
+ export type DeleteCustomersTagsError = DeleteCustomersTagsErrors[keyof DeleteCustomersTagsErrors];
592
+ export type DeleteCustomersTagsResponses = {
593
+ /**
594
+ * Success.
595
+ */
596
+ 200: TagsDeletedOutput;
597
+ };
598
+ export type DeleteCustomersTagsResponse = DeleteCustomersTagsResponses[keyof DeleteCustomersTagsResponses];
599
+ export type GetCustomersTagsData = {
600
+ body?: never;
601
+ path?: never;
602
+ query?: {
603
+ /**
604
+ * Return only these customers' tags. Omit to return every customer's.
605
+ */
606
+ customer_names?: Array<string>;
607
+ /**
608
+ * Opaque cursor from a previous page's next_cursor.
609
+ */
610
+ cursor?: string;
611
+ limit?: number;
612
+ };
613
+ url: '/customer-tags/';
614
+ };
615
+ export type GetCustomersTagsErrors = {
616
+ /**
617
+ * Missing or invalid API key.
618
+ */
619
+ 401: ApiErrorOutput;
620
+ };
621
+ export type GetCustomersTagsError = GetCustomersTagsErrors[keyof GetCustomersTagsErrors];
622
+ export type GetCustomersTagsResponses = {
623
+ /**
624
+ * Success.
625
+ */
626
+ 200: AllCustomerTagsOutput;
627
+ };
628
+ export type GetCustomersTagsResponse = GetCustomersTagsResponses[keyof GetCustomersTagsResponses];
629
+ export type SetCustomersTagsData = {
630
+ body: SetCustomerTagsInput;
631
+ path?: never;
632
+ query?: never;
633
+ url: '/customer-tags/';
634
+ };
635
+ export type SetCustomersTagsErrors = {
636
+ /**
637
+ * Missing or invalid API key.
638
+ */
639
+ 401: ApiErrorOutput;
640
+ /**
641
+ * Invalid payload: every offending field is listed and nothing was written.
642
+ */
643
+ 422: InvalidPayloadOutput;
644
+ };
645
+ export type SetCustomersTagsError = SetCustomersTagsErrors[keyof SetCustomersTagsErrors];
646
+ export type SetCustomersTagsResponses = {
647
+ /**
648
+ * Success.
649
+ */
650
+ 200: CustomersUpdatedOutput;
651
+ };
652
+ export type SetCustomersTagsResponse = SetCustomersTagsResponses[keyof SetCustomersTagsResponses];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file is auto-generated by @hey-api/openapi-ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Entry point for the Weflayr public API (revenue, key metrics, customer tags).
3
+ *
4
+ * The endpoint functions and types under ./generated are produced from the
5
+ * platform's OpenAPI spec (`make generate-sdk-api-clients`) and speak the
6
+ * wire's snake_case, same as the Python SDK. generated/facade.gen.ts (also
7
+ * produced by that command, via scripts/generate_facade.mjs) wraps every
8
+ * endpoint so JS callers use camelCase instead - see ./caseConversion and
9
+ * ./makeEndpoint. This module is the handwritten front door that configures
10
+ * their client:
11
+ *
12
+ * const weflayr = require('weflayr');
13
+ *
14
+ * const apiClient = weflayr.client({ apiKey: 'wf-...' });
15
+ * const { data } = await weflayr.api.getRevenue({ client: apiClient, throwOnError: true });
16
+ */
17
+ import { type Client } from './generated/client';
18
+ export declare const DEFAULT_BASE_URL = "https://app.weflayr.com/api";
19
+ export interface ApiClientOptions {
20
+ /** A project API key, created in the Weflayr dashboard. Defaults to the `WEFLAYR_API_KEY` environment variable. */
21
+ apiKey?: string;
22
+ /** Where the API lives — override for local or self-hosted deployments. */
23
+ baseUrl?: string;
24
+ }
25
+ /** A client for the public API, authenticated with a project API key. */
26
+ export declare function client(options?: ApiClientOptions): Client;
27
+ export * from './generated/facade.gen';