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.
- package/dist/api/generated/facade.gen.d.ts +64 -94
- package/dist/api/generated/facade.gen.js +8 -10
- package/dist/api/generated/index.d.ts +2 -2
- package/dist/api/generated/index.js +8 -10
- package/dist/api/generated/sdk.gen.d.ts +19 -27
- package/dist/api/generated/sdk.gen.js +36 -54
- package/dist/api/generated/types.gen.d.ts +204 -166
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/package.json +1 -1
- package/scripts/generate_facade.mjs +2 -2
- package/src/api/generated/facade.gen.ts +37 -49
- package/src/api/generated/index.ts +2 -2
- package/src/api/generated/sdk.gen.ts +31 -49
- package/src/api/generated/types.gen.ts +211 -181
- package/src/api/index.ts +1 -1
- package/tests/api/index.test.js +176 -69
|
@@ -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
|
|
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:
|
|
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
|
-
|
|
66
|
+
revenueId?: string | null | undefined;
|
|
29
67
|
customerName: string;
|
|
30
|
-
amount:
|
|
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
|
|
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.
|
|
55
|
-
export declare const
|
|
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:
|
|
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
|
-
|
|
118
|
+
metricId?: string | null | undefined;
|
|
101
119
|
userName: string;
|
|
102
120
|
metricName: string;
|
|
103
|
-
amount:
|
|
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
|
|
116
|
-
query
|
|
117
|
-
|
|
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
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
44
|
-
exports.
|
|
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.
|
|
48
|
-
exports.
|
|
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 {
|
|
2
|
-
export type { AllCustomerTagsOutput, ApiErrorOutput, ClientOptions, CustomersUpdatedOutput, CustomerTags, CustomerTagsOutput,
|
|
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.
|
|
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, "
|
|
7
|
-
Object.defineProperty(exports, "
|
|
8
|
-
Object.defineProperty(exports, "
|
|
9
|
-
Object.defineProperty(exports, "
|
|
10
|
-
Object.defineProperty(exports, "
|
|
11
|
-
Object.defineProperty(exports, "
|
|
12
|
-
Object.defineProperty(exports, "
|
|
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 {
|
|
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
|
-
*
|
|
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
|
|
19
|
+
export declare const getMargin: <ThrowOnError extends boolean = false>(options?: Options<GetMarginData, ThrowOnError>) => RequestResult<GetMarginResponses, GetMarginErrors, ThrowOnError>;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Delete the given customers' API-uploaded revenue values.
|
|
22
22
|
*/
|
|
23
|
-
export declare const
|
|
23
|
+
export declare const deleteRevenue: <ThrowOnError extends boolean = false>(options: Options<DeleteRevenueData, ThrowOnError>) => RequestResult<DeleteRevenueResponses, DeleteRevenueErrors, ThrowOnError>;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
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
|
|
27
|
+
export declare const getRevenue: <ThrowOnError extends boolean = false>(options?: Options<GetRevenueData, ThrowOnError>) => RequestResult<GetRevenueResponses, GetRevenueErrors, ThrowOnError>;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Book revenue values; set upsert=true to overwrite rows whose id already exists.
|
|
30
30
|
*/
|
|
31
|
-
export declare const
|
|
31
|
+
export declare const setRevenue: <ThrowOnError extends boolean = false>(options: Options<SetRevenueData, ThrowOnError>) => RequestResult<SetRevenueResponses, SetRevenueErrors, ThrowOnError>;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Delete the given users' API-uploaded key-metric values.
|
|
34
34
|
*/
|
|
35
|
-
export declare const
|
|
35
|
+
export declare const deleteKeyMetrics: <ThrowOnError extends boolean = false>(options: Options<DeleteKeyMetricsData, ThrowOnError>) => RequestResult<DeleteKeyMetricsResponses, DeleteKeyMetricsErrors, ThrowOnError>;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
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
|
|
39
|
+
export declare const getKeyMetrics: <ThrowOnError extends boolean = false>(options?: Options<GetKeyMetricsData, ThrowOnError>) => RequestResult<GetKeyMetricsResponses, GetKeyMetricsErrors, ThrowOnError>;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Book key-metric values; set upsert=true to overwrite rows whose id already exists.
|
|
42
42
|
*/
|
|
43
|
-
export declare const
|
|
43
|
+
export declare const setKeyMetrics: <ThrowOnError extends boolean = false>(options: Options<SetKeyMetricsData, ThrowOnError>) => RequestResult<SetKeyMetricsResponses, SetKeyMetricsErrors, ThrowOnError>;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Delete every tag of the given customers.
|
|
46
46
|
*/
|
|
47
|
-
export declare const
|
|
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
|
|
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.
|
|
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
|
-
*
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
49
|
+
const deleteKeyMetrics = (options) => (options.client ?? client_gen_js_1.client).delete({
|
|
41
50
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
42
|
-
url: '/
|
|
51
|
+
url: '/key-metrics/',
|
|
43
52
|
...options
|
|
44
53
|
});
|
|
45
|
-
exports.
|
|
54
|
+
exports.deleteKeyMetrics = deleteKeyMetrics;
|
|
46
55
|
/**
|
|
47
|
-
*
|
|
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
|
|
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.
|
|
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
|
|
78
|
+
* Delete every tag of the given customers.
|
|
70
79
|
*/
|
|
71
|
-
const
|
|
80
|
+
const deleteCustomersTags = (options) => (options.client ?? client_gen_js_1.client).delete({
|
|
72
81
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
73
|
-
url: '/
|
|
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.
|
|
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
|
|
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.
|
|
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;
|