weflayr 0.22.2 → 0.24.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.
Files changed (42) hide show
  1. package/dist/api/generated/facade.gen.d.ts +102 -0
  2. package/dist/api/generated/facade.gen.js +8 -1
  3. package/dist/api/generated/index.d.ts +2 -2
  4. package/dist/api/generated/index.js +8 -1
  5. package/dist/api/generated/sdk.gen.d.ts +29 -1
  6. package/dist/api/generated/sdk.gen.js +64 -1
  7. package/dist/api/generated/types.gen.d.ts +356 -3
  8. package/index.d.ts +5 -2
  9. package/package.json +1 -1
  10. package/src/api/generated/facade.gen.ts +42 -0
  11. package/src/api/generated/index.ts +2 -2
  12. package/src/api/generated/sdk.gen.ts +64 -1
  13. package/src/api/generated/types.gen.ts +400 -3
  14. package/src/auto-instrument.js +1 -0
  15. package/src/instrumentation/anthropic/get_cache_and_reasoning_telemetry.js +11 -0
  16. package/src/instrumentation/anthropic/get_cache_config_telemetry.js +90 -0
  17. package/src/instrumentation/anthropic/get_tool_definitions_telemetry.js +6 -1
  18. package/src/instrumentation/anthropic/set_telemetry_attributes.js +2 -0
  19. package/src/instrumentation/bedrock/get_cache_config_telemetry.js +106 -0
  20. package/src/instrumentation/bedrock/get_cache_telemetry.js +11 -6
  21. package/src/instrumentation/bedrock/set_telemetry_attributes.js +6 -2
  22. package/src/instrumentation/google/get_cache_operations_telemetry.js +171 -0
  23. package/src/instrumentation/google/get_cache_telemetry.js +16 -2
  24. package/src/instrumentation/google/set_telemetry_attributes.js +8 -2
  25. package/src/instrumentation/openai/get_cache_config_telemetry.js +63 -0
  26. package/src/instrumentation/openai/set_telemetry_attributes.js +2 -0
  27. package/src/instrumentation/vercel/full_instrumentation.js +10 -2
  28. package/src/instrumentation/vercel/get_cache_creation_telemetry.js +70 -0
  29. package/src/otel/propagation.js +22 -9
  30. package/src/otel/span-filter.js +12 -12
  31. package/src/otel/span-processor.js +8 -0
  32. package/src/otel/vercel-ai-sdk-span-filter.js +1 -1
  33. package/tests/api/index.test.js +76 -0
  34. package/tests/index.test.js +67 -7
  35. package/tests/instrumentation/anthropic/get_cache_and_reasoning_telemetry.test.js +23 -0
  36. package/tests/instrumentation/anthropic/get_cache_config_telemetry.test.js +92 -0
  37. package/tests/instrumentation/anthropic/get_tool_definitions_telemetry.test.js +15 -0
  38. package/tests/instrumentation/bedrock/get_cache_config_telemetry.test.js +107 -0
  39. package/tests/instrumentation/bedrock/get_cache_telemetry.test.js +16 -0
  40. package/tests/instrumentation/google/get_cache_operations_telemetry.test.js +130 -0
  41. package/tests/instrumentation/openai/get_cache_config_telemetry.test.js +83 -0
  42. package/tests/instrumentation/vercel/get_cache_creation_telemetry.test.js +96 -0
@@ -31,6 +31,54 @@ 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
+ };
65
+ /**
66
+ * CustomerOutput
67
+ *
68
+ * One customer, with its tags when requested (an empty dict otherwise).
69
+ */
70
+ export type CustomerOutput = {
71
+ /**
72
+ * Customer Name
73
+ */
74
+ customer_name: string;
75
+ /**
76
+ * Customer Tags
77
+ */
78
+ customer_tags: {
79
+ [key: string]: string;
80
+ };
81
+ };
34
82
  /**
35
83
  * CustomerTags
36
84
  *
@@ -65,6 +113,25 @@ export type CustomerTagsOutput = {
65
113
  [key: string]: string;
66
114
  };
67
115
  };
116
+ /**
117
+ * CustomersOutput
118
+ *
119
+ * The customers GET response: every known customer of the project.
120
+ */
121
+ export type CustomersOutput = {
122
+ /**
123
+ * Customers
124
+ */
125
+ customers: Array<CustomerOutput>;
126
+ /**
127
+ * Next Cursor
128
+ */
129
+ next_cursor: string | null;
130
+ /**
131
+ * Has More
132
+ */
133
+ has_more: boolean;
134
+ };
68
135
  /**
69
136
  * CustomersUpdatedOutput
70
137
  *
@@ -80,6 +147,17 @@ export type CustomersUpdatedOutput = {
80
147
  */
81
148
  customers_updated: number;
82
149
  };
150
+ /**
151
+ * FeaturesOutput
152
+ *
153
+ * A features GET response: every distinct feature tag seen for the project.
154
+ */
155
+ export type FeaturesOutput = {
156
+ /**
157
+ * Features
158
+ */
159
+ features: Array<string>;
160
+ };
83
161
  /**
84
162
  * InvalidFieldDetail
85
163
  *
@@ -199,6 +277,75 @@ export type KeyMetricRowOutput = {
199
277
  */
200
278
  user_name: string;
201
279
  };
280
+ /**
281
+ * MarginListOutput
282
+ *
283
+ * Margin GET response: one row per customer with booked revenue, sorted by
284
+ * customer_name ascending.
285
+ */
286
+ export type MarginListOutput = {
287
+ /**
288
+ * Rows
289
+ */
290
+ rows: Array<CustomerMarginRow>;
291
+ /**
292
+ * Next Cursor
293
+ */
294
+ next_cursor: string | null;
295
+ /**
296
+ * Has More
297
+ */
298
+ has_more: boolean;
299
+ };
300
+ /**
301
+ * ModelsOutput
302
+ *
303
+ * A models GET response: every distinct model name seen for the project.
304
+ */
305
+ export type ModelsOutput = {
306
+ /**
307
+ * Models
308
+ */
309
+ models: Array<string>;
310
+ };
311
+ /**
312
+ * ProjectOutput
313
+ *
314
+ * A project GET response: static identity of the project.
315
+ */
316
+ export type ProjectOutput = {
317
+ /**
318
+ * Name
319
+ */
320
+ name: string;
321
+ /**
322
+ * Project Type
323
+ */
324
+ project_type: 'revenue' | 'internal';
325
+ /**
326
+ * Key Metric Names
327
+ */
328
+ key_metric_names: Array<string>;
329
+ /**
330
+ * Environment
331
+ */
332
+ environment: 'dev' | 'pre-prod' | 'staging' | 'prod';
333
+ /**
334
+ * Created At
335
+ */
336
+ created_at: string;
337
+ };
338
+ /**
339
+ * ProvidersOutput
340
+ *
341
+ * A providers GET response: every distinct provider name seen for the project.
342
+ */
343
+ export type ProvidersOutput = {
344
+ /**
345
+ * Providers
346
+ */
347
+ providers: Array<string>;
348
+ };
202
349
  /**
203
350
  * RevenueOrKeyMetricDeletedRowOutput
204
351
  *
@@ -385,6 +532,73 @@ export type TagsDeletedOutput = {
385
532
  */
386
533
  tags_deleted: number;
387
534
  };
535
+ /**
536
+ * TagsOutput
537
+ *
538
+ * A tags GET response: facets of every tag dimension seen on the project.
539
+ *
540
+ * Either field is an empty dict when its include_* flag was false.
541
+ */
542
+ export type TagsOutput = {
543
+ /**
544
+ * Run Tags
545
+ */
546
+ run_tags: {
547
+ [key: string]: Array<string>;
548
+ };
549
+ /**
550
+ * Customer Tags
551
+ */
552
+ customer_tags: {
553
+ [key: string]: Array<string>;
554
+ };
555
+ };
556
+ export type GetMarginData = {
557
+ body?: never;
558
+ path?: never;
559
+ query?: {
560
+ /**
561
+ * Return only these customers' margin. Omit to return every customer's.
562
+ */
563
+ customer_names?: Array<string>;
564
+ /**
565
+ * Opaque cursor from a previous page's next_cursor.
566
+ */
567
+ cursor?: string;
568
+ limit?: number;
569
+ /**
570
+ * Start of the period (inclusive), YYYY-MM-DD. Defaults to 30 days ago.
571
+ */
572
+ date_from?: string;
573
+ /**
574
+ * End of the period (inclusive), YYYY-MM-DD. Defaults to today.
575
+ */
576
+ date_to?: string;
577
+ /**
578
+ * Apply free-credit discounts to cost. Defaults to false.
579
+ */
580
+ apply_credits?: boolean;
581
+ };
582
+ url: '/margin/';
583
+ };
584
+ export type GetMarginErrors = {
585
+ /**
586
+ * Invalid request for this project type.
587
+ */
588
+ 400: ApiErrorOutput;
589
+ /**
590
+ * Missing or invalid API key.
591
+ */
592
+ 401: ApiErrorOutput;
593
+ };
594
+ export type GetMarginError = GetMarginErrors[keyof GetMarginErrors];
595
+ export type GetMarginResponses = {
596
+ /**
597
+ * Success.
598
+ */
599
+ 200: MarginListOutput;
600
+ };
601
+ export type GetMarginResponse = GetMarginResponses[keyof GetMarginResponses];
388
602
  export type DeleteRevenueData = {
389
603
  body?: never;
390
604
  path?: never;
@@ -427,7 +641,7 @@ export type GetRevenueData = {
427
641
  path?: never;
428
642
  query?: {
429
643
  /**
430
- * Return only these customers' revenue (repeat the param for several). Omit to return every customer's.
644
+ * Return only these customers' revenue. Omit to return every customer's.
431
645
  */
432
646
  customer_names?: Array<string>;
433
647
  /**
@@ -518,7 +732,7 @@ export type GetKeyMetricsData = {
518
732
  path?: never;
519
733
  query?: {
520
734
  /**
521
- * Return only these users' key metrics (repeat the param for several). Omit to return every user's.
735
+ * Return only these users' key metrics. Omit to return every user's.
522
736
  */
523
737
  user_names?: Array<string>;
524
738
  /**
@@ -572,7 +786,7 @@ export type DeleteCustomersTagsData = {
572
786
  path?: never;
573
787
  query: {
574
788
  /**
575
- * Delete every tag of these customers (repeat the param for several).
789
+ * Delete every tag of these customers.
576
790
  */
577
791
  customer_names: Array<string>;
578
792
  };
@@ -650,3 +864,142 @@ export type SetCustomersTagsResponses = {
650
864
  200: CustomersUpdatedOutput;
651
865
  };
652
866
  export type SetCustomersTagsResponse = SetCustomersTagsResponses[keyof SetCustomersTagsResponses];
867
+ export type GetProjectData = {
868
+ body?: never;
869
+ path?: never;
870
+ query?: never;
871
+ url: '/project/';
872
+ };
873
+ export type GetProjectErrors = {
874
+ /**
875
+ * Missing or invalid API key.
876
+ */
877
+ 401: ApiErrorOutput;
878
+ };
879
+ export type GetProjectError = GetProjectErrors[keyof GetProjectErrors];
880
+ export type GetProjectResponses = {
881
+ /**
882
+ * Success.
883
+ */
884
+ 200: ProjectOutput;
885
+ };
886
+ export type GetProjectResponse = GetProjectResponses[keyof GetProjectResponses];
887
+ export type GetTagsData = {
888
+ body?: never;
889
+ path?: never;
890
+ query?: {
891
+ /**
892
+ * Include run-tag facets. Defaults to true.
893
+ */
894
+ include_run_tags?: boolean;
895
+ /**
896
+ * Include customer-tag facets. Defaults to true.
897
+ */
898
+ include_customer_tags?: boolean;
899
+ };
900
+ url: '/tags/';
901
+ };
902
+ export type GetTagsErrors = {
903
+ /**
904
+ * Missing or invalid API key.
905
+ */
906
+ 401: ApiErrorOutput;
907
+ };
908
+ export type GetTagsError = GetTagsErrors[keyof GetTagsErrors];
909
+ export type GetTagsResponses = {
910
+ /**
911
+ * Success.
912
+ */
913
+ 200: TagsOutput;
914
+ };
915
+ export type GetTagsResponse = GetTagsResponses[keyof GetTagsResponses];
916
+ export type GetModelsData = {
917
+ body?: never;
918
+ path?: never;
919
+ query?: never;
920
+ url: '/models/';
921
+ };
922
+ export type GetModelsErrors = {
923
+ /**
924
+ * Missing or invalid API key.
925
+ */
926
+ 401: ApiErrorOutput;
927
+ };
928
+ export type GetModelsError = GetModelsErrors[keyof GetModelsErrors];
929
+ export type GetModelsResponses = {
930
+ /**
931
+ * Success.
932
+ */
933
+ 200: ModelsOutput;
934
+ };
935
+ export type GetModelsResponse = GetModelsResponses[keyof GetModelsResponses];
936
+ export type GetProvidersData = {
937
+ body?: never;
938
+ path?: never;
939
+ query?: never;
940
+ url: '/providers/';
941
+ };
942
+ export type GetProvidersErrors = {
943
+ /**
944
+ * Missing or invalid API key.
945
+ */
946
+ 401: ApiErrorOutput;
947
+ };
948
+ export type GetProvidersError = GetProvidersErrors[keyof GetProvidersErrors];
949
+ export type GetProvidersResponses = {
950
+ /**
951
+ * Success.
952
+ */
953
+ 200: ProvidersOutput;
954
+ };
955
+ export type GetProvidersResponse = GetProvidersResponses[keyof GetProvidersResponses];
956
+ export type GetCustomersData = {
957
+ body?: never;
958
+ path?: never;
959
+ query?: {
960
+ /**
961
+ * Opaque cursor from a previous page's next_cursor.
962
+ */
963
+ cursor?: string;
964
+ limit?: number;
965
+ /**
966
+ * Include each customer's tags. Defaults to true.
967
+ */
968
+ include_customer_tags?: boolean;
969
+ };
970
+ url: '/customers/';
971
+ };
972
+ export type GetCustomersErrors = {
973
+ /**
974
+ * Missing or invalid API key.
975
+ */
976
+ 401: ApiErrorOutput;
977
+ };
978
+ export type GetCustomersError = GetCustomersErrors[keyof GetCustomersErrors];
979
+ export type GetCustomersResponses = {
980
+ /**
981
+ * Success.
982
+ */
983
+ 200: CustomersOutput;
984
+ };
985
+ export type GetCustomersResponse = GetCustomersResponses[keyof GetCustomersResponses];
986
+ export type GetFeaturesData = {
987
+ body?: never;
988
+ path?: never;
989
+ query?: never;
990
+ url: '/features/';
991
+ };
992
+ export type GetFeaturesErrors = {
993
+ /**
994
+ * Missing or invalid API key.
995
+ */
996
+ 401: ApiErrorOutput;
997
+ };
998
+ export type GetFeaturesError = GetFeaturesErrors[keyof GetFeaturesErrors];
999
+ export type GetFeaturesResponses = {
1000
+ /**
1001
+ * Success.
1002
+ */
1003
+ 200: FeaturesOutput;
1004
+ };
1005
+ export type GetFeaturesResponse = GetFeaturesResponses[keyof GetFeaturesResponses];
package/index.d.ts CHANGED
@@ -41,13 +41,14 @@ export const AiSdk: {
41
41
  export type AiSdk = (typeof AiSdk)[keyof typeof AiSdk];
42
42
 
43
43
  /**
44
- * Allowed values for `propagateMetadata({ providerName })`: the actual AI
45
- * providers a call can be attributed to. Unlike AiSdk this names providers,
44
+ * Allowed values for `propagateMetadata({ providerNameOverride })`: the actual
45
+ * AI providers a call can be attributed to. Unlike AiSdk this names providers,
46
46
  * not SDKs — google-genai is an SDK whose calls are labelled gemini or vertex,
47
47
  * and mistral is reached via the OpenAI SDK on the wire but reported as itself.
48
48
  */
49
49
  export const AIProviderName: {
50
50
  readonly OPENAI: 'openai';
51
+ readonly AZURE_OPENAI: 'azure';
51
52
  readonly ANTHROPIC: 'anthropic';
52
53
  readonly BEDROCK: 'bedrock';
53
54
  readonly COHERE: 'cohere';
@@ -112,6 +113,8 @@ export interface PropagateMetadataOptions {
112
113
  * `vercel_ai_gateway` that proxies to OpenAI/Anthropic but should be
113
114
  * reported as the gateway.
114
115
  */
116
+ providerNameOverride?: AIProviderName;
117
+ /** @deprecated Use `providerNameOverride` instead. */
115
118
  providerName?: AIProviderName;
116
119
  /**
117
120
  * Arbitrary scalar key/value pairs to attach. Values must be `string`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weflayr",
3
- "version": "0.22.2",
3
+ "version": "0.24.0",
4
4
  "description": "Weflayr Node.js SDK — instrument any LLM client via JS Proxy",
5
5
  "main": "src/index.js",
6
6
  "types": "index.d.ts",
@@ -7,6 +7,12 @@ import * as generated from './sdk.gen.js';
7
7
  import type * as generatedTypes from './types.gen.js';
8
8
 
9
9
 
10
+ export const getMargin = makeEndpoint<
11
+ CamelCaseDeep<Omit<generatedTypes.GetMarginData, 'url'>>,
12
+ CamelCaseDeep<generatedTypes.GetMarginResponse>,
13
+ CamelCaseDeep<generatedTypes.GetMarginError>
14
+ >(generated.getMargin);
15
+
10
16
  export const deleteRevenue = makeEndpoint<
11
17
  CamelCaseDeep<Omit<generatedTypes.DeleteRevenueData, 'url'>>,
12
18
  CamelCaseDeep<generatedTypes.DeleteRevenueResponse>,
@@ -60,3 +66,39 @@ export const setCustomersTags = makeEndpoint<
60
66
  CamelCaseDeep<generatedTypes.SetCustomersTagsResponse>,
61
67
  CamelCaseDeep<generatedTypes.SetCustomersTagsError>
62
68
  >(generated.setCustomersTags);
69
+
70
+ export const getProject = makeEndpoint<
71
+ CamelCaseDeep<Omit<generatedTypes.GetProjectData, 'url'>>,
72
+ CamelCaseDeep<generatedTypes.GetProjectResponse>,
73
+ CamelCaseDeep<generatedTypes.GetProjectError>
74
+ >(generated.getProject);
75
+
76
+ export const getTags = makeEndpoint<
77
+ CamelCaseDeep<Omit<generatedTypes.GetTagsData, 'url'>>,
78
+ CamelCaseDeep<generatedTypes.GetTagsResponse>,
79
+ CamelCaseDeep<generatedTypes.GetTagsError>
80
+ >(generated.getTags);
81
+
82
+ export const getModels = makeEndpoint<
83
+ CamelCaseDeep<Omit<generatedTypes.GetModelsData, 'url'>>,
84
+ CamelCaseDeep<generatedTypes.GetModelsResponse>,
85
+ CamelCaseDeep<generatedTypes.GetModelsError>
86
+ >(generated.getModels);
87
+
88
+ export const getProviders = makeEndpoint<
89
+ CamelCaseDeep<Omit<generatedTypes.GetProvidersData, 'url'>>,
90
+ CamelCaseDeep<generatedTypes.GetProvidersResponse>,
91
+ CamelCaseDeep<generatedTypes.GetProvidersError>
92
+ >(generated.getProviders);
93
+
94
+ export const getCustomers = makeEndpoint<
95
+ CamelCaseDeep<Omit<generatedTypes.GetCustomersData, 'url'>>,
96
+ CamelCaseDeep<generatedTypes.GetCustomersResponse>,
97
+ CamelCaseDeep<generatedTypes.GetCustomersError>
98
+ >(generated.getCustomers);
99
+
100
+ export const getFeatures = makeEndpoint<
101
+ CamelCaseDeep<Omit<generatedTypes.GetFeaturesData, 'url'>>,
102
+ CamelCaseDeep<generatedTypes.GetFeaturesResponse>,
103
+ CamelCaseDeep<generatedTypes.GetFeaturesError>
104
+ >(generated.getFeatures);
@@ -1,4 +1,4 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
- export { deleteCustomersTags, deleteKeyMetrics, deleteRevenue, getCustomersTags, getKeyMetrics, getRevenue, type Options, setCustomersTags, setKeyMetrics, setRevenue } from './sdk.gen.js';
4
- export type { AllCustomerTagsOutput, ApiErrorOutput, ClientOptions, CustomersUpdatedOutput, CustomerTags, CustomerTagsOutput, DeleteCustomersTagsData, DeleteCustomersTagsError, DeleteCustomersTagsErrors, DeleteCustomersTagsResponse, DeleteCustomersTagsResponses, DeleteKeyMetricsData, DeleteKeyMetricsError, DeleteKeyMetricsErrors, DeleteKeyMetricsResponse, DeleteKeyMetricsResponses, DeleteRevenueData, DeleteRevenueError, DeleteRevenueErrors, DeleteRevenueResponse, DeleteRevenueResponses, GetCustomersTagsData, GetCustomersTagsError, GetCustomersTagsErrors, GetCustomersTagsResponse, GetCustomersTagsResponses, GetKeyMetricsData, GetKeyMetricsError, GetKeyMetricsErrors, GetKeyMetricsResponse, GetKeyMetricsResponses, GetRevenueData, GetRevenueError, GetRevenueErrors, GetRevenueResponse, GetRevenueResponses, InvalidFieldDetail, InvalidPayloadOutput, KeyMetricOutput, KeyMetricRow, KeyMetricRowOutput, RevenueOrKeyMetricDeletedRowOutput, RevenueOrKeyMetricImportedRowOutput, RevenueOutput, RevenueRow, RevenueRowOutput, SetCustomersTagsData, SetCustomersTagsError, SetCustomersTagsErrors, SetCustomersTagsResponse, SetCustomersTagsResponses, SetCustomerTagsInput, SetKeyMetricsData, SetKeyMetricsError, SetKeyMetricsErrors, SetKeyMetricsInput, SetKeyMetricsResponse, SetKeyMetricsResponses, SetRevenueData, SetRevenueError, SetRevenueErrors, SetRevenueInput, SetRevenueResponse, SetRevenueResponses, TagsDeletedOutput } from './types.gen.js';
3
+ export { deleteCustomersTags, deleteKeyMetrics, deleteRevenue, getCustomers, getCustomersTags, getFeatures, getKeyMetrics, getMargin, getModels, getProject, getProviders, getRevenue, getTags, type Options, setCustomersTags, setKeyMetrics, setRevenue } from './sdk.gen.js';
4
+ export type { AllCustomerTagsOutput, ApiErrorOutput, ClientOptions, CustomerMarginRow, CustomerOutput, CustomersOutput, CustomersUpdatedOutput, CustomerTags, CustomerTagsOutput, DeleteCustomersTagsData, DeleteCustomersTagsError, DeleteCustomersTagsErrors, DeleteCustomersTagsResponse, DeleteCustomersTagsResponses, DeleteKeyMetricsData, DeleteKeyMetricsError, DeleteKeyMetricsErrors, DeleteKeyMetricsResponse, DeleteKeyMetricsResponses, DeleteRevenueData, DeleteRevenueError, DeleteRevenueErrors, DeleteRevenueResponse, DeleteRevenueResponses, FeaturesOutput, GetCustomersData, GetCustomersError, GetCustomersErrors, GetCustomersResponse, GetCustomersResponses, GetCustomersTagsData, GetCustomersTagsError, GetCustomersTagsErrors, GetCustomersTagsResponse, GetCustomersTagsResponses, GetFeaturesData, GetFeaturesError, GetFeaturesErrors, GetFeaturesResponse, GetFeaturesResponses, GetKeyMetricsData, GetKeyMetricsError, GetKeyMetricsErrors, GetKeyMetricsResponse, GetKeyMetricsResponses, GetMarginData, GetMarginError, GetMarginErrors, GetMarginResponse, GetMarginResponses, GetModelsData, GetModelsError, GetModelsErrors, GetModelsResponse, GetModelsResponses, GetProjectData, GetProjectError, GetProjectErrors, GetProjectResponse, GetProjectResponses, GetProvidersData, GetProvidersError, GetProvidersErrors, GetProvidersResponse, GetProvidersResponses, GetRevenueData, GetRevenueError, GetRevenueErrors, GetRevenueResponse, GetRevenueResponses, GetTagsData, GetTagsError, GetTagsErrors, GetTagsResponse, GetTagsResponses, InvalidFieldDetail, InvalidPayloadOutput, KeyMetricOutput, KeyMetricRow, KeyMetricRowOutput, MarginListOutput, ModelsOutput, ProjectOutput, ProvidersOutput, RevenueOrKeyMetricDeletedRowOutput, RevenueOrKeyMetricImportedRowOutput, RevenueOutput, RevenueRow, RevenueRowOutput, SetCustomersTagsData, SetCustomersTagsError, SetCustomersTagsErrors, SetCustomersTagsResponse, SetCustomersTagsResponses, SetCustomerTagsInput, SetKeyMetricsData, SetKeyMetricsError, SetKeyMetricsErrors, SetKeyMetricsInput, SetKeyMetricsResponse, SetKeyMetricsResponses, SetRevenueData, SetRevenueError, SetRevenueErrors, SetRevenueInput, SetRevenueResponse, SetRevenueResponses, TagsDeletedOutput, TagsOutput } from './types.gen.js';
@@ -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 { 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';
5
+ import type { DeleteCustomersTagsData, DeleteCustomersTagsErrors, DeleteCustomersTagsResponses, DeleteKeyMetricsData, DeleteKeyMetricsErrors, DeleteKeyMetricsResponses, DeleteRevenueData, DeleteRevenueErrors, DeleteRevenueResponses, GetCustomersData, GetCustomersErrors, GetCustomersResponses, GetCustomersTagsData, GetCustomersTagsErrors, GetCustomersTagsResponses, GetFeaturesData, GetFeaturesErrors, GetFeaturesResponses, GetKeyMetricsData, GetKeyMetricsErrors, GetKeyMetricsResponses, GetMarginData, GetMarginErrors, GetMarginResponses, GetModelsData, GetModelsErrors, GetModelsResponses, GetProjectData, GetProjectErrors, GetProjectResponses, GetProvidersData, GetProvidersErrors, GetProvidersResponses, GetRevenueData, GetRevenueErrors, GetRevenueResponses, GetTagsData, GetTagsErrors, GetTagsResponses, 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
  /**
@@ -18,6 +18,15 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
18
18
  meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
19
19
  };
20
20
 
21
+ /**
22
+ * Per-customer gross margin, sorted by customer_name ascending; pass customer_names to narrow to specific customers, omit it for every customer's.
23
+ */
24
+ export const getMargin = <ThrowOnError extends boolean = false>(options?: Options<GetMarginData, ThrowOnError>): RequestResult<GetMarginResponses, GetMarginErrors, ThrowOnError> => (options?.client ?? client).get<GetMarginResponses, GetMarginErrors, ThrowOnError>({
25
+ security: [{ scheme: 'bearer', type: 'http' }],
26
+ url: '/margin/',
27
+ ...options
28
+ });
29
+
21
30
  /**
22
31
  * Delete the given customers' API-uploaded revenue values.
23
32
  */
@@ -110,3 +119,57 @@ export const setCustomersTags = <ThrowOnError extends boolean = false>(options:
110
119
  ...options.headers
111
120
  }
112
121
  });
122
+
123
+ /**
124
+ * Static identity of the project: name, type, key metrics, environment and creation date.
125
+ */
126
+ export const getProject = <ThrowOnError extends boolean = false>(options?: Options<GetProjectData, ThrowOnError>): RequestResult<GetProjectResponses, GetProjectErrors, ThrowOnError> => (options?.client ?? client).get<GetProjectResponses, GetProjectErrors, ThrowOnError>({
127
+ security: [{ scheme: 'bearer', type: 'http' }],
128
+ url: '/project/',
129
+ ...options
130
+ });
131
+
132
+ /**
133
+ * {key: [values]} facets for run tags and customer tags; pass include_run_tags/include_customer_tags=false to skip either one.
134
+ */
135
+ export const getTags = <ThrowOnError extends boolean = false>(options?: Options<GetTagsData, ThrowOnError>): RequestResult<GetTagsResponses, GetTagsErrors, ThrowOnError> => (options?.client ?? client).get<GetTagsResponses, GetTagsErrors, ThrowOnError>({
136
+ security: [{ scheme: 'bearer', type: 'http' }],
137
+ url: '/tags/',
138
+ ...options
139
+ });
140
+
141
+ /**
142
+ * Every distinct model name seen for the project.
143
+ */
144
+ export const getModels = <ThrowOnError extends boolean = false>(options?: Options<GetModelsData, ThrowOnError>): RequestResult<GetModelsResponses, GetModelsErrors, ThrowOnError> => (options?.client ?? client).get<GetModelsResponses, GetModelsErrors, ThrowOnError>({
145
+ security: [{ scheme: 'bearer', type: 'http' }],
146
+ url: '/models/',
147
+ ...options
148
+ });
149
+
150
+ /**
151
+ * Every distinct provider name seen for the project.
152
+ */
153
+ export const getProviders = <ThrowOnError extends boolean = false>(options?: Options<GetProvidersData, ThrowOnError>): RequestResult<GetProvidersResponses, GetProvidersErrors, ThrowOnError> => (options?.client ?? client).get<GetProvidersResponses, GetProvidersErrors, ThrowOnError>({
154
+ security: [{ scheme: 'bearer', type: 'http' }],
155
+ url: '/providers/',
156
+ ...options
157
+ });
158
+
159
+ /**
160
+ * Every known customer of the project; pass include_customer_tags=false to omit each customer's tags.
161
+ */
162
+ export const getCustomers = <ThrowOnError extends boolean = false>(options?: Options<GetCustomersData, ThrowOnError>): RequestResult<GetCustomersResponses, GetCustomersErrors, ThrowOnError> => (options?.client ?? client).get<GetCustomersResponses, GetCustomersErrors, ThrowOnError>({
163
+ security: [{ scheme: 'bearer', type: 'http' }],
164
+ url: '/customers/',
165
+ ...options
166
+ });
167
+
168
+ /**
169
+ * Every distinct feature tag seen for the project.
170
+ */
171
+ export const getFeatures = <ThrowOnError extends boolean = false>(options?: Options<GetFeaturesData, ThrowOnError>): RequestResult<GetFeaturesResponses, GetFeaturesErrors, ThrowOnError> => (options?.client ?? client).get<GetFeaturesResponses, GetFeaturesErrors, ThrowOnError>({
172
+ security: [{ scheme: 'bearer', type: 'http' }],
173
+ url: '/features/',
174
+ ...options
175
+ });