@alwatr/type
Advanced tools
Comparing version 1.0.1 to 1.1.0
126
CHANGELOG.md
@@ -6,6 +6,128 @@ # Change Log | ||
## [1.0.1](https://github.com/AliMD/alwatr/compare/v1.0.0...v1.0.1) (2023-06-21) | ||
# 1.1.0 (2023-09-11) | ||
**Note:** Version bump only for package @alwatr/type | ||
# 1.0.0 (2023-06-14) | ||
### Bug Fixes | ||
- **type/photo:** make meta optional ([5cea716](https://github.com/AliMD/alwatr/commit/5cea716d77bfe4db57c8f25307c4ee18862bb716)) | ||
# 0.32.0 (2023-05-27) | ||
### Bug Fixes | ||
- **com-api:** user-list-inc-order permission ([91beb27](https://github.com/AliMD/alwatr/commit/91beb27cbe372e6b66c99928e26fa4679b751c23)) | ||
- **fetch:** userAuth in StringifyableFetchOptions ([f554b57](https://github.com/AliMD/alwatr/commit/f554b575584cb1464d48fbe8a8c4006125365853)) | ||
- **type/com:** orderInfoSchema ([b90d872](https://github.com/AliMD/alwatr/commit/b90d87268429fc802fb9966fd6efd43912bc851a)) | ||
- **type:** `data` type ([0601384](https://github.com/AliMD/alwatr/commit/06013843612fb2400d664a4dd084f70278a5eaa4)) | ||
- **type:** `orderInfoSchema` ([47ca524](https://github.com/AliMD/alwatr/commit/47ca5243f6de3c966c3fb3bd10256134d100e4e9)) | ||
### Features | ||
- **com-pwa:** car count ([d2ea9c1](https://github.com/AliMD/alwatr/commit/d2ea9c12863d214afe5daa7d07997175c19ca859)) | ||
- **type/com:** ComUserIncOrder ([8ddf5bf](https://github.com/AliMD/alwatr/commit/8ddf5bf0b75b601582751f017f293a26c74b1815)) | ||
- **type/com:** rewrite ([1829673](https://github.com/AliMD/alwatr/commit/1829673cf63746d4356aaa3673aefc001b042258)) | ||
- **type/user:** add token! ([de23795](https://github.com/AliMD/alwatr/commit/de237957a7a045c1998cf43b585125027fad5d7d)) | ||
- **type:** add `priceListName` to `ComUser` ([b22555e](https://github.com/AliMD/alwatr/commit/b22555ebe508cc0d732e6af0e1bbf99f99eaca16)) | ||
- **type:** user permissions ([e3d7091](https://github.com/AliMD/alwatr/commit/e3d70916fb7e93f8daf51a8c4aaf856f109b01be)) | ||
- **type:** user permissions ([6bb0aac](https://github.com/AliMD/alwatr/commit/6bb0aacb991e11a930a30dc9071a5de0edf77368)) | ||
# 0.31.0 (2023-05-08) | ||
### Bug Fixes | ||
- **com-pwa/new-order:** debugging ([9027eb0](https://github.com/AliMD/alwatr/commit/9027eb013e6803b1f77dc7cbf4cc14704f49557d)) | ||
- **type/service-response:** default generics ([04dfe54](https://github.com/AliMD/alwatr/commit/04dfe549c272878756544481f0a0d301d6e3c228)) | ||
- **type:** fix `ComUser` ([670660f](https://github.com/AliMD/alwatr/commit/670660fb3b18e63ad54d22a76297b982c77533be)) | ||
- **type:** Stringifyable ([058381b](https://github.com/AliMD/alwatr/commit/058381b50641ba44f4ac60e2173b5b91449e58cd)) | ||
- **validator:** array support ([08f5215](https://github.com/AliMD/alwatr/commit/08f521534a0e937e5cf0f92bf5ca274838f41f93)) | ||
### Features | ||
- **com-pwa:** `sing-in` process ([407e9c6](https://github.com/AliMD/alwatr/commit/407e9c640899efdd2bc4633bb966665c6f9b00be)) | ||
- **com-pwa:** change order_shipping_car i18n key ([b8f7daa](https://github.com/AliMD/alwatr/commit/b8f7daa2622506d45e85274db38dbe20a2518f1f)) | ||
- **com-pwa:** validate shipping form and item list before enable submit ([9af59d7](https://github.com/AliMD/alwatr/commit/9af59d72a2678249776d738ea79e4f248a442c5c)) | ||
- **type/com:** ComUser/permissions ([a962366](https://github.com/AliMD/alwatr/commit/a9623669a83f1cce0f96428d5c2d126ad3e5984b)) | ||
- **type/com:** order schema ([d1aacdb](https://github.com/AliMD/alwatr/commit/d1aacdb56cb9995bc05d54bb78bc67e3f629e12c)) | ||
- **type/com:** qtyStep const ([3c928d4](https://github.com/AliMD/alwatr/commit/3c928d406859c85cf939827ece98db6fc39ff914)) | ||
- **type:** ArrayItems ([4f20d8a](https://github.com/AliMD/alwatr/commit/4f20d8ab312787d3073a43594e813bcddeb99aeb)) | ||
- **type:** MaybeArray ([0c61708](https://github.com/AliMD/alwatr/commit/0c6170890faad306a052c3d8242df21f780ef1c3)) | ||
- **type:** SingleOrArray, Prop, Values, Merge ([c3d2a86](https://github.com/AliMD/alwatr/commit/c3d2a8669f4ae83abeb69a1cfef51ecc23c76a10)) | ||
- **type:** user permissions ([aff0853](https://github.com/AliMD/alwatr/commit/aff08538d183e3f6b2d637e56fe2f2281c4da768)) | ||
- **type:** UserAuth ([c902144](https://github.com/AliMD/alwatr/commit/c9021444743c5a0a5a333688830cd0a7dd7d9867)) | ||
# 0.30.0 (2023-03-06) | ||
### Bug Fixes | ||
- **type:** com orderStatusCS ([b789640](https://github.com/AliMD/alwatr/commit/b789640b01165e403e9e12a014c9c777b61689b7)) | ||
- **type:** export user and photo ([27e352e](https://github.com/AliMD/alwatr/commit/27e352e231aed966d4d049cc2f1f93781f386952)) | ||
### Features | ||
- **button:** click signal with detail ([03c2dc1](https://github.com/AliMD/alwatr/commit/03c2dc1e64562815505b468c761ac245554470ed)) | ||
- **com-pwa:** carType/ladingType ([94a2e96](https://github.com/AliMD/alwatr/commit/94a2e969465c20f7b52b7f18050b9ae0d3fec62d)) | ||
- **i18n:** l18eReadyPromise ([85c7570](https://github.com/AliMD/alwatr/commit/85c7570d71c3d5b9ec87b0e357ecf41f47f96227)) | ||
- **type/com:** OrderDraft, orderDeliverySchema ([4417877](https://github.com/AliMD/alwatr/commit/44178779fbeba5d14a465380541c64ffb3f4f597)) | ||
- **type:** ProductPrice ([7fe7b32](https://github.com/AliMD/alwatr/commit/7fe7b321c0ab94c8abc4527b4aa33191cf5a9213)) | ||
# 0.29.0 (2023-02-10) | ||
### Bug Fixes | ||
- **storage-server:** type ([5e033d7](https://github.com/AliMD/alwatr/commit/5e033d75d158a3b634a0d05da741241ff76f58d9)) | ||
### Features | ||
- **icon-button:** new content prop with click signal event ([bb5dae6](https://github.com/AliMD/alwatr/commit/bb5dae6048fcacb4a4e70aab514e4900fd5a96ea)) | ||
- **route:** makeRouteContext ([16be581](https://github.com/AliMD/alwatr/commit/16be5815a4a44f22bd17c4a87f1b7ef30f9aec6c)) | ||
- **router:** new api from scratch! ([2b26a8d](https://github.com/AliMD/alwatr/commit/2b26a8d9f95b5968dbda003edc9d540ea95fadd1)) | ||
- **type:** enhance com types ([ed91385](https://github.com/AliMD/alwatr/commit/ed9138584b0096377e73251557cc4ff8aa92a3cc)) | ||
- **type:** OmitFirstParam ([b5a778f](https://github.com/AliMD/alwatr/commit/b5a778f3da03244a0ad693ab15ef8dd782039163)) | ||
- **type:** Stringifyable ([c2e0771](https://github.com/AliMD/alwatr/commit/c2e077118e0371fb32a5fc3fc81cf7f87d65104b)) | ||
# 0.28.0 (2023-01-20) | ||
### Bug Fixes | ||
- **type:** ChatPhotoMessage ([c72bcb2](https://github.com/AliMD/alwatr/commit/c72bcb24bfa936cd325728b42ad0f2acf463865d)) | ||
- **type:** cleanup ([15c7d64](https://github.com/AliMD/alwatr/commit/15c7d648819914820374e752b91d41f287db574b)) | ||
- **type:** export alwatrRegisteredList ([fa308b5](https://github.com/AliMD/alwatr/commit/fa308b5208e0a2ef0ed33e0fe7299cae0af51a97)) | ||
- **type:** import type ([efaf4eb](https://github.com/AliMD/alwatr/commit/efaf4eb0ccbbf5eba5f34ece72bf27758f175521)) | ||
- **type:** revert paramkey ([f1ad066](https://github.com/AliMD/alwatr/commit/f1ad06621f7fe80018573e50804e9f3c1b2edde1)) | ||
### Features | ||
- **type:** add optional text on ChatPhotoMessage ([af83f5b](https://github.com/AliMD/alwatr/commit/af83f5b8604cecd3c9b0cb2375267458fd02431d)) | ||
- **type:** C.O.M ([d4655d8](https://github.com/AliMD/alwatr/commit/d4655d83f196990a3ffad2e4753be7b77639ee19)) | ||
- **type:** chat ([4b7ac95](https://github.com/AliMD/alwatr/commit/4b7ac95522dcb637ebab2eda0b8f3e0cd80d59b0)) | ||
- **type:** i18nString ([614037d](https://github.com/AliMD/alwatr/commit/614037d690415b257f34fb13c7143f76dfa2c6ca)) | ||
- **type:** id in storage meta type ([146b9eb](https://github.com/AliMD/alwatr/commit/146b9eb4ebc748eda852988328b88abb75651945)) | ||
- **type:** order ([79426ea](https://github.com/AliMD/alwatr/commit/79426ea696a0ca0723a8c7bfb6259c83a15c32d9)) | ||
- **type:** order storage ([bd5f11c](https://github.com/AliMD/alwatr/commit/bd5f11c93f35ff235fb2f85df6cecd8823ea34fc)) | ||
- **type:** photo ([7e38283](https://github.com/AliMD/alwatr/commit/7e38283113606a0a01c705caeb1f773a75dfd97c)) | ||
- **type:** photo ([742005f](https://github.com/AliMD/alwatr/commit/742005f8588e408e818188a60eb9cf4a1fe9592f)) | ||
- **type:** service-response ([18f8be3](https://github.com/AliMD/alwatr/commit/18f8be3f91f1678d6f5fb779c1f782736e29a010)) | ||
- **type:** storage ([d4b3a95](https://github.com/AliMD/alwatr/commit/d4b3a956fb17b80b748d0587f12e818c021e3985)) | ||
- **type:** user ([a0d8242](https://github.com/AliMD/alwatr/commit/a0d824202d91d75678945d72497965a55c4deba7)) | ||
- **type:** user ([30b8edb](https://github.com/AliMD/alwatr/commit/30b8edb17aad0f20ccb887c1a71c65c385104ee3)) | ||
# 0.27.0 (2022-12-29) | ||
### Bug Fixes | ||
- **core/type:** remove extras ([63fe462](https://github.com/AliMD/alwatr/commit/63fe462e88e1d3e0dca8696f0c4c073ebc94c490)) | ||
- resolve conflict ([052314d](https://github.com/AliMD/alwatr/commit/052314d2adb3b9b0e44e54f9b8e6d60fc1827075)) | ||
- review issue ([e5d192c](https://github.com/AliMD/alwatr/commit/e5d192cbee6917c2de01146cf8bd026895724ab8)) | ||
### Features | ||
- **core/type:** make package ([1d8d1bd](https://github.com/AliMD/alwatr/commit/1d8d1bdfc39c4b1e238770a69d7c8e0cad593251)) | ||
- **type:** add types ([2de3842](https://github.com/AliMD/alwatr/commit/2de384297b70b9818ec8d62ce8d31be4822d95a4)) | ||
- **type:** define alwatrRegistredList ([25406c2](https://github.com/AliMD/alwatr/commit/25406c268f39cf3e055ea05c9fc7b50bd3dd0a17)) | ||
- **type:** define chat type ([e4a345a](https://github.com/AliMD/alwatr/commit/e4a345a7c932d88f0d13e2df1b3dd7d2ad745932)) | ||
- **type:** define chat type ([174fb02](https://github.com/AliMD/alwatr/commit/174fb02fe287c6fee6e9783f91dfa1928dbaf2ce)) | ||
- **type:** define constructor type ([39c5ab7](https://github.com/AliMD/alwatr/commit/39c5ab74f0a1471d5e20beff89f6885265907633)) | ||
- **type:** define math types ([8c19f40](https://github.com/AliMD/alwatr/commit/8c19f4058d4361b7d3f4f714595e34cb6fa21109)) | ||
# [1.0.0](https://github.com/AliMD/alwatr/compare/v0.32.0...v1.0.0) (2023-06-14) | ||
@@ -12,0 +134,0 @@ |
@@ -54,3 +54,3 @@ import type { MultiLangStringObj } from './i18n.js'; | ||
*/ | ||
itemList: Array<OrderItem>; | ||
itemList: OrderItem[]; | ||
/** | ||
@@ -119,3 +119,3 @@ * Delivery info | ||
export interface ComUser extends User { | ||
permissions?: Array<UserPermission> | 'root'; | ||
permissions?: UserPermission[] | 'root'; | ||
shopName?: string; | ||
@@ -122,0 +122,0 @@ priceListName?: string; |
@@ -1,3 +0,3 @@ | ||
import type { Stringifyable } from './type-helper.js'; | ||
export type ClickSignalType<T extends Stringifyable = Stringifyable> = { | ||
import type { Stringifyable, StringifyableRecord } from './type-helper.js'; | ||
export interface ClickSignalType<T extends Stringifyable = Stringifyable> extends StringifyableRecord { | ||
readonly x: number; | ||
@@ -9,3 +9,3 @@ readonly y: number; | ||
detail: T; | ||
}; | ||
} | ||
//# sourceMappingURL=event-signal.d.ts.map |
@@ -5,3 +5,3 @@ import type { AlwatrDocumentObject } from './storage.js'; | ||
detail: JobDetail; | ||
resultList: Array<JobResult>; | ||
resultList: JobResult[]; | ||
} | ||
@@ -8,0 +8,0 @@ export interface JobDetail extends StringifyableRecord { |
@@ -1,8 +0,8 @@ | ||
export type AlwatrPackageInfo = { | ||
export interface AlwatrPackageInfo { | ||
name: string; | ||
version: string; | ||
}; | ||
export type GlobalAlwatr = { | ||
registeredList: Array<AlwatrPackageInfo>; | ||
}; | ||
} | ||
export interface GlobalAlwatr { | ||
registeredList: AlwatrPackageInfo[]; | ||
} | ||
declare global { | ||
@@ -9,0 +9,0 @@ var _ALWATR_VERSION_: string; |
import { AlwatrServiceResponseSuccessWithMeta } from './service-response.js'; | ||
import { StringifyableRecord } from './type-helper.js'; | ||
export type LocaleCode = `${Lowercase<string>}-${Uppercase<string>}`; | ||
@@ -7,3 +8,3 @@ export type L18eContext = AlwatrServiceResponseSuccessWithMeta<Record<string, string>, { | ||
}>; | ||
export type LocaleContext = { | ||
export interface LocaleContext extends StringifyableRecord { | ||
/** | ||
@@ -21,3 +22,3 @@ * fa-IR, en-US, ... | ||
direction: 'rtl' | 'ltr'; | ||
}; | ||
} | ||
/** | ||
@@ -24,0 +25,0 @@ * Multi language string |
{ | ||
"name": "@alwatr/type", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Alwatr projects common entities types", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "10b9734389e27538ba4fa4ac7871ec0354ca9285" | ||
"gitHead": "953ace94f564a606b60762433bd14dbde0912698" | ||
} |
export type Constructor<T> = new (...args: any[]) => T; | ||
export type MaybePromise<T> = T | Promise<T>; | ||
export type SingleOrArray<T> = T | Array<T>; | ||
export type SingleOrArray<T> = T | T[]; | ||
export type OmitFirstParam<F> = F extends (x: any, ...args: infer A) => infer R ? (...args: A) => R : never; | ||
@@ -10,10 +10,8 @@ /** | ||
[P: string]: Stringifyable; | ||
} | Array<Stringifyable>; | ||
export interface StringifyableRecord { | ||
[P: string]: Stringifyable; | ||
} | ||
} | Stringifyable[]; | ||
export type StringifyableRecord = Record<string, Stringifyable>; | ||
export type Prop<T, K> = K extends keyof T ? T[K] : never; | ||
export type Values<T> = T[keyof T]; | ||
export type ArrayItems<T> = T extends Array<infer K> ? K : T; | ||
export type ArrayItems<T> = T extends (infer K)[] ? K : T; | ||
export type Merge<M, N> = Omit<M, keyof N> & N; | ||
//# sourceMappingURL=type-helper.d.ts.map |
@@ -0,1 +1,2 @@ | ||
import { StringifyableRecord } from './type-helper.js'; | ||
import type { AlwatrDocumentObject } from './storage.js'; | ||
@@ -21,3 +22,3 @@ export declare const genderCS: readonly ["male", "female"]; | ||
*/ | ||
permissions?: Array<string> | 'root'; | ||
permissions?: string[] | 'root'; | ||
fullName: string; | ||
@@ -49,6 +50,6 @@ phoneNumber: number; | ||
} | ||
export type UserAuth = { | ||
export interface UserAuth extends StringifyableRecord { | ||
id: string; | ||
token: string; | ||
}; | ||
} | ||
//# sourceMappingURL=user.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60341