weflayr 0.23.0 → 0.26.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/README.md +2 -2
- package/dist/{api → src/api}/generated/facade.gen.d.ts +163 -12
- package/dist/{api → src/api}/generated/facade.gen.js +10 -2
- package/dist/src/api/generated/index.d.ts +2 -0
- package/dist/{api → src/api}/generated/index.js +9 -1
- package/dist/{api → src/api}/generated/sdk.gen.d.ts +35 -3
- package/dist/{api → src/api}/generated/sdk.gen.js +88 -4
- package/{src/api/generated/types.gen.ts → dist/src/api/generated/types.gen.d.ts} +692 -116
- package/dist/{api → src/api}/makeEndpoint.js +1 -3
- package/dist/src/auto-instrument.d.ts +42 -0
- package/dist/src/auto-instrument.js +156 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.js +49 -0
- package/dist/src/instrumentation/anthropic/get_cache_and_reasoning_telemetry.d.ts +20 -0
- package/dist/src/instrumentation/anthropic/get_cache_and_reasoning_telemetry.js +114 -0
- package/dist/src/instrumentation/anthropic/get_cache_config_telemetry.d.ts +28 -0
- package/dist/src/instrumentation/anthropic/get_cache_config_telemetry.js +92 -0
- package/dist/src/instrumentation/anthropic/get_streaming_accumulation_telemetry.d.ts +25 -0
- package/dist/src/instrumentation/anthropic/get_streaming_accumulation_telemetry.js +141 -0
- package/dist/src/instrumentation/anthropic/get_structured_output_schema_telemetry.d.ts +9 -0
- package/dist/src/instrumentation/anthropic/get_structured_output_schema_telemetry.js +17 -0
- package/dist/src/instrumentation/anthropic/get_tool_definitions_telemetry.d.ts +15 -0
- package/dist/src/instrumentation/anthropic/get_tool_definitions_telemetry.js +50 -0
- package/dist/src/instrumentation/anthropic/set_telemetry_attributes.d.ts +15 -0
- package/dist/src/instrumentation/anthropic/set_telemetry_attributes.js +39 -0
- package/dist/src/instrumentation/bedrock/get_cache_config_telemetry.d.ts +22 -0
- package/dist/src/instrumentation/bedrock/get_cache_config_telemetry.js +97 -0
- package/dist/src/instrumentation/bedrock/get_cache_telemetry.d.ts +22 -0
- package/dist/src/instrumentation/bedrock/get_cache_telemetry.js +102 -0
- package/dist/src/instrumentation/bedrock/get_input_message_content_telemetry.d.ts +15 -0
- package/dist/src/instrumentation/bedrock/get_input_message_content_telemetry.js +91 -0
- package/dist/src/instrumentation/bedrock/get_model_id_telemetry.d.ts +21 -0
- package/dist/src/instrumentation/bedrock/get_model_id_telemetry.js +54 -0
- package/dist/src/instrumentation/bedrock/get_reasoning_output_telemetry.d.ts +19 -0
- package/dist/src/instrumentation/bedrock/get_reasoning_output_telemetry.js +81 -0
- package/dist/src/instrumentation/bedrock/get_streaming_output_message_telemetry.d.ts +27 -0
- package/dist/src/instrumentation/bedrock/get_streaming_output_message_telemetry.js +126 -0
- package/dist/src/instrumentation/bedrock/get_tool_call_output_telemetry.d.ts +17 -0
- package/dist/src/instrumentation/bedrock/get_tool_call_output_telemetry.js +85 -0
- package/dist/src/instrumentation/bedrock/get_tool_definitions_telemetry.d.ts +15 -0
- package/dist/src/instrumentation/bedrock/get_tool_definitions_telemetry.js +68 -0
- package/dist/src/instrumentation/bedrock/set_telemetry_attributes.d.ts +18 -0
- package/dist/src/instrumentation/bedrock/set_telemetry_attributes.js +47 -0
- package/dist/src/instrumentation/cohere/get_chat_telemetry.d.ts +23 -0
- package/dist/src/instrumentation/cohere/get_chat_telemetry.js +77 -0
- package/dist/src/instrumentation/cohere/get_embeddings_telemetry.d.ts +18 -0
- package/dist/src/instrumentation/cohere/get_embeddings_telemetry.js +88 -0
- package/dist/src/instrumentation/cohere/get_structured_output_schema_telemetry.d.ts +12 -0
- package/dist/src/instrumentation/cohere/get_structured_output_schema_telemetry.js +18 -0
- package/dist/src/instrumentation/cohere/get_tool_call_output_telemetry.d.ts +31 -0
- package/dist/src/instrumentation/cohere/get_tool_call_output_telemetry.js +106 -0
- package/dist/src/instrumentation/cohere/get_tool_definitions_telemetry.d.ts +27 -0
- package/dist/src/instrumentation/cohere/get_tool_definitions_telemetry.js +75 -0
- package/dist/src/instrumentation/cohere/set_telemetry_attributes.d.ts +17 -0
- package/dist/src/instrumentation/cohere/set_telemetry_attributes.js +44 -0
- package/dist/src/instrumentation/elevenlabs/full_instrumentation.d.ts +28 -0
- package/dist/src/instrumentation/elevenlabs/full_instrumentation.js +209 -0
- package/dist/src/instrumentation/google/get_audio_telemetry.d.ts +9 -0
- package/dist/src/instrumentation/google/get_audio_telemetry.js +28 -0
- package/dist/src/instrumentation/google/get_cache_operations_telemetry.d.ts +23 -0
- package/dist/src/instrumentation/google/get_cache_operations_telemetry.js +154 -0
- package/dist/src/instrumentation/google/get_cache_telemetry.d.ts +16 -0
- package/dist/src/instrumentation/google/get_cache_telemetry.js +38 -0
- package/dist/src/instrumentation/google/get_embeddings_telemetry.d.ts +12 -0
- package/dist/src/instrumentation/google/get_embeddings_telemetry.js +85 -0
- package/dist/src/instrumentation/google/get_provider_name.d.ts +11 -0
- package/{src → dist/src}/instrumentation/google/get_provider_name.js +11 -12
- package/{src/instrumentation/google/get_reasoning_telemetry.js → dist/src/instrumentation/google/get_reasoning_telemetry.d.ts} +1 -11
- package/dist/src/instrumentation/google/get_reasoning_telemetry.js +21 -0
- package/dist/src/instrumentation/google/get_structured_output_schema_telemetry.d.ts +12 -0
- package/dist/src/instrumentation/google/get_structured_output_schema_telemetry.js +19 -0
- package/dist/src/instrumentation/google/set_telemetry_attributes.d.ts +18 -0
- package/dist/src/instrumentation/google/set_telemetry_attributes.js +98 -0
- package/dist/src/instrumentation/openai/get_audio_telemetry.d.ts +25 -0
- package/dist/src/instrumentation/openai/get_audio_telemetry.js +123 -0
- package/dist/src/instrumentation/openai/get_bedrock_mantle_telemetry.d.ts +35 -0
- package/dist/src/instrumentation/openai/get_bedrock_mantle_telemetry.js +148 -0
- package/dist/src/instrumentation/openai/get_cache_and_reasoning_telemetry.d.ts +27 -0
- package/dist/src/instrumentation/openai/get_cache_and_reasoning_telemetry.js +72 -0
- package/dist/src/instrumentation/openai/get_cache_config_telemetry.d.ts +28 -0
- package/dist/src/instrumentation/openai/get_cache_config_telemetry.js +91 -0
- package/dist/src/instrumentation/openai/get_embeddings_telemetry.d.ts +18 -0
- package/dist/src/instrumentation/openai/get_embeddings_telemetry.js +86 -0
- package/dist/src/instrumentation/openai/get_streaming_usage.d.ts +21 -0
- package/dist/src/instrumentation/openai/get_streaming_usage.js +74 -0
- package/dist/src/instrumentation/openai/get_structured_output_schema_telemetry.d.ts +12 -0
- package/dist/src/instrumentation/openai/get_structured_output_schema_telemetry.js +20 -0
- package/dist/src/instrumentation/openai/set_telemetry_attributes.d.ts +17 -0
- package/dist/src/instrumentation/openai/set_telemetry_attributes.js +47 -0
- package/dist/src/instrumentation/shared/get_structured_output_schema_telemetry.d.ts +35 -0
- package/dist/src/instrumentation/shared/get_structured_output_schema_telemetry.js +76 -0
- package/dist/src/instrumentation/vercel/full_instrumentation.d.ts +3 -0
- package/dist/src/instrumentation/vercel/full_instrumentation.js +54 -0
- package/dist/src/instrumentation/vercel/get_cache_creation_telemetry.d.ts +22 -0
- package/dist/src/instrumentation/vercel/get_cache_creation_telemetry.js +66 -0
- package/dist/src/instrumentation/vercel/get_structured_output_schema_telemetry.d.ts +24 -0
- package/dist/src/instrumentation/vercel/get_structured_output_schema_telemetry.js +84 -0
- package/dist/src/logger.d.ts +1 -0
- package/dist/src/logger.js +6 -0
- package/dist/src/otel/exporter.d.ts +19 -0
- package/dist/src/otel/exporter.js +94 -0
- package/dist/src/otel/propagation.d.ts +46 -0
- package/dist/src/otel/propagation.js +110 -0
- package/dist/src/otel/span-filter.d.ts +3 -0
- package/dist/src/otel/span-filter.js +61 -0
- package/dist/src/otel/span-processor.d.ts +55 -0
- package/dist/src/otel/span-processor.js +169 -0
- package/dist/src/otel/vercel-ai-sdk-span-filter.d.ts +12 -0
- package/dist/src/otel/vercel-ai-sdk-span-filter.js +88 -0
- package/dist/src/setup.d.ts +50 -0
- package/dist/src/setup.js +155 -0
- package/package.json +11 -5
- package/.prettierignore +0 -2
- package/.prettierrc.json +0 -7
- package/LICENSE-MIT +0 -21
- package/NOTICE +0 -12
- package/dist/api/generated/index.d.ts +0 -2
- package/dist/api/generated/types.gen.d.ts +0 -749
- package/eslint.config.mjs +0 -36
- package/index.d.ts +0 -167
- package/openapi-ts.config.mjs +0 -9
- package/scripts/generate_facade.mjs +0 -86
- package/src/api/caseConversion.ts +0 -58
- package/src/api/generated/client/client.gen.ts +0 -277
- package/src/api/generated/client/index.ts +0 -27
- package/src/api/generated/client/types.gen.ts +0 -218
- package/src/api/generated/client/utils.gen.ts +0 -316
- package/src/api/generated/client.gen.ts +0 -16
- package/src/api/generated/core/auth.gen.ts +0 -48
- package/src/api/generated/core/bodySerializer.gen.ts +0 -82
- package/src/api/generated/core/params.gen.ts +0 -178
- package/src/api/generated/core/pathSerializer.gen.ts +0 -171
- package/src/api/generated/core/queryKeySerializer.gen.ts +0 -117
- package/src/api/generated/core/serverSentEvents.gen.ts +0 -242
- package/src/api/generated/core/types.gen.ts +0 -110
- package/src/api/generated/core/utils.gen.ts +0 -140
- package/src/api/generated/facade.gen.ts +0 -68
- package/src/api/generated/index.ts +0 -4
- package/src/api/generated/sdk.gen.ts +0 -121
- package/src/api/index.ts +0 -45
- package/src/api/makeEndpoint.ts +0 -54
- package/src/auto-instrument.js +0 -171
- package/src/index.js +0 -19
- package/src/instrumentation/anthropic/get_cache_and_reasoning_telemetry.js +0 -107
- package/src/instrumentation/anthropic/get_streaming_stop_reason_telemetry.js +0 -121
- package/src/instrumentation/anthropic/get_tool_definitions_telemetry.js +0 -50
- package/src/instrumentation/anthropic/set_telemetry_attributes.js +0 -37
- package/src/instrumentation/bedrock/get_cache_telemetry.js +0 -104
- package/src/instrumentation/bedrock/get_input_message_content_telemetry.js +0 -94
- package/src/instrumentation/bedrock/get_streaming_output_message_telemetry.js +0 -87
- package/src/instrumentation/bedrock/set_telemetry_attributes.js +0 -36
- package/src/instrumentation/cohere/get_chat_telemetry.js +0 -88
- package/src/instrumentation/cohere/get_embeddings_telemetry.js +0 -107
- package/src/instrumentation/cohere/set_telemetry_attributes.js +0 -32
- package/src/instrumentation/elevenlabs/full_instrumentation.js +0 -236
- package/src/instrumentation/google/get_audio_telemetry.js +0 -30
- package/src/instrumentation/google/get_cache_telemetry.js +0 -25
- package/src/instrumentation/google/get_embeddings_telemetry.js +0 -99
- package/src/instrumentation/google/set_telemetry_attributes.js +0 -98
- package/src/instrumentation/openai/get_audio_telemetry.js +0 -149
- package/src/instrumentation/openai/get_cache_and_reasoning_telemetry.js +0 -71
- package/src/instrumentation/openai/get_embeddings_telemetry.js +0 -107
- package/src/instrumentation/openai/get_streaming_usage.js +0 -81
- package/src/instrumentation/openai/set_telemetry_attributes.js +0 -39
- package/src/instrumentation/vercel/full_instrumentation.js +0 -44
- package/src/logger.js +0 -8
- package/src/otel/exporter.js +0 -108
- package/src/otel/propagation.js +0 -133
- package/src/otel/span-filter.js +0 -69
- package/src/otel/span-processor.js +0 -162
- package/src/otel/vercel-ai-sdk-span-filter.js +0 -79
- package/src/setup.js +0 -167
- package/tests/api/index.test.js +0 -437
- package/tests/index.test.js +0 -824
- package/tests/instrumentation/anthropic/get_cache_and_reasoning_telemetry.test.js +0 -158
- package/tests/instrumentation/anthropic/get_streaming_stop_reason_telemetry.test.js +0 -117
- package/tests/instrumentation/anthropic/get_tool_definitions_telemetry.test.js +0 -82
- package/tests/instrumentation/bedrock/get_cache_telemetry.test.js +0 -102
- package/tests/instrumentation/bedrock/get_input_message_content_telemetry.test.js +0 -89
- package/tests/instrumentation/bedrock/get_streaming_output_message_telemetry.test.js +0 -87
- package/tests/instrumentation/cohere/get_chat_telemetry.test.js +0 -148
- package/tests/instrumentation/cohere/get_embeddings_telemetry.test.js +0 -132
- package/tests/instrumentation/elevenlabs/full_instrumentation.test.js +0 -258
- package/tests/instrumentation/google/get_embeddings_telemetry.test.js +0 -128
- package/tests/instrumentation/google/get_reasoning_telemetry.test.js +0 -41
- package/tests/instrumentation/google/set_telemetry_attributes.test.js +0 -219
- package/tests/instrumentation/openai/get_audio_telemetry.test.js +0 -170
- package/tests/instrumentation/openai/get_cache_and_reasoning_telemetry.test.js +0 -83
- package/tests/instrumentation/openai/get_embeddings_telemetry.test.js +0 -145
- package/tests/instrumentation/openai/get_streaming_usage.test.js +0 -105
- package/tests/instrumentation/vercel/full_instrumentation.test.js +0 -16
- package/tests/otel/vercel-ai-sdk-span-filter.test.js +0 -159
- package/tsconfig.json +0 -18
- /package/dist/{api → src/api}/caseConversion.d.ts +0 -0
- /package/dist/{api → src/api}/caseConversion.js +0 -0
- /package/dist/{api → src/api}/generated/client/client.gen.d.ts +0 -0
- /package/dist/{api → src/api}/generated/client/client.gen.js +0 -0
- /package/dist/{api → src/api}/generated/client/index.d.ts +0 -0
- /package/dist/{api → src/api}/generated/client/index.js +0 -0
- /package/dist/{api → src/api}/generated/client/types.gen.d.ts +0 -0
- /package/dist/{api → src/api}/generated/client/types.gen.js +0 -0
- /package/dist/{api → src/api}/generated/client/utils.gen.d.ts +0 -0
- /package/dist/{api → src/api}/generated/client/utils.gen.js +0 -0
- /package/dist/{api → src/api}/generated/client.gen.d.ts +0 -0
- /package/dist/{api → src/api}/generated/client.gen.js +0 -0
- /package/dist/{api → src/api}/generated/core/auth.gen.d.ts +0 -0
- /package/dist/{api → src/api}/generated/core/auth.gen.js +0 -0
- /package/dist/{api → src/api}/generated/core/bodySerializer.gen.d.ts +0 -0
- /package/dist/{api → src/api}/generated/core/bodySerializer.gen.js +0 -0
- /package/dist/{api → src/api}/generated/core/params.gen.d.ts +0 -0
- /package/dist/{api → src/api}/generated/core/params.gen.js +0 -0
- /package/dist/{api → src/api}/generated/core/pathSerializer.gen.d.ts +0 -0
- /package/dist/{api → src/api}/generated/core/pathSerializer.gen.js +0 -0
- /package/dist/{api → src/api}/generated/core/queryKeySerializer.gen.d.ts +0 -0
- /package/dist/{api → src/api}/generated/core/queryKeySerializer.gen.js +0 -0
- /package/dist/{api → src/api}/generated/core/serverSentEvents.gen.d.ts +0 -0
- /package/dist/{api → src/api}/generated/core/serverSentEvents.gen.js +0 -0
- /package/dist/{api → src/api}/generated/core/types.gen.d.ts +0 -0
- /package/dist/{api → src/api}/generated/core/types.gen.js +0 -0
- /package/dist/{api → src/api}/generated/core/utils.gen.d.ts +0 -0
- /package/dist/{api → src/api}/generated/core/utils.gen.js +0 -0
- /package/dist/{api → src/api}/generated/types.gen.js +0 -0
- /package/dist/{api → src/api}/index.d.ts +0 -0
- /package/dist/{api → src/api}/index.js +0 -0
- /package/dist/{api → src/api}/makeEndpoint.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,30 +1,70 @@
|
|
|
1
1
|
import type { CamelCaseDeep } from '../caseConversion.js';
|
|
2
2
|
import type * as generatedTypes from './types.gen.js';
|
|
3
|
-
export declare const
|
|
4
|
-
query?:
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export declare const getCosts: (options: import("../makeEndpoint.js").ClientOption & {
|
|
4
|
+
query?: undefined;
|
|
5
|
+
body: {
|
|
6
|
+
dateFrom: string;
|
|
7
|
+
dateTo?: string | undefined;
|
|
8
|
+
applyCredits?: boolean | undefined;
|
|
9
|
+
aggregate?: "day" | "week" | "month" | "quarter" | "year" | "all" | undefined;
|
|
10
|
+
groupBy?: "customer" | "feature" | "model" | "provider" | null | undefined;
|
|
11
|
+
customers?: string[] | undefined;
|
|
12
|
+
features?: string[] | undefined;
|
|
13
|
+
models?: string[] | undefined;
|
|
14
|
+
providers?: string[] | undefined;
|
|
15
|
+
cursor?: string | null | undefined;
|
|
7
16
|
limit?: number | undefined;
|
|
8
|
-
|
|
17
|
+
customerTags?: {
|
|
18
|
+
[x: string]: string[];
|
|
19
|
+
} | undefined;
|
|
20
|
+
runTags?: {
|
|
21
|
+
[x: string]: string[];
|
|
22
|
+
} | undefined;
|
|
23
|
+
};
|
|
24
|
+
path?: undefined;
|
|
25
|
+
}) => Promise<import("../makeEndpoint.js").CallResult<{
|
|
26
|
+
rows: {
|
|
27
|
+
dateFrom: string;
|
|
28
|
+
dateTo: string;
|
|
29
|
+
customer?: string | null | undefined;
|
|
30
|
+
feature?: string | null | undefined;
|
|
31
|
+
model?: string | null | undefined;
|
|
32
|
+
provider?: string | null | undefined;
|
|
33
|
+
cost: number;
|
|
34
|
+
avgFeatureRunCost: number;
|
|
35
|
+
maxFeatureRunCost: number;
|
|
36
|
+
}[];
|
|
37
|
+
nextCursor: string | null;
|
|
38
|
+
hasMore: boolean;
|
|
39
|
+
}, CamelCaseDeep<generatedTypes.GetCostsError>>>;
|
|
40
|
+
export declare const getMargin: (options: import("../makeEndpoint.js").ClientOption & {
|
|
41
|
+
query?: undefined;
|
|
42
|
+
body: {
|
|
43
|
+
dateFrom: string;
|
|
9
44
|
dateTo?: string | undefined;
|
|
10
45
|
applyCredits?: boolean | undefined;
|
|
11
|
-
|
|
12
|
-
|
|
46
|
+
aggregate?: "day" | "week" | "month" | "quarter" | "year" | "all" | undefined;
|
|
47
|
+
groupBy?: "customer" | null | undefined;
|
|
48
|
+
customers?: string[] | undefined;
|
|
49
|
+
filterCustomersBasedOnFeatures?: string[] | undefined;
|
|
50
|
+
cursor?: string | null | undefined;
|
|
51
|
+
limit?: number | undefined;
|
|
52
|
+
};
|
|
13
53
|
path?: undefined;
|
|
14
54
|
}) => Promise<import("../makeEndpoint.js").CallResult<{
|
|
15
55
|
rows: {
|
|
16
|
-
|
|
56
|
+
dateFrom: string;
|
|
57
|
+
dateTo: string;
|
|
58
|
+
customer?: string | null | undefined;
|
|
17
59
|
revenue: number;
|
|
18
60
|
cost: number;
|
|
19
61
|
margin: number;
|
|
20
62
|
marginPct: number | null;
|
|
21
|
-
|
|
63
|
+
riskStatus: "healthy" | "watch" | "at_risk" | "unprofitable" | "unknown";
|
|
22
64
|
}[];
|
|
23
65
|
nextCursor: string | null;
|
|
24
66
|
hasMore: boolean;
|
|
25
|
-
},
|
|
26
|
-
error: string;
|
|
27
|
-
}>>;
|
|
67
|
+
}, CamelCaseDeep<generatedTypes.GetMarginError>>>;
|
|
28
68
|
export declare const deleteRevenue: (options: import("../makeEndpoint.js").ClientOption & {
|
|
29
69
|
query: {
|
|
30
70
|
customerNames: string[];
|
|
@@ -176,3 +216,114 @@ export declare const setCustomersTags: (options: import("../makeEndpoint.js").Cl
|
|
|
176
216
|
ok: boolean;
|
|
177
217
|
customersUpdated: number;
|
|
178
218
|
}, CamelCaseDeep<generatedTypes.SetCustomersTagsError>>>;
|
|
219
|
+
export declare const getProject: (options: import("../makeEndpoint.js").ClientOption & {
|
|
220
|
+
query?: undefined;
|
|
221
|
+
body?: undefined;
|
|
222
|
+
path?: undefined;
|
|
223
|
+
}) => Promise<import("../makeEndpoint.js").CallResult<{
|
|
224
|
+
name: string;
|
|
225
|
+
projectType: "revenue" | "internal";
|
|
226
|
+
keyMetricNames: string[];
|
|
227
|
+
environment: "dev" | "pre-prod" | "staging" | "prod";
|
|
228
|
+
createdAt: string;
|
|
229
|
+
}, {
|
|
230
|
+
error: string;
|
|
231
|
+
}>>;
|
|
232
|
+
export declare const getTags: (options: import("../makeEndpoint.js").ClientOption & {
|
|
233
|
+
query?: {
|
|
234
|
+
includeRunTags?: boolean | undefined;
|
|
235
|
+
includeCustomerTags?: boolean | undefined;
|
|
236
|
+
} | undefined;
|
|
237
|
+
body?: undefined;
|
|
238
|
+
path?: undefined;
|
|
239
|
+
}) => Promise<import("../makeEndpoint.js").CallResult<{
|
|
240
|
+
runTags: {
|
|
241
|
+
[x: string]: string[];
|
|
242
|
+
};
|
|
243
|
+
customerTags: {
|
|
244
|
+
[x: string]: string[];
|
|
245
|
+
};
|
|
246
|
+
}, {
|
|
247
|
+
error: string;
|
|
248
|
+
}>>;
|
|
249
|
+
export declare const getModels: (options: import("../makeEndpoint.js").ClientOption & {
|
|
250
|
+
query?: undefined;
|
|
251
|
+
body?: undefined;
|
|
252
|
+
path?: undefined;
|
|
253
|
+
}) => Promise<import("../makeEndpoint.js").CallResult<{
|
|
254
|
+
models: string[];
|
|
255
|
+
}, {
|
|
256
|
+
error: string;
|
|
257
|
+
}>>;
|
|
258
|
+
export declare const getProviders: (options: import("../makeEndpoint.js").ClientOption & {
|
|
259
|
+
query?: undefined;
|
|
260
|
+
body?: undefined;
|
|
261
|
+
path?: undefined;
|
|
262
|
+
}) => Promise<import("../makeEndpoint.js").CallResult<{
|
|
263
|
+
providers: string[];
|
|
264
|
+
}, {
|
|
265
|
+
error: string;
|
|
266
|
+
}>>;
|
|
267
|
+
export declare const getCustomers: (options: import("../makeEndpoint.js").ClientOption & {
|
|
268
|
+
query?: {
|
|
269
|
+
cursor?: string | undefined;
|
|
270
|
+
limit?: number | undefined;
|
|
271
|
+
includeCustomerTags?: boolean | undefined;
|
|
272
|
+
} | undefined;
|
|
273
|
+
body?: undefined;
|
|
274
|
+
path?: undefined;
|
|
275
|
+
}) => Promise<import("../makeEndpoint.js").CallResult<{
|
|
276
|
+
customers: {
|
|
277
|
+
customerName: string;
|
|
278
|
+
customerTags: {
|
|
279
|
+
[x: string]: string;
|
|
280
|
+
};
|
|
281
|
+
}[];
|
|
282
|
+
nextCursor: string | null;
|
|
283
|
+
hasMore: boolean;
|
|
284
|
+
}, {
|
|
285
|
+
error: string;
|
|
286
|
+
}>>;
|
|
287
|
+
export declare const getFeatures: (options: import("../makeEndpoint.js").ClientOption & {
|
|
288
|
+
query?: undefined;
|
|
289
|
+
body?: undefined;
|
|
290
|
+
path?: undefined;
|
|
291
|
+
}) => Promise<import("../makeEndpoint.js").CallResult<{
|
|
292
|
+
features: string[];
|
|
293
|
+
}, {
|
|
294
|
+
error: string;
|
|
295
|
+
}>>;
|
|
296
|
+
export declare const getPerformance: (options: import("../makeEndpoint.js").ClientOption & {
|
|
297
|
+
query?: undefined;
|
|
298
|
+
body: {
|
|
299
|
+
dateFrom: string;
|
|
300
|
+
dateTo?: string | undefined;
|
|
301
|
+
applyCredits?: boolean | undefined;
|
|
302
|
+
aggregate?: "day" | "week" | "month" | "quarter" | "year" | "all" | undefined;
|
|
303
|
+
groupBy?: "user" | null | undefined;
|
|
304
|
+
users?: string[] | undefined;
|
|
305
|
+
filterUsersBasedOnFeatures?: string[] | undefined;
|
|
306
|
+
cursor?: string | null | undefined;
|
|
307
|
+
limit?: number | undefined;
|
|
308
|
+
userTags?: {
|
|
309
|
+
[x: string]: string[];
|
|
310
|
+
} | undefined;
|
|
311
|
+
};
|
|
312
|
+
path?: undefined;
|
|
313
|
+
}) => Promise<import("../makeEndpoint.js").CallResult<{
|
|
314
|
+
rows: {
|
|
315
|
+
dateFrom: string;
|
|
316
|
+
dateTo: string;
|
|
317
|
+
user?: string | null | undefined;
|
|
318
|
+
cost: number;
|
|
319
|
+
keyMetrics: {
|
|
320
|
+
[x: string]: {
|
|
321
|
+
value: number;
|
|
322
|
+
totalCost: number;
|
|
323
|
+
costPerUnit: number;
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
}[];
|
|
327
|
+
nextCursor: string | null;
|
|
328
|
+
hasMore: boolean;
|
|
329
|
+
}, CamelCaseDeep<generatedTypes.GetPerformanceError>>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Generated by services/
|
|
2
|
+
// Generated by services/sdk_ts/scripts/generate_facade.mjs from
|
|
3
3
|
// sdk.gen.ts. Do not edit by hand.
|
|
4
4
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
5
|
if (k2 === undefined) k2 = k;
|
|
@@ -35,9 +35,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
};
|
|
36
36
|
})();
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.setCustomersTags = exports.getCustomersTags = exports.deleteCustomersTags = exports.setKeyMetrics = exports.getKeyMetrics = exports.deleteKeyMetrics = exports.setRevenue = exports.getRevenue = exports.deleteRevenue = exports.getMargin = void 0;
|
|
38
|
+
exports.getPerformance = exports.getFeatures = exports.getCustomers = exports.getProviders = exports.getModels = exports.getTags = exports.getProject = exports.setCustomersTags = exports.getCustomersTags = exports.deleteCustomersTags = exports.setKeyMetrics = exports.getKeyMetrics = exports.deleteKeyMetrics = exports.setRevenue = exports.getRevenue = exports.deleteRevenue = exports.getMargin = exports.getCosts = void 0;
|
|
39
39
|
const makeEndpoint_js_1 = require("../makeEndpoint.js");
|
|
40
40
|
const generated = __importStar(require("./sdk.gen.js"));
|
|
41
|
+
exports.getCosts = (0, makeEndpoint_js_1.makeEndpoint)(generated.getCosts);
|
|
41
42
|
exports.getMargin = (0, makeEndpoint_js_1.makeEndpoint)(generated.getMargin);
|
|
42
43
|
exports.deleteRevenue = (0, makeEndpoint_js_1.makeEndpoint)(generated.deleteRevenue);
|
|
43
44
|
exports.getRevenue = (0, makeEndpoint_js_1.makeEndpoint)(generated.getRevenue);
|
|
@@ -48,3 +49,10 @@ exports.setKeyMetrics = (0, makeEndpoint_js_1.makeEndpoint)(generated.setKeyMetr
|
|
|
48
49
|
exports.deleteCustomersTags = (0, makeEndpoint_js_1.makeEndpoint)(generated.deleteCustomersTags);
|
|
49
50
|
exports.getCustomersTags = (0, makeEndpoint_js_1.makeEndpoint)(generated.getCustomersTags);
|
|
50
51
|
exports.setCustomersTags = (0, makeEndpoint_js_1.makeEndpoint)(generated.setCustomersTags);
|
|
52
|
+
exports.getProject = (0, makeEndpoint_js_1.makeEndpoint)(generated.getProject);
|
|
53
|
+
exports.getTags = (0, makeEndpoint_js_1.makeEndpoint)(generated.getTags);
|
|
54
|
+
exports.getModels = (0, makeEndpoint_js_1.makeEndpoint)(generated.getModels);
|
|
55
|
+
exports.getProviders = (0, makeEndpoint_js_1.makeEndpoint)(generated.getProviders);
|
|
56
|
+
exports.getCustomers = (0, makeEndpoint_js_1.makeEndpoint)(generated.getCustomers);
|
|
57
|
+
exports.getFeatures = (0, makeEndpoint_js_1.makeEndpoint)(generated.getFeatures);
|
|
58
|
+
exports.getPerformance = (0, makeEndpoint_js_1.makeEndpoint)(generated.getPerformance);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { deleteCustomersTags, deleteKeyMetrics, deleteRevenue, getCosts, getCustomers, getCustomersTags, getFeatures, getKeyMetrics, getMargin, getModels, getPerformance, getProject, getProviders, getRevenue, getTags, type Options, setCustomersTags, setKeyMetrics, setRevenue } from './sdk.gen.js';
|
|
2
|
+
export type { AllCustomerTagsOutput, ApiErrorOutput, ClientOptions, CostRow, CostsInput, CostsOutput, CustomerOutput, CustomersOutput, CustomersUpdatedOutput, CustomerTags, CustomerTagsOutput, DeleteCustomersTagsData, DeleteCustomersTagsError, DeleteCustomersTagsErrors, DeleteCustomersTagsResponse, DeleteCustomersTagsResponses, DeleteKeyMetricsData, DeleteKeyMetricsError, DeleteKeyMetricsErrors, DeleteKeyMetricsResponse, DeleteKeyMetricsResponses, DeleteRevenueData, DeleteRevenueError, DeleteRevenueErrors, DeleteRevenueResponse, DeleteRevenueResponses, FeaturesOutput, GetCostsData, GetCostsError, GetCostsErrors, GetCostsResponse, GetCostsResponses, 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, GetPerformanceData, GetPerformanceError, GetPerformanceErrors, GetPerformanceResponse, GetPerformanceResponses, 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, KeyMetricValue, MarginInput, MarginOutput, MarginRow, ModelsOutput, PerformanceInput, PerformanceOutput, PerformanceRow, 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';
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.setRevenue = exports.setKeyMetrics = exports.setCustomersTags = exports.getRevenue = exports.getMargin = exports.getKeyMetrics = exports.getCustomersTags = exports.deleteRevenue = exports.deleteKeyMetrics = exports.deleteCustomersTags = void 0;
|
|
4
|
+
exports.setRevenue = exports.setKeyMetrics = exports.setCustomersTags = exports.getTags = exports.getRevenue = exports.getProviders = exports.getProject = exports.getPerformance = exports.getModels = exports.getMargin = exports.getKeyMetrics = exports.getFeatures = exports.getCustomersTags = exports.getCustomers = exports.getCosts = exports.deleteRevenue = exports.deleteKeyMetrics = exports.deleteCustomersTags = void 0;
|
|
5
5
|
var sdk_gen_js_1 = require("./sdk.gen.js");
|
|
6
6
|
Object.defineProperty(exports, "deleteCustomersTags", { enumerable: true, get: function () { return sdk_gen_js_1.deleteCustomersTags; } });
|
|
7
7
|
Object.defineProperty(exports, "deleteKeyMetrics", { enumerable: true, get: function () { return sdk_gen_js_1.deleteKeyMetrics; } });
|
|
8
8
|
Object.defineProperty(exports, "deleteRevenue", { enumerable: true, get: function () { return sdk_gen_js_1.deleteRevenue; } });
|
|
9
|
+
Object.defineProperty(exports, "getCosts", { enumerable: true, get: function () { return sdk_gen_js_1.getCosts; } });
|
|
10
|
+
Object.defineProperty(exports, "getCustomers", { enumerable: true, get: function () { return sdk_gen_js_1.getCustomers; } });
|
|
9
11
|
Object.defineProperty(exports, "getCustomersTags", { enumerable: true, get: function () { return sdk_gen_js_1.getCustomersTags; } });
|
|
12
|
+
Object.defineProperty(exports, "getFeatures", { enumerable: true, get: function () { return sdk_gen_js_1.getFeatures; } });
|
|
10
13
|
Object.defineProperty(exports, "getKeyMetrics", { enumerable: true, get: function () { return sdk_gen_js_1.getKeyMetrics; } });
|
|
11
14
|
Object.defineProperty(exports, "getMargin", { enumerable: true, get: function () { return sdk_gen_js_1.getMargin; } });
|
|
15
|
+
Object.defineProperty(exports, "getModels", { enumerable: true, get: function () { return sdk_gen_js_1.getModels; } });
|
|
16
|
+
Object.defineProperty(exports, "getPerformance", { enumerable: true, get: function () { return sdk_gen_js_1.getPerformance; } });
|
|
17
|
+
Object.defineProperty(exports, "getProject", { enumerable: true, get: function () { return sdk_gen_js_1.getProject; } });
|
|
18
|
+
Object.defineProperty(exports, "getProviders", { enumerable: true, get: function () { return sdk_gen_js_1.getProviders; } });
|
|
12
19
|
Object.defineProperty(exports, "getRevenue", { enumerable: true, get: function () { return sdk_gen_js_1.getRevenue; } });
|
|
20
|
+
Object.defineProperty(exports, "getTags", { enumerable: true, get: function () { return sdk_gen_js_1.getTags; } });
|
|
13
21
|
Object.defineProperty(exports, "setCustomersTags", { enumerable: true, get: function () { return sdk_gen_js_1.setCustomersTags; } });
|
|
14
22
|
Object.defineProperty(exports, "setKeyMetrics", { enumerable: true, get: function () { return sdk_gen_js_1.setKeyMetrics; } });
|
|
15
23
|
Object.defineProperty(exports, "setRevenue", { enumerable: true, get: function () { return sdk_gen_js_1.setRevenue; } });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
-
import type { DeleteCustomersTagsData, DeleteCustomersTagsErrors, DeleteCustomersTagsResponses, DeleteKeyMetricsData, DeleteKeyMetricsErrors, DeleteKeyMetricsResponses, DeleteRevenueData, DeleteRevenueErrors, DeleteRevenueResponses, GetCustomersTagsData, GetCustomersTagsErrors, GetCustomersTagsResponses, GetKeyMetricsData, GetKeyMetricsErrors, GetKeyMetricsResponses, GetMarginData, GetMarginErrors, GetMarginResponses, GetRevenueData, GetRevenueErrors, GetRevenueResponses, SetCustomersTagsData, SetCustomersTagsErrors, SetCustomersTagsResponses, SetKeyMetricsData, SetKeyMetricsErrors, SetKeyMetricsResponses, SetRevenueData, SetRevenueErrors, SetRevenueResponses } from './types.gen.js';
|
|
2
|
+
import type { DeleteCustomersTagsData, DeleteCustomersTagsErrors, DeleteCustomersTagsResponses, DeleteKeyMetricsData, DeleteKeyMetricsErrors, DeleteKeyMetricsResponses, DeleteRevenueData, DeleteRevenueErrors, DeleteRevenueResponses, GetCostsData, GetCostsErrors, GetCostsResponses, GetCustomersData, GetCustomersErrors, GetCustomersResponses, GetCustomersTagsData, GetCustomersTagsErrors, GetCustomersTagsResponses, GetFeaturesData, GetFeaturesErrors, GetFeaturesResponses, GetKeyMetricsData, GetKeyMetricsErrors, GetKeyMetricsResponses, GetMarginData, GetMarginErrors, GetMarginResponses, GetModelsData, GetModelsErrors, GetModelsResponses, GetPerformanceData, GetPerformanceErrors, GetPerformanceResponses, 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';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -14,9 +14,13 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
14
14
|
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Cost bucketed by aggregate and optionally grouped by one dimension (customer/feature/model/provider), with customer_tags/run_tags filters.
|
|
18
18
|
*/
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const getCosts: <ThrowOnError extends boolean = false>(options: Options<GetCostsData, ThrowOnError>) => RequestResult<GetCostsResponses, GetCostsErrors, ThrowOnError>;
|
|
20
|
+
/**
|
|
21
|
+
* Cost and revenue bucketed by aggregate and optionally grouped by customer, alongside the resulting margin and risk status.
|
|
22
|
+
*/
|
|
23
|
+
export declare const getMargin: <ThrowOnError extends boolean = false>(options: Options<GetMarginData, ThrowOnError>) => RequestResult<GetMarginResponses, GetMarginErrors, ThrowOnError>;
|
|
20
24
|
/**
|
|
21
25
|
* Delete the given customers' API-uploaded revenue values.
|
|
22
26
|
*/
|
|
@@ -53,3 +57,31 @@ export declare const getCustomersTags: <ThrowOnError extends boolean = false>(op
|
|
|
53
57
|
* Merge-set customer tags; set upsert=true to overwrite tags that already exist.
|
|
54
58
|
*/
|
|
55
59
|
export declare const setCustomersTags: <ThrowOnError extends boolean = false>(options: Options<SetCustomersTagsData, ThrowOnError>) => RequestResult<SetCustomersTagsResponses, SetCustomersTagsErrors, ThrowOnError>;
|
|
60
|
+
/**
|
|
61
|
+
* Static identity of the project: name, type, key metrics, environment and creation date.
|
|
62
|
+
*/
|
|
63
|
+
export declare const getProject: <ThrowOnError extends boolean = false>(options?: Options<GetProjectData, ThrowOnError>) => RequestResult<GetProjectResponses, GetProjectErrors, ThrowOnError>;
|
|
64
|
+
/**
|
|
65
|
+
* {key: [values]} facets for run tags and customer tags; pass include_run_tags/include_customer_tags=false to skip either one.
|
|
66
|
+
*/
|
|
67
|
+
export declare const getTags: <ThrowOnError extends boolean = false>(options?: Options<GetTagsData, ThrowOnError>) => RequestResult<GetTagsResponses, GetTagsErrors, ThrowOnError>;
|
|
68
|
+
/**
|
|
69
|
+
* Every distinct model name seen for the project.
|
|
70
|
+
*/
|
|
71
|
+
export declare const getModels: <ThrowOnError extends boolean = false>(options?: Options<GetModelsData, ThrowOnError>) => RequestResult<GetModelsResponses, GetModelsErrors, ThrowOnError>;
|
|
72
|
+
/**
|
|
73
|
+
* Every distinct provider name seen for the project.
|
|
74
|
+
*/
|
|
75
|
+
export declare const getProviders: <ThrowOnError extends boolean = false>(options?: Options<GetProvidersData, ThrowOnError>) => RequestResult<GetProvidersResponses, GetProvidersErrors, ThrowOnError>;
|
|
76
|
+
/**
|
|
77
|
+
* Every known customer of the project; pass include_customer_tags=false to omit each customer's tags.
|
|
78
|
+
*/
|
|
79
|
+
export declare const getCustomers: <ThrowOnError extends boolean = false>(options?: Options<GetCustomersData, ThrowOnError>) => RequestResult<GetCustomersResponses, GetCustomersErrors, ThrowOnError>;
|
|
80
|
+
/**
|
|
81
|
+
* Every distinct feature tag seen for the project.
|
|
82
|
+
*/
|
|
83
|
+
export declare const getFeatures: <ThrowOnError extends boolean = false>(options?: Options<GetFeaturesData, ThrowOnError>) => RequestResult<GetFeaturesResponses, GetFeaturesErrors, ThrowOnError>;
|
|
84
|
+
/**
|
|
85
|
+
* Cost bucketed by aggregate and optionally grouped by user, alongside each key metric's value and cost-per-unit for the same period. Only available for internal-metric projects.
|
|
86
|
+
*/
|
|
87
|
+
export declare const getPerformance: <ThrowOnError extends boolean = false>(options: Options<GetPerformanceData, ThrowOnError>) => RequestResult<GetPerformanceResponses, GetPerformanceErrors, ThrowOnError>;
|
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.setCustomersTags = exports.getCustomersTags = exports.deleteCustomersTags = exports.setKeyMetrics = exports.getKeyMetrics = exports.deleteKeyMetrics = exports.setRevenue = exports.getRevenue = exports.deleteRevenue = exports.getMargin = void 0;
|
|
4
|
+
exports.getPerformance = exports.getFeatures = exports.getCustomers = exports.getProviders = exports.getModels = exports.getTags = exports.getProject = exports.setCustomersTags = exports.getCustomersTags = exports.deleteCustomersTags = exports.setKeyMetrics = exports.getKeyMetrics = exports.deleteKeyMetrics = exports.setRevenue = exports.getRevenue = exports.deleteRevenue = exports.getMargin = exports.getCosts = void 0;
|
|
5
5
|
const client_gen_js_1 = require("./client.gen.js");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Cost bucketed by aggregate and optionally grouped by one dimension (customer/feature/model/provider), with customer_tags/run_tags filters.
|
|
8
8
|
*/
|
|
9
|
-
const
|
|
9
|
+
const getCosts = (options) => (options.client ?? client_gen_js_1.client).post({
|
|
10
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
11
|
+
url: '/costs/',
|
|
12
|
+
...options,
|
|
13
|
+
headers: {
|
|
14
|
+
'Content-Type': 'application/json',
|
|
15
|
+
...options.headers
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
exports.getCosts = getCosts;
|
|
19
|
+
/**
|
|
20
|
+
* Cost and revenue bucketed by aggregate and optionally grouped by customer, alongside the resulting margin and risk status.
|
|
21
|
+
*/
|
|
22
|
+
const getMargin = (options) => (options.client ?? client_gen_js_1.client).post({
|
|
10
23
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
11
24
|
url: '/margin/',
|
|
12
|
-
...options
|
|
25
|
+
...options,
|
|
26
|
+
headers: {
|
|
27
|
+
'Content-Type': 'application/json',
|
|
28
|
+
...options.headers
|
|
29
|
+
}
|
|
13
30
|
});
|
|
14
31
|
exports.getMargin = getMargin;
|
|
15
32
|
/**
|
|
@@ -105,3 +122,70 @@ const setCustomersTags = (options) => (options.client ?? client_gen_js_1.client)
|
|
|
105
122
|
}
|
|
106
123
|
});
|
|
107
124
|
exports.setCustomersTags = setCustomersTags;
|
|
125
|
+
/**
|
|
126
|
+
* Static identity of the project: name, type, key metrics, environment and creation date.
|
|
127
|
+
*/
|
|
128
|
+
const getProject = (options) => (options?.client ?? client_gen_js_1.client).get({
|
|
129
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
130
|
+
url: '/project/',
|
|
131
|
+
...options
|
|
132
|
+
});
|
|
133
|
+
exports.getProject = getProject;
|
|
134
|
+
/**
|
|
135
|
+
* {key: [values]} facets for run tags and customer tags; pass include_run_tags/include_customer_tags=false to skip either one.
|
|
136
|
+
*/
|
|
137
|
+
const getTags = (options) => (options?.client ?? client_gen_js_1.client).get({
|
|
138
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
139
|
+
url: '/tags/',
|
|
140
|
+
...options
|
|
141
|
+
});
|
|
142
|
+
exports.getTags = getTags;
|
|
143
|
+
/**
|
|
144
|
+
* Every distinct model name seen for the project.
|
|
145
|
+
*/
|
|
146
|
+
const getModels = (options) => (options?.client ?? client_gen_js_1.client).get({
|
|
147
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
148
|
+
url: '/models/',
|
|
149
|
+
...options
|
|
150
|
+
});
|
|
151
|
+
exports.getModels = getModels;
|
|
152
|
+
/**
|
|
153
|
+
* Every distinct provider name seen for the project.
|
|
154
|
+
*/
|
|
155
|
+
const getProviders = (options) => (options?.client ?? client_gen_js_1.client).get({
|
|
156
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
157
|
+
url: '/providers/',
|
|
158
|
+
...options
|
|
159
|
+
});
|
|
160
|
+
exports.getProviders = getProviders;
|
|
161
|
+
/**
|
|
162
|
+
* Every known customer of the project; pass include_customer_tags=false to omit each customer's tags.
|
|
163
|
+
*/
|
|
164
|
+
const getCustomers = (options) => (options?.client ?? client_gen_js_1.client).get({
|
|
165
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
166
|
+
url: '/customers/',
|
|
167
|
+
...options
|
|
168
|
+
});
|
|
169
|
+
exports.getCustomers = getCustomers;
|
|
170
|
+
/**
|
|
171
|
+
* Every distinct feature tag seen for the project.
|
|
172
|
+
*/
|
|
173
|
+
const getFeatures = (options) => (options?.client ?? client_gen_js_1.client).get({
|
|
174
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
175
|
+
url: '/features/',
|
|
176
|
+
...options
|
|
177
|
+
});
|
|
178
|
+
exports.getFeatures = getFeatures;
|
|
179
|
+
/**
|
|
180
|
+
* Cost bucketed by aggregate and optionally grouped by user, alongside each key metric's value and cost-per-unit for the same period. Only available for internal-metric projects.
|
|
181
|
+
*/
|
|
182
|
+
const getPerformance = (options) => (options.client ?? client_gen_js_1.client).post({
|
|
183
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
184
|
+
url: '/performance/',
|
|
185
|
+
...options,
|
|
186
|
+
headers: {
|
|
187
|
+
'Content-Type': 'application/json',
|
|
188
|
+
...options.headers
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
exports.getPerformance = getPerformance;
|