@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.
Files changed (120) hide show
  1. package/.openapi-generator/FILES +32 -6
  2. package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
  3. package/README.md +36 -7
  4. package/api/{audit-controller-api.ts → collaboration-audit-controller-api.ts} +42 -42
  5. package/api/delegated-browse-grants-admin-api.ts +452 -0
  6. package/api/delegated-browse-grants-end-user-api.ts +426 -0
  7. package/api/upload-token-controller-api.ts +219 -0
  8. package/api/user-privacy-api.ts +196 -0
  9. package/api/webhook-proxy-controller-api.ts +523 -0
  10. package/api.ts +6 -1
  11. package/dist/api/{audit-controller-api.d.ts → collaboration-audit-controller-api.d.ts} +35 -35
  12. package/dist/api/{audit-controller-api.js → collaboration-audit-controller-api.js} +41 -41
  13. package/dist/api/delegated-browse-grants-admin-api.d.ts +215 -0
  14. package/dist/api/delegated-browse-grants-admin-api.js +434 -0
  15. package/dist/api/delegated-browse-grants-end-user-api.d.ts +204 -0
  16. package/dist/api/delegated-browse-grants-end-user-api.js +416 -0
  17. package/dist/api/upload-token-controller-api.d.ts +105 -0
  18. package/dist/api/upload-token-controller-api.js +214 -0
  19. package/dist/api/user-privacy-api.d.ts +96 -0
  20. package/dist/api/user-privacy-api.js +195 -0
  21. package/dist/api/webhook-proxy-controller-api.d.ts +230 -0
  22. package/dist/api/webhook-proxy-controller-api.js +511 -0
  23. package/dist/api.d.ts +6 -1
  24. package/dist/api.js +6 -1
  25. package/dist/esm/api/{audit-controller-api.d.ts → collaboration-audit-controller-api.d.ts} +35 -35
  26. package/dist/esm/api/{audit-controller-api.js → collaboration-audit-controller-api.js} +36 -36
  27. package/dist/esm/api/delegated-browse-grants-admin-api.d.ts +215 -0
  28. package/dist/esm/api/delegated-browse-grants-admin-api.js +427 -0
  29. package/dist/esm/api/delegated-browse-grants-end-user-api.d.ts +204 -0
  30. package/dist/esm/api/delegated-browse-grants-end-user-api.js +409 -0
  31. package/dist/esm/api/upload-token-controller-api.d.ts +105 -0
  32. package/dist/esm/api/upload-token-controller-api.js +207 -0
  33. package/dist/esm/api/user-privacy-api.d.ts +96 -0
  34. package/dist/esm/api/user-privacy-api.js +188 -0
  35. package/dist/esm/api/webhook-proxy-controller-api.d.ts +230 -0
  36. package/dist/esm/api/webhook-proxy-controller-api.js +504 -0
  37. package/dist/esm/api.d.ts +6 -1
  38. package/dist/esm/api.js +6 -1
  39. package/dist/esm/models/consume-delegated-grant-request.d.ts +15 -0
  40. package/dist/esm/models/create-delegated-grant-request.d.ts +21 -0
  41. package/dist/esm/models/create-delegated-grant-request.js +16 -0
  42. package/dist/esm/models/delegated-folder-node.d.ts +16 -0
  43. package/dist/esm/models/delegated-folder-node.js +14 -0
  44. package/dist/esm/models/delegated-grant-dto.d.ts +43 -0
  45. package/dist/esm/models/delegated-grant-dto.js +24 -0
  46. package/dist/esm/models/{audit-log-details-one-of.d.ts → enriched-audit-log-details.d.ts} +2 -2
  47. package/dist/esm/models/enriched-audit-log-details.js +14 -0
  48. package/dist/esm/models/{audit-log.d.ts → enriched-audit-log.d.ts} +27 -16
  49. package/dist/{models/audit-log.js → esm/models/enriched-audit-log.js} +17 -11
  50. package/dist/esm/models/index.d.ts +10 -2
  51. package/dist/esm/models/index.js +10 -2
  52. package/dist/esm/models/mint-upload-token-request.d.ts +17 -0
  53. package/dist/esm/models/mint-upload-token-request.js +14 -0
  54. package/dist/esm/models/notification-dto.d.ts +3 -0
  55. package/dist/esm/models/notification-dto.js +4 -1
  56. package/dist/esm/models/search-by-audit-log-request.d.ts +15 -6
  57. package/dist/esm/models/search-by-audit-log-request.js +15 -6
  58. package/dist/esm/models/update-user-privacy-request.d.ts +14 -0
  59. package/dist/esm/models/update-user-privacy-request.js +14 -0
  60. package/dist/esm/models/upload-token-response.d.ts +18 -0
  61. package/dist/esm/models/upload-token-response.js +14 -0
  62. package/dist/esm/models/user-privacy-dto.d.ts +14 -0
  63. package/dist/esm/models/user-privacy-dto.js +14 -0
  64. package/dist/models/consume-delegated-grant-request.d.ts +15 -0
  65. package/dist/models/create-delegated-grant-request.d.ts +21 -0
  66. package/dist/models/create-delegated-grant-request.js +19 -0
  67. package/dist/models/delegated-folder-node.d.ts +16 -0
  68. package/dist/models/delegated-folder-node.js +15 -0
  69. package/dist/models/delegated-grant-dto.d.ts +43 -0
  70. package/dist/models/delegated-grant-dto.js +27 -0
  71. package/dist/models/{audit-log-details-one-of.d.ts → enriched-audit-log-details.d.ts} +2 -2
  72. package/dist/models/enriched-audit-log-details.js +15 -0
  73. package/dist/models/{audit-log.d.ts → enriched-audit-log.d.ts} +27 -16
  74. package/dist/{esm/models/audit-log.js → models/enriched-audit-log.js} +20 -8
  75. package/dist/models/index.d.ts +10 -2
  76. package/dist/models/index.js +10 -2
  77. package/dist/models/mint-upload-token-request.d.ts +17 -0
  78. package/dist/models/mint-upload-token-request.js +15 -0
  79. package/dist/models/notification-dto.d.ts +3 -0
  80. package/dist/models/notification-dto.js +4 -1
  81. package/dist/models/search-by-audit-log-request.d.ts +15 -6
  82. package/dist/models/search-by-audit-log-request.js +15 -6
  83. package/dist/models/update-user-privacy-request.d.ts +14 -0
  84. package/dist/models/update-user-privacy-request.js +15 -0
  85. package/dist/models/upload-token-response.d.ts +18 -0
  86. package/dist/models/upload-token-response.js +15 -0
  87. package/dist/models/user-privacy-dto.d.ts +14 -0
  88. package/dist/models/user-privacy-dto.js +15 -0
  89. package/docs/{AuditControllerApi.md → CollaborationAuditControllerApi.md} +16 -16
  90. package/docs/ConsumeDelegatedGrantRequest.md +22 -0
  91. package/docs/CreateDelegatedGrantRequest.md +26 -0
  92. package/docs/DelegatedBrowseGrantsAdminApi.md +275 -0
  93. package/docs/DelegatedBrowseGrantsEndUserApi.md +266 -0
  94. package/docs/DelegatedFolderNode.md +24 -0
  95. package/docs/DelegatedGrantDTO.md +52 -0
  96. package/docs/{AuditLog.md → EnrichedAuditLog.md} +9 -5
  97. package/docs/{AuditLogDetailsOneOf.md → EnrichedAuditLogDetails.md} +3 -3
  98. package/docs/MintUploadTokenRequest.md +26 -0
  99. package/docs/UpdateUserPrivacyRequest.md +20 -0
  100. package/docs/UploadTokenControllerApi.md +115 -0
  101. package/docs/UploadTokenResponse.md +28 -0
  102. package/docs/UserPrivacyApi.md +104 -0
  103. package/docs/UserPrivacyDTO.md +20 -0
  104. package/docs/WebhookProxyControllerApi.md +364 -0
  105. package/models/consume-delegated-grant-request.ts +21 -0
  106. package/models/create-delegated-grant-request.ts +30 -0
  107. package/models/delegated-folder-node.ts +22 -0
  108. package/models/delegated-grant-dto.ts +53 -0
  109. package/models/{audit-log-details-one-of.ts → enriched-audit-log-details.ts} +2 -20
  110. package/models/{audit-log.ts → enriched-audit-log.ts} +27 -16
  111. package/models/index.ts +10 -2
  112. package/models/mint-upload-token-request.ts +23 -0
  113. package/models/notification-dto.ts +4 -1
  114. package/models/search-by-audit-log-request.ts +15 -6
  115. package/models/update-user-privacy-request.ts +20 -0
  116. package/models/upload-token-response.ts +24 -0
  117. package/models/user-privacy-dto.ts +20 -0
  118. package/package.json +1 -1
  119. /package/dist/esm/models/{audit-log-details-one-of.js → consume-delegated-grant-request.js} +0 -0
  120. /package/dist/models/{audit-log-details-one-of.js → consume-delegated-grant-request.js} +0 -0
@@ -0,0 +1,427 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
+ /**
30
+ * DelegatedBrowseGrantsAdminApi - axios parameter creator
31
+ */
32
+ export const DelegatedBrowseGrantsAdminApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * 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.
36
+ * @summary Browse folders on behalf of the grantor
37
+ * @param {string} grantId
38
+ * @param {string} [parent]
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ browseFolders: (grantId_1, parent_1, ...args_1) => __awaiter(this, [grantId_1, parent_1, ...args_1], void 0, function* (grantId, parent, options = {}) {
43
+ // verify required parameter 'grantId' is not null or undefined
44
+ assertParamExists('browseFolders', 'grantId', grantId);
45
+ const localVarPath = `/api/v1/admin/delegated/folders`;
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
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
53
+ const localVarHeaderParameter = {};
54
+ const localVarQueryParameter = {};
55
+ // authentication keycloak_auth required
56
+ // http bearer authentication required
57
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
58
+ if (grantId !== undefined) {
59
+ localVarQueryParameter['grantId'] = grantId;
60
+ }
61
+ if (parent !== undefined) {
62
+ localVarQueryParameter['parent'] = parent;
63
+ }
64
+ localVarHeaderParameter['Accept'] = 'application/json';
65
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
66
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
67
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
68
+ return {
69
+ url: toPathString(localVarUrlObj),
70
+ options: localVarRequestOptions,
71
+ };
72
+ }),
73
+ /**
74
+ * Flip an ACCEPTED grant to CONSUMED after using it to create a webhook. Single-use: subsequent browse calls return 410 Gone.
75
+ * @summary Mark grant as consumed
76
+ * @param {string} id
77
+ * @param {ConsumeDelegatedGrantRequest} consumeDelegatedGrantRequest
78
+ * @param {*} [options] Override http request option.
79
+ * @throws {RequiredError}
80
+ */
81
+ consume: (id_1, consumeDelegatedGrantRequest_1, ...args_1) => __awaiter(this, [id_1, consumeDelegatedGrantRequest_1, ...args_1], void 0, function* (id, consumeDelegatedGrantRequest, options = {}) {
82
+ // verify required parameter 'id' is not null or undefined
83
+ assertParamExists('consume', 'id', id);
84
+ // verify required parameter 'consumeDelegatedGrantRequest' is not null or undefined
85
+ assertParamExists('consume', 'consumeDelegatedGrantRequest', consumeDelegatedGrantRequest);
86
+ const localVarPath = `/api/v1/admin/delegated/grants/{id}/consume`
87
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
88
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
89
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
90
+ let baseOptions;
91
+ if (configuration) {
92
+ baseOptions = configuration.baseOptions;
93
+ }
94
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
95
+ const localVarHeaderParameter = {};
96
+ const localVarQueryParameter = {};
97
+ // authentication keycloak_auth required
98
+ // http bearer authentication required
99
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
100
+ localVarHeaderParameter['Content-Type'] = 'application/json';
101
+ localVarHeaderParameter['Accept'] = '*/*';
102
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
103
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
104
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
105
+ localVarRequestOptions.data = serializeDataIfNeeded(consumeDelegatedGrantRequest, localVarRequestOptions, configuration);
106
+ return {
107
+ url: toPathString(localVarUrlObj),
108
+ options: localVarRequestOptions,
109
+ };
110
+ }),
111
+ /**
112
+ * Admin UI polls this after creation to learn when the grantor has accepted/declined. 404 if the grant isn\'t yours.
113
+ * @summary Poll grant status
114
+ * @param {string} id
115
+ * @param {*} [options] Override http request option.
116
+ * @throws {RequiredError}
117
+ */
118
+ getGrant: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
119
+ // verify required parameter 'id' is not null or undefined
120
+ assertParamExists('getGrant', 'id', id);
121
+ const localVarPath = `/api/v1/admin/delegated/grants/{id}`
122
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
123
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
124
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
125
+ let baseOptions;
126
+ if (configuration) {
127
+ baseOptions = configuration.baseOptions;
128
+ }
129
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
130
+ const localVarHeaderParameter = {};
131
+ const localVarQueryParameter = {};
132
+ // authentication keycloak_auth required
133
+ // http bearer authentication required
134
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
135
+ localVarHeaderParameter['Accept'] = 'application/json';
136
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
137
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ return {
140
+ url: toPathString(localVarUrlObj),
141
+ options: localVarRequestOptions,
142
+ };
143
+ }),
144
+ /**
145
+ * Optionally filter by ?status=PENDING|ACCEPTED|...
146
+ * @summary List grants I requested
147
+ * @param {ListMineStatusEnum} [status]
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ */
151
+ listMine: (status_1, ...args_1) => __awaiter(this, [status_1, ...args_1], void 0, function* (status, options = {}) {
152
+ const localVarPath = `/api/v1/admin/delegated/grants`;
153
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
154
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
155
+ let baseOptions;
156
+ if (configuration) {
157
+ baseOptions = configuration.baseOptions;
158
+ }
159
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
160
+ const localVarHeaderParameter = {};
161
+ const localVarQueryParameter = {};
162
+ // authentication keycloak_auth required
163
+ // http bearer authentication required
164
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
165
+ if (status !== undefined) {
166
+ localVarQueryParameter['status'] = status;
167
+ }
168
+ localVarHeaderParameter['Accept'] = 'application/json';
169
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
170
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
171
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
172
+ return {
173
+ url: toPathString(localVarUrlObj),
174
+ options: localVarRequestOptions,
175
+ };
176
+ }),
177
+ /**
178
+ * Create a PENDING grant. Notifies the grantor via in-app + email. Grantor has 15 min to accept or the grant auto-expires.
179
+ * @summary Request a grant
180
+ * @param {CreateDelegatedGrantRequest} createDelegatedGrantRequest
181
+ * @param {*} [options] Override http request option.
182
+ * @throws {RequiredError}
183
+ */
184
+ requestGrant: (createDelegatedGrantRequest_1, ...args_1) => __awaiter(this, [createDelegatedGrantRequest_1, ...args_1], void 0, function* (createDelegatedGrantRequest, options = {}) {
185
+ // verify required parameter 'createDelegatedGrantRequest' is not null or undefined
186
+ assertParamExists('requestGrant', 'createDelegatedGrantRequest', createDelegatedGrantRequest);
187
+ const localVarPath = `/api/v1/admin/delegated/grants`;
188
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
189
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
190
+ let baseOptions;
191
+ if (configuration) {
192
+ baseOptions = configuration.baseOptions;
193
+ }
194
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
195
+ const localVarHeaderParameter = {};
196
+ const localVarQueryParameter = {};
197
+ // authentication keycloak_auth required
198
+ // http bearer authentication required
199
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
200
+ localVarHeaderParameter['Content-Type'] = 'application/json';
201
+ localVarHeaderParameter['Accept'] = '*/*';
202
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
203
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
204
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
205
+ localVarRequestOptions.data = serializeDataIfNeeded(createDelegatedGrantRequest, localVarRequestOptions, configuration);
206
+ return {
207
+ url: toPathString(localVarUrlObj),
208
+ options: localVarRequestOptions,
209
+ };
210
+ }),
211
+ };
212
+ };
213
+ /**
214
+ * DelegatedBrowseGrantsAdminApi - functional programming interface
215
+ */
216
+ export const DelegatedBrowseGrantsAdminApiFp = function (configuration) {
217
+ const localVarAxiosParamCreator = DelegatedBrowseGrantsAdminApiAxiosParamCreator(configuration);
218
+ return {
219
+ /**
220
+ * 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.
221
+ * @summary Browse folders on behalf of the grantor
222
+ * @param {string} grantId
223
+ * @param {string} [parent]
224
+ * @param {*} [options] Override http request option.
225
+ * @throws {RequiredError}
226
+ */
227
+ browseFolders(grantId, parent, options) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ var _a, _b, _c;
230
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.browseFolders(grantId, parent, options);
231
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
232
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DelegatedBrowseGrantsAdminApi.browseFolders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
233
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
234
+ });
235
+ },
236
+ /**
237
+ * Flip an ACCEPTED grant to CONSUMED after using it to create a webhook. Single-use: subsequent browse calls return 410 Gone.
238
+ * @summary Mark grant as consumed
239
+ * @param {string} id
240
+ * @param {ConsumeDelegatedGrantRequest} consumeDelegatedGrantRequest
241
+ * @param {*} [options] Override http request option.
242
+ * @throws {RequiredError}
243
+ */
244
+ consume(id, consumeDelegatedGrantRequest, options) {
245
+ return __awaiter(this, void 0, void 0, function* () {
246
+ var _a, _b, _c;
247
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.consume(id, consumeDelegatedGrantRequest, options);
248
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
249
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DelegatedBrowseGrantsAdminApi.consume']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
250
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
251
+ });
252
+ },
253
+ /**
254
+ * Admin UI polls this after creation to learn when the grantor has accepted/declined. 404 if the grant isn\'t yours.
255
+ * @summary Poll grant status
256
+ * @param {string} id
257
+ * @param {*} [options] Override http request option.
258
+ * @throws {RequiredError}
259
+ */
260
+ getGrant(id, options) {
261
+ return __awaiter(this, void 0, void 0, function* () {
262
+ var _a, _b, _c;
263
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getGrant(id, options);
264
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
265
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DelegatedBrowseGrantsAdminApi.getGrant']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
266
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
267
+ });
268
+ },
269
+ /**
270
+ * Optionally filter by ?status=PENDING|ACCEPTED|...
271
+ * @summary List grants I requested
272
+ * @param {ListMineStatusEnum} [status]
273
+ * @param {*} [options] Override http request option.
274
+ * @throws {RequiredError}
275
+ */
276
+ listMine(status, options) {
277
+ return __awaiter(this, void 0, void 0, function* () {
278
+ var _a, _b, _c;
279
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listMine(status, options);
280
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
281
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DelegatedBrowseGrantsAdminApi.listMine']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
282
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
283
+ });
284
+ },
285
+ /**
286
+ * Create a PENDING grant. Notifies the grantor via in-app + email. Grantor has 15 min to accept or the grant auto-expires.
287
+ * @summary Request a grant
288
+ * @param {CreateDelegatedGrantRequest} createDelegatedGrantRequest
289
+ * @param {*} [options] Override http request option.
290
+ * @throws {RequiredError}
291
+ */
292
+ requestGrant(createDelegatedGrantRequest, options) {
293
+ return __awaiter(this, void 0, void 0, function* () {
294
+ var _a, _b, _c;
295
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.requestGrant(createDelegatedGrantRequest, options);
296
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
297
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DelegatedBrowseGrantsAdminApi.requestGrant']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
298
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
299
+ });
300
+ },
301
+ };
302
+ };
303
+ /**
304
+ * DelegatedBrowseGrantsAdminApi - factory interface
305
+ */
306
+ export const DelegatedBrowseGrantsAdminApiFactory = function (configuration, basePath, axios) {
307
+ const localVarFp = DelegatedBrowseGrantsAdminApiFp(configuration);
308
+ return {
309
+ /**
310
+ * 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.
311
+ * @summary Browse folders on behalf of the grantor
312
+ * @param {string} grantId
313
+ * @param {string} [parent]
314
+ * @param {*} [options] Override http request option.
315
+ * @throws {RequiredError}
316
+ */
317
+ browseFolders(grantId, parent, options) {
318
+ return localVarFp.browseFolders(grantId, parent, options).then((request) => request(axios, basePath));
319
+ },
320
+ /**
321
+ * Flip an ACCEPTED grant to CONSUMED after using it to create a webhook. Single-use: subsequent browse calls return 410 Gone.
322
+ * @summary Mark grant as consumed
323
+ * @param {string} id
324
+ * @param {ConsumeDelegatedGrantRequest} consumeDelegatedGrantRequest
325
+ * @param {*} [options] Override http request option.
326
+ * @throws {RequiredError}
327
+ */
328
+ consume(id, consumeDelegatedGrantRequest, options) {
329
+ return localVarFp.consume(id, consumeDelegatedGrantRequest, options).then((request) => request(axios, basePath));
330
+ },
331
+ /**
332
+ * Admin UI polls this after creation to learn when the grantor has accepted/declined. 404 if the grant isn\'t yours.
333
+ * @summary Poll grant status
334
+ * @param {string} id
335
+ * @param {*} [options] Override http request option.
336
+ * @throws {RequiredError}
337
+ */
338
+ getGrant(id, options) {
339
+ return localVarFp.getGrant(id, options).then((request) => request(axios, basePath));
340
+ },
341
+ /**
342
+ * Optionally filter by ?status=PENDING|ACCEPTED|...
343
+ * @summary List grants I requested
344
+ * @param {ListMineStatusEnum} [status]
345
+ * @param {*} [options] Override http request option.
346
+ * @throws {RequiredError}
347
+ */
348
+ listMine(status, options) {
349
+ return localVarFp.listMine(status, options).then((request) => request(axios, basePath));
350
+ },
351
+ /**
352
+ * Create a PENDING grant. Notifies the grantor via in-app + email. Grantor has 15 min to accept or the grant auto-expires.
353
+ * @summary Request a grant
354
+ * @param {CreateDelegatedGrantRequest} createDelegatedGrantRequest
355
+ * @param {*} [options] Override http request option.
356
+ * @throws {RequiredError}
357
+ */
358
+ requestGrant(createDelegatedGrantRequest, options) {
359
+ return localVarFp.requestGrant(createDelegatedGrantRequest, options).then((request) => request(axios, basePath));
360
+ },
361
+ };
362
+ };
363
+ /**
364
+ * DelegatedBrowseGrantsAdminApi - object-oriented interface
365
+ */
366
+ export class DelegatedBrowseGrantsAdminApi extends BaseAPI {
367
+ /**
368
+ * 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.
369
+ * @summary Browse folders on behalf of the grantor
370
+ * @param {string} grantId
371
+ * @param {string} [parent]
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ browseFolders(grantId, parent, options) {
376
+ return DelegatedBrowseGrantsAdminApiFp(this.configuration).browseFolders(grantId, parent, options).then((request) => request(this.axios, this.basePath));
377
+ }
378
+ /**
379
+ * Flip an ACCEPTED grant to CONSUMED after using it to create a webhook. Single-use: subsequent browse calls return 410 Gone.
380
+ * @summary Mark grant as consumed
381
+ * @param {string} id
382
+ * @param {ConsumeDelegatedGrantRequest} consumeDelegatedGrantRequest
383
+ * @param {*} [options] Override http request option.
384
+ * @throws {RequiredError}
385
+ */
386
+ consume(id, consumeDelegatedGrantRequest, options) {
387
+ return DelegatedBrowseGrantsAdminApiFp(this.configuration).consume(id, consumeDelegatedGrantRequest, options).then((request) => request(this.axios, this.basePath));
388
+ }
389
+ /**
390
+ * Admin UI polls this after creation to learn when the grantor has accepted/declined. 404 if the grant isn\'t yours.
391
+ * @summary Poll grant status
392
+ * @param {string} id
393
+ * @param {*} [options] Override http request option.
394
+ * @throws {RequiredError}
395
+ */
396
+ getGrant(id, options) {
397
+ return DelegatedBrowseGrantsAdminApiFp(this.configuration).getGrant(id, options).then((request) => request(this.axios, this.basePath));
398
+ }
399
+ /**
400
+ * Optionally filter by ?status=PENDING|ACCEPTED|...
401
+ * @summary List grants I requested
402
+ * @param {ListMineStatusEnum} [status]
403
+ * @param {*} [options] Override http request option.
404
+ * @throws {RequiredError}
405
+ */
406
+ listMine(status, options) {
407
+ return DelegatedBrowseGrantsAdminApiFp(this.configuration).listMine(status, options).then((request) => request(this.axios, this.basePath));
408
+ }
409
+ /**
410
+ * Create a PENDING grant. Notifies the grantor via in-app + email. Grantor has 15 min to accept or the grant auto-expires.
411
+ * @summary Request a grant
412
+ * @param {CreateDelegatedGrantRequest} createDelegatedGrantRequest
413
+ * @param {*} [options] Override http request option.
414
+ * @throws {RequiredError}
415
+ */
416
+ requestGrant(createDelegatedGrantRequest, options) {
417
+ return DelegatedBrowseGrantsAdminApiFp(this.configuration).requestGrant(createDelegatedGrantRequest, options).then((request) => request(this.axios, this.basePath));
418
+ }
419
+ }
420
+ export const ListMineStatusEnum = {
421
+ Pending: 'PENDING',
422
+ Accepted: 'ACCEPTED',
423
+ Declined: 'DECLINED',
424
+ Revoked: 'REVOKED',
425
+ Expired: 'EXPIRED',
426
+ Consumed: 'CONSUMED'
427
+ };
@@ -0,0 +1,204 @@
1
+ /**
2
+ * openfilz-api
3
+ * API for Document Management System
4
+ *
5
+ * The version of the OpenAPI document: 1.0.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 type { Configuration } from '../configuration';
13
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import { type RequestArgs, BaseAPI } from '../base';
15
+ import type { DelegatedGrantDTO } from '../models';
16
+ /**
17
+ * DelegatedBrowseGrantsEndUserApi - axios parameter creator
18
+ */
19
+ export declare const DelegatedBrowseGrantsEndUserApiAxiosParamCreator: (configuration?: Configuration) => {
20
+ /**
21
+ * 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.
22
+ * @summary Approve a pending grant
23
+ * @param {string} id
24
+ * @param {*} [options] Override http request option.
25
+ * @throws {RequiredError}
26
+ */
27
+ accept: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
28
+ /**
29
+ *
30
+ * @summary Refuse a pending grant
31
+ * @param {string} id
32
+ * @param {*} [options] Override http request option.
33
+ * @throws {RequiredError}
34
+ */
35
+ decline: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
36
+ /**
37
+ * 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.
38
+ * @summary Disable the webhook created from this grant
39
+ * @param {string} id
40
+ * @param {*} [options] Override http request option.
41
+ * @throws {RequiredError}
42
+ */
43
+ disableLinkedWebhook: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
44
+ /**
45
+ * Optionally filter by ?status=PENDING|ACCEPTED|...
46
+ * @summary List grants addressed to me
47
+ * @param {ListIncomingStatusEnum} [status]
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ */
51
+ listIncoming: (status?: ListIncomingStatusEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
52
+ /**
53
+ * Flip ACCEPTED → REVOKED. Immediate — any in-flight admin browse becomes 410 on its next call.
54
+ * @summary Revoke an accepted grant
55
+ * @param {string} id
56
+ * @param {*} [options] Override http request option.
57
+ * @throws {RequiredError}
58
+ */
59
+ revoke: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
60
+ };
61
+ /**
62
+ * DelegatedBrowseGrantsEndUserApi - functional programming interface
63
+ */
64
+ export declare const DelegatedBrowseGrantsEndUserApiFp: (configuration?: Configuration) => {
65
+ /**
66
+ * 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.
67
+ * @summary Approve a pending grant
68
+ * @param {string} id
69
+ * @param {*} [options] Override http request option.
70
+ * @throws {RequiredError}
71
+ */
72
+ accept(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DelegatedGrantDTO>>;
73
+ /**
74
+ *
75
+ * @summary Refuse a pending grant
76
+ * @param {string} id
77
+ * @param {*} [options] Override http request option.
78
+ * @throws {RequiredError}
79
+ */
80
+ decline(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DelegatedGrantDTO>>;
81
+ /**
82
+ * 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.
83
+ * @summary Disable the webhook created from this grant
84
+ * @param {string} id
85
+ * @param {*} [options] Override http request option.
86
+ * @throws {RequiredError}
87
+ */
88
+ disableLinkedWebhook(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DelegatedGrantDTO>>;
89
+ /**
90
+ * Optionally filter by ?status=PENDING|ACCEPTED|...
91
+ * @summary List grants addressed to me
92
+ * @param {ListIncomingStatusEnum} [status]
93
+ * @param {*} [options] Override http request option.
94
+ * @throws {RequiredError}
95
+ */
96
+ listIncoming(status?: ListIncomingStatusEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DelegatedGrantDTO>>>;
97
+ /**
98
+ * Flip ACCEPTED → REVOKED. Immediate — any in-flight admin browse becomes 410 on its next call.
99
+ * @summary Revoke an accepted grant
100
+ * @param {string} id
101
+ * @param {*} [options] Override http request option.
102
+ * @throws {RequiredError}
103
+ */
104
+ revoke(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DelegatedGrantDTO>>;
105
+ };
106
+ /**
107
+ * DelegatedBrowseGrantsEndUserApi - factory interface
108
+ */
109
+ export declare const DelegatedBrowseGrantsEndUserApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
110
+ /**
111
+ * 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.
112
+ * @summary Approve a pending grant
113
+ * @param {string} id
114
+ * @param {*} [options] Override http request option.
115
+ * @throws {RequiredError}
116
+ */
117
+ accept(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DelegatedGrantDTO>;
118
+ /**
119
+ *
120
+ * @summary Refuse a pending grant
121
+ * @param {string} id
122
+ * @param {*} [options] Override http request option.
123
+ * @throws {RequiredError}
124
+ */
125
+ decline(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DelegatedGrantDTO>;
126
+ /**
127
+ * 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.
128
+ * @summary Disable the webhook created from this grant
129
+ * @param {string} id
130
+ * @param {*} [options] Override http request option.
131
+ * @throws {RequiredError}
132
+ */
133
+ disableLinkedWebhook(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DelegatedGrantDTO>;
134
+ /**
135
+ * Optionally filter by ?status=PENDING|ACCEPTED|...
136
+ * @summary List grants addressed to me
137
+ * @param {ListIncomingStatusEnum} [status]
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ listIncoming(status?: ListIncomingStatusEnum, options?: RawAxiosRequestConfig): AxiosPromise<Array<DelegatedGrantDTO>>;
142
+ /**
143
+ * Flip ACCEPTED → REVOKED. Immediate — any in-flight admin browse becomes 410 on its next call.
144
+ * @summary Revoke an accepted grant
145
+ * @param {string} id
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ */
149
+ revoke(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DelegatedGrantDTO>;
150
+ };
151
+ /**
152
+ * DelegatedBrowseGrantsEndUserApi - object-oriented interface
153
+ */
154
+ export declare class DelegatedBrowseGrantsEndUserApi extends BaseAPI {
155
+ /**
156
+ * 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.
157
+ * @summary Approve a pending grant
158
+ * @param {string} id
159
+ * @param {*} [options] Override http request option.
160
+ * @throws {RequiredError}
161
+ */
162
+ accept(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DelegatedGrantDTO, any, {}>>;
163
+ /**
164
+ *
165
+ * @summary Refuse a pending grant
166
+ * @param {string} id
167
+ * @param {*} [options] Override http request option.
168
+ * @throws {RequiredError}
169
+ */
170
+ decline(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DelegatedGrantDTO, any, {}>>;
171
+ /**
172
+ * 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.
173
+ * @summary Disable the webhook created from this grant
174
+ * @param {string} id
175
+ * @param {*} [options] Override http request option.
176
+ * @throws {RequiredError}
177
+ */
178
+ disableLinkedWebhook(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DelegatedGrantDTO, any, {}>>;
179
+ /**
180
+ * Optionally filter by ?status=PENDING|ACCEPTED|...
181
+ * @summary List grants addressed to me
182
+ * @param {ListIncomingStatusEnum} [status]
183
+ * @param {*} [options] Override http request option.
184
+ * @throws {RequiredError}
185
+ */
186
+ listIncoming(status?: ListIncomingStatusEnum, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DelegatedGrantDTO[], any, {}>>;
187
+ /**
188
+ * Flip ACCEPTED → REVOKED. Immediate — any in-flight admin browse becomes 410 on its next call.
189
+ * @summary Revoke an accepted grant
190
+ * @param {string} id
191
+ * @param {*} [options] Override http request option.
192
+ * @throws {RequiredError}
193
+ */
194
+ revoke(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DelegatedGrantDTO, any, {}>>;
195
+ }
196
+ export declare const ListIncomingStatusEnum: {
197
+ readonly Pending: "PENDING";
198
+ readonly Accepted: "ACCEPTED";
199
+ readonly Declined: "DECLINED";
200
+ readonly Revoked: "REVOKED";
201
+ readonly Expired: "EXPIRED";
202
+ readonly Consumed: "CONSUMED";
203
+ };
204
+ export type ListIncomingStatusEnum = typeof ListIncomingStatusEnum[keyof typeof ListIncomingStatusEnum];