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,110 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type { Auth, AuthToken } from './auth.gen.js';
4
+ import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';
5
+
6
+ export type HttpMethod =
7
+ | 'connect'
8
+ | 'delete'
9
+ | 'get'
10
+ | 'head'
11
+ | 'options'
12
+ | 'patch'
13
+ | 'post'
14
+ | 'put'
15
+ | 'trace';
16
+
17
+ export type Client<
18
+ RequestFn = never,
19
+ Config = unknown,
20
+ MethodFn = never,
21
+ BuildUrlFn = never,
22
+ SseFn = never,
23
+ > = {
24
+ /**
25
+ * Returns the final request URL.
26
+ */
27
+ buildUrl: BuildUrlFn;
28
+ getConfig: () => Config;
29
+ request: RequestFn;
30
+ setConfig: (config: Config) => Config;
31
+ } & {
32
+ [K in HttpMethod]: MethodFn;
33
+ } & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });
34
+
35
+ export interface Config {
36
+ /**
37
+ * Auth token or a function returning auth token. The resolved value will be
38
+ * added to the request payload as defined by its `security` array.
39
+ */
40
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
41
+ /**
42
+ * A function for serializing request body parameter. By default,
43
+ * {@link JSON.stringify()} will be used.
44
+ */
45
+ bodySerializer?: BodySerializer | null;
46
+ /**
47
+ * An object containing any HTTP headers that you want to pre-populate your
48
+ * `Headers` object with.
49
+ *
50
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
51
+ */
52
+ headers?:
53
+ | RequestInit['headers']
54
+ | Record<
55
+ string,
56
+ string | number | boolean | (string | number | boolean)[] | null | undefined | unknown
57
+ >;
58
+ /**
59
+ * The request method.
60
+ *
61
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
62
+ */
63
+ method?: Uppercase<HttpMethod>;
64
+ /**
65
+ * A function for serializing request query parameters. By default, arrays
66
+ * will be exploded in form style, objects will be exploded in deepObject
67
+ * style, and reserved characters are percent-encoded.
68
+ *
69
+ * This method will have no effect if the native `paramsSerializer()` Axios
70
+ * API function is used.
71
+ *
72
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
73
+ */
74
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
75
+ /**
76
+ * A function validating request data. This is useful if you want to ensure
77
+ * the request conforms to the desired shape, so it can be safely sent to
78
+ * the server.
79
+ */
80
+ requestValidator?: (data: unknown) => Promise<unknown>;
81
+ /**
82
+ * A function transforming response data before it's returned. This is useful
83
+ * for post-processing data, e.g., converting ISO strings into Date objects.
84
+ */
85
+ responseTransformer?: (data: unknown) => Promise<unknown>;
86
+ /**
87
+ * A function validating response data. This is useful if you want to ensure
88
+ * the response conforms to the desired shape, so it can be safely passed to
89
+ * the transformers and returned to the user.
90
+ */
91
+ responseValidator?: (data: unknown) => Promise<unknown>;
92
+ }
93
+
94
+ /**
95
+ * Arbitrary metadata passed through the `meta` request option.
96
+ */
97
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
98
+ export interface ClientMeta {}
99
+
100
+ type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]
101
+ ? true
102
+ : [T] extends [never | undefined]
103
+ ? [undefined] extends [T]
104
+ ? false
105
+ : true
106
+ : false;
107
+
108
+ export type OmitNever<T extends Record<string, unknown>> = {
109
+ [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];
110
+ };
@@ -0,0 +1,140 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';
4
+ import {
5
+ type ArraySeparatorStyle,
6
+ serializeArrayParam,
7
+ serializeObjectParam,
8
+ serializePrimitiveParam,
9
+ } from './pathSerializer.gen.js';
10
+
11
+ export interface PathSerializer {
12
+ path: Record<string, unknown>;
13
+ url: string;
14
+ }
15
+
16
+ export const PATH_PARAM_RE: RegExp = /\{[^{}]+\}/g;
17
+
18
+ export const defaultPathSerializer = ({ path, url: _url }: PathSerializer): string => {
19
+ let url = _url;
20
+ const matches = _url.match(PATH_PARAM_RE);
21
+ if (matches) {
22
+ for (const match of matches) {
23
+ let explode = false;
24
+ let name = match.substring(1, match.length - 1);
25
+ let style: ArraySeparatorStyle = 'simple';
26
+
27
+ if (name.endsWith('*')) {
28
+ explode = true;
29
+ name = name.substring(0, name.length - 1);
30
+ }
31
+
32
+ if (name.startsWith('.')) {
33
+ name = name.substring(1);
34
+ style = 'label';
35
+ } else if (name.startsWith(';')) {
36
+ name = name.substring(1);
37
+ style = 'matrix';
38
+ }
39
+
40
+ const value = path[name];
41
+
42
+ if (value === undefined || value === null) {
43
+ continue;
44
+ }
45
+
46
+ if (Array.isArray(value)) {
47
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
48
+ continue;
49
+ }
50
+
51
+ if (typeof value === 'object') {
52
+ url = url.replace(
53
+ match,
54
+ serializeObjectParam({
55
+ explode,
56
+ name,
57
+ style,
58
+ value: value as Record<string, unknown>,
59
+ valueOnly: true,
60
+ }),
61
+ );
62
+ continue;
63
+ }
64
+
65
+ if (style === 'matrix') {
66
+ url = url.replace(
67
+ match,
68
+ `;${serializePrimitiveParam({
69
+ name,
70
+ value: value as string,
71
+ })}`,
72
+ );
73
+ continue;
74
+ }
75
+
76
+ const replaceValue = encodeURIComponent(
77
+ style === 'label' ? `.${value as string}` : (value as string),
78
+ );
79
+ url = url.replace(match, replaceValue);
80
+ }
81
+ }
82
+ return url;
83
+ };
84
+
85
+ export const getUrl = ({
86
+ baseUrl,
87
+ path,
88
+ query,
89
+ querySerializer,
90
+ url: _url,
91
+ }: {
92
+ baseUrl?: string;
93
+ path?: Record<string, unknown>;
94
+ query?: Record<string, unknown>;
95
+ querySerializer: QuerySerializer;
96
+ url: string;
97
+ }): string => {
98
+ const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
99
+ let url = (baseUrl ?? '') + pathUrl;
100
+ if (path) {
101
+ url = defaultPathSerializer({ path, url });
102
+ }
103
+ let search = query ? querySerializer(query) : '';
104
+ if (search.startsWith('?')) {
105
+ search = search.substring(1);
106
+ }
107
+ if (search) {
108
+ url += `?${search}`;
109
+ }
110
+ return url;
111
+ };
112
+
113
+ export function getValidRequestBody(options: {
114
+ body?: unknown;
115
+ bodySerializer?: BodySerializer | null;
116
+ serializedBody?: unknown;
117
+ }): unknown {
118
+ const hasBody = options.body !== undefined;
119
+ const isSerializedBody = hasBody && options.bodySerializer;
120
+
121
+ if (isSerializedBody) {
122
+ if ('serializedBody' in options) {
123
+ const hasSerializedBody =
124
+ options.serializedBody !== undefined && options.serializedBody !== '';
125
+
126
+ return hasSerializedBody ? options.serializedBody : null;
127
+ }
128
+
129
+ // not all clients implement a serializedBody property (i.e., client-axios)
130
+ return options.body !== '' ? options.body : null;
131
+ }
132
+
133
+ // plain/text body
134
+ if (hasBody) {
135
+ return options.body;
136
+ }
137
+
138
+ // no body was provided
139
+ return undefined;
140
+ }
@@ -0,0 +1,62 @@
1
+ // Generated by services/sdk_node_js/scripts/generate_facade.mjs from
2
+ // sdk.gen.ts. Do not edit by hand.
3
+
4
+ import { makeEndpoint } from '../makeEndpoint.js';
5
+ import type { CamelCaseDeep } from '../caseConversion.js';
6
+ import * as generated from './sdk.gen.js';
7
+ import type * as generatedTypes from './types.gen.js';
8
+
9
+
10
+ export const deleteRevenue = makeEndpoint<
11
+ CamelCaseDeep<Omit<generatedTypes.DeleteRevenueData, 'url'>>,
12
+ CamelCaseDeep<generatedTypes.DeleteRevenueResponse>,
13
+ CamelCaseDeep<generatedTypes.DeleteRevenueError>
14
+ >(generated.deleteRevenue);
15
+
16
+ export const getRevenue = makeEndpoint<
17
+ CamelCaseDeep<Omit<generatedTypes.GetRevenueData, 'url'>>,
18
+ CamelCaseDeep<generatedTypes.GetRevenueResponse>,
19
+ CamelCaseDeep<generatedTypes.GetRevenueError>
20
+ >(generated.getRevenue);
21
+
22
+ export const setRevenue = makeEndpoint<
23
+ CamelCaseDeep<Omit<generatedTypes.SetRevenueData, 'url'>>,
24
+ CamelCaseDeep<generatedTypes.SetRevenueResponse>,
25
+ CamelCaseDeep<generatedTypes.SetRevenueError>
26
+ >(generated.setRevenue);
27
+
28
+ export const deleteKeyMetrics = makeEndpoint<
29
+ CamelCaseDeep<Omit<generatedTypes.DeleteKeyMetricsData, 'url'>>,
30
+ CamelCaseDeep<generatedTypes.DeleteKeyMetricsResponse>,
31
+ CamelCaseDeep<generatedTypes.DeleteKeyMetricsError>
32
+ >(generated.deleteKeyMetrics);
33
+
34
+ export const getKeyMetrics = makeEndpoint<
35
+ CamelCaseDeep<Omit<generatedTypes.GetKeyMetricsData, 'url'>>,
36
+ CamelCaseDeep<generatedTypes.GetKeyMetricsResponse>,
37
+ CamelCaseDeep<generatedTypes.GetKeyMetricsError>
38
+ >(generated.getKeyMetrics);
39
+
40
+ export const setKeyMetrics = makeEndpoint<
41
+ CamelCaseDeep<Omit<generatedTypes.SetKeyMetricsData, 'url'>>,
42
+ CamelCaseDeep<generatedTypes.SetKeyMetricsResponse>,
43
+ CamelCaseDeep<generatedTypes.SetKeyMetricsError>
44
+ >(generated.setKeyMetrics);
45
+
46
+ export const deleteCustomersTags = makeEndpoint<
47
+ CamelCaseDeep<Omit<generatedTypes.DeleteCustomersTagsData, 'url'>>,
48
+ CamelCaseDeep<generatedTypes.DeleteCustomersTagsResponse>,
49
+ CamelCaseDeep<generatedTypes.DeleteCustomersTagsError>
50
+ >(generated.deleteCustomersTags);
51
+
52
+ export const getCustomersTags = makeEndpoint<
53
+ CamelCaseDeep<Omit<generatedTypes.GetCustomersTagsData, 'url'>>,
54
+ CamelCaseDeep<generatedTypes.GetCustomersTagsResponse>,
55
+ CamelCaseDeep<generatedTypes.GetCustomersTagsError>
56
+ >(generated.getCustomersTags);
57
+
58
+ export const setCustomersTags = makeEndpoint<
59
+ CamelCaseDeep<Omit<generatedTypes.SetCustomersTagsData, 'url'>>,
60
+ CamelCaseDeep<generatedTypes.SetCustomersTagsResponse>,
61
+ CamelCaseDeep<generatedTypes.SetCustomersTagsError>
62
+ >(generated.setCustomersTags);
@@ -0,0 +1,4 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
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';
@@ -0,0 +1,112 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import { client } from './client.gen.js';
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';
6
+
7
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
8
+ /**
9
+ * You can provide a client instance returned by `createClient()` instead of
10
+ * individual options. This might be also useful if you want to implement a
11
+ * custom client.
12
+ */
13
+ client?: Client;
14
+ /**
15
+ * You can pass arbitrary values through the `meta` object. This can be
16
+ * used to access values that aren't defined as part of the SDK function.
17
+ */
18
+ meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
19
+ };
20
+
21
+ /**
22
+ * Delete the given customers' API-uploaded revenue values.
23
+ */
24
+ export const deleteRevenue = <ThrowOnError extends boolean = false>(options: Options<DeleteRevenueData, ThrowOnError>): RequestResult<DeleteRevenueResponses, DeleteRevenueErrors, ThrowOnError> => (options.client ?? client).delete<DeleteRevenueResponses, DeleteRevenueErrors, ThrowOnError>({
25
+ security: [{ scheme: 'bearer', type: 'http' }],
26
+ url: '/revenue/',
27
+ ...options
28
+ });
29
+
30
+ /**
31
+ * The project's revenue values, one row per booked value; pass customer_names to narrow to specific customers, omit it for every customer's.
32
+ */
33
+ export const getRevenue = <ThrowOnError extends boolean = false>(options?: Options<GetRevenueData, ThrowOnError>): RequestResult<GetRevenueResponses, GetRevenueErrors, ThrowOnError> => (options?.client ?? client).get<GetRevenueResponses, GetRevenueErrors, ThrowOnError>({
34
+ security: [{ scheme: 'bearer', type: 'http' }],
35
+ url: '/revenue/',
36
+ ...options
37
+ });
38
+
39
+ /**
40
+ * Book revenue values; set upsert=true to overwrite rows whose id already exists.
41
+ */
42
+ export const setRevenue = <ThrowOnError extends boolean = false>(options: Options<SetRevenueData, ThrowOnError>): RequestResult<SetRevenueResponses, SetRevenueErrors, ThrowOnError> => (options.client ?? client).post<SetRevenueResponses, SetRevenueErrors, ThrowOnError>({
43
+ security: [{ scheme: 'bearer', type: 'http' }],
44
+ url: '/revenue/',
45
+ ...options,
46
+ headers: {
47
+ 'Content-Type': 'application/json',
48
+ ...options.headers
49
+ }
50
+ });
51
+
52
+ /**
53
+ * Delete the given users' API-uploaded key-metric values.
54
+ */
55
+ export const deleteKeyMetrics = <ThrowOnError extends boolean = false>(options: Options<DeleteKeyMetricsData, ThrowOnError>): RequestResult<DeleteKeyMetricsResponses, DeleteKeyMetricsErrors, ThrowOnError> => (options.client ?? client).delete<DeleteKeyMetricsResponses, DeleteKeyMetricsErrors, ThrowOnError>({
56
+ security: [{ scheme: 'bearer', type: 'http' }],
57
+ url: '/key-metrics/',
58
+ ...options
59
+ });
60
+
61
+ /**
62
+ * The project's key-metric values, one row per booked value; pass user_names to narrow to specific users, omit it for every user's.
63
+ */
64
+ export const getKeyMetrics = <ThrowOnError extends boolean = false>(options?: Options<GetKeyMetricsData, ThrowOnError>): RequestResult<GetKeyMetricsResponses, GetKeyMetricsErrors, ThrowOnError> => (options?.client ?? client).get<GetKeyMetricsResponses, GetKeyMetricsErrors, ThrowOnError>({
65
+ security: [{ scheme: 'bearer', type: 'http' }],
66
+ url: '/key-metrics/',
67
+ ...options
68
+ });
69
+
70
+ /**
71
+ * Book key-metric values; set upsert=true to overwrite rows whose id already exists.
72
+ */
73
+ export const setKeyMetrics = <ThrowOnError extends boolean = false>(options: Options<SetKeyMetricsData, ThrowOnError>): RequestResult<SetKeyMetricsResponses, SetKeyMetricsErrors, ThrowOnError> => (options.client ?? client).post<SetKeyMetricsResponses, SetKeyMetricsErrors, ThrowOnError>({
74
+ security: [{ scheme: 'bearer', type: 'http' }],
75
+ url: '/key-metrics/',
76
+ ...options,
77
+ headers: {
78
+ 'Content-Type': 'application/json',
79
+ ...options.headers
80
+ }
81
+ });
82
+
83
+ /**
84
+ * Delete every tag of the given customers.
85
+ */
86
+ export const deleteCustomersTags = <ThrowOnError extends boolean = false>(options: Options<DeleteCustomersTagsData, ThrowOnError>): RequestResult<DeleteCustomersTagsResponses, DeleteCustomersTagsErrors, ThrowOnError> => (options.client ?? client).delete<DeleteCustomersTagsResponses, DeleteCustomersTagsErrors, ThrowOnError>({
87
+ security: [{ scheme: 'bearer', type: 'http' }],
88
+ url: '/customer-tags/',
89
+ ...options
90
+ });
91
+
92
+ /**
93
+ * Every known customer of the project with its tags (possibly empty); pass customer_names to narrow to specific customers, omit it for every customer's.
94
+ */
95
+ export const getCustomersTags = <ThrowOnError extends boolean = false>(options?: Options<GetCustomersTagsData, ThrowOnError>): RequestResult<GetCustomersTagsResponses, GetCustomersTagsErrors, ThrowOnError> => (options?.client ?? client).get<GetCustomersTagsResponses, GetCustomersTagsErrors, ThrowOnError>({
96
+ security: [{ scheme: 'bearer', type: 'http' }],
97
+ url: '/customer-tags/',
98
+ ...options
99
+ });
100
+
101
+ /**
102
+ * Merge-set customer tags; set upsert=true to overwrite tags that already exist.
103
+ */
104
+ export const setCustomersTags = <ThrowOnError extends boolean = false>(options: Options<SetCustomersTagsData, ThrowOnError>): RequestResult<SetCustomersTagsResponses, SetCustomersTagsErrors, ThrowOnError> => (options.client ?? client).post<SetCustomersTagsResponses, SetCustomersTagsErrors, ThrowOnError>({
105
+ security: [{ scheme: 'bearer', type: 'http' }],
106
+ url: '/customer-tags/',
107
+ ...options,
108
+ headers: {
109
+ 'Content-Type': 'application/json',
110
+ ...options.headers
111
+ }
112
+ });