@ibiliaze/global-vars 1.150.0 → 1.151.0
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/dist/checkout.d.ts +5 -16
- package/dist/ticketops/inputsDefault.d.ts +12 -0
- package/dist/ticketops/roles/items.d.ts +15 -0
- package/dist/ticketops/roles/items.js +16 -0
- package/dist/ticketops/roles/seat.d.ts +0 -19
- package/dist/ticketops/roles/seat.js +0 -9
- package/dist/ticketops/roles.d.ts +0 -36
- package/package.json +2 -2
package/dist/checkout.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { countries } from './countries';
|
|
2
2
|
import { genders } from './genders';
|
|
3
|
-
|
|
3
|
+
import { ItemBase } from './ticketops/inputsDefault';
|
|
4
|
+
export interface Checkout<Id, TDate> {
|
|
4
5
|
stripe?: {};
|
|
5
6
|
epoint?: Epoint;
|
|
6
|
-
local?: Local
|
|
7
|
+
local?: Local<Id, TDate>;
|
|
7
8
|
}
|
|
8
9
|
export interface Epoint {
|
|
9
10
|
orderId: string | number;
|
|
@@ -13,7 +14,7 @@ export interface Epoint {
|
|
|
13
14
|
successUrl?: string;
|
|
14
15
|
errorUrl?: string;
|
|
15
16
|
}
|
|
16
|
-
export interface Local {
|
|
17
|
+
export interface Local<Id, TDate> {
|
|
17
18
|
user: {
|
|
18
19
|
_id: string;
|
|
19
20
|
name: string;
|
|
@@ -25,21 +26,9 @@ export interface Local {
|
|
|
25
26
|
gender?: (typeof genders)[number];
|
|
26
27
|
country?: (typeof countries)[number];
|
|
27
28
|
};
|
|
28
|
-
promoDiscount: number;
|
|
29
|
-
promoCode: string;
|
|
30
29
|
subscription: boolean;
|
|
31
30
|
successPath?: string;
|
|
32
31
|
cancelPath?: string;
|
|
33
|
-
items:
|
|
34
|
-
}
|
|
35
|
-
export interface LocalItem {
|
|
36
|
-
_id: string;
|
|
37
|
-
name: string;
|
|
38
|
-
type: 'product' | 'occupance';
|
|
39
|
-
quantity: number;
|
|
40
|
-
price: number;
|
|
41
|
-
subscriptionPeriod: '' | 'day' | 'week' | 'month' | 'year';
|
|
42
|
-
reservedAt?: string;
|
|
43
|
-
selectedAddonIds?: string[];
|
|
32
|
+
items: ItemBase<Id, TDate>[];
|
|
44
33
|
}
|
|
45
34
|
export type EpointLang = 'az' | 'en' | 'ru';
|
|
@@ -737,6 +737,18 @@ export interface SaleItemBase<Id> {
|
|
|
737
737
|
amount: number;
|
|
738
738
|
quantity: number;
|
|
739
739
|
}
|
|
740
|
+
export interface ItemBase<Id, TDate> {
|
|
741
|
+
_id?: Id;
|
|
742
|
+
name: string;
|
|
743
|
+
orderId: string;
|
|
744
|
+
quantity: number;
|
|
745
|
+
price: number;
|
|
746
|
+
occupanceId?: Id;
|
|
747
|
+
productId?: Id;
|
|
748
|
+
expireAt?: TDate;
|
|
749
|
+
createdAt?: TDate;
|
|
750
|
+
updatedAt?: TDate;
|
|
751
|
+
}
|
|
740
752
|
export interface SaleBase<Id, TDate> {
|
|
741
753
|
_id?: Id;
|
|
742
754
|
checkoutId: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ItemBase } from '../inputsDefault';
|
|
2
|
+
export declare const itemRoleDefs: <TId, TDate>() => readonly [{
|
|
3
|
+
readonly method: "get";
|
|
4
|
+
readonly path: "/item";
|
|
5
|
+
readonly role: "getItems";
|
|
6
|
+
readonly name: "Get items";
|
|
7
|
+
readonly response_200: {
|
|
8
|
+
items: ItemBase<TId, TDate>[];
|
|
9
|
+
count: number;
|
|
10
|
+
};
|
|
11
|
+
readonly response_500: {
|
|
12
|
+
message: string;
|
|
13
|
+
error: string;
|
|
14
|
+
};
|
|
15
|
+
}];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.itemRoleDefs = void 0;
|
|
4
|
+
const itemRoleDefs = () => {
|
|
5
|
+
return [
|
|
6
|
+
{
|
|
7
|
+
method: 'get',
|
|
8
|
+
path: '/item',
|
|
9
|
+
role: 'getItems',
|
|
10
|
+
name: 'Get items',
|
|
11
|
+
response_200: {},
|
|
12
|
+
response_500: {},
|
|
13
|
+
},
|
|
14
|
+
];
|
|
15
|
+
};
|
|
16
|
+
exports.itemRoleDefs = itemRoleDefs;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { LocalItem } from '../../checkout';
|
|
2
1
|
import type { SeatBase, OccupanceBase, FlatOccupanceWithSeat, PopulatedOccupance } from '../inputsDefault';
|
|
3
2
|
export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
|
|
4
3
|
readonly method: "get";
|
|
@@ -74,22 +73,6 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
|
|
|
74
73
|
message: string;
|
|
75
74
|
error: string;
|
|
76
75
|
};
|
|
77
|
-
}, {
|
|
78
|
-
readonly method: "get";
|
|
79
|
-
readonly path: "/occupance/reserved";
|
|
80
|
-
readonly role: "getOccupanceReserved";
|
|
81
|
-
readonly name: "Get reserved occupancies";
|
|
82
|
-
readonly response_200: {
|
|
83
|
-
items: LocalItem[];
|
|
84
|
-
message: string;
|
|
85
|
-
};
|
|
86
|
-
readonly response_400: {
|
|
87
|
-
message: string;
|
|
88
|
-
};
|
|
89
|
-
readonly response_500: {
|
|
90
|
-
message: string;
|
|
91
|
-
error: string;
|
|
92
|
-
};
|
|
93
76
|
}, {
|
|
94
77
|
readonly method: "get";
|
|
95
78
|
readonly path: "/occupance/pdf/:id";
|
|
@@ -109,7 +92,6 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
|
|
|
109
92
|
readonly role: "postOccupanceReserveById";
|
|
110
93
|
readonly name: "Reserve occupance by ID";
|
|
111
94
|
readonly response_200: {
|
|
112
|
-
item: LocalItem;
|
|
113
95
|
occupance: OccupanceBase<TId, TDate>;
|
|
114
96
|
reservedAt: number;
|
|
115
97
|
message: string;
|
|
@@ -135,7 +117,6 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
|
|
|
135
117
|
readonly role: "postSeasonalOccupanceReserveById";
|
|
136
118
|
readonly name: "Reserve seasonal occupance by ID";
|
|
137
119
|
readonly response_200: {
|
|
138
|
-
item: LocalItem;
|
|
139
120
|
occupance: OccupanceBase<TId, TDate>;
|
|
140
121
|
reservedAt: number;
|
|
141
122
|
message: string;
|
|
@@ -46,15 +46,6 @@ const occupanceRoleDefs = () => {
|
|
|
46
46
|
response_404: {},
|
|
47
47
|
response_500: {},
|
|
48
48
|
},
|
|
49
|
-
{
|
|
50
|
-
method: 'get',
|
|
51
|
-
path: '/occupance/reserved',
|
|
52
|
-
role: 'getOccupanceReserved',
|
|
53
|
-
name: 'Get reserved occupancies',
|
|
54
|
-
response_200: {},
|
|
55
|
-
response_400: {},
|
|
56
|
-
response_500: {},
|
|
57
|
-
},
|
|
58
49
|
{
|
|
59
50
|
method: 'get',
|
|
60
51
|
path: '/occupance/pdf/:id',
|
|
@@ -1931,22 +1931,6 @@ export declare const apis: <TId, TDate>() => readonly [{
|
|
|
1931
1931
|
message: string;
|
|
1932
1932
|
error: string;
|
|
1933
1933
|
};
|
|
1934
|
-
}, {
|
|
1935
|
-
readonly method: "get";
|
|
1936
|
-
readonly path: "/occupance/reserved";
|
|
1937
|
-
readonly role: "getOccupanceReserved";
|
|
1938
|
-
readonly name: "Get reserved occupancies";
|
|
1939
|
-
readonly response_200: {
|
|
1940
|
-
items: import("..").LocalItem[];
|
|
1941
|
-
message: string;
|
|
1942
|
-
};
|
|
1943
|
-
readonly response_400: {
|
|
1944
|
-
message: string;
|
|
1945
|
-
};
|
|
1946
|
-
readonly response_500: {
|
|
1947
|
-
message: string;
|
|
1948
|
-
error: string;
|
|
1949
|
-
};
|
|
1950
1934
|
}, {
|
|
1951
1935
|
readonly method: "get";
|
|
1952
1936
|
readonly path: "/occupance/pdf/:id";
|
|
@@ -1966,7 +1950,6 @@ export declare const apis: <TId, TDate>() => readonly [{
|
|
|
1966
1950
|
readonly role: "postOccupanceReserveById";
|
|
1967
1951
|
readonly name: "Reserve occupance by ID";
|
|
1968
1952
|
readonly response_200: {
|
|
1969
|
-
item: import("..").LocalItem;
|
|
1970
1953
|
occupance: import("./inputsDefault").OccupanceBase<TId_21, TDate_21>;
|
|
1971
1954
|
reservedAt: number;
|
|
1972
1955
|
message: string;
|
|
@@ -1992,7 +1975,6 @@ export declare const apis: <TId, TDate>() => readonly [{
|
|
|
1992
1975
|
readonly role: "postSeasonalOccupanceReserveById";
|
|
1993
1976
|
readonly name: "Reserve seasonal occupance by ID";
|
|
1994
1977
|
readonly response_200: {
|
|
1995
|
-
item: import("..").LocalItem;
|
|
1996
1978
|
occupance: import("./inputsDefault").OccupanceBase<TId_21, TDate_21>;
|
|
1997
1979
|
reservedAt: number;
|
|
1998
1980
|
message: string;
|
|
@@ -4529,22 +4511,6 @@ declare const allApis: readonly [{
|
|
|
4529
4511
|
message: string;
|
|
4530
4512
|
error: string;
|
|
4531
4513
|
};
|
|
4532
|
-
}, {
|
|
4533
|
-
readonly method: "get";
|
|
4534
|
-
readonly path: "/occupance/reserved";
|
|
4535
|
-
readonly role: "getOccupanceReserved";
|
|
4536
|
-
readonly name: "Get reserved occupancies";
|
|
4537
|
-
readonly response_200: {
|
|
4538
|
-
items: import("..").LocalItem[];
|
|
4539
|
-
message: string;
|
|
4540
|
-
};
|
|
4541
|
-
readonly response_400: {
|
|
4542
|
-
message: string;
|
|
4543
|
-
};
|
|
4544
|
-
readonly response_500: {
|
|
4545
|
-
message: string;
|
|
4546
|
-
error: string;
|
|
4547
|
-
};
|
|
4548
4514
|
}, {
|
|
4549
4515
|
readonly method: "get";
|
|
4550
4516
|
readonly path: "/occupance/pdf/:id";
|
|
@@ -4564,7 +4530,6 @@ declare const allApis: readonly [{
|
|
|
4564
4530
|
readonly role: "postOccupanceReserveById";
|
|
4565
4531
|
readonly name: "Reserve occupance by ID";
|
|
4566
4532
|
readonly response_200: {
|
|
4567
|
-
item: import("..").LocalItem;
|
|
4568
4533
|
occupance: import("./inputsDefault").OccupanceBase<TId_20, TDate_20>;
|
|
4569
4534
|
reservedAt: number;
|
|
4570
4535
|
message: string;
|
|
@@ -4590,7 +4555,6 @@ declare const allApis: readonly [{
|
|
|
4590
4555
|
readonly role: "postSeasonalOccupanceReserveById";
|
|
4591
4556
|
readonly name: "Reserve seasonal occupance by ID";
|
|
4592
4557
|
readonly response_200: {
|
|
4593
|
-
item: import("..").LocalItem;
|
|
4594
4558
|
occupance: import("./inputsDefault").OccupanceBase<TId_20, TDate_20>;
|
|
4595
4559
|
reservedAt: number;
|
|
4596
4560
|
message: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiliaze/global-vars",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.151.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "tsc",
|
|
24
24
|
"pub": "npm publish --access public",
|
|
25
|
-
"git": "git add .; git commit -m 'changes'; git tag -a v1.
|
|
25
|
+
"git": "git add .; git commit -m 'changes'; git tag -a v1.151.0 -m 'v1.151.0'; git push origin v1.151.0; git push",
|
|
26
26
|
"push": "npm run build; npm run git; npm run pub"
|
|
27
27
|
},
|
|
28
28
|
"author": "Ibi Hasanli",
|