@sfxcode/nuxt-mongocamp-server 0.7.0

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 (129) hide show
  1. package/README.md +38 -0
  2. package/dist/module.cjs +5 -0
  3. package/dist/module.d.ts +9 -0
  4. package/dist/module.json +5 -0
  5. package/dist/module.mjs +72 -0
  6. package/dist/runtime/api/apis/AdminApi.d.ts +181 -0
  7. package/dist/runtime/api/apis/AdminApi.mjs +413 -0
  8. package/dist/runtime/api/apis/ApplicationApi.d.ts +68 -0
  9. package/dist/runtime/api/apis/ApplicationApi.mjs +147 -0
  10. package/dist/runtime/api/apis/AuthApi.d.ts +107 -0
  11. package/dist/runtime/api/apis/AuthApi.mjs +235 -0
  12. package/dist/runtime/api/apis/BucketApi.d.ts +67 -0
  13. package/dist/runtime/api/apis/BucketApi.mjs +128 -0
  14. package/dist/runtime/api/apis/CollectionApi.d.ts +161 -0
  15. package/dist/runtime/api/apis/CollectionApi.mjs +355 -0
  16. package/dist/runtime/api/apis/DatabaseApi.d.ts +77 -0
  17. package/dist/runtime/api/apis/DatabaseApi.mjs +156 -0
  18. package/dist/runtime/api/apis/DocumentApi.d.ts +188 -0
  19. package/dist/runtime/api/apis/DocumentApi.mjs +385 -0
  20. package/dist/runtime/api/apis/FileApi.d.ts +125 -0
  21. package/dist/runtime/api/apis/FileApi.mjs +299 -0
  22. package/dist/runtime/api/apis/IndexApi.d.ts +137 -0
  23. package/dist/runtime/api/apis/IndexApi.mjs +303 -0
  24. package/dist/runtime/api/apis/InformationApi.d.ts +28 -0
  25. package/dist/runtime/api/apis/InformationApi.mjs +21 -0
  26. package/dist/runtime/api/apis/JobsApi.d.ts +94 -0
  27. package/dist/runtime/api/apis/JobsApi.mjs +204 -0
  28. package/dist/runtime/api/apis/index.d.ts +11 -0
  29. package/dist/runtime/api/apis/index.mjs +11 -0
  30. package/dist/runtime/api/index.d.ts +3 -0
  31. package/dist/runtime/api/index.mjs +3 -0
  32. package/dist/runtime/api/models/BucketInformation.d.ts +45 -0
  33. package/dist/runtime/api/models/BucketInformation.mjs +28 -0
  34. package/dist/runtime/api/models/CollectionStatus.d.ts +103 -0
  35. package/dist/runtime/api/models/CollectionStatus.mjs +46 -0
  36. package/dist/runtime/api/models/DatabaseInfo.d.ts +53 -0
  37. package/dist/runtime/api/models/DatabaseInfo.mjs +30 -0
  38. package/dist/runtime/api/models/DeleteResponse.d.ts +33 -0
  39. package/dist/runtime/api/models/DeleteResponse.mjs +24 -0
  40. package/dist/runtime/api/models/ErrorDescription.d.ts +39 -0
  41. package/dist/runtime/api/models/ErrorDescription.mjs +26 -0
  42. package/dist/runtime/api/models/FileInformation.d.ts +59 -0
  43. package/dist/runtime/api/models/FileInformation.mjs +32 -0
  44. package/dist/runtime/api/models/Grant.d.ts +51 -0
  45. package/dist/runtime/api/models/Grant.mjs +30 -0
  46. package/dist/runtime/api/models/IndexCreateRequest.d.ts +36 -0
  47. package/dist/runtime/api/models/IndexCreateRequest.mjs +29 -0
  48. package/dist/runtime/api/models/IndexCreateResponse.d.ts +27 -0
  49. package/dist/runtime/api/models/IndexCreateResponse.mjs +22 -0
  50. package/dist/runtime/api/models/IndexDropResponse.d.ts +27 -0
  51. package/dist/runtime/api/models/IndexDropResponse.mjs +22 -0
  52. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +69 -0
  53. package/dist/runtime/api/models/IndexOptionsRequest.mjs +37 -0
  54. package/dist/runtime/api/models/InsertResponse.d.ts +33 -0
  55. package/dist/runtime/api/models/InsertResponse.mjs +25 -0
  56. package/dist/runtime/api/models/JobConfig.d.ts +57 -0
  57. package/dist/runtime/api/models/JobConfig.mjs +32 -0
  58. package/dist/runtime/api/models/JobInformation.d.ts +75 -0
  59. package/dist/runtime/api/models/JobInformation.mjs +39 -0
  60. package/dist/runtime/api/models/JsonResultBoolean.d.ts +27 -0
  61. package/dist/runtime/api/models/JsonResultBoolean.mjs +22 -0
  62. package/dist/runtime/api/models/JsonResultString.d.ts +27 -0
  63. package/dist/runtime/api/models/JsonResultString.mjs +22 -0
  64. package/dist/runtime/api/models/JsonSchema.d.ts +42 -0
  65. package/dist/runtime/api/models/JsonSchema.mjs +31 -0
  66. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +55 -0
  67. package/dist/runtime/api/models/JsonSchemaDefinition.mjs +31 -0
  68. package/dist/runtime/api/models/Login.d.ts +33 -0
  69. package/dist/runtime/api/models/Login.mjs +24 -0
  70. package/dist/runtime/api/models/LoginResult.d.ts +40 -0
  71. package/dist/runtime/api/models/LoginResult.mjs +30 -0
  72. package/dist/runtime/api/models/Measurement.d.ts +33 -0
  73. package/dist/runtime/api/models/Measurement.mjs +24 -0
  74. package/dist/runtime/api/models/Metric.d.ts +52 -0
  75. package/dist/runtime/api/models/Metric.mjs +35 -0
  76. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +34 -0
  77. package/dist/runtime/api/models/MongoAggregateRequest.mjs +29 -0
  78. package/dist/runtime/api/models/MongoFindRequest.d.ts +45 -0
  79. package/dist/runtime/api/models/MongoFindRequest.mjs +26 -0
  80. package/dist/runtime/api/models/MongoIndex.d.ts +99 -0
  81. package/dist/runtime/api/models/MongoIndex.mjs +45 -0
  82. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +27 -0
  83. package/dist/runtime/api/models/PasswordUpdateRequest.mjs +22 -0
  84. package/dist/runtime/api/models/PipelineStage.d.ts +33 -0
  85. package/dist/runtime/api/models/PipelineStage.mjs +24 -0
  86. package/dist/runtime/api/models/Role.d.ts +40 -0
  87. package/dist/runtime/api/models/Role.mjs +31 -0
  88. package/dist/runtime/api/models/SchemaAnalysis.d.ts +46 -0
  89. package/dist/runtime/api/models/SchemaAnalysis.mjs +33 -0
  90. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +58 -0
  91. package/dist/runtime/api/models/SchemaAnalysisField.mjs +37 -0
  92. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +39 -0
  93. package/dist/runtime/api/models/SchemaAnalysisFieldType.mjs +26 -0
  94. package/dist/runtime/api/models/SettingsResponse.d.ts +47 -0
  95. package/dist/runtime/api/models/SettingsResponse.mjs +29 -0
  96. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +35 -0
  97. package/dist/runtime/api/models/UpdateFileInformationRequest.mjs +25 -0
  98. package/dist/runtime/api/models/UpdateRequest.d.ts +37 -0
  99. package/dist/runtime/api/models/UpdateRequest.mjs +24 -0
  100. package/dist/runtime/api/models/UpdateResponse.d.ts +45 -0
  101. package/dist/runtime/api/models/UpdateResponse.mjs +29 -0
  102. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +34 -0
  103. package/dist/runtime/api/models/UpdateRoleRequest.mjs +29 -0
  104. package/dist/runtime/api/models/UserInformation.d.ts +45 -0
  105. package/dist/runtime/api/models/UserInformation.mjs +29 -0
  106. package/dist/runtime/api/models/UserProfile.d.ts +52 -0
  107. package/dist/runtime/api/models/UserProfile.mjs +35 -0
  108. package/dist/runtime/api/models/Version.d.ts +39 -0
  109. package/dist/runtime/api/models/Version.mjs +26 -0
  110. package/dist/runtime/api/models/index.d.ts +39 -0
  111. package/dist/runtime/api/models/index.mjs +39 -0
  112. package/dist/runtime/api/runtime.d.ts +140 -0
  113. package/dist/runtime/api/runtime.mjs +196 -0
  114. package/dist/runtime/composables/mongocampApi.d.ts +14 -0
  115. package/dist/runtime/composables/mongocampApi.mjs +45 -0
  116. package/dist/runtime/composables/mongocampAuth.d.ts +9 -0
  117. package/dist/runtime/composables/mongocampAuth.mjs +52 -0
  118. package/dist/runtime/composables/mongocampSearch.d.ts +6 -0
  119. package/dist/runtime/composables/mongocampSearch.mjs +12 -0
  120. package/dist/runtime/composables/mongocampToken.d.ts +1 -0
  121. package/dist/runtime/composables/mongocampToken.mjs +10 -0
  122. package/dist/runtime/composables/mongocampUrl.d.ts +1 -0
  123. package/dist/runtime/composables/mongocampUrl.mjs +5 -0
  124. package/dist/runtime/composables/mongocampUser.d.ts +3 -0
  125. package/dist/runtime/composables/mongocampUser.mjs +2 -0
  126. package/dist/runtime/plugin.d.ts +2 -0
  127. package/dist/runtime/plugin.mjs +6 -0
  128. package/dist/types.d.ts +10 -0
  129. package/package.json +37 -0
@@ -0,0 +1,34 @@
1
+ /**
2
+ * mongocamp-server
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.2.0
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 { Grant } from './Grant';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UpdateRoleRequest
17
+ */
18
+ export interface UpdateRoleRequest {
19
+ /**
20
+ *
21
+ * @type {boolean}
22
+ * @memberof UpdateRoleRequest
23
+ */
24
+ isAdmin: boolean;
25
+ /**
26
+ *
27
+ * @type {Array<Grant>}
28
+ * @memberof UpdateRoleRequest
29
+ */
30
+ collectionGrants?: Array<Grant>;
31
+ }
32
+ export declare function UpdateRoleRequestFromJSON(json: any): UpdateRoleRequest;
33
+ export declare function UpdateRoleRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateRoleRequest;
34
+ export declare function UpdateRoleRequestToJSON(value?: UpdateRoleRequest | null): any;
@@ -0,0 +1,29 @@
1
+ import { exists } from "../runtime.mjs";
2
+ import {
3
+ GrantFromJSON,
4
+ GrantToJSON
5
+ } from "./Grant";
6
+ export function UpdateRoleRequestFromJSON(json) {
7
+ return UpdateRoleRequestFromJSONTyped(json, false);
8
+ }
9
+ export function UpdateRoleRequestFromJSONTyped(json, ignoreDiscriminator) {
10
+ if (json === void 0 || json === null) {
11
+ return json;
12
+ }
13
+ return {
14
+ "isAdmin": json["isAdmin"],
15
+ "collectionGrants": !exists(json, "collectionGrants") ? void 0 : json["collectionGrants"].map(GrantFromJSON)
16
+ };
17
+ }
18
+ export function UpdateRoleRequestToJSON(value) {
19
+ if (value === void 0) {
20
+ return void 0;
21
+ }
22
+ if (value === null) {
23
+ return null;
24
+ }
25
+ return {
26
+ "isAdmin": value.isAdmin,
27
+ "collectionGrants": value.collectionGrants === void 0 ? void 0 : value.collectionGrants.map(GrantToJSON)
28
+ };
29
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * mongocamp-server
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.2.0
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
+ export declare function UserInformationFromJSON(json: any): UserInformation;
44
+ export declare function UserInformationFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserInformation;
45
+ export declare function UserInformationToJSON(value?: UserInformation | null): any;
@@ -0,0 +1,29 @@
1
+ import { exists } from "../runtime.mjs";
2
+ export function UserInformationFromJSON(json) {
3
+ return UserInformationFromJSONTyped(json, false);
4
+ }
5
+ export function UserInformationFromJSONTyped(json, ignoreDiscriminator) {
6
+ if (json === void 0 || json === null) {
7
+ return json;
8
+ }
9
+ return {
10
+ "userId": json["userId"],
11
+ "password": json["password"],
12
+ "apiKey": !exists(json, "apiKey") ? void 0 : json["apiKey"],
13
+ "roles": !exists(json, "roles") ? void 0 : json["roles"]
14
+ };
15
+ }
16
+ export function UserInformationToJSON(value) {
17
+ if (value === void 0) {
18
+ return void 0;
19
+ }
20
+ if (value === null) {
21
+ return null;
22
+ }
23
+ return {
24
+ "userId": value.userId,
25
+ "password": value.password,
26
+ "apiKey": value.apiKey,
27
+ "roles": value.roles
28
+ };
29
+ }
@@ -0,0 +1,52 @@
1
+ /**
2
+ * mongocamp-server
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.2.0
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 { 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
+ export declare function UserProfileFromJSON(json: any): UserProfile;
51
+ export declare function UserProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserProfile;
52
+ export declare function UserProfileToJSON(value?: UserProfile | null): any;
@@ -0,0 +1,35 @@
1
+ import { exists } from "../runtime.mjs";
2
+ import {
3
+ GrantFromJSON,
4
+ GrantToJSON
5
+ } from "./Grant";
6
+ export function UserProfileFromJSON(json) {
7
+ return UserProfileFromJSONTyped(json, false);
8
+ }
9
+ export function UserProfileFromJSONTyped(json, ignoreDiscriminator) {
10
+ if (json === void 0 || json === null) {
11
+ return json;
12
+ }
13
+ return {
14
+ "user": json["user"],
15
+ "isAdmin": json["isAdmin"],
16
+ "apiKey": !exists(json, "apiKey") ? void 0 : json["apiKey"],
17
+ "roles": !exists(json, "roles") ? void 0 : json["roles"],
18
+ "grants": !exists(json, "grants") ? void 0 : json["grants"].map(GrantFromJSON)
19
+ };
20
+ }
21
+ export function UserProfileToJSON(value) {
22
+ if (value === void 0) {
23
+ return void 0;
24
+ }
25
+ if (value === null) {
26
+ return null;
27
+ }
28
+ return {
29
+ "user": value.user,
30
+ "isAdmin": value.isAdmin,
31
+ "apiKey": value.apiKey,
32
+ "roles": value.roles,
33
+ "grants": value.grants === void 0 ? void 0 : value.grants.map(GrantToJSON)
34
+ };
35
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * mongocamp-server
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.2.0
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
+ export declare function VersionFromJSON(json: any): Version;
38
+ export declare function VersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Version;
39
+ export declare function VersionToJSON(value?: Version | null): any;
@@ -0,0 +1,26 @@
1
+ export function VersionFromJSON(json) {
2
+ return VersionFromJSONTyped(json, false);
3
+ }
4
+ export function VersionFromJSONTyped(json, ignoreDiscriminator) {
5
+ if (json === void 0 || json === null) {
6
+ return json;
7
+ }
8
+ return {
9
+ "name": json["name"],
10
+ "version": json["version"],
11
+ "builtAt": new Date(json["builtAt"])
12
+ };
13
+ }
14
+ export function VersionToJSON(value) {
15
+ if (value === void 0) {
16
+ return void 0;
17
+ }
18
+ if (value === null) {
19
+ return null;
20
+ }
21
+ return {
22
+ "name": value.name,
23
+ "version": value.version,
24
+ "builtAt": value.builtAt.toISOString()
25
+ };
26
+ }
@@ -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 './JsonResultBoolean';
16
+ export * from './JsonResultString';
17
+ export * from './JsonSchema';
18
+ export * from './JsonSchemaDefinition';
19
+ export * from './Login';
20
+ export * from './LoginResult';
21
+ export * from './Measurement';
22
+ export * from './Metric';
23
+ export * from './MongoAggregateRequest';
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 "./JsonResultBoolean.mjs";
16
+ export * from "./JsonResultString.mjs";
17
+ export * from "./JsonSchema.mjs";
18
+ export * from "./JsonSchemaDefinition.mjs";
19
+ export * from "./Login.mjs";
20
+ export * from "./LoginResult.mjs";
21
+ export * from "./Measurement.mjs";
22
+ export * from "./Metric.mjs";
23
+ export * from "./MongoAggregateRequest.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,140 @@
1
+ /**
2
+ * mongocamp-server
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.2.0
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
+ /**
14
+ * This is the base class for all generated API classes.
15
+ */
16
+ export declare class BaseAPI {
17
+ protected configuration: Configuration;
18
+ private middleware;
19
+ constructor(configuration?: Configuration);
20
+ withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
21
+ withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
22
+ withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
23
+ protected request(context: RequestOpts, initOverrides?: RequestInit): Promise<Response>;
24
+ private createFetchParams;
25
+ private fetchApi;
26
+ /**
27
+ * Create a shallow clone of `this` by constructing a new instance
28
+ * and then shallow cloning data members.
29
+ */
30
+ private clone;
31
+ }
32
+ export declare class RequiredError extends Error {
33
+ field: string;
34
+ name: "RequiredError";
35
+ constructor(field: string, msg?: string);
36
+ }
37
+ export declare const COLLECTION_FORMATS: {
38
+ csv: string;
39
+ ssv: string;
40
+ tsv: string;
41
+ pipes: string;
42
+ };
43
+ export declare type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
44
+ export interface ConfigurationParameters {
45
+ basePath?: string;
46
+ fetchApi?: FetchAPI;
47
+ middleware?: Middleware[];
48
+ queryParamsStringify?: (params: HTTPQuery) => string;
49
+ username?: string;
50
+ password?: string;
51
+ apiKey?: string | ((name: string) => string);
52
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
53
+ headers?: HTTPHeaders;
54
+ credentials?: RequestCredentials;
55
+ }
56
+ export declare class Configuration {
57
+ private configuration;
58
+ constructor(configuration?: ConfigurationParameters);
59
+ get basePath(): string;
60
+ get fetchApi(): FetchAPI | undefined;
61
+ get middleware(): Middleware[];
62
+ get queryParamsStringify(): (params: HTTPQuery) => string;
63
+ get username(): string | undefined;
64
+ get password(): string | undefined;
65
+ get apiKey(): ((name: string) => string) | undefined;
66
+ get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
67
+ get headers(): HTTPHeaders | undefined;
68
+ get credentials(): RequestCredentials | undefined;
69
+ }
70
+ export declare type Json = any;
71
+ export declare type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
72
+ export declare type HTTPHeaders = {
73
+ [key: string]: string;
74
+ };
75
+ export declare type HTTPQuery = {
76
+ [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | HTTPQuery;
77
+ };
78
+ export declare type HTTPBody = Json | FormData | URLSearchParams;
79
+ export declare type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
80
+ export interface FetchParams {
81
+ url: string;
82
+ init: RequestInit;
83
+ }
84
+ export interface RequestOpts {
85
+ path: string;
86
+ method: HTTPMethod;
87
+ headers: HTTPHeaders;
88
+ query?: HTTPQuery;
89
+ body?: HTTPBody;
90
+ }
91
+ export declare function exists(json: any, key: string): boolean;
92
+ export declare function querystring(params: HTTPQuery, prefix?: string): string;
93
+ export declare function mapValues(data: any, fn: (item: any) => any): {};
94
+ export declare function canConsumeForm(consumes: Consume[]): boolean;
95
+ export interface Consume {
96
+ contentType: string;
97
+ }
98
+ export interface RequestContext {
99
+ fetch: FetchAPI;
100
+ url: string;
101
+ init: RequestInit;
102
+ }
103
+ export interface ResponseContext {
104
+ fetch: FetchAPI;
105
+ url: string;
106
+ init: RequestInit;
107
+ response: Response;
108
+ }
109
+ export interface Middleware {
110
+ pre?(context: RequestContext): Promise<FetchParams | void>;
111
+ post?(context: ResponseContext): Promise<Response | void>;
112
+ }
113
+ export interface ApiResponse<T> {
114
+ raw: Response;
115
+ value(): Promise<T>;
116
+ }
117
+ export interface ResponseTransformer<T> {
118
+ (json: any): T;
119
+ }
120
+ export declare class JSONApiResponse<T> {
121
+ raw: Response;
122
+ private transformer;
123
+ constructor(raw: Response, transformer?: ResponseTransformer<T>);
124
+ value(): Promise<T>;
125
+ }
126
+ export declare class VoidApiResponse {
127
+ raw: Response;
128
+ constructor(raw: Response);
129
+ value(): Promise<void>;
130
+ }
131
+ export declare class BlobApiResponse {
132
+ raw: Response;
133
+ constructor(raw: Response);
134
+ value(): Promise<Blob>;
135
+ }
136
+ export declare class TextApiResponse {
137
+ raw: Response;
138
+ constructor(raw: Response);
139
+ value(): Promise<string>;
140
+ }