weflayr 0.22.1 → 0.23.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.
@@ -1,7 +1,45 @@
1
1
  import type { CamelCaseDeep } from '../caseConversion.js';
2
2
  import type * as generatedTypes from './types.gen.js';
3
- export declare const getAllRevenue: (options: import("../makeEndpoint.js").ClientOption & {
3
+ export declare const getMargin: (options: import("../makeEndpoint.js").ClientOption & {
4
4
  query?: {
5
+ customerNames?: string[] | undefined;
6
+ cursor?: string | undefined;
7
+ limit?: number | undefined;
8
+ dateFrom?: string | undefined;
9
+ dateTo?: string | undefined;
10
+ applyCredits?: boolean | undefined;
11
+ } | undefined;
12
+ body?: undefined;
13
+ path?: undefined;
14
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
15
+ rows: {
16
+ customerName: string;
17
+ revenue: number;
18
+ cost: number;
19
+ margin: number;
20
+ marginPct: number | null;
21
+ profitabilityStatus: "healthy" | "watch" | "at_risk" | "unprofitable" | "unknown";
22
+ }[];
23
+ nextCursor: string | null;
24
+ hasMore: boolean;
25
+ }, {
26
+ error: string;
27
+ }>>;
28
+ export declare const deleteRevenue: (options: import("../makeEndpoint.js").ClientOption & {
29
+ query: {
30
+ customerNames: string[];
31
+ monthStart?: string | undefined;
32
+ monthEnd?: string | undefined;
33
+ };
34
+ body?: undefined;
35
+ path?: undefined;
36
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
37
+ ok: boolean;
38
+ rowsDeleted: number;
39
+ }, CamelCaseDeep<generatedTypes.DeleteRevenueError>>>;
40
+ export declare const getRevenue: (options: import("../makeEndpoint.js").ClientOption & {
41
+ query?: {
42
+ customerNames?: string[] | undefined;
5
43
  cursor?: string | undefined;
6
44
  limit?: number | undefined;
7
45
  } | undefined;
@@ -9,11 +47,11 @@ export declare const getAllRevenue: (options: import("../makeEndpoint.js").Clien
9
47
  path?: undefined;
10
48
  }) => Promise<import("../makeEndpoint.js").CallResult<{
11
49
  rows: {
12
- userDefinedId: string;
13
50
  metricName: string;
14
51
  month: string;
15
- amount: string;
52
+ amount: number;
16
53
  source: string;
54
+ revenueId: string;
17
55
  customerName: string;
18
56
  }[];
19
57
  nextCursor: string | null;
@@ -25,9 +63,9 @@ export declare const setRevenue: (options: import("../makeEndpoint.js").ClientOp
25
63
  query?: undefined;
26
64
  body: {
27
65
  rows: {
28
- userDefinedId?: string | null | undefined;
66
+ revenueId?: string | null | undefined;
29
67
  customerName: string;
30
- amount: string | number;
68
+ amount: number;
31
69
  month?: string | null | undefined;
32
70
  monthStart?: string | null | undefined;
33
71
  monthEnd?: string | null | undefined;
@@ -39,41 +77,21 @@ export declare const setRevenue: (options: import("../makeEndpoint.js").ClientOp
39
77
  ok: boolean;
40
78
  rowsInserted: number;
41
79
  }, CamelCaseDeep<generatedTypes.SetRevenueError>>>;
42
- export declare const deleteCustomerRevenue: (options: import("../makeEndpoint.js").ClientOption & {
43
- query?: {
80
+ export declare const deleteKeyMetrics: (options: import("../makeEndpoint.js").ClientOption & {
81
+ query: {
82
+ userNames: string[];
44
83
  monthStart?: string | undefined;
45
84
  monthEnd?: string | undefined;
46
- } | undefined;
47
- body?: undefined;
48
- path: {
49
- customerName: string;
50
85
  };
86
+ body?: undefined;
87
+ path?: undefined;
51
88
  }) => Promise<import("../makeEndpoint.js").CallResult<{
52
89
  ok: boolean;
53
90
  rowsDeleted: number;
54
- }, CamelCaseDeep<generatedTypes.DeleteCustomerRevenueError>>>;
55
- export declare const getCustomerRevenue: (options: import("../makeEndpoint.js").ClientOption & {
56
- query?: undefined;
57
- body?: undefined;
58
- path: {
59
- customerName: string;
60
- };
61
- }) => Promise<import("../makeEndpoint.js").CallResult<{
62
- rows: {
63
- userDefinedId: string;
64
- metricName: string;
65
- month: string;
66
- amount: string;
67
- source: string;
68
- customerName: string;
69
- }[];
70
- nextCursor: string | null;
71
- hasMore: boolean;
72
- }, {
73
- error: string;
74
- }>>;
75
- export declare const getAllKeyMetrics: (options: import("../makeEndpoint.js").ClientOption & {
91
+ }, CamelCaseDeep<generatedTypes.DeleteKeyMetricsError>>>;
92
+ export declare const getKeyMetrics: (options: import("../makeEndpoint.js").ClientOption & {
76
93
  query?: {
94
+ userNames?: string[] | undefined;
77
95
  cursor?: string | undefined;
78
96
  limit?: number | undefined;
79
97
  } | undefined;
@@ -81,11 +99,11 @@ export declare const getAllKeyMetrics: (options: import("../makeEndpoint.js").Cl
81
99
  path?: undefined;
82
100
  }) => Promise<import("../makeEndpoint.js").CallResult<{
83
101
  rows: {
84
- userDefinedId: string;
85
102
  metricName: string;
86
103
  month: string;
87
- amount: string;
104
+ amount: number;
88
105
  source: string;
106
+ metricId: string;
89
107
  userName: string;
90
108
  }[];
91
109
  nextCursor: string | null;
@@ -97,10 +115,10 @@ export declare const setKeyMetrics: (options: import("../makeEndpoint.js").Clien
97
115
  query?: undefined;
98
116
  body: {
99
117
  rows: {
100
- userDefinedId?: string | null | undefined;
118
+ metricId?: string | null | undefined;
101
119
  userName: string;
102
120
  metricName: string;
103
- amount: string | number;
121
+ amount: number;
104
122
  month?: string | null | undefined;
105
123
  monthStart?: string | null | undefined;
106
124
  monthEnd?: string | null | undefined;
@@ -112,41 +130,19 @@ export declare const setKeyMetrics: (options: import("../makeEndpoint.js").Clien
112
130
  ok: boolean;
113
131
  rowsInserted: number;
114
132
  }, CamelCaseDeep<generatedTypes.SetKeyMetricsError>>>;
115
- export declare const deleteUserKeyMetrics: (options: import("../makeEndpoint.js").ClientOption & {
116
- query?: {
117
- monthStart?: string | undefined;
118
- monthEnd?: string | undefined;
119
- } | undefined;
120
- body?: undefined;
121
- path: {
122
- userName: string;
133
+ export declare const deleteCustomersTags: (options: import("../makeEndpoint.js").ClientOption & {
134
+ query: {
135
+ customerNames: string[];
123
136
  };
124
- }) => Promise<import("../makeEndpoint.js").CallResult<{
125
- ok: boolean;
126
- rowsDeleted: number;
127
- }, CamelCaseDeep<generatedTypes.DeleteUserKeyMetricsError>>>;
128
- export declare const getUserKeyMetrics: (options: import("../makeEndpoint.js").ClientOption & {
129
- query?: undefined;
130
137
  body?: undefined;
131
- path: {
132
- userName: string;
133
- };
138
+ path?: undefined;
134
139
  }) => Promise<import("../makeEndpoint.js").CallResult<{
135
- rows: {
136
- userDefinedId: string;
137
- metricName: string;
138
- month: string;
139
- amount: string;
140
- source: string;
141
- userName: string;
142
- }[];
143
- nextCursor: string | null;
144
- hasMore: boolean;
145
- }, {
146
- error: string;
147
- }>>;
148
- export declare const getAllCustomersTags: (options: import("../makeEndpoint.js").ClientOption & {
140
+ ok: boolean;
141
+ tagsDeleted: number;
142
+ }, CamelCaseDeep<generatedTypes.DeleteCustomersTagsError>>>;
143
+ export declare const getCustomersTags: (options: import("../makeEndpoint.js").ClientOption & {
149
144
  query?: {
145
+ customerNames?: string[] | undefined;
150
146
  cursor?: string | undefined;
151
147
  limit?: number | undefined;
152
148
  } | undefined;
@@ -180,29 +176,3 @@ export declare const setCustomersTags: (options: import("../makeEndpoint.js").Cl
180
176
  ok: boolean;
181
177
  customersUpdated: number;
182
178
  }, CamelCaseDeep<generatedTypes.SetCustomersTagsError>>>;
183
- export declare const deleteCustomerTags: (options: import("../makeEndpoint.js").ClientOption & {
184
- query?: undefined;
185
- body?: undefined;
186
- path: {
187
- customerName: string;
188
- };
189
- }) => Promise<import("../makeEndpoint.js").CallResult<{
190
- ok: boolean;
191
- tagsDeleted: number;
192
- }, {
193
- error: string;
194
- }>>;
195
- export declare const getCustomerTags: (options: import("../makeEndpoint.js").ClientOption & {
196
- query?: undefined;
197
- body?: undefined;
198
- path: {
199
- customerName: string;
200
- };
201
- }) => Promise<import("../makeEndpoint.js").CallResult<{
202
- customerName: string;
203
- tags: {
204
- [x: string]: string;
205
- };
206
- }, {
207
- error: string;
208
- }>>;
@@ -35,18 +35,16 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  };
36
36
  })();
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
- exports.getCustomerTags = exports.deleteCustomerTags = exports.setCustomersTags = exports.getAllCustomersTags = exports.getUserKeyMetrics = exports.deleteUserKeyMetrics = exports.setKeyMetrics = exports.getAllKeyMetrics = exports.getCustomerRevenue = exports.deleteCustomerRevenue = exports.setRevenue = exports.getAllRevenue = void 0;
38
+ exports.setCustomersTags = exports.getCustomersTags = exports.deleteCustomersTags = exports.setKeyMetrics = exports.getKeyMetrics = exports.deleteKeyMetrics = exports.setRevenue = exports.getRevenue = exports.deleteRevenue = exports.getMargin = void 0;
39
39
  const makeEndpoint_js_1 = require("../makeEndpoint.js");
40
40
  const generated = __importStar(require("./sdk.gen.js"));
41
- exports.getAllRevenue = (0, makeEndpoint_js_1.makeEndpoint)(generated.getAllRevenue);
41
+ exports.getMargin = (0, makeEndpoint_js_1.makeEndpoint)(generated.getMargin);
42
+ exports.deleteRevenue = (0, makeEndpoint_js_1.makeEndpoint)(generated.deleteRevenue);
43
+ exports.getRevenue = (0, makeEndpoint_js_1.makeEndpoint)(generated.getRevenue);
42
44
  exports.setRevenue = (0, makeEndpoint_js_1.makeEndpoint)(generated.setRevenue);
43
- exports.deleteCustomerRevenue = (0, makeEndpoint_js_1.makeEndpoint)(generated.deleteCustomerRevenue);
44
- exports.getCustomerRevenue = (0, makeEndpoint_js_1.makeEndpoint)(generated.getCustomerRevenue);
45
- exports.getAllKeyMetrics = (0, makeEndpoint_js_1.makeEndpoint)(generated.getAllKeyMetrics);
45
+ exports.deleteKeyMetrics = (0, makeEndpoint_js_1.makeEndpoint)(generated.deleteKeyMetrics);
46
+ exports.getKeyMetrics = (0, makeEndpoint_js_1.makeEndpoint)(generated.getKeyMetrics);
46
47
  exports.setKeyMetrics = (0, makeEndpoint_js_1.makeEndpoint)(generated.setKeyMetrics);
47
- exports.deleteUserKeyMetrics = (0, makeEndpoint_js_1.makeEndpoint)(generated.deleteUserKeyMetrics);
48
- exports.getUserKeyMetrics = (0, makeEndpoint_js_1.makeEndpoint)(generated.getUserKeyMetrics);
49
- exports.getAllCustomersTags = (0, makeEndpoint_js_1.makeEndpoint)(generated.getAllCustomersTags);
48
+ exports.deleteCustomersTags = (0, makeEndpoint_js_1.makeEndpoint)(generated.deleteCustomersTags);
49
+ exports.getCustomersTags = (0, makeEndpoint_js_1.makeEndpoint)(generated.getCustomersTags);
50
50
  exports.setCustomersTags = (0, makeEndpoint_js_1.makeEndpoint)(generated.setCustomersTags);
51
- exports.deleteCustomerTags = (0, makeEndpoint_js_1.makeEndpoint)(generated.deleteCustomerTags);
52
- exports.getCustomerTags = (0, makeEndpoint_js_1.makeEndpoint)(generated.getCustomerTags);
@@ -1,2 +1,2 @@
1
- export { deleteCustomerRevenue, deleteCustomerTags, deleteUserKeyMetrics, getAllCustomersTags, getAllKeyMetrics, getAllRevenue, getCustomerRevenue, getCustomerTags, getUserKeyMetrics, type Options, setCustomersTags, setKeyMetrics, setRevenue } from './sdk.gen.js';
2
- export type { AllCustomerTagsOutput, ApiErrorOutput, ClientOptions, CustomersUpdatedOutput, CustomerTags, CustomerTagsOutput, DeleteCustomerRevenueData, DeleteCustomerRevenueError, DeleteCustomerRevenueErrors, DeleteCustomerRevenueResponse, DeleteCustomerRevenueResponses, DeleteCustomerTagsData, DeleteCustomerTagsError, DeleteCustomerTagsErrors, DeleteCustomerTagsResponse, DeleteCustomerTagsResponses, DeleteUserKeyMetricsData, DeleteUserKeyMetricsError, DeleteUserKeyMetricsErrors, DeleteUserKeyMetricsResponse, DeleteUserKeyMetricsResponses, GetAllCustomersTagsData, GetAllCustomersTagsError, GetAllCustomersTagsErrors, GetAllCustomersTagsResponse, GetAllCustomersTagsResponses, GetAllKeyMetricsData, GetAllKeyMetricsError, GetAllKeyMetricsErrors, GetAllKeyMetricsResponse, GetAllKeyMetricsResponses, GetAllRevenueData, GetAllRevenueError, GetAllRevenueErrors, GetAllRevenueResponse, GetAllRevenueResponses, GetCustomerRevenueData, GetCustomerRevenueError, GetCustomerRevenueErrors, GetCustomerRevenueResponse, GetCustomerRevenueResponses, GetCustomerTagsData, GetCustomerTagsError, GetCustomerTagsErrors, GetCustomerTagsResponse, GetCustomerTagsResponses, GetUserKeyMetricsData, GetUserKeyMetricsError, GetUserKeyMetricsErrors, GetUserKeyMetricsResponse, GetUserKeyMetricsResponses, 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';
1
+ export { deleteCustomersTags, deleteKeyMetrics, deleteRevenue, getCustomersTags, getKeyMetrics, getMargin, getRevenue, type Options, setCustomersTags, setKeyMetrics, setRevenue } from './sdk.gen.js';
2
+ export type { AllCustomerTagsOutput, ApiErrorOutput, ClientOptions, CustomerMarginRow, 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, GetMarginData, GetMarginError, GetMarginErrors, GetMarginResponse, GetMarginResponses, GetRevenueData, GetRevenueError, GetRevenueErrors, GetRevenueResponse, GetRevenueResponses, InvalidFieldDetail, InvalidPayloadOutput, KeyMetricOutput, KeyMetricRow, KeyMetricRowOutput, MarginListOutput, 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';
@@ -1,17 +1,15 @@
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.getUserKeyMetrics = exports.getCustomerTags = exports.getCustomerRevenue = exports.getAllRevenue = exports.getAllKeyMetrics = exports.getAllCustomersTags = exports.deleteUserKeyMetrics = exports.deleteCustomerTags = exports.deleteCustomerRevenue = void 0;
4
+ exports.setRevenue = exports.setKeyMetrics = exports.setCustomersTags = exports.getRevenue = exports.getMargin = exports.getKeyMetrics = exports.getCustomersTags = exports.deleteRevenue = exports.deleteKeyMetrics = exports.deleteCustomersTags = void 0;
5
5
  var sdk_gen_js_1 = require("./sdk.gen.js");
6
- Object.defineProperty(exports, "deleteCustomerRevenue", { enumerable: true, get: function () { return sdk_gen_js_1.deleteCustomerRevenue; } });
7
- Object.defineProperty(exports, "deleteCustomerTags", { enumerable: true, get: function () { return sdk_gen_js_1.deleteCustomerTags; } });
8
- Object.defineProperty(exports, "deleteUserKeyMetrics", { enumerable: true, get: function () { return sdk_gen_js_1.deleteUserKeyMetrics; } });
9
- Object.defineProperty(exports, "getAllCustomersTags", { enumerable: true, get: function () { return sdk_gen_js_1.getAllCustomersTags; } });
10
- Object.defineProperty(exports, "getAllKeyMetrics", { enumerable: true, get: function () { return sdk_gen_js_1.getAllKeyMetrics; } });
11
- Object.defineProperty(exports, "getAllRevenue", { enumerable: true, get: function () { return sdk_gen_js_1.getAllRevenue; } });
12
- Object.defineProperty(exports, "getCustomerRevenue", { enumerable: true, get: function () { return sdk_gen_js_1.getCustomerRevenue; } });
13
- Object.defineProperty(exports, "getCustomerTags", { enumerable: true, get: function () { return sdk_gen_js_1.getCustomerTags; } });
14
- Object.defineProperty(exports, "getUserKeyMetrics", { enumerable: true, get: function () { return sdk_gen_js_1.getUserKeyMetrics; } });
6
+ Object.defineProperty(exports, "deleteCustomersTags", { enumerable: true, get: function () { return sdk_gen_js_1.deleteCustomersTags; } });
7
+ Object.defineProperty(exports, "deleteKeyMetrics", { enumerable: true, get: function () { return sdk_gen_js_1.deleteKeyMetrics; } });
8
+ Object.defineProperty(exports, "deleteRevenue", { enumerable: true, get: function () { return sdk_gen_js_1.deleteRevenue; } });
9
+ Object.defineProperty(exports, "getCustomersTags", { enumerable: true, get: function () { return sdk_gen_js_1.getCustomersTags; } });
10
+ Object.defineProperty(exports, "getKeyMetrics", { enumerable: true, get: function () { return sdk_gen_js_1.getKeyMetrics; } });
11
+ Object.defineProperty(exports, "getMargin", { enumerable: true, get: function () { return sdk_gen_js_1.getMargin; } });
12
+ Object.defineProperty(exports, "getRevenue", { enumerable: true, get: function () { return sdk_gen_js_1.getRevenue; } });
15
13
  Object.defineProperty(exports, "setCustomersTags", { enumerable: true, get: function () { return sdk_gen_js_1.setCustomersTags; } });
16
14
  Object.defineProperty(exports, "setKeyMetrics", { enumerable: true, get: function () { return sdk_gen_js_1.setKeyMetrics; } });
17
15
  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 { DeleteCustomerRevenueData, DeleteCustomerRevenueErrors, DeleteCustomerRevenueResponses, DeleteCustomerTagsData, DeleteCustomerTagsErrors, DeleteCustomerTagsResponses, DeleteUserKeyMetricsData, DeleteUserKeyMetricsErrors, DeleteUserKeyMetricsResponses, GetAllCustomersTagsData, GetAllCustomersTagsErrors, GetAllCustomersTagsResponses, GetAllKeyMetricsData, GetAllKeyMetricsErrors, GetAllKeyMetricsResponses, GetAllRevenueData, GetAllRevenueErrors, GetAllRevenueResponses, GetCustomerRevenueData, GetCustomerRevenueErrors, GetCustomerRevenueResponses, GetCustomerTagsData, GetCustomerTagsErrors, GetCustomerTagsResponses, GetUserKeyMetricsData, GetUserKeyMetricsErrors, GetUserKeyMetricsResponses, SetCustomersTagsData, SetCustomersTagsErrors, SetCustomersTagsResponses, SetKeyMetricsData, SetKeyMetricsErrors, SetKeyMetricsResponses, SetRevenueData, SetRevenueErrors, SetRevenueResponses } from './types.gen.js';
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';
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,50 +14,42 @@ 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
- * Every revenue value of the project, one row per booked value.
17
+ * Per-customer gross margin, sorted by customer_name ascending; pass customer_names to narrow to specific customers, omit it for every customer's.
18
18
  */
19
- export declare const getAllRevenue: <ThrowOnError extends boolean = false>(options?: Options<GetAllRevenueData, ThrowOnError>) => RequestResult<GetAllRevenueResponses, GetAllRevenueErrors, ThrowOnError>;
19
+ export declare const getMargin: <ThrowOnError extends boolean = false>(options?: Options<GetMarginData, ThrowOnError>) => RequestResult<GetMarginResponses, GetMarginErrors, ThrowOnError>;
20
20
  /**
21
- * Book revenue values; set upsert=true to overwrite rows whose id already exists.
21
+ * Delete the given customers' API-uploaded revenue values.
22
22
  */
23
- export declare const setRevenue: <ThrowOnError extends boolean = false>(options: Options<SetRevenueData, ThrowOnError>) => RequestResult<SetRevenueResponses, SetRevenueErrors, ThrowOnError>;
23
+ export declare const deleteRevenue: <ThrowOnError extends boolean = false>(options: Options<DeleteRevenueData, ThrowOnError>) => RequestResult<DeleteRevenueResponses, DeleteRevenueErrors, ThrowOnError>;
24
24
  /**
25
- * Delete one customer's API-uploaded revenue values.
25
+ * The project's revenue values, one row per booked value; pass customer_names to narrow to specific customers, omit it for every customer's.
26
26
  */
27
- export declare const deleteCustomerRevenue: <ThrowOnError extends boolean = false>(options: Options<DeleteCustomerRevenueData, ThrowOnError>) => RequestResult<DeleteCustomerRevenueResponses, DeleteCustomerRevenueErrors, ThrowOnError>;
27
+ export declare const getRevenue: <ThrowOnError extends boolean = false>(options?: Options<GetRevenueData, ThrowOnError>) => RequestResult<GetRevenueResponses, GetRevenueErrors, ThrowOnError>;
28
28
  /**
29
- * One customer's revenue values; 404 when none are booked.
29
+ * Book revenue values; set upsert=true to overwrite rows whose id already exists.
30
30
  */
31
- export declare const getCustomerRevenue: <ThrowOnError extends boolean = false>(options: Options<GetCustomerRevenueData, ThrowOnError>) => RequestResult<GetCustomerRevenueResponses, GetCustomerRevenueErrors, ThrowOnError>;
31
+ export declare const setRevenue: <ThrowOnError extends boolean = false>(options: Options<SetRevenueData, ThrowOnError>) => RequestResult<SetRevenueResponses, SetRevenueErrors, ThrowOnError>;
32
32
  /**
33
- * Every key-metric value of the project, one row per booked value.
33
+ * Delete the given users' API-uploaded key-metric values.
34
34
  */
35
- export declare const getAllKeyMetrics: <ThrowOnError extends boolean = false>(options?: Options<GetAllKeyMetricsData, ThrowOnError>) => RequestResult<GetAllKeyMetricsResponses, GetAllKeyMetricsErrors, ThrowOnError>;
35
+ export declare const deleteKeyMetrics: <ThrowOnError extends boolean = false>(options: Options<DeleteKeyMetricsData, ThrowOnError>) => RequestResult<DeleteKeyMetricsResponses, DeleteKeyMetricsErrors, ThrowOnError>;
36
36
  /**
37
- * Book key-metric values; set upsert=true to overwrite rows whose id already exists.
37
+ * 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.
38
38
  */
39
- export declare const setKeyMetrics: <ThrowOnError extends boolean = false>(options: Options<SetKeyMetricsData, ThrowOnError>) => RequestResult<SetKeyMetricsResponses, SetKeyMetricsErrors, ThrowOnError>;
39
+ export declare const getKeyMetrics: <ThrowOnError extends boolean = false>(options?: Options<GetKeyMetricsData, ThrowOnError>) => RequestResult<GetKeyMetricsResponses, GetKeyMetricsErrors, ThrowOnError>;
40
40
  /**
41
- * Delete one user's API-uploaded key-metric values.
41
+ * Book key-metric values; set upsert=true to overwrite rows whose id already exists.
42
42
  */
43
- export declare const deleteUserKeyMetrics: <ThrowOnError extends boolean = false>(options: Options<DeleteUserKeyMetricsData, ThrowOnError>) => RequestResult<DeleteUserKeyMetricsResponses, DeleteUserKeyMetricsErrors, ThrowOnError>;
43
+ export declare const setKeyMetrics: <ThrowOnError extends boolean = false>(options: Options<SetKeyMetricsData, ThrowOnError>) => RequestResult<SetKeyMetricsResponses, SetKeyMetricsErrors, ThrowOnError>;
44
44
  /**
45
- * One user's key-metric values; 404 when none are booked.
45
+ * Delete every tag of the given customers.
46
46
  */
47
- export declare const getUserKeyMetrics: <ThrowOnError extends boolean = false>(options: Options<GetUserKeyMetricsData, ThrowOnError>) => RequestResult<GetUserKeyMetricsResponses, GetUserKeyMetricsErrors, ThrowOnError>;
47
+ export declare const deleteCustomersTags: <ThrowOnError extends boolean = false>(options: Options<DeleteCustomersTagsData, ThrowOnError>) => RequestResult<DeleteCustomersTagsResponses, DeleteCustomersTagsErrors, ThrowOnError>;
48
48
  /**
49
- * Every known customer of the project with its tags (possibly empty).
49
+ * 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.
50
50
  */
51
- export declare const getAllCustomersTags: <ThrowOnError extends boolean = false>(options?: Options<GetAllCustomersTagsData, ThrowOnError>) => RequestResult<GetAllCustomersTagsResponses, GetAllCustomersTagsErrors, ThrowOnError>;
51
+ export declare const getCustomersTags: <ThrowOnError extends boolean = false>(options?: Options<GetCustomersTagsData, ThrowOnError>) => RequestResult<GetCustomersTagsResponses, GetCustomersTagsErrors, ThrowOnError>;
52
52
  /**
53
53
  * Merge-set customer tags; set upsert=true to overwrite tags that already exist.
54
54
  */
55
55
  export declare const setCustomersTags: <ThrowOnError extends boolean = false>(options: Options<SetCustomersTagsData, ThrowOnError>) => RequestResult<SetCustomersTagsResponses, SetCustomersTagsErrors, ThrowOnError>;
56
- /**
57
- * Delete every tag of one customer; 404 for a customer Weflayr has never seen.
58
- */
59
- export declare const deleteCustomerTags: <ThrowOnError extends boolean = false>(options: Options<DeleteCustomerTagsData, ThrowOnError>) => RequestResult<DeleteCustomerTagsResponses, DeleteCustomerTagsErrors, ThrowOnError>;
60
- /**
61
- * One customer's tags; 404 for a customer Weflayr has never seen.
62
- */
63
- export declare const getCustomerTags: <ThrowOnError extends boolean = false>(options: Options<GetCustomerTagsData, ThrowOnError>) => RequestResult<GetCustomerTagsResponses, GetCustomerTagsErrors, ThrowOnError>;
@@ -1,17 +1,35 @@
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.getCustomerTags = exports.deleteCustomerTags = exports.setCustomersTags = exports.getAllCustomersTags = exports.getUserKeyMetrics = exports.deleteUserKeyMetrics = exports.setKeyMetrics = exports.getAllKeyMetrics = exports.getCustomerRevenue = exports.deleteCustomerRevenue = exports.setRevenue = exports.getAllRevenue = void 0;
4
+ exports.setCustomersTags = exports.getCustomersTags = exports.deleteCustomersTags = exports.setKeyMetrics = exports.getKeyMetrics = exports.deleteKeyMetrics = exports.setRevenue = exports.getRevenue = exports.deleteRevenue = exports.getMargin = void 0;
5
5
  const client_gen_js_1 = require("./client.gen.js");
6
6
  /**
7
- * Every revenue value of the project, one row per booked value.
7
+ * Per-customer gross margin, sorted by customer_name ascending; pass customer_names to narrow to specific customers, omit it for every customer's.
8
8
  */
9
- const getAllRevenue = (options) => (options?.client ?? client_gen_js_1.client).get({
9
+ const getMargin = (options) => (options?.client ?? client_gen_js_1.client).get({
10
+ security: [{ scheme: 'bearer', type: 'http' }],
11
+ url: '/margin/',
12
+ ...options
13
+ });
14
+ exports.getMargin = getMargin;
15
+ /**
16
+ * Delete the given customers' API-uploaded revenue values.
17
+ */
18
+ const deleteRevenue = (options) => (options.client ?? client_gen_js_1.client).delete({
10
19
  security: [{ scheme: 'bearer', type: 'http' }],
11
20
  url: '/revenue/',
12
21
  ...options
13
22
  });
14
- exports.getAllRevenue = getAllRevenue;
23
+ exports.deleteRevenue = deleteRevenue;
24
+ /**
25
+ * The project's revenue values, one row per booked value; pass customer_names to narrow to specific customers, omit it for every customer's.
26
+ */
27
+ const getRevenue = (options) => (options?.client ?? client_gen_js_1.client).get({
28
+ security: [{ scheme: 'bearer', type: 'http' }],
29
+ url: '/revenue/',
30
+ ...options
31
+ });
32
+ exports.getRevenue = getRevenue;
15
33
  /**
16
34
  * Book revenue values; set upsert=true to overwrite rows whose id already exists.
17
35
  */
@@ -26,32 +44,23 @@ const setRevenue = (options) => (options.client ?? client_gen_js_1.client).post(
26
44
  });
27
45
  exports.setRevenue = setRevenue;
28
46
  /**
29
- * Delete one customer's API-uploaded revenue values.
30
- */
31
- const deleteCustomerRevenue = (options) => (options.client ?? client_gen_js_1.client).delete({
32
- security: [{ scheme: 'bearer', type: 'http' }],
33
- url: '/revenue/{customer_name}/',
34
- ...options
35
- });
36
- exports.deleteCustomerRevenue = deleteCustomerRevenue;
37
- /**
38
- * One customer's revenue values; 404 when none are booked.
47
+ * Delete the given users' API-uploaded key-metric values.
39
48
  */
40
- const getCustomerRevenue = (options) => (options.client ?? client_gen_js_1.client).get({
49
+ const deleteKeyMetrics = (options) => (options.client ?? client_gen_js_1.client).delete({
41
50
  security: [{ scheme: 'bearer', type: 'http' }],
42
- url: '/revenue/{customer_name}/',
51
+ url: '/key-metrics/',
43
52
  ...options
44
53
  });
45
- exports.getCustomerRevenue = getCustomerRevenue;
54
+ exports.deleteKeyMetrics = deleteKeyMetrics;
46
55
  /**
47
- * Every key-metric value of the project, one row per booked value.
56
+ * 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.
48
57
  */
49
- const getAllKeyMetrics = (options) => (options?.client ?? client_gen_js_1.client).get({
58
+ const getKeyMetrics = (options) => (options?.client ?? client_gen_js_1.client).get({
50
59
  security: [{ scheme: 'bearer', type: 'http' }],
51
60
  url: '/key-metrics/',
52
61
  ...options
53
62
  });
54
- exports.getAllKeyMetrics = getAllKeyMetrics;
63
+ exports.getKeyMetrics = getKeyMetrics;
55
64
  /**
56
65
  * Book key-metric values; set upsert=true to overwrite rows whose id already exists.
57
66
  */
@@ -66,32 +75,23 @@ const setKeyMetrics = (options) => (options.client ?? client_gen_js_1.client).po
66
75
  });
67
76
  exports.setKeyMetrics = setKeyMetrics;
68
77
  /**
69
- * Delete one user's API-uploaded key-metric values.
78
+ * Delete every tag of the given customers.
70
79
  */
71
- const deleteUserKeyMetrics = (options) => (options.client ?? client_gen_js_1.client).delete({
80
+ const deleteCustomersTags = (options) => (options.client ?? client_gen_js_1.client).delete({
72
81
  security: [{ scheme: 'bearer', type: 'http' }],
73
- url: '/key-metrics/{user_name}/',
74
- ...options
75
- });
76
- exports.deleteUserKeyMetrics = deleteUserKeyMetrics;
77
- /**
78
- * One user's key-metric values; 404 when none are booked.
79
- */
80
- const getUserKeyMetrics = (options) => (options.client ?? client_gen_js_1.client).get({
81
- security: [{ scheme: 'bearer', type: 'http' }],
82
- url: '/key-metrics/{user_name}/',
82
+ url: '/customer-tags/',
83
83
  ...options
84
84
  });
85
- exports.getUserKeyMetrics = getUserKeyMetrics;
85
+ exports.deleteCustomersTags = deleteCustomersTags;
86
86
  /**
87
- * Every known customer of the project with its tags (possibly empty).
87
+ * 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.
88
88
  */
89
- const getAllCustomersTags = (options) => (options?.client ?? client_gen_js_1.client).get({
89
+ const getCustomersTags = (options) => (options?.client ?? client_gen_js_1.client).get({
90
90
  security: [{ scheme: 'bearer', type: 'http' }],
91
91
  url: '/customer-tags/',
92
92
  ...options
93
93
  });
94
- exports.getAllCustomersTags = getAllCustomersTags;
94
+ exports.getCustomersTags = getCustomersTags;
95
95
  /**
96
96
  * Merge-set customer tags; set upsert=true to overwrite tags that already exist.
97
97
  */
@@ -105,21 +105,3 @@ const setCustomersTags = (options) => (options.client ?? client_gen_js_1.client)
105
105
  }
106
106
  });
107
107
  exports.setCustomersTags = setCustomersTags;
108
- /**
109
- * Delete every tag of one customer; 404 for a customer Weflayr has never seen.
110
- */
111
- const deleteCustomerTags = (options) => (options.client ?? client_gen_js_1.client).delete({
112
- security: [{ scheme: 'bearer', type: 'http' }],
113
- url: '/customer-tags/{customer_name}/',
114
- ...options
115
- });
116
- exports.deleteCustomerTags = deleteCustomerTags;
117
- /**
118
- * One customer's tags; 404 for a customer Weflayr has never seen.
119
- */
120
- const getCustomerTags = (options) => (options.client ?? client_gen_js_1.client).get({
121
- security: [{ scheme: 'bearer', type: 'http' }],
122
- url: '/customer-tags/{customer_name}/',
123
- ...options
124
- });
125
- exports.getCustomerTags = getCustomerTags;