@orderingstack/ordering-types 0.0.1

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.
Files changed (2) hide show
  1. package/index.d.ts +90 -0
  2. package/package.json +14 -0
package/index.d.ts ADDED
@@ -0,0 +1,90 @@
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 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 type StringBoolean = 'true' | 'false';
39
+ export 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 enum EProductKindBucket {
50
+ GROUP = "group",
51
+ PRODUCT = "product"
52
+ }
53
+ export type Literals = {
54
+ name: string;
55
+ fiscal?: string;
56
+ "target-product-id"?: string
57
+ };
58
+ export type Media = {
59
+ url: string;
60
+ name: string;
61
+ };
62
+ export type Product = {
63
+ id: string;
64
+ img?: string;
65
+ items?: Product[];
66
+ kind: EProductKind | EProductKindBucket;
67
+ literals?: Literals;
68
+ details?: {
69
+ literals?: Literals;
70
+ media?: Media[];
71
+ };
72
+ price: string;
73
+ minPrice?: string;
74
+ quantity: string;
75
+ vat: string;
76
+ outsideAvailabilitySlot?: boolean;
77
+ state?: ProductConfig;
78
+ selCtx: string;
79
+ filter?: any;
80
+ fltCtx?: any;
81
+ };
82
+ export type ProductConfig = {
83
+ selected: any;
84
+ filter: any;
85
+ };
86
+
87
+ export interface Category {
88
+ id: string;
89
+ name: string;
90
+ }
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@orderingstack/ordering-types",
3
+ "version": "0.0.1",
4
+ "description": "Typescript types for @orderingstack",
5
+ "types": "index.d.ts",
6
+ "main":"index.d.ts",
7
+ "files": [
8
+ "index.d.ts"
9
+ ],
10
+ "author": "Tomasz Rojek <tomasz.rojek@e3.pl>",
11
+ "devDependencies": {
12
+ "typescript": "next"
13
+ }
14
+ }