@sfxcode/nuxt-mongocamp-server 1.0.4 → 1.0.6

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 (127) hide show
  1. package/dist/module.d.mts +9 -0
  2. package/dist/module.d.ts +9 -2
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +557 -4
  5. package/dist/runtime/api/apis/AdminApi.d.ts +181 -0
  6. package/dist/runtime/api/apis/AdminApi.mjs +509 -0
  7. package/dist/runtime/api/apis/ApplicationApi.d.ts +65 -0
  8. package/dist/runtime/api/apis/ApplicationApi.mjs +164 -0
  9. package/dist/runtime/api/apis/AuthApi.d.ts +104 -0
  10. package/dist/runtime/api/apis/AuthApi.mjs +296 -0
  11. package/dist/runtime/api/apis/BucketApi.d.ts +67 -0
  12. package/dist/runtime/api/apis/BucketApi.mjs +160 -0
  13. package/dist/runtime/api/apis/CollectionApi.d.ts +161 -0
  14. package/dist/runtime/api/apis/CollectionApi.mjs +435 -0
  15. package/dist/runtime/api/apis/DatabaseApi.d.ts +77 -0
  16. package/dist/runtime/api/apis/DatabaseApi.mjs +196 -0
  17. package/dist/runtime/api/apis/DocumentApi.d.ts +188 -0
  18. package/dist/runtime/api/apis/DocumentApi.mjs +465 -0
  19. package/dist/runtime/api/apis/FileApi.d.ts +125 -0
  20. package/dist/runtime/api/apis/FileApi.mjs +355 -0
  21. package/dist/runtime/api/apis/IndexApi.d.ts +137 -0
  22. package/dist/runtime/api/apis/IndexApi.mjs +367 -0
  23. package/dist/runtime/api/apis/InformationApi.d.ts +28 -0
  24. package/dist/runtime/api/apis/InformationApi.mjs +29 -0
  25. package/dist/runtime/api/apis/JobsApi.d.ts +94 -0
  26. package/dist/runtime/api/apis/JobsApi.mjs +252 -0
  27. package/dist/runtime/api/apis/index.d.ts +11 -0
  28. package/dist/runtime/api/apis/index.mjs +11 -0
  29. package/dist/runtime/api/index.d.ts +3 -0
  30. package/dist/runtime/api/index.mjs +3 -0
  31. package/dist/runtime/api/models/BucketInformation.d.ts +49 -0
  32. package/dist/runtime/api/models/BucketInformation.mjs +36 -0
  33. package/dist/runtime/api/models/CollectionStatus.d.ts +107 -0
  34. package/dist/runtime/api/models/CollectionStatus.mjs +63 -0
  35. package/dist/runtime/api/models/DatabaseInfo.d.ts +57 -0
  36. package/dist/runtime/api/models/DatabaseInfo.mjs +39 -0
  37. package/dist/runtime/api/models/DeleteResponse.d.ts +37 -0
  38. package/dist/runtime/api/models/DeleteResponse.mjs +30 -0
  39. package/dist/runtime/api/models/ErrorDescription.d.ts +43 -0
  40. package/dist/runtime/api/models/ErrorDescription.mjs +33 -0
  41. package/dist/runtime/api/models/FileInformation.d.ts +63 -0
  42. package/dist/runtime/api/models/FileInformation.mjs +42 -0
  43. package/dist/runtime/api/models/Grant.d.ts +55 -0
  44. package/dist/runtime/api/models/Grant.mjs +39 -0
  45. package/dist/runtime/api/models/IndexCreateRequest.d.ts +40 -0
  46. package/dist/runtime/api/models/IndexCreateRequest.mjs +34 -0
  47. package/dist/runtime/api/models/IndexCreateResponse.d.ts +31 -0
  48. package/dist/runtime/api/models/IndexCreateResponse.mjs +27 -0
  49. package/dist/runtime/api/models/IndexDropResponse.d.ts +31 -0
  50. package/dist/runtime/api/models/IndexDropResponse.mjs +27 -0
  51. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +73 -0
  52. package/dist/runtime/api/models/IndexOptionsRequest.mjs +41 -0
  53. package/dist/runtime/api/models/InsertResponse.d.ts +37 -0
  54. package/dist/runtime/api/models/InsertResponse.mjs +30 -0
  55. package/dist/runtime/api/models/JobConfig.d.ts +61 -0
  56. package/dist/runtime/api/models/JobConfig.mjs +42 -0
  57. package/dist/runtime/api/models/JobInformation.d.ts +79 -0
  58. package/dist/runtime/api/models/JobInformation.mjs +49 -0
  59. package/dist/runtime/api/models/JsonSchema.d.ts +46 -0
  60. package/dist/runtime/api/models/JsonSchema.mjs +38 -0
  61. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +59 -0
  62. package/dist/runtime/api/models/JsonSchemaDefinition.mjs +39 -0
  63. package/dist/runtime/api/models/JsonValueAny.d.ts +31 -0
  64. package/dist/runtime/api/models/JsonValueAny.mjs +27 -0
  65. package/dist/runtime/api/models/JsonValueBoolean.d.ts +31 -0
  66. package/dist/runtime/api/models/JsonValueBoolean.mjs +27 -0
  67. package/dist/runtime/api/models/JsonValueString.d.ts +31 -0
  68. package/dist/runtime/api/models/JsonValueString.mjs +27 -0
  69. package/dist/runtime/api/models/Login.d.ts +37 -0
  70. package/dist/runtime/api/models/Login.mjs +30 -0
  71. package/dist/runtime/api/models/LoginResult.d.ts +44 -0
  72. package/dist/runtime/api/models/LoginResult.mjs +37 -0
  73. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +38 -0
  74. package/dist/runtime/api/models/MongoAggregateRequest.mjs +34 -0
  75. package/dist/runtime/api/models/MongoCampConfiguration.d.ts +55 -0
  76. package/dist/runtime/api/models/MongoCampConfiguration.mjs +39 -0
  77. package/dist/runtime/api/models/MongoFindRequest.d.ts +49 -0
  78. package/dist/runtime/api/models/MongoFindRequest.mjs +33 -0
  79. package/dist/runtime/api/models/MongoIndex.d.ts +103 -0
  80. package/dist/runtime/api/models/MongoIndex.mjs +60 -0
  81. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +31 -0
  82. package/dist/runtime/api/models/PasswordUpdateRequest.mjs +27 -0
  83. package/dist/runtime/api/models/PipelineStage.d.ts +37 -0
  84. package/dist/runtime/api/models/PipelineStage.mjs +30 -0
  85. package/dist/runtime/api/models/Role.d.ts +44 -0
  86. package/dist/runtime/api/models/Role.mjs +37 -0
  87. package/dist/runtime/api/models/SchemaAnalysis.d.ts +50 -0
  88. package/dist/runtime/api/models/SchemaAnalysis.mjs +40 -0
  89. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +62 -0
  90. package/dist/runtime/api/models/SchemaAnalysisField.mjs +45 -0
  91. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +43 -0
  92. package/dist/runtime/api/models/SchemaAnalysisFieldType.mjs +33 -0
  93. package/dist/runtime/api/models/SettingsResponse.d.ts +51 -0
  94. package/dist/runtime/api/models/SettingsResponse.mjs +34 -0
  95. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +39 -0
  96. package/dist/runtime/api/models/UpdateFileInformationRequest.mjs +29 -0
  97. package/dist/runtime/api/models/UpdateRequest.d.ts +41 -0
  98. package/dist/runtime/api/models/UpdateRequest.mjs +30 -0
  99. package/dist/runtime/api/models/UpdateResponse.d.ts +49 -0
  100. package/dist/runtime/api/models/UpdateResponse.mjs +36 -0
  101. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +38 -0
  102. package/dist/runtime/api/models/UpdateRoleRequest.mjs +34 -0
  103. package/dist/runtime/api/models/UserInformation.d.ts +49 -0
  104. package/dist/runtime/api/models/UserInformation.mjs +35 -0
  105. package/dist/runtime/api/models/UserProfile.d.ts +56 -0
  106. package/dist/runtime/api/models/UserProfile.mjs +41 -0
  107. package/dist/runtime/api/models/Version.d.ts +43 -0
  108. package/dist/runtime/api/models/Version.mjs +33 -0
  109. package/dist/runtime/api/models/index.d.ts +39 -0
  110. package/dist/runtime/api/models/index.mjs +39 -0
  111. package/dist/runtime/api/runtime.d.ts +182 -0
  112. package/dist/runtime/api/runtime.mjs +289 -0
  113. package/dist/runtime/composables/mongocampApi.d.ts +14 -0
  114. package/dist/runtime/composables/mongocampApi.mjs +45 -0
  115. package/dist/runtime/composables/mongocampAuth.d.ts +8 -0
  116. package/dist/runtime/composables/mongocampAuth.mjs +28 -0
  117. package/dist/runtime/composables/mongocampSearch.d.ts +11 -0
  118. package/dist/runtime/composables/mongocampSearch.mjs +20 -0
  119. package/dist/runtime/composables/mongocampStorage.d.ts +0 -0
  120. package/dist/runtime/composables/mongocampStorage.mjs +5 -0
  121. package/dist/runtime/composables/mongocampUrl.d.ts +1 -0
  122. package/dist/runtime/composables/mongocampUrl.mjs +5 -0
  123. package/dist/runtime/composables/mongocampUser.d.ts +3 -0
  124. package/dist/runtime/composables/mongocampUser.mjs +4 -0
  125. package/dist/types.d.mts +15 -0
  126. package/dist/types.d.ts +2 -8
  127. package/package.json +14 -13
@@ -0,0 +1,34 @@
1
+ import { exists } from "../runtime.mjs";
2
+ import {
3
+ GrantFromJSON,
4
+ GrantToJSON
5
+ } from "./Grant.mjs";
6
+ export function instanceOfUpdateRoleRequest(value) {
7
+ let isInstance = true;
8
+ isInstance = isInstance && "isAdmin" in value;
9
+ return isInstance;
10
+ }
11
+ export function UpdateRoleRequestFromJSON(json) {
12
+ return UpdateRoleRequestFromJSONTyped(json, false);
13
+ }
14
+ export function UpdateRoleRequestFromJSONTyped(json, ignoreDiscriminator) {
15
+ if (json === void 0 || json === null) {
16
+ return json;
17
+ }
18
+ return {
19
+ "isAdmin": json["isAdmin"],
20
+ "collectionGrants": !exists(json, "collectionGrants") ? void 0 : json["collectionGrants"].map(GrantFromJSON)
21
+ };
22
+ }
23
+ export function UpdateRoleRequestToJSON(value) {
24
+ if (value === void 0) {
25
+ return void 0;
26
+ }
27
+ if (value === null) {
28
+ return null;
29
+ }
30
+ return {
31
+ "isAdmin": value.isAdmin,
32
+ "collectionGrants": value.collectionGrants === void 0 ? void 0 : value.collectionGrants.map(GrantToJSON)
33
+ };
34
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * mongocamp-library
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.5.7
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface UserInformation
16
+ */
17
+ export interface UserInformation {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof UserInformation
22
+ */
23
+ userId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof UserInformation
28
+ */
29
+ password: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof UserInformation
34
+ */
35
+ apiKey?: string;
36
+ /**
37
+ *
38
+ * @type {Array<string>}
39
+ * @memberof UserInformation
40
+ */
41
+ roles?: Array<string>;
42
+ }
43
+ /**
44
+ * Check if a given object implements the UserInformation interface.
45
+ */
46
+ export declare function instanceOfUserInformation(value: object): boolean;
47
+ export declare function UserInformationFromJSON(json: any): UserInformation;
48
+ export declare function UserInformationFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserInformation;
49
+ export declare function UserInformationToJSON(value?: UserInformation | null): any;
@@ -0,0 +1,35 @@
1
+ import { exists } from "../runtime.mjs";
2
+ export function instanceOfUserInformation(value) {
3
+ let isInstance = true;
4
+ isInstance = isInstance && "userId" in value;
5
+ isInstance = isInstance && "password" in value;
6
+ return isInstance;
7
+ }
8
+ export function UserInformationFromJSON(json) {
9
+ return UserInformationFromJSONTyped(json, false);
10
+ }
11
+ export function UserInformationFromJSONTyped(json, ignoreDiscriminator) {
12
+ if (json === void 0 || json === null) {
13
+ return json;
14
+ }
15
+ return {
16
+ "userId": json["userId"],
17
+ "password": json["password"],
18
+ "apiKey": !exists(json, "apiKey") ? void 0 : json["apiKey"],
19
+ "roles": !exists(json, "roles") ? void 0 : json["roles"]
20
+ };
21
+ }
22
+ export function UserInformationToJSON(value) {
23
+ if (value === void 0) {
24
+ return void 0;
25
+ }
26
+ if (value === null) {
27
+ return null;
28
+ }
29
+ return {
30
+ "userId": value.userId,
31
+ "password": value.password,
32
+ "apiKey": value.apiKey,
33
+ "roles": value.roles
34
+ };
35
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * mongocamp-library
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.5.7
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Grant } from './Grant';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UserProfile
17
+ */
18
+ export interface UserProfile {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof UserProfile
23
+ */
24
+ user: string;
25
+ /**
26
+ *
27
+ * @type {boolean}
28
+ * @memberof UserProfile
29
+ */
30
+ isAdmin: boolean;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof UserProfile
35
+ */
36
+ apiKey?: string;
37
+ /**
38
+ *
39
+ * @type {Array<string>}
40
+ * @memberof UserProfile
41
+ */
42
+ roles?: Array<string>;
43
+ /**
44
+ *
45
+ * @type {Array<Grant>}
46
+ * @memberof UserProfile
47
+ */
48
+ grants?: Array<Grant>;
49
+ }
50
+ /**
51
+ * Check if a given object implements the UserProfile interface.
52
+ */
53
+ export declare function instanceOfUserProfile(value: object): boolean;
54
+ export declare function UserProfileFromJSON(json: any): UserProfile;
55
+ export declare function UserProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserProfile;
56
+ export declare function UserProfileToJSON(value?: UserProfile | null): any;
@@ -0,0 +1,41 @@
1
+ import { exists } from "../runtime.mjs";
2
+ import {
3
+ GrantFromJSON,
4
+ GrantToJSON
5
+ } from "./Grant.mjs";
6
+ export function instanceOfUserProfile(value) {
7
+ let isInstance = true;
8
+ isInstance = isInstance && "user" in value;
9
+ isInstance = isInstance && "isAdmin" in value;
10
+ return isInstance;
11
+ }
12
+ export function UserProfileFromJSON(json) {
13
+ return UserProfileFromJSONTyped(json, false);
14
+ }
15
+ export function UserProfileFromJSONTyped(json, ignoreDiscriminator) {
16
+ if (json === void 0 || json === null) {
17
+ return json;
18
+ }
19
+ return {
20
+ "user": json["user"],
21
+ "isAdmin": json["isAdmin"],
22
+ "apiKey": !exists(json, "apiKey") ? void 0 : json["apiKey"],
23
+ "roles": !exists(json, "roles") ? void 0 : json["roles"],
24
+ "grants": !exists(json, "grants") ? void 0 : json["grants"].map(GrantFromJSON)
25
+ };
26
+ }
27
+ export function UserProfileToJSON(value) {
28
+ if (value === void 0) {
29
+ return void 0;
30
+ }
31
+ if (value === null) {
32
+ return null;
33
+ }
34
+ return {
35
+ "user": value.user,
36
+ "isAdmin": value.isAdmin,
37
+ "apiKey": value.apiKey,
38
+ "roles": value.roles,
39
+ "grants": value.grants === void 0 ? void 0 : value.grants.map(GrantToJSON)
40
+ };
41
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * mongocamp-library
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.5.7
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface Version
16
+ */
17
+ export interface Version {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof Version
22
+ */
23
+ name: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof Version
28
+ */
29
+ version: string;
30
+ /**
31
+ *
32
+ * @type {Date}
33
+ * @memberof Version
34
+ */
35
+ builtAt: Date;
36
+ }
37
+ /**
38
+ * Check if a given object implements the Version interface.
39
+ */
40
+ export declare function instanceOfVersion(value: object): boolean;
41
+ export declare function VersionFromJSON(json: any): Version;
42
+ export declare function VersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Version;
43
+ export declare function VersionToJSON(value?: Version | null): any;
@@ -0,0 +1,33 @@
1
+ export function instanceOfVersion(value) {
2
+ let isInstance = true;
3
+ isInstance = isInstance && "name" in value;
4
+ isInstance = isInstance && "version" in value;
5
+ isInstance = isInstance && "builtAt" in value;
6
+ return isInstance;
7
+ }
8
+ export function VersionFromJSON(json) {
9
+ return VersionFromJSONTyped(json, false);
10
+ }
11
+ export function VersionFromJSONTyped(json, ignoreDiscriminator) {
12
+ if (json === void 0 || json === null) {
13
+ return json;
14
+ }
15
+ return {
16
+ "name": json["name"],
17
+ "version": json["version"],
18
+ "builtAt": new Date(json["builtAt"])
19
+ };
20
+ }
21
+ export function VersionToJSON(value) {
22
+ if (value === void 0) {
23
+ return void 0;
24
+ }
25
+ if (value === null) {
26
+ return null;
27
+ }
28
+ return {
29
+ "name": value.name,
30
+ "version": value.version,
31
+ "builtAt": value.builtAt.toISOString()
32
+ };
33
+ }
@@ -0,0 +1,39 @@
1
+ export * from './BucketInformation';
2
+ export * from './CollectionStatus';
3
+ export * from './DatabaseInfo';
4
+ export * from './DeleteResponse';
5
+ export * from './ErrorDescription';
6
+ export * from './FileInformation';
7
+ export * from './Grant';
8
+ export * from './IndexCreateRequest';
9
+ export * from './IndexCreateResponse';
10
+ export * from './IndexDropResponse';
11
+ export * from './IndexOptionsRequest';
12
+ export * from './InsertResponse';
13
+ export * from './JobConfig';
14
+ export * from './JobInformation';
15
+ export * from './JsonSchema';
16
+ export * from './JsonSchemaDefinition';
17
+ export * from './JsonValueAny';
18
+ export * from './JsonValueBoolean';
19
+ export * from './JsonValueString';
20
+ export * from './Login';
21
+ export * from './LoginResult';
22
+ export * from './MongoAggregateRequest';
23
+ export * from './MongoCampConfiguration';
24
+ export * from './MongoFindRequest';
25
+ export * from './MongoIndex';
26
+ export * from './PasswordUpdateRequest';
27
+ export * from './PipelineStage';
28
+ export * from './Role';
29
+ export * from './SchemaAnalysis';
30
+ export * from './SchemaAnalysisField';
31
+ export * from './SchemaAnalysisFieldType';
32
+ export * from './SettingsResponse';
33
+ export * from './UpdateFileInformationRequest';
34
+ export * from './UpdateRequest';
35
+ export * from './UpdateResponse';
36
+ export * from './UpdateRoleRequest';
37
+ export * from './UserInformation';
38
+ export * from './UserProfile';
39
+ export * from './Version';
@@ -0,0 +1,39 @@
1
+ export * from "./BucketInformation.mjs";
2
+ export * from "./CollectionStatus.mjs";
3
+ export * from "./DatabaseInfo.mjs";
4
+ export * from "./DeleteResponse.mjs";
5
+ export * from "./ErrorDescription.mjs";
6
+ export * from "./FileInformation.mjs";
7
+ export * from "./Grant.mjs";
8
+ export * from "./IndexCreateRequest.mjs";
9
+ export * from "./IndexCreateResponse.mjs";
10
+ export * from "./IndexDropResponse.mjs";
11
+ export * from "./IndexOptionsRequest.mjs";
12
+ export * from "./InsertResponse.mjs";
13
+ export * from "./JobConfig.mjs";
14
+ export * from "./JobInformation.mjs";
15
+ export * from "./JsonSchema.mjs";
16
+ export * from "./JsonSchemaDefinition.mjs";
17
+ export * from "./JsonValueAny.mjs";
18
+ export * from "./JsonValueBoolean.mjs";
19
+ export * from "./JsonValueString.mjs";
20
+ export * from "./Login.mjs";
21
+ export * from "./LoginResult.mjs";
22
+ export * from "./MongoAggregateRequest.mjs";
23
+ export * from "./MongoCampConfiguration.mjs";
24
+ export * from "./MongoFindRequest.mjs";
25
+ export * from "./MongoIndex.mjs";
26
+ export * from "./PasswordUpdateRequest.mjs";
27
+ export * from "./PipelineStage.mjs";
28
+ export * from "./Role.mjs";
29
+ export * from "./SchemaAnalysis.mjs";
30
+ export * from "./SchemaAnalysisField.mjs";
31
+ export * from "./SchemaAnalysisFieldType.mjs";
32
+ export * from "./SettingsResponse.mjs";
33
+ export * from "./UpdateFileInformationRequest.mjs";
34
+ export * from "./UpdateRequest.mjs";
35
+ export * from "./UpdateResponse.mjs";
36
+ export * from "./UpdateRoleRequest.mjs";
37
+ export * from "./UserInformation.mjs";
38
+ export * from "./UserProfile.mjs";
39
+ export * from "./Version.mjs";
@@ -0,0 +1,182 @@
1
+ /**
2
+ * mongocamp-library
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.5.7
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export declare const BASE_PATH: string;
13
+ export interface ConfigurationParameters {
14
+ basePath?: string;
15
+ fetchApi?: FetchAPI;
16
+ middleware?: Middleware[];
17
+ queryParamsStringify?: (params: HTTPQuery) => string;
18
+ username?: string;
19
+ password?: string;
20
+ apiKey?: string | ((name: string) => string);
21
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
22
+ headers?: HTTPHeaders;
23
+ credentials?: RequestCredentials;
24
+ }
25
+ export declare class Configuration {
26
+ private configuration;
27
+ constructor(configuration?: ConfigurationParameters);
28
+ set config(configuration: Configuration);
29
+ get basePath(): string;
30
+ get fetchApi(): FetchAPI | undefined;
31
+ get middleware(): Middleware[];
32
+ get queryParamsStringify(): (params: HTTPQuery) => string;
33
+ get username(): string | undefined;
34
+ get password(): string | undefined;
35
+ get apiKey(): ((name: string) => string) | undefined;
36
+ get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
37
+ get headers(): HTTPHeaders | undefined;
38
+ get credentials(): RequestCredentials | undefined;
39
+ }
40
+ export declare const DefaultConfig: Configuration;
41
+ /**
42
+ * This is the base class for all generated API classes.
43
+ */
44
+ export declare class BaseAPI {
45
+ protected configuration: Configuration;
46
+ private static readonly jsonRegex;
47
+ private middleware;
48
+ constructor(configuration?: Configuration);
49
+ withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
50
+ withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
51
+ withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
52
+ /**
53
+ * Check if the given MIME is a JSON MIME.
54
+ * JSON MIME examples:
55
+ * application/json
56
+ * application/json; charset=UTF8
57
+ * APPLICATION/JSON
58
+ * application/vnd.company+json
59
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
60
+ * @return True if the given MIME is JSON, false otherwise.
61
+ */
62
+ protected isJsonMime(mime: string | null | undefined): boolean;
63
+ protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
64
+ private createFetchParams;
65
+ private fetchApi;
66
+ /**
67
+ * Create a shallow clone of `this` by constructing a new instance
68
+ * and then shallow cloning data members.
69
+ */
70
+ private clone;
71
+ }
72
+ export declare class ResponseError extends Error {
73
+ response: Response;
74
+ name: "ResponseError";
75
+ constructor(response: Response, msg?: string);
76
+ }
77
+ export declare class FetchError extends Error {
78
+ cause: Error;
79
+ name: "FetchError";
80
+ constructor(cause: Error, msg?: string);
81
+ }
82
+ export declare class RequiredError extends Error {
83
+ field: string;
84
+ name: "RequiredError";
85
+ constructor(field: string, msg?: string);
86
+ }
87
+ export declare const COLLECTION_FORMATS: {
88
+ csv: string;
89
+ ssv: string;
90
+ tsv: string;
91
+ pipes: string;
92
+ };
93
+ export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
94
+ export type Json = any;
95
+ export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
96
+ export type HTTPHeaders = {
97
+ [key: string]: string;
98
+ };
99
+ export type HTTPQuery = {
100
+ [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
101
+ };
102
+ export type HTTPBody = Json | FormData | URLSearchParams;
103
+ export type HTTPRequestInit = {
104
+ headers?: HTTPHeaders;
105
+ method: HTTPMethod;
106
+ credentials?: RequestCredentials;
107
+ body?: HTTPBody;
108
+ };
109
+ export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
110
+ export type InitOverrideFunction = (requestContext: {
111
+ init: HTTPRequestInit;
112
+ context: RequestOpts;
113
+ }) => Promise<RequestInit>;
114
+ export interface FetchParams {
115
+ url: string;
116
+ init: RequestInit;
117
+ }
118
+ export interface RequestOpts {
119
+ path: string;
120
+ method: HTTPMethod;
121
+ headers: HTTPHeaders;
122
+ query?: HTTPQuery;
123
+ body?: HTTPBody;
124
+ }
125
+ export declare function exists(json: any, key: string): boolean;
126
+ export declare function querystring(params: HTTPQuery, prefix?: string): string;
127
+ export declare function mapValues(data: any, fn: (item: any) => any): {};
128
+ export declare function canConsumeForm(consumes: Consume[]): boolean;
129
+ export interface Consume {
130
+ contentType: string;
131
+ }
132
+ export interface RequestContext {
133
+ fetch: FetchAPI;
134
+ url: string;
135
+ init: RequestInit;
136
+ }
137
+ export interface ResponseContext {
138
+ fetch: FetchAPI;
139
+ url: string;
140
+ init: RequestInit;
141
+ response: Response;
142
+ }
143
+ export interface ErrorContext {
144
+ fetch: FetchAPI;
145
+ url: string;
146
+ init: RequestInit;
147
+ error: unknown;
148
+ response?: Response;
149
+ }
150
+ export interface Middleware {
151
+ pre?(context: RequestContext): Promise<FetchParams | void>;
152
+ post?(context: ResponseContext): Promise<Response | void>;
153
+ onError?(context: ErrorContext): Promise<Response | void>;
154
+ }
155
+ export interface ApiResponse<T> {
156
+ raw: Response;
157
+ value(): Promise<T>;
158
+ }
159
+ export interface ResponseTransformer<T> {
160
+ (json: any): T;
161
+ }
162
+ export declare class JSONApiResponse<T> {
163
+ raw: Response;
164
+ private transformer;
165
+ constructor(raw: Response, transformer?: ResponseTransformer<T>);
166
+ value(): Promise<T>;
167
+ }
168
+ export declare class VoidApiResponse {
169
+ raw: Response;
170
+ constructor(raw: Response);
171
+ value(): Promise<void>;
172
+ }
173
+ export declare class BlobApiResponse {
174
+ raw: Response;
175
+ constructor(raw: Response);
176
+ value(): Promise<Blob>;
177
+ }
178
+ export declare class TextApiResponse {
179
+ raw: Response;
180
+ constructor(raw: Response);
181
+ value(): Promise<string>;
182
+ }