@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,452 @@
|
|
|
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 { ConsumeDelegatedGrantRequest } from '../models';
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import type { CreateDelegatedGrantRequest } from '../models';
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import type { DelegatedFolderNode } from '../models';
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
import type { DelegatedGrantDTO } from '../models';
|
|
32
|
+
/**
|
|
33
|
+
* DelegatedBrowseGrantsAdminApi - axios parameter creator
|
|
34
|
+
*/
|
|
35
|
+
export const DelegatedBrowseGrantsAdminApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
36
|
+
return {
|
|
37
|
+
/**
|
|
38
|
+
* List folders under {parent} in the grantor\'s tree. Omit {parent} to list the grantor\'s root-level folders. Returns only name/id/hasChildren — no files, no metadata, no content-types.
|
|
39
|
+
* @summary Browse folders on behalf of the grantor
|
|
40
|
+
* @param {string} grantId
|
|
41
|
+
* @param {string} [parent]
|
|
42
|
+
* @param {*} [options] Override http request option.
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
*/
|
|
45
|
+
browseFolders: async (grantId: string, parent?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
46
|
+
// verify required parameter 'grantId' is not null or undefined
|
|
47
|
+
assertParamExists('browseFolders', 'grantId', grantId)
|
|
48
|
+
const localVarPath = `/api/v1/admin/delegated/folders`;
|
|
49
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
50
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
51
|
+
let baseOptions;
|
|
52
|
+
if (configuration) {
|
|
53
|
+
baseOptions = configuration.baseOptions;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
57
|
+
const localVarHeaderParameter = {} as any;
|
|
58
|
+
const localVarQueryParameter = {} as any;
|
|
59
|
+
|
|
60
|
+
// authentication keycloak_auth required
|
|
61
|
+
// http bearer authentication required
|
|
62
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
63
|
+
|
|
64
|
+
if (grantId !== undefined) {
|
|
65
|
+
localVarQueryParameter['grantId'] = grantId;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (parent !== undefined) {
|
|
69
|
+
localVarQueryParameter['parent'] = parent;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
73
|
+
|
|
74
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
75
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
76
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
url: toPathString(localVarUrlObj),
|
|
80
|
+
options: localVarRequestOptions,
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
* Flip an ACCEPTED grant to CONSUMED after using it to create a webhook. Single-use: subsequent browse calls return 410 Gone.
|
|
85
|
+
* @summary Mark grant as consumed
|
|
86
|
+
* @param {string} id
|
|
87
|
+
* @param {ConsumeDelegatedGrantRequest} consumeDelegatedGrantRequest
|
|
88
|
+
* @param {*} [options] Override http request option.
|
|
89
|
+
* @throws {RequiredError}
|
|
90
|
+
*/
|
|
91
|
+
consume: async (id: string, consumeDelegatedGrantRequest: ConsumeDelegatedGrantRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
92
|
+
// verify required parameter 'id' is not null or undefined
|
|
93
|
+
assertParamExists('consume', 'id', id)
|
|
94
|
+
// verify required parameter 'consumeDelegatedGrantRequest' is not null or undefined
|
|
95
|
+
assertParamExists('consume', 'consumeDelegatedGrantRequest', consumeDelegatedGrantRequest)
|
|
96
|
+
const localVarPath = `/api/v1/admin/delegated/grants/{id}/consume`
|
|
97
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
98
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
99
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
100
|
+
let baseOptions;
|
|
101
|
+
if (configuration) {
|
|
102
|
+
baseOptions = configuration.baseOptions;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
106
|
+
const localVarHeaderParameter = {} as any;
|
|
107
|
+
const localVarQueryParameter = {} as any;
|
|
108
|
+
|
|
109
|
+
// authentication keycloak_auth required
|
|
110
|
+
// http bearer authentication required
|
|
111
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
112
|
+
|
|
113
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
114
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
115
|
+
|
|
116
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
117
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
118
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
119
|
+
localVarRequestOptions.data = serializeDataIfNeeded(consumeDelegatedGrantRequest, localVarRequestOptions, configuration)
|
|
120
|
+
|
|
121
|
+
return {
|
|
122
|
+
url: toPathString(localVarUrlObj),
|
|
123
|
+
options: localVarRequestOptions,
|
|
124
|
+
};
|
|
125
|
+
},
|
|
126
|
+
/**
|
|
127
|
+
* Admin UI polls this after creation to learn when the grantor has accepted/declined. 404 if the grant isn\'t yours.
|
|
128
|
+
* @summary Poll grant status
|
|
129
|
+
* @param {string} id
|
|
130
|
+
* @param {*} [options] Override http request option.
|
|
131
|
+
* @throws {RequiredError}
|
|
132
|
+
*/
|
|
133
|
+
getGrant: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
134
|
+
// verify required parameter 'id' is not null or undefined
|
|
135
|
+
assertParamExists('getGrant', 'id', id)
|
|
136
|
+
const localVarPath = `/api/v1/admin/delegated/grants/{id}`
|
|
137
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
138
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
139
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
140
|
+
let baseOptions;
|
|
141
|
+
if (configuration) {
|
|
142
|
+
baseOptions = configuration.baseOptions;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
146
|
+
const localVarHeaderParameter = {} as any;
|
|
147
|
+
const localVarQueryParameter = {} as any;
|
|
148
|
+
|
|
149
|
+
// authentication keycloak_auth required
|
|
150
|
+
// http bearer authentication required
|
|
151
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
152
|
+
|
|
153
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
154
|
+
|
|
155
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
156
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
157
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
158
|
+
|
|
159
|
+
return {
|
|
160
|
+
url: toPathString(localVarUrlObj),
|
|
161
|
+
options: localVarRequestOptions,
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* Optionally filter by ?status=PENDING|ACCEPTED|...
|
|
166
|
+
* @summary List grants I requested
|
|
167
|
+
* @param {ListMineStatusEnum} [status]
|
|
168
|
+
* @param {*} [options] Override http request option.
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
*/
|
|
171
|
+
listMine: async (status?: ListMineStatusEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
172
|
+
const localVarPath = `/api/v1/admin/delegated/grants`;
|
|
173
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
174
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
175
|
+
let baseOptions;
|
|
176
|
+
if (configuration) {
|
|
177
|
+
baseOptions = configuration.baseOptions;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
181
|
+
const localVarHeaderParameter = {} as any;
|
|
182
|
+
const localVarQueryParameter = {} as any;
|
|
183
|
+
|
|
184
|
+
// authentication keycloak_auth required
|
|
185
|
+
// http bearer authentication required
|
|
186
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
187
|
+
|
|
188
|
+
if (status !== undefined) {
|
|
189
|
+
localVarQueryParameter['status'] = status;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
193
|
+
|
|
194
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
195
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
196
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
197
|
+
|
|
198
|
+
return {
|
|
199
|
+
url: toPathString(localVarUrlObj),
|
|
200
|
+
options: localVarRequestOptions,
|
|
201
|
+
};
|
|
202
|
+
},
|
|
203
|
+
/**
|
|
204
|
+
* Create a PENDING grant. Notifies the grantor via in-app + email. Grantor has 15 min to accept or the grant auto-expires.
|
|
205
|
+
* @summary Request a grant
|
|
206
|
+
* @param {CreateDelegatedGrantRequest} createDelegatedGrantRequest
|
|
207
|
+
* @param {*} [options] Override http request option.
|
|
208
|
+
* @throws {RequiredError}
|
|
209
|
+
*/
|
|
210
|
+
requestGrant: async (createDelegatedGrantRequest: CreateDelegatedGrantRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
211
|
+
// verify required parameter 'createDelegatedGrantRequest' is not null or undefined
|
|
212
|
+
assertParamExists('requestGrant', 'createDelegatedGrantRequest', createDelegatedGrantRequest)
|
|
213
|
+
const localVarPath = `/api/v1/admin/delegated/grants`;
|
|
214
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
215
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
216
|
+
let baseOptions;
|
|
217
|
+
if (configuration) {
|
|
218
|
+
baseOptions = configuration.baseOptions;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
222
|
+
const localVarHeaderParameter = {} as any;
|
|
223
|
+
const localVarQueryParameter = {} as any;
|
|
224
|
+
|
|
225
|
+
// authentication keycloak_auth required
|
|
226
|
+
// http bearer authentication required
|
|
227
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
228
|
+
|
|
229
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
230
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
231
|
+
|
|
232
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
233
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
234
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
235
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createDelegatedGrantRequest, localVarRequestOptions, configuration)
|
|
236
|
+
|
|
237
|
+
return {
|
|
238
|
+
url: toPathString(localVarUrlObj),
|
|
239
|
+
options: localVarRequestOptions,
|
|
240
|
+
};
|
|
241
|
+
},
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* DelegatedBrowseGrantsAdminApi - functional programming interface
|
|
247
|
+
*/
|
|
248
|
+
export const DelegatedBrowseGrantsAdminApiFp = function(configuration?: Configuration) {
|
|
249
|
+
const localVarAxiosParamCreator = DelegatedBrowseGrantsAdminApiAxiosParamCreator(configuration)
|
|
250
|
+
return {
|
|
251
|
+
/**
|
|
252
|
+
* List folders under {parent} in the grantor\'s tree. Omit {parent} to list the grantor\'s root-level folders. Returns only name/id/hasChildren — no files, no metadata, no content-types.
|
|
253
|
+
* @summary Browse folders on behalf of the grantor
|
|
254
|
+
* @param {string} grantId
|
|
255
|
+
* @param {string} [parent]
|
|
256
|
+
* @param {*} [options] Override http request option.
|
|
257
|
+
* @throws {RequiredError}
|
|
258
|
+
*/
|
|
259
|
+
async browseFolders(grantId: string, parent?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DelegatedFolderNode>>> {
|
|
260
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.browseFolders(grantId, parent, options);
|
|
261
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
262
|
+
const localVarOperationServerBasePath = operationServerMap['DelegatedBrowseGrantsAdminApi.browseFolders']?.[localVarOperationServerIndex]?.url;
|
|
263
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
264
|
+
},
|
|
265
|
+
/**
|
|
266
|
+
* Flip an ACCEPTED grant to CONSUMED after using it to create a webhook. Single-use: subsequent browse calls return 410 Gone.
|
|
267
|
+
* @summary Mark grant as consumed
|
|
268
|
+
* @param {string} id
|
|
269
|
+
* @param {ConsumeDelegatedGrantRequest} consumeDelegatedGrantRequest
|
|
270
|
+
* @param {*} [options] Override http request option.
|
|
271
|
+
* @throws {RequiredError}
|
|
272
|
+
*/
|
|
273
|
+
async consume(id: string, consumeDelegatedGrantRequest: ConsumeDelegatedGrantRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DelegatedGrantDTO>> {
|
|
274
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.consume(id, consumeDelegatedGrantRequest, options);
|
|
275
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
276
|
+
const localVarOperationServerBasePath = operationServerMap['DelegatedBrowseGrantsAdminApi.consume']?.[localVarOperationServerIndex]?.url;
|
|
277
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
278
|
+
},
|
|
279
|
+
/**
|
|
280
|
+
* Admin UI polls this after creation to learn when the grantor has accepted/declined. 404 if the grant isn\'t yours.
|
|
281
|
+
* @summary Poll grant status
|
|
282
|
+
* @param {string} id
|
|
283
|
+
* @param {*} [options] Override http request option.
|
|
284
|
+
* @throws {RequiredError}
|
|
285
|
+
*/
|
|
286
|
+
async getGrant(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DelegatedGrantDTO>> {
|
|
287
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGrant(id, options);
|
|
288
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
289
|
+
const localVarOperationServerBasePath = operationServerMap['DelegatedBrowseGrantsAdminApi.getGrant']?.[localVarOperationServerIndex]?.url;
|
|
290
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
291
|
+
},
|
|
292
|
+
/**
|
|
293
|
+
* Optionally filter by ?status=PENDING|ACCEPTED|...
|
|
294
|
+
* @summary List grants I requested
|
|
295
|
+
* @param {ListMineStatusEnum} [status]
|
|
296
|
+
* @param {*} [options] Override http request option.
|
|
297
|
+
* @throws {RequiredError}
|
|
298
|
+
*/
|
|
299
|
+
async listMine(status?: ListMineStatusEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DelegatedGrantDTO>>> {
|
|
300
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listMine(status, options);
|
|
301
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
302
|
+
const localVarOperationServerBasePath = operationServerMap['DelegatedBrowseGrantsAdminApi.listMine']?.[localVarOperationServerIndex]?.url;
|
|
303
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
304
|
+
},
|
|
305
|
+
/**
|
|
306
|
+
* Create a PENDING grant. Notifies the grantor via in-app + email. Grantor has 15 min to accept or the grant auto-expires.
|
|
307
|
+
* @summary Request a grant
|
|
308
|
+
* @param {CreateDelegatedGrantRequest} createDelegatedGrantRequest
|
|
309
|
+
* @param {*} [options] Override http request option.
|
|
310
|
+
* @throws {RequiredError}
|
|
311
|
+
*/
|
|
312
|
+
async requestGrant(createDelegatedGrantRequest: CreateDelegatedGrantRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DelegatedGrantDTO>> {
|
|
313
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.requestGrant(createDelegatedGrantRequest, options);
|
|
314
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
315
|
+
const localVarOperationServerBasePath = operationServerMap['DelegatedBrowseGrantsAdminApi.requestGrant']?.[localVarOperationServerIndex]?.url;
|
|
316
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
317
|
+
},
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* DelegatedBrowseGrantsAdminApi - factory interface
|
|
323
|
+
*/
|
|
324
|
+
export const DelegatedBrowseGrantsAdminApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
325
|
+
const localVarFp = DelegatedBrowseGrantsAdminApiFp(configuration)
|
|
326
|
+
return {
|
|
327
|
+
/**
|
|
328
|
+
* List folders under {parent} in the grantor\'s tree. Omit {parent} to list the grantor\'s root-level folders. Returns only name/id/hasChildren — no files, no metadata, no content-types.
|
|
329
|
+
* @summary Browse folders on behalf of the grantor
|
|
330
|
+
* @param {string} grantId
|
|
331
|
+
* @param {string} [parent]
|
|
332
|
+
* @param {*} [options] Override http request option.
|
|
333
|
+
* @throws {RequiredError}
|
|
334
|
+
*/
|
|
335
|
+
browseFolders(grantId: string, parent?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<DelegatedFolderNode>> {
|
|
336
|
+
return localVarFp.browseFolders(grantId, parent, options).then((request) => request(axios, basePath));
|
|
337
|
+
},
|
|
338
|
+
/**
|
|
339
|
+
* Flip an ACCEPTED grant to CONSUMED after using it to create a webhook. Single-use: subsequent browse calls return 410 Gone.
|
|
340
|
+
* @summary Mark grant as consumed
|
|
341
|
+
* @param {string} id
|
|
342
|
+
* @param {ConsumeDelegatedGrantRequest} consumeDelegatedGrantRequest
|
|
343
|
+
* @param {*} [options] Override http request option.
|
|
344
|
+
* @throws {RequiredError}
|
|
345
|
+
*/
|
|
346
|
+
consume(id: string, consumeDelegatedGrantRequest: ConsumeDelegatedGrantRequest, options?: RawAxiosRequestConfig): AxiosPromise<DelegatedGrantDTO> {
|
|
347
|
+
return localVarFp.consume(id, consumeDelegatedGrantRequest, options).then((request) => request(axios, basePath));
|
|
348
|
+
},
|
|
349
|
+
/**
|
|
350
|
+
* Admin UI polls this after creation to learn when the grantor has accepted/declined. 404 if the grant isn\'t yours.
|
|
351
|
+
* @summary Poll grant status
|
|
352
|
+
* @param {string} id
|
|
353
|
+
* @param {*} [options] Override http request option.
|
|
354
|
+
* @throws {RequiredError}
|
|
355
|
+
*/
|
|
356
|
+
getGrant(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DelegatedGrantDTO> {
|
|
357
|
+
return localVarFp.getGrant(id, options).then((request) => request(axios, basePath));
|
|
358
|
+
},
|
|
359
|
+
/**
|
|
360
|
+
* Optionally filter by ?status=PENDING|ACCEPTED|...
|
|
361
|
+
* @summary List grants I requested
|
|
362
|
+
* @param {ListMineStatusEnum} [status]
|
|
363
|
+
* @param {*} [options] Override http request option.
|
|
364
|
+
* @throws {RequiredError}
|
|
365
|
+
*/
|
|
366
|
+
listMine(status?: ListMineStatusEnum, options?: RawAxiosRequestConfig): AxiosPromise<Array<DelegatedGrantDTO>> {
|
|
367
|
+
return localVarFp.listMine(status, options).then((request) => request(axios, basePath));
|
|
368
|
+
},
|
|
369
|
+
/**
|
|
370
|
+
* Create a PENDING grant. Notifies the grantor via in-app + email. Grantor has 15 min to accept or the grant auto-expires.
|
|
371
|
+
* @summary Request a grant
|
|
372
|
+
* @param {CreateDelegatedGrantRequest} createDelegatedGrantRequest
|
|
373
|
+
* @param {*} [options] Override http request option.
|
|
374
|
+
* @throws {RequiredError}
|
|
375
|
+
*/
|
|
376
|
+
requestGrant(createDelegatedGrantRequest: CreateDelegatedGrantRequest, options?: RawAxiosRequestConfig): AxiosPromise<DelegatedGrantDTO> {
|
|
377
|
+
return localVarFp.requestGrant(createDelegatedGrantRequest, options).then((request) => request(axios, basePath));
|
|
378
|
+
},
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* DelegatedBrowseGrantsAdminApi - object-oriented interface
|
|
384
|
+
*/
|
|
385
|
+
export class DelegatedBrowseGrantsAdminApi extends BaseAPI {
|
|
386
|
+
/**
|
|
387
|
+
* List folders under {parent} in the grantor\'s tree. Omit {parent} to list the grantor\'s root-level folders. Returns only name/id/hasChildren — no files, no metadata, no content-types.
|
|
388
|
+
* @summary Browse folders on behalf of the grantor
|
|
389
|
+
* @param {string} grantId
|
|
390
|
+
* @param {string} [parent]
|
|
391
|
+
* @param {*} [options] Override http request option.
|
|
392
|
+
* @throws {RequiredError}
|
|
393
|
+
*/
|
|
394
|
+
public browseFolders(grantId: string, parent?: string, options?: RawAxiosRequestConfig) {
|
|
395
|
+
return DelegatedBrowseGrantsAdminApiFp(this.configuration).browseFolders(grantId, parent, options).then((request) => request(this.axios, this.basePath));
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Flip an ACCEPTED grant to CONSUMED after using it to create a webhook. Single-use: subsequent browse calls return 410 Gone.
|
|
400
|
+
* @summary Mark grant as consumed
|
|
401
|
+
* @param {string} id
|
|
402
|
+
* @param {ConsumeDelegatedGrantRequest} consumeDelegatedGrantRequest
|
|
403
|
+
* @param {*} [options] Override http request option.
|
|
404
|
+
* @throws {RequiredError}
|
|
405
|
+
*/
|
|
406
|
+
public consume(id: string, consumeDelegatedGrantRequest: ConsumeDelegatedGrantRequest, options?: RawAxiosRequestConfig) {
|
|
407
|
+
return DelegatedBrowseGrantsAdminApiFp(this.configuration).consume(id, consumeDelegatedGrantRequest, options).then((request) => request(this.axios, this.basePath));
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Admin UI polls this after creation to learn when the grantor has accepted/declined. 404 if the grant isn\'t yours.
|
|
412
|
+
* @summary Poll grant status
|
|
413
|
+
* @param {string} id
|
|
414
|
+
* @param {*} [options] Override http request option.
|
|
415
|
+
* @throws {RequiredError}
|
|
416
|
+
*/
|
|
417
|
+
public getGrant(id: string, options?: RawAxiosRequestConfig) {
|
|
418
|
+
return DelegatedBrowseGrantsAdminApiFp(this.configuration).getGrant(id, options).then((request) => request(this.axios, this.basePath));
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Optionally filter by ?status=PENDING|ACCEPTED|...
|
|
423
|
+
* @summary List grants I requested
|
|
424
|
+
* @param {ListMineStatusEnum} [status]
|
|
425
|
+
* @param {*} [options] Override http request option.
|
|
426
|
+
* @throws {RequiredError}
|
|
427
|
+
*/
|
|
428
|
+
public listMine(status?: ListMineStatusEnum, options?: RawAxiosRequestConfig) {
|
|
429
|
+
return DelegatedBrowseGrantsAdminApiFp(this.configuration).listMine(status, options).then((request) => request(this.axios, this.basePath));
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Create a PENDING grant. Notifies the grantor via in-app + email. Grantor has 15 min to accept or the grant auto-expires.
|
|
434
|
+
* @summary Request a grant
|
|
435
|
+
* @param {CreateDelegatedGrantRequest} createDelegatedGrantRequest
|
|
436
|
+
* @param {*} [options] Override http request option.
|
|
437
|
+
* @throws {RequiredError}
|
|
438
|
+
*/
|
|
439
|
+
public requestGrant(createDelegatedGrantRequest: CreateDelegatedGrantRequest, options?: RawAxiosRequestConfig) {
|
|
440
|
+
return DelegatedBrowseGrantsAdminApiFp(this.configuration).requestGrant(createDelegatedGrantRequest, options).then((request) => request(this.axios, this.basePath));
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export const ListMineStatusEnum = {
|
|
445
|
+
Pending: 'PENDING',
|
|
446
|
+
Accepted: 'ACCEPTED',
|
|
447
|
+
Declined: 'DECLINED',
|
|
448
|
+
Revoked: 'REVOKED',
|
|
449
|
+
Expired: 'EXPIRED',
|
|
450
|
+
Consumed: 'CONSUMED'
|
|
451
|
+
} as const;
|
|
452
|
+
export type ListMineStatusEnum = typeof ListMineStatusEnum[keyof typeof ListMineStatusEnum];
|