@orderingstack/ordering-types 0.0.2 → 0.0.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/{index.d.ts → dist/cjs/index.d.ts} +12 -14
- package/dist/cjs/index.js +25 -0
- package/dist/esm/index.d.ts +99 -0
- package/dist/esm/index.js +22 -0
- package/package.json +9 -4
|
@@ -15,7 +15,7 @@ export interface Address {
|
|
|
15
15
|
city: string;
|
|
16
16
|
country: string;
|
|
17
17
|
}
|
|
18
|
-
export enum CouponViewType {
|
|
18
|
+
export declare enum CouponViewType {
|
|
19
19
|
CAROUSEL = "carousel",
|
|
20
20
|
NORMAL = "normal",
|
|
21
21
|
IMAGE = "image"
|
|
@@ -35,8 +35,8 @@ export interface Language {
|
|
|
35
35
|
key: string;
|
|
36
36
|
icon: any;
|
|
37
37
|
}
|
|
38
|
-
export type StringBoolean = 'true' | 'false';
|
|
39
|
-
export enum EProductKind {
|
|
38
|
+
export declare type StringBoolean = 'true' | 'false';
|
|
39
|
+
export declare enum EProductKind {
|
|
40
40
|
GROUP = "3e/group",
|
|
41
41
|
PRODUCT = "3e/product",
|
|
42
42
|
CATEGORY = "3e/group/category",
|
|
@@ -46,21 +46,20 @@ export enum EProductKind {
|
|
|
46
46
|
REF = "3e/ref",
|
|
47
47
|
QUERY = "3e/query"
|
|
48
48
|
}
|
|
49
|
-
export enum EProductKindBucket {
|
|
49
|
+
export declare enum EProductKindBucket {
|
|
50
50
|
GROUP = "group",
|
|
51
51
|
PRODUCT = "product"
|
|
52
52
|
}
|
|
53
|
-
export type Literals = {
|
|
53
|
+
export declare type Literals = {
|
|
54
54
|
name: string;
|
|
55
55
|
fiscal?: string;
|
|
56
|
-
"target-product-id"?: string
|
|
56
|
+
"target-product-id"?: string;
|
|
57
57
|
};
|
|
58
|
-
export type Media = {
|
|
58
|
+
export declare type Media = {
|
|
59
59
|
url: string;
|
|
60
60
|
name: string;
|
|
61
61
|
};
|
|
62
|
-
|
|
63
|
-
export type Availability = {
|
|
62
|
+
export declare type Availability = {
|
|
64
63
|
MON?: [string, string];
|
|
65
64
|
TUE?: [string, string];
|
|
66
65
|
WED?: [string, string];
|
|
@@ -68,8 +67,8 @@ export type Availability = {
|
|
|
68
67
|
FRI?: [string, string];
|
|
69
68
|
SAT?: [string, string];
|
|
70
69
|
SUN?: [string, string];
|
|
71
|
-
}
|
|
72
|
-
export type Product = {
|
|
70
|
+
};
|
|
71
|
+
export declare type Product = {
|
|
73
72
|
availability?: Availability;
|
|
74
73
|
id: string;
|
|
75
74
|
img?: string;
|
|
@@ -90,12 +89,11 @@ export type Product = {
|
|
|
90
89
|
filter?: any;
|
|
91
90
|
fltCtx?: any;
|
|
92
91
|
};
|
|
93
|
-
export type ProductConfig = {
|
|
92
|
+
export declare type ProductConfig = {
|
|
94
93
|
selected: any;
|
|
95
94
|
filter: any;
|
|
96
95
|
};
|
|
97
|
-
|
|
98
96
|
export interface Category {
|
|
99
97
|
id: string;
|
|
100
98
|
name: string;
|
|
101
|
-
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EProductKindBucket = exports.EProductKind = exports.CouponViewType = void 0;
|
|
4
|
+
var CouponViewType;
|
|
5
|
+
(function (CouponViewType) {
|
|
6
|
+
CouponViewType["CAROUSEL"] = "carousel";
|
|
7
|
+
CouponViewType["NORMAL"] = "normal";
|
|
8
|
+
CouponViewType["IMAGE"] = "image";
|
|
9
|
+
})(CouponViewType = exports.CouponViewType || (exports.CouponViewType = {}));
|
|
10
|
+
var EProductKind;
|
|
11
|
+
(function (EProductKind) {
|
|
12
|
+
EProductKind["GROUP"] = "3e/group";
|
|
13
|
+
EProductKind["PRODUCT"] = "3e/product";
|
|
14
|
+
EProductKind["CATEGORY"] = "3e/group/category";
|
|
15
|
+
EProductKind["OPTIONS"] = "3e/group/options";
|
|
16
|
+
EProductKind["CONFIG"] = "3e/group/config";
|
|
17
|
+
EProductKind["STATIC"] = "3e/static";
|
|
18
|
+
EProductKind["REF"] = "3e/ref";
|
|
19
|
+
EProductKind["QUERY"] = "3e/query";
|
|
20
|
+
})(EProductKind = exports.EProductKind || (exports.EProductKind = {}));
|
|
21
|
+
var EProductKindBucket;
|
|
22
|
+
(function (EProductKindBucket) {
|
|
23
|
+
EProductKindBucket["GROUP"] = "group";
|
|
24
|
+
EProductKindBucket["PRODUCT"] = "product";
|
|
25
|
+
})(EProductKindBucket = exports.EProductKindBucket || (exports.EProductKindBucket = {}));
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export interface Restaurant {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
geoPosition: GeoPosition;
|
|
5
|
+
address: Address;
|
|
6
|
+
}
|
|
7
|
+
export interface GeoPosition {
|
|
8
|
+
lat: number;
|
|
9
|
+
lng: number;
|
|
10
|
+
}
|
|
11
|
+
export interface Address {
|
|
12
|
+
street: string;
|
|
13
|
+
number: string;
|
|
14
|
+
postal: string;
|
|
15
|
+
city: string;
|
|
16
|
+
country: string;
|
|
17
|
+
}
|
|
18
|
+
export declare enum CouponViewType {
|
|
19
|
+
CAROUSEL = "carousel",
|
|
20
|
+
NORMAL = "normal",
|
|
21
|
+
IMAGE = "image"
|
|
22
|
+
}
|
|
23
|
+
export interface Coupon {
|
|
24
|
+
id: string;
|
|
25
|
+
img: string;
|
|
26
|
+
viewType?: CouponViewType;
|
|
27
|
+
size?: 'md' | 'lg';
|
|
28
|
+
price?: number;
|
|
29
|
+
name?: string;
|
|
30
|
+
endDate?: string;
|
|
31
|
+
timeToEnd?: any;
|
|
32
|
+
}
|
|
33
|
+
export interface Language {
|
|
34
|
+
label: string;
|
|
35
|
+
key: string;
|
|
36
|
+
icon: any;
|
|
37
|
+
}
|
|
38
|
+
export declare type StringBoolean = 'true' | 'false';
|
|
39
|
+
export declare enum EProductKind {
|
|
40
|
+
GROUP = "3e/group",
|
|
41
|
+
PRODUCT = "3e/product",
|
|
42
|
+
CATEGORY = "3e/group/category",
|
|
43
|
+
OPTIONS = "3e/group/options",
|
|
44
|
+
CONFIG = "3e/group/config",
|
|
45
|
+
STATIC = "3e/static",
|
|
46
|
+
REF = "3e/ref",
|
|
47
|
+
QUERY = "3e/query"
|
|
48
|
+
}
|
|
49
|
+
export declare enum EProductKindBucket {
|
|
50
|
+
GROUP = "group",
|
|
51
|
+
PRODUCT = "product"
|
|
52
|
+
}
|
|
53
|
+
export declare type Literals = {
|
|
54
|
+
name: string;
|
|
55
|
+
fiscal?: string;
|
|
56
|
+
"target-product-id"?: string;
|
|
57
|
+
};
|
|
58
|
+
export declare type Media = {
|
|
59
|
+
url: string;
|
|
60
|
+
name: string;
|
|
61
|
+
};
|
|
62
|
+
export declare type Availability = {
|
|
63
|
+
MON?: [string, string];
|
|
64
|
+
TUE?: [string, string];
|
|
65
|
+
WED?: [string, string];
|
|
66
|
+
THU?: [string, string];
|
|
67
|
+
FRI?: [string, string];
|
|
68
|
+
SAT?: [string, string];
|
|
69
|
+
SUN?: [string, string];
|
|
70
|
+
};
|
|
71
|
+
export declare type Product = {
|
|
72
|
+
availability?: Availability;
|
|
73
|
+
id: string;
|
|
74
|
+
img?: string;
|
|
75
|
+
items?: Product[];
|
|
76
|
+
kind: EProductKind | EProductKindBucket;
|
|
77
|
+
literals?: Literals;
|
|
78
|
+
details?: {
|
|
79
|
+
literals?: Literals;
|
|
80
|
+
media?: Media[];
|
|
81
|
+
};
|
|
82
|
+
price: string;
|
|
83
|
+
minPrice?: string;
|
|
84
|
+
quantity: string;
|
|
85
|
+
vat: string;
|
|
86
|
+
outsideAvailabilitySlot?: boolean;
|
|
87
|
+
state?: ProductConfig;
|
|
88
|
+
selCtx: string;
|
|
89
|
+
filter?: any;
|
|
90
|
+
fltCtx?: any;
|
|
91
|
+
};
|
|
92
|
+
export declare type ProductConfig = {
|
|
93
|
+
selected: any;
|
|
94
|
+
filter: any;
|
|
95
|
+
};
|
|
96
|
+
export interface Category {
|
|
97
|
+
id: string;
|
|
98
|
+
name: string;
|
|
99
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export var CouponViewType;
|
|
2
|
+
(function (CouponViewType) {
|
|
3
|
+
CouponViewType["CAROUSEL"] = "carousel";
|
|
4
|
+
CouponViewType["NORMAL"] = "normal";
|
|
5
|
+
CouponViewType["IMAGE"] = "image";
|
|
6
|
+
})(CouponViewType || (CouponViewType = {}));
|
|
7
|
+
export var EProductKind;
|
|
8
|
+
(function (EProductKind) {
|
|
9
|
+
EProductKind["GROUP"] = "3e/group";
|
|
10
|
+
EProductKind["PRODUCT"] = "3e/product";
|
|
11
|
+
EProductKind["CATEGORY"] = "3e/group/category";
|
|
12
|
+
EProductKind["OPTIONS"] = "3e/group/options";
|
|
13
|
+
EProductKind["CONFIG"] = "3e/group/config";
|
|
14
|
+
EProductKind["STATIC"] = "3e/static";
|
|
15
|
+
EProductKind["REF"] = "3e/ref";
|
|
16
|
+
EProductKind["QUERY"] = "3e/query";
|
|
17
|
+
})(EProductKind || (EProductKind = {}));
|
|
18
|
+
export var EProductKindBucket;
|
|
19
|
+
(function (EProductKindBucket) {
|
|
20
|
+
EProductKindBucket["GROUP"] = "group";
|
|
21
|
+
EProductKindBucket["PRODUCT"] = "product";
|
|
22
|
+
})(EProductKindBucket || (EProductKindBucket = {}));
|
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orderingstack/ordering-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Typescript types for @orderingstack",
|
|
5
|
-
"types": "index.d.ts",
|
|
6
|
-
"main":"index.
|
|
5
|
+
"types": "dist/esm/index.d.ts",
|
|
6
|
+
"main": "dist/cjs/index.js",
|
|
7
|
+
"module": "dist/esm/index.js",
|
|
7
8
|
"files": [
|
|
8
|
-
"
|
|
9
|
+
"dist/"
|
|
9
10
|
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
|
|
13
|
+
"prepublishOnly": "npm run build"
|
|
14
|
+
},
|
|
10
15
|
"author": "Tomasz Rojek <tomasz.rojek@e3.pl>",
|
|
11
16
|
"devDependencies": {
|
|
12
17
|
"typescript": "next"
|