@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,409 @@
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, toPathString, createRequestFunction } from '../common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
+ /**
30
+ * DelegatedBrowseGrantsEndUserApi - axios parameter creator
31
+ */
32
+ export const DelegatedBrowseGrantsEndUserApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * 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.
36
+ * @summary Approve a pending grant
37
+ * @param {string} id
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ accept: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
42
+ // verify required parameter 'id' is not null or undefined
43
+ assertParamExists('accept', 'id', id);
44
+ const localVarPath = `/api/v1/users/me/delegated/grants/{id}/accept`
45
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
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: 'POST' }, baseOptions), options);
53
+ const localVarHeaderParameter = {};
54
+ const localVarQueryParameter = {};
55
+ // authentication keycloak_auth required
56
+ // http bearer authentication required
57
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
58
+ localVarHeaderParameter['Accept'] = 'application/json';
59
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
60
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
61
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
62
+ return {
63
+ url: toPathString(localVarUrlObj),
64
+ options: localVarRequestOptions,
65
+ };
66
+ }),
67
+ /**
68
+ *
69
+ * @summary Refuse a pending grant
70
+ * @param {string} id
71
+ * @param {*} [options] Override http request option.
72
+ * @throws {RequiredError}
73
+ */
74
+ decline: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
75
+ // verify required parameter 'id' is not null or undefined
76
+ assertParamExists('decline', 'id', id);
77
+ const localVarPath = `/api/v1/users/me/delegated/grants/{id}/decline`
78
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
79
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
80
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
81
+ let baseOptions;
82
+ if (configuration) {
83
+ baseOptions = configuration.baseOptions;
84
+ }
85
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
86
+ const localVarHeaderParameter = {};
87
+ const localVarQueryParameter = {};
88
+ // authentication keycloak_auth required
89
+ // http bearer authentication required
90
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
91
+ localVarHeaderParameter['Accept'] = 'application/json';
92
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
93
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
94
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
95
+ return {
96
+ url: toPathString(localVarUrlObj),
97
+ options: localVarRequestOptions,
98
+ };
99
+ }),
100
+ /**
101
+ * 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.
102
+ * @summary Disable the webhook created from this grant
103
+ * @param {string} id
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ disableLinkedWebhook: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
108
+ // verify required parameter 'id' is not null or undefined
109
+ assertParamExists('disableLinkedWebhook', 'id', id);
110
+ const localVarPath = `/api/v1/users/me/delegated/grants/{id}/disable-webhook`
111
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
112
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
113
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
114
+ let baseOptions;
115
+ if (configuration) {
116
+ baseOptions = configuration.baseOptions;
117
+ }
118
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
119
+ const localVarHeaderParameter = {};
120
+ const localVarQueryParameter = {};
121
+ // authentication keycloak_auth required
122
+ // http bearer authentication required
123
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
124
+ localVarHeaderParameter['Accept'] = 'application/json';
125
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
126
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
127
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
128
+ return {
129
+ url: toPathString(localVarUrlObj),
130
+ options: localVarRequestOptions,
131
+ };
132
+ }),
133
+ /**
134
+ * Optionally filter by ?status=PENDING|ACCEPTED|...
135
+ * @summary List grants addressed to me
136
+ * @param {ListIncomingStatusEnum} [status]
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ */
140
+ listIncoming: (status_1, ...args_1) => __awaiter(this, [status_1, ...args_1], void 0, function* (status, options = {}) {
141
+ const localVarPath = `/api/v1/users/me/delegated/grants`;
142
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
143
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
144
+ let baseOptions;
145
+ if (configuration) {
146
+ baseOptions = configuration.baseOptions;
147
+ }
148
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
149
+ const localVarHeaderParameter = {};
150
+ const localVarQueryParameter = {};
151
+ // authentication keycloak_auth required
152
+ // http bearer authentication required
153
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
154
+ if (status !== undefined) {
155
+ localVarQueryParameter['status'] = status;
156
+ }
157
+ localVarHeaderParameter['Accept'] = 'application/json';
158
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
159
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
160
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
161
+ return {
162
+ url: toPathString(localVarUrlObj),
163
+ options: localVarRequestOptions,
164
+ };
165
+ }),
166
+ /**
167
+ * Flip ACCEPTED → REVOKED. Immediate — any in-flight admin browse becomes 410 on its next call.
168
+ * @summary Revoke an accepted grant
169
+ * @param {string} id
170
+ * @param {*} [options] Override http request option.
171
+ * @throws {RequiredError}
172
+ */
173
+ revoke: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
174
+ // verify required parameter 'id' is not null or undefined
175
+ assertParamExists('revoke', 'id', id);
176
+ const localVarPath = `/api/v1/users/me/delegated/grants/{id}/revoke`
177
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
178
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
179
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
180
+ let baseOptions;
181
+ if (configuration) {
182
+ baseOptions = configuration.baseOptions;
183
+ }
184
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
185
+ const localVarHeaderParameter = {};
186
+ const localVarQueryParameter = {};
187
+ // authentication keycloak_auth required
188
+ // http bearer authentication required
189
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
190
+ localVarHeaderParameter['Accept'] = 'application/json';
191
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
192
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
193
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
194
+ return {
195
+ url: toPathString(localVarUrlObj),
196
+ options: localVarRequestOptions,
197
+ };
198
+ }),
199
+ };
200
+ };
201
+ /**
202
+ * DelegatedBrowseGrantsEndUserApi - functional programming interface
203
+ */
204
+ export const DelegatedBrowseGrantsEndUserApiFp = function (configuration) {
205
+ const localVarAxiosParamCreator = DelegatedBrowseGrantsEndUserApiAxiosParamCreator(configuration);
206
+ return {
207
+ /**
208
+ * 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.
209
+ * @summary Approve a pending grant
210
+ * @param {string} id
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ */
214
+ accept(id, options) {
215
+ return __awaiter(this, void 0, void 0, function* () {
216
+ var _a, _b, _c;
217
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.accept(id, options);
218
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
219
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DelegatedBrowseGrantsEndUserApi.accept']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
220
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
221
+ });
222
+ },
223
+ /**
224
+ *
225
+ * @summary Refuse a pending grant
226
+ * @param {string} id
227
+ * @param {*} [options] Override http request option.
228
+ * @throws {RequiredError}
229
+ */
230
+ decline(id, options) {
231
+ return __awaiter(this, void 0, void 0, function* () {
232
+ var _a, _b, _c;
233
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.decline(id, options);
234
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
235
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DelegatedBrowseGrantsEndUserApi.decline']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
236
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
237
+ });
238
+ },
239
+ /**
240
+ * 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.
241
+ * @summary Disable the webhook created from this grant
242
+ * @param {string} id
243
+ * @param {*} [options] Override http request option.
244
+ * @throws {RequiredError}
245
+ */
246
+ disableLinkedWebhook(id, options) {
247
+ return __awaiter(this, void 0, void 0, function* () {
248
+ var _a, _b, _c;
249
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.disableLinkedWebhook(id, options);
250
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
251
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DelegatedBrowseGrantsEndUserApi.disableLinkedWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
252
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
253
+ });
254
+ },
255
+ /**
256
+ * Optionally filter by ?status=PENDING|ACCEPTED|...
257
+ * @summary List grants addressed to me
258
+ * @param {ListIncomingStatusEnum} [status]
259
+ * @param {*} [options] Override http request option.
260
+ * @throws {RequiredError}
261
+ */
262
+ listIncoming(status, options) {
263
+ return __awaiter(this, void 0, void 0, function* () {
264
+ var _a, _b, _c;
265
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listIncoming(status, options);
266
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
267
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DelegatedBrowseGrantsEndUserApi.listIncoming']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
268
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
269
+ });
270
+ },
271
+ /**
272
+ * Flip ACCEPTED → REVOKED. Immediate — any in-flight admin browse becomes 410 on its next call.
273
+ * @summary Revoke an accepted grant
274
+ * @param {string} id
275
+ * @param {*} [options] Override http request option.
276
+ * @throws {RequiredError}
277
+ */
278
+ revoke(id, options) {
279
+ return __awaiter(this, void 0, void 0, function* () {
280
+ var _a, _b, _c;
281
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.revoke(id, options);
282
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
283
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DelegatedBrowseGrantsEndUserApi.revoke']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
284
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
285
+ });
286
+ },
287
+ };
288
+ };
289
+ /**
290
+ * DelegatedBrowseGrantsEndUserApi - factory interface
291
+ */
292
+ export const DelegatedBrowseGrantsEndUserApiFactory = function (configuration, basePath, axios) {
293
+ const localVarFp = DelegatedBrowseGrantsEndUserApiFp(configuration);
294
+ return {
295
+ /**
296
+ * 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.
297
+ * @summary Approve a pending grant
298
+ * @param {string} id
299
+ * @param {*} [options] Override http request option.
300
+ * @throws {RequiredError}
301
+ */
302
+ accept(id, options) {
303
+ return localVarFp.accept(id, options).then((request) => request(axios, basePath));
304
+ },
305
+ /**
306
+ *
307
+ * @summary Refuse a pending grant
308
+ * @param {string} id
309
+ * @param {*} [options] Override http request option.
310
+ * @throws {RequiredError}
311
+ */
312
+ decline(id, options) {
313
+ return localVarFp.decline(id, options).then((request) => request(axios, basePath));
314
+ },
315
+ /**
316
+ * 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.
317
+ * @summary Disable the webhook created from this grant
318
+ * @param {string} id
319
+ * @param {*} [options] Override http request option.
320
+ * @throws {RequiredError}
321
+ */
322
+ disableLinkedWebhook(id, options) {
323
+ return localVarFp.disableLinkedWebhook(id, options).then((request) => request(axios, basePath));
324
+ },
325
+ /**
326
+ * Optionally filter by ?status=PENDING|ACCEPTED|...
327
+ * @summary List grants addressed to me
328
+ * @param {ListIncomingStatusEnum} [status]
329
+ * @param {*} [options] Override http request option.
330
+ * @throws {RequiredError}
331
+ */
332
+ listIncoming(status, options) {
333
+ return localVarFp.listIncoming(status, options).then((request) => request(axios, basePath));
334
+ },
335
+ /**
336
+ * Flip ACCEPTED → REVOKED. Immediate — any in-flight admin browse becomes 410 on its next call.
337
+ * @summary Revoke an accepted grant
338
+ * @param {string} id
339
+ * @param {*} [options] Override http request option.
340
+ * @throws {RequiredError}
341
+ */
342
+ revoke(id, options) {
343
+ return localVarFp.revoke(id, options).then((request) => request(axios, basePath));
344
+ },
345
+ };
346
+ };
347
+ /**
348
+ * DelegatedBrowseGrantsEndUserApi - object-oriented interface
349
+ */
350
+ export class DelegatedBrowseGrantsEndUserApi extends BaseAPI {
351
+ /**
352
+ * 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.
353
+ * @summary Approve a pending grant
354
+ * @param {string} id
355
+ * @param {*} [options] Override http request option.
356
+ * @throws {RequiredError}
357
+ */
358
+ accept(id, options) {
359
+ return DelegatedBrowseGrantsEndUserApiFp(this.configuration).accept(id, options).then((request) => request(this.axios, this.basePath));
360
+ }
361
+ /**
362
+ *
363
+ * @summary Refuse a pending grant
364
+ * @param {string} id
365
+ * @param {*} [options] Override http request option.
366
+ * @throws {RequiredError}
367
+ */
368
+ decline(id, options) {
369
+ return DelegatedBrowseGrantsEndUserApiFp(this.configuration).decline(id, options).then((request) => request(this.axios, this.basePath));
370
+ }
371
+ /**
372
+ * 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.
373
+ * @summary Disable the webhook created from this grant
374
+ * @param {string} id
375
+ * @param {*} [options] Override http request option.
376
+ * @throws {RequiredError}
377
+ */
378
+ disableLinkedWebhook(id, options) {
379
+ return DelegatedBrowseGrantsEndUserApiFp(this.configuration).disableLinkedWebhook(id, options).then((request) => request(this.axios, this.basePath));
380
+ }
381
+ /**
382
+ * Optionally filter by ?status=PENDING|ACCEPTED|...
383
+ * @summary List grants addressed to me
384
+ * @param {ListIncomingStatusEnum} [status]
385
+ * @param {*} [options] Override http request option.
386
+ * @throws {RequiredError}
387
+ */
388
+ listIncoming(status, options) {
389
+ return DelegatedBrowseGrantsEndUserApiFp(this.configuration).listIncoming(status, options).then((request) => request(this.axios, this.basePath));
390
+ }
391
+ /**
392
+ * Flip ACCEPTED → REVOKED. Immediate — any in-flight admin browse becomes 410 on its next call.
393
+ * @summary Revoke an accepted grant
394
+ * @param {string} id
395
+ * @param {*} [options] Override http request option.
396
+ * @throws {RequiredError}
397
+ */
398
+ revoke(id, options) {
399
+ return DelegatedBrowseGrantsEndUserApiFp(this.configuration).revoke(id, options).then((request) => request(this.axios, this.basePath));
400
+ }
401
+ }
402
+ export const ListIncomingStatusEnum = {
403
+ Pending: 'PENDING',
404
+ Accepted: 'ACCEPTED',
405
+ Declined: 'DECLINED',
406
+ Revoked: 'REVOKED',
407
+ Expired: 'EXPIRED',
408
+ Consumed: 'CONSUMED'
409
+ };
@@ -0,0 +1,105 @@
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 { MintUploadTokenRequest } from '../models';
16
+ import type { UploadResponse } from '../models';
17
+ import type { UploadTokenResponse } from '../models';
18
+ /**
19
+ * UploadTokenControllerApi - axios parameter creator
20
+ */
21
+ export declare const UploadTokenControllerApiAxiosParamCreator: (configuration?: Configuration) => {
22
+ /**
23
+ * Issues a one-shot HS256 JWT scoped to a single upload into a single folder. Caller must hold the UPLOAD_TOKEN_ISSUER realm role.
24
+ * @summary Mint a scoped upload token
25
+ * @param {MintUploadTokenRequest} mintUploadTokenRequest
26
+ * @param {*} [options] Override http request option.
27
+ * @throws {RequiredError}
28
+ */
29
+ mintUploadToken: (mintUploadTokenRequest: MintUploadTokenRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
30
+ /**
31
+ * 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.
32
+ * @summary Upload a single document with a scoped upload token
33
+ * @param {File} file
34
+ * @param {string} [metadata]
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ uploadWithToken: (file: File, metadata?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
39
+ };
40
+ /**
41
+ * UploadTokenControllerApi - functional programming interface
42
+ */
43
+ export declare const UploadTokenControllerApiFp: (configuration?: Configuration) => {
44
+ /**
45
+ * Issues a one-shot HS256 JWT scoped to a single upload into a single folder. Caller must hold the UPLOAD_TOKEN_ISSUER realm role.
46
+ * @summary Mint a scoped upload token
47
+ * @param {MintUploadTokenRequest} mintUploadTokenRequest
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ */
51
+ mintUploadToken(mintUploadTokenRequest: MintUploadTokenRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadTokenResponse>>;
52
+ /**
53
+ * 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.
54
+ * @summary Upload a single document with a scoped upload token
55
+ * @param {File} file
56
+ * @param {string} [metadata]
57
+ * @param {*} [options] Override http request option.
58
+ * @throws {RequiredError}
59
+ */
60
+ uploadWithToken(file: File, metadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadResponse>>;
61
+ };
62
+ /**
63
+ * UploadTokenControllerApi - factory interface
64
+ */
65
+ export declare const UploadTokenControllerApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
66
+ /**
67
+ * Issues a one-shot HS256 JWT scoped to a single upload into a single folder. Caller must hold the UPLOAD_TOKEN_ISSUER realm role.
68
+ * @summary Mint a scoped upload token
69
+ * @param {MintUploadTokenRequest} mintUploadTokenRequest
70
+ * @param {*} [options] Override http request option.
71
+ * @throws {RequiredError}
72
+ */
73
+ mintUploadToken(mintUploadTokenRequest: MintUploadTokenRequest, options?: RawAxiosRequestConfig): AxiosPromise<UploadTokenResponse>;
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(file: File, metadata?: string, options?: RawAxiosRequestConfig): AxiosPromise<UploadResponse>;
83
+ };
84
+ /**
85
+ * UploadTokenControllerApi - object-oriented interface
86
+ */
87
+ export declare class UploadTokenControllerApi extends BaseAPI {
88
+ /**
89
+ * Issues a one-shot HS256 JWT scoped to a single upload into a single folder. Caller must hold the UPLOAD_TOKEN_ISSUER realm role.
90
+ * @summary Mint a scoped upload token
91
+ * @param {MintUploadTokenRequest} mintUploadTokenRequest
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ */
95
+ mintUploadToken(mintUploadTokenRequest: MintUploadTokenRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UploadTokenResponse, any, {}>>;
96
+ /**
97
+ * 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.
98
+ * @summary Upload a single document with a scoped upload token
99
+ * @param {File} file
100
+ * @param {string} [metadata]
101
+ * @param {*} [options] Override http request option.
102
+ * @throws {RequiredError}
103
+ */
104
+ uploadWithToken(file: File, metadata?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UploadResponse, any, {}>>;
105
+ }