@useinsider/guido 3.27.0-beta.0dd857f → 3.27.0-beta.1fcb4d9
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/@types/config/schemas.js +3 -3
- package/dist/composables/useSave.js +17 -19
- package/dist/composables/useSaveValidation.js +252 -134
- package/dist/composables/useTranslations.js +9 -14
- package/dist/enums/save-validation.js +2 -2
- package/dist/node_modules/valibot/dist/index.js +154 -232
- package/dist/package.json.js +1 -1
- package/dist/src/composables/useSaveValidation.d.ts +2 -2
- package/dist/src/enums/save-validation.d.ts +15 -3
- package/package.json +1 -1
- package/dist/@types/email-be/html-validation.js +0 -28
- package/dist/enums/email-be.js +0 -27
- package/dist/services/emailBe/errors/ApiError.js +0 -50
- package/dist/services/emailBe/errors/handleApiError.js +0 -31
- package/dist/services/emailBe/errors/toApiError.js +0 -71
- package/dist/services/emailBe/html/HtmlValidationService.js +0 -35
- package/dist/services/emailBe/html/index.js +0 -6
- package/dist/services/emailBe/http/HttpManager.js +0 -68
- package/dist/services/emailBe/http/RetryStack.js +0 -24
- package/dist/services/emailBe/http/client.js +0 -61
- package/dist/services/emailBe/http/index.js +0 -10
- package/dist/services/emailBe/http/transportErrors.js +0 -20
- package/dist/src/@types/email-be/html-validation.d.ts +0 -51
- package/dist/src/enums/email-be.d.ts +0 -26
- package/dist/src/services/emailBe/errors/ApiError.d.ts +0 -40
- package/dist/src/services/emailBe/errors/handleApiError.d.ts +0 -11
- package/dist/src/services/emailBe/errors/toApiError.d.ts +0 -2
- package/dist/src/services/emailBe/html/HtmlValidationService.d.ts +0 -8
- package/dist/src/services/emailBe/html/index.d.ts +0 -2
- package/dist/src/services/emailBe/http/HttpManager.d.ts +0 -13
- package/dist/src/services/emailBe/http/RetryStack.d.ts +0 -6
- package/dist/src/services/emailBe/http/client.d.ts +0 -3
- package/dist/src/services/emailBe/http/index.d.ts +0 -2
- package/dist/src/services/emailBe/http/transportErrors.d.ts +0 -15
- package/dist/src/services/emailBe/http/types.d.ts +0 -46
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { HttpMethod, RetryPolicy } from './types';
|
|
2
|
-
import { type ApiError } from '@@/Services/emailBe/errors/ApiError';
|
|
3
|
-
export declare function defaultRetryFor(method: HttpMethod, fallback: RetryPolicy | null): RetryPolicy | null;
|
|
4
|
-
export declare function shouldRetry(error: ApiError, policy: RetryPolicy | null, attempt: number): boolean;
|
|
5
|
-
export declare function backoffDelay(policy: RetryPolicy, attempt: number): number;
|
|
6
|
-
export declare function delay(ms: number): Promise<void>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class HttpStatusError extends Error {
|
|
2
|
-
readonly status: number;
|
|
3
|
-
readonly body: unknown;
|
|
4
|
-
readonly requestId: string;
|
|
5
|
-
readonly authReported: boolean;
|
|
6
|
-
constructor(status: number, body: unknown, requestId: string, authReported: boolean);
|
|
7
|
-
}
|
|
8
|
-
export declare class TransportNetworkError extends Error {
|
|
9
|
-
readonly isTimeout: boolean;
|
|
10
|
-
readonly cause: unknown;
|
|
11
|
-
constructor(isTimeout: boolean, cause: unknown);
|
|
12
|
-
}
|
|
13
|
-
export declare class SessionExpiredError extends Error {
|
|
14
|
-
constructor();
|
|
15
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { ApiError } from '@@/Services/emailBe/errors/ApiError';
|
|
2
|
-
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
3
|
-
export interface RetryPolicy {
|
|
4
|
-
maxRetries: number;
|
|
5
|
-
backoffMs: readonly number[];
|
|
6
|
-
}
|
|
7
|
-
export interface RequestConfig {
|
|
8
|
-
method: HttpMethod;
|
|
9
|
-
url: string;
|
|
10
|
-
params?: Record<string, string | number | boolean | null | undefined>;
|
|
11
|
-
body?: unknown;
|
|
12
|
-
retry?: RetryPolicy | null;
|
|
13
|
-
dedup?: boolean;
|
|
14
|
-
timeoutMs?: number;
|
|
15
|
-
}
|
|
16
|
-
export interface ApiEnvelope<T, M = never[]> {
|
|
17
|
-
data: T;
|
|
18
|
-
meta: M;
|
|
19
|
-
}
|
|
20
|
-
export interface ApiErrorEnvelope {
|
|
21
|
-
requestId: string;
|
|
22
|
-
error: {
|
|
23
|
-
code: string;
|
|
24
|
-
message: string;
|
|
25
|
-
meta?: Record<string, unknown>;
|
|
26
|
-
errors?: Record<string, string[]>;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export type Result<T> = {
|
|
30
|
-
ok: true;
|
|
31
|
-
data: T;
|
|
32
|
-
} | {
|
|
33
|
-
ok: false;
|
|
34
|
-
error: ApiError;
|
|
35
|
-
};
|
|
36
|
-
export interface HttpManagerDefaults {
|
|
37
|
-
retry: RetryPolicy | null;
|
|
38
|
-
dedup: boolean;
|
|
39
|
-
}
|
|
40
|
-
export interface TransportResponse {
|
|
41
|
-
status: number;
|
|
42
|
-
data: unknown;
|
|
43
|
-
}
|
|
44
|
-
export interface HttpTransport {
|
|
45
|
-
request(config: RequestConfig): Promise<TransportResponse>;
|
|
46
|
-
}
|