@plyaz/types 1.19.0 → 1.19.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/api/endpoints/featureFlags/index.d.ts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/index.cjs +156 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +146 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* are exported from @plyaz/types/features - import them from there
|
|
6
6
|
*/
|
|
7
7
|
export type { FeatureFlagEndpointTypes, FeatureFlagEndpointKey } from './endpoints';
|
|
8
|
-
export type { FeatureFlagErrorResponse, EvaluateFlagRequest, EvaluateFlagParams, EvaluateFlagResponse, IsEnabledRequest, IsEnabledParams, IsEnabledResponse, EvaluateAllFlagsRequest, EvaluateAllFlagsResponse, CreateFlagResponse, UpdateFlagParams, UpdateFlagRequest, UpdateFlagResponse, DeleteFlagParams, DeleteFlagResponse, SetOverrideParams, SetOverrideRequest, SetOverrideResponse, RemoveOverrideParams, RemoveOverrideResponse, GetFlagRulesParams, GetFlagRulesResponse, RefreshCacheResponse, FeatureFlagHealthResponse, } from './types';
|
|
8
|
+
export type { FeatureFlagErrorResponse, EvaluateFlagRequest, EvaluateFlagParams, EvaluateFlagResponse, IsEnabledRequest, IsEnabledParams, IsEnabledResponse, EvaluateAllFlagsRequest, EvaluateAllFlagsResponse, CreateFlagResponse, CreateFeatureFlagRequest, UpdateFlagParams, UpdateFlagRequest, UpdateFlagResponse, DeleteFlagParams, DeleteFlagResponse, SetOverrideParams, SetOverrideRequest, SetOverrideResponse, RemoveOverrideParams, RemoveOverrideResponse, GetFlagRulesParams, GetFlagRulesResponse, RefreshCacheResponse, FeatureFlagHealthResponse, } from './types';
|
package/dist/core/index.d.ts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -181,6 +181,151 @@ var FEATURE_FLAG_METADATA = {
|
|
|
181
181
|
// Multiple flags resolved at once
|
|
182
182
|
};
|
|
183
183
|
|
|
184
|
+
// src/core/events/enums.ts
|
|
185
|
+
var CoreEventScope = {
|
|
186
|
+
SYSTEM: "system",
|
|
187
|
+
ENTITY: "entity",
|
|
188
|
+
VALIDATION: "validation",
|
|
189
|
+
SANITIZATION: "sanitization",
|
|
190
|
+
API: "api",
|
|
191
|
+
CACHE: "cache",
|
|
192
|
+
AUTH: "auth",
|
|
193
|
+
FEATURE_FLAG: "featureFlag",
|
|
194
|
+
STORE: "store"
|
|
195
|
+
};
|
|
196
|
+
var SystemEventAction = {
|
|
197
|
+
INITIALIZED: "initialized",
|
|
198
|
+
READY: "ready",
|
|
199
|
+
SHUTDOWN: "shutdown",
|
|
200
|
+
ERROR: "error",
|
|
201
|
+
WARNING: "warning"
|
|
202
|
+
};
|
|
203
|
+
var EntityEventAction = {
|
|
204
|
+
// Lifecycle (before API call)
|
|
205
|
+
CREATING: "creating",
|
|
206
|
+
UPDATING: "updating",
|
|
207
|
+
PATCHING: "patching",
|
|
208
|
+
DELETING: "deleting",
|
|
209
|
+
// Completed (after API call)
|
|
210
|
+
CREATED: "created",
|
|
211
|
+
UPDATED: "updated",
|
|
212
|
+
PATCHED: "patched",
|
|
213
|
+
DELETED: "deleted",
|
|
214
|
+
// Error/Complete
|
|
215
|
+
ERROR: "error",
|
|
216
|
+
COMPLETE: "complete",
|
|
217
|
+
// Bulk operations
|
|
218
|
+
BULK_CREATED: "bulkCreated",
|
|
219
|
+
BULK_DELETED: "bulkDeleted"
|
|
220
|
+
};
|
|
221
|
+
var ValidationEventAction = {
|
|
222
|
+
STARTED: "started",
|
|
223
|
+
SUCCESS: "success",
|
|
224
|
+
FAILED: "failed"
|
|
225
|
+
};
|
|
226
|
+
var SanitizationEventAction = {
|
|
227
|
+
STARTED: "started",
|
|
228
|
+
SUCCESS: "success",
|
|
229
|
+
FAILED: "failed"
|
|
230
|
+
};
|
|
231
|
+
var ApiEventAction = {
|
|
232
|
+
REQUEST_START: "requestStart",
|
|
233
|
+
REQUEST_SUCCESS: "requestSuccess",
|
|
234
|
+
REQUEST_ERROR: "requestError",
|
|
235
|
+
RETRY: "retry",
|
|
236
|
+
TIMEOUT: "timeout"
|
|
237
|
+
};
|
|
238
|
+
var CacheEventAction = {
|
|
239
|
+
HIT: "hit",
|
|
240
|
+
MISS: "miss",
|
|
241
|
+
SET: "set",
|
|
242
|
+
DELETE: "delete",
|
|
243
|
+
CLEAR: "clear",
|
|
244
|
+
EXPIRED: "expired"
|
|
245
|
+
};
|
|
246
|
+
var AuthEventAction = {
|
|
247
|
+
LOGIN: "login",
|
|
248
|
+
LOGOUT: "logout",
|
|
249
|
+
TOKEN_REFRESH: "tokenRefresh",
|
|
250
|
+
SESSION_EXPIRED: "sessionExpired",
|
|
251
|
+
UNAUTHORIZED: "unauthorized"
|
|
252
|
+
};
|
|
253
|
+
var FeatureFlagEventAction = {
|
|
254
|
+
CHANGED: "changed",
|
|
255
|
+
EVALUATED: "evaluated",
|
|
256
|
+
REFRESHED: "refreshed"
|
|
257
|
+
};
|
|
258
|
+
var StoreEventAction = {
|
|
259
|
+
UPDATED: "updated",
|
|
260
|
+
RESET: "reset",
|
|
261
|
+
HYDRATED: "hydrated"
|
|
262
|
+
};
|
|
263
|
+
var CORE_EVENTS = {
|
|
264
|
+
SYSTEM: {
|
|
265
|
+
INITIALIZED: `${CoreEventScope.SYSTEM}:${SystemEventAction.INITIALIZED}`,
|
|
266
|
+
READY: `${CoreEventScope.SYSTEM}:${SystemEventAction.READY}`,
|
|
267
|
+
SHUTDOWN: `${CoreEventScope.SYSTEM}:${SystemEventAction.SHUTDOWN}`,
|
|
268
|
+
ERROR: `${CoreEventScope.SYSTEM}:${SystemEventAction.ERROR}`,
|
|
269
|
+
WARNING: `${CoreEventScope.SYSTEM}:${SystemEventAction.WARNING}`
|
|
270
|
+
},
|
|
271
|
+
ENTITY: {
|
|
272
|
+
CREATING: `${CoreEventScope.ENTITY}:${EntityEventAction.CREATING}`,
|
|
273
|
+
UPDATING: `${CoreEventScope.ENTITY}:${EntityEventAction.UPDATING}`,
|
|
274
|
+
PATCHING: `${CoreEventScope.ENTITY}:${EntityEventAction.PATCHING}`,
|
|
275
|
+
DELETING: `${CoreEventScope.ENTITY}:${EntityEventAction.DELETING}`,
|
|
276
|
+
CREATED: `${CoreEventScope.ENTITY}:${EntityEventAction.CREATED}`,
|
|
277
|
+
UPDATED: `${CoreEventScope.ENTITY}:${EntityEventAction.UPDATED}`,
|
|
278
|
+
PATCHED: `${CoreEventScope.ENTITY}:${EntityEventAction.PATCHED}`,
|
|
279
|
+
DELETED: `${CoreEventScope.ENTITY}:${EntityEventAction.DELETED}`,
|
|
280
|
+
ERROR: `${CoreEventScope.ENTITY}:${EntityEventAction.ERROR}`,
|
|
281
|
+
COMPLETE: `${CoreEventScope.ENTITY}:${EntityEventAction.COMPLETE}`,
|
|
282
|
+
BULK_CREATED: `${CoreEventScope.ENTITY}:${EntityEventAction.BULK_CREATED}`,
|
|
283
|
+
BULK_DELETED: `${CoreEventScope.ENTITY}:${EntityEventAction.BULK_DELETED}`
|
|
284
|
+
},
|
|
285
|
+
VALIDATION: {
|
|
286
|
+
STARTED: `${CoreEventScope.VALIDATION}:${ValidationEventAction.STARTED}`,
|
|
287
|
+
SUCCESS: `${CoreEventScope.VALIDATION}:${ValidationEventAction.SUCCESS}`,
|
|
288
|
+
FAILED: `${CoreEventScope.VALIDATION}:${ValidationEventAction.FAILED}`
|
|
289
|
+
},
|
|
290
|
+
SANITIZATION: {
|
|
291
|
+
STARTED: `${CoreEventScope.SANITIZATION}:${SanitizationEventAction.STARTED}`,
|
|
292
|
+
SUCCESS: `${CoreEventScope.SANITIZATION}:${SanitizationEventAction.SUCCESS}`,
|
|
293
|
+
FAILED: `${CoreEventScope.SANITIZATION}:${SanitizationEventAction.FAILED}`
|
|
294
|
+
},
|
|
295
|
+
API: {
|
|
296
|
+
REQUEST_START: `${CoreEventScope.API}:${ApiEventAction.REQUEST_START}`,
|
|
297
|
+
REQUEST_SUCCESS: `${CoreEventScope.API}:${ApiEventAction.REQUEST_SUCCESS}`,
|
|
298
|
+
REQUEST_ERROR: `${CoreEventScope.API}:${ApiEventAction.REQUEST_ERROR}`,
|
|
299
|
+
RETRY: `${CoreEventScope.API}:${ApiEventAction.RETRY}`,
|
|
300
|
+
TIMEOUT: `${CoreEventScope.API}:${ApiEventAction.TIMEOUT}`
|
|
301
|
+
},
|
|
302
|
+
CACHE: {
|
|
303
|
+
HIT: `${CoreEventScope.CACHE}:${CacheEventAction.HIT}`,
|
|
304
|
+
MISS: `${CoreEventScope.CACHE}:${CacheEventAction.MISS}`,
|
|
305
|
+
SET: `${CoreEventScope.CACHE}:${CacheEventAction.SET}`,
|
|
306
|
+
DELETE: `${CoreEventScope.CACHE}:${CacheEventAction.DELETE}`,
|
|
307
|
+
CLEAR: `${CoreEventScope.CACHE}:${CacheEventAction.CLEAR}`,
|
|
308
|
+
EXPIRED: `${CoreEventScope.CACHE}:${CacheEventAction.EXPIRED}`
|
|
309
|
+
},
|
|
310
|
+
AUTH: {
|
|
311
|
+
LOGIN: `${CoreEventScope.AUTH}:${AuthEventAction.LOGIN}`,
|
|
312
|
+
LOGOUT: `${CoreEventScope.AUTH}:${AuthEventAction.LOGOUT}`,
|
|
313
|
+
TOKEN_REFRESH: `${CoreEventScope.AUTH}:${AuthEventAction.TOKEN_REFRESH}`,
|
|
314
|
+
SESSION_EXPIRED: `${CoreEventScope.AUTH}:${AuthEventAction.SESSION_EXPIRED}`,
|
|
315
|
+
UNAUTHORIZED: `${CoreEventScope.AUTH}:${AuthEventAction.UNAUTHORIZED}`
|
|
316
|
+
},
|
|
317
|
+
FEATURE_FLAG: {
|
|
318
|
+
CHANGED: `${CoreEventScope.FEATURE_FLAG}:${FeatureFlagEventAction.CHANGED}`,
|
|
319
|
+
EVALUATED: `${CoreEventScope.FEATURE_FLAG}:${FeatureFlagEventAction.EVALUATED}`,
|
|
320
|
+
REFRESHED: `${CoreEventScope.FEATURE_FLAG}:${FeatureFlagEventAction.REFRESHED}`
|
|
321
|
+
},
|
|
322
|
+
STORE: {
|
|
323
|
+
UPDATED: `${CoreEventScope.STORE}:${StoreEventAction.UPDATED}`,
|
|
324
|
+
RESET: `${CoreEventScope.STORE}:${StoreEventAction.RESET}`,
|
|
325
|
+
HYDRATED: `${CoreEventScope.STORE}:${StoreEventAction.HYDRATED}`
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
|
|
184
329
|
// src/errors/enums.ts
|
|
185
330
|
var ERROR_TYPE = {
|
|
186
331
|
/** A general validation error (e.g., form or input errors). */
|
|
@@ -8307,6 +8452,8 @@ exports.ATHLETE_PROFILE_ERRORS = ATHLETE_PROFILE_ERRORS;
|
|
|
8307
8452
|
exports.AUDIT_OPERATION = AUDIT_OPERATION;
|
|
8308
8453
|
exports.AUTH_PROVIDER = AUTH_PROVIDER;
|
|
8309
8454
|
exports.AUTH_PROVIDER_TYPE = AUTH_PROVIDER_TYPE;
|
|
8455
|
+
exports.ApiEventAction = ApiEventAction;
|
|
8456
|
+
exports.AuthEventAction = AuthEventAction;
|
|
8310
8457
|
exports.BACKEND_RUNTIMES = BACKEND_RUNTIMES;
|
|
8311
8458
|
exports.BASIC_PROFILE_ERRORS = BASIC_PROFILE_ERRORS;
|
|
8312
8459
|
exports.BUCKET_PURPOSE = BUCKET_PURPOSE;
|
|
@@ -8324,13 +8471,16 @@ exports.COMMON_STORAGE_TYPES = COMMON_STORAGE_TYPES;
|
|
|
8324
8471
|
exports.CONFIG_EVENTS = CONFIG_EVENTS;
|
|
8325
8472
|
exports.COORDINATES = COORDINATES;
|
|
8326
8473
|
exports.CORE_ERROR_CODES = CORE_ERROR_CODES;
|
|
8474
|
+
exports.CORE_EVENTS = CORE_EVENTS;
|
|
8327
8475
|
exports.CORRELATION_TYPE = CORRELATION_TYPE;
|
|
8328
8476
|
exports.COST_OPTIMIZATION_STRATEGY = COST_OPTIMIZATION_STRATEGY;
|
|
8329
8477
|
exports.COUNTRIES = COUNTRIES;
|
|
8330
8478
|
exports.CREATE_CAMPAIGN_ERRORS = CREATE_CAMPAIGN_ERRORS;
|
|
8331
8479
|
exports.CURRENCY_CODES = CURRENCY_CODES;
|
|
8332
8480
|
exports.CUSTOM_RULE_FIELD = CUSTOM_RULE_FIELD;
|
|
8481
|
+
exports.CacheEventAction = CacheEventAction;
|
|
8333
8482
|
exports.ContactUsFormSchema = ContactUsFormSchema;
|
|
8483
|
+
exports.CoreEventScope = CoreEventScope;
|
|
8334
8484
|
exports.CorrelationIdSchema = CorrelationIdSchema;
|
|
8335
8485
|
exports.DATABASE_ERROR_CODES = DATABASE_ERROR_CODES;
|
|
8336
8486
|
exports.DATABASE_EVENT_TYPE = DATABASE_EVENT_TYPE;
|
|
@@ -8367,6 +8517,7 @@ exports.EVENT_STATUS = EVENT_STATUS;
|
|
|
8367
8517
|
exports.EVENT_TYPE = EVENT_TYPE;
|
|
8368
8518
|
exports.EXTENSION_SOURCE = EXTENSION_SOURCE;
|
|
8369
8519
|
exports.EmailSchema = EmailSchema;
|
|
8520
|
+
exports.EntityEventAction = EntityEventAction;
|
|
8370
8521
|
exports.FACTORY_OPERATIONS = FACTORY_OPERATIONS;
|
|
8371
8522
|
exports.FAIL_OVER_STRATEGY = FAIL_OVER_STRATEGY;
|
|
8372
8523
|
exports.FEATURE_FLAG_DEFAULTS = FEATURE_FLAG_DEFAULTS;
|
|
@@ -8381,6 +8532,7 @@ exports.FILE_CATEGORY = FILE_CATEGORY;
|
|
|
8381
8532
|
exports.FILE_EXTENSIONS = FILE_EXTENSIONS;
|
|
8382
8533
|
exports.FILE_VALIDATION_ERROR = FILE_VALIDATION_ERROR;
|
|
8383
8534
|
exports.FRONTEND_RUNTIMES = FRONTEND_RUNTIMES;
|
|
8535
|
+
exports.FeatureFlagEventAction = FeatureFlagEventAction;
|
|
8384
8536
|
exports.HANDLER_SCOPES = HANDLER_SCOPES;
|
|
8385
8537
|
exports.HEADER_EVENTS = HEADER_EVENTS;
|
|
8386
8538
|
exports.HEADER_STAGES = HEADER_STAGES;
|
|
@@ -8480,13 +8632,16 @@ exports.STORAGE_VARIANT_NAME = STORAGE_VARIANT_NAME;
|
|
|
8480
8632
|
exports.STORAGE_VISIBILITY = STORAGE_VISIBILITY;
|
|
8481
8633
|
exports.STORAGE_WEBHOOK_EVENT_TYPE = STORAGE_WEBHOOK_EVENT_TYPE;
|
|
8482
8634
|
exports.SYSTEM_USERS = SYSTEM_USERS;
|
|
8635
|
+
exports.SanitizationEventAction = SanitizationEventAction;
|
|
8483
8636
|
exports.SendGridEventSchema = SendGridEventSchema;
|
|
8484
8637
|
exports.SendGridWebhookSchema = SendGridWebhookSchema;
|
|
8485
8638
|
exports.SignupFormSchema = SignupFormSchema;
|
|
8486
8639
|
exports.StorageMediaProcessingPayloadSchema = StorageMediaProcessingPayloadSchema;
|
|
8487
8640
|
exports.StorageProcessingOutputSchema = StorageProcessingOutputSchema;
|
|
8641
|
+
exports.StoreEventAction = StoreEventAction;
|
|
8488
8642
|
exports.SupabaseStorageObjectSchema = SupabaseStorageObjectSchema;
|
|
8489
8643
|
exports.SupabaseWebhookPayloadSchema = SupabaseWebhookPayloadSchema;
|
|
8644
|
+
exports.SystemEventAction = SystemEventAction;
|
|
8490
8645
|
exports.TABLES = TABLES;
|
|
8491
8646
|
exports.TEMPLATE_OUTPUT_FORMAT = TEMPLATE_OUTPUT_FORMAT;
|
|
8492
8647
|
exports.TRACKING_PHASES = TRACKING_PHASES;
|
|
@@ -8502,6 +8657,7 @@ exports.USER_STATUS = USER_STATUS;
|
|
|
8502
8657
|
exports.USER_TYPE = USER_TYPE;
|
|
8503
8658
|
exports.UserIdSchema = UserIdSchema;
|
|
8504
8659
|
exports.VALIDATION_RANGES = VALIDATION_RANGES;
|
|
8660
|
+
exports.ValidationEventAction = ValidationEventAction;
|
|
8505
8661
|
exports.WEBHOOK_ENCRYPTION_METHOD = WEBHOOK_ENCRYPTION_METHOD;
|
|
8506
8662
|
exports.WEBHOOK_EVENT_TYPE = WEBHOOK_EVENT_TYPE;
|
|
8507
8663
|
exports.WEBHOOK_EVENT_TYPE_MAPPING = WEBHOOK_EVENT_TYPE_MAPPING;
|