Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alwatr/type

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alwatr/type - npm Package Compare versions

Comparing version 0.30.0 to 0.31.0

24

CHANGELOG.md

@@ -6,2 +6,26 @@ # Change Log

# [0.31.0](https://github.com/AliMD/alwatr/compare/v0.30.0...v0.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](https://github.com/AliMD/alwatr/compare/v0.29.0...v0.30.0) (2023-03-06)

@@ -8,0 +32,0 @@

32

customer-order-management.d.ts

@@ -5,4 +5,5 @@ import type { MultiLangStringObj } from './i18n.js';

import type { StringifyableRecord } from './type-helper.js';
import type { User } from './user.js';
export declare const ladingTypeCS: readonly ["hand", "pallet"];
export declare const carTypeCS: readonly ["nissan", "one_wheel", "ten_wheel", "trolley"];
export declare const carTypeCS: readonly ["nissan", "one", "ten_wheel", "trolley"];
export declare const carTypePriceCS: readonly [110000, 140000, 170000, 200000];

@@ -12,2 +13,3 @@ export declare const timePeriodCS: readonly ["auto", "1_2w", "2_3w", "3_4w"];

export declare const orderStatusCS: readonly ["draft", "registered", "processing", "payment_pending", "preparing", "shipping", "delayed", "on_hold", "canceled", "refunded"];
export declare const tileQtyStep = 3.6;
export interface Product extends AlwatrDocumentObject {

@@ -105,3 +107,29 @@ /**

}
export declare const orderLadingSchema: {
export declare const userPermissionsCS: readonly ["*", "user/patch"];
export type UserPermission = typeof userPermissionsCS[number];
export interface ComUser extends User {
permissions?: Array<UserPermission>;
shopName?: string;
}
export declare const orderInfoSchema: {
id: StringConstructor;
status: StringConstructor;
itemList: {
productId: StringConstructor;
price: NumberConstructor;
finalPrice: NumberConstructor;
qty: NumberConstructor;
}[];
shippingInfo: {
recipientName: StringConstructor;
recipientNationalCode: StringConstructor;
address: StringConstructor;
carType: StringConstructor;
ladingType: StringConstructor;
timePeriod: StringConstructor;
};
totalPrice: NumberConstructor;
finalTotalPrice: NumberConstructor;
};
export declare const orderShippingInfoSchema: {
recipientName: StringConstructor;

@@ -108,0 +136,0 @@ recipientNationalCode: StringConstructor;

34

customer-order-management.js
// -- Const value --
export const ladingTypeCS = ['hand', 'pallet'];
export const carTypeCS = ['nissan', 'one_wheel', 'ten_wheel', 'trolley'];
export const carTypeCS = ['nissan', 'one', 'ten_wheel', 'trolley'];
export const carTypePriceCS = [110000, 140000, 170000, 200000];

@@ -19,11 +19,29 @@ export const timePeriodCS = ['auto', '1_2w', '2_3w', '3_4w'];

];
export const tileQtyStep = 3.6;
export const userPermissionsCS = ['*', 'user/patch'];
// -- Schema --
export const orderLadingSchema = {
recipientName: String,
recipientNationalCode: String,
address: String,
carType: String,
ladingType: String,
timePeriod: String,
export const orderInfoSchema = {
id: String,
status: String,
itemList: [{
productId: String,
price: Number,
finalPrice: Number,
qty: Number,
}],
shippingInfo: {
recipientName: String,
recipientNationalCode: String,
address: String,
carType: String,
ladingType: String,
timePeriod: String,
},
// discount: Number,
// discountType: String,
totalPrice: Number,
// ladingPrice: Number,
finalTotalPrice: Number,
};
export const orderShippingInfoSchema = orderInfoSchema.shippingInfo;
//# sourceMappingURL=customer-order-management.js.map
{
"name": "@alwatr/type",
"version": "0.30.0",
"version": "0.31.0",
"description": "Alwatr projects common entities types",

@@ -31,3 +31,3 @@ "keywords": [

},
"gitHead": "36f55780ccdcb1acc07400b0cdb3fe7b0df56cca"
"gitHead": "896e64b58eed6e9048e870557ecf399d42705612"
}

@@ -13,3 +13,3 @@ import { StringifyableRecord } from './type-helper.js';

}
export interface AlwatrServiceResponseSuccess<TData extends StringifyableRecord> extends StringifyableRecord {
export interface AlwatrServiceResponseSuccess<TData extends StringifyableRecord = StringifyableRecord> extends StringifyableRecord {
ok: true;

@@ -21,3 +21,3 @@ statusCode?: number;

}
export interface AlwatrServiceResponseSuccessWithMeta<TData extends StringifyableRecord, TMeta extends StringifyableRecord> extends StringifyableRecord {
export interface AlwatrServiceResponseSuccessWithMeta<TData extends StringifyableRecord = StringifyableRecord, TMeta extends StringifyableRecord = StringifyableRecord> extends StringifyableRecord {
ok: true;

@@ -29,3 +29,3 @@ statusCode?: number;

}
export type AlwatrServiceResponse<TData extends StringifyableRecord, TMeta extends StringifyableRecord> = AlwatrServiceResponseSuccess<TData> | AlwatrServiceResponseSuccessWithMeta<TData, TMeta> | AlwatrServiceResponseFailed;
export type AlwatrServiceResponse<TData extends StringifyableRecord = StringifyableRecord, TMeta extends StringifyableRecord = StringifyableRecord> = AlwatrServiceResponseSuccess<TData> | AlwatrServiceResponseSuccessWithMeta<TData, TMeta> | AlwatrServiceResponseFailed;
//# sourceMappingURL=service-response.d.ts.map

@@ -0,1 +1,2 @@

import { AlwatrServiceResponseSuccessWithMeta } from './service-response.js';
import { StringifyableRecord } from './type-helper.js';

@@ -17,7 +18,3 @@ export interface AlwatrDocumentObject extends StringifyableRecord {

}
export interface AlwatrDocumentStorage<T extends AlwatrDocumentObject> extends StringifyableRecord {
ok: true;
data: Record<string, T>;
meta: AlwatrStorageMeta;
}
export type AlwatrDocumentStorage<T extends AlwatrDocumentObject = AlwatrDocumentObject> = AlwatrServiceResponseSuccessWithMeta<Record<string, T>, AlwatrStorageMeta>;
//# sourceMappingURL=storage.d.ts.map
export type Constructor<T> = new (...args: any[]) => T;
export type MaybePromise<T> = T | Promise<T>;
export type SingleOrArray<T> = T | Array<T>;
export type OmitFirstParam<F> = F extends (x: any, ...args: infer A) => infer R ? (...args: A) => R : never;

@@ -13,2 +14,6 @@ /**

}
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 Merge<M, N> = Omit<M, keyof N> & N;
//# sourceMappingURL=type-helper.d.ts.map

@@ -10,9 +10,39 @@ import type { AlwatrDocumentObject } from './storage.js';

/**
* User full name
* Link pass epoch number, started from 1 and increased by token revoke.
*/
lpe: number;
/**
* User authorization permissions list.
*/
permissions?: Array<string>;
fullName: string;
gender?: Gender;
phoneNumber: number;
gender: Gender;
email?: string;
phoneNumber?: string;
landlinePhone?: string;
/**
* Country Code.
*/
country: string;
/**
* Province Code.
*/
province?: string;
/**
* City Code.
*/
city?: string;
/**
* User full address.
*/
address?: string;
/**
* Postal code
*/
postalCode?: string;
}
export interface UserAuth {
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc