@lumeweb/portal-sdk 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/account/generated/accountAPI.schemas.d.ts +427 -20
- package/dist/esm/account/generated/billing.d.ts +688 -0
- package/dist/esm/account/generated/billing.js +444 -0
- package/dist/esm/account/generated/billing.js.map +1 -0
- package/dist/esm/account/generated/default.d.ts +118 -97
- package/dist/esm/account/generated/default.js +181 -41
- package/dist/esm/account/generated/default.js.map +1 -1
- package/dist/esm/account/generated/index.d.ts +3 -3
- package/dist/esm/account/generated/index.js +2 -2
- package/dist/esm/account/generated/quota.d.ts +35 -0
- package/dist/esm/account/generated/quota.js +28 -0
- package/dist/esm/account/generated/quota.js.map +1 -0
- package/dist/esm/account.d.ts +0 -1
- package/dist/esm/account.js.map +1 -1
- package/dist/esm/http-utils.d.ts +0 -1
- package/dist/esm/http-utils.js.map +1 -1
- package/dist/esm/index.d.ts +5 -3
- package/dist/esm/index.js +4 -2
- package/dist/esm/openapi.d.ts +3 -3
- package/dist/esm/openapi.js +2 -2
- package/dist/esm/query-utils.d.ts +0 -1
- package/dist/esm/types.js.map +1 -1
- package/package.json +5 -5
- package/dist/cjs/account/generated/accountAPI.schemas.cjs +0 -0
- package/dist/cjs/account/generated/accountAPI.schemas.d.cts +0 -239
- package/dist/cjs/account/generated/default.cjs +0 -676
- package/dist/cjs/account/generated/default.cjs.map +0 -1
- package/dist/cjs/account/generated/default.d.cts +0 -923
- package/dist/cjs/account/generated/index.cjs +0 -58
- package/dist/cjs/account/generated/index.d.cts +0 -3
- package/dist/cjs/account.cjs +0 -348
- package/dist/cjs/account.cjs.map +0 -1
- package/dist/cjs/account.d.cts +0 -200
- package/dist/cjs/http-utils.cjs +0 -87
- package/dist/cjs/http-utils.cjs.map +0 -1
- package/dist/cjs/http-utils.d.cts +0 -54
- package/dist/cjs/index.cjs +0 -75
- package/dist/cjs/index.d.cts +0 -8
- package/dist/cjs/openapi.cjs +0 -58
- package/dist/cjs/openapi.d.cts +0 -3
- package/dist/cjs/query-utils.cjs +0 -44
- package/dist/cjs/query-utils.cjs.map +0 -1
- package/dist/cjs/query-utils.d.cts +0 -65
- package/dist/cjs/sdk.cjs +0 -20
- package/dist/cjs/sdk.cjs.map +0 -1
- package/dist/cjs/sdk.d.cts +0 -12
- package/dist/cjs/types.cjs +0 -116
- package/dist/cjs/types.cjs.map +0 -1
- package/dist/cjs/types.d.cts +0 -58
package/dist/cjs/account.d.cts
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { OperationPollingOptions, Result } from "./types.cjs";
|
|
2
|
-
import { AccountInfoResponse, LoginRequest, LoginResponse, OTPDisableRequest, OTPGenerateResponse, OTPValidateRequest, OTPVerifyRequest, OperationDetailResponse, OperationFiltersResponseResponse, OperationListItemResponse, PasswordResetRequest, PasswordResetVerifyRequest, PongResponse, RegisterRequest, ResendVerifyEmailRequest, UploadLimitResponse, VerifyEmailRequest } from "./account/generated/accountAPI.schemas.cjs";
|
|
3
|
-
import { OperationsListParams } from "./query-utils.cjs";
|
|
4
|
-
|
|
5
|
-
//#region src/account.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Operation status constants
|
|
9
|
-
*/
|
|
10
|
-
declare const OPERATION_STATUS: {
|
|
11
|
-
readonly COMPLETED: "completed";
|
|
12
|
-
readonly FAILED: "failed";
|
|
13
|
-
readonly ERROR: "error";
|
|
14
|
-
readonly PENDING: "pending";
|
|
15
|
-
readonly RUNNING: "running";
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Default settled states for operations
|
|
19
|
-
*/
|
|
20
|
-
declare const DEFAULT_SETTLED_STATES: readonly ["completed", "failed", "error"];
|
|
21
|
-
type SettledState = typeof DEFAULT_SETTLED_STATES[number];
|
|
22
|
-
declare class AccountApi {
|
|
23
|
-
private _jwtToken?;
|
|
24
|
-
private readonly apiUrl;
|
|
25
|
-
/**
|
|
26
|
-
* Gets the current JWT token
|
|
27
|
-
* @returns {string|undefined} The current JWT token or undefined if not set
|
|
28
|
-
*/
|
|
29
|
-
private get jwtToken();
|
|
30
|
-
/**
|
|
31
|
-
* Creates a new AccountApi instance
|
|
32
|
-
* @param {string} apiUrl - The base API URL
|
|
33
|
-
*/
|
|
34
|
-
constructor(apiUrl: string);
|
|
35
|
-
/**
|
|
36
|
-
* Clears the current JWT token
|
|
37
|
-
*/
|
|
38
|
-
clearToken(): void;
|
|
39
|
-
/**
|
|
40
|
-
* Confirm a password reset
|
|
41
|
-
* @param passwordResetVerifyRequest Password reset verification details
|
|
42
|
-
* @returns Result indicating success or failure
|
|
43
|
-
*/
|
|
44
|
-
confirmPasswordReset(passwordResetVerifyRequest: PasswordResetVerifyRequest): Promise<Result<void>>;
|
|
45
|
-
/**
|
|
46
|
-
* Disable OTP for two-factor authentication
|
|
47
|
-
* @param otpDisableRequest OTP disable request details
|
|
48
|
-
* @returns Result indicating success or failure
|
|
49
|
-
*/
|
|
50
|
-
disableOtp(otpDisableRequest: OTPDisableRequest): Promise<Result<void>>;
|
|
51
|
-
/**
|
|
52
|
-
* Generate OTP for two-factor authentication
|
|
53
|
-
* @returns Result containing OTP response
|
|
54
|
-
*/
|
|
55
|
-
generateOtp(): Promise<Result<OTPGenerateResponse>>;
|
|
56
|
-
/**
|
|
57
|
-
* Get account information
|
|
58
|
-
* @returns Result containing account info
|
|
59
|
-
*/
|
|
60
|
-
info(): Promise<Result<AccountInfoResponse>>;
|
|
61
|
-
/**
|
|
62
|
-
* Login to the account service
|
|
63
|
-
* @param loginRequest Login credentials
|
|
64
|
-
* @returns Result containing login response or error
|
|
65
|
-
*/
|
|
66
|
-
login(loginRequest: LoginRequest): Promise<Result<LoginResponse>>;
|
|
67
|
-
/**
|
|
68
|
-
* Logout from the account service
|
|
69
|
-
* @returns Result indicating success or failure
|
|
70
|
-
*/
|
|
71
|
-
logout(): Promise<Result<void>>;
|
|
72
|
-
/**
|
|
73
|
-
* Check authentication status
|
|
74
|
-
* @returns Result containing ping response
|
|
75
|
-
*/
|
|
76
|
-
ping(): Promise<Result<PongResponse>>;
|
|
77
|
-
/**
|
|
78
|
-
* Register a new account
|
|
79
|
-
* @param registerRequest Registration details
|
|
80
|
-
* @returns Result indicating success or failure
|
|
81
|
-
*/
|
|
82
|
-
register(registerRequest: RegisterRequest): Promise<Result<void>>;
|
|
83
|
-
/**
|
|
84
|
-
* Request account deletion
|
|
85
|
-
* @returns Result indicating success or failure
|
|
86
|
-
*/
|
|
87
|
-
requestAccountDeletion(): Promise<Result<void>>;
|
|
88
|
-
/**
|
|
89
|
-
* Request email verification to be resent
|
|
90
|
-
* @param resendRequest Email details for verification
|
|
91
|
-
* @returns Result indicating success or failure
|
|
92
|
-
*/
|
|
93
|
-
requestEmailVerification(resendRequest: ResendVerifyEmailRequest): Promise<Result<void>>;
|
|
94
|
-
/**
|
|
95
|
-
* Request a password reset
|
|
96
|
-
* @param passwordResetRequest Password reset request details
|
|
97
|
-
* @returns Result indicating success or failure
|
|
98
|
-
*/
|
|
99
|
-
requestPasswordReset(passwordResetRequest: PasswordResetRequest): Promise<Result<void>>;
|
|
100
|
-
/**
|
|
101
|
-
* Sets the JWT token for authentication
|
|
102
|
-
* @param {string} token - The JWT token to set
|
|
103
|
-
*/
|
|
104
|
-
setToken(token: string): void;
|
|
105
|
-
/**
|
|
106
|
-
* Update account email address
|
|
107
|
-
* @param email New email address
|
|
108
|
-
* @param password Current password for verification
|
|
109
|
-
* @returns Result indicating success or failure
|
|
110
|
-
*/
|
|
111
|
-
updateEmail(email: string, password: string): Promise<Result<void>>;
|
|
112
|
-
/**
|
|
113
|
-
* Update account password
|
|
114
|
-
* @param currentPassword Current password for verification
|
|
115
|
-
* @param newPassword New password to set
|
|
116
|
-
* @returns Result indicating success or failure
|
|
117
|
-
*/
|
|
118
|
-
updatePassword(currentPassword: string, newPassword: string): Promise<Result<void>>;
|
|
119
|
-
/**
|
|
120
|
-
* Get upload limit information
|
|
121
|
-
* @returns Result containing upload limit info
|
|
122
|
-
*/
|
|
123
|
-
uploadLimit(): Promise<Result<UploadLimitResponse>>;
|
|
124
|
-
/**
|
|
125
|
-
* Validate OTP for two-factor authentication login
|
|
126
|
-
* @param otpValidateRequest OTP validation details
|
|
127
|
-
* @returns Result containing login response
|
|
128
|
-
*/
|
|
129
|
-
validateOtp(otpValidateRequest: OTPValidateRequest): Promise<Result<LoginResponse>>;
|
|
130
|
-
/**
|
|
131
|
-
* Verify email address
|
|
132
|
-
* @param verifyEmailRequest Email verification details
|
|
133
|
-
* @param login Optional flag to enable auto-login after verification
|
|
134
|
-
* @returns Result indicating success or failure
|
|
135
|
-
*/
|
|
136
|
-
verifyEmail(verifyEmailRequest: VerifyEmailRequest, login?: boolean): Promise<Result<void>>;
|
|
137
|
-
/**
|
|
138
|
-
* Verify OTP for enabling two-factor authentication
|
|
139
|
-
* @param otpVerifyRequest OTP verification details
|
|
140
|
-
* @returns Result indicating success or failure
|
|
141
|
-
*/
|
|
142
|
-
verifyOtp(otpVerifyRequest: OTPVerifyRequest): Promise<Result<void>>;
|
|
143
|
-
/**
|
|
144
|
-
* List operations with filtering, searching, and pagination
|
|
145
|
-
*
|
|
146
|
-
* @param params Query parameters using query-builder helpers
|
|
147
|
-
* @returns Result containing list of operations
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```ts
|
|
151
|
-
* const result = await accountApi.listOperations({
|
|
152
|
-
* filters: [
|
|
153
|
-
* { field: "status", operator: "eq", value: "completed" },
|
|
154
|
-
* { field: "operation", operator: "in", value: ["upload", "download"] }
|
|
155
|
-
* ],
|
|
156
|
-
* sorters: [{ field: "id", order: "desc" }],
|
|
157
|
-
* pagination: { start: 0, end: 20, page: 1, pageSize: 20 },
|
|
158
|
-
* search: "myfile"
|
|
159
|
-
* });
|
|
160
|
-
* ```
|
|
161
|
-
*/
|
|
162
|
-
listOperations(params?: OperationsListParams): Promise<Result<OperationListItemResponse>>;
|
|
163
|
-
/**
|
|
164
|
-
* Get detailed information for a specific operation
|
|
165
|
-
* @param id The operation ID
|
|
166
|
-
* @returns Result containing operation details
|
|
167
|
-
*/
|
|
168
|
-
getOperation(id: number): Promise<Result<OperationDetailResponse>>;
|
|
169
|
-
/**
|
|
170
|
-
* Get available filter values for operations
|
|
171
|
-
* @returns Result containing filter options
|
|
172
|
-
*/
|
|
173
|
-
getOperationFilters(): Promise<Result<OperationFiltersResponseResponse>>;
|
|
174
|
-
/**
|
|
175
|
-
* Wait for an operation to complete or reach a settled state
|
|
176
|
-
* @param id The operation ID to wait for
|
|
177
|
-
* @param options Polling options (interval, timeout, settledStates)
|
|
178
|
-
* @returns Result containing the final operation details
|
|
179
|
-
*/
|
|
180
|
-
waitForOperation(id: number, options?: OperationPollingOptions): Promise<Result<OperationDetailResponse>>;
|
|
181
|
-
/**
|
|
182
|
-
* Builds fetch options with authorization headers
|
|
183
|
-
* @param {RequestInit} [init] - Optional initial request options
|
|
184
|
-
* @returns {RequestInit} The constructed request options
|
|
185
|
-
* @private
|
|
186
|
-
*/
|
|
187
|
-
private buildOptions;
|
|
188
|
-
/**
|
|
189
|
-
* Makes a JSON request to the API
|
|
190
|
-
* @template T
|
|
191
|
-
* @param {string} input - The API endpoint path or absolute URL
|
|
192
|
-
* @param {RequestInit} [init] - Optional request initialization
|
|
193
|
-
* @returns {Promise<Result<T>>} Promise resolving to the result
|
|
194
|
-
* @private
|
|
195
|
-
*/
|
|
196
|
-
private fetchJson;
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
export { AccountApi, DEFAULT_SETTLED_STATES, OPERATION_STATUS, type SettledState };
|
|
200
|
-
//# sourceMappingURL=account.d.cts.map
|
package/dist/cjs/http-utils.cjs
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
const require_types = require('./types.cjs');
|
|
2
|
-
|
|
3
|
-
//#region src/http-utils.ts
|
|
4
|
-
/**
|
|
5
|
-
* Creates a promise that resolves after a specified delay
|
|
6
|
-
* @param ms Delay in milliseconds
|
|
7
|
-
* @returns Promise that resolves after the delay
|
|
8
|
-
*/
|
|
9
|
-
function delay(ms) {
|
|
10
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Polls a fetch function until a condition is met or timeout occurs
|
|
14
|
-
* @template T The type of data returned by the fetch function
|
|
15
|
-
* @param fetchFn Function that fetches the current state
|
|
16
|
-
* @param shouldStop Predicate function that determines when to stop polling
|
|
17
|
-
* @param options Polling options (interval, timeout)
|
|
18
|
-
* @returns Promise resolving to the final fetch result
|
|
19
|
-
*/
|
|
20
|
-
async function poll(fetchFn, shouldStop, options = {}) {
|
|
21
|
-
const { interval = 2e3, timeout = 3e5 } = options;
|
|
22
|
-
const startTime = Date.now();
|
|
23
|
-
const timeoutMs = timeout;
|
|
24
|
-
const pollInternal = async () => {
|
|
25
|
-
if (Date.now() - startTime >= timeoutMs) return {
|
|
26
|
-
error: new require_types.AccountError(`Polling timed out after ${timeout}ms`, 408),
|
|
27
|
-
success: false
|
|
28
|
-
};
|
|
29
|
-
const result = await fetchFn();
|
|
30
|
-
if (!result.success) return result;
|
|
31
|
-
if (result.data && shouldStop(result.data)) return result;
|
|
32
|
-
const remainingTime = timeoutMs - (Date.now() - startTime);
|
|
33
|
-
await delay(Math.min(interval, remainingTime));
|
|
34
|
-
return pollInternal();
|
|
35
|
-
};
|
|
36
|
-
return pollInternal();
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Checks if a response has an empty body based on status code or content-length header
|
|
40
|
-
* @param {Response} response - The response to check
|
|
41
|
-
* @returns {boolean} True if the response is empty, false otherwise
|
|
42
|
-
*/
|
|
43
|
-
function isEmptyResponse(response) {
|
|
44
|
-
if ([
|
|
45
|
-
204,
|
|
46
|
-
205,
|
|
47
|
-
304
|
|
48
|
-
].includes(response.status)) return true;
|
|
49
|
-
const contentLength = response.headers.get("content-length");
|
|
50
|
-
return !!(contentLength === "0" || contentLength && parseInt(contentLength, 10) === 0);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Safely parses a response body, handling empty responses
|
|
54
|
-
* @param {Response} response - The response to parse
|
|
55
|
-
* @returns {Promise<T>} The parsed data or undefined for empty responses
|
|
56
|
-
*/
|
|
57
|
-
async function parseResponse(response) {
|
|
58
|
-
if (isEmptyResponse(response)) return;
|
|
59
|
-
try {
|
|
60
|
-
return await response.json();
|
|
61
|
-
} catch (error) {
|
|
62
|
-
if (isEmptyResponse(response)) return;
|
|
63
|
-
throw error;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Standardized fetch wrapper with consistent error handling
|
|
68
|
-
* @param {string} url - The URL to fetch
|
|
69
|
-
* @param {RequestInit} init - Fetch options
|
|
70
|
-
* @returns {Promise<{ data: T; status: number; headers: Headers }>}
|
|
71
|
-
*/
|
|
72
|
-
async function fetchWithHandling(url, init = {}) {
|
|
73
|
-
const response = await fetch(url, init);
|
|
74
|
-
return {
|
|
75
|
-
data: await parseResponse(response),
|
|
76
|
-
status: response.status,
|
|
77
|
-
headers: response.headers
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
//#endregion
|
|
82
|
-
exports.delay = delay;
|
|
83
|
-
exports.fetchWithHandling = fetchWithHandling;
|
|
84
|
-
exports.isEmptyResponse = isEmptyResponse;
|
|
85
|
-
exports.parseResponse = parseResponse;
|
|
86
|
-
exports.poll = poll;
|
|
87
|
-
//# sourceMappingURL=http-utils.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-utils.cjs","names":["AccountError"],"sources":["../../src/http-utils.ts"],"sourcesContent":["import type { RequestInit, Result } from \"@/types\";\nimport { AccountError } from \"@/types\";\n\n/**\n * Creates a promise that resolves after a specified delay\n * @param ms Delay in milliseconds\n * @returns Promise that resolves after the delay\n */\nexport function delay(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Options for polling a condition\n */\nexport interface PollOptions<T> {\n /** Polling interval in milliseconds (default: 2000) */\n interval?: number;\n /** Maximum time to wait in milliseconds (default: 300000 = 5 minutes) */\n timeout?: number;\n}\n\n/**\n * Polls a fetch function until a condition is met or timeout occurs\n * @template T The type of data returned by the fetch function\n * @param fetchFn Function that fetches the current state\n * @param shouldStop Predicate function that determines when to stop polling\n * @param options Polling options (interval, timeout)\n * @returns Promise resolving to the final fetch result\n */\nexport async function poll<T>(\n fetchFn: () => Promise<Result<T>>,\n shouldStop: (value: T) => boolean,\n options: PollOptions<T> = {},\n): Promise<Result<T>> {\n const { interval = 2000, timeout = 300000 } = options;\n const startTime = Date.now();\n const timeoutMs = timeout;\n\n const pollInternal = async (): Promise<Result<T>> => {\n const elapsed = Date.now() - startTime;\n \n if (elapsed >= timeoutMs) {\n return {\n error: new AccountError(`Polling timed out after ${timeout}ms`, 408),\n success: false,\n };\n }\n\n const result = await fetchFn();\n\n if (!result.success) {\n return result;\n }\n\n if (result.data && shouldStop(result.data)) {\n return result;\n }\n\n // Recalculate elapsed time after fetchFn completes to account for network latency\n const currentElapsed = Date.now() - startTime;\n const remainingTime = timeoutMs - currentElapsed;\n const nextInterval = Math.min(interval, remainingTime);\n await delay(nextInterval);\n return pollInternal();\n };\n\n return pollInternal();\n}\n\n/**\n * Checks if a response has an empty body based on status code or content-length header\n * @param {Response} response - The response to check\n * @returns {boolean} True if the response is empty, false otherwise\n */\nexport function isEmptyResponse(response: Response): boolean {\n const emptyStatusCodes = [204, 205, 304];\n if (emptyStatusCodes.includes(response.status)) {\n return true;\n }\n\n const contentLength = response.headers.get(\"content-length\");\n return !!(\n contentLength === \"0\" ||\n (contentLength && parseInt(contentLength, 10) === 0)\n );\n}\n\n/**\n * Safely parses a response body, handling empty responses\n * @param {Response} response - The response to parse\n * @returns {Promise<T>} The parsed data or undefined for empty responses\n */\nexport async function parseResponse<T>(response: Response): Promise<T> {\n if (isEmptyResponse(response)) {\n return undefined as unknown as T;\n }\n\n try {\n return await response.json();\n } catch (error) {\n if (isEmptyResponse(response)) {\n return undefined as unknown as T;\n }\n throw error;\n }\n}\n\n/**\n * Standardized fetch wrapper with consistent error handling\n * @param {string} url - The URL to fetch\n * @param {RequestInit} init - Fetch options\n * @returns {Promise<{ data: T; status: number; headers: Headers }>}\n */\nexport async function fetchWithHandling<T>(\n url: string,\n init: RequestInit = {},\n): Promise<{ data: T; status: number; headers: Headers }> {\n const response = await fetch(url, init);\n const data = await parseResponse<T>(response);\n return { data, status: response.status, headers: response.headers };\n}\n"],"mappings":";;;;;;;;AAQA,SAAgB,MAAM,IAA2B;AAC/C,QAAO,IAAI,SAAS,YAAY,WAAW,SAAS,GAAG,CAAC;;;;;;;;;;AAqB1D,eAAsB,KACpB,SACA,YACA,UAA0B,EAAE,EACR;CACpB,MAAM,EAAE,WAAW,KAAM,UAAU,QAAW;CAC9C,MAAM,YAAY,KAAK,KAAK;CAC5B,MAAM,YAAY;CAElB,MAAM,eAAe,YAAgC;AAGnD,MAFgB,KAAK,KAAK,GAAG,aAEd,UACb,QAAO;GACL,OAAO,IAAIA,2BAAa,2BAA2B,QAAQ,KAAK,IAAI;GACpE,SAAS;GACV;EAGH,MAAM,SAAS,MAAM,SAAS;AAE9B,MAAI,CAAC,OAAO,QACV,QAAO;AAGT,MAAI,OAAO,QAAQ,WAAW,OAAO,KAAK,CACxC,QAAO;EAKT,MAAM,gBAAgB,aADC,KAAK,KAAK,GAAG;AAGpC,QAAM,MADe,KAAK,IAAI,UAAU,cAAc,CAC7B;AACzB,SAAO,cAAc;;AAGvB,QAAO,cAAc;;;;;;;AAQvB,SAAgB,gBAAgB,UAA6B;AAE3D,KADyB;EAAC;EAAK;EAAK;EAAI,CACnB,SAAS,SAAS,OAAO,CAC5C,QAAO;CAGT,MAAM,gBAAgB,SAAS,QAAQ,IAAI,iBAAiB;AAC5D,QAAO,CAAC,EACN,kBAAkB,OACjB,iBAAiB,SAAS,eAAe,GAAG,KAAK;;;;;;;AAStD,eAAsB,cAAiB,UAAgC;AACrE,KAAI,gBAAgB,SAAS,CAC3B;AAGF,KAAI;AACF,SAAO,MAAM,SAAS,MAAM;UACrB,OAAO;AACd,MAAI,gBAAgB,SAAS,CAC3B;AAEF,QAAM;;;;;;;;;AAUV,eAAsB,kBACpB,KACA,OAAoB,EAAE,EACkC;CACxD,MAAM,WAAW,MAAM,MAAM,KAAK,KAAK;AAEvC,QAAO;EAAE,MADI,MAAM,cAAiB,SAAS;EAC9B,QAAQ,SAAS;EAAQ,SAAS,SAAS;EAAS"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { RequestInit, Result } from "./types.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/http-utils.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Creates a promise that resolves after a specified delay
|
|
7
|
-
* @param ms Delay in milliseconds
|
|
8
|
-
* @returns Promise that resolves after the delay
|
|
9
|
-
*/
|
|
10
|
-
declare function delay(ms: number): Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
* Options for polling a condition
|
|
13
|
-
*/
|
|
14
|
-
interface PollOptions<T> {
|
|
15
|
-
/** Polling interval in milliseconds (default: 2000) */
|
|
16
|
-
interval?: number;
|
|
17
|
-
/** Maximum time to wait in milliseconds (default: 300000 = 5 minutes) */
|
|
18
|
-
timeout?: number;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Polls a fetch function until a condition is met or timeout occurs
|
|
22
|
-
* @template T The type of data returned by the fetch function
|
|
23
|
-
* @param fetchFn Function that fetches the current state
|
|
24
|
-
* @param shouldStop Predicate function that determines when to stop polling
|
|
25
|
-
* @param options Polling options (interval, timeout)
|
|
26
|
-
* @returns Promise resolving to the final fetch result
|
|
27
|
-
*/
|
|
28
|
-
declare function poll<T>(fetchFn: () => Promise<Result<T>>, shouldStop: (value: T) => boolean, options?: PollOptions<T>): Promise<Result<T>>;
|
|
29
|
-
/**
|
|
30
|
-
* Checks if a response has an empty body based on status code or content-length header
|
|
31
|
-
* @param {Response} response - The response to check
|
|
32
|
-
* @returns {boolean} True if the response is empty, false otherwise
|
|
33
|
-
*/
|
|
34
|
-
declare function isEmptyResponse(response: Response): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Safely parses a response body, handling empty responses
|
|
37
|
-
* @param {Response} response - The response to parse
|
|
38
|
-
* @returns {Promise<T>} The parsed data or undefined for empty responses
|
|
39
|
-
*/
|
|
40
|
-
declare function parseResponse<T>(response: Response): Promise<T>;
|
|
41
|
-
/**
|
|
42
|
-
* Standardized fetch wrapper with consistent error handling
|
|
43
|
-
* @param {string} url - The URL to fetch
|
|
44
|
-
* @param {RequestInit} init - Fetch options
|
|
45
|
-
* @returns {Promise<{ data: T; status: number; headers: Headers }>}
|
|
46
|
-
*/
|
|
47
|
-
declare function fetchWithHandling<T>(url: string, init?: RequestInit): Promise<{
|
|
48
|
-
data: T;
|
|
49
|
-
status: number;
|
|
50
|
-
headers: Headers;
|
|
51
|
-
}>;
|
|
52
|
-
//#endregion
|
|
53
|
-
export { PollOptions, delay, fetchWithHandling, isEmptyResponse, parseResponse, poll };
|
|
54
|
-
//# sourceMappingURL=http-utils.d.cts.map
|
package/dist/cjs/index.cjs
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
const require_http_utils = require('./http-utils.cjs');
|
|
2
|
-
const require_types = require('./types.cjs');
|
|
3
|
-
const require_query_utils = require('./query-utils.cjs');
|
|
4
|
-
const require_account = require('./account.cjs');
|
|
5
|
-
const require_sdk = require('./sdk.cjs');
|
|
6
|
-
const require_account_generated_default = require('./account/generated/default.cjs');
|
|
7
|
-
|
|
8
|
-
exports.AccountError = require_types.AccountError;
|
|
9
|
-
exports.DEFAULT_SETTLED_STATES = require_account.DEFAULT_SETTLED_STATES;
|
|
10
|
-
exports.OPERATION_STATUS = require_account.OPERATION_STATUS;
|
|
11
|
-
exports.Sdk = require_sdk.Sdk;
|
|
12
|
-
exports.buildOperationsQueryParams = require_query_utils.buildOperationsQueryParams;
|
|
13
|
-
exports.delay = require_http_utils.delay;
|
|
14
|
-
exports.deleteApiAccount = require_account_generated_default.deleteApiAccount;
|
|
15
|
-
exports.deleteApiAccountKeysKeyID = require_account_generated_default.deleteApiAccountKeysKeyID;
|
|
16
|
-
exports.fetchWithHandling = require_http_utils.fetchWithHandling;
|
|
17
|
-
exports.getApiAccount = require_account_generated_default.getApiAccount;
|
|
18
|
-
exports.getApiAccountAvatar = require_account_generated_default.getApiAccountAvatar;
|
|
19
|
-
exports.getApiAccountKeys = require_account_generated_default.getApiAccountKeys;
|
|
20
|
-
exports.getApiAccountPermissions = require_account_generated_default.getApiAccountPermissions;
|
|
21
|
-
exports.getApiOperations = require_account_generated_default.getApiOperations;
|
|
22
|
-
exports.getApiOperationsFilters = require_account_generated_default.getApiOperationsFilters;
|
|
23
|
-
exports.getApiOperationsId = require_account_generated_default.getApiOperationsId;
|
|
24
|
-
exports.getApiUploadLimit = require_account_generated_default.getApiUploadLimit;
|
|
25
|
-
exports.getDeleteApiAccountKeysKeyIDUrl = require_account_generated_default.getDeleteApiAccountKeysKeyIDUrl;
|
|
26
|
-
exports.getDeleteApiAccountUrl = require_account_generated_default.getDeleteApiAccountUrl;
|
|
27
|
-
exports.getGetApiAccountAvatarUrl = require_account_generated_default.getGetApiAccountAvatarUrl;
|
|
28
|
-
exports.getGetApiAccountKeysUrl = require_account_generated_default.getGetApiAccountKeysUrl;
|
|
29
|
-
exports.getGetApiAccountPermissionsUrl = require_account_generated_default.getGetApiAccountPermissionsUrl;
|
|
30
|
-
exports.getGetApiAccountUrl = require_account_generated_default.getGetApiAccountUrl;
|
|
31
|
-
exports.getGetApiOperationsFiltersUrl = require_account_generated_default.getGetApiOperationsFiltersUrl;
|
|
32
|
-
exports.getGetApiOperationsIdUrl = require_account_generated_default.getGetApiOperationsIdUrl;
|
|
33
|
-
exports.getGetApiOperationsUrl = require_account_generated_default.getGetApiOperationsUrl;
|
|
34
|
-
exports.getGetApiUploadLimitUrl = require_account_generated_default.getGetApiUploadLimitUrl;
|
|
35
|
-
exports.getPatchApiAccountUrl = require_account_generated_default.getPatchApiAccountUrl;
|
|
36
|
-
exports.getPostApiAccountAvatarUrl = require_account_generated_default.getPostApiAccountAvatarUrl;
|
|
37
|
-
exports.getPostApiAccountKeysUrl = require_account_generated_default.getPostApiAccountKeysUrl;
|
|
38
|
-
exports.getPostApiAccountPasswordResetConfirmUrl = require_account_generated_default.getPostApiAccountPasswordResetConfirmUrl;
|
|
39
|
-
exports.getPostApiAccountPasswordResetRequestUrl = require_account_generated_default.getPostApiAccountPasswordResetRequestUrl;
|
|
40
|
-
exports.getPostApiAccountUpdateEmailUrl = require_account_generated_default.getPostApiAccountUpdateEmailUrl;
|
|
41
|
-
exports.getPostApiAccountUpdatePasswordUrl = require_account_generated_default.getPostApiAccountUpdatePasswordUrl;
|
|
42
|
-
exports.getPostApiAccountVerifyEmailResendUrl = require_account_generated_default.getPostApiAccountVerifyEmailResendUrl;
|
|
43
|
-
exports.getPostApiAccountVerifyEmailUrl = require_account_generated_default.getPostApiAccountVerifyEmailUrl;
|
|
44
|
-
exports.getPostApiAuthKeyUrl = require_account_generated_default.getPostApiAuthKeyUrl;
|
|
45
|
-
exports.getPostApiAuthLoginUrl = require_account_generated_default.getPostApiAuthLoginUrl;
|
|
46
|
-
exports.getPostApiAuthLogoutUrl = require_account_generated_default.getPostApiAuthLogoutUrl;
|
|
47
|
-
exports.getPostApiAuthOtpDisableUrl = require_account_generated_default.getPostApiAuthOtpDisableUrl;
|
|
48
|
-
exports.getPostApiAuthOtpGenerateUrl = require_account_generated_default.getPostApiAuthOtpGenerateUrl;
|
|
49
|
-
exports.getPostApiAuthOtpValidateUrl = require_account_generated_default.getPostApiAuthOtpValidateUrl;
|
|
50
|
-
exports.getPostApiAuthOtpVerifyUrl = require_account_generated_default.getPostApiAuthOtpVerifyUrl;
|
|
51
|
-
exports.getPostApiAuthPingUrl = require_account_generated_default.getPostApiAuthPingUrl;
|
|
52
|
-
exports.getPostApiAuthRegisterUrl = require_account_generated_default.getPostApiAuthRegisterUrl;
|
|
53
|
-
exports.handleFetchError = require_types.handleFetchError;
|
|
54
|
-
exports.handleUnknownError = require_types.handleUnknownError;
|
|
55
|
-
exports.isEmptyResponse = require_http_utils.isEmptyResponse;
|
|
56
|
-
exports.parseResponse = require_http_utils.parseResponse;
|
|
57
|
-
exports.patchApiAccount = require_account_generated_default.patchApiAccount;
|
|
58
|
-
exports.poll = require_http_utils.poll;
|
|
59
|
-
exports.postApiAccountAvatar = require_account_generated_default.postApiAccountAvatar;
|
|
60
|
-
exports.postApiAccountKeys = require_account_generated_default.postApiAccountKeys;
|
|
61
|
-
exports.postApiAccountPasswordResetConfirm = require_account_generated_default.postApiAccountPasswordResetConfirm;
|
|
62
|
-
exports.postApiAccountPasswordResetRequest = require_account_generated_default.postApiAccountPasswordResetRequest;
|
|
63
|
-
exports.postApiAccountUpdateEmail = require_account_generated_default.postApiAccountUpdateEmail;
|
|
64
|
-
exports.postApiAccountUpdatePassword = require_account_generated_default.postApiAccountUpdatePassword;
|
|
65
|
-
exports.postApiAccountVerifyEmail = require_account_generated_default.postApiAccountVerifyEmail;
|
|
66
|
-
exports.postApiAccountVerifyEmailResend = require_account_generated_default.postApiAccountVerifyEmailResend;
|
|
67
|
-
exports.postApiAuthKey = require_account_generated_default.postApiAuthKey;
|
|
68
|
-
exports.postApiAuthLogin = require_account_generated_default.postApiAuthLogin;
|
|
69
|
-
exports.postApiAuthLogout = require_account_generated_default.postApiAuthLogout;
|
|
70
|
-
exports.postApiAuthOtpDisable = require_account_generated_default.postApiAuthOtpDisable;
|
|
71
|
-
exports.postApiAuthOtpGenerate = require_account_generated_default.postApiAuthOtpGenerate;
|
|
72
|
-
exports.postApiAuthOtpValidate = require_account_generated_default.postApiAuthOtpValidate;
|
|
73
|
-
exports.postApiAuthOtpVerify = require_account_generated_default.postApiAuthOtpVerify;
|
|
74
|
-
exports.postApiAuthPing = require_account_generated_default.postApiAuthPing;
|
|
75
|
-
exports.postApiAuthRegister = require_account_generated_default.postApiAuthRegister;
|
package/dist/cjs/index.d.cts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PollOptions, delay, fetchWithHandling, isEmptyResponse, parseResponse, poll } from "./http-utils.cjs";
|
|
2
|
-
import { AccountError, OperationPollingOptions, RequestInit, Result, handleFetchError, handleUnknownError } from "./types.cjs";
|
|
3
|
-
import { APIKeyCreateRequest, APIKeyResponse, APIKeyResponseResponse, AccessModel, AccessModelDef, AccessPolicy, AccountInfoResponse, AccountPermissionsResponse, BinUUID, BinaryUUID, CreateAPIKeyResponse, Error, ErrorResponse, GetApiAccountKeysParams, GetApiOperationsParams, LoginRequest, LoginResponse, OTPDisableRequest, OTPGenerateResponse, OTPValidateRequest, OTPVerifyRequest, OperationDetailResponse, OperationFilterItem, OperationFiltersResponse, OperationFiltersResponseData, OperationFiltersResponseResponse, OperationListItem, OperationListItemResponse, PasswordResetRequest, PasswordResetVerifyRequest, PongResponse, PostApiAccountAvatarBody, PostApiAccountVerifyEmailParams, RegisterRequest, ResendVerifyEmailRequest, UpdateEmailRequest, UpdatePasswordRequest, UpdateProfileRequest, UploadLimitResponse, Uuid, VerifyEmailRequest } from "./account/generated/accountAPI.schemas.cjs";
|
|
4
|
-
import { deleteApiAccount, deleteApiAccountKeysKeyID, deleteApiAccountKeysKeyIDResponse, deleteApiAccountKeysKeyIDResponse200, deleteApiAccountKeysKeyIDResponse400, deleteApiAccountKeysKeyIDResponse404, deleteApiAccountKeysKeyIDResponse500, deleteApiAccountKeysKeyIDResponseError, deleteApiAccountKeysKeyIDResponseSuccess, deleteApiAccountResponse, deleteApiAccountResponse200, deleteApiAccountResponse400, deleteApiAccountResponse404, deleteApiAccountResponse500, deleteApiAccountResponseError, deleteApiAccountResponseSuccess, getApiAccount, getApiAccountAvatar, getApiAccountAvatarResponse, getApiAccountAvatarResponse200, getApiAccountAvatarResponse400, getApiAccountAvatarResponse404, getApiAccountAvatarResponse500, getApiAccountAvatarResponseError, getApiAccountAvatarResponseSuccess, getApiAccountKeys, getApiAccountKeysResponse, getApiAccountKeysResponse200, getApiAccountKeysResponse400, getApiAccountKeysResponse404, getApiAccountKeysResponse500, getApiAccountKeysResponseError, getApiAccountKeysResponseSuccess, getApiAccountPermissions, getApiAccountPermissionsResponse, getApiAccountPermissionsResponse200, getApiAccountPermissionsResponse400, getApiAccountPermissionsResponse404, getApiAccountPermissionsResponse500, getApiAccountPermissionsResponseError, getApiAccountPermissionsResponseSuccess, getApiAccountResponse, getApiAccountResponse200, getApiAccountResponse400, getApiAccountResponse401, getApiAccountResponse403, getApiAccountResponse404, getApiAccountResponse500, getApiAccountResponseError, getApiAccountResponseSuccess, getApiOperations, getApiOperationsFilters, getApiOperationsFiltersResponse, getApiOperationsFiltersResponse200, getApiOperationsFiltersResponse400, getApiOperationsFiltersResponse404, getApiOperationsFiltersResponse500, getApiOperationsFiltersResponseError, getApiOperationsFiltersResponseSuccess, getApiOperationsId, getApiOperationsIdResponse, getApiOperationsIdResponse200, getApiOperationsIdResponse400, getApiOperationsIdResponse404, getApiOperationsIdResponse500, getApiOperationsIdResponseError, getApiOperationsIdResponseSuccess, getApiOperationsResponse, getApiOperationsResponse200, getApiOperationsResponse400, getApiOperationsResponse404, getApiOperationsResponse500, getApiOperationsResponseError, getApiOperationsResponseSuccess, getApiUploadLimit, getApiUploadLimitResponse, getApiUploadLimitResponse200, getApiUploadLimitResponse400, getApiUploadLimitResponse404, getApiUploadLimitResponse500, getApiUploadLimitResponseError, getApiUploadLimitResponseSuccess, getDeleteApiAccountKeysKeyIDUrl, getDeleteApiAccountUrl, getGetApiAccountAvatarUrl, getGetApiAccountKeysUrl, getGetApiAccountPermissionsUrl, getGetApiAccountUrl, getGetApiOperationsFiltersUrl, getGetApiOperationsIdUrl, getGetApiOperationsUrl, getGetApiUploadLimitUrl, getPatchApiAccountUrl, getPostApiAccountAvatarUrl, getPostApiAccountKeysUrl, getPostApiAccountPasswordResetConfirmUrl, getPostApiAccountPasswordResetRequestUrl, getPostApiAccountUpdateEmailUrl, getPostApiAccountUpdatePasswordUrl, getPostApiAccountVerifyEmailResendUrl, getPostApiAccountVerifyEmailUrl, getPostApiAuthKeyUrl, getPostApiAuthLoginUrl, getPostApiAuthLogoutUrl, getPostApiAuthOtpDisableUrl, getPostApiAuthOtpGenerateUrl, getPostApiAuthOtpValidateUrl, getPostApiAuthOtpVerifyUrl, getPostApiAuthPingUrl, getPostApiAuthRegisterUrl, patchApiAccount, patchApiAccountResponse, patchApiAccountResponse200, patchApiAccountResponse400, patchApiAccountResponse401, patchApiAccountResponse403, patchApiAccountResponse404, patchApiAccountResponse500, patchApiAccountResponseError, patchApiAccountResponseSuccess, postApiAccountAvatar, postApiAccountAvatarResponse, postApiAccountAvatarResponse200, postApiAccountAvatarResponse204, postApiAccountAvatarResponse400, postApiAccountAvatarResponse404, postApiAccountAvatarResponse500, postApiAccountAvatarResponseError, postApiAccountAvatarResponseSuccess, postApiAccountKeys, postApiAccountKeysResponse, postApiAccountKeysResponse200, postApiAccountKeysResponse400, postApiAccountKeysResponse404, postApiAccountKeysResponse500, postApiAccountKeysResponseError, postApiAccountKeysResponseSuccess, postApiAccountPasswordResetConfirm, postApiAccountPasswordResetConfirmResponse, postApiAccountPasswordResetConfirmResponse200, postApiAccountPasswordResetConfirmResponse400, postApiAccountPasswordResetConfirmResponse404, postApiAccountPasswordResetConfirmResponse500, postApiAccountPasswordResetConfirmResponseError, postApiAccountPasswordResetConfirmResponseSuccess, postApiAccountPasswordResetRequest, postApiAccountPasswordResetRequestResponse, postApiAccountPasswordResetRequestResponse200, postApiAccountPasswordResetRequestResponse400, postApiAccountPasswordResetRequestResponse401, postApiAccountPasswordResetRequestResponse403, postApiAccountPasswordResetRequestResponse404, postApiAccountPasswordResetRequestResponse500, postApiAccountPasswordResetRequestResponseError, postApiAccountPasswordResetRequestResponseSuccess, postApiAccountUpdateEmail, postApiAccountUpdateEmailResponse, postApiAccountUpdateEmailResponse200, postApiAccountUpdateEmailResponse400, postApiAccountUpdateEmailResponse404, postApiAccountUpdateEmailResponse500, postApiAccountUpdateEmailResponseError, postApiAccountUpdateEmailResponseSuccess, postApiAccountUpdatePassword, postApiAccountUpdatePasswordResponse, postApiAccountUpdatePasswordResponse200, postApiAccountUpdatePasswordResponse400, postApiAccountUpdatePasswordResponse404, postApiAccountUpdatePasswordResponse500, postApiAccountUpdatePasswordResponseError, postApiAccountUpdatePasswordResponseSuccess, postApiAccountVerifyEmail, postApiAccountVerifyEmailResend, postApiAccountVerifyEmailResendResponse, postApiAccountVerifyEmailResendResponse200, postApiAccountVerifyEmailResendResponse400, postApiAccountVerifyEmailResendResponse404, postApiAccountVerifyEmailResendResponse500, postApiAccountVerifyEmailResendResponseError, postApiAccountVerifyEmailResendResponseSuccess, postApiAccountVerifyEmailResponse, postApiAccountVerifyEmailResponse200, postApiAccountVerifyEmailResponse400, postApiAccountVerifyEmailResponse404, postApiAccountVerifyEmailResponse500, postApiAccountVerifyEmailResponseError, postApiAccountVerifyEmailResponseSuccess, postApiAuthKey, postApiAuthKeyResponse, postApiAuthKeyResponse200, postApiAuthKeyResponse400, postApiAuthKeyResponse401, postApiAuthKeyResponse403, postApiAuthKeyResponse404, postApiAuthKeyResponse500, postApiAuthKeyResponseError, postApiAuthKeyResponseSuccess, postApiAuthLogin, postApiAuthLoginResponse, postApiAuthLoginResponse200, postApiAuthLoginResponse302, postApiAuthLoginResponse400, postApiAuthLoginResponse401, postApiAuthLoginResponse403, postApiAuthLoginResponse404, postApiAuthLoginResponse500, postApiAuthLoginResponseError, postApiAuthLoginResponseSuccess, postApiAuthLogout, postApiAuthLogoutResponse, postApiAuthLogoutResponse200, postApiAuthLogoutResponse400, postApiAuthLogoutResponse401, postApiAuthLogoutResponse403, postApiAuthLogoutResponse404, postApiAuthLogoutResponse500, postApiAuthLogoutResponseError, postApiAuthLogoutResponseSuccess, postApiAuthOtpDisable, postApiAuthOtpDisableResponse, postApiAuthOtpDisableResponse200, postApiAuthOtpDisableResponse204, postApiAuthOtpDisableResponse400, postApiAuthOtpDisableResponse404, postApiAuthOtpDisableResponse500, postApiAuthOtpDisableResponseError, postApiAuthOtpDisableResponseSuccess, postApiAuthOtpGenerate, postApiAuthOtpGenerateResponse, postApiAuthOtpGenerateResponse200, postApiAuthOtpGenerateResponse400, postApiAuthOtpGenerateResponse401, postApiAuthOtpGenerateResponse403, postApiAuthOtpGenerateResponse404, postApiAuthOtpGenerateResponse500, postApiAuthOtpGenerateResponseError, postApiAuthOtpGenerateResponseSuccess, postApiAuthOtpValidate, postApiAuthOtpValidateResponse, postApiAuthOtpValidateResponse200, postApiAuthOtpValidateResponse302, postApiAuthOtpValidateResponse400, postApiAuthOtpValidateResponse401, postApiAuthOtpValidateResponse403, postApiAuthOtpValidateResponse404, postApiAuthOtpValidateResponse500, postApiAuthOtpValidateResponseError, postApiAuthOtpValidateResponseSuccess, postApiAuthOtpVerify, postApiAuthOtpVerifyResponse, postApiAuthOtpVerifyResponse200, postApiAuthOtpVerifyResponse204, postApiAuthOtpVerifyResponse400, postApiAuthOtpVerifyResponse404, postApiAuthOtpVerifyResponse500, postApiAuthOtpVerifyResponseError, postApiAuthOtpVerifyResponseSuccess, postApiAuthPing, postApiAuthPingResponse, postApiAuthPingResponse200, postApiAuthPingResponse400, postApiAuthPingResponse401, postApiAuthPingResponse403, postApiAuthPingResponse404, postApiAuthPingResponse500, postApiAuthPingResponseError, postApiAuthPingResponseSuccess, postApiAuthRegister, postApiAuthRegisterResponse, postApiAuthRegisterResponse200, postApiAuthRegisterResponse400, postApiAuthRegisterResponse401, postApiAuthRegisterResponse403, postApiAuthRegisterResponse404, postApiAuthRegisterResponse409, postApiAuthRegisterResponse500, postApiAuthRegisterResponseError, postApiAuthRegisterResponseSuccess } from "./account/generated/default.cjs";
|
|
5
|
-
import { OperationsListParams, OperationsQueryParams, buildOperationsQueryParams } from "./query-utils.cjs";
|
|
6
|
-
import { DEFAULT_SETTLED_STATES, OPERATION_STATUS } from "./account.cjs";
|
|
7
|
-
import { Sdk } from "./sdk.cjs";
|
|
8
|
-
export { APIKeyCreateRequest, APIKeyResponse, APIKeyResponseResponse, AccessModel, AccessModelDef, AccessPolicy, AccountError, AccountInfoResponse, AccountPermissionsResponse, BinUUID, BinaryUUID, CreateAPIKeyResponse, DEFAULT_SETTLED_STATES, Error, ErrorResponse, GetApiAccountKeysParams, GetApiOperationsParams, LoginRequest, LoginResponse, OPERATION_STATUS, OTPDisableRequest, OTPGenerateResponse, OTPValidateRequest, OTPVerifyRequest, OperationDetailResponse, OperationFilterItem, OperationFiltersResponse, OperationFiltersResponseData, OperationFiltersResponseResponse, OperationListItem, OperationListItemResponse, OperationPollingOptions, OperationsListParams, type OperationsQueryParams, PasswordResetRequest, PasswordResetVerifyRequest, PollOptions, PongResponse, PostApiAccountAvatarBody, PostApiAccountVerifyEmailParams, RegisterRequest, RequestInit, ResendVerifyEmailRequest, Result, Sdk, UpdateEmailRequest, UpdatePasswordRequest, UpdateProfileRequest, UploadLimitResponse, Uuid, VerifyEmailRequest, buildOperationsQueryParams, delay, deleteApiAccount, deleteApiAccountKeysKeyID, deleteApiAccountKeysKeyIDResponse, deleteApiAccountKeysKeyIDResponse200, deleteApiAccountKeysKeyIDResponse400, deleteApiAccountKeysKeyIDResponse404, deleteApiAccountKeysKeyIDResponse500, deleteApiAccountKeysKeyIDResponseError, deleteApiAccountKeysKeyIDResponseSuccess, deleteApiAccountResponse, deleteApiAccountResponse200, deleteApiAccountResponse400, deleteApiAccountResponse404, deleteApiAccountResponse500, deleteApiAccountResponseError, deleteApiAccountResponseSuccess, fetchWithHandling, getApiAccount, getApiAccountAvatar, getApiAccountAvatarResponse, getApiAccountAvatarResponse200, getApiAccountAvatarResponse400, getApiAccountAvatarResponse404, getApiAccountAvatarResponse500, getApiAccountAvatarResponseError, getApiAccountAvatarResponseSuccess, getApiAccountKeys, getApiAccountKeysResponse, getApiAccountKeysResponse200, getApiAccountKeysResponse400, getApiAccountKeysResponse404, getApiAccountKeysResponse500, getApiAccountKeysResponseError, getApiAccountKeysResponseSuccess, getApiAccountPermissions, getApiAccountPermissionsResponse, getApiAccountPermissionsResponse200, getApiAccountPermissionsResponse400, getApiAccountPermissionsResponse404, getApiAccountPermissionsResponse500, getApiAccountPermissionsResponseError, getApiAccountPermissionsResponseSuccess, getApiAccountResponse, getApiAccountResponse200, getApiAccountResponse400, getApiAccountResponse401, getApiAccountResponse403, getApiAccountResponse404, getApiAccountResponse500, getApiAccountResponseError, getApiAccountResponseSuccess, getApiOperations, getApiOperationsFilters, getApiOperationsFiltersResponse, getApiOperationsFiltersResponse200, getApiOperationsFiltersResponse400, getApiOperationsFiltersResponse404, getApiOperationsFiltersResponse500, getApiOperationsFiltersResponseError, getApiOperationsFiltersResponseSuccess, getApiOperationsId, getApiOperationsIdResponse, getApiOperationsIdResponse200, getApiOperationsIdResponse400, getApiOperationsIdResponse404, getApiOperationsIdResponse500, getApiOperationsIdResponseError, getApiOperationsIdResponseSuccess, getApiOperationsResponse, getApiOperationsResponse200, getApiOperationsResponse400, getApiOperationsResponse404, getApiOperationsResponse500, getApiOperationsResponseError, getApiOperationsResponseSuccess, getApiUploadLimit, getApiUploadLimitResponse, getApiUploadLimitResponse200, getApiUploadLimitResponse400, getApiUploadLimitResponse404, getApiUploadLimitResponse500, getApiUploadLimitResponseError, getApiUploadLimitResponseSuccess, getDeleteApiAccountKeysKeyIDUrl, getDeleteApiAccountUrl, getGetApiAccountAvatarUrl, getGetApiAccountKeysUrl, getGetApiAccountPermissionsUrl, getGetApiAccountUrl, getGetApiOperationsFiltersUrl, getGetApiOperationsIdUrl, getGetApiOperationsUrl, getGetApiUploadLimitUrl, getPatchApiAccountUrl, getPostApiAccountAvatarUrl, getPostApiAccountKeysUrl, getPostApiAccountPasswordResetConfirmUrl, getPostApiAccountPasswordResetRequestUrl, getPostApiAccountUpdateEmailUrl, getPostApiAccountUpdatePasswordUrl, getPostApiAccountVerifyEmailResendUrl, getPostApiAccountVerifyEmailUrl, getPostApiAuthKeyUrl, getPostApiAuthLoginUrl, getPostApiAuthLogoutUrl, getPostApiAuthOtpDisableUrl, getPostApiAuthOtpGenerateUrl, getPostApiAuthOtpValidateUrl, getPostApiAuthOtpVerifyUrl, getPostApiAuthPingUrl, getPostApiAuthRegisterUrl, handleFetchError, handleUnknownError, isEmptyResponse, parseResponse, patchApiAccount, patchApiAccountResponse, patchApiAccountResponse200, patchApiAccountResponse400, patchApiAccountResponse401, patchApiAccountResponse403, patchApiAccountResponse404, patchApiAccountResponse500, patchApiAccountResponseError, patchApiAccountResponseSuccess, poll, postApiAccountAvatar, postApiAccountAvatarResponse, postApiAccountAvatarResponse200, postApiAccountAvatarResponse204, postApiAccountAvatarResponse400, postApiAccountAvatarResponse404, postApiAccountAvatarResponse500, postApiAccountAvatarResponseError, postApiAccountAvatarResponseSuccess, postApiAccountKeys, postApiAccountKeysResponse, postApiAccountKeysResponse200, postApiAccountKeysResponse400, postApiAccountKeysResponse404, postApiAccountKeysResponse500, postApiAccountKeysResponseError, postApiAccountKeysResponseSuccess, postApiAccountPasswordResetConfirm, postApiAccountPasswordResetConfirmResponse, postApiAccountPasswordResetConfirmResponse200, postApiAccountPasswordResetConfirmResponse400, postApiAccountPasswordResetConfirmResponse404, postApiAccountPasswordResetConfirmResponse500, postApiAccountPasswordResetConfirmResponseError, postApiAccountPasswordResetConfirmResponseSuccess, postApiAccountPasswordResetRequest, postApiAccountPasswordResetRequestResponse, postApiAccountPasswordResetRequestResponse200, postApiAccountPasswordResetRequestResponse400, postApiAccountPasswordResetRequestResponse401, postApiAccountPasswordResetRequestResponse403, postApiAccountPasswordResetRequestResponse404, postApiAccountPasswordResetRequestResponse500, postApiAccountPasswordResetRequestResponseError, postApiAccountPasswordResetRequestResponseSuccess, postApiAccountUpdateEmail, postApiAccountUpdateEmailResponse, postApiAccountUpdateEmailResponse200, postApiAccountUpdateEmailResponse400, postApiAccountUpdateEmailResponse404, postApiAccountUpdateEmailResponse500, postApiAccountUpdateEmailResponseError, postApiAccountUpdateEmailResponseSuccess, postApiAccountUpdatePassword, postApiAccountUpdatePasswordResponse, postApiAccountUpdatePasswordResponse200, postApiAccountUpdatePasswordResponse400, postApiAccountUpdatePasswordResponse404, postApiAccountUpdatePasswordResponse500, postApiAccountUpdatePasswordResponseError, postApiAccountUpdatePasswordResponseSuccess, postApiAccountVerifyEmail, postApiAccountVerifyEmailResend, postApiAccountVerifyEmailResendResponse, postApiAccountVerifyEmailResendResponse200, postApiAccountVerifyEmailResendResponse400, postApiAccountVerifyEmailResendResponse404, postApiAccountVerifyEmailResendResponse500, postApiAccountVerifyEmailResendResponseError, postApiAccountVerifyEmailResendResponseSuccess, postApiAccountVerifyEmailResponse, postApiAccountVerifyEmailResponse200, postApiAccountVerifyEmailResponse400, postApiAccountVerifyEmailResponse404, postApiAccountVerifyEmailResponse500, postApiAccountVerifyEmailResponseError, postApiAccountVerifyEmailResponseSuccess, postApiAuthKey, postApiAuthKeyResponse, postApiAuthKeyResponse200, postApiAuthKeyResponse400, postApiAuthKeyResponse401, postApiAuthKeyResponse403, postApiAuthKeyResponse404, postApiAuthKeyResponse500, postApiAuthKeyResponseError, postApiAuthKeyResponseSuccess, postApiAuthLogin, postApiAuthLoginResponse, postApiAuthLoginResponse200, postApiAuthLoginResponse302, postApiAuthLoginResponse400, postApiAuthLoginResponse401, postApiAuthLoginResponse403, postApiAuthLoginResponse404, postApiAuthLoginResponse500, postApiAuthLoginResponseError, postApiAuthLoginResponseSuccess, postApiAuthLogout, postApiAuthLogoutResponse, postApiAuthLogoutResponse200, postApiAuthLogoutResponse400, postApiAuthLogoutResponse401, postApiAuthLogoutResponse403, postApiAuthLogoutResponse404, postApiAuthLogoutResponse500, postApiAuthLogoutResponseError, postApiAuthLogoutResponseSuccess, postApiAuthOtpDisable, postApiAuthOtpDisableResponse, postApiAuthOtpDisableResponse200, postApiAuthOtpDisableResponse204, postApiAuthOtpDisableResponse400, postApiAuthOtpDisableResponse404, postApiAuthOtpDisableResponse500, postApiAuthOtpDisableResponseError, postApiAuthOtpDisableResponseSuccess, postApiAuthOtpGenerate, postApiAuthOtpGenerateResponse, postApiAuthOtpGenerateResponse200, postApiAuthOtpGenerateResponse400, postApiAuthOtpGenerateResponse401, postApiAuthOtpGenerateResponse403, postApiAuthOtpGenerateResponse404, postApiAuthOtpGenerateResponse500, postApiAuthOtpGenerateResponseError, postApiAuthOtpGenerateResponseSuccess, postApiAuthOtpValidate, postApiAuthOtpValidateResponse, postApiAuthOtpValidateResponse200, postApiAuthOtpValidateResponse302, postApiAuthOtpValidateResponse400, postApiAuthOtpValidateResponse401, postApiAuthOtpValidateResponse403, postApiAuthOtpValidateResponse404, postApiAuthOtpValidateResponse500, postApiAuthOtpValidateResponseError, postApiAuthOtpValidateResponseSuccess, postApiAuthOtpVerify, postApiAuthOtpVerifyResponse, postApiAuthOtpVerifyResponse200, postApiAuthOtpVerifyResponse204, postApiAuthOtpVerifyResponse400, postApiAuthOtpVerifyResponse404, postApiAuthOtpVerifyResponse500, postApiAuthOtpVerifyResponseError, postApiAuthOtpVerifyResponseSuccess, postApiAuthPing, postApiAuthPingResponse, postApiAuthPingResponse200, postApiAuthPingResponse400, postApiAuthPingResponse401, postApiAuthPingResponse403, postApiAuthPingResponse404, postApiAuthPingResponse500, postApiAuthPingResponseError, postApiAuthPingResponseSuccess, postApiAuthRegister, postApiAuthRegisterResponse, postApiAuthRegisterResponse200, postApiAuthRegisterResponse400, postApiAuthRegisterResponse401, postApiAuthRegisterResponse403, postApiAuthRegisterResponse404, postApiAuthRegisterResponse409, postApiAuthRegisterResponse500, postApiAuthRegisterResponseError, postApiAuthRegisterResponseSuccess };
|
package/dist/cjs/openapi.cjs
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
const require_account_generated_default = require('./account/generated/default.cjs');
|
|
2
|
-
|
|
3
|
-
exports.deleteApiAccount = require_account_generated_default.deleteApiAccount;
|
|
4
|
-
exports.deleteApiAccountKeysKeyID = require_account_generated_default.deleteApiAccountKeysKeyID;
|
|
5
|
-
exports.getApiAccount = require_account_generated_default.getApiAccount;
|
|
6
|
-
exports.getApiAccountAvatar = require_account_generated_default.getApiAccountAvatar;
|
|
7
|
-
exports.getApiAccountKeys = require_account_generated_default.getApiAccountKeys;
|
|
8
|
-
exports.getApiAccountPermissions = require_account_generated_default.getApiAccountPermissions;
|
|
9
|
-
exports.getApiOperations = require_account_generated_default.getApiOperations;
|
|
10
|
-
exports.getApiOperationsFilters = require_account_generated_default.getApiOperationsFilters;
|
|
11
|
-
exports.getApiOperationsId = require_account_generated_default.getApiOperationsId;
|
|
12
|
-
exports.getApiUploadLimit = require_account_generated_default.getApiUploadLimit;
|
|
13
|
-
exports.getDeleteApiAccountKeysKeyIDUrl = require_account_generated_default.getDeleteApiAccountKeysKeyIDUrl;
|
|
14
|
-
exports.getDeleteApiAccountUrl = require_account_generated_default.getDeleteApiAccountUrl;
|
|
15
|
-
exports.getGetApiAccountAvatarUrl = require_account_generated_default.getGetApiAccountAvatarUrl;
|
|
16
|
-
exports.getGetApiAccountKeysUrl = require_account_generated_default.getGetApiAccountKeysUrl;
|
|
17
|
-
exports.getGetApiAccountPermissionsUrl = require_account_generated_default.getGetApiAccountPermissionsUrl;
|
|
18
|
-
exports.getGetApiAccountUrl = require_account_generated_default.getGetApiAccountUrl;
|
|
19
|
-
exports.getGetApiOperationsFiltersUrl = require_account_generated_default.getGetApiOperationsFiltersUrl;
|
|
20
|
-
exports.getGetApiOperationsIdUrl = require_account_generated_default.getGetApiOperationsIdUrl;
|
|
21
|
-
exports.getGetApiOperationsUrl = require_account_generated_default.getGetApiOperationsUrl;
|
|
22
|
-
exports.getGetApiUploadLimitUrl = require_account_generated_default.getGetApiUploadLimitUrl;
|
|
23
|
-
exports.getPatchApiAccountUrl = require_account_generated_default.getPatchApiAccountUrl;
|
|
24
|
-
exports.getPostApiAccountAvatarUrl = require_account_generated_default.getPostApiAccountAvatarUrl;
|
|
25
|
-
exports.getPostApiAccountKeysUrl = require_account_generated_default.getPostApiAccountKeysUrl;
|
|
26
|
-
exports.getPostApiAccountPasswordResetConfirmUrl = require_account_generated_default.getPostApiAccountPasswordResetConfirmUrl;
|
|
27
|
-
exports.getPostApiAccountPasswordResetRequestUrl = require_account_generated_default.getPostApiAccountPasswordResetRequestUrl;
|
|
28
|
-
exports.getPostApiAccountUpdateEmailUrl = require_account_generated_default.getPostApiAccountUpdateEmailUrl;
|
|
29
|
-
exports.getPostApiAccountUpdatePasswordUrl = require_account_generated_default.getPostApiAccountUpdatePasswordUrl;
|
|
30
|
-
exports.getPostApiAccountVerifyEmailResendUrl = require_account_generated_default.getPostApiAccountVerifyEmailResendUrl;
|
|
31
|
-
exports.getPostApiAccountVerifyEmailUrl = require_account_generated_default.getPostApiAccountVerifyEmailUrl;
|
|
32
|
-
exports.getPostApiAuthKeyUrl = require_account_generated_default.getPostApiAuthKeyUrl;
|
|
33
|
-
exports.getPostApiAuthLoginUrl = require_account_generated_default.getPostApiAuthLoginUrl;
|
|
34
|
-
exports.getPostApiAuthLogoutUrl = require_account_generated_default.getPostApiAuthLogoutUrl;
|
|
35
|
-
exports.getPostApiAuthOtpDisableUrl = require_account_generated_default.getPostApiAuthOtpDisableUrl;
|
|
36
|
-
exports.getPostApiAuthOtpGenerateUrl = require_account_generated_default.getPostApiAuthOtpGenerateUrl;
|
|
37
|
-
exports.getPostApiAuthOtpValidateUrl = require_account_generated_default.getPostApiAuthOtpValidateUrl;
|
|
38
|
-
exports.getPostApiAuthOtpVerifyUrl = require_account_generated_default.getPostApiAuthOtpVerifyUrl;
|
|
39
|
-
exports.getPostApiAuthPingUrl = require_account_generated_default.getPostApiAuthPingUrl;
|
|
40
|
-
exports.getPostApiAuthRegisterUrl = require_account_generated_default.getPostApiAuthRegisterUrl;
|
|
41
|
-
exports.patchApiAccount = require_account_generated_default.patchApiAccount;
|
|
42
|
-
exports.postApiAccountAvatar = require_account_generated_default.postApiAccountAvatar;
|
|
43
|
-
exports.postApiAccountKeys = require_account_generated_default.postApiAccountKeys;
|
|
44
|
-
exports.postApiAccountPasswordResetConfirm = require_account_generated_default.postApiAccountPasswordResetConfirm;
|
|
45
|
-
exports.postApiAccountPasswordResetRequest = require_account_generated_default.postApiAccountPasswordResetRequest;
|
|
46
|
-
exports.postApiAccountUpdateEmail = require_account_generated_default.postApiAccountUpdateEmail;
|
|
47
|
-
exports.postApiAccountUpdatePassword = require_account_generated_default.postApiAccountUpdatePassword;
|
|
48
|
-
exports.postApiAccountVerifyEmail = require_account_generated_default.postApiAccountVerifyEmail;
|
|
49
|
-
exports.postApiAccountVerifyEmailResend = require_account_generated_default.postApiAccountVerifyEmailResend;
|
|
50
|
-
exports.postApiAuthKey = require_account_generated_default.postApiAuthKey;
|
|
51
|
-
exports.postApiAuthLogin = require_account_generated_default.postApiAuthLogin;
|
|
52
|
-
exports.postApiAuthLogout = require_account_generated_default.postApiAuthLogout;
|
|
53
|
-
exports.postApiAuthOtpDisable = require_account_generated_default.postApiAuthOtpDisable;
|
|
54
|
-
exports.postApiAuthOtpGenerate = require_account_generated_default.postApiAuthOtpGenerate;
|
|
55
|
-
exports.postApiAuthOtpValidate = require_account_generated_default.postApiAuthOtpValidate;
|
|
56
|
-
exports.postApiAuthOtpVerify = require_account_generated_default.postApiAuthOtpVerify;
|
|
57
|
-
exports.postApiAuthPing = require_account_generated_default.postApiAuthPing;
|
|
58
|
-
exports.postApiAuthRegister = require_account_generated_default.postApiAuthRegister;
|
package/dist/cjs/openapi.d.cts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { APIKeyCreateRequest, APIKeyResponse, APIKeyResponseResponse, AccessModel, AccessModelDef, AccessPolicy, AccountInfoResponse, AccountPermissionsResponse, BinUUID, BinaryUUID, CreateAPIKeyResponse, Error, ErrorResponse, GetApiAccountKeysParams, GetApiOperationsParams, LoginRequest, LoginResponse, OTPDisableRequest, OTPGenerateResponse, OTPValidateRequest, OTPVerifyRequest, OperationDetailResponse, OperationFilterItem, OperationFiltersResponse, OperationFiltersResponseData, OperationFiltersResponseResponse, OperationListItem, OperationListItemResponse, PasswordResetRequest, PasswordResetVerifyRequest, PongResponse, PostApiAccountAvatarBody, PostApiAccountVerifyEmailParams, RegisterRequest, ResendVerifyEmailRequest, UpdateEmailRequest, UpdatePasswordRequest, UpdateProfileRequest, UploadLimitResponse, Uuid, VerifyEmailRequest } from "./account/generated/accountAPI.schemas.cjs";
|
|
2
|
-
import { deleteApiAccount, deleteApiAccountKeysKeyID, deleteApiAccountKeysKeyIDResponse, deleteApiAccountKeysKeyIDResponse200, deleteApiAccountKeysKeyIDResponse400, deleteApiAccountKeysKeyIDResponse404, deleteApiAccountKeysKeyIDResponse500, deleteApiAccountKeysKeyIDResponseError, deleteApiAccountKeysKeyIDResponseSuccess, deleteApiAccountResponse, deleteApiAccountResponse200, deleteApiAccountResponse400, deleteApiAccountResponse404, deleteApiAccountResponse500, deleteApiAccountResponseError, deleteApiAccountResponseSuccess, getApiAccount, getApiAccountAvatar, getApiAccountAvatarResponse, getApiAccountAvatarResponse200, getApiAccountAvatarResponse400, getApiAccountAvatarResponse404, getApiAccountAvatarResponse500, getApiAccountAvatarResponseError, getApiAccountAvatarResponseSuccess, getApiAccountKeys, getApiAccountKeysResponse, getApiAccountKeysResponse200, getApiAccountKeysResponse400, getApiAccountKeysResponse404, getApiAccountKeysResponse500, getApiAccountKeysResponseError, getApiAccountKeysResponseSuccess, getApiAccountPermissions, getApiAccountPermissionsResponse, getApiAccountPermissionsResponse200, getApiAccountPermissionsResponse400, getApiAccountPermissionsResponse404, getApiAccountPermissionsResponse500, getApiAccountPermissionsResponseError, getApiAccountPermissionsResponseSuccess, getApiAccountResponse, getApiAccountResponse200, getApiAccountResponse400, getApiAccountResponse401, getApiAccountResponse403, getApiAccountResponse404, getApiAccountResponse500, getApiAccountResponseError, getApiAccountResponseSuccess, getApiOperations, getApiOperationsFilters, getApiOperationsFiltersResponse, getApiOperationsFiltersResponse200, getApiOperationsFiltersResponse400, getApiOperationsFiltersResponse404, getApiOperationsFiltersResponse500, getApiOperationsFiltersResponseError, getApiOperationsFiltersResponseSuccess, getApiOperationsId, getApiOperationsIdResponse, getApiOperationsIdResponse200, getApiOperationsIdResponse400, getApiOperationsIdResponse404, getApiOperationsIdResponse500, getApiOperationsIdResponseError, getApiOperationsIdResponseSuccess, getApiOperationsResponse, getApiOperationsResponse200, getApiOperationsResponse400, getApiOperationsResponse404, getApiOperationsResponse500, getApiOperationsResponseError, getApiOperationsResponseSuccess, getApiUploadLimit, getApiUploadLimitResponse, getApiUploadLimitResponse200, getApiUploadLimitResponse400, getApiUploadLimitResponse404, getApiUploadLimitResponse500, getApiUploadLimitResponseError, getApiUploadLimitResponseSuccess, getDeleteApiAccountKeysKeyIDUrl, getDeleteApiAccountUrl, getGetApiAccountAvatarUrl, getGetApiAccountKeysUrl, getGetApiAccountPermissionsUrl, getGetApiAccountUrl, getGetApiOperationsFiltersUrl, getGetApiOperationsIdUrl, getGetApiOperationsUrl, getGetApiUploadLimitUrl, getPatchApiAccountUrl, getPostApiAccountAvatarUrl, getPostApiAccountKeysUrl, getPostApiAccountPasswordResetConfirmUrl, getPostApiAccountPasswordResetRequestUrl, getPostApiAccountUpdateEmailUrl, getPostApiAccountUpdatePasswordUrl, getPostApiAccountVerifyEmailResendUrl, getPostApiAccountVerifyEmailUrl, getPostApiAuthKeyUrl, getPostApiAuthLoginUrl, getPostApiAuthLogoutUrl, getPostApiAuthOtpDisableUrl, getPostApiAuthOtpGenerateUrl, getPostApiAuthOtpValidateUrl, getPostApiAuthOtpVerifyUrl, getPostApiAuthPingUrl, getPostApiAuthRegisterUrl, patchApiAccount, patchApiAccountResponse, patchApiAccountResponse200, patchApiAccountResponse400, patchApiAccountResponse401, patchApiAccountResponse403, patchApiAccountResponse404, patchApiAccountResponse500, patchApiAccountResponseError, patchApiAccountResponseSuccess, postApiAccountAvatar, postApiAccountAvatarResponse, postApiAccountAvatarResponse200, postApiAccountAvatarResponse204, postApiAccountAvatarResponse400, postApiAccountAvatarResponse404, postApiAccountAvatarResponse500, postApiAccountAvatarResponseError, postApiAccountAvatarResponseSuccess, postApiAccountKeys, postApiAccountKeysResponse, postApiAccountKeysResponse200, postApiAccountKeysResponse400, postApiAccountKeysResponse404, postApiAccountKeysResponse500, postApiAccountKeysResponseError, postApiAccountKeysResponseSuccess, postApiAccountPasswordResetConfirm, postApiAccountPasswordResetConfirmResponse, postApiAccountPasswordResetConfirmResponse200, postApiAccountPasswordResetConfirmResponse400, postApiAccountPasswordResetConfirmResponse404, postApiAccountPasswordResetConfirmResponse500, postApiAccountPasswordResetConfirmResponseError, postApiAccountPasswordResetConfirmResponseSuccess, postApiAccountPasswordResetRequest, postApiAccountPasswordResetRequestResponse, postApiAccountPasswordResetRequestResponse200, postApiAccountPasswordResetRequestResponse400, postApiAccountPasswordResetRequestResponse401, postApiAccountPasswordResetRequestResponse403, postApiAccountPasswordResetRequestResponse404, postApiAccountPasswordResetRequestResponse500, postApiAccountPasswordResetRequestResponseError, postApiAccountPasswordResetRequestResponseSuccess, postApiAccountUpdateEmail, postApiAccountUpdateEmailResponse, postApiAccountUpdateEmailResponse200, postApiAccountUpdateEmailResponse400, postApiAccountUpdateEmailResponse404, postApiAccountUpdateEmailResponse500, postApiAccountUpdateEmailResponseError, postApiAccountUpdateEmailResponseSuccess, postApiAccountUpdatePassword, postApiAccountUpdatePasswordResponse, postApiAccountUpdatePasswordResponse200, postApiAccountUpdatePasswordResponse400, postApiAccountUpdatePasswordResponse404, postApiAccountUpdatePasswordResponse500, postApiAccountUpdatePasswordResponseError, postApiAccountUpdatePasswordResponseSuccess, postApiAccountVerifyEmail, postApiAccountVerifyEmailResend, postApiAccountVerifyEmailResendResponse, postApiAccountVerifyEmailResendResponse200, postApiAccountVerifyEmailResendResponse400, postApiAccountVerifyEmailResendResponse404, postApiAccountVerifyEmailResendResponse500, postApiAccountVerifyEmailResendResponseError, postApiAccountVerifyEmailResendResponseSuccess, postApiAccountVerifyEmailResponse, postApiAccountVerifyEmailResponse200, postApiAccountVerifyEmailResponse400, postApiAccountVerifyEmailResponse404, postApiAccountVerifyEmailResponse500, postApiAccountVerifyEmailResponseError, postApiAccountVerifyEmailResponseSuccess, postApiAuthKey, postApiAuthKeyResponse, postApiAuthKeyResponse200, postApiAuthKeyResponse400, postApiAuthKeyResponse401, postApiAuthKeyResponse403, postApiAuthKeyResponse404, postApiAuthKeyResponse500, postApiAuthKeyResponseError, postApiAuthKeyResponseSuccess, postApiAuthLogin, postApiAuthLoginResponse, postApiAuthLoginResponse200, postApiAuthLoginResponse302, postApiAuthLoginResponse400, postApiAuthLoginResponse401, postApiAuthLoginResponse403, postApiAuthLoginResponse404, postApiAuthLoginResponse500, postApiAuthLoginResponseError, postApiAuthLoginResponseSuccess, postApiAuthLogout, postApiAuthLogoutResponse, postApiAuthLogoutResponse200, postApiAuthLogoutResponse400, postApiAuthLogoutResponse401, postApiAuthLogoutResponse403, postApiAuthLogoutResponse404, postApiAuthLogoutResponse500, postApiAuthLogoutResponseError, postApiAuthLogoutResponseSuccess, postApiAuthOtpDisable, postApiAuthOtpDisableResponse, postApiAuthOtpDisableResponse200, postApiAuthOtpDisableResponse204, postApiAuthOtpDisableResponse400, postApiAuthOtpDisableResponse404, postApiAuthOtpDisableResponse500, postApiAuthOtpDisableResponseError, postApiAuthOtpDisableResponseSuccess, postApiAuthOtpGenerate, postApiAuthOtpGenerateResponse, postApiAuthOtpGenerateResponse200, postApiAuthOtpGenerateResponse400, postApiAuthOtpGenerateResponse401, postApiAuthOtpGenerateResponse403, postApiAuthOtpGenerateResponse404, postApiAuthOtpGenerateResponse500, postApiAuthOtpGenerateResponseError, postApiAuthOtpGenerateResponseSuccess, postApiAuthOtpValidate, postApiAuthOtpValidateResponse, postApiAuthOtpValidateResponse200, postApiAuthOtpValidateResponse302, postApiAuthOtpValidateResponse400, postApiAuthOtpValidateResponse401, postApiAuthOtpValidateResponse403, postApiAuthOtpValidateResponse404, postApiAuthOtpValidateResponse500, postApiAuthOtpValidateResponseError, postApiAuthOtpValidateResponseSuccess, postApiAuthOtpVerify, postApiAuthOtpVerifyResponse, postApiAuthOtpVerifyResponse200, postApiAuthOtpVerifyResponse204, postApiAuthOtpVerifyResponse400, postApiAuthOtpVerifyResponse404, postApiAuthOtpVerifyResponse500, postApiAuthOtpVerifyResponseError, postApiAuthOtpVerifyResponseSuccess, postApiAuthPing, postApiAuthPingResponse, postApiAuthPingResponse200, postApiAuthPingResponse400, postApiAuthPingResponse401, postApiAuthPingResponse403, postApiAuthPingResponse404, postApiAuthPingResponse500, postApiAuthPingResponseError, postApiAuthPingResponseSuccess, postApiAuthRegister, postApiAuthRegisterResponse, postApiAuthRegisterResponse200, postApiAuthRegisterResponse400, postApiAuthRegisterResponse401, postApiAuthRegisterResponse403, postApiAuthRegisterResponse404, postApiAuthRegisterResponse409, postApiAuthRegisterResponse500, postApiAuthRegisterResponseError, postApiAuthRegisterResponseSuccess } from "./account/generated/default.cjs";
|
|
3
|
-
export { APIKeyCreateRequest, APIKeyResponse, APIKeyResponseResponse, AccessModel, AccessModelDef, AccessPolicy, AccountInfoResponse, AccountPermissionsResponse, BinUUID, BinaryUUID, CreateAPIKeyResponse, Error, ErrorResponse, GetApiAccountKeysParams, GetApiOperationsParams, LoginRequest, LoginResponse, OTPDisableRequest, OTPGenerateResponse, OTPValidateRequest, OTPVerifyRequest, OperationDetailResponse, OperationFilterItem, OperationFiltersResponse, OperationFiltersResponseData, OperationFiltersResponseResponse, OperationListItem, OperationListItemResponse, PasswordResetRequest, PasswordResetVerifyRequest, PongResponse, PostApiAccountAvatarBody, PostApiAccountVerifyEmailParams, RegisterRequest, ResendVerifyEmailRequest, UpdateEmailRequest, UpdatePasswordRequest, UpdateProfileRequest, UploadLimitResponse, Uuid, VerifyEmailRequest, deleteApiAccount, deleteApiAccountKeysKeyID, deleteApiAccountKeysKeyIDResponse, deleteApiAccountKeysKeyIDResponse200, deleteApiAccountKeysKeyIDResponse400, deleteApiAccountKeysKeyIDResponse404, deleteApiAccountKeysKeyIDResponse500, deleteApiAccountKeysKeyIDResponseError, deleteApiAccountKeysKeyIDResponseSuccess, deleteApiAccountResponse, deleteApiAccountResponse200, deleteApiAccountResponse400, deleteApiAccountResponse404, deleteApiAccountResponse500, deleteApiAccountResponseError, deleteApiAccountResponseSuccess, getApiAccount, getApiAccountAvatar, getApiAccountAvatarResponse, getApiAccountAvatarResponse200, getApiAccountAvatarResponse400, getApiAccountAvatarResponse404, getApiAccountAvatarResponse500, getApiAccountAvatarResponseError, getApiAccountAvatarResponseSuccess, getApiAccountKeys, getApiAccountKeysResponse, getApiAccountKeysResponse200, getApiAccountKeysResponse400, getApiAccountKeysResponse404, getApiAccountKeysResponse500, getApiAccountKeysResponseError, getApiAccountKeysResponseSuccess, getApiAccountPermissions, getApiAccountPermissionsResponse, getApiAccountPermissionsResponse200, getApiAccountPermissionsResponse400, getApiAccountPermissionsResponse404, getApiAccountPermissionsResponse500, getApiAccountPermissionsResponseError, getApiAccountPermissionsResponseSuccess, getApiAccountResponse, getApiAccountResponse200, getApiAccountResponse400, getApiAccountResponse401, getApiAccountResponse403, getApiAccountResponse404, getApiAccountResponse500, getApiAccountResponseError, getApiAccountResponseSuccess, getApiOperations, getApiOperationsFilters, getApiOperationsFiltersResponse, getApiOperationsFiltersResponse200, getApiOperationsFiltersResponse400, getApiOperationsFiltersResponse404, getApiOperationsFiltersResponse500, getApiOperationsFiltersResponseError, getApiOperationsFiltersResponseSuccess, getApiOperationsId, getApiOperationsIdResponse, getApiOperationsIdResponse200, getApiOperationsIdResponse400, getApiOperationsIdResponse404, getApiOperationsIdResponse500, getApiOperationsIdResponseError, getApiOperationsIdResponseSuccess, getApiOperationsResponse, getApiOperationsResponse200, getApiOperationsResponse400, getApiOperationsResponse404, getApiOperationsResponse500, getApiOperationsResponseError, getApiOperationsResponseSuccess, getApiUploadLimit, getApiUploadLimitResponse, getApiUploadLimitResponse200, getApiUploadLimitResponse400, getApiUploadLimitResponse404, getApiUploadLimitResponse500, getApiUploadLimitResponseError, getApiUploadLimitResponseSuccess, getDeleteApiAccountKeysKeyIDUrl, getDeleteApiAccountUrl, getGetApiAccountAvatarUrl, getGetApiAccountKeysUrl, getGetApiAccountPermissionsUrl, getGetApiAccountUrl, getGetApiOperationsFiltersUrl, getGetApiOperationsIdUrl, getGetApiOperationsUrl, getGetApiUploadLimitUrl, getPatchApiAccountUrl, getPostApiAccountAvatarUrl, getPostApiAccountKeysUrl, getPostApiAccountPasswordResetConfirmUrl, getPostApiAccountPasswordResetRequestUrl, getPostApiAccountUpdateEmailUrl, getPostApiAccountUpdatePasswordUrl, getPostApiAccountVerifyEmailResendUrl, getPostApiAccountVerifyEmailUrl, getPostApiAuthKeyUrl, getPostApiAuthLoginUrl, getPostApiAuthLogoutUrl, getPostApiAuthOtpDisableUrl, getPostApiAuthOtpGenerateUrl, getPostApiAuthOtpValidateUrl, getPostApiAuthOtpVerifyUrl, getPostApiAuthPingUrl, getPostApiAuthRegisterUrl, patchApiAccount, patchApiAccountResponse, patchApiAccountResponse200, patchApiAccountResponse400, patchApiAccountResponse401, patchApiAccountResponse403, patchApiAccountResponse404, patchApiAccountResponse500, patchApiAccountResponseError, patchApiAccountResponseSuccess, postApiAccountAvatar, postApiAccountAvatarResponse, postApiAccountAvatarResponse200, postApiAccountAvatarResponse204, postApiAccountAvatarResponse400, postApiAccountAvatarResponse404, postApiAccountAvatarResponse500, postApiAccountAvatarResponseError, postApiAccountAvatarResponseSuccess, postApiAccountKeys, postApiAccountKeysResponse, postApiAccountKeysResponse200, postApiAccountKeysResponse400, postApiAccountKeysResponse404, postApiAccountKeysResponse500, postApiAccountKeysResponseError, postApiAccountKeysResponseSuccess, postApiAccountPasswordResetConfirm, postApiAccountPasswordResetConfirmResponse, postApiAccountPasswordResetConfirmResponse200, postApiAccountPasswordResetConfirmResponse400, postApiAccountPasswordResetConfirmResponse404, postApiAccountPasswordResetConfirmResponse500, postApiAccountPasswordResetConfirmResponseError, postApiAccountPasswordResetConfirmResponseSuccess, postApiAccountPasswordResetRequest, postApiAccountPasswordResetRequestResponse, postApiAccountPasswordResetRequestResponse200, postApiAccountPasswordResetRequestResponse400, postApiAccountPasswordResetRequestResponse401, postApiAccountPasswordResetRequestResponse403, postApiAccountPasswordResetRequestResponse404, postApiAccountPasswordResetRequestResponse500, postApiAccountPasswordResetRequestResponseError, postApiAccountPasswordResetRequestResponseSuccess, postApiAccountUpdateEmail, postApiAccountUpdateEmailResponse, postApiAccountUpdateEmailResponse200, postApiAccountUpdateEmailResponse400, postApiAccountUpdateEmailResponse404, postApiAccountUpdateEmailResponse500, postApiAccountUpdateEmailResponseError, postApiAccountUpdateEmailResponseSuccess, postApiAccountUpdatePassword, postApiAccountUpdatePasswordResponse, postApiAccountUpdatePasswordResponse200, postApiAccountUpdatePasswordResponse400, postApiAccountUpdatePasswordResponse404, postApiAccountUpdatePasswordResponse500, postApiAccountUpdatePasswordResponseError, postApiAccountUpdatePasswordResponseSuccess, postApiAccountVerifyEmail, postApiAccountVerifyEmailResend, postApiAccountVerifyEmailResendResponse, postApiAccountVerifyEmailResendResponse200, postApiAccountVerifyEmailResendResponse400, postApiAccountVerifyEmailResendResponse404, postApiAccountVerifyEmailResendResponse500, postApiAccountVerifyEmailResendResponseError, postApiAccountVerifyEmailResendResponseSuccess, postApiAccountVerifyEmailResponse, postApiAccountVerifyEmailResponse200, postApiAccountVerifyEmailResponse400, postApiAccountVerifyEmailResponse404, postApiAccountVerifyEmailResponse500, postApiAccountVerifyEmailResponseError, postApiAccountVerifyEmailResponseSuccess, postApiAuthKey, postApiAuthKeyResponse, postApiAuthKeyResponse200, postApiAuthKeyResponse400, postApiAuthKeyResponse401, postApiAuthKeyResponse403, postApiAuthKeyResponse404, postApiAuthKeyResponse500, postApiAuthKeyResponseError, postApiAuthKeyResponseSuccess, postApiAuthLogin, postApiAuthLoginResponse, postApiAuthLoginResponse200, postApiAuthLoginResponse302, postApiAuthLoginResponse400, postApiAuthLoginResponse401, postApiAuthLoginResponse403, postApiAuthLoginResponse404, postApiAuthLoginResponse500, postApiAuthLoginResponseError, postApiAuthLoginResponseSuccess, postApiAuthLogout, postApiAuthLogoutResponse, postApiAuthLogoutResponse200, postApiAuthLogoutResponse400, postApiAuthLogoutResponse401, postApiAuthLogoutResponse403, postApiAuthLogoutResponse404, postApiAuthLogoutResponse500, postApiAuthLogoutResponseError, postApiAuthLogoutResponseSuccess, postApiAuthOtpDisable, postApiAuthOtpDisableResponse, postApiAuthOtpDisableResponse200, postApiAuthOtpDisableResponse204, postApiAuthOtpDisableResponse400, postApiAuthOtpDisableResponse404, postApiAuthOtpDisableResponse500, postApiAuthOtpDisableResponseError, postApiAuthOtpDisableResponseSuccess, postApiAuthOtpGenerate, postApiAuthOtpGenerateResponse, postApiAuthOtpGenerateResponse200, postApiAuthOtpGenerateResponse400, postApiAuthOtpGenerateResponse401, postApiAuthOtpGenerateResponse403, postApiAuthOtpGenerateResponse404, postApiAuthOtpGenerateResponse500, postApiAuthOtpGenerateResponseError, postApiAuthOtpGenerateResponseSuccess, postApiAuthOtpValidate, postApiAuthOtpValidateResponse, postApiAuthOtpValidateResponse200, postApiAuthOtpValidateResponse302, postApiAuthOtpValidateResponse400, postApiAuthOtpValidateResponse401, postApiAuthOtpValidateResponse403, postApiAuthOtpValidateResponse404, postApiAuthOtpValidateResponse500, postApiAuthOtpValidateResponseError, postApiAuthOtpValidateResponseSuccess, postApiAuthOtpVerify, postApiAuthOtpVerifyResponse, postApiAuthOtpVerifyResponse200, postApiAuthOtpVerifyResponse204, postApiAuthOtpVerifyResponse400, postApiAuthOtpVerifyResponse404, postApiAuthOtpVerifyResponse500, postApiAuthOtpVerifyResponseError, postApiAuthOtpVerifyResponseSuccess, postApiAuthPing, postApiAuthPingResponse, postApiAuthPingResponse200, postApiAuthPingResponse400, postApiAuthPingResponse401, postApiAuthPingResponse403, postApiAuthPingResponse404, postApiAuthPingResponse500, postApiAuthPingResponseError, postApiAuthPingResponseSuccess, postApiAuthRegister, postApiAuthRegisterResponse, postApiAuthRegisterResponse200, postApiAuthRegisterResponse400, postApiAuthRegisterResponse401, postApiAuthRegisterResponse403, postApiAuthRegisterResponse404, postApiAuthRegisterResponse409, postApiAuthRegisterResponse500, postApiAuthRegisterResponseError, postApiAuthRegisterResponseSuccess };
|
package/dist/cjs/query-utils.cjs
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
let _lumeweb_query_builder = require("@lumeweb/query-builder");
|
|
2
|
-
|
|
3
|
-
//#region src/query-utils.ts
|
|
4
|
-
/**
|
|
5
|
-
* Builds URL query parameters for operations API
|
|
6
|
-
*
|
|
7
|
-
* Serializes query-builder parameters to the API's expected format:
|
|
8
|
-
* - filters → filters[field][operator]=value
|
|
9
|
-
* - sorters → _sort=field&_order=direction
|
|
10
|
-
* - pagination → _start=0&_end=20
|
|
11
|
-
* - search → search=value
|
|
12
|
-
*
|
|
13
|
-
* @param params - Query parameters using query-builder helpers
|
|
14
|
-
* @returns URLSearchParams object ready to use with fetch
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```ts
|
|
18
|
-
* const searchParams = buildOperationsQueryParams({
|
|
19
|
-
* filters: [
|
|
20
|
-
* { field: "status", operator: "eq", value: "completed" },
|
|
21
|
-
* { field: "operation", operator: "in", value: ["upload", "download"] }
|
|
22
|
-
* ],
|
|
23
|
-
* sorters: [{ field: "id", order: "desc" }],
|
|
24
|
-
* pagination: { start: 0, end: 20, page: 1, pageSize: 20 },
|
|
25
|
-
* search: "myfile"
|
|
26
|
-
* });
|
|
27
|
-
*
|
|
28
|
-
* // Result URL: ?filters[status][eq]=completed&filters[operation][in][0]=upload&filters[operation][in][1]=download&_sort=id&_order=desc&_start=0&_end=20&search=myfile
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
function buildOperationsQueryParams(params) {
|
|
32
|
-
const queryString = (0, _lumeweb_query_builder.serializeQueryParams)({
|
|
33
|
-
filters: params.filters,
|
|
34
|
-
sorters: params.sorters,
|
|
35
|
-
pagination: params.pagination
|
|
36
|
-
});
|
|
37
|
-
const searchParams = new URLSearchParams(queryString);
|
|
38
|
-
if (params.search) searchParams.set("search", params.search);
|
|
39
|
-
return searchParams;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
//#endregion
|
|
43
|
-
exports.buildOperationsQueryParams = buildOperationsQueryParams;
|
|
44
|
-
//# sourceMappingURL=query-utils.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-utils.cjs","names":[],"sources":["../../src/query-utils.ts"],"sourcesContent":["/**\n * Query utilities for operations API\n *\n * Provides types and functions for building query parameters with filters,\n * sorters, and pagination using the @lumeweb/query-builder library.\n */\n\n// Import types and functions from query-builder\nimport type { SerializeInput } from \"@lumeweb/query-builder\";\nimport { serializeQueryParams } from \"@lumeweb/query-builder\";\n\n/**\n * Operations query parameters for the operations API\n *\n * Uses query-builder helpers to construct the API query parameters:\n * - filters: Array of filter objects → serialized to filters[field][operator]=value\n * - sorters: Array of sort objects → serialized to _sort=field&_order=direction\n * - pagination: Object with start/end → serialized to _start=0&_end=20\n * - search: Search term → passed directly as search=value\n *\n * @example\n * ```ts\n * const params: OperationsQueryParams = {\n * filters: [\n * { field: \"status\", operator: \"eq\", value: \"completed\" },\n * { field: \"operation\", operator: \"in\", value: [\"upload\", \"download\"] }\n * ],\n * sorters: [{ field: \"id\", order: \"desc\" }],\n * pagination: { start: 0, end: 20, page: 1, pageSize: 20 },\n * search: \"myfile\"\n * };\n * ```\n */\nexport interface OperationsQueryParams extends SerializeInput {\n /** Search term for filename or other relevant operation data */\n search?: string;\n}\n\n/**\n * Unified operations query parameters\n */\nexport type OperationsListParams = OperationsQueryParams;\n\n/**\n * Builds URL query parameters for operations API\n *\n * Serializes query-builder parameters to the API's expected format:\n * - filters → filters[field][operator]=value\n * - sorters → _sort=field&_order=direction\n * - pagination → _start=0&_end=20\n * - search → search=value\n *\n * @param params - Query parameters using query-builder helpers\n * @returns URLSearchParams object ready to use with fetch\n *\n * @example\n * ```ts\n * const searchParams = buildOperationsQueryParams({\n * filters: [\n * { field: \"status\", operator: \"eq\", value: \"completed\" },\n * { field: \"operation\", operator: \"in\", value: [\"upload\", \"download\"] }\n * ],\n * sorters: [{ field: \"id\", order: \"desc\" }],\n * pagination: { start: 0, end: 20, page: 1, pageSize: 20 },\n * search: \"myfile\"\n * });\n *\n * // Result URL: ?filters[status][eq]=completed&filters[operation][in][0]=upload&filters[operation][in][1]=download&_sort=id&_order=desc&_start=0&_end=20&search=myfile\n * ```\n */\nexport function buildOperationsQueryParams(\n params: OperationsQueryParams,\n): URLSearchParams {\n const queryString = serializeQueryParams({\n filters: params.filters,\n sorters: params.sorters,\n pagination: params.pagination,\n }) as Record<string, string>;\n\n const searchParams = new URLSearchParams(queryString);\n\n // Add search parameter if provided\n if (params.search) {\n searchParams.set(\"search\", params.search);\n }\n\n return searchParams;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEA,SAAgB,2BACd,QACiB;CACjB,MAAM,+DAAmC;EACvC,SAAS,OAAO;EAChB,SAAS,OAAO;EAChB,YAAY,OAAO;EACpB,CAAC;CAEF,MAAM,eAAe,IAAI,gBAAgB,YAAY;AAGrD,KAAI,OAAO,OACT,cAAa,IAAI,UAAU,OAAO,OAAO;AAG3C,QAAO"}
|