@kosdev-code/kos-freestyle-sdk 2.1.25 → 2.1.27
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/{extension-utils-sj0P_x9E.js → extension-utils-CARIyqNK.js} +8 -8
- package/{extension-utils-sj0P_x9E.js.map → extension-utils-CARIyqNK.js.map} +1 -1
- package/extension-utils-DABHO8qx.cjs +2 -0
- package/{extension-utils-BUUtrM-T.cjs.map → extension-utils-DABHO8qx.cjs.map} +1 -1
- package/index.cjs +1 -1
- package/index.js +28 -26
- package/models/utils/index.d.ts +1 -0
- package/models/utils/index.d.ts.map +1 -1
- package/models/utils/openapi-index.d.ts +3 -0
- package/models/utils/openapi-index.d.ts.map +1 -0
- package/models/utils/services/freestyle/daily/openapi.d.ts +1656 -0
- package/models/utils/services/freestyle/daily/service.d.ts +118 -0
- package/models/utils/services/freestyle/daily/service.d.ts.map +1 -0
- package/models/utils/services/handle/daily/openapi.d.ts +420 -0
- package/models/utils/services/handle/daily/service.d.ts +118 -0
- package/models/utils/services/handle/daily/service.d.ts.map +1 -0
- package/models/utils/services-index.d.ts +3 -0
- package/models/utils/services-index.d.ts.map +1 -0
- package/models.cjs +1 -1
- package/models.js +23 -21
- package/package.json +4 -4
- package/{freestyle-registration-manager-DSugLmqT.js → service-C0WOCTr1.js} +322 -302
- package/service-C0WOCTr1.js.map +1 -0
- package/{freestyle-registration-manager-rmrOsUZq.cjs → service-VUszslQD.cjs} +2 -2
- package/service-VUszslQD.cjs.map +1 -0
- package/ui.cjs +1 -1
- package/ui.js +2 -2
- package/use-nutrition-info-BRX7H5o6.cjs +2 -0
- package/{use-nutrition-info-DSdA_SRp.cjs.map → use-nutrition-info-BRX7H5o6.cjs.map} +1 -1
- package/{use-nutrition-info-DtcZs7dL.js → use-nutrition-info-BWyJAXF6.js} +2 -2
- package/{use-nutrition-info-DtcZs7dL.js.map → use-nutrition-info-BWyJAXF6.js.map} +1 -1
- package/extension-utils-BUUtrM-T.cjs +0 -2
- package/freestyle-registration-manager-DSugLmqT.js.map +0 -1
- package/freestyle-registration-manager-rmrOsUZq.cjs.map +0 -1
- package/use-nutrition-info-DSdA_SRp.cjs +0 -2
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { paths } from './openapi';
|
|
2
|
+
import { ClientResponse, HttpMethod, IKosServiceRequestParams, KosExecutionContext, PathsByMethod } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Type aliases for freestyle API
|
|
6
|
+
*/
|
|
7
|
+
export type Api = paths;
|
|
8
|
+
export type ApiPath = keyof paths;
|
|
9
|
+
export type ValidPaths = PathsByMethod<paths>;
|
|
10
|
+
/**
|
|
11
|
+
* Get client response type for freestyle API
|
|
12
|
+
*/
|
|
13
|
+
export type ApiResponse<Path extends ApiPath, Method extends "get" | "post" | "put" | "delete" = "get"> = ClientResponse<paths, Path, Method>;
|
|
14
|
+
/**
|
|
15
|
+
* Get execution context type for freestyle API
|
|
16
|
+
*/
|
|
17
|
+
export type ExecutionContext<Path extends ApiPath = ApiPath, Method extends HttpMethod = "get"> = KosExecutionContext<paths, Path, Method>;
|
|
18
|
+
/**
|
|
19
|
+
* Typed decorator factory for @kosServiceRequest with freestyle API types
|
|
20
|
+
*
|
|
21
|
+
* Provides full IntelliSense and type safety for path, query params, and body
|
|
22
|
+
* based on the freestyle OpenAPI schema.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* import { kosServiceRequest } from '../../utils/services/freestyle/daily/service';
|
|
27
|
+
* import { DependencyLifecycle } from '@kosdev-code/kos-ui-sdk';
|
|
28
|
+
*
|
|
29
|
+
* @kosServiceRequest({
|
|
30
|
+
* path: '/api/...',
|
|
31
|
+
* method: 'get',
|
|
32
|
+
* lifecycle: DependencyLifecycle.LOAD
|
|
33
|
+
* })
|
|
34
|
+
* private onDataLoaded(): void {
|
|
35
|
+
* // Fully typed based on freestyle API
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function kosServiceRequest<Path extends ApiPath, Method extends HttpMethod = "get", Response = any, TransformedResponse = Response>(params: IKosServiceRequestParams<paths, Path, Method, Response, TransformedResponse>): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
40
|
+
/**
|
|
41
|
+
* Create an API client for freestyle
|
|
42
|
+
*/
|
|
43
|
+
export declare const api: {
|
|
44
|
+
get: <K extends "/api/ext/freestyle/can/read/float/{boardPath}/{index}/{subIndex}" | "/api/ext/freestyle/can/read/int/{boardPath}/{index}/{subIndex}" | "/api/ext/freestyle/can/stats" | "/api/ext/freestyle/can/stats/raw" | "/api/ext/freestyle/microCalibration/report/{board}" | "/api/ext/freestyle/microCalibration/history/{pump}" | "/api/ext/freestyle/microCalibration/cal/{pump}" | "/api/ext/freestyle/brandset/nutrition/{bevId}" | "/api/ext/freestyle/brandset/grantProperties" | "/api/ext/freestyle/fcm/calibration/{pump}/baseline" | "/api/ext/freestyle/fuelGauges/{holder}" | "/api/ext/freestyle/cartridges" | "/api/ext/freestyle/cartridges/{id}">(endpoint: K, params?: (paths[K]["get"] extends {
|
|
45
|
+
parameters: infer P;
|
|
46
|
+
} ? P : never) | undefined, options?: {
|
|
47
|
+
ordered?: boolean | undefined;
|
|
48
|
+
tracker?: string | undefined;
|
|
49
|
+
timeout?: number | undefined;
|
|
50
|
+
headers?: Record<string, string> | undefined;
|
|
51
|
+
fos?: boolean | undefined;
|
|
52
|
+
bridge?: boolean | undefined;
|
|
53
|
+
destinationAddress?: string | undefined;
|
|
54
|
+
studio?: boolean | undefined;
|
|
55
|
+
signal?: AbortSignal | undefined;
|
|
56
|
+
stream?: boolean | undefined;
|
|
57
|
+
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
58
|
+
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K, "get">>>;
|
|
59
|
+
post: <K_1 extends "/api/ext/freestyle/can/stats" | "/api/ext/freestyle/can/write/byte/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/short/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/float/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/int/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/fcm/diagnostics/{pump}/pressureTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/opennessTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/flowTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/electricalTest" | "/api/ext/freestyle/microCalibration/cal/{pump}/running/{val}" | "/api/ext/freestyle/microCalibration/cal/{pump}/code/{code}" | "/api/ext/freestyle/microCalibration/cal/{pump}/baseline/{val}" | "/api/ext/freestyle/microCalibration/cal/{pump}/both/{val}" | "/api/ext/freestyle/brandset/grantProperties" | "/api/ext/freestyle/fcm/calibration/{pump}/calibrate" | "/api/ext/freestyle/fcm/calibration/{pump}/preCalibrate" | "/api/ext/freestyle/fcm/calibration/{pump}/verify/{calVolume}" | "/api/ext/freestyle/fcm/calibration/{pump}/baseline/{value}" | "/api/ext/freestyle/fcm/calibration/{pump}/complete/{calVolume}/{verifyVolume}" | "/api/ext/freestyle/microCalibration/pour/{pump}/calibrate" | "/api/ext/freestyle/microCalibration/pour/{pump}/preCalibrate" | "/api/ext/freestyle/microCalibration/pour/{pump}/verify" | "/api/ext/freestyle/microCalibration/pour/{pump}/complete" | "/api/ext/freestyle/fuelGauges/{holder}/{val}">(endpoint: K_1, params?: (paths[K_1]["post"] extends {
|
|
60
|
+
parameters: infer P_1;
|
|
61
|
+
} ? P_1 : never) | undefined, body?: (paths[K_1]["post"] extends {
|
|
62
|
+
requestBody: {
|
|
63
|
+
content: infer B;
|
|
64
|
+
};
|
|
65
|
+
} ? B[keyof B] : never) | undefined, options?: {
|
|
66
|
+
ordered?: boolean | undefined;
|
|
67
|
+
tracker?: string | undefined;
|
|
68
|
+
timeout?: number | undefined;
|
|
69
|
+
headers?: Record<string, string> | undefined;
|
|
70
|
+
fos?: boolean | undefined;
|
|
71
|
+
bridge?: boolean | undefined;
|
|
72
|
+
destinationAddress?: string | undefined;
|
|
73
|
+
studio?: boolean | undefined;
|
|
74
|
+
signal?: AbortSignal | undefined;
|
|
75
|
+
stream?: boolean | undefined;
|
|
76
|
+
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
77
|
+
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_1, "post">>>;
|
|
78
|
+
put: <K_2 extends never>(endpoint: K_2, params?: (paths[K_2]["put"] extends {
|
|
79
|
+
parameters: infer P_2;
|
|
80
|
+
} ? P_2 : never) | undefined, body?: (paths[K_2]["put"] extends {
|
|
81
|
+
requestBody: {
|
|
82
|
+
content: infer B_1;
|
|
83
|
+
};
|
|
84
|
+
} ? B_1[keyof B_1] : never) | undefined, options?: {
|
|
85
|
+
ordered?: boolean | undefined;
|
|
86
|
+
tracker?: string | undefined;
|
|
87
|
+
timeout?: number | undefined;
|
|
88
|
+
headers?: Record<string, string> | undefined;
|
|
89
|
+
fos?: boolean | undefined;
|
|
90
|
+
bridge?: boolean | undefined;
|
|
91
|
+
destinationAddress?: string | undefined;
|
|
92
|
+
studio?: boolean | undefined;
|
|
93
|
+
signal?: AbortSignal | undefined;
|
|
94
|
+
stream?: boolean | undefined;
|
|
95
|
+
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
96
|
+
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_2, "put">>>;
|
|
97
|
+
delete: <K_3 extends never>(endpoint: K_3, params?: (paths[K_3]["delete"] extends {
|
|
98
|
+
parameters: infer P_3;
|
|
99
|
+
} ? P_3 : never) | undefined, body?: (paths[K_3]["put"] extends {
|
|
100
|
+
requestBody: {
|
|
101
|
+
content: infer B_1;
|
|
102
|
+
};
|
|
103
|
+
} ? B_1[keyof B_1] : never) | undefined, options?: {
|
|
104
|
+
ordered?: boolean | undefined;
|
|
105
|
+
tracker?: string | undefined;
|
|
106
|
+
timeout?: number | undefined;
|
|
107
|
+
headers?: Record<string, string> | undefined;
|
|
108
|
+
fos?: boolean | undefined;
|
|
109
|
+
bridge?: boolean | undefined;
|
|
110
|
+
destinationAddress?: string | undefined;
|
|
111
|
+
studio?: boolean | undefined;
|
|
112
|
+
signal?: AbortSignal | undefined;
|
|
113
|
+
stream?: boolean | undefined;
|
|
114
|
+
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
115
|
+
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_3, "delete">>>;
|
|
116
|
+
};
|
|
117
|
+
export default api;
|
|
118
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/services/freestyle/daily/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC;AACxB,MAAM,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC;AAClC,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,IACtD,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAC1B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,MAAM,SAAS,UAAU,GAAG,KAAK,IAC/B,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,UAAU,GAAG,KAAK,EACjC,QAAQ,GAAG,GAAG,EACd,mBAAmB,GAAG,QAAQ,EAE9B,MAAM,EAAE,wBAAwB,CAC9B,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,mBAAmB,CACpB,4FASF;AAED;;GAEG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAEzC,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
export interface paths {
|
|
2
|
+
"/api/handle/assembly:core:board:macro:cartridgeAgitator:agit/trackers": {
|
|
3
|
+
parameters: {
|
|
4
|
+
query?: never;
|
|
5
|
+
header?: never;
|
|
6
|
+
path?: never;
|
|
7
|
+
cookie?: never;
|
|
8
|
+
};
|
|
9
|
+
/** Return tracker state for each holder associted with the agitator. (v1.0) */
|
|
10
|
+
get: {
|
|
11
|
+
parameters: {
|
|
12
|
+
query?: never;
|
|
13
|
+
header?: never;
|
|
14
|
+
path?: never;
|
|
15
|
+
cookie?: never;
|
|
16
|
+
};
|
|
17
|
+
requestBody?: never;
|
|
18
|
+
responses: {
|
|
19
|
+
/** @description OK */
|
|
20
|
+
200: {
|
|
21
|
+
headers: {
|
|
22
|
+
[name: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
content: {
|
|
25
|
+
"application/json": components["schemas"]["eaafc672-c9e7-4398-83c4-ba97882acca6"];
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
put?: never;
|
|
31
|
+
post?: never;
|
|
32
|
+
delete?: never;
|
|
33
|
+
options?: never;
|
|
34
|
+
head?: never;
|
|
35
|
+
patch?: never;
|
|
36
|
+
trace?: never;
|
|
37
|
+
};
|
|
38
|
+
"/api/handle/assembly:core:board:macro:cartridgeAgitator:agit/trackers/prune": {
|
|
39
|
+
parameters: {
|
|
40
|
+
query?: never;
|
|
41
|
+
header?: never;
|
|
42
|
+
path?: never;
|
|
43
|
+
cookie?: never;
|
|
44
|
+
};
|
|
45
|
+
/** Prune tracker data that is beyond the retention period. (v1.0) */
|
|
46
|
+
get: {
|
|
47
|
+
parameters: {
|
|
48
|
+
query?: never;
|
|
49
|
+
header?: never;
|
|
50
|
+
path?: never;
|
|
51
|
+
cookie?: never;
|
|
52
|
+
};
|
|
53
|
+
requestBody?: never;
|
|
54
|
+
responses: {
|
|
55
|
+
/** @description OK */
|
|
56
|
+
200: {
|
|
57
|
+
headers: {
|
|
58
|
+
[name: string]: unknown;
|
|
59
|
+
};
|
|
60
|
+
content?: never;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
put?: never;
|
|
65
|
+
post?: never;
|
|
66
|
+
delete?: never;
|
|
67
|
+
options?: never;
|
|
68
|
+
head?: never;
|
|
69
|
+
patch?: never;
|
|
70
|
+
trace?: never;
|
|
71
|
+
};
|
|
72
|
+
"/api/handle/assembly:core:board:macro:cartridgeAgitator:agit/test": {
|
|
73
|
+
parameters: {
|
|
74
|
+
query?: never;
|
|
75
|
+
header?: never;
|
|
76
|
+
path?: never;
|
|
77
|
+
cookie?: never;
|
|
78
|
+
};
|
|
79
|
+
get?: never;
|
|
80
|
+
put?: never;
|
|
81
|
+
/** Run an agitation test. (v1.0) */
|
|
82
|
+
post: {
|
|
83
|
+
parameters: {
|
|
84
|
+
query?: never;
|
|
85
|
+
header?: never;
|
|
86
|
+
path?: never;
|
|
87
|
+
cookie?: never;
|
|
88
|
+
};
|
|
89
|
+
requestBody?: never;
|
|
90
|
+
responses: {
|
|
91
|
+
/** @description OK */
|
|
92
|
+
200: {
|
|
93
|
+
headers: {
|
|
94
|
+
[name: string]: unknown;
|
|
95
|
+
};
|
|
96
|
+
content: {
|
|
97
|
+
"application/json": components["schemas"]["cb60ef05-e7d7-4b54-82b9-5a0b3c3b3434"];
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
delete?: never;
|
|
103
|
+
options?: never;
|
|
104
|
+
head?: never;
|
|
105
|
+
patch?: never;
|
|
106
|
+
trace?: never;
|
|
107
|
+
};
|
|
108
|
+
"/api/handle/assembly:core:board:macro:cartridgeAgitator:agit/action": {
|
|
109
|
+
parameters: {
|
|
110
|
+
query?: never;
|
|
111
|
+
header?: never;
|
|
112
|
+
path?: never;
|
|
113
|
+
cookie?: never;
|
|
114
|
+
};
|
|
115
|
+
/** Return the currently running agitation action. (v1.0) */
|
|
116
|
+
get: {
|
|
117
|
+
parameters: {
|
|
118
|
+
query?: never;
|
|
119
|
+
header?: never;
|
|
120
|
+
path?: never;
|
|
121
|
+
cookie?: never;
|
|
122
|
+
};
|
|
123
|
+
requestBody?: never;
|
|
124
|
+
responses: {
|
|
125
|
+
/** @description OK */
|
|
126
|
+
200: {
|
|
127
|
+
headers: {
|
|
128
|
+
[name: string]: unknown;
|
|
129
|
+
};
|
|
130
|
+
content: {
|
|
131
|
+
"application/json": components["schemas"]["968641e0-43bb-42c4-8bf3-739800145194"];
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
put?: never;
|
|
137
|
+
post?: never;
|
|
138
|
+
delete?: never;
|
|
139
|
+
options?: never;
|
|
140
|
+
head?: never;
|
|
141
|
+
patch?: never;
|
|
142
|
+
trace?: never;
|
|
143
|
+
};
|
|
144
|
+
"/api/handle/assembly:core:board:macro:iceAgitator:ice/types": {
|
|
145
|
+
parameters: {
|
|
146
|
+
query?: never;
|
|
147
|
+
header?: never;
|
|
148
|
+
path?: never;
|
|
149
|
+
cookie?: never;
|
|
150
|
+
};
|
|
151
|
+
/** Returns a list of availble ice types (v1.0) */
|
|
152
|
+
get: {
|
|
153
|
+
parameters: {
|
|
154
|
+
query?: never;
|
|
155
|
+
header?: never;
|
|
156
|
+
path?: never;
|
|
157
|
+
cookie?: never;
|
|
158
|
+
};
|
|
159
|
+
requestBody?: never;
|
|
160
|
+
responses: {
|
|
161
|
+
/** @description OK */
|
|
162
|
+
200: {
|
|
163
|
+
headers: {
|
|
164
|
+
[name: string]: unknown;
|
|
165
|
+
};
|
|
166
|
+
content: {
|
|
167
|
+
"application/json": components["schemas"]["5edb62f3-d260-4852-8b8f-f52098ff41b1"];
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
put?: never;
|
|
173
|
+
post?: never;
|
|
174
|
+
delete?: never;
|
|
175
|
+
options?: never;
|
|
176
|
+
head?: never;
|
|
177
|
+
patch?: never;
|
|
178
|
+
trace?: never;
|
|
179
|
+
};
|
|
180
|
+
"/api/handle/assembly:core:board:macro:iceAgitator:ice/test/agitation": {
|
|
181
|
+
parameters: {
|
|
182
|
+
query?: never;
|
|
183
|
+
header?: never;
|
|
184
|
+
path?: never;
|
|
185
|
+
cookie?: never;
|
|
186
|
+
};
|
|
187
|
+
get?: never;
|
|
188
|
+
put?: never;
|
|
189
|
+
/** Test the ice agitator by running it for a short duration. (v1.0) */
|
|
190
|
+
post: {
|
|
191
|
+
parameters: {
|
|
192
|
+
query?: never;
|
|
193
|
+
header?: never;
|
|
194
|
+
path?: never;
|
|
195
|
+
cookie?: never;
|
|
196
|
+
};
|
|
197
|
+
requestBody?: never;
|
|
198
|
+
responses: {
|
|
199
|
+
/** @description OK */
|
|
200
|
+
200: {
|
|
201
|
+
headers: {
|
|
202
|
+
[name: string]: unknown;
|
|
203
|
+
};
|
|
204
|
+
content: {
|
|
205
|
+
"application/json": components["schemas"]["cb60ef05-e7d7-4b54-82b9-5a0b3c3b3434"];
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
delete?: never;
|
|
211
|
+
options?: never;
|
|
212
|
+
head?: never;
|
|
213
|
+
patch?: never;
|
|
214
|
+
trace?: never;
|
|
215
|
+
};
|
|
216
|
+
"/api/handle/assembly:core:board:macro:iceAgitator:ice/test/gate": {
|
|
217
|
+
parameters: {
|
|
218
|
+
query?: never;
|
|
219
|
+
header?: never;
|
|
220
|
+
path?: never;
|
|
221
|
+
cookie?: never;
|
|
222
|
+
};
|
|
223
|
+
get?: never;
|
|
224
|
+
put?: never;
|
|
225
|
+
/** Test the ice gate by opening it for a short duration. (v1.0) */
|
|
226
|
+
post: {
|
|
227
|
+
parameters: {
|
|
228
|
+
query?: never;
|
|
229
|
+
header?: never;
|
|
230
|
+
path?: never;
|
|
231
|
+
cookie?: never;
|
|
232
|
+
};
|
|
233
|
+
requestBody?: never;
|
|
234
|
+
responses: {
|
|
235
|
+
/** @description OK */
|
|
236
|
+
200: {
|
|
237
|
+
headers: {
|
|
238
|
+
[name: string]: unknown;
|
|
239
|
+
};
|
|
240
|
+
content: {
|
|
241
|
+
"application/json": components["schemas"]["cb60ef05-e7d7-4b54-82b9-5a0b3c3b3434"];
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
delete?: never;
|
|
247
|
+
options?: never;
|
|
248
|
+
head?: never;
|
|
249
|
+
patch?: never;
|
|
250
|
+
trace?: never;
|
|
251
|
+
};
|
|
252
|
+
"/api/handle/assembly:core:board:macro:iceAgitator:ice/pour": {
|
|
253
|
+
parameters: {
|
|
254
|
+
query?: never;
|
|
255
|
+
header?: never;
|
|
256
|
+
path?: never;
|
|
257
|
+
cookie?: never;
|
|
258
|
+
};
|
|
259
|
+
get?: never;
|
|
260
|
+
put?: never;
|
|
261
|
+
/** Dispense ice from the ice chute for the configured max duration. (v1.0) */
|
|
262
|
+
post: {
|
|
263
|
+
parameters: {
|
|
264
|
+
query?: never;
|
|
265
|
+
header?: never;
|
|
266
|
+
path?: never;
|
|
267
|
+
cookie?: never;
|
|
268
|
+
};
|
|
269
|
+
requestBody?: never;
|
|
270
|
+
responses: {
|
|
271
|
+
/** @description OK */
|
|
272
|
+
200: {
|
|
273
|
+
headers: {
|
|
274
|
+
[name: string]: unknown;
|
|
275
|
+
};
|
|
276
|
+
content: {
|
|
277
|
+
"application/json": components["schemas"]["cb60ef05-e7d7-4b54-82b9-5a0b3c3b3434"];
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
delete?: never;
|
|
283
|
+
options?: never;
|
|
284
|
+
head?: never;
|
|
285
|
+
patch?: never;
|
|
286
|
+
trace?: never;
|
|
287
|
+
};
|
|
288
|
+
"/api/handle/assembly:core:board:macro:iceAgitator:ice/type/{type}": {
|
|
289
|
+
parameters: {
|
|
290
|
+
query?: never;
|
|
291
|
+
header?: never;
|
|
292
|
+
path?: never;
|
|
293
|
+
cookie?: never;
|
|
294
|
+
};
|
|
295
|
+
get?: never;
|
|
296
|
+
put?: never;
|
|
297
|
+
/** Set the ice type for this agitator. This will set the type as well as apply
|
|
298
|
+
* all the default settings for that type to the agitator configuration. (v1.0) */
|
|
299
|
+
post: {
|
|
300
|
+
parameters: {
|
|
301
|
+
query?: never;
|
|
302
|
+
header?: never;
|
|
303
|
+
path: {
|
|
304
|
+
/** @description Ice type for the agitator. */
|
|
305
|
+
type: string;
|
|
306
|
+
};
|
|
307
|
+
cookie?: never;
|
|
308
|
+
};
|
|
309
|
+
requestBody?: never;
|
|
310
|
+
responses: {
|
|
311
|
+
/** @description OK */
|
|
312
|
+
200: {
|
|
313
|
+
headers: {
|
|
314
|
+
[name: string]: unknown;
|
|
315
|
+
};
|
|
316
|
+
content?: never;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
delete?: never;
|
|
321
|
+
options?: never;
|
|
322
|
+
head?: never;
|
|
323
|
+
patch?: never;
|
|
324
|
+
trace?: never;
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
export type webhooks = Record<string, never>;
|
|
328
|
+
export interface components {
|
|
329
|
+
schemas: {
|
|
330
|
+
/** @description (typeName=com.tccc.kos.ext.freestyle.service.cartridgeagitation.AgitationTracker) */
|
|
331
|
+
"eaafc672-c9e7-4398-83c4-ba97882acca6": components["schemas"]["aef5fa87-7863-4bb1-ae07-728239cbf769"];
|
|
332
|
+
"aef5fa87-7863-4bb1-ae07-728239cbf769": {
|
|
333
|
+
/** @description (typeName=com.tccc.kos.ext.freestyle.service.cartridgeagitation.AgitationAction) */
|
|
334
|
+
action?: components["schemas"]["968641e0-43bb-42c4-8bf3-739800145194"];
|
|
335
|
+
/** Format: int32 */
|
|
336
|
+
state?: number;
|
|
337
|
+
/** @description (typeName=java.util.List<com.tccc.kos.ext.freestyle.service.cartridgeagitation.Agitation>) */
|
|
338
|
+
agitations?: components["schemas"]["7b504fb3-fd5f-463f-8cfd-3c12c0b50418"];
|
|
339
|
+
};
|
|
340
|
+
"968641e0-43bb-42c4-8bf3-739800145194": {
|
|
341
|
+
/** Format: int32 */
|
|
342
|
+
delayMs?: number;
|
|
343
|
+
holderPath?: string;
|
|
344
|
+
/** Format: int32 */
|
|
345
|
+
state?: number;
|
|
346
|
+
/** @description (typeName=com.tccc.kos.ext.freestyle.service.cartridgeagitation.AgitationAction$Type) */
|
|
347
|
+
type?: components["schemas"]["bdd16ee8-08d8-49e7-80c9-e0888cdb8785"];
|
|
348
|
+
containerId?: string;
|
|
349
|
+
/** Format: int32 */
|
|
350
|
+
durationMs?: number;
|
|
351
|
+
/** Format: int32 */
|
|
352
|
+
rpm?: number;
|
|
353
|
+
};
|
|
354
|
+
"bdd16ee8-08d8-49e7-80c9-e0888cdb8785": unknown;
|
|
355
|
+
"7b504fb3-fd5f-463f-8cfd-3c12c0b50418": components["schemas"]["8898ed8b-38ac-41d1-a3fc-5cb840c109d5"][];
|
|
356
|
+
"8898ed8b-38ac-41d1-a3fc-5cb840c109d5": {
|
|
357
|
+
/** Format: int32 */
|
|
358
|
+
duration?: number;
|
|
359
|
+
/** Format: int64 */
|
|
360
|
+
startTime?: number;
|
|
361
|
+
/** Format: int32 */
|
|
362
|
+
state?: number;
|
|
363
|
+
/** Format: int64 */
|
|
364
|
+
endTime?: number;
|
|
365
|
+
};
|
|
366
|
+
"cb60ef05-e7d7-4b54-82b9-5a0b3c3b3434": {
|
|
367
|
+
reason?: string;
|
|
368
|
+
note?: string;
|
|
369
|
+
/** @description (typeName=com.tccc.kos.commons.util.ReasonData) */
|
|
370
|
+
reasonData?: components["schemas"]["6d6cb74c-cb5c-403f-bc38-4922b29c10ca"];
|
|
371
|
+
/** @description (typeName=com.tccc.kos.commons.util.concurrent.future.FutureWork) */
|
|
372
|
+
rootFuture?: components["schemas"]["cb60ef05-e7d7-4b54-82b9-5a0b3c3b3434"];
|
|
373
|
+
/** @description (typeName=com.tccc.kos.commons.util.concurrent.future.FutureState) */
|
|
374
|
+
endState?: components["schemas"]["4eb9cc02-cf23-4bb3-80b7-ec62b4b879b8"];
|
|
375
|
+
tracker?: string;
|
|
376
|
+
/** Format: int64 */
|
|
377
|
+
remainingTimeMs?: number;
|
|
378
|
+
name?: string;
|
|
379
|
+
/** Format: int32 */
|
|
380
|
+
progress?: number;
|
|
381
|
+
/** Format: int32 */
|
|
382
|
+
id?: number;
|
|
383
|
+
/** Format: int32 */
|
|
384
|
+
abortAbandonedTimeoutMs?: number;
|
|
385
|
+
/** @description (typeName=com.tccc.kos.commons.util.json.JsonViewWrapper) */
|
|
386
|
+
clientData?: components["schemas"]["9f7586c7-f377-469a-9755-c4b116de94db"];
|
|
387
|
+
};
|
|
388
|
+
"6d6cb74c-cb5c-403f-bc38-4922b29c10ca": {
|
|
389
|
+
/** @description (typeName=java.lang.Class<?>) */
|
|
390
|
+
view?: components["schemas"]["8d9c737d-f67d-4dba-94c6-64af5f9ae802"];
|
|
391
|
+
data?: Record<string, never>;
|
|
392
|
+
};
|
|
393
|
+
"8d9c737d-f67d-4dba-94c6-64af5f9ae802": unknown;
|
|
394
|
+
"4eb9cc02-cf23-4bb3-80b7-ec62b4b879b8": {
|
|
395
|
+
cancel?: boolean;
|
|
396
|
+
fail?: boolean;
|
|
397
|
+
abort?: boolean;
|
|
398
|
+
success?: boolean;
|
|
399
|
+
unsuccess?: boolean;
|
|
400
|
+
/** @description (typeName=com.tccc.kos.commons.util.concurrent.future.FutureEvent) */
|
|
401
|
+
futureEvent?: components["schemas"]["4ae3e943-99c9-4018-ae75-38d3e21686e6"];
|
|
402
|
+
terminate?: boolean;
|
|
403
|
+
done?: boolean;
|
|
404
|
+
};
|
|
405
|
+
"4ae3e943-99c9-4018-ae75-38d3e21686e6": unknown;
|
|
406
|
+
"9f7586c7-f377-469a-9755-c4b116de94db": {
|
|
407
|
+
/** @description (typeName=java.lang.Class<?>) */
|
|
408
|
+
view?: components["schemas"]["8d9c737d-f67d-4dba-94c6-64af5f9ae802"];
|
|
409
|
+
data?: Record<string, never>;
|
|
410
|
+
};
|
|
411
|
+
"5edb62f3-d260-4852-8b8f-f52098ff41b1": string[];
|
|
412
|
+
};
|
|
413
|
+
responses: never;
|
|
414
|
+
parameters: never;
|
|
415
|
+
requestBodies: never;
|
|
416
|
+
headers: never;
|
|
417
|
+
pathItems: never;
|
|
418
|
+
}
|
|
419
|
+
export type $defs = Record<string, never>;
|
|
420
|
+
export type operations = Record<string, never>;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { paths } from './openapi';
|
|
2
|
+
import { ClientResponse, HttpMethod, IKosServiceRequestParams, KosExecutionContext, PathsByMethod } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Type aliases for handle API
|
|
6
|
+
*/
|
|
7
|
+
export type Api = paths;
|
|
8
|
+
export type ApiPath = keyof paths;
|
|
9
|
+
export type ValidPaths = PathsByMethod<paths>;
|
|
10
|
+
/**
|
|
11
|
+
* Get client response type for handle API
|
|
12
|
+
*/
|
|
13
|
+
export type ApiResponse<Path extends ApiPath, Method extends "get" | "post" | "put" | "delete" = "get"> = ClientResponse<paths, Path, Method>;
|
|
14
|
+
/**
|
|
15
|
+
* Get execution context type for handle API
|
|
16
|
+
*/
|
|
17
|
+
export type ExecutionContext<Path extends ApiPath = ApiPath, Method extends HttpMethod = "get"> = KosExecutionContext<paths, Path, Method>;
|
|
18
|
+
/**
|
|
19
|
+
* Typed decorator factory for @kosServiceRequest with handle API types
|
|
20
|
+
*
|
|
21
|
+
* Provides full IntelliSense and type safety for path, query params, and body
|
|
22
|
+
* based on the handle OpenAPI schema.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* import { kosServiceRequest } from '../../utils/services/handle/daily/service';
|
|
27
|
+
* import { DependencyLifecycle } from '@kosdev-code/kos-ui-sdk';
|
|
28
|
+
*
|
|
29
|
+
* @kosServiceRequest({
|
|
30
|
+
* path: '/api/...',
|
|
31
|
+
* method: 'get',
|
|
32
|
+
* lifecycle: DependencyLifecycle.LOAD
|
|
33
|
+
* })
|
|
34
|
+
* private onDataLoaded(): void {
|
|
35
|
+
* // Fully typed based on handle API
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function kosServiceRequest<Path extends ApiPath, Method extends HttpMethod = "get", Response = any, TransformedResponse = Response>(params: IKosServiceRequestParams<paths, Path, Method, Response, TransformedResponse>): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
40
|
+
/**
|
|
41
|
+
* Create an API client for handle
|
|
42
|
+
*/
|
|
43
|
+
export declare const api: {
|
|
44
|
+
get: <K extends "/api/handle/assembly:core:board:macro:cartridgeAgitator:agit/trackers" | "/api/handle/assembly:core:board:macro:cartridgeAgitator:agit/trackers/prune" | "/api/handle/assembly:core:board:macro:cartridgeAgitator:agit/action" | "/api/handle/assembly:core:board:macro:iceAgitator:ice/types">(endpoint: K, params?: (paths[K]["get"] extends {
|
|
45
|
+
parameters: infer P;
|
|
46
|
+
} ? P : never) | undefined, options?: {
|
|
47
|
+
ordered?: boolean | undefined;
|
|
48
|
+
tracker?: string | undefined;
|
|
49
|
+
timeout?: number | undefined;
|
|
50
|
+
headers?: Record<string, string> | undefined;
|
|
51
|
+
fos?: boolean | undefined;
|
|
52
|
+
bridge?: boolean | undefined;
|
|
53
|
+
destinationAddress?: string | undefined;
|
|
54
|
+
studio?: boolean | undefined;
|
|
55
|
+
signal?: AbortSignal | undefined;
|
|
56
|
+
stream?: boolean | undefined;
|
|
57
|
+
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
58
|
+
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K, "get">>>;
|
|
59
|
+
post: <K_1 extends "/api/handle/assembly:core:board:macro:cartridgeAgitator:agit/test" | "/api/handle/assembly:core:board:macro:iceAgitator:ice/test/agitation" | "/api/handle/assembly:core:board:macro:iceAgitator:ice/test/gate" | "/api/handle/assembly:core:board:macro:iceAgitator:ice/pour" | "/api/handle/assembly:core:board:macro:iceAgitator:ice/type/{type}">(endpoint: K_1, params?: (paths[K_1]["post"] extends {
|
|
60
|
+
parameters: infer P_1;
|
|
61
|
+
} ? P_1 : never) | undefined, body?: (paths[K_1]["post"] extends {
|
|
62
|
+
requestBody: {
|
|
63
|
+
content: infer B;
|
|
64
|
+
};
|
|
65
|
+
} ? B[keyof B] : never) | undefined, options?: {
|
|
66
|
+
ordered?: boolean | undefined;
|
|
67
|
+
tracker?: string | undefined;
|
|
68
|
+
timeout?: number | undefined;
|
|
69
|
+
headers?: Record<string, string> | undefined;
|
|
70
|
+
fos?: boolean | undefined;
|
|
71
|
+
bridge?: boolean | undefined;
|
|
72
|
+
destinationAddress?: string | undefined;
|
|
73
|
+
studio?: boolean | undefined;
|
|
74
|
+
signal?: AbortSignal | undefined;
|
|
75
|
+
stream?: boolean | undefined;
|
|
76
|
+
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
77
|
+
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_1, "post">>>;
|
|
78
|
+
put: <K_2 extends never>(endpoint: K_2, params?: (paths[K_2]["put"] extends {
|
|
79
|
+
parameters: infer P_2;
|
|
80
|
+
} ? P_2 : never) | undefined, body?: (paths[K_2]["put"] extends {
|
|
81
|
+
requestBody: {
|
|
82
|
+
content: infer B_1;
|
|
83
|
+
};
|
|
84
|
+
} ? B_1[keyof B_1] : never) | undefined, options?: {
|
|
85
|
+
ordered?: boolean | undefined;
|
|
86
|
+
tracker?: string | undefined;
|
|
87
|
+
timeout?: number | undefined;
|
|
88
|
+
headers?: Record<string, string> | undefined;
|
|
89
|
+
fos?: boolean | undefined;
|
|
90
|
+
bridge?: boolean | undefined;
|
|
91
|
+
destinationAddress?: string | undefined;
|
|
92
|
+
studio?: boolean | undefined;
|
|
93
|
+
signal?: AbortSignal | undefined;
|
|
94
|
+
stream?: boolean | undefined;
|
|
95
|
+
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
96
|
+
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_2, "put">>>;
|
|
97
|
+
delete: <K_3 extends never>(endpoint: K_3, params?: (paths[K_3]["delete"] extends {
|
|
98
|
+
parameters: infer P_3;
|
|
99
|
+
} ? P_3 : never) | undefined, body?: (paths[K_3]["put"] extends {
|
|
100
|
+
requestBody: {
|
|
101
|
+
content: infer B_1;
|
|
102
|
+
};
|
|
103
|
+
} ? B_1[keyof B_1] : never) | undefined, options?: {
|
|
104
|
+
ordered?: boolean | undefined;
|
|
105
|
+
tracker?: string | undefined;
|
|
106
|
+
timeout?: number | undefined;
|
|
107
|
+
headers?: Record<string, string> | undefined;
|
|
108
|
+
fos?: boolean | undefined;
|
|
109
|
+
bridge?: boolean | undefined;
|
|
110
|
+
destinationAddress?: string | undefined;
|
|
111
|
+
studio?: boolean | undefined;
|
|
112
|
+
signal?: AbortSignal | undefined;
|
|
113
|
+
stream?: boolean | undefined;
|
|
114
|
+
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
115
|
+
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_3, "delete">>>;
|
|
116
|
+
};
|
|
117
|
+
export default api;
|
|
118
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/services/handle/daily/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC;AACxB,MAAM,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC;AAClC,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,IACtD,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAC1B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,MAAM,SAAS,UAAU,GAAG,KAAK,IAC/B,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,UAAU,GAAG,KAAK,EACjC,QAAQ,GAAG,GAAG,EACd,mBAAmB,GAAG,QAAQ,EAE9B,MAAM,EAAE,wBAAwB,CAC9B,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,mBAAmB,CACpB,4FASF;AAED;;GAEG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAEzC,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"services-index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/services-index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,iBAAiB,MAAM,oCAAoC,CAAC;AACxE,OAAO,KAAK,cAAc,MAAM,iCAAiC,CAAC"}
|