@cherryin/aigw-api-client 0.1.26 → 0.1.28

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 (37) hide show
  1. package/.openapi-generator/FILES +13 -22
  2. package/README.md +15 -29
  3. package/api.ts +191 -678
  4. package/dist/api.d.ts +138 -425
  5. package/dist/api.js +100 -436
  6. package/dist/esm/api.d.ts +138 -425
  7. package/dist/esm/api.js +94 -430
  8. package/docs/{UserInfo.md → AigwpbUserInfo.md} +3 -3
  9. package/docs/AigwpbUserMeInfo.md +2 -2
  10. package/docs/{UserSettings.md → AigwpbUserSettings.md} +3 -3
  11. package/docs/AuthUserMethod.md +38 -0
  12. package/docs/PassportpbUserInfo.md +30 -0
  13. package/docs/{UserManageSettings.md → PassportpbUserSettings.md} +3 -3
  14. package/docs/UserAdminServiceApi.md +60 -0
  15. package/docs/UserBasic.md +42 -0
  16. package/docs/{SetUserStatusRequest.md → UserExtendInfo.md} +5 -7
  17. package/docs/UserInfoItem.md +22 -0
  18. package/docs/{UpdateUserInfoRequest.md → UserInfoPageGetRequest.md} +13 -9
  19. package/docs/{ListUsersResponse.md → UserInfoPageGetResponse.md} +5 -9
  20. package/docs/UserPaymentInfo.md +20 -0
  21. package/docs/{SetUserRoleRequest.md → UserPreferences.md} +7 -7
  22. package/package.json +1 -1
  23. package/docs/BatchUpdateSessionsRequest.md +0 -24
  24. package/docs/BatchUpdateSessionsResponse.md +0 -24
  25. package/docs/GetUserDetailResponse.md +0 -24
  26. package/docs/ListUsersRequest.md +0 -36
  27. package/docs/SessionAction.md +0 -11
  28. package/docs/SetUserRoleResponse.md +0 -24
  29. package/docs/SetUserStatusResponse.md +0 -26
  30. package/docs/UpdateUserInfoResponse.md +0 -24
  31. package/docs/UserManageAPIKey.md +0 -38
  32. package/docs/UserManageAdminServiceApi.md +0 -324
  33. package/docs/UserManageAuthMethod.md +0 -32
  34. package/docs/UserManageBalance.md +0 -32
  35. package/docs/UserManageDetail.md +0 -46
  36. package/docs/UserManageItem.md +0 -38
  37. package/docs/UserManageSession.md +0 -34
package/api.ts CHANGED
@@ -403,9 +403,18 @@ export interface AigwpbLabel {
403
403
  'created_at'?: string;
404
404
  'updated_at'?: string;
405
405
  }
406
+ export interface AigwpbUserInfo {
407
+ 'id'?: string;
408
+ 'name'?: string;
409
+ 'email'?: string;
410
+ 'email_verified'?: boolean;
411
+ 'image'?: string;
412
+ 'created_at'?: string;
413
+ 'updated_at'?: string;
414
+ }
406
415
  export interface AigwpbUserMeInfo {
407
- 'info'?: UserInfo;
408
- 'settings'?: UserSettings;
416
+ 'info'?: AigwpbUserInfo;
417
+ 'settings'?: AigwpbUserSettings;
409
418
  'balance'?: UserBalanceBrief;
410
419
  }
411
420
  export interface AigwpbUserPayStripeCheckout {
@@ -417,6 +426,9 @@ export interface AigwpbUserPortalDashboard {
417
426
  'insights'?: UsageInsights;
418
427
  'daily_usages'?: Array<DailyUsage>;
419
428
  }
429
+ export interface AigwpbUserSettings {
430
+ 'email_notifications_enabled'?: boolean;
431
+ }
420
432
  export interface Any {
421
433
  [key: string]: object | any;
422
434
 
@@ -431,17 +443,17 @@ export interface AudioPricing {
431
443
  'output_per_second'?: string;
432
444
  'extra'?: { [key: string]: string; };
433
445
  }
434
- export interface BatchUpdateSessionsRequest {
446
+ export interface AuthUserMethod {
447
+ 'app_id'?: string;
448
+ 'aid'?: string;
435
449
  'uid'?: string;
436
- 'session_ids'?: Array<string>;
437
- 'action'?: SessionAction;
438
- }
439
-
440
-
441
- export interface BatchUpdateSessionsResponse {
442
- 'code'?: string;
443
- 'message'?: string;
444
- 'affected_count'?: number;
450
+ 'provider_id'?: string;
451
+ 'email'?: string;
452
+ 'phone'?: string;
453
+ 'oauth_account_id'?: string;
454
+ 'oauth_scopes'?: Array<string>;
455
+ 'created_at'?: string;
456
+ 'updated_at'?: string;
445
457
  }
446
458
  export interface CodeExecutionPricing {
447
459
  'id'?: string;
@@ -636,11 +648,6 @@ export interface FrontendSearchContextCost {
636
648
  'search_context_size_low'?: string;
637
649
  'search_context_size_medium'?: string;
638
650
  }
639
- export interface GetUserDetailResponse {
640
- 'code'?: string;
641
- 'message'?: string;
642
- 'user'?: UserManageDetail;
643
- }
644
651
  export interface ImagePricing {
645
652
  'id'?: string;
646
653
  'mode'?: string;
@@ -686,34 +693,6 @@ export interface LabelUpdateResponse {
686
693
  'message'?: string;
687
694
  'data'?: AigwpbLabel;
688
695
  }
689
- export interface ListUsersRequest {
690
- /**
691
- * 页码,从1开始
692
- */
693
- 'page'?: number;
694
- 'page_size'?: number;
695
- /**
696
- * UID 列表过滤
697
- */
698
- 'uids'?: Array<string>;
699
- 'display_name'?: string;
700
- 'email'?: string;
701
- 'user_statuses'?: Array<number>;
702
- 'user_roles'?: Array<number>;
703
- /**
704
- * 排序字段:created_at, updated_at
705
- */
706
- 'order_by'?: string;
707
- 'order_dir'?: string;
708
- }
709
- export interface ListUsersResponse {
710
- 'code'?: string;
711
- 'message'?: string;
712
- 'users'?: Array<UserManageItem>;
713
- 'total'?: string;
714
- 'page'?: number;
715
- 'page_size'?: number;
716
- }
717
696
  export interface ModelCapabilities {
718
697
  'supported_endpoints'?: { [key: string]: string; };
719
698
  'supported_regions'?: Array<string>;
@@ -771,6 +750,17 @@ export interface OrderItem {
771
750
  'key'?: string;
772
751
  'direction'?: string;
773
752
  }
753
+ export interface PassportpbUserInfo {
754
+ 'user'?: UserBasic;
755
+ 'settings'?: PassportpbUserSettings;
756
+ 'preferences'?: UserPreferences;
757
+ 'payment_info'?: UserPaymentInfo;
758
+ 'extend_info'?: UserExtendInfo;
759
+ 'auth_methods'?: Array<AuthUserMethod>;
760
+ }
761
+ export interface PassportpbUserSettings {
762
+ 'email_notifications_enabled'?: boolean;
763
+ }
774
764
  export interface PricingConditions {
775
765
  'user_tiers'?: Array<string>;
776
766
  'api_versions'?: Array<string>;
@@ -905,37 +895,6 @@ export interface RequestPricing {
905
895
  'base_fee'?: string;
906
896
  'request_fee'?: string;
907
897
  }
908
- /**
909
- * - SESSION_ACTION_UNSPECIFIED: 未指定 - SESSION_ACTION_REVOKE: 撤销 Session
910
- */
911
-
912
- export const SessionAction = {
913
- SessionActionUnspecified: 'SESSION_ACTION_UNSPECIFIED',
914
- SessionActionRevoke: 'SESSION_ACTION_REVOKE'
915
- } as const;
916
-
917
- export type SessionAction = typeof SessionAction[keyof typeof SessionAction];
918
-
919
-
920
- export interface SetUserRoleRequest {
921
- 'uid'?: string;
922
- 'new_role'?: number;
923
- }
924
- export interface SetUserRoleResponse {
925
- 'code'?: string;
926
- 'message'?: string;
927
- 'success'?: boolean;
928
- }
929
- export interface SetUserStatusRequest {
930
- 'uid'?: string;
931
- 'new_status'?: number;
932
- }
933
- export interface SetUserStatusResponse {
934
- 'code'?: string;
935
- 'message'?: string;
936
- 'success'?: boolean;
937
- 'revoked_sessions'?: number;
938
- }
939
898
  export interface Status {
940
899
  'code'?: number;
941
900
  'message'?: string;
@@ -971,17 +930,6 @@ export interface TokenUsage {
971
930
  'count'?: string;
972
931
  'cost'?: string;
973
932
  }
974
- export interface UpdateUserInfoRequest {
975
- 'uid'?: string;
976
- 'display_name'?: string;
977
- 'email'?: string;
978
- 'password'?: string;
979
- }
980
- export interface UpdateUserInfoResponse {
981
- 'code'?: string;
982
- 'message'?: string;
983
- 'success'?: boolean;
984
- }
985
933
  export interface UsageInsights {
986
934
  'most_expensive_day_at'?: string;
987
935
  'most_expensive_day_cost'?: string;
@@ -1089,14 +1037,40 @@ export interface UserBalanceListResponse {
1089
1037
  'list'?: Array<UserBalance>;
1090
1038
  'total'?: string;
1091
1039
  }
1092
- export interface UserInfo {
1093
- 'id'?: string;
1040
+ export interface UserBasic {
1041
+ 'uid'?: string;
1042
+ 'app_id'?: string;
1043
+ 'aid'?: string;
1094
1044
  'name'?: string;
1095
1045
  'email'?: string;
1096
- 'email_verified'?: boolean;
1097
- 'image'?: string;
1098
- 'created_at'?: string;
1099
- 'updated_at'?: string;
1046
+ 'phone'?: string;
1047
+ 'avatar_url'?: string;
1048
+ 'register_at'?: string;
1049
+ 'email_verified_at'?: string;
1050
+ 'phone_verified_at'?: string;
1051
+ 'app_name'?: string;
1052
+ 'user_status'?: number;
1053
+ }
1054
+ export interface UserExtendInfo {
1055
+ 'user_groups'?: Array<string>;
1056
+ }
1057
+ export interface UserInfoItem {
1058
+ 'user'?: PassportpbUserInfo;
1059
+ 'balance'?: UserBalance;
1060
+ }
1061
+ export interface UserInfoPageGetRequest {
1062
+ 'page'?: number;
1063
+ 'page_size'?: number;
1064
+ 'user_ids'?: Array<string>;
1065
+ 'email'?: string;
1066
+ 'phone'?: string;
1067
+ 'display_name'?: string;
1068
+ }
1069
+ export interface UserInfoPageGetResponse {
1070
+ 'code'?: string;
1071
+ 'message'?: string;
1072
+ 'user_info_list'?: Array<UserInfoItem>;
1073
+ 'total'?: string;
1100
1074
  }
1101
1075
  export interface UserLabelItem {
1102
1076
  'uid'?: string;
@@ -1123,77 +1097,6 @@ export interface UserLabelPairChangeResponse {
1123
1097
  'code'?: string;
1124
1098
  'message'?: string;
1125
1099
  }
1126
- export interface UserManageAPIKey {
1127
- 'id'?: string;
1128
- 'name'?: string;
1129
- 'key_group'?: string;
1130
- 'balance_code'?: string;
1131
- 'quota_total'?: string;
1132
- 'quota_used'?: string;
1133
- 'quota_mode'?: number;
1134
- 'key_status'?: number;
1135
- 'expires_at'?: string;
1136
- 'created_at'?: string;
1137
- }
1138
- export interface UserManageAuthMethod {
1139
- 'id'?: string;
1140
- 'auth_type'?: string;
1141
- 'auth_id'?: string;
1142
- 'is_primary'?: boolean;
1143
- 'auth_status'?: number;
1144
- 'last_used_at'?: string;
1145
- 'created_at'?: string;
1146
- }
1147
- export interface UserManageBalance {
1148
- 'balance_code'?: string;
1149
- 'prepaid_balance_total'?: string;
1150
- 'prepaid_balance_used'?: string;
1151
- 'prepaid_balance_frozen'?: string;
1152
- 'bonus_balance_total'?: string;
1153
- 'bonus_balance_used'?: string;
1154
- 'bonus_balance_frozen'?: string;
1155
- }
1156
- export interface UserManageDetail {
1157
- 'uid'?: string;
1158
- 'display_name'?: string;
1159
- 'email'?: string;
1160
- 'avatar_url'?: string;
1161
- 'user_role'?: number;
1162
- 'user_status'?: number;
1163
- 'user_group'?: string;
1164
- 'created_at'?: string;
1165
- 'updated_at'?: string;
1166
- 'settings'?: UserManageSettings;
1167
- 'balance'?: UserManageBalance;
1168
- 'api_keys'?: Array<UserManageAPIKey>;
1169
- 'auth_methods'?: Array<UserManageAuthMethod>;
1170
- 'sessions'?: Array<UserManageSession>;
1171
- }
1172
- export interface UserManageItem {
1173
- 'uid'?: string;
1174
- 'display_name'?: string;
1175
- 'email'?: string;
1176
- 'avatar_url'?: string;
1177
- 'user_role'?: number;
1178
- 'user_status'?: number;
1179
- 'user_group'?: string;
1180
- 'created_at'?: string;
1181
- 'updated_at'?: string;
1182
- 'auth_types'?: Array<string>;
1183
- }
1184
- export interface UserManageSession {
1185
- 'id'?: string;
1186
- 'session_type'?: string;
1187
- 'ip_address'?: string;
1188
- 'user_agent'?: string;
1189
- 'active_at'?: string;
1190
- 'expires_at'?: string;
1191
- 'created_at'?: string;
1192
- 'is_current'?: boolean;
1193
- }
1194
- export interface UserManageSettings {
1195
- 'email_notifications_enabled'?: boolean;
1196
- }
1197
1100
  export interface UserMeInfoResponse {
1198
1101
  'code'?: string;
1199
1102
  'message'?: string;
@@ -1226,13 +1129,17 @@ export interface UserPayStripeCheckoutResponse {
1226
1129
  'message'?: string;
1227
1130
  'data'?: AigwpbUserPayStripeCheckout;
1228
1131
  }
1132
+ export interface UserPaymentInfo {
1133
+ 'stripe_customer_id'?: string;
1134
+ }
1229
1135
  export interface UserPortalDashboardResponse {
1230
1136
  'code'?: string;
1231
1137
  'message'?: string;
1232
1138
  'data'?: AigwpbUserPortalDashboard;
1233
1139
  }
1234
- export interface UserSettings {
1235
- 'email_notifications_enabled'?: boolean;
1140
+ export interface UserPreferences {
1141
+ 'language'?: string;
1142
+ 'timezone'?: string;
1236
1143
  }
1237
1144
  export interface VersionedAPISchema {
1238
1145
  'id'?: string;
@@ -5868,6 +5775,124 @@ export class UserAPIKeyServiceApi extends BaseAPI implements UserAPIKeyServiceAp
5868
5775
 
5869
5776
 
5870
5777
 
5778
+ /**
5779
+ * UserAdminServiceApi - axios parameter creator
5780
+ */
5781
+ export const UserAdminServiceApiAxiosParamCreator = function (configuration?: Configuration) {
5782
+ return {
5783
+ /**
5784
+ *
5785
+ * @summary 用户信息
5786
+ * @param {UserInfoPageGetRequest} body
5787
+ * @param {*} [options] Override http request option.
5788
+ * @throws {RequiredError}
5789
+ */
5790
+ userAdminServiceUserInfoPageGet: async (body: UserInfoPageGetRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5791
+ // verify required parameter 'body' is not null or undefined
5792
+ assertParamExists('userAdminServiceUserInfoPageGet', 'body', body)
5793
+ const localVarPath = `/admin/users/search`;
5794
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5795
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5796
+ let baseOptions;
5797
+ if (configuration) {
5798
+ baseOptions = configuration.baseOptions;
5799
+ }
5800
+
5801
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
5802
+ const localVarHeaderParameter = {} as any;
5803
+ const localVarQueryParameter = {} as any;
5804
+
5805
+
5806
+
5807
+ localVarHeaderParameter['Content-Type'] = 'application/json';
5808
+
5809
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5810
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5811
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5812
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
5813
+
5814
+ return {
5815
+ url: toPathString(localVarUrlObj),
5816
+ options: localVarRequestOptions,
5817
+ };
5818
+ },
5819
+ }
5820
+ };
5821
+
5822
+ /**
5823
+ * UserAdminServiceApi - functional programming interface
5824
+ */
5825
+ export const UserAdminServiceApiFp = function(configuration?: Configuration) {
5826
+ const localVarAxiosParamCreator = UserAdminServiceApiAxiosParamCreator(configuration)
5827
+ return {
5828
+ /**
5829
+ *
5830
+ * @summary 用户信息
5831
+ * @param {UserInfoPageGetRequest} body
5832
+ * @param {*} [options] Override http request option.
5833
+ * @throws {RequiredError}
5834
+ */
5835
+ async userAdminServiceUserInfoPageGet(body: UserInfoPageGetRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserInfoPageGetResponse>> {
5836
+ const localVarAxiosArgs = await localVarAxiosParamCreator.userAdminServiceUserInfoPageGet(body, options);
5837
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5838
+ const localVarOperationServerBasePath = operationServerMap['UserAdminServiceApi.userAdminServiceUserInfoPageGet']?.[localVarOperationServerIndex]?.url;
5839
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5840
+ },
5841
+ }
5842
+ };
5843
+
5844
+ /**
5845
+ * UserAdminServiceApi - factory interface
5846
+ */
5847
+ export const UserAdminServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
5848
+ const localVarFp = UserAdminServiceApiFp(configuration)
5849
+ return {
5850
+ /**
5851
+ *
5852
+ * @summary 用户信息
5853
+ * @param {UserInfoPageGetRequest} body
5854
+ * @param {*} [options] Override http request option.
5855
+ * @throws {RequiredError}
5856
+ */
5857
+ userAdminServiceUserInfoPageGet(body: UserInfoPageGetRequest, options?: RawAxiosRequestConfig): AxiosPromise<UserInfoPageGetResponse> {
5858
+ return localVarFp.userAdminServiceUserInfoPageGet(body, options).then((request) => request(axios, basePath));
5859
+ },
5860
+ };
5861
+ };
5862
+
5863
+ /**
5864
+ * UserAdminServiceApi - interface
5865
+ */
5866
+ export interface UserAdminServiceApiInterface {
5867
+ /**
5868
+ *
5869
+ * @summary 用户信息
5870
+ * @param {UserInfoPageGetRequest} body
5871
+ * @param {*} [options] Override http request option.
5872
+ * @throws {RequiredError}
5873
+ */
5874
+ userAdminServiceUserInfoPageGet(body: UserInfoPageGetRequest, options?: RawAxiosRequestConfig): AxiosPromise<UserInfoPageGetResponse>;
5875
+
5876
+ }
5877
+
5878
+ /**
5879
+ * UserAdminServiceApi - object-oriented interface
5880
+ */
5881
+ export class UserAdminServiceApi extends BaseAPI implements UserAdminServiceApiInterface {
5882
+ /**
5883
+ *
5884
+ * @summary 用户信息
5885
+ * @param {UserInfoPageGetRequest} body
5886
+ * @param {*} [options] Override http request option.
5887
+ * @throws {RequiredError}
5888
+ */
5889
+ public userAdminServiceUserInfoPageGet(body: UserInfoPageGetRequest, options?: RawAxiosRequestConfig) {
5890
+ return UserAdminServiceApiFp(this.configuration).userAdminServiceUserInfoPageGet(body, options).then((request) => request(this.axios, this.basePath));
5891
+ }
5892
+ }
5893
+
5894
+
5895
+
5871
5896
  /**
5872
5897
  * UserBalanceServiceApi - axios parameter creator
5873
5898
  */
@@ -6928,518 +6953,6 @@ export class UserLabelServiceApi extends BaseAPI implements UserLabelServiceApiI
6928
6953
 
6929
6954
 
6930
6955
 
6931
- /**
6932
- * UserManageAdminServiceApi - axios parameter creator
6933
- */
6934
- export const UserManageAdminServiceApiAxiosParamCreator = function (configuration?: Configuration) {
6935
- return {
6936
- /**
6937
- *
6938
- * @summary 批量管理 Session
6939
- * @param {BatchUpdateSessionsRequest} body
6940
- * @param {*} [options] Override http request option.
6941
- * @throws {RequiredError}
6942
- */
6943
- userManageAdminServiceBatchUpdateSessions: async (body: BatchUpdateSessionsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
6944
- // verify required parameter 'body' is not null or undefined
6945
- assertParamExists('userManageAdminServiceBatchUpdateSessions', 'body', body)
6946
- const localVarPath = `/admin/users/manage/sessions`;
6947
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
6948
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
6949
- let baseOptions;
6950
- if (configuration) {
6951
- baseOptions = configuration.baseOptions;
6952
- }
6953
-
6954
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
6955
- const localVarHeaderParameter = {} as any;
6956
- const localVarQueryParameter = {} as any;
6957
-
6958
-
6959
-
6960
- localVarHeaderParameter['Content-Type'] = 'application/json';
6961
-
6962
- setSearchParams(localVarUrlObj, localVarQueryParameter);
6963
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
6964
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
6965
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
6966
-
6967
- return {
6968
- url: toPathString(localVarUrlObj),
6969
- options: localVarRequestOptions,
6970
- };
6971
- },
6972
- /**
6973
- *
6974
- * @summary 用户详情
6975
- * @param {string} [uid] @gotags: form:\&quot;uid\&quot; binding:\&quot;uid\&quot; 用户 UID
6976
- * @param {*} [options] Override http request option.
6977
- * @throws {RequiredError}
6978
- */
6979
- userManageAdminServiceGetUserDetail: async (uid?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
6980
- const localVarPath = `/admin/users/detail`;
6981
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
6982
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
6983
- let baseOptions;
6984
- if (configuration) {
6985
- baseOptions = configuration.baseOptions;
6986
- }
6987
-
6988
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
6989
- const localVarHeaderParameter = {} as any;
6990
- const localVarQueryParameter = {} as any;
6991
-
6992
- if (uid !== undefined) {
6993
- localVarQueryParameter['uid'] = uid;
6994
- }
6995
-
6996
-
6997
-
6998
- setSearchParams(localVarUrlObj, localVarQueryParameter);
6999
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7000
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7001
-
7002
- return {
7003
- url: toPathString(localVarUrlObj),
7004
- options: localVarRequestOptions,
7005
- };
7006
- },
7007
- /**
7008
- *
7009
- * @summary 用户列表(分页查询)
7010
- * @param {ListUsersRequest} body
7011
- * @param {*} [options] Override http request option.
7012
- * @throws {RequiredError}
7013
- */
7014
- userManageAdminServiceListUsers: async (body: ListUsersRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7015
- // verify required parameter 'body' is not null or undefined
7016
- assertParamExists('userManageAdminServiceListUsers', 'body', body)
7017
- const localVarPath = `/admin/users/list`;
7018
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
7019
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7020
- let baseOptions;
7021
- if (configuration) {
7022
- baseOptions = configuration.baseOptions;
7023
- }
7024
-
7025
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
7026
- const localVarHeaderParameter = {} as any;
7027
- const localVarQueryParameter = {} as any;
7028
-
7029
-
7030
-
7031
- localVarHeaderParameter['Content-Type'] = 'application/json';
7032
-
7033
- setSearchParams(localVarUrlObj, localVarQueryParameter);
7034
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7035
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7036
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
7037
-
7038
- return {
7039
- url: toPathString(localVarUrlObj),
7040
- options: localVarRequestOptions,
7041
- };
7042
- },
7043
- /**
7044
- *
7045
- * @summary 设置用户角色
7046
- * @param {SetUserRoleRequest} body
7047
- * @param {*} [options] Override http request option.
7048
- * @throws {RequiredError}
7049
- */
7050
- userManageAdminServiceSetUserRole: async (body: SetUserRoleRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7051
- // verify required parameter 'body' is not null or undefined
7052
- assertParamExists('userManageAdminServiceSetUserRole', 'body', body)
7053
- const localVarPath = `/admin/users/manage/role`;
7054
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
7055
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7056
- let baseOptions;
7057
- if (configuration) {
7058
- baseOptions = configuration.baseOptions;
7059
- }
7060
-
7061
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
7062
- const localVarHeaderParameter = {} as any;
7063
- const localVarQueryParameter = {} as any;
7064
-
7065
-
7066
-
7067
- localVarHeaderParameter['Content-Type'] = 'application/json';
7068
-
7069
- setSearchParams(localVarUrlObj, localVarQueryParameter);
7070
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7071
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7072
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
7073
-
7074
- return {
7075
- url: toPathString(localVarUrlObj),
7076
- options: localVarRequestOptions,
7077
- };
7078
- },
7079
- /**
7080
- *
7081
- * @summary 设置用户状态(启用/禁用)
7082
- * @param {SetUserStatusRequest} body
7083
- * @param {*} [options] Override http request option.
7084
- * @throws {RequiredError}
7085
- */
7086
- userManageAdminServiceSetUserStatus: async (body: SetUserStatusRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7087
- // verify required parameter 'body' is not null or undefined
7088
- assertParamExists('userManageAdminServiceSetUserStatus', 'body', body)
7089
- const localVarPath = `/admin/users/manage/status`;
7090
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
7091
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7092
- let baseOptions;
7093
- if (configuration) {
7094
- baseOptions = configuration.baseOptions;
7095
- }
7096
-
7097
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
7098
- const localVarHeaderParameter = {} as any;
7099
- const localVarQueryParameter = {} as any;
7100
-
7101
-
7102
-
7103
- localVarHeaderParameter['Content-Type'] = 'application/json';
7104
-
7105
- setSearchParams(localVarUrlObj, localVarQueryParameter);
7106
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7107
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7108
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
7109
-
7110
- return {
7111
- url: toPathString(localVarUrlObj),
7112
- options: localVarRequestOptions,
7113
- };
7114
- },
7115
- /**
7116
- *
7117
- * @summary 更新用户信息
7118
- * @param {UpdateUserInfoRequest} body
7119
- * @param {*} [options] Override http request option.
7120
- * @throws {RequiredError}
7121
- */
7122
- userManageAdminServiceUpdateUserInfo: async (body: UpdateUserInfoRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7123
- // verify required parameter 'body' is not null or undefined
7124
- assertParamExists('userManageAdminServiceUpdateUserInfo', 'body', body)
7125
- const localVarPath = `/admin/users/manage/info`;
7126
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
7127
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7128
- let baseOptions;
7129
- if (configuration) {
7130
- baseOptions = configuration.baseOptions;
7131
- }
7132
-
7133
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
7134
- const localVarHeaderParameter = {} as any;
7135
- const localVarQueryParameter = {} as any;
7136
-
7137
-
7138
-
7139
- localVarHeaderParameter['Content-Type'] = 'application/json';
7140
-
7141
- setSearchParams(localVarUrlObj, localVarQueryParameter);
7142
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7143
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7144
- localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
7145
-
7146
- return {
7147
- url: toPathString(localVarUrlObj),
7148
- options: localVarRequestOptions,
7149
- };
7150
- },
7151
- }
7152
- };
7153
-
7154
- /**
7155
- * UserManageAdminServiceApi - functional programming interface
7156
- */
7157
- export const UserManageAdminServiceApiFp = function(configuration?: Configuration) {
7158
- const localVarAxiosParamCreator = UserManageAdminServiceApiAxiosParamCreator(configuration)
7159
- return {
7160
- /**
7161
- *
7162
- * @summary 批量管理 Session
7163
- * @param {BatchUpdateSessionsRequest} body
7164
- * @param {*} [options] Override http request option.
7165
- * @throws {RequiredError}
7166
- */
7167
- async userManageAdminServiceBatchUpdateSessions(body: BatchUpdateSessionsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BatchUpdateSessionsResponse>> {
7168
- const localVarAxiosArgs = await localVarAxiosParamCreator.userManageAdminServiceBatchUpdateSessions(body, options);
7169
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7170
- const localVarOperationServerBasePath = operationServerMap['UserManageAdminServiceApi.userManageAdminServiceBatchUpdateSessions']?.[localVarOperationServerIndex]?.url;
7171
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7172
- },
7173
- /**
7174
- *
7175
- * @summary 用户详情
7176
- * @param {string} [uid] @gotags: form:\&quot;uid\&quot; binding:\&quot;uid\&quot; 用户 UID
7177
- * @param {*} [options] Override http request option.
7178
- * @throws {RequiredError}
7179
- */
7180
- async userManageAdminServiceGetUserDetail(uid?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetUserDetailResponse>> {
7181
- const localVarAxiosArgs = await localVarAxiosParamCreator.userManageAdminServiceGetUserDetail(uid, options);
7182
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7183
- const localVarOperationServerBasePath = operationServerMap['UserManageAdminServiceApi.userManageAdminServiceGetUserDetail']?.[localVarOperationServerIndex]?.url;
7184
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7185
- },
7186
- /**
7187
- *
7188
- * @summary 用户列表(分页查询)
7189
- * @param {ListUsersRequest} body
7190
- * @param {*} [options] Override http request option.
7191
- * @throws {RequiredError}
7192
- */
7193
- async userManageAdminServiceListUsers(body: ListUsersRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListUsersResponse>> {
7194
- const localVarAxiosArgs = await localVarAxiosParamCreator.userManageAdminServiceListUsers(body, options);
7195
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7196
- const localVarOperationServerBasePath = operationServerMap['UserManageAdminServiceApi.userManageAdminServiceListUsers']?.[localVarOperationServerIndex]?.url;
7197
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7198
- },
7199
- /**
7200
- *
7201
- * @summary 设置用户角色
7202
- * @param {SetUserRoleRequest} body
7203
- * @param {*} [options] Override http request option.
7204
- * @throws {RequiredError}
7205
- */
7206
- async userManageAdminServiceSetUserRole(body: SetUserRoleRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SetUserRoleResponse>> {
7207
- const localVarAxiosArgs = await localVarAxiosParamCreator.userManageAdminServiceSetUserRole(body, options);
7208
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7209
- const localVarOperationServerBasePath = operationServerMap['UserManageAdminServiceApi.userManageAdminServiceSetUserRole']?.[localVarOperationServerIndex]?.url;
7210
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7211
- },
7212
- /**
7213
- *
7214
- * @summary 设置用户状态(启用/禁用)
7215
- * @param {SetUserStatusRequest} body
7216
- * @param {*} [options] Override http request option.
7217
- * @throws {RequiredError}
7218
- */
7219
- async userManageAdminServiceSetUserStatus(body: SetUserStatusRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SetUserStatusResponse>> {
7220
- const localVarAxiosArgs = await localVarAxiosParamCreator.userManageAdminServiceSetUserStatus(body, options);
7221
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7222
- const localVarOperationServerBasePath = operationServerMap['UserManageAdminServiceApi.userManageAdminServiceSetUserStatus']?.[localVarOperationServerIndex]?.url;
7223
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7224
- },
7225
- /**
7226
- *
7227
- * @summary 更新用户信息
7228
- * @param {UpdateUserInfoRequest} body
7229
- * @param {*} [options] Override http request option.
7230
- * @throws {RequiredError}
7231
- */
7232
- async userManageAdminServiceUpdateUserInfo(body: UpdateUserInfoRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateUserInfoResponse>> {
7233
- const localVarAxiosArgs = await localVarAxiosParamCreator.userManageAdminServiceUpdateUserInfo(body, options);
7234
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7235
- const localVarOperationServerBasePath = operationServerMap['UserManageAdminServiceApi.userManageAdminServiceUpdateUserInfo']?.[localVarOperationServerIndex]?.url;
7236
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7237
- },
7238
- }
7239
- };
7240
-
7241
- /**
7242
- * UserManageAdminServiceApi - factory interface
7243
- */
7244
- export const UserManageAdminServiceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
7245
- const localVarFp = UserManageAdminServiceApiFp(configuration)
7246
- return {
7247
- /**
7248
- *
7249
- * @summary 批量管理 Session
7250
- * @param {BatchUpdateSessionsRequest} body
7251
- * @param {*} [options] Override http request option.
7252
- * @throws {RequiredError}
7253
- */
7254
- userManageAdminServiceBatchUpdateSessions(body: BatchUpdateSessionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<BatchUpdateSessionsResponse> {
7255
- return localVarFp.userManageAdminServiceBatchUpdateSessions(body, options).then((request) => request(axios, basePath));
7256
- },
7257
- /**
7258
- *
7259
- * @summary 用户详情
7260
- * @param {string} [uid] @gotags: form:\&quot;uid\&quot; binding:\&quot;uid\&quot; 用户 UID
7261
- * @param {*} [options] Override http request option.
7262
- * @throws {RequiredError}
7263
- */
7264
- userManageAdminServiceGetUserDetail(uid?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetUserDetailResponse> {
7265
- return localVarFp.userManageAdminServiceGetUserDetail(uid, options).then((request) => request(axios, basePath));
7266
- },
7267
- /**
7268
- *
7269
- * @summary 用户列表(分页查询)
7270
- * @param {ListUsersRequest} body
7271
- * @param {*} [options] Override http request option.
7272
- * @throws {RequiredError}
7273
- */
7274
- userManageAdminServiceListUsers(body: ListUsersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListUsersResponse> {
7275
- return localVarFp.userManageAdminServiceListUsers(body, options).then((request) => request(axios, basePath));
7276
- },
7277
- /**
7278
- *
7279
- * @summary 设置用户角色
7280
- * @param {SetUserRoleRequest} body
7281
- * @param {*} [options] Override http request option.
7282
- * @throws {RequiredError}
7283
- */
7284
- userManageAdminServiceSetUserRole(body: SetUserRoleRequest, options?: RawAxiosRequestConfig): AxiosPromise<SetUserRoleResponse> {
7285
- return localVarFp.userManageAdminServiceSetUserRole(body, options).then((request) => request(axios, basePath));
7286
- },
7287
- /**
7288
- *
7289
- * @summary 设置用户状态(启用/禁用)
7290
- * @param {SetUserStatusRequest} body
7291
- * @param {*} [options] Override http request option.
7292
- * @throws {RequiredError}
7293
- */
7294
- userManageAdminServiceSetUserStatus(body: SetUserStatusRequest, options?: RawAxiosRequestConfig): AxiosPromise<SetUserStatusResponse> {
7295
- return localVarFp.userManageAdminServiceSetUserStatus(body, options).then((request) => request(axios, basePath));
7296
- },
7297
- /**
7298
- *
7299
- * @summary 更新用户信息
7300
- * @param {UpdateUserInfoRequest} body
7301
- * @param {*} [options] Override http request option.
7302
- * @throws {RequiredError}
7303
- */
7304
- userManageAdminServiceUpdateUserInfo(body: UpdateUserInfoRequest, options?: RawAxiosRequestConfig): AxiosPromise<UpdateUserInfoResponse> {
7305
- return localVarFp.userManageAdminServiceUpdateUserInfo(body, options).then((request) => request(axios, basePath));
7306
- },
7307
- };
7308
- };
7309
-
7310
- /**
7311
- * UserManageAdminServiceApi - interface
7312
- */
7313
- export interface UserManageAdminServiceApiInterface {
7314
- /**
7315
- *
7316
- * @summary 批量管理 Session
7317
- * @param {BatchUpdateSessionsRequest} body
7318
- * @param {*} [options] Override http request option.
7319
- * @throws {RequiredError}
7320
- */
7321
- userManageAdminServiceBatchUpdateSessions(body: BatchUpdateSessionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<BatchUpdateSessionsResponse>;
7322
-
7323
- /**
7324
- *
7325
- * @summary 用户详情
7326
- * @param {string} [uid] @gotags: form:\&quot;uid\&quot; binding:\&quot;uid\&quot; 用户 UID
7327
- * @param {*} [options] Override http request option.
7328
- * @throws {RequiredError}
7329
- */
7330
- userManageAdminServiceGetUserDetail(uid?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetUserDetailResponse>;
7331
-
7332
- /**
7333
- *
7334
- * @summary 用户列表(分页查询)
7335
- * @param {ListUsersRequest} body
7336
- * @param {*} [options] Override http request option.
7337
- * @throws {RequiredError}
7338
- */
7339
- userManageAdminServiceListUsers(body: ListUsersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListUsersResponse>;
7340
-
7341
- /**
7342
- *
7343
- * @summary 设置用户角色
7344
- * @param {SetUserRoleRequest} body
7345
- * @param {*} [options] Override http request option.
7346
- * @throws {RequiredError}
7347
- */
7348
- userManageAdminServiceSetUserRole(body: SetUserRoleRequest, options?: RawAxiosRequestConfig): AxiosPromise<SetUserRoleResponse>;
7349
-
7350
- /**
7351
- *
7352
- * @summary 设置用户状态(启用/禁用)
7353
- * @param {SetUserStatusRequest} body
7354
- * @param {*} [options] Override http request option.
7355
- * @throws {RequiredError}
7356
- */
7357
- userManageAdminServiceSetUserStatus(body: SetUserStatusRequest, options?: RawAxiosRequestConfig): AxiosPromise<SetUserStatusResponse>;
7358
-
7359
- /**
7360
- *
7361
- * @summary 更新用户信息
7362
- * @param {UpdateUserInfoRequest} body
7363
- * @param {*} [options] Override http request option.
7364
- * @throws {RequiredError}
7365
- */
7366
- userManageAdminServiceUpdateUserInfo(body: UpdateUserInfoRequest, options?: RawAxiosRequestConfig): AxiosPromise<UpdateUserInfoResponse>;
7367
-
7368
- }
7369
-
7370
- /**
7371
- * UserManageAdminServiceApi - object-oriented interface
7372
- */
7373
- export class UserManageAdminServiceApi extends BaseAPI implements UserManageAdminServiceApiInterface {
7374
- /**
7375
- *
7376
- * @summary 批量管理 Session
7377
- * @param {BatchUpdateSessionsRequest} body
7378
- * @param {*} [options] Override http request option.
7379
- * @throws {RequiredError}
7380
- */
7381
- public userManageAdminServiceBatchUpdateSessions(body: BatchUpdateSessionsRequest, options?: RawAxiosRequestConfig) {
7382
- return UserManageAdminServiceApiFp(this.configuration).userManageAdminServiceBatchUpdateSessions(body, options).then((request) => request(this.axios, this.basePath));
7383
- }
7384
-
7385
- /**
7386
- *
7387
- * @summary 用户详情
7388
- * @param {string} [uid] @gotags: form:\&quot;uid\&quot; binding:\&quot;uid\&quot; 用户 UID
7389
- * @param {*} [options] Override http request option.
7390
- * @throws {RequiredError}
7391
- */
7392
- public userManageAdminServiceGetUserDetail(uid?: string, options?: RawAxiosRequestConfig) {
7393
- return UserManageAdminServiceApiFp(this.configuration).userManageAdminServiceGetUserDetail(uid, options).then((request) => request(this.axios, this.basePath));
7394
- }
7395
-
7396
- /**
7397
- *
7398
- * @summary 用户列表(分页查询)
7399
- * @param {ListUsersRequest} body
7400
- * @param {*} [options] Override http request option.
7401
- * @throws {RequiredError}
7402
- */
7403
- public userManageAdminServiceListUsers(body: ListUsersRequest, options?: RawAxiosRequestConfig) {
7404
- return UserManageAdminServiceApiFp(this.configuration).userManageAdminServiceListUsers(body, options).then((request) => request(this.axios, this.basePath));
7405
- }
7406
-
7407
- /**
7408
- *
7409
- * @summary 设置用户角色
7410
- * @param {SetUserRoleRequest} body
7411
- * @param {*} [options] Override http request option.
7412
- * @throws {RequiredError}
7413
- */
7414
- public userManageAdminServiceSetUserRole(body: SetUserRoleRequest, options?: RawAxiosRequestConfig) {
7415
- return UserManageAdminServiceApiFp(this.configuration).userManageAdminServiceSetUserRole(body, options).then((request) => request(this.axios, this.basePath));
7416
- }
7417
-
7418
- /**
7419
- *
7420
- * @summary 设置用户状态(启用/禁用)
7421
- * @param {SetUserStatusRequest} body
7422
- * @param {*} [options] Override http request option.
7423
- * @throws {RequiredError}
7424
- */
7425
- public userManageAdminServiceSetUserStatus(body: SetUserStatusRequest, options?: RawAxiosRequestConfig) {
7426
- return UserManageAdminServiceApiFp(this.configuration).userManageAdminServiceSetUserStatus(body, options).then((request) => request(this.axios, this.basePath));
7427
- }
7428
-
7429
- /**
7430
- *
7431
- * @summary 更新用户信息
7432
- * @param {UpdateUserInfoRequest} body
7433
- * @param {*} [options] Override http request option.
7434
- * @throws {RequiredError}
7435
- */
7436
- public userManageAdminServiceUpdateUserInfo(body: UpdateUserInfoRequest, options?: RawAxiosRequestConfig) {
7437
- return UserManageAdminServiceApiFp(this.configuration).userManageAdminServiceUpdateUserInfo(body, options).then((request) => request(this.axios, this.basePath));
7438
- }
7439
- }
7440
-
7441
-
7442
-
7443
6956
  /**
7444
6957
  * UserModelServiceApi - axios parameter creator
7445
6958
  */