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