@websolutespa/bom-core 1.8.12 → 1.8.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @websolutespa/bom-core
2
2
 
3
+ ## 1.8.14
4
+
5
+ ### Patch Changes
6
+
7
+ - Added: passwordStrategy
8
+
9
+ ## 1.8.13
10
+
11
+ ### Patch Changes
12
+
13
+ - Modified: IQuerable
14
+
3
15
  ## 1.8.12
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -616,16 +616,16 @@ type IPagedResult<T extends IEntity = IEntity> = {
616
616
  docs: T[];
617
617
  } & Pagination;
618
618
  type IQuerable<T extends IEntity = IEntity> = {
619
- findOne<B extends T = T>(id: IEquatable, params?: QueryParams): Promise<B | undefined>;
620
- findMany<B extends T = T>(params?: QueryParams): Promise<B[]>;
621
- findPaged<B extends T = T>(params?: QueryParams): Promise<IPagedResult<B>>;
622
- create<B extends T = T>(payload: Omit<B, 'id'>): Promise<B>;
623
- updateOne<B extends T = T>(id: IEquatable, payload: Partial<B>, params?: Omit<QueryParams, 'where'>): Promise<B>;
624
- updateMany<B extends T = T>(payload: Partial<B>, params?: QueryParams): Promise<B[]>;
625
- deleteOne<B extends T = T>(id: IEquatable, params?: Omit<QueryParams, 'where'>): Promise<B | undefined>;
626
- deleteMany<B extends T = T>(params?: QueryParams): Promise<B[]>;
627
- update<B extends T = T>(payload: Partial<B>): Promise<B>;
628
- delete<B extends T = T>(id: IEquatable): Promise<B | undefined>;
619
+ findOne<B extends T = T>(id: IEquatable, params?: QueryParams, token?: string): Promise<B | undefined>;
620
+ findMany<B extends T = T>(params?: QueryParams, token?: string): Promise<B[]>;
621
+ findPaged<B extends T = T>(params?: QueryParams, token?: string): Promise<IPagedResult<B>>;
622
+ create<B extends T = T>(payload: Omit<B, 'id'>, params?: QueryParams, token?: string): Promise<B>;
623
+ updateOne<B extends T = T>(id: IEquatable, payload: Partial<B>, params?: Omit<QueryParams, 'where'>, token?: string): Promise<B>;
624
+ updateMany<B extends T = T>(payload: Partial<B>, params?: QueryParams, token?: string): Promise<B[]>;
625
+ deleteOne<B extends T = T>(id: IEquatable, params?: Omit<QueryParams, 'where'>, token?: string): Promise<B | undefined>;
626
+ deleteMany<B extends T = T>(params?: QueryParams, token?: string): Promise<B[]>;
627
+ update<B extends T = T>(payload: Partial<B>, params?: QueryParams, token?: string): Promise<B>;
628
+ delete<B extends T = T>(id: IEquatable, token?: string): Promise<B | undefined>;
629
629
  };
630
630
  type FindParams = {
631
631
  where?: {
@@ -982,6 +982,8 @@ declare class Logger {
982
982
 
983
983
  declare const defaultMarket: string;
984
984
 
985
+ declare const passwordStrategy: string;
986
+
985
987
  /**
986
988
  * Serializes query parameters into a query string.
987
989
  * @param queryParams - The query parameters to serialize.
@@ -1321,4 +1323,4 @@ declare function asServerProps(props: any): any;
1321
1323
  declare function awaitAll(array: any, callback: (item: any, index: number) => Promise<any>): Promise<any[]>;
1322
1324
  declare function merge(target: any, source: any): any;
1323
1325
 
1324
- export { DeepPartial, Dynamic, FetchError, FetchRequestOptions, FetchService, FindParams, FindWhereParams, IAction, IActionEmailData, IAnchor, ICategorized, ICategory, ICategoryItem, IClassName, IClassNameCollection, IClassNameValue, ICollectionDescription, IComponent, IConfig, IConsentPreference, IContextBaseParams, IContextParams, IDecoratedNav, IEmailConfig, IEndUser, IEntity, IEquatable, IFeature, IFeatureType, IImageResize, ILabel, ILayout, ILegalNotice, ILetter, ILocale, ILocaleId, ILocalizable, ILocalized, ILocalizedMenu, ILocalizedString, IMarket, IMedia, IMediaImage, IMediaInfo, IMediaJson, IMediaPdf, IMediaType, IMediaVideo, IMemoryStore, IMenu, IMenuBase, IMenuCategory, IMenuCustom, IMenuGroup, IMenuHref, IMenuItem, IMenuLink, IMenuPage, IMenuRoute, INamedEntity, IOption, IOverride, IOverrideReturnValue, IOverrideValue, IPackages, IPage, IPageItem, IPageRelation, IPageRelationResult, IPageUnresolvedRelation, IPagedResult, IPaginationResult, IPartial, IPreference, IPrettify, IQuerable, IRedirect, IRoute, IRouteCanonical, IRouteLink, IRouteParams, ISchema, ISerializedCollection, ISerializedStore, IServerSideContext, IServerSideSplatContext, IStaticContext, IStore, ITemplate, ITitledEntity, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, IUndecoratedNav, ImageStrategy, Json, JsonService, LiteralUnion, Logger, LoggerLevel, MenuCategoryStrategy, NextApiRequestCookies, Operator, PageProps, Pagination, PreviewData, Primitive, QueryParams, RedirectReason, RequireAtLeastOne, RouteStrategy, SchemaType, ServerSidePropsContext, StaticPropsContext, User, UserRole, UserWithRoles, ValueOf, Where, WhereAndOr, WhereBase, WhereField, arrayShuffle, asCategoryId, asEntityId, asEquatable, asEquatableNumber, asEquatableString, asServerProps, asSortedOptions, awaitAll, base64ToString, camelToSnakeCase, cloneItem, collectFeatureTypes, collectFeatureTypes__, collectOptions, collectRoutes, consoleWarn, decryptImageResize, deepMerge, defaultLocale, defaultMarket, eachCategorized, eachMarketLocale, encryptImageToken, enumToList, findCategoryInCategories, findChildCategories, findRouteOfCategory, findRoutesOfCategory, getCategorySegments, getCategorySegmentsByCategory, getClassNames, getCollectionDescription, getEnv, getHost, getIsDevelopment, getIsProduction, getOrigin, getParentCategoriesById, getParentCategory, getProto, getRootCategory, getRouteHref, httpDelete, httpFetch, httpGet, httpPatch, httpPost, httpPut, isArray, isBrowser, isDevelopment, isEntity, isEquatable, isHeaders, isIncomingHttpHeaders, isLocalizedString, isMediaImage, isMediaJson, isMediaPdf, isMediaVideo, isMenuCategory, isMenuGroup, isMenuHref, isMenuLink, isMenuPage, isMenuRoute, isNotNullString, isNumber, isObject, isProduction, isPromise, isRelation, isReservedCollectionDescription, isStage, isString, isUndecoratedCategory, isUndecoratedMenuCategory, isUndecoratedMenuItem, isUndecoratedMenuPage, isUndecoratedNav, isUnresolvedCategory, isUnresolvedRelation, isValidCollectionDescription, isValidString, localize, localizeItem, localizeValue, localizedToString, merge, pascalCaseToCamelCase, pascalCaseToCharCase, pascalCaseToKebabCase, pascalCaseToSnakeCase, qsDeserialize, qsDeserializeRaw, qsSerialize, qsSerializeRaw, resolveMediaType, stringToBase64, toCamelCase, toCharCase, toDisplayName, toFindParams, toKebabCase, toPascalCase, toPluralName, toSnakeCase, toTitleCase, toValidCollectionName, unknownCaseToPascalCase, uuidv4, withSchema };
1326
+ export { DeepPartial, Dynamic, FetchError, FetchRequestOptions, FetchService, FindParams, FindWhereParams, IAction, IActionEmailData, IAnchor, ICategorized, ICategory, ICategoryItem, IClassName, IClassNameCollection, IClassNameValue, ICollectionDescription, IComponent, IConfig, IConsentPreference, IContextBaseParams, IContextParams, IDecoratedNav, IEmailConfig, IEndUser, IEntity, IEquatable, IFeature, IFeatureType, IImageResize, ILabel, ILayout, ILegalNotice, ILetter, ILocale, ILocaleId, ILocalizable, ILocalized, ILocalizedMenu, ILocalizedString, IMarket, IMedia, IMediaImage, IMediaInfo, IMediaJson, IMediaPdf, IMediaType, IMediaVideo, IMemoryStore, IMenu, IMenuBase, IMenuCategory, IMenuCustom, IMenuGroup, IMenuHref, IMenuItem, IMenuLink, IMenuPage, IMenuRoute, INamedEntity, IOption, IOverride, IOverrideReturnValue, IOverrideValue, IPackages, IPage, IPageItem, IPageRelation, IPageRelationResult, IPageUnresolvedRelation, IPagedResult, IPaginationResult, IPartial, IPreference, IPrettify, IQuerable, IRedirect, IRoute, IRouteCanonical, IRouteLink, IRouteParams, ISchema, ISerializedCollection, ISerializedStore, IServerSideContext, IServerSideSplatContext, IStaticContext, IStore, ITemplate, ITitledEntity, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, IUndecoratedNav, ImageStrategy, Json, JsonService, LiteralUnion, Logger, LoggerLevel, MenuCategoryStrategy, NextApiRequestCookies, Operator, PageProps, Pagination, PreviewData, Primitive, QueryParams, RedirectReason, RequireAtLeastOne, RouteStrategy, SchemaType, ServerSidePropsContext, StaticPropsContext, User, UserRole, UserWithRoles, ValueOf, Where, WhereAndOr, WhereBase, WhereField, arrayShuffle, asCategoryId, asEntityId, asEquatable, asEquatableNumber, asEquatableString, asServerProps, asSortedOptions, awaitAll, base64ToString, camelToSnakeCase, cloneItem, collectFeatureTypes, collectFeatureTypes__, collectOptions, collectRoutes, consoleWarn, decryptImageResize, deepMerge, defaultLocale, defaultMarket, eachCategorized, eachMarketLocale, encryptImageToken, enumToList, findCategoryInCategories, findChildCategories, findRouteOfCategory, findRoutesOfCategory, getCategorySegments, getCategorySegmentsByCategory, getClassNames, getCollectionDescription, getEnv, getHost, getIsDevelopment, getIsProduction, getOrigin, getParentCategoriesById, getParentCategory, getProto, getRootCategory, getRouteHref, httpDelete, httpFetch, httpGet, httpPatch, httpPost, httpPut, isArray, isBrowser, isDevelopment, isEntity, isEquatable, isHeaders, isIncomingHttpHeaders, isLocalizedString, isMediaImage, isMediaJson, isMediaPdf, isMediaVideo, isMenuCategory, isMenuGroup, isMenuHref, isMenuLink, isMenuPage, isMenuRoute, isNotNullString, isNumber, isObject, isProduction, isPromise, isRelation, isReservedCollectionDescription, isStage, isString, isUndecoratedCategory, isUndecoratedMenuCategory, isUndecoratedMenuItem, isUndecoratedMenuPage, isUndecoratedNav, isUnresolvedCategory, isUnresolvedRelation, isValidCollectionDescription, isValidString, localize, localizeItem, localizeValue, localizedToString, merge, pascalCaseToCamelCase, pascalCaseToCharCase, pascalCaseToKebabCase, pascalCaseToSnakeCase, passwordStrategy, qsDeserialize, qsDeserializeRaw, qsSerialize, qsSerializeRaw, resolveMediaType, stringToBase64, toCamelCase, toCharCase, toDisplayName, toFindParams, toKebabCase, toPascalCase, toPluralName, toSnakeCase, toTitleCase, toValidCollectionName, unknownCaseToPascalCase, uuidv4, withSchema };
package/dist/index.js CHANGED
@@ -131,6 +131,7 @@ __export(src_exports, {
131
131
  pascalCaseToCharCase: () => pascalCaseToCharCase,
132
132
  pascalCaseToKebabCase: () => pascalCaseToKebabCase,
133
133
  pascalCaseToSnakeCase: () => pascalCaseToSnakeCase,
134
+ passwordStrategy: () => passwordStrategy,
134
135
  qsDeserialize: () => qsDeserialize,
135
136
  qsDeserializeRaw: () => qsDeserializeRaw,
136
137
  qsSerialize: () => qsSerialize,
@@ -1306,6 +1307,13 @@ function getDefaultMarket() {
1306
1307
  }
1307
1308
  var defaultMarket = getDefaultMarket();
1308
1309
 
1310
+ // src/password/password.ts
1311
+ function getPasswordStrategy() {
1312
+ const passwordStrategy2 = typeof process !== "undefined" && process.env.NEXT_PUBLIC_PASSWORD_STRATEGY ? process.env.NEXT_PUBLIC_PASSWORD_STRATEGY : "^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])[a-zA-Z0-9\\W]{8,}$";
1313
+ return passwordStrategy2;
1314
+ }
1315
+ var passwordStrategy = getPasswordStrategy();
1316
+
1309
1317
  // src/qs/qs.ts
1310
1318
  function qsSerializeKey(key, parentKey = "") {
1311
1319
  return parentKey ? `${parentKey}[${key}]` : String(key);
@@ -1789,6 +1797,7 @@ var RedirectReason = /* @__PURE__ */ ((RedirectReason2) => {
1789
1797
  pascalCaseToCharCase,
1790
1798
  pascalCaseToKebabCase,
1791
1799
  pascalCaseToSnakeCase,
1800
+ passwordStrategy,
1792
1801
  qsDeserialize,
1793
1802
  qsDeserializeRaw,
1794
1803
  qsSerialize,
package/dist/index.mjs CHANGED
@@ -1151,6 +1151,13 @@ function getDefaultMarket() {
1151
1151
  }
1152
1152
  var defaultMarket = getDefaultMarket();
1153
1153
 
1154
+ // src/password/password.ts
1155
+ function getPasswordStrategy() {
1156
+ const passwordStrategy2 = typeof process !== "undefined" && process.env.NEXT_PUBLIC_PASSWORD_STRATEGY ? process.env.NEXT_PUBLIC_PASSWORD_STRATEGY : "^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])[a-zA-Z0-9\\W]{8,}$";
1157
+ return passwordStrategy2;
1158
+ }
1159
+ var passwordStrategy = getPasswordStrategy();
1160
+
1154
1161
  // src/qs/qs.ts
1155
1162
  function qsSerializeKey(key, parentKey = "") {
1156
1163
  return parentKey ? `${parentKey}[${key}]` : String(key);
@@ -1633,6 +1640,7 @@ export {
1633
1640
  pascalCaseToCharCase,
1634
1641
  pascalCaseToKebabCase,
1635
1642
  pascalCaseToSnakeCase,
1643
+ passwordStrategy,
1636
1644
  qsDeserialize,
1637
1645
  qsDeserializeRaw,
1638
1646
  qsSerialize,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@websolutespa/bom-core",
3
- "version": "1.8.12",
3
+ "version": "1.8.14",
4
4
  "description": "Core module of the BOM Repository",
5
5
  "keywords": [
6
6
  "bom",