@gooday_corp/gooday-api-client 1.0.8 → 1.0.9-beta
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/api.ts +306 -0
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -23,6 +23,37 @@ import type { RequestArgs } from './base';
|
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
* @interface AddDevicePayload
|
|
30
|
+
*/
|
|
31
|
+
export interface AddDevicePayload {
|
|
32
|
+
/**
|
|
33
|
+
* Name of the device
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof AddDevicePayload
|
|
36
|
+
*/
|
|
37
|
+
'name': string;
|
|
38
|
+
/**
|
|
39
|
+
* Unique identifier for the device
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof AddDevicePayload
|
|
42
|
+
*/
|
|
43
|
+
'identifier': string;
|
|
44
|
+
/**
|
|
45
|
+
* Token associated with the device
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof AddDevicePayload
|
|
48
|
+
*/
|
|
49
|
+
'token': string;
|
|
50
|
+
/**
|
|
51
|
+
* Activation status of the device
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof AddDevicePayload
|
|
54
|
+
*/
|
|
55
|
+
'status': string;
|
|
56
|
+
}
|
|
26
57
|
/**
|
|
27
58
|
*
|
|
28
59
|
* @export
|
|
@@ -79,6 +110,100 @@ export interface AssistantListResponse {
|
|
|
79
110
|
*/
|
|
80
111
|
'data': Array<AssistantEntity>;
|
|
81
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @export
|
|
116
|
+
* @interface DeviceAddResponse
|
|
117
|
+
*/
|
|
118
|
+
export interface DeviceAddResponse {
|
|
119
|
+
/**
|
|
120
|
+
* Status code of the response
|
|
121
|
+
* @type {number}
|
|
122
|
+
* @memberof DeviceAddResponse
|
|
123
|
+
*/
|
|
124
|
+
'statusCode': number;
|
|
125
|
+
/**
|
|
126
|
+
* Device details
|
|
127
|
+
* @type {DeviceEntity}
|
|
128
|
+
* @memberof DeviceAddResponse
|
|
129
|
+
*/
|
|
130
|
+
'data': DeviceEntity;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @export
|
|
135
|
+
* @interface DeviceEntity
|
|
136
|
+
*/
|
|
137
|
+
export interface DeviceEntity {
|
|
138
|
+
/**
|
|
139
|
+
* Name of the device
|
|
140
|
+
* @type {string}
|
|
141
|
+
* @memberof DeviceEntity
|
|
142
|
+
*/
|
|
143
|
+
'name': string;
|
|
144
|
+
/**
|
|
145
|
+
* Unique identifier for the device
|
|
146
|
+
* @type {string}
|
|
147
|
+
* @memberof DeviceEntity
|
|
148
|
+
*/
|
|
149
|
+
'identifier': string;
|
|
150
|
+
/**
|
|
151
|
+
* Last used date of the device
|
|
152
|
+
* @type {string}
|
|
153
|
+
* @memberof DeviceEntity
|
|
154
|
+
*/
|
|
155
|
+
'lastUsed': string;
|
|
156
|
+
/**
|
|
157
|
+
* Token associated with the device
|
|
158
|
+
* @type {string}
|
|
159
|
+
* @memberof DeviceEntity
|
|
160
|
+
*/
|
|
161
|
+
'token': string;
|
|
162
|
+
/**
|
|
163
|
+
* Activation status of the device
|
|
164
|
+
* @type {string}
|
|
165
|
+
* @memberof DeviceEntity
|
|
166
|
+
*/
|
|
167
|
+
'status': string;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
* @export
|
|
172
|
+
* @interface DeviceUpdatePayload
|
|
173
|
+
*/
|
|
174
|
+
export interface DeviceUpdatePayload {
|
|
175
|
+
/**
|
|
176
|
+
* Unique identifier for the device
|
|
177
|
+
* @type {string}
|
|
178
|
+
* @memberof DeviceUpdatePayload
|
|
179
|
+
*/
|
|
180
|
+
'identifier': string;
|
|
181
|
+
/**
|
|
182
|
+
* Device Status
|
|
183
|
+
* @type {string}
|
|
184
|
+
* @memberof DeviceUpdatePayload
|
|
185
|
+
*/
|
|
186
|
+
'status': string;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
*
|
|
190
|
+
* @export
|
|
191
|
+
* @interface DeviceUpdateResponse
|
|
192
|
+
*/
|
|
193
|
+
export interface DeviceUpdateResponse {
|
|
194
|
+
/**
|
|
195
|
+
* Status code of the response
|
|
196
|
+
* @type {number}
|
|
197
|
+
* @memberof DeviceUpdateResponse
|
|
198
|
+
*/
|
|
199
|
+
'statusCode': number;
|
|
200
|
+
/**
|
|
201
|
+
* Device details
|
|
202
|
+
* @type {DeviceEntity}
|
|
203
|
+
* @memberof DeviceUpdateResponse
|
|
204
|
+
*/
|
|
205
|
+
'data': DeviceEntity;
|
|
206
|
+
}
|
|
82
207
|
/**
|
|
83
208
|
*
|
|
84
209
|
* @export
|
|
@@ -953,6 +1078,187 @@ export class AuthApi extends BaseAPI {
|
|
|
953
1078
|
|
|
954
1079
|
|
|
955
1080
|
|
|
1081
|
+
/**
|
|
1082
|
+
* DeviceApi - axios parameter creator
|
|
1083
|
+
* @export
|
|
1084
|
+
*/
|
|
1085
|
+
export const DeviceApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
1086
|
+
return {
|
|
1087
|
+
/**
|
|
1088
|
+
*
|
|
1089
|
+
* @param {AddDevicePayload} addDevicePayload
|
|
1090
|
+
* @param {*} [options] Override http request option.
|
|
1091
|
+
* @throws {RequiredError}
|
|
1092
|
+
*/
|
|
1093
|
+
deviceControllerAddDevice: async (addDevicePayload: AddDevicePayload, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1094
|
+
// verify required parameter 'addDevicePayload' is not null or undefined
|
|
1095
|
+
assertParamExists('deviceControllerAddDevice', 'addDevicePayload', addDevicePayload)
|
|
1096
|
+
const localVarPath = `/v1/device`;
|
|
1097
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1098
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1099
|
+
let baseOptions;
|
|
1100
|
+
if (configuration) {
|
|
1101
|
+
baseOptions = configuration.baseOptions;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
1105
|
+
const localVarHeaderParameter = {} as any;
|
|
1106
|
+
const localVarQueryParameter = {} as any;
|
|
1107
|
+
|
|
1108
|
+
// authentication bearer required
|
|
1109
|
+
// http bearer authentication required
|
|
1110
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1115
|
+
|
|
1116
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1117
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1118
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1119
|
+
localVarRequestOptions.data = serializeDataIfNeeded(addDevicePayload, localVarRequestOptions, configuration)
|
|
1120
|
+
|
|
1121
|
+
return {
|
|
1122
|
+
url: toPathString(localVarUrlObj),
|
|
1123
|
+
options: localVarRequestOptions,
|
|
1124
|
+
};
|
|
1125
|
+
},
|
|
1126
|
+
/**
|
|
1127
|
+
*
|
|
1128
|
+
* @param {DeviceUpdatePayload} deviceUpdatePayload
|
|
1129
|
+
* @param {*} [options] Override http request option.
|
|
1130
|
+
* @throws {RequiredError}
|
|
1131
|
+
*/
|
|
1132
|
+
deviceControllerUpdateStatus: async (deviceUpdatePayload: DeviceUpdatePayload, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1133
|
+
// verify required parameter 'deviceUpdatePayload' is not null or undefined
|
|
1134
|
+
assertParamExists('deviceControllerUpdateStatus', 'deviceUpdatePayload', deviceUpdatePayload)
|
|
1135
|
+
const localVarPath = `/v1/device`;
|
|
1136
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1137
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1138
|
+
let baseOptions;
|
|
1139
|
+
if (configuration) {
|
|
1140
|
+
baseOptions = configuration.baseOptions;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
1144
|
+
const localVarHeaderParameter = {} as any;
|
|
1145
|
+
const localVarQueryParameter = {} as any;
|
|
1146
|
+
|
|
1147
|
+
// authentication bearer required
|
|
1148
|
+
// http bearer authentication required
|
|
1149
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1154
|
+
|
|
1155
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1156
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1157
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1158
|
+
localVarRequestOptions.data = serializeDataIfNeeded(deviceUpdatePayload, localVarRequestOptions, configuration)
|
|
1159
|
+
|
|
1160
|
+
return {
|
|
1161
|
+
url: toPathString(localVarUrlObj),
|
|
1162
|
+
options: localVarRequestOptions,
|
|
1163
|
+
};
|
|
1164
|
+
},
|
|
1165
|
+
}
|
|
1166
|
+
};
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* DeviceApi - functional programming interface
|
|
1170
|
+
* @export
|
|
1171
|
+
*/
|
|
1172
|
+
export const DeviceApiFp = function(configuration?: Configuration) {
|
|
1173
|
+
const localVarAxiosParamCreator = DeviceApiAxiosParamCreator(configuration)
|
|
1174
|
+
return {
|
|
1175
|
+
/**
|
|
1176
|
+
*
|
|
1177
|
+
* @param {AddDevicePayload} addDevicePayload
|
|
1178
|
+
* @param {*} [options] Override http request option.
|
|
1179
|
+
* @throws {RequiredError}
|
|
1180
|
+
*/
|
|
1181
|
+
async deviceControllerAddDevice(addDevicePayload: AddDevicePayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceAddResponse>> {
|
|
1182
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deviceControllerAddDevice(addDevicePayload, options);
|
|
1183
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1184
|
+
const localVarOperationServerBasePath = operationServerMap['DeviceApi.deviceControllerAddDevice']?.[localVarOperationServerIndex]?.url;
|
|
1185
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1186
|
+
},
|
|
1187
|
+
/**
|
|
1188
|
+
*
|
|
1189
|
+
* @param {DeviceUpdatePayload} deviceUpdatePayload
|
|
1190
|
+
* @param {*} [options] Override http request option.
|
|
1191
|
+
* @throws {RequiredError}
|
|
1192
|
+
*/
|
|
1193
|
+
async deviceControllerUpdateStatus(deviceUpdatePayload: DeviceUpdatePayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceUpdateResponse>> {
|
|
1194
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deviceControllerUpdateStatus(deviceUpdatePayload, options);
|
|
1195
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1196
|
+
const localVarOperationServerBasePath = operationServerMap['DeviceApi.deviceControllerUpdateStatus']?.[localVarOperationServerIndex]?.url;
|
|
1197
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1198
|
+
},
|
|
1199
|
+
}
|
|
1200
|
+
};
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* DeviceApi - factory interface
|
|
1204
|
+
* @export
|
|
1205
|
+
*/
|
|
1206
|
+
export const DeviceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
1207
|
+
const localVarFp = DeviceApiFp(configuration)
|
|
1208
|
+
return {
|
|
1209
|
+
/**
|
|
1210
|
+
*
|
|
1211
|
+
* @param {AddDevicePayload} addDevicePayload
|
|
1212
|
+
* @param {*} [options] Override http request option.
|
|
1213
|
+
* @throws {RequiredError}
|
|
1214
|
+
*/
|
|
1215
|
+
deviceControllerAddDevice(addDevicePayload: AddDevicePayload, options?: RawAxiosRequestConfig): AxiosPromise<DeviceAddResponse> {
|
|
1216
|
+
return localVarFp.deviceControllerAddDevice(addDevicePayload, options).then((request) => request(axios, basePath));
|
|
1217
|
+
},
|
|
1218
|
+
/**
|
|
1219
|
+
*
|
|
1220
|
+
* @param {DeviceUpdatePayload} deviceUpdatePayload
|
|
1221
|
+
* @param {*} [options] Override http request option.
|
|
1222
|
+
* @throws {RequiredError}
|
|
1223
|
+
*/
|
|
1224
|
+
deviceControllerUpdateStatus(deviceUpdatePayload: DeviceUpdatePayload, options?: RawAxiosRequestConfig): AxiosPromise<DeviceUpdateResponse> {
|
|
1225
|
+
return localVarFp.deviceControllerUpdateStatus(deviceUpdatePayload, options).then((request) => request(axios, basePath));
|
|
1226
|
+
},
|
|
1227
|
+
};
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* DeviceApi - object-oriented interface
|
|
1232
|
+
* @export
|
|
1233
|
+
* @class DeviceApi
|
|
1234
|
+
* @extends {BaseAPI}
|
|
1235
|
+
*/
|
|
1236
|
+
export class DeviceApi extends BaseAPI {
|
|
1237
|
+
/**
|
|
1238
|
+
*
|
|
1239
|
+
* @param {AddDevicePayload} addDevicePayload
|
|
1240
|
+
* @param {*} [options] Override http request option.
|
|
1241
|
+
* @throws {RequiredError}
|
|
1242
|
+
* @memberof DeviceApi
|
|
1243
|
+
*/
|
|
1244
|
+
public deviceControllerAddDevice(addDevicePayload: AddDevicePayload, options?: RawAxiosRequestConfig) {
|
|
1245
|
+
return DeviceApiFp(this.configuration).deviceControllerAddDevice(addDevicePayload, options).then((request) => request(this.axios, this.basePath));
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
/**
|
|
1249
|
+
*
|
|
1250
|
+
* @param {DeviceUpdatePayload} deviceUpdatePayload
|
|
1251
|
+
* @param {*} [options] Override http request option.
|
|
1252
|
+
* @throws {RequiredError}
|
|
1253
|
+
* @memberof DeviceApi
|
|
1254
|
+
*/
|
|
1255
|
+
public deviceControllerUpdateStatus(deviceUpdatePayload: DeviceUpdatePayload, options?: RawAxiosRequestConfig) {
|
|
1256
|
+
return DeviceApiFp(this.configuration).deviceControllerUpdateStatus(deviceUpdatePayload, options).then((request) => request(this.axios, this.basePath));
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
|
|
956
1262
|
/**
|
|
957
1263
|
* GoalsApi - axios parameter creator
|
|
958
1264
|
* @export
|