@openfilz-sdk/typescript-ee 1.3.5 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +32 -6
- package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
- package/README.md +36 -7
- package/api/{audit-controller-api.ts → collaboration-audit-controller-api.ts} +42 -42
- package/api/delegated-browse-grants-admin-api.ts +452 -0
- package/api/delegated-browse-grants-end-user-api.ts +426 -0
- package/api/upload-token-controller-api.ts +219 -0
- package/api/user-privacy-api.ts +196 -0
- package/api/webhook-proxy-controller-api.ts +523 -0
- package/api.ts +6 -1
- package/dist/api/{audit-controller-api.d.ts → collaboration-audit-controller-api.d.ts} +35 -35
- package/dist/api/{audit-controller-api.js → collaboration-audit-controller-api.js} +41 -41
- package/dist/api/delegated-browse-grants-admin-api.d.ts +215 -0
- package/dist/api/delegated-browse-grants-admin-api.js +434 -0
- package/dist/api/delegated-browse-grants-end-user-api.d.ts +204 -0
- package/dist/api/delegated-browse-grants-end-user-api.js +416 -0
- package/dist/api/upload-token-controller-api.d.ts +105 -0
- package/dist/api/upload-token-controller-api.js +214 -0
- package/dist/api/user-privacy-api.d.ts +96 -0
- package/dist/api/user-privacy-api.js +195 -0
- package/dist/api/webhook-proxy-controller-api.d.ts +230 -0
- package/dist/api/webhook-proxy-controller-api.js +511 -0
- package/dist/api.d.ts +6 -1
- package/dist/api.js +6 -1
- package/dist/esm/api/{audit-controller-api.d.ts → collaboration-audit-controller-api.d.ts} +35 -35
- package/dist/esm/api/{audit-controller-api.js → collaboration-audit-controller-api.js} +36 -36
- package/dist/esm/api/delegated-browse-grants-admin-api.d.ts +215 -0
- package/dist/esm/api/delegated-browse-grants-admin-api.js +427 -0
- package/dist/esm/api/delegated-browse-grants-end-user-api.d.ts +204 -0
- package/dist/esm/api/delegated-browse-grants-end-user-api.js +409 -0
- package/dist/esm/api/upload-token-controller-api.d.ts +105 -0
- package/dist/esm/api/upload-token-controller-api.js +207 -0
- package/dist/esm/api/user-privacy-api.d.ts +96 -0
- package/dist/esm/api/user-privacy-api.js +188 -0
- package/dist/esm/api/webhook-proxy-controller-api.d.ts +230 -0
- package/dist/esm/api/webhook-proxy-controller-api.js +504 -0
- package/dist/esm/api.d.ts +6 -1
- package/dist/esm/api.js +6 -1
- package/dist/esm/models/consume-delegated-grant-request.d.ts +15 -0
- package/dist/esm/models/create-delegated-grant-request.d.ts +21 -0
- package/dist/esm/models/create-delegated-grant-request.js +16 -0
- package/dist/esm/models/delegated-folder-node.d.ts +16 -0
- package/dist/esm/models/delegated-folder-node.js +14 -0
- package/dist/esm/models/delegated-grant-dto.d.ts +43 -0
- package/dist/esm/models/delegated-grant-dto.js +24 -0
- package/dist/esm/models/{audit-log-details-one-of.d.ts → enriched-audit-log-details.d.ts} +2 -2
- package/dist/esm/models/enriched-audit-log-details.js +14 -0
- package/dist/esm/models/{audit-log.d.ts → enriched-audit-log.d.ts} +27 -16
- package/dist/{models/audit-log.js → esm/models/enriched-audit-log.js} +17 -11
- package/dist/esm/models/index.d.ts +10 -2
- package/dist/esm/models/index.js +10 -2
- package/dist/esm/models/mint-upload-token-request.d.ts +17 -0
- package/dist/esm/models/mint-upload-token-request.js +14 -0
- package/dist/esm/models/notification-dto.d.ts +3 -0
- package/dist/esm/models/notification-dto.js +4 -1
- package/dist/esm/models/search-by-audit-log-request.d.ts +15 -6
- package/dist/esm/models/search-by-audit-log-request.js +15 -6
- package/dist/esm/models/update-user-privacy-request.d.ts +14 -0
- package/dist/esm/models/update-user-privacy-request.js +14 -0
- package/dist/esm/models/upload-token-response.d.ts +18 -0
- package/dist/esm/models/upload-token-response.js +14 -0
- package/dist/esm/models/user-privacy-dto.d.ts +14 -0
- package/dist/esm/models/user-privacy-dto.js +14 -0
- package/dist/models/consume-delegated-grant-request.d.ts +15 -0
- package/dist/models/create-delegated-grant-request.d.ts +21 -0
- package/dist/models/create-delegated-grant-request.js +19 -0
- package/dist/models/delegated-folder-node.d.ts +16 -0
- package/dist/models/delegated-folder-node.js +15 -0
- package/dist/models/delegated-grant-dto.d.ts +43 -0
- package/dist/models/delegated-grant-dto.js +27 -0
- package/dist/models/{audit-log-details-one-of.d.ts → enriched-audit-log-details.d.ts} +2 -2
- package/dist/models/enriched-audit-log-details.js +15 -0
- package/dist/models/{audit-log.d.ts → enriched-audit-log.d.ts} +27 -16
- package/dist/{esm/models/audit-log.js → models/enriched-audit-log.js} +20 -8
- package/dist/models/index.d.ts +10 -2
- package/dist/models/index.js +10 -2
- package/dist/models/mint-upload-token-request.d.ts +17 -0
- package/dist/models/mint-upload-token-request.js +15 -0
- package/dist/models/notification-dto.d.ts +3 -0
- package/dist/models/notification-dto.js +4 -1
- package/dist/models/search-by-audit-log-request.d.ts +15 -6
- package/dist/models/search-by-audit-log-request.js +15 -6
- package/dist/models/update-user-privacy-request.d.ts +14 -0
- package/dist/models/update-user-privacy-request.js +15 -0
- package/dist/models/upload-token-response.d.ts +18 -0
- package/dist/models/upload-token-response.js +15 -0
- package/dist/models/user-privacy-dto.d.ts +14 -0
- package/dist/models/user-privacy-dto.js +15 -0
- package/docs/{AuditControllerApi.md → CollaborationAuditControllerApi.md} +16 -16
- package/docs/ConsumeDelegatedGrantRequest.md +22 -0
- package/docs/CreateDelegatedGrantRequest.md +26 -0
- package/docs/DelegatedBrowseGrantsAdminApi.md +275 -0
- package/docs/DelegatedBrowseGrantsEndUserApi.md +266 -0
- package/docs/DelegatedFolderNode.md +24 -0
- package/docs/DelegatedGrantDTO.md +52 -0
- package/docs/{AuditLog.md → EnrichedAuditLog.md} +9 -5
- package/docs/{AuditLogDetailsOneOf.md → EnrichedAuditLogDetails.md} +3 -3
- package/docs/MintUploadTokenRequest.md +26 -0
- package/docs/UpdateUserPrivacyRequest.md +20 -0
- package/docs/UploadTokenControllerApi.md +115 -0
- package/docs/UploadTokenResponse.md +28 -0
- package/docs/UserPrivacyApi.md +104 -0
- package/docs/UserPrivacyDTO.md +20 -0
- package/docs/WebhookProxyControllerApi.md +364 -0
- package/models/consume-delegated-grant-request.ts +21 -0
- package/models/create-delegated-grant-request.ts +30 -0
- package/models/delegated-folder-node.ts +22 -0
- package/models/delegated-grant-dto.ts +53 -0
- package/models/{audit-log-details-one-of.ts → enriched-audit-log-details.ts} +2 -20
- package/models/{audit-log.ts → enriched-audit-log.ts} +27 -16
- package/models/index.ts +10 -2
- package/models/mint-upload-token-request.ts +23 -0
- package/models/notification-dto.ts +4 -1
- package/models/search-by-audit-log-request.ts +15 -6
- package/models/update-user-privacy-request.ts +20 -0
- package/models/upload-token-response.ts +24 -0
- package/models/user-privacy-dto.ts +20 -0
- package/package.json +1 -1
- /package/dist/esm/models/{audit-log-details-one-of.js → consume-delegated-grant-request.js} +0 -0
- /package/dist/models/{audit-log-details-one-of.js → consume-delegated-grant-request.js} +0 -0
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* openfilz-api
|
|
5
|
+
* API for Document Management System
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from '../configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
import type { DelegatedGrantDTO } from '../models';
|
|
26
|
+
/**
|
|
27
|
+
* DelegatedBrowseGrantsEndUserApi - axios parameter creator
|
|
28
|
+
*/
|
|
29
|
+
export const DelegatedBrowseGrantsEndUserApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
30
|
+
return {
|
|
31
|
+
/**
|
|
32
|
+
* Flip PENDING → ACCEPTED. Admin may then browse my folders for the next 2 hours. Client MUST force a step-up (prompt=login) before calling this — a valid session alone is NOT enough security to approve cross-user browsing.
|
|
33
|
+
* @summary Approve a pending grant
|
|
34
|
+
* @param {string} id
|
|
35
|
+
* @param {*} [options] Override http request option.
|
|
36
|
+
* @throws {RequiredError}
|
|
37
|
+
*/
|
|
38
|
+
accept: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
39
|
+
// verify required parameter 'id' is not null or undefined
|
|
40
|
+
assertParamExists('accept', 'id', id)
|
|
41
|
+
const localVarPath = `/api/v1/users/me/delegated/grants/{id}/accept`
|
|
42
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
43
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
45
|
+
let baseOptions;
|
|
46
|
+
if (configuration) {
|
|
47
|
+
baseOptions = configuration.baseOptions;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
51
|
+
const localVarHeaderParameter = {} as any;
|
|
52
|
+
const localVarQueryParameter = {} as any;
|
|
53
|
+
|
|
54
|
+
// authentication keycloak_auth required
|
|
55
|
+
// http bearer authentication required
|
|
56
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
57
|
+
|
|
58
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
59
|
+
|
|
60
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
61
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
62
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
url: toPathString(localVarUrlObj),
|
|
66
|
+
options: localVarRequestOptions,
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @summary Refuse a pending grant
|
|
72
|
+
* @param {string} id
|
|
73
|
+
* @param {*} [options] Override http request option.
|
|
74
|
+
* @throws {RequiredError}
|
|
75
|
+
*/
|
|
76
|
+
decline: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
77
|
+
// verify required parameter 'id' is not null or undefined
|
|
78
|
+
assertParamExists('decline', 'id', id)
|
|
79
|
+
const localVarPath = `/api/v1/users/me/delegated/grants/{id}/decline`
|
|
80
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
81
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
82
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
83
|
+
let baseOptions;
|
|
84
|
+
if (configuration) {
|
|
85
|
+
baseOptions = configuration.baseOptions;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
89
|
+
const localVarHeaderParameter = {} as any;
|
|
90
|
+
const localVarQueryParameter = {} as any;
|
|
91
|
+
|
|
92
|
+
// authentication keycloak_auth required
|
|
93
|
+
// http bearer authentication required
|
|
94
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
95
|
+
|
|
96
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
97
|
+
|
|
98
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
99
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
100
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
url: toPathString(localVarUrlObj),
|
|
104
|
+
options: localVarRequestOptions,
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* Grantor-only consent withdrawal. Requires status = CONSUMED. Deletes the linked webhook subscription via webhooks-api; the grant row stays CONSUMED with consumedSubscriptionId preserved as an audit pointer. 409 if the grant is not CONSUMED or has no linked subscription id.
|
|
109
|
+
* @summary Disable the webhook created from this grant
|
|
110
|
+
* @param {string} id
|
|
111
|
+
* @param {*} [options] Override http request option.
|
|
112
|
+
* @throws {RequiredError}
|
|
113
|
+
*/
|
|
114
|
+
disableLinkedWebhook: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
115
|
+
// verify required parameter 'id' is not null or undefined
|
|
116
|
+
assertParamExists('disableLinkedWebhook', 'id', id)
|
|
117
|
+
const localVarPath = `/api/v1/users/me/delegated/grants/{id}/disable-webhook`
|
|
118
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
119
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
120
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
121
|
+
let baseOptions;
|
|
122
|
+
if (configuration) {
|
|
123
|
+
baseOptions = configuration.baseOptions;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
127
|
+
const localVarHeaderParameter = {} as any;
|
|
128
|
+
const localVarQueryParameter = {} as any;
|
|
129
|
+
|
|
130
|
+
// authentication keycloak_auth required
|
|
131
|
+
// http bearer authentication required
|
|
132
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
133
|
+
|
|
134
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
135
|
+
|
|
136
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
137
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
138
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
139
|
+
|
|
140
|
+
return {
|
|
141
|
+
url: toPathString(localVarUrlObj),
|
|
142
|
+
options: localVarRequestOptions,
|
|
143
|
+
};
|
|
144
|
+
},
|
|
145
|
+
/**
|
|
146
|
+
* Optionally filter by ?status=PENDING|ACCEPTED|...
|
|
147
|
+
* @summary List grants addressed to me
|
|
148
|
+
* @param {ListIncomingStatusEnum} [status]
|
|
149
|
+
* @param {*} [options] Override http request option.
|
|
150
|
+
* @throws {RequiredError}
|
|
151
|
+
*/
|
|
152
|
+
listIncoming: async (status?: ListIncomingStatusEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
153
|
+
const localVarPath = `/api/v1/users/me/delegated/grants`;
|
|
154
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
155
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
156
|
+
let baseOptions;
|
|
157
|
+
if (configuration) {
|
|
158
|
+
baseOptions = configuration.baseOptions;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
162
|
+
const localVarHeaderParameter = {} as any;
|
|
163
|
+
const localVarQueryParameter = {} as any;
|
|
164
|
+
|
|
165
|
+
// authentication keycloak_auth required
|
|
166
|
+
// http bearer authentication required
|
|
167
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
168
|
+
|
|
169
|
+
if (status !== undefined) {
|
|
170
|
+
localVarQueryParameter['status'] = status;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
174
|
+
|
|
175
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
176
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
177
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
178
|
+
|
|
179
|
+
return {
|
|
180
|
+
url: toPathString(localVarUrlObj),
|
|
181
|
+
options: localVarRequestOptions,
|
|
182
|
+
};
|
|
183
|
+
},
|
|
184
|
+
/**
|
|
185
|
+
* Flip ACCEPTED → REVOKED. Immediate — any in-flight admin browse becomes 410 on its next call.
|
|
186
|
+
* @summary Revoke an accepted grant
|
|
187
|
+
* @param {string} id
|
|
188
|
+
* @param {*} [options] Override http request option.
|
|
189
|
+
* @throws {RequiredError}
|
|
190
|
+
*/
|
|
191
|
+
revoke: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
192
|
+
// verify required parameter 'id' is not null or undefined
|
|
193
|
+
assertParamExists('revoke', 'id', id)
|
|
194
|
+
const localVarPath = `/api/v1/users/me/delegated/grants/{id}/revoke`
|
|
195
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
196
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
197
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
198
|
+
let baseOptions;
|
|
199
|
+
if (configuration) {
|
|
200
|
+
baseOptions = configuration.baseOptions;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
204
|
+
const localVarHeaderParameter = {} as any;
|
|
205
|
+
const localVarQueryParameter = {} as any;
|
|
206
|
+
|
|
207
|
+
// authentication keycloak_auth required
|
|
208
|
+
// http bearer authentication required
|
|
209
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
210
|
+
|
|
211
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
212
|
+
|
|
213
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
214
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
215
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
216
|
+
|
|
217
|
+
return {
|
|
218
|
+
url: toPathString(localVarUrlObj),
|
|
219
|
+
options: localVarRequestOptions,
|
|
220
|
+
};
|
|
221
|
+
},
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* DelegatedBrowseGrantsEndUserApi - functional programming interface
|
|
227
|
+
*/
|
|
228
|
+
export const DelegatedBrowseGrantsEndUserApiFp = function(configuration?: Configuration) {
|
|
229
|
+
const localVarAxiosParamCreator = DelegatedBrowseGrantsEndUserApiAxiosParamCreator(configuration)
|
|
230
|
+
return {
|
|
231
|
+
/**
|
|
232
|
+
* Flip PENDING → ACCEPTED. Admin may then browse my folders for the next 2 hours. Client MUST force a step-up (prompt=login) before calling this — a valid session alone is NOT enough security to approve cross-user browsing.
|
|
233
|
+
* @summary Approve a pending grant
|
|
234
|
+
* @param {string} id
|
|
235
|
+
* @param {*} [options] Override http request option.
|
|
236
|
+
* @throws {RequiredError}
|
|
237
|
+
*/
|
|
238
|
+
async accept(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DelegatedGrantDTO>> {
|
|
239
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.accept(id, options);
|
|
240
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
241
|
+
const localVarOperationServerBasePath = operationServerMap['DelegatedBrowseGrantsEndUserApi.accept']?.[localVarOperationServerIndex]?.url;
|
|
242
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
243
|
+
},
|
|
244
|
+
/**
|
|
245
|
+
*
|
|
246
|
+
* @summary Refuse a pending grant
|
|
247
|
+
* @param {string} id
|
|
248
|
+
* @param {*} [options] Override http request option.
|
|
249
|
+
* @throws {RequiredError}
|
|
250
|
+
*/
|
|
251
|
+
async decline(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DelegatedGrantDTO>> {
|
|
252
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.decline(id, options);
|
|
253
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
254
|
+
const localVarOperationServerBasePath = operationServerMap['DelegatedBrowseGrantsEndUserApi.decline']?.[localVarOperationServerIndex]?.url;
|
|
255
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
256
|
+
},
|
|
257
|
+
/**
|
|
258
|
+
* Grantor-only consent withdrawal. Requires status = CONSUMED. Deletes the linked webhook subscription via webhooks-api; the grant row stays CONSUMED with consumedSubscriptionId preserved as an audit pointer. 409 if the grant is not CONSUMED or has no linked subscription id.
|
|
259
|
+
* @summary Disable the webhook created from this grant
|
|
260
|
+
* @param {string} id
|
|
261
|
+
* @param {*} [options] Override http request option.
|
|
262
|
+
* @throws {RequiredError}
|
|
263
|
+
*/
|
|
264
|
+
async disableLinkedWebhook(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DelegatedGrantDTO>> {
|
|
265
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.disableLinkedWebhook(id, options);
|
|
266
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
267
|
+
const localVarOperationServerBasePath = operationServerMap['DelegatedBrowseGrantsEndUserApi.disableLinkedWebhook']?.[localVarOperationServerIndex]?.url;
|
|
268
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
269
|
+
},
|
|
270
|
+
/**
|
|
271
|
+
* Optionally filter by ?status=PENDING|ACCEPTED|...
|
|
272
|
+
* @summary List grants addressed to me
|
|
273
|
+
* @param {ListIncomingStatusEnum} [status]
|
|
274
|
+
* @param {*} [options] Override http request option.
|
|
275
|
+
* @throws {RequiredError}
|
|
276
|
+
*/
|
|
277
|
+
async listIncoming(status?: ListIncomingStatusEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DelegatedGrantDTO>>> {
|
|
278
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listIncoming(status, options);
|
|
279
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
280
|
+
const localVarOperationServerBasePath = operationServerMap['DelegatedBrowseGrantsEndUserApi.listIncoming']?.[localVarOperationServerIndex]?.url;
|
|
281
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
282
|
+
},
|
|
283
|
+
/**
|
|
284
|
+
* Flip ACCEPTED → REVOKED. Immediate — any in-flight admin browse becomes 410 on its next call.
|
|
285
|
+
* @summary Revoke an accepted grant
|
|
286
|
+
* @param {string} id
|
|
287
|
+
* @param {*} [options] Override http request option.
|
|
288
|
+
* @throws {RequiredError}
|
|
289
|
+
*/
|
|
290
|
+
async revoke(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DelegatedGrantDTO>> {
|
|
291
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.revoke(id, options);
|
|
292
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
293
|
+
const localVarOperationServerBasePath = operationServerMap['DelegatedBrowseGrantsEndUserApi.revoke']?.[localVarOperationServerIndex]?.url;
|
|
294
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
295
|
+
},
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* DelegatedBrowseGrantsEndUserApi - factory interface
|
|
301
|
+
*/
|
|
302
|
+
export const DelegatedBrowseGrantsEndUserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
303
|
+
const localVarFp = DelegatedBrowseGrantsEndUserApiFp(configuration)
|
|
304
|
+
return {
|
|
305
|
+
/**
|
|
306
|
+
* Flip PENDING → ACCEPTED. Admin may then browse my folders for the next 2 hours. Client MUST force a step-up (prompt=login) before calling this — a valid session alone is NOT enough security to approve cross-user browsing.
|
|
307
|
+
* @summary Approve a pending grant
|
|
308
|
+
* @param {string} id
|
|
309
|
+
* @param {*} [options] Override http request option.
|
|
310
|
+
* @throws {RequiredError}
|
|
311
|
+
*/
|
|
312
|
+
accept(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DelegatedGrantDTO> {
|
|
313
|
+
return localVarFp.accept(id, options).then((request) => request(axios, basePath));
|
|
314
|
+
},
|
|
315
|
+
/**
|
|
316
|
+
*
|
|
317
|
+
* @summary Refuse a pending grant
|
|
318
|
+
* @param {string} id
|
|
319
|
+
* @param {*} [options] Override http request option.
|
|
320
|
+
* @throws {RequiredError}
|
|
321
|
+
*/
|
|
322
|
+
decline(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DelegatedGrantDTO> {
|
|
323
|
+
return localVarFp.decline(id, options).then((request) => request(axios, basePath));
|
|
324
|
+
},
|
|
325
|
+
/**
|
|
326
|
+
* Grantor-only consent withdrawal. Requires status = CONSUMED. Deletes the linked webhook subscription via webhooks-api; the grant row stays CONSUMED with consumedSubscriptionId preserved as an audit pointer. 409 if the grant is not CONSUMED or has no linked subscription id.
|
|
327
|
+
* @summary Disable the webhook created from this grant
|
|
328
|
+
* @param {string} id
|
|
329
|
+
* @param {*} [options] Override http request option.
|
|
330
|
+
* @throws {RequiredError}
|
|
331
|
+
*/
|
|
332
|
+
disableLinkedWebhook(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DelegatedGrantDTO> {
|
|
333
|
+
return localVarFp.disableLinkedWebhook(id, options).then((request) => request(axios, basePath));
|
|
334
|
+
},
|
|
335
|
+
/**
|
|
336
|
+
* Optionally filter by ?status=PENDING|ACCEPTED|...
|
|
337
|
+
* @summary List grants addressed to me
|
|
338
|
+
* @param {ListIncomingStatusEnum} [status]
|
|
339
|
+
* @param {*} [options] Override http request option.
|
|
340
|
+
* @throws {RequiredError}
|
|
341
|
+
*/
|
|
342
|
+
listIncoming(status?: ListIncomingStatusEnum, options?: RawAxiosRequestConfig): AxiosPromise<Array<DelegatedGrantDTO>> {
|
|
343
|
+
return localVarFp.listIncoming(status, options).then((request) => request(axios, basePath));
|
|
344
|
+
},
|
|
345
|
+
/**
|
|
346
|
+
* Flip ACCEPTED → REVOKED. Immediate — any in-flight admin browse becomes 410 on its next call.
|
|
347
|
+
* @summary Revoke an accepted grant
|
|
348
|
+
* @param {string} id
|
|
349
|
+
* @param {*} [options] Override http request option.
|
|
350
|
+
* @throws {RequiredError}
|
|
351
|
+
*/
|
|
352
|
+
revoke(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DelegatedGrantDTO> {
|
|
353
|
+
return localVarFp.revoke(id, options).then((request) => request(axios, basePath));
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* DelegatedBrowseGrantsEndUserApi - object-oriented interface
|
|
360
|
+
*/
|
|
361
|
+
export class DelegatedBrowseGrantsEndUserApi extends BaseAPI {
|
|
362
|
+
/**
|
|
363
|
+
* Flip PENDING → ACCEPTED. Admin may then browse my folders for the next 2 hours. Client MUST force a step-up (prompt=login) before calling this — a valid session alone is NOT enough security to approve cross-user browsing.
|
|
364
|
+
* @summary Approve a pending grant
|
|
365
|
+
* @param {string} id
|
|
366
|
+
* @param {*} [options] Override http request option.
|
|
367
|
+
* @throws {RequiredError}
|
|
368
|
+
*/
|
|
369
|
+
public accept(id: string, options?: RawAxiosRequestConfig) {
|
|
370
|
+
return DelegatedBrowseGrantsEndUserApiFp(this.configuration).accept(id, options).then((request) => request(this.axios, this.basePath));
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
*
|
|
375
|
+
* @summary Refuse a pending grant
|
|
376
|
+
* @param {string} id
|
|
377
|
+
* @param {*} [options] Override http request option.
|
|
378
|
+
* @throws {RequiredError}
|
|
379
|
+
*/
|
|
380
|
+
public decline(id: string, options?: RawAxiosRequestConfig) {
|
|
381
|
+
return DelegatedBrowseGrantsEndUserApiFp(this.configuration).decline(id, options).then((request) => request(this.axios, this.basePath));
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Grantor-only consent withdrawal. Requires status = CONSUMED. Deletes the linked webhook subscription via webhooks-api; the grant row stays CONSUMED with consumedSubscriptionId preserved as an audit pointer. 409 if the grant is not CONSUMED or has no linked subscription id.
|
|
386
|
+
* @summary Disable the webhook created from this grant
|
|
387
|
+
* @param {string} id
|
|
388
|
+
* @param {*} [options] Override http request option.
|
|
389
|
+
* @throws {RequiredError}
|
|
390
|
+
*/
|
|
391
|
+
public disableLinkedWebhook(id: string, options?: RawAxiosRequestConfig) {
|
|
392
|
+
return DelegatedBrowseGrantsEndUserApiFp(this.configuration).disableLinkedWebhook(id, options).then((request) => request(this.axios, this.basePath));
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Optionally filter by ?status=PENDING|ACCEPTED|...
|
|
397
|
+
* @summary List grants addressed to me
|
|
398
|
+
* @param {ListIncomingStatusEnum} [status]
|
|
399
|
+
* @param {*} [options] Override http request option.
|
|
400
|
+
* @throws {RequiredError}
|
|
401
|
+
*/
|
|
402
|
+
public listIncoming(status?: ListIncomingStatusEnum, options?: RawAxiosRequestConfig) {
|
|
403
|
+
return DelegatedBrowseGrantsEndUserApiFp(this.configuration).listIncoming(status, options).then((request) => request(this.axios, this.basePath));
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Flip ACCEPTED → REVOKED. Immediate — any in-flight admin browse becomes 410 on its next call.
|
|
408
|
+
* @summary Revoke an accepted grant
|
|
409
|
+
* @param {string} id
|
|
410
|
+
* @param {*} [options] Override http request option.
|
|
411
|
+
* @throws {RequiredError}
|
|
412
|
+
*/
|
|
413
|
+
public revoke(id: string, options?: RawAxiosRequestConfig) {
|
|
414
|
+
return DelegatedBrowseGrantsEndUserApiFp(this.configuration).revoke(id, options).then((request) => request(this.axios, this.basePath));
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export const ListIncomingStatusEnum = {
|
|
419
|
+
Pending: 'PENDING',
|
|
420
|
+
Accepted: 'ACCEPTED',
|
|
421
|
+
Declined: 'DECLINED',
|
|
422
|
+
Revoked: 'REVOKED',
|
|
423
|
+
Expired: 'EXPIRED',
|
|
424
|
+
Consumed: 'CONSUMED'
|
|
425
|
+
} as const;
|
|
426
|
+
export type ListIncomingStatusEnum = typeof ListIncomingStatusEnum[keyof typeof ListIncomingStatusEnum];
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* openfilz-api
|
|
5
|
+
* API for Document Management System
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from '../configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
import type { MintUploadTokenRequest } from '../models';
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import type { UploadResponse } from '../models';
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import type { UploadTokenResponse } from '../models';
|
|
30
|
+
/**
|
|
31
|
+
* UploadTokenControllerApi - axios parameter creator
|
|
32
|
+
*/
|
|
33
|
+
export const UploadTokenControllerApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
34
|
+
return {
|
|
35
|
+
/**
|
|
36
|
+
* Issues a one-shot HS256 JWT scoped to a single upload into a single folder. Caller must hold the UPLOAD_TOKEN_ISSUER realm role.
|
|
37
|
+
* @summary Mint a scoped upload token
|
|
38
|
+
* @param {MintUploadTokenRequest} mintUploadTokenRequest
|
|
39
|
+
* @param {*} [options] Override http request option.
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
*/
|
|
42
|
+
mintUploadToken: async (mintUploadTokenRequest: MintUploadTokenRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
43
|
+
// verify required parameter 'mintUploadTokenRequest' is not null or undefined
|
|
44
|
+
assertParamExists('mintUploadToken', 'mintUploadTokenRequest', mintUploadTokenRequest)
|
|
45
|
+
const localVarPath = `/api/v1/upload-tokens`;
|
|
46
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
47
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
48
|
+
let baseOptions;
|
|
49
|
+
if (configuration) {
|
|
50
|
+
baseOptions = configuration.baseOptions;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
54
|
+
const localVarHeaderParameter = {} as any;
|
|
55
|
+
const localVarQueryParameter = {} as any;
|
|
56
|
+
|
|
57
|
+
// authentication keycloak_auth required
|
|
58
|
+
// http bearer authentication required
|
|
59
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
60
|
+
|
|
61
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
62
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
63
|
+
|
|
64
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
65
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
66
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
67
|
+
localVarRequestOptions.data = serializeDataIfNeeded(mintUploadTokenRequest, localVarRequestOptions, configuration)
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
url: toPathString(localVarUrlObj),
|
|
71
|
+
options: localVarRequestOptions,
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* Anonymous-callable endpoint authenticated by the scoped JWT minted via POST /api/v1/upload-tokens. Forces the target folder to the one baked into the token. One-shot — replays return 401.
|
|
76
|
+
* @summary Upload a single document with a scoped upload token
|
|
77
|
+
* @param {File} file
|
|
78
|
+
* @param {string} [metadata]
|
|
79
|
+
* @param {*} [options] Override http request option.
|
|
80
|
+
* @throws {RequiredError}
|
|
81
|
+
*/
|
|
82
|
+
uploadWithToken: async (file: File, metadata?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
83
|
+
// verify required parameter 'file' is not null or undefined
|
|
84
|
+
assertParamExists('uploadWithToken', 'file', file)
|
|
85
|
+
const localVarPath = `/api/v1/upload-tokens/upload`;
|
|
86
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
87
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
88
|
+
let baseOptions;
|
|
89
|
+
if (configuration) {
|
|
90
|
+
baseOptions = configuration.baseOptions;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
94
|
+
const localVarHeaderParameter = {} as any;
|
|
95
|
+
const localVarQueryParameter = {} as any;
|
|
96
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
97
|
+
|
|
98
|
+
// authentication keycloak_auth required
|
|
99
|
+
// http bearer authentication required
|
|
100
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
if (file !== undefined) {
|
|
104
|
+
localVarFormParams.append('file', file as any);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (metadata !== undefined) {
|
|
108
|
+
localVarFormParams.append('metadata', metadata as any);
|
|
109
|
+
}
|
|
110
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
111
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
112
|
+
|
|
113
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
114
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
115
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
116
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
url: toPathString(localVarUrlObj),
|
|
120
|
+
options: localVarRequestOptions,
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* UploadTokenControllerApi - functional programming interface
|
|
128
|
+
*/
|
|
129
|
+
export const UploadTokenControllerApiFp = function(configuration?: Configuration) {
|
|
130
|
+
const localVarAxiosParamCreator = UploadTokenControllerApiAxiosParamCreator(configuration)
|
|
131
|
+
return {
|
|
132
|
+
/**
|
|
133
|
+
* Issues a one-shot HS256 JWT scoped to a single upload into a single folder. Caller must hold the UPLOAD_TOKEN_ISSUER realm role.
|
|
134
|
+
* @summary Mint a scoped upload token
|
|
135
|
+
* @param {MintUploadTokenRequest} mintUploadTokenRequest
|
|
136
|
+
* @param {*} [options] Override http request option.
|
|
137
|
+
* @throws {RequiredError}
|
|
138
|
+
*/
|
|
139
|
+
async mintUploadToken(mintUploadTokenRequest: MintUploadTokenRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadTokenResponse>> {
|
|
140
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.mintUploadToken(mintUploadTokenRequest, options);
|
|
141
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
142
|
+
const localVarOperationServerBasePath = operationServerMap['UploadTokenControllerApi.mintUploadToken']?.[localVarOperationServerIndex]?.url;
|
|
143
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
144
|
+
},
|
|
145
|
+
/**
|
|
146
|
+
* Anonymous-callable endpoint authenticated by the scoped JWT minted via POST /api/v1/upload-tokens. Forces the target folder to the one baked into the token. One-shot — replays return 401.
|
|
147
|
+
* @summary Upload a single document with a scoped upload token
|
|
148
|
+
* @param {File} file
|
|
149
|
+
* @param {string} [metadata]
|
|
150
|
+
* @param {*} [options] Override http request option.
|
|
151
|
+
* @throws {RequiredError}
|
|
152
|
+
*/
|
|
153
|
+
async uploadWithToken(file: File, metadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadResponse>> {
|
|
154
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadWithToken(file, metadata, options);
|
|
155
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
156
|
+
const localVarOperationServerBasePath = operationServerMap['UploadTokenControllerApi.uploadWithToken']?.[localVarOperationServerIndex]?.url;
|
|
157
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
158
|
+
},
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* UploadTokenControllerApi - factory interface
|
|
164
|
+
*/
|
|
165
|
+
export const UploadTokenControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
166
|
+
const localVarFp = UploadTokenControllerApiFp(configuration)
|
|
167
|
+
return {
|
|
168
|
+
/**
|
|
169
|
+
* Issues a one-shot HS256 JWT scoped to a single upload into a single folder. Caller must hold the UPLOAD_TOKEN_ISSUER realm role.
|
|
170
|
+
* @summary Mint a scoped upload token
|
|
171
|
+
* @param {MintUploadTokenRequest} mintUploadTokenRequest
|
|
172
|
+
* @param {*} [options] Override http request option.
|
|
173
|
+
* @throws {RequiredError}
|
|
174
|
+
*/
|
|
175
|
+
mintUploadToken(mintUploadTokenRequest: MintUploadTokenRequest, options?: RawAxiosRequestConfig): AxiosPromise<UploadTokenResponse> {
|
|
176
|
+
return localVarFp.mintUploadToken(mintUploadTokenRequest, options).then((request) => request(axios, basePath));
|
|
177
|
+
},
|
|
178
|
+
/**
|
|
179
|
+
* Anonymous-callable endpoint authenticated by the scoped JWT minted via POST /api/v1/upload-tokens. Forces the target folder to the one baked into the token. One-shot — replays return 401.
|
|
180
|
+
* @summary Upload a single document with a scoped upload token
|
|
181
|
+
* @param {File} file
|
|
182
|
+
* @param {string} [metadata]
|
|
183
|
+
* @param {*} [options] Override http request option.
|
|
184
|
+
* @throws {RequiredError}
|
|
185
|
+
*/
|
|
186
|
+
uploadWithToken(file: File, metadata?: string, options?: RawAxiosRequestConfig): AxiosPromise<UploadResponse> {
|
|
187
|
+
return localVarFp.uploadWithToken(file, metadata, options).then((request) => request(axios, basePath));
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* UploadTokenControllerApi - object-oriented interface
|
|
194
|
+
*/
|
|
195
|
+
export class UploadTokenControllerApi extends BaseAPI {
|
|
196
|
+
/**
|
|
197
|
+
* Issues a one-shot HS256 JWT scoped to a single upload into a single folder. Caller must hold the UPLOAD_TOKEN_ISSUER realm role.
|
|
198
|
+
* @summary Mint a scoped upload token
|
|
199
|
+
* @param {MintUploadTokenRequest} mintUploadTokenRequest
|
|
200
|
+
* @param {*} [options] Override http request option.
|
|
201
|
+
* @throws {RequiredError}
|
|
202
|
+
*/
|
|
203
|
+
public mintUploadToken(mintUploadTokenRequest: MintUploadTokenRequest, options?: RawAxiosRequestConfig) {
|
|
204
|
+
return UploadTokenControllerApiFp(this.configuration).mintUploadToken(mintUploadTokenRequest, options).then((request) => request(this.axios, this.basePath));
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Anonymous-callable endpoint authenticated by the scoped JWT minted via POST /api/v1/upload-tokens. Forces the target folder to the one baked into the token. One-shot — replays return 401.
|
|
209
|
+
* @summary Upload a single document with a scoped upload token
|
|
210
|
+
* @param {File} file
|
|
211
|
+
* @param {string} [metadata]
|
|
212
|
+
* @param {*} [options] Override http request option.
|
|
213
|
+
* @throws {RequiredError}
|
|
214
|
+
*/
|
|
215
|
+
public uploadWithToken(file: File, metadata?: string, options?: RawAxiosRequestConfig) {
|
|
216
|
+
return UploadTokenControllerApiFp(this.configuration).uploadWithToken(file, metadata, options).then((request) => request(this.axios, this.basePath));
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|