@gooday_corp/gooday-api-client 1.0.9 → 1.0.11-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.
Files changed (2) hide show
  1. package/api.ts +308 -14
  2. package/package.json +1 -1
package/api.ts CHANGED
@@ -23,6 +23,43 @@ 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
+ * Device os
52
+ * @type {string}
53
+ * @memberof AddDevicePayload
54
+ */
55
+ 'os': string;
56
+ /**
57
+ * Device version
58
+ * @type {string}
59
+ * @memberof AddDevicePayload
60
+ */
61
+ 'version': string;
62
+ }
26
63
  /**
27
64
  *
28
65
  * @export
@@ -79,6 +116,62 @@ export interface AssistantListResponse {
79
116
  */
80
117
  'data': Array<AssistantEntity>;
81
118
  }
119
+ /**
120
+ *
121
+ * @export
122
+ * @interface DeviceAddResponse
123
+ */
124
+ export interface DeviceAddResponse {
125
+ /**
126
+ * Status code of the response
127
+ * @type {number}
128
+ * @memberof DeviceAddResponse
129
+ */
130
+ 'statusCode': number;
131
+ /**
132
+ * Device details
133
+ * @type {DeviceEntity}
134
+ * @memberof DeviceAddResponse
135
+ */
136
+ 'data': DeviceEntity;
137
+ }
138
+ /**
139
+ *
140
+ * @export
141
+ * @interface DeviceEntity
142
+ */
143
+ export interface DeviceEntity {
144
+ /**
145
+ * Name of the device
146
+ * @type {string}
147
+ * @memberof DeviceEntity
148
+ */
149
+ 'name': string;
150
+ /**
151
+ * Unique identifier for the device
152
+ * @type {string}
153
+ * @memberof DeviceEntity
154
+ */
155
+ 'identifier': string;
156
+ /**
157
+ * Last used date of the device
158
+ * @type {string}
159
+ * @memberof DeviceEntity
160
+ */
161
+ 'lastUsed': string;
162
+ /**
163
+ * Token associated with the device
164
+ * @type {string}
165
+ * @memberof DeviceEntity
166
+ */
167
+ 'token': string;
168
+ /**
169
+ * Activation status of the device
170
+ * @type {string}
171
+ * @memberof DeviceEntity
172
+ */
173
+ 'status': string;
174
+ }
82
175
  /**
83
176
  *
84
177
  * @export
@@ -117,6 +210,38 @@ export interface GoalListResponse {
117
210
  */
118
211
  'data': Array<GoalEntity>;
119
212
  }
213
+ /**
214
+ *
215
+ * @export
216
+ * @interface LoggedOutPayloadDTO
217
+ */
218
+ export interface LoggedOutPayloadDTO {
219
+ /**
220
+ * Unique identifier for the device
221
+ * @type {string}
222
+ * @memberof LoggedOutPayloadDTO
223
+ */
224
+ 'identifier': string;
225
+ }
226
+ /**
227
+ *
228
+ * @export
229
+ * @interface LoggedOutResponse
230
+ */
231
+ export interface LoggedOutResponse {
232
+ /**
233
+ * Status code of the response
234
+ * @type {number}
235
+ * @memberof LoggedOutResponse
236
+ */
237
+ 'statusCode': number;
238
+ /**
239
+ * Response Message
240
+ * @type {string}
241
+ * @memberof LoggedOutResponse
242
+ */
243
+ 'message': string;
244
+ }
120
245
  /**
121
246
  *
122
247
  * @export
@@ -526,23 +651,11 @@ export interface UserEntity {
526
651
  'plan': string;
527
652
  /**
528
653
  * Action user has to perform
529
- * @type {string}
654
+ * @type {Array<string>}
530
655
  * @memberof UserEntity
531
656
  */
532
- 'pendingAction': UserEntityPendingActionEnum;
657
+ 'pendingAction': Array<string>;
533
658
  }
534
-
535
- export const UserEntityPendingActionEnum = {
536
- BasicInfo: 'basic_info',
537
- NickName: 'nick_name',
538
- Dob: 'dob',
539
- Assistant: 'assistant',
540
- Goals: 'goals',
541
- Plan: 'plan'
542
- } as const;
543
-
544
- export type UserEntityPendingActionEnum = typeof UserEntityPendingActionEnum[keyof typeof UserEntityPendingActionEnum];
545
-
546
659
  /**
547
660
  *
548
661
  * @export
@@ -792,6 +905,45 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
792
905
  options: localVarRequestOptions,
793
906
  };
794
907
  },
908
+ /**
909
+ *
910
+ * @param {LoggedOutPayloadDTO} loggedOutPayloadDTO
911
+ * @param {*} [options] Override http request option.
912
+ * @throws {RequiredError}
913
+ */
914
+ authControllerSignOut: async (loggedOutPayloadDTO: LoggedOutPayloadDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
915
+ // verify required parameter 'loggedOutPayloadDTO' is not null or undefined
916
+ assertParamExists('authControllerSignOut', 'loggedOutPayloadDTO', loggedOutPayloadDTO)
917
+ const localVarPath = `/v1/auth/user-logout`;
918
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
919
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
920
+ let baseOptions;
921
+ if (configuration) {
922
+ baseOptions = configuration.baseOptions;
923
+ }
924
+
925
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
926
+ const localVarHeaderParameter = {} as any;
927
+ const localVarQueryParameter = {} as any;
928
+
929
+ // authentication bearer required
930
+ // http bearer authentication required
931
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
932
+
933
+
934
+
935
+ localVarHeaderParameter['Content-Type'] = 'application/json';
936
+
937
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
938
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
939
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
940
+ localVarRequestOptions.data = serializeDataIfNeeded(loggedOutPayloadDTO, localVarRequestOptions, configuration)
941
+
942
+ return {
943
+ url: toPathString(localVarUrlObj),
944
+ options: localVarRequestOptions,
945
+ };
946
+ },
795
947
  /**
796
948
  *
797
949
  * @param {SignupDto} signupDto
@@ -860,6 +1012,18 @@ export const AuthApiFp = function(configuration?: Configuration) {
860
1012
  const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerSignIn']?.[localVarOperationServerIndex]?.url;
861
1013
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
862
1014
  },
1015
+ /**
1016
+ *
1017
+ * @param {LoggedOutPayloadDTO} loggedOutPayloadDTO
1018
+ * @param {*} [options] Override http request option.
1019
+ * @throws {RequiredError}
1020
+ */
1021
+ async authControllerSignOut(loggedOutPayloadDTO: LoggedOutPayloadDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LoggedOutResponse>> {
1022
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerSignOut(loggedOutPayloadDTO, options);
1023
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1024
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerSignOut']?.[localVarOperationServerIndex]?.url;
1025
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1026
+ },
863
1027
  /**
864
1028
  *
865
1029
  * @param {SignupDto} signupDto
@@ -899,6 +1063,15 @@ export const AuthApiFactory = function (configuration?: Configuration, basePath?
899
1063
  authControllerSignIn(signInDto: SignInDto, options?: RawAxiosRequestConfig): AxiosPromise<SignInResponseDto> {
900
1064
  return localVarFp.authControllerSignIn(signInDto, options).then((request) => request(axios, basePath));
901
1065
  },
1066
+ /**
1067
+ *
1068
+ * @param {LoggedOutPayloadDTO} loggedOutPayloadDTO
1069
+ * @param {*} [options] Override http request option.
1070
+ * @throws {RequiredError}
1071
+ */
1072
+ authControllerSignOut(loggedOutPayloadDTO: LoggedOutPayloadDTO, options?: RawAxiosRequestConfig): AxiosPromise<LoggedOutResponse> {
1073
+ return localVarFp.authControllerSignOut(loggedOutPayloadDTO, options).then((request) => request(axios, basePath));
1074
+ },
902
1075
  /**
903
1076
  *
904
1077
  * @param {SignupDto} signupDto
@@ -939,6 +1112,17 @@ export class AuthApi extends BaseAPI {
939
1112
  return AuthApiFp(this.configuration).authControllerSignIn(signInDto, options).then((request) => request(this.axios, this.basePath));
940
1113
  }
941
1114
 
1115
+ /**
1116
+ *
1117
+ * @param {LoggedOutPayloadDTO} loggedOutPayloadDTO
1118
+ * @param {*} [options] Override http request option.
1119
+ * @throws {RequiredError}
1120
+ * @memberof AuthApi
1121
+ */
1122
+ public authControllerSignOut(loggedOutPayloadDTO: LoggedOutPayloadDTO, options?: RawAxiosRequestConfig) {
1123
+ return AuthApiFp(this.configuration).authControllerSignOut(loggedOutPayloadDTO, options).then((request) => request(this.axios, this.basePath));
1124
+ }
1125
+
942
1126
  /**
943
1127
  *
944
1128
  * @param {SignupDto} signupDto
@@ -953,6 +1137,116 @@ export class AuthApi extends BaseAPI {
953
1137
 
954
1138
 
955
1139
 
1140
+ /**
1141
+ * DeviceApi - axios parameter creator
1142
+ * @export
1143
+ */
1144
+ export const DeviceApiAxiosParamCreator = function (configuration?: Configuration) {
1145
+ return {
1146
+ /**
1147
+ *
1148
+ * @param {AddDevicePayload} addDevicePayload
1149
+ * @param {*} [options] Override http request option.
1150
+ * @throws {RequiredError}
1151
+ */
1152
+ deviceControllerAddDevice: async (addDevicePayload: AddDevicePayload, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1153
+ // verify required parameter 'addDevicePayload' is not null or undefined
1154
+ assertParamExists('deviceControllerAddDevice', 'addDevicePayload', addDevicePayload)
1155
+ const localVarPath = `/v1/device`;
1156
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1157
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1158
+ let baseOptions;
1159
+ if (configuration) {
1160
+ baseOptions = configuration.baseOptions;
1161
+ }
1162
+
1163
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1164
+ const localVarHeaderParameter = {} as any;
1165
+ const localVarQueryParameter = {} as any;
1166
+
1167
+ // authentication bearer required
1168
+ // http bearer authentication required
1169
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
1170
+
1171
+
1172
+
1173
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1174
+
1175
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1176
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1177
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1178
+ localVarRequestOptions.data = serializeDataIfNeeded(addDevicePayload, localVarRequestOptions, configuration)
1179
+
1180
+ return {
1181
+ url: toPathString(localVarUrlObj),
1182
+ options: localVarRequestOptions,
1183
+ };
1184
+ },
1185
+ }
1186
+ };
1187
+
1188
+ /**
1189
+ * DeviceApi - functional programming interface
1190
+ * @export
1191
+ */
1192
+ export const DeviceApiFp = function(configuration?: Configuration) {
1193
+ const localVarAxiosParamCreator = DeviceApiAxiosParamCreator(configuration)
1194
+ return {
1195
+ /**
1196
+ *
1197
+ * @param {AddDevicePayload} addDevicePayload
1198
+ * @param {*} [options] Override http request option.
1199
+ * @throws {RequiredError}
1200
+ */
1201
+ async deviceControllerAddDevice(addDevicePayload: AddDevicePayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeviceAddResponse>> {
1202
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deviceControllerAddDevice(addDevicePayload, options);
1203
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1204
+ const localVarOperationServerBasePath = operationServerMap['DeviceApi.deviceControllerAddDevice']?.[localVarOperationServerIndex]?.url;
1205
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1206
+ },
1207
+ }
1208
+ };
1209
+
1210
+ /**
1211
+ * DeviceApi - factory interface
1212
+ * @export
1213
+ */
1214
+ export const DeviceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1215
+ const localVarFp = DeviceApiFp(configuration)
1216
+ return {
1217
+ /**
1218
+ *
1219
+ * @param {AddDevicePayload} addDevicePayload
1220
+ * @param {*} [options] Override http request option.
1221
+ * @throws {RequiredError}
1222
+ */
1223
+ deviceControllerAddDevice(addDevicePayload: AddDevicePayload, options?: RawAxiosRequestConfig): AxiosPromise<DeviceAddResponse> {
1224
+ return localVarFp.deviceControllerAddDevice(addDevicePayload, options).then((request) => request(axios, basePath));
1225
+ },
1226
+ };
1227
+ };
1228
+
1229
+ /**
1230
+ * DeviceApi - object-oriented interface
1231
+ * @export
1232
+ * @class DeviceApi
1233
+ * @extends {BaseAPI}
1234
+ */
1235
+ export class DeviceApi extends BaseAPI {
1236
+ /**
1237
+ *
1238
+ * @param {AddDevicePayload} addDevicePayload
1239
+ * @param {*} [options] Override http request option.
1240
+ * @throws {RequiredError}
1241
+ * @memberof DeviceApi
1242
+ */
1243
+ public deviceControllerAddDevice(addDevicePayload: AddDevicePayload, options?: RawAxiosRequestConfig) {
1244
+ return DeviceApiFp(this.configuration).deviceControllerAddDevice(addDevicePayload, options).then((request) => request(this.axios, this.basePath));
1245
+ }
1246
+ }
1247
+
1248
+
1249
+
956
1250
  /**
957
1251
  * GoalsApi - axios parameter creator
958
1252
  * @export
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooday_corp/gooday-api-client",
3
- "version": "1.0.9",
3
+ "version": "1.0.11-beta",
4
4
  "description": "API client for Gooday",
5
5
  "main": "index.ts",
6
6
  "scripts": {},