@plyaz/config 1.6.1 → 1.6.3
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/a11y/constants.d.ts +1 -0
- package/dist/a11y/constants.d.ts.map +1 -0
- package/dist/a11y/index.d.ts +1 -0
- package/dist/a11y/index.d.ts.map +1 -0
- package/dist/api/environments.d.ts +49 -0
- package/dist/api/environments.d.ts.map +1 -0
- package/dist/api/index.d.ts +10 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/package/defaults.d.ts +21 -0
- package/dist/api/package/defaults.d.ts.map +1 -0
- package/dist/app.d.ts +1 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/chains/contracts.d.ts +1 -0
- package/dist/chains/contracts.d.ts.map +1 -0
- package/dist/chains/index.d.ts +1 -0
- package/dist/chains/index.d.ts.map +1 -0
- package/dist/chains/supportedChains.d.ts +1 -0
- package/dist/chains/supportedChains.d.ts.map +1 -0
- package/dist/display/constants.d.ts +1 -0
- package/dist/display/constants.d.ts.map +1 -0
- package/dist/display/index.d.ts +1 -0
- package/dist/display/index.d.ts.map +1 -0
- package/dist/domains.d.ts +1 -0
- package/dist/domains.d.ts.map +1 -0
- package/dist/env.d.ts +1 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/errors/constants.d.ts +1 -0
- package/dist/errors/constants.d.ts.map +1 -0
- package/dist/errors/index.cjs +3 -0
- package/dist/errors/index.cjs.map +1 -0
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.mjs +3 -0
- package/dist/errors/index.mjs.map +1 -0
- package/dist/features.d.ts +1 -0
- package/dist/features.d.ts.map +1 -0
- package/dist/http/constants.d.ts +1 -20
- package/dist/http/constants.d.ts.map +1 -0
- package/dist/http/index.d.ts +1 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/locale/address.d.ts +1 -0
- package/dist/locale/address.d.ts.map +1 -0
- package/dist/locale/countries.d.ts +1 -0
- package/dist/locale/countries.d.ts.map +1 -0
- package/dist/locale/currencies.d.ts +1 -0
- package/dist/locale/currencies.d.ts.map +1 -0
- package/dist/locale/formats.d.ts +1 -0
- package/dist/locale/formats.d.ts.map +1 -0
- package/dist/locale/index.d.ts +1 -0
- package/dist/locale/index.d.ts.map +1 -0
- package/dist/locale/iso.d.ts +1 -0
- package/dist/locale/iso.d.ts.map +1 -0
- package/dist/locale/languages.d.ts +1 -0
- package/dist/locale/languages.d.ts.map +1 -0
- package/dist/locale/phone.d.ts +1 -0
- package/dist/locale/phone.d.ts.map +1 -0
- package/dist/locale/timezone.d.ts +1 -0
- package/dist/locale/timezone.d.ts.map +1 -0
- package/dist/locales.d.ts +1 -0
- package/dist/locales.d.ts.map +1 -0
- package/dist/logger/constants.d.ts +1 -0
- package/dist/logger/constants.d.ts.map +1 -0
- package/dist/logger/index.cjs +3 -0
- package/dist/logger/index.cjs.map +1 -0
- package/dist/logger/index.d.ts +1 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.mjs +3 -0
- package/dist/logger/index.mjs.map +1 -0
- package/dist/math/constants.d.ts +1 -0
- package/dist/math/constants.d.ts.map +1 -0
- package/dist/math/index.d.ts +1 -0
- package/dist/math/index.d.ts.map +1 -0
- package/dist/network/constants.d.ts +1 -0
- package/dist/network/constants.d.ts.map +1 -0
- package/dist/network/index.d.ts +1 -0
- package/dist/network/index.d.ts.map +1 -0
- package/dist/performance/index.d.ts +1 -0
- package/dist/performance/index.d.ts.map +1 -0
- package/dist/providers/alchemy.d.ts +1 -0
- package/dist/providers/alchemy.d.ts.map +1 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/oauth.d.ts +1 -0
- package/dist/providers/oauth.d.ts.map +1 -0
- package/dist/security.d.ts +1 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/social.d.ts +1 -0
- package/dist/social.d.ts.map +1 -0
- package/dist/time/constants.d.ts +1 -0
- package/dist/time/constants.d.ts.map +1 -0
- package/dist/time/index.d.ts +1 -0
- package/dist/time/index.d.ts.map +1 -0
- package/dist/utils/collection/constants.d.ts +1 -0
- package/dist/utils/collection/constants.d.ts.map +1 -0
- package/dist/utils/collection/index.d.ts +1 -0
- package/dist/utils/collection/index.d.ts.map +1 -0
- package/dist/utils/hash/constants.d.ts +1 -0
- package/dist/utils/hash/constants.d.ts.map +1 -0
- package/dist/utils/hash/index.d.ts +1 -0
- package/dist/utils/hash/index.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/string/constants.d.ts +1 -0
- package/dist/utils/string/constants.d.ts.map +1 -0
- package/dist/utils/string/index.d.ts +1 -0
- package/dist/utils/string/index.d.ts.map +1 -0
- package/package.json +15 -3
package/dist/a11y/constants.d.ts
CHANGED
|
@@ -408,3 +408,4 @@ export type AriaRole = (typeof ARIA_ROLES)[keyof typeof ARIA_ROLES];
|
|
|
408
408
|
export type AriaAttribute = (typeof ARIA_ATTRIBUTES)[keyof typeof ARIA_ATTRIBUTES];
|
|
409
409
|
export type KeyboardCode = (typeof KEYBOARD_CODES)[keyof typeof KEYBOARD_CODES];
|
|
410
410
|
export type AnnouncementPriority = (typeof ANNOUNCEMENT_PRIORITY)[keyof typeof ANNOUNCEMENT_PRIORITY];
|
|
411
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/a11y/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;IAEzB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;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,OAAO,cAAc,CAAC,CAAC;AAChF,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AACpE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AACnF,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAChF,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/a11y/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/a11y/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Client Environment Configurations
|
|
3
|
+
*
|
|
4
|
+
* Provides environment-specific default configurations for the API client service.
|
|
5
|
+
* These configs are optimized for production, staging, and development environments.
|
|
6
|
+
*
|
|
7
|
+
* @module config/api/environments
|
|
8
|
+
*/
|
|
9
|
+
import type { ApiConfig } from '@plyaz/types/api';
|
|
10
|
+
/**
|
|
11
|
+
* Production configuration for the API client service.
|
|
12
|
+
* Optimized for reliability, security, and performance in production environments.
|
|
13
|
+
*
|
|
14
|
+
* Key Production Features:
|
|
15
|
+
* - Encryption REQUIRED (enforced)
|
|
16
|
+
* - Minimal headers (privacy-focused)
|
|
17
|
+
* - Network adaptation enabled (auto-adjust to conditions)
|
|
18
|
+
* - Balanced telemetry (monitoring without overhead)
|
|
19
|
+
* - Aggressive retry strategy (5 attempts with exponential backoff)
|
|
20
|
+
* - Uses retry PRESET strings instead of hardcoded values
|
|
21
|
+
*/
|
|
22
|
+
export declare const PRODUCTION_CONFIG: Partial<ApiConfig>;
|
|
23
|
+
/**
|
|
24
|
+
* Staging configuration for the API client service.
|
|
25
|
+
* ALIGNED with production for accurate pre-production testing.
|
|
26
|
+
* Only differences: standard headers for debugging, full performance tracking.
|
|
27
|
+
*
|
|
28
|
+
* Key Staging Features:
|
|
29
|
+
* - Encryption ENABLED (same as production)
|
|
30
|
+
* - Standard headers (slightly more context for debugging than prod)
|
|
31
|
+
* - Full performance tracking (catch issues before production)
|
|
32
|
+
* - Same retry strategy as production (aggressive)
|
|
33
|
+
* - Same network adaptation as production
|
|
34
|
+
*/
|
|
35
|
+
export declare const STAGING_CONFIG: Partial<ApiConfig>;
|
|
36
|
+
/**
|
|
37
|
+
* Development configuration for the API client service.
|
|
38
|
+
* Optimized for debugging and fast feedback during development.
|
|
39
|
+
*
|
|
40
|
+
* Key Development Features:
|
|
41
|
+
* - Encryption OPTIONAL (disable for easier debugging)
|
|
42
|
+
* - Full headers (all context for debugging)
|
|
43
|
+
* - No network adaptation (consistent behavior)
|
|
44
|
+
* - Minimal retries (fail fast to see errors quickly)
|
|
45
|
+
* - Full performance tracking (optimize during development)
|
|
46
|
+
* - Longer timeout (allow for debugging/breakpoints)
|
|
47
|
+
*/
|
|
48
|
+
export declare const DEVELOPMENT_CONFIG: Partial<ApiConfig>;
|
|
49
|
+
//# sourceMappingURL=environments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environments.d.ts","sourceRoot":"","sources":["../../src/api/environments.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAmC,MAAM,kBAAkB,CAAC;AAGnF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,SAAS,CA4KhD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,SAAS,CAwH7C,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAC,SAAS,CAqIjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ApiClientOptions, ApiConfig } from '@plyaz/types/api';
|
|
2
|
+
/**
|
|
3
|
+
* Default configuration for API clients
|
|
4
|
+
*
|
|
5
|
+
* These defaults provide sensible out-of-the-box behavior:
|
|
6
|
+
* - 30 second timeout for requests
|
|
7
|
+
* - 3 retry attempts with exponential backoff
|
|
8
|
+
* - 60 second cache TTL with 5 minute stale time
|
|
9
|
+
* - Standard JSON content-type headers
|
|
10
|
+
* - Soft-fail error strategy (returns error without throwing)
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_API_CONFIG: ApiConfig;
|
|
13
|
+
/**
|
|
14
|
+
* Default client options with global compliance enabled by default
|
|
15
|
+
*
|
|
16
|
+
* This ensures maximum privacy protection out of the box:
|
|
17
|
+
* - Enriched headers enabled with standard preset
|
|
18
|
+
* - Global compliance level (minimum data collection)
|
|
19
|
+
*/
|
|
20
|
+
export declare const DEFAULT_API_CLIENT_OPTIONS: Partial<ApiClientOptions>;
|
|
21
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/api/package/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGpE;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAkBhC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,EAAE,OAAO,CAAC,gBAAgB,CAKhE,CAAC"}
|
package/dist/app.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEK,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,OAAO;IAClB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/chains/contracts.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,SAAS;IACpB;;OAEG;;QAED;;WAEG;;YAED;;eAEG;;;QAGL;;WAEG;;YAED;;eAEG;;;;IAKP;;OAEG;;QAED;;WAEG;;YAED;;eAEG;;;QAGL;;WAEG;;YAED;;eAEG;;;;CAIC,CAAC"}
|
package/dist/chains/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/chains/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supportedChains.d.ts","sourceRoot":"","sources":["../../src/chains/supportedChains.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,qBAAqB;IAChC;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEK,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,wBAAwB;IACnC;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEK,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,oBAAoB;IAC/B;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/display/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;IAC5B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEK,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU;IACrB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEK,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAEzF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC"}
|
package/dist/display/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,aAAa,CAAC"}
|
package/dist/domains.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../src/domains.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO;IAClB;;OAEG;;IAGH;;OAEG;;CAEK,CAAC"}
|
package/dist/env.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,SAAgC,CAAC;AACtD,eAAO,MAAM,KAAK,SAAoD,CAAC;AACvE,eAAO,MAAM,MAAM,SAAmD,CAAC;AACvE,eAAO,MAAM,MAAM,SAA6C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/errors/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDf,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;CAgBhC,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
'use strict';// @plyaz package - Built with tsup
|
|
2
|
+
var e={validation_error:{status:400,message:"errors.validation.error"},unauthorized:{status:401,message:"errors.auth.unauthorized"},payment_failed:{status:402,message:"errors.payment.failed"},forbidden:{status:403,message:"errors.auth.forbidden"},not_found:{status:404,message:"errors.common.notFound"},method_not_allowed:{status:405,message:"errors.common.methodNotAllowed"},user_already_exists:{status:409,message:"errors.user.alreadyExists"},unprocessable_entity:{status:422,message:"errors.validation.unprocessable"},too_many_requests:{status:429,message:"errors.rateLimit.tooManyRequests"},internal_server_error:{status:500,message:"errors.server.internal"},not_implemented:{status:501,message:"errors.server.notImplemented"},bad_gateway:{status:502,message:"errors.server.badGateway"},service_unavailable:{status:503,message:"errors.server.serviceUnavailable"},gateway_timeout:{status:504,message:"errors.server.gatewayTimeout"}},s={InvalidInput:{type:"form",message:"Invalid input",timestamp:new Date().toISOString()},[e.internal_server_error.status]:{type:"server",message:"Something went wrong",timestamp:new Date().toISOString()},[e.unauthorized.status]:{type:"auth",message:"Please log in again",timestamp:new Date().toISOString()}};exports.BASE_ERRORS_RESPONSE=s;exports.ERRORS_CODES=e;//# sourceMappingURL=index.cjs.map
|
|
3
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/errors/constants.ts"],"names":["ERRORS_CODES","BASE_ERRORS_RESPONSE"],"mappings":";AACO,IAAMA,CAAAA,CAAe,CAC1B,gBAAA,CAAkB,CAChB,OAA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a,YAAA,CAAa,MAAM,EAAG,CAClC,IAAA,CAAM,MAAA,CACN,OAAA,CAAS,qBAAA,CACT,UAAW,IAAI,IAAA,EAAK,CAAE,WAAA,EACxB,CACF","file":"index.cjs","sourcesContent":["// Errors Code with messages\nexport const ERRORS_CODES = {\n validation_error: {\n status: 400,\n message: 'errors.validation.error',\n },\n unauthorized: {\n status: 401,\n message: 'errors.auth.unauthorized',\n },\n payment_failed: {\n status: 402,\n message: 'errors.payment.failed',\n },\n forbidden: {\n status: 403,\n message: 'errors.auth.forbidden',\n },\n not_found: {\n status: 404,\n message: 'errors.common.notFound',\n },\n method_not_allowed: {\n status: 405,\n message: 'errors.common.methodNotAllowed',\n },\n user_already_exists: {\n status: 409,\n message: 'errors.user.alreadyExists',\n },\n unprocessable_entity: {\n status: 422,\n message: 'errors.validation.unprocessable',\n },\n too_many_requests: {\n status: 429,\n message: 'errors.rateLimit.tooManyRequests',\n },\n internal_server_error: {\n status: 500,\n message: 'errors.server.internal',\n },\n not_implemented: {\n status: 501,\n message: 'errors.server.notImplemented',\n },\n bad_gateway: {\n status: 502,\n message: 'errors.server.badGateway',\n },\n service_unavailable: {\n status: 503,\n message: 'errors.server.serviceUnavailable',\n },\n gateway_timeout: {\n status: 504,\n message: 'errors.server.gatewayTimeout',\n },\n} as const;\n\nexport const BASE_ERRORS_RESPONSE = {\n ['InvalidInput']: {\n type: 'form',\n message: 'Invalid input',\n timestamp: new Date().toISOString(),\n },\n [ERRORS_CODES.internal_server_error.status]: {\n type: 'server',\n message: 'Something went wrong',\n timestamp: new Date().toISOString(),\n },\n [ERRORS_CODES.unauthorized.status]: {\n type: 'auth',\n message: 'Please log in again',\n timestamp: new Date().toISOString(),\n },\n};\n"]}
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @plyaz package - Built with tsup
|
|
2
|
+
var e={validation_error:{status:400,message:"errors.validation.error"},unauthorized:{status:401,message:"errors.auth.unauthorized"},payment_failed:{status:402,message:"errors.payment.failed"},forbidden:{status:403,message:"errors.auth.forbidden"},not_found:{status:404,message:"errors.common.notFound"},method_not_allowed:{status:405,message:"errors.common.methodNotAllowed"},user_already_exists:{status:409,message:"errors.user.alreadyExists"},unprocessable_entity:{status:422,message:"errors.validation.unprocessable"},too_many_requests:{status:429,message:"errors.rateLimit.tooManyRequests"},internal_server_error:{status:500,message:"errors.server.internal"},not_implemented:{status:501,message:"errors.server.notImplemented"},bad_gateway:{status:502,message:"errors.server.badGateway"},service_unavailable:{status:503,message:"errors.server.serviceUnavailable"},gateway_timeout:{status:504,message:"errors.server.gatewayTimeout"}},s={InvalidInput:{type:"form",message:"Invalid input",timestamp:new Date().toISOString()},[e.internal_server_error.status]:{type:"server",message:"Something went wrong",timestamp:new Date().toISOString()},[e.unauthorized.status]:{type:"auth",message:"Please log in again",timestamp:new Date().toISOString()}};export{s as BASE_ERRORS_RESPONSE,e as ERRORS_CODES};//# sourceMappingURL=index.mjs.map
|
|
3
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/errors/constants.ts"],"names":["ERRORS_CODES","BASE_ERRORS_RESPONSE"],"mappings":";AACO,IAAMA,CAAAA,CAAe,CAC1B,gBAAA,CAAkB,CAChB,OAAQ,GAAA,CACR,OAAA,CAAS,yBACX,CAAA,CACA,aAAc,CACZ,MAAA,CAAQ,GAAA,CACR,OAAA,CAAS,0BACX,CAAA,CACA,cAAA,CAAgB,CACd,MAAA,CAAQ,GAAA,CACR,OAAA,CAAS,uBACX,CAAA,CACA,UAAW,CACT,MAAA,CAAQ,GAAA,CACR,OAAA,CAAS,uBACX,CAAA,CACA,SAAA,CAAW,CACT,MAAA,CAAQ,IACR,OAAA,CAAS,wBACX,CAAA,CACA,kBAAA,CAAoB,CAClB,MAAA,CAAQ,GAAA,CACR,OAAA,CAAS,gCACX,CAAA,CACA,mBAAA,CAAqB,CACnB,MAAA,CAAQ,IACR,OAAA,CAAS,2BACX,CAAA,CACA,oBAAA,CAAsB,CACpB,MAAA,CAAQ,GAAA,CACR,OAAA,CAAS,iCACX,CAAA,CACA,iBAAA,CAAmB,CACjB,MAAA,CAAQ,IACR,OAAA,CAAS,kCACX,CAAA,CACA,qBAAA,CAAuB,CACrB,MAAA,CAAQ,GAAA,CACR,OAAA,CAAS,wBACX,EACA,eAAA,CAAiB,CACf,MAAA,CAAQ,GAAA,CACR,OAAA,CAAS,8BACX,CAAA,CACA,WAAA,CAAa,CACX,MAAA,CAAQ,GAAA,CACR,OAAA,CAAS,0BACX,EACA,mBAAA,CAAqB,CACnB,MAAA,CAAQ,GAAA,CACR,QAAS,kCACX,CAAA,CACA,eAAA,CAAiB,CACf,MAAA,CAAQ,GAAA,CACR,OAAA,CAAS,8BACX,CACF,CAAA,CAEaC,CAAAA,CAAuB,CACjC,YAAA,CAAiB,CAChB,IAAA,CAAM,MAAA,CACN,OAAA,CAAS,eAAA,CACT,UAAW,IAAI,IAAA,EAAK,CAAE,WAAA,EACxB,CAAA,CACA,CAACD,CAAAA,CAAa,sBAAsB,MAAM,EAAG,CAC3C,IAAA,CAAM,SACN,OAAA,CAAS,sBAAA,CACT,SAAA,CAAW,IAAI,MAAK,CAAE,WAAA,EACxB,CAAA,CACA,CAACA,CAAAA,CAAa,YAAA,CAAa,MAAM,EAAG,CAClC,IAAA,CAAM,MAAA,CACN,OAAA,CAAS,qBAAA,CACT,UAAW,IAAI,IAAA,EAAK,CAAE,WAAA,EACxB,CACF","file":"index.mjs","sourcesContent":["// Errors Code with messages\nexport const ERRORS_CODES = {\n validation_error: {\n status: 400,\n message: 'errors.validation.error',\n },\n unauthorized: {\n status: 401,\n message: 'errors.auth.unauthorized',\n },\n payment_failed: {\n status: 402,\n message: 'errors.payment.failed',\n },\n forbidden: {\n status: 403,\n message: 'errors.auth.forbidden',\n },\n not_found: {\n status: 404,\n message: 'errors.common.notFound',\n },\n method_not_allowed: {\n status: 405,\n message: 'errors.common.methodNotAllowed',\n },\n user_already_exists: {\n status: 409,\n message: 'errors.user.alreadyExists',\n },\n unprocessable_entity: {\n status: 422,\n message: 'errors.validation.unprocessable',\n },\n too_many_requests: {\n status: 429,\n message: 'errors.rateLimit.tooManyRequests',\n },\n internal_server_error: {\n status: 500,\n message: 'errors.server.internal',\n },\n not_implemented: {\n status: 501,\n message: 'errors.server.notImplemented',\n },\n bad_gateway: {\n status: 502,\n message: 'errors.server.badGateway',\n },\n service_unavailable: {\n status: 503,\n message: 'errors.server.serviceUnavailable',\n },\n gateway_timeout: {\n status: 504,\n message: 'errors.server.gatewayTimeout',\n },\n} as const;\n\nexport const BASE_ERRORS_RESPONSE = {\n ['InvalidInput']: {\n type: 'form',\n message: 'Invalid input',\n timestamp: new Date().toISOString(),\n },\n [ERRORS_CODES.internal_server_error.status]: {\n type: 'server',\n message: 'Something went wrong',\n timestamp: new Date().toISOString(),\n },\n [ERRORS_CODES.unauthorized.status]: {\n type: 'auth',\n message: 'Please log in again',\n timestamp: new Date().toISOString(),\n },\n};\n"]}
|
package/dist/features.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../src/features.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,eAAO,MAAM,QAAQ;IACnB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEuC,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;CAOzB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;CAO1B,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,8BAA8B,QAAQ,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;CAMzB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;CAG5B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;CAI1B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;CAMlC,CAAC"}
|
package/dist/http/constants.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module http/constants
|
|
8
8
|
*/
|
|
9
|
-
import type { ApiConfig, ApiClientOptions } from '@plyaz/types';
|
|
10
9
|
/**
|
|
11
10
|
* Standard HTTP status codes
|
|
12
11
|
*/
|
|
@@ -264,22 +263,4 @@ export declare const HTTP_STATUS: {
|
|
|
264
263
|
* Type for HTTP status codes
|
|
265
264
|
*/
|
|
266
265
|
export type HttpStatusCode = (typeof HTTP_STATUS)[keyof typeof HTTP_STATUS];
|
|
267
|
-
|
|
268
|
-
* Default configuration for API clients
|
|
269
|
-
*
|
|
270
|
-
* These defaults provide sensible out-of-the-box behavior:
|
|
271
|
-
* - 30 second timeout for requests
|
|
272
|
-
* - 3 retry attempts with exponential backoff
|
|
273
|
-
* - 60 second cache TTL with 5 minute stale time
|
|
274
|
-
* - Standard JSON content-type headers
|
|
275
|
-
* - Soft-fail error strategy (returns error without throwing)
|
|
276
|
-
*/
|
|
277
|
-
export declare const DEFAULT_API_CONFIG: ApiConfig;
|
|
278
|
-
/**
|
|
279
|
-
* Default client options with global compliance enabled by default
|
|
280
|
-
*
|
|
281
|
-
* This ensures maximum privacy protection out of the box:
|
|
282
|
-
* - Enriched headers enabled with standard preset
|
|
283
|
-
* - Global compliance level (minimum data collection)
|
|
284
|
-
*/
|
|
285
|
-
export declare const DEFAULT_API_CLIENT_OPTIONS: Partial<ApiClientOptions>;
|
|
266
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/http/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW;IAEtB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAIH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAIH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAIH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAIH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEK,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,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