@open-tender/store 0.3.81 → 0.3.83
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/cjs/slices/discounts.d.ts +2 -2
- package/dist/cjs/slices/discounts.js +6 -6
- package/dist/cjs/slices/surcharges.d.ts +2 -2
- package/dist/cjs/slices/surcharges.js +6 -6
- package/dist/cjs/slices/taxes.d.ts +2 -2
- package/dist/cjs/slices/taxes.js +6 -6
- package/dist/cjs/types/api/revenueCenter.d.ts +9 -2
- package/dist/esm/slices/discounts.d.ts +2 -2
- package/dist/esm/slices/discounts.js +5 -5
- package/dist/esm/slices/surcharges.d.ts +2 -2
- package/dist/esm/slices/surcharges.js +5 -5
- package/dist/esm/slices/taxes.d.ts +2 -2
- package/dist/esm/slices/taxes.js +5 -5
- package/dist/esm/types/api/revenueCenter.d.ts +9 -2
- package/package.json +1 -1
|
@@ -7,9 +7,9 @@ export interface DiscountsState {
|
|
|
7
7
|
version: Version;
|
|
8
8
|
}
|
|
9
9
|
export declare enum DiscountsActionType {
|
|
10
|
-
GetDiscounts = "discounts/
|
|
10
|
+
GetDiscounts = "discounts/fetchDiscounts"
|
|
11
11
|
}
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const fetchDiscounts: import("@reduxjs/toolkit").AsyncThunk<Discounts, void, {
|
|
13
13
|
state: AppState;
|
|
14
14
|
rejectValue: RequestError;
|
|
15
15
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.discountsReducer = exports.selectDiscounts = exports.resetDiscounts = exports.
|
|
3
|
+
exports.discountsReducer = exports.selectDiscounts = exports.resetDiscounts = exports.fetchDiscounts = exports.DiscountsActionType = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
var types_1 = require("./types");
|
|
@@ -12,9 +12,9 @@ var initialState = {
|
|
|
12
12
|
};
|
|
13
13
|
var DiscountsActionType;
|
|
14
14
|
(function (DiscountsActionType) {
|
|
15
|
-
DiscountsActionType["GetDiscounts"] = "discounts/
|
|
15
|
+
DiscountsActionType["GetDiscounts"] = "discounts/fetchDiscounts";
|
|
16
16
|
})(DiscountsActionType = exports.DiscountsActionType || (exports.DiscountsActionType = {}));
|
|
17
|
-
exports.
|
|
17
|
+
exports.fetchDiscounts = (0, toolkit_1.createAsyncThunk)(DiscountsActionType.GetDiscounts, function (_, _a) {
|
|
18
18
|
var getState = _a.getState, rejectWithValue = _a.rejectWithValue;
|
|
19
19
|
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
20
20
|
var api, order, serviceType, orderType, err_1;
|
|
@@ -43,15 +43,15 @@ var discountsSlice = (0, toolkit_1.createSlice)({
|
|
|
43
43
|
},
|
|
44
44
|
extraReducers: function (builder) {
|
|
45
45
|
builder
|
|
46
|
-
.addCase(exports.
|
|
46
|
+
.addCase(exports.fetchDiscounts.fulfilled, function (state, action) {
|
|
47
47
|
state.entities = action.payload;
|
|
48
48
|
state.loading = 'idle';
|
|
49
49
|
state.error = null;
|
|
50
50
|
})
|
|
51
|
-
.addCase(exports.
|
|
51
|
+
.addCase(exports.fetchDiscounts.pending, function (state) {
|
|
52
52
|
state.loading = 'pending';
|
|
53
53
|
})
|
|
54
|
-
.addCase(exports.
|
|
54
|
+
.addCase(exports.fetchDiscounts.rejected, function (state, action) {
|
|
55
55
|
state.error = action.payload;
|
|
56
56
|
state.loading = 'idle';
|
|
57
57
|
});
|
|
@@ -7,9 +7,9 @@ export interface SurchargesState {
|
|
|
7
7
|
version: Version;
|
|
8
8
|
}
|
|
9
9
|
export declare enum SurchargesActionType {
|
|
10
|
-
GetSurcharges = "surcharges/
|
|
10
|
+
GetSurcharges = "surcharges/fetchSurcharges"
|
|
11
11
|
}
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const fetchSurcharges: import("@reduxjs/toolkit").AsyncThunk<Surcharges, void, {
|
|
13
13
|
state: AppState;
|
|
14
14
|
rejectValue: RequestError;
|
|
15
15
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.surchargesReducer = exports.selectSurcharges = exports.resetSurcharges = exports.
|
|
3
|
+
exports.surchargesReducer = exports.selectSurcharges = exports.resetSurcharges = exports.fetchSurcharges = exports.SurchargesActionType = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
var types_1 = require("./types");
|
|
@@ -12,9 +12,9 @@ var initialState = {
|
|
|
12
12
|
};
|
|
13
13
|
var SurchargesActionType;
|
|
14
14
|
(function (SurchargesActionType) {
|
|
15
|
-
SurchargesActionType["GetSurcharges"] = "surcharges/
|
|
15
|
+
SurchargesActionType["GetSurcharges"] = "surcharges/fetchSurcharges";
|
|
16
16
|
})(SurchargesActionType = exports.SurchargesActionType || (exports.SurchargesActionType = {}));
|
|
17
|
-
exports.
|
|
17
|
+
exports.fetchSurcharges = (0, toolkit_1.createAsyncThunk)(SurchargesActionType.GetSurcharges, function (_, _a) {
|
|
18
18
|
var getState = _a.getState, rejectWithValue = _a.rejectWithValue;
|
|
19
19
|
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
20
20
|
var api, order, serviceType, err_1;
|
|
@@ -43,17 +43,17 @@ var surchargesSlice = (0, toolkit_1.createSlice)({
|
|
|
43
43
|
},
|
|
44
44
|
extraReducers: function (builder) {
|
|
45
45
|
builder
|
|
46
|
-
.addCase(exports.
|
|
46
|
+
.addCase(exports.fetchSurcharges.fulfilled, function (state, action) {
|
|
47
47
|
if (action.payload) {
|
|
48
48
|
state.entities = action.payload;
|
|
49
49
|
}
|
|
50
50
|
state.loading = 'idle';
|
|
51
51
|
state.error = null;
|
|
52
52
|
})
|
|
53
|
-
.addCase(exports.
|
|
53
|
+
.addCase(exports.fetchSurcharges.pending, function (state) {
|
|
54
54
|
state.loading = 'pending';
|
|
55
55
|
})
|
|
56
|
-
.addCase(exports.
|
|
56
|
+
.addCase(exports.fetchSurcharges.rejected, function (state, action) {
|
|
57
57
|
state.error = action.payload;
|
|
58
58
|
state.loading = 'idle';
|
|
59
59
|
});
|
|
@@ -7,9 +7,9 @@ export interface TaxesState {
|
|
|
7
7
|
version: Version;
|
|
8
8
|
}
|
|
9
9
|
export declare enum TaxesActionType {
|
|
10
|
-
GetTaxes = "taxes/
|
|
10
|
+
GetTaxes = "taxes/fetchTaxes"
|
|
11
11
|
}
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const fetchTaxes: import("@reduxjs/toolkit").AsyncThunk<Taxes, void, {
|
|
13
13
|
state: AppState;
|
|
14
14
|
rejectValue: RequestError;
|
|
15
15
|
}>;
|
package/dist/cjs/slices/taxes.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.taxesReducer = exports.selectTaxes = exports.resetTaxes = exports.
|
|
3
|
+
exports.taxesReducer = exports.selectTaxes = exports.resetTaxes = exports.fetchTaxes = exports.TaxesActionType = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
var types_1 = require("./types");
|
|
@@ -12,9 +12,9 @@ var initialState = {
|
|
|
12
12
|
};
|
|
13
13
|
var TaxesActionType;
|
|
14
14
|
(function (TaxesActionType) {
|
|
15
|
-
TaxesActionType["GetTaxes"] = "taxes/
|
|
15
|
+
TaxesActionType["GetTaxes"] = "taxes/fetchTaxes";
|
|
16
16
|
})(TaxesActionType = exports.TaxesActionType || (exports.TaxesActionType = {}));
|
|
17
|
-
exports.
|
|
17
|
+
exports.fetchTaxes = (0, toolkit_1.createAsyncThunk)(TaxesActionType.GetTaxes, function (_, _a) {
|
|
18
18
|
var getState = _a.getState, rejectWithValue = _a.rejectWithValue;
|
|
19
19
|
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
20
20
|
var api, order, serviceType, orderType, err_1;
|
|
@@ -43,17 +43,17 @@ var taxesSlice = (0, toolkit_1.createSlice)({
|
|
|
43
43
|
},
|
|
44
44
|
extraReducers: function (builder) {
|
|
45
45
|
builder
|
|
46
|
-
.addCase(exports.
|
|
46
|
+
.addCase(exports.fetchTaxes.fulfilled, function (state, action) {
|
|
47
47
|
if (action.payload) {
|
|
48
48
|
state.entities = action.payload;
|
|
49
49
|
}
|
|
50
50
|
state.loading = 'idle';
|
|
51
51
|
state.error = null;
|
|
52
52
|
})
|
|
53
|
-
.addCase(exports.
|
|
53
|
+
.addCase(exports.fetchTaxes.pending, function (state) {
|
|
54
54
|
state.loading = 'pending';
|
|
55
55
|
})
|
|
56
|
-
.addCase(exports.
|
|
56
|
+
.addCase(exports.fetchTaxes.rejected, function (state, action) {
|
|
57
57
|
state.error = action.payload;
|
|
58
58
|
state.loading = 'idle';
|
|
59
59
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TimeString } from '../datetimes';
|
|
2
|
-
import { Decimal, Money, OrderType, ServiceType, TaxType, Weekday } from '../global';
|
|
2
|
+
import { Decimal, Money, OrderType, ServiceType, TaxType, TenderType, Weekday } from '../global';
|
|
3
3
|
import { PunchAuthType } from './employee';
|
|
4
4
|
import { PaymentProcessing } from './store';
|
|
5
5
|
export interface RevenueCenterTax {
|
|
@@ -11,6 +11,12 @@ export interface RevenueCenterTax {
|
|
|
11
11
|
tax_id: number;
|
|
12
12
|
tax_type: TaxType;
|
|
13
13
|
}
|
|
14
|
+
export declare type RevenueCenterTaxes = RevenueCenterTax[];
|
|
15
|
+
export interface RevenueCenterTenderTypes {
|
|
16
|
+
WALKIN: TenderType[];
|
|
17
|
+
PICKUP: TenderType[];
|
|
18
|
+
DELIVERY: TenderType[];
|
|
19
|
+
}
|
|
14
20
|
export interface RevenueCenter {
|
|
15
21
|
credit: PaymentProcessing;
|
|
16
22
|
dine_in_prompt: boolean;
|
|
@@ -43,7 +49,8 @@ export interface RevenueCenter {
|
|
|
43
49
|
slug: string;
|
|
44
50
|
starting_cash: Money;
|
|
45
51
|
tax_exempt_approval: boolean;
|
|
46
|
-
taxes:
|
|
52
|
+
taxes: RevenueCenterTaxes;
|
|
53
|
+
tender_types: RevenueCenterTenderTypes;
|
|
47
54
|
week_start_day: Weekday;
|
|
48
55
|
delivery_wait_time_id: number | null;
|
|
49
56
|
temporary_delivery_wait_time_id: number | null;
|
|
@@ -7,9 +7,9 @@ export interface DiscountsState {
|
|
|
7
7
|
version: Version;
|
|
8
8
|
}
|
|
9
9
|
export declare enum DiscountsActionType {
|
|
10
|
-
GetDiscounts = "discounts/
|
|
10
|
+
GetDiscounts = "discounts/fetchDiscounts"
|
|
11
11
|
}
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const fetchDiscounts: import("@reduxjs/toolkit").AsyncThunk<Discounts, void, {
|
|
13
13
|
state: AppState;
|
|
14
14
|
rejectValue: RequestError;
|
|
15
15
|
}>;
|
|
@@ -9,9 +9,9 @@ var initialState = {
|
|
|
9
9
|
};
|
|
10
10
|
export var DiscountsActionType;
|
|
11
11
|
(function (DiscountsActionType) {
|
|
12
|
-
DiscountsActionType["GetDiscounts"] = "discounts/
|
|
12
|
+
DiscountsActionType["GetDiscounts"] = "discounts/fetchDiscounts";
|
|
13
13
|
})(DiscountsActionType || (DiscountsActionType = {}));
|
|
14
|
-
export var
|
|
14
|
+
export var fetchDiscounts = createAsyncThunk(DiscountsActionType.GetDiscounts, function (_, _a) {
|
|
15
15
|
var getState = _a.getState, rejectWithValue = _a.rejectWithValue;
|
|
16
16
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
17
17
|
var api, order, serviceType, orderType, err_1;
|
|
@@ -40,15 +40,15 @@ var discountsSlice = createSlice({
|
|
|
40
40
|
},
|
|
41
41
|
extraReducers: function (builder) {
|
|
42
42
|
builder
|
|
43
|
-
.addCase(
|
|
43
|
+
.addCase(fetchDiscounts.fulfilled, function (state, action) {
|
|
44
44
|
state.entities = action.payload;
|
|
45
45
|
state.loading = 'idle';
|
|
46
46
|
state.error = null;
|
|
47
47
|
})
|
|
48
|
-
.addCase(
|
|
48
|
+
.addCase(fetchDiscounts.pending, function (state) {
|
|
49
49
|
state.loading = 'pending';
|
|
50
50
|
})
|
|
51
|
-
.addCase(
|
|
51
|
+
.addCase(fetchDiscounts.rejected, function (state, action) {
|
|
52
52
|
state.error = action.payload;
|
|
53
53
|
state.loading = 'idle';
|
|
54
54
|
});
|
|
@@ -7,9 +7,9 @@ export interface SurchargesState {
|
|
|
7
7
|
version: Version;
|
|
8
8
|
}
|
|
9
9
|
export declare enum SurchargesActionType {
|
|
10
|
-
GetSurcharges = "surcharges/
|
|
10
|
+
GetSurcharges = "surcharges/fetchSurcharges"
|
|
11
11
|
}
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const fetchSurcharges: import("@reduxjs/toolkit").AsyncThunk<Surcharges, void, {
|
|
13
13
|
state: AppState;
|
|
14
14
|
rejectValue: RequestError;
|
|
15
15
|
}>;
|
|
@@ -9,9 +9,9 @@ var initialState = {
|
|
|
9
9
|
};
|
|
10
10
|
export var SurchargesActionType;
|
|
11
11
|
(function (SurchargesActionType) {
|
|
12
|
-
SurchargesActionType["GetSurcharges"] = "surcharges/
|
|
12
|
+
SurchargesActionType["GetSurcharges"] = "surcharges/fetchSurcharges";
|
|
13
13
|
})(SurchargesActionType || (SurchargesActionType = {}));
|
|
14
|
-
export var
|
|
14
|
+
export var fetchSurcharges = createAsyncThunk(SurchargesActionType.GetSurcharges, function (_, _a) {
|
|
15
15
|
var getState = _a.getState, rejectWithValue = _a.rejectWithValue;
|
|
16
16
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
17
17
|
var api, order, serviceType, err_1;
|
|
@@ -40,17 +40,17 @@ var surchargesSlice = createSlice({
|
|
|
40
40
|
},
|
|
41
41
|
extraReducers: function (builder) {
|
|
42
42
|
builder
|
|
43
|
-
.addCase(
|
|
43
|
+
.addCase(fetchSurcharges.fulfilled, function (state, action) {
|
|
44
44
|
if (action.payload) {
|
|
45
45
|
state.entities = action.payload;
|
|
46
46
|
}
|
|
47
47
|
state.loading = 'idle';
|
|
48
48
|
state.error = null;
|
|
49
49
|
})
|
|
50
|
-
.addCase(
|
|
50
|
+
.addCase(fetchSurcharges.pending, function (state) {
|
|
51
51
|
state.loading = 'pending';
|
|
52
52
|
})
|
|
53
|
-
.addCase(
|
|
53
|
+
.addCase(fetchSurcharges.rejected, function (state, action) {
|
|
54
54
|
state.error = action.payload;
|
|
55
55
|
state.loading = 'idle';
|
|
56
56
|
});
|
|
@@ -7,9 +7,9 @@ export interface TaxesState {
|
|
|
7
7
|
version: Version;
|
|
8
8
|
}
|
|
9
9
|
export declare enum TaxesActionType {
|
|
10
|
-
GetTaxes = "taxes/
|
|
10
|
+
GetTaxes = "taxes/fetchTaxes"
|
|
11
11
|
}
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const fetchTaxes: import("@reduxjs/toolkit").AsyncThunk<Taxes, void, {
|
|
13
13
|
state: AppState;
|
|
14
14
|
rejectValue: RequestError;
|
|
15
15
|
}>;
|
package/dist/esm/slices/taxes.js
CHANGED
|
@@ -9,9 +9,9 @@ var initialState = {
|
|
|
9
9
|
};
|
|
10
10
|
export var TaxesActionType;
|
|
11
11
|
(function (TaxesActionType) {
|
|
12
|
-
TaxesActionType["GetTaxes"] = "taxes/
|
|
12
|
+
TaxesActionType["GetTaxes"] = "taxes/fetchTaxes";
|
|
13
13
|
})(TaxesActionType || (TaxesActionType = {}));
|
|
14
|
-
export var
|
|
14
|
+
export var fetchTaxes = createAsyncThunk(TaxesActionType.GetTaxes, function (_, _a) {
|
|
15
15
|
var getState = _a.getState, rejectWithValue = _a.rejectWithValue;
|
|
16
16
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
17
17
|
var api, order, serviceType, orderType, err_1;
|
|
@@ -40,17 +40,17 @@ var taxesSlice = createSlice({
|
|
|
40
40
|
},
|
|
41
41
|
extraReducers: function (builder) {
|
|
42
42
|
builder
|
|
43
|
-
.addCase(
|
|
43
|
+
.addCase(fetchTaxes.fulfilled, function (state, action) {
|
|
44
44
|
if (action.payload) {
|
|
45
45
|
state.entities = action.payload;
|
|
46
46
|
}
|
|
47
47
|
state.loading = 'idle';
|
|
48
48
|
state.error = null;
|
|
49
49
|
})
|
|
50
|
-
.addCase(
|
|
50
|
+
.addCase(fetchTaxes.pending, function (state) {
|
|
51
51
|
state.loading = 'pending';
|
|
52
52
|
})
|
|
53
|
-
.addCase(
|
|
53
|
+
.addCase(fetchTaxes.rejected, function (state, action) {
|
|
54
54
|
state.error = action.payload;
|
|
55
55
|
state.loading = 'idle';
|
|
56
56
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TimeString } from '../datetimes';
|
|
2
|
-
import { Decimal, Money, OrderType, ServiceType, TaxType, Weekday } from '../global';
|
|
2
|
+
import { Decimal, Money, OrderType, ServiceType, TaxType, TenderType, Weekday } from '../global';
|
|
3
3
|
import { PunchAuthType } from './employee';
|
|
4
4
|
import { PaymentProcessing } from './store';
|
|
5
5
|
export interface RevenueCenterTax {
|
|
@@ -11,6 +11,12 @@ export interface RevenueCenterTax {
|
|
|
11
11
|
tax_id: number;
|
|
12
12
|
tax_type: TaxType;
|
|
13
13
|
}
|
|
14
|
+
export declare type RevenueCenterTaxes = RevenueCenterTax[];
|
|
15
|
+
export interface RevenueCenterTenderTypes {
|
|
16
|
+
WALKIN: TenderType[];
|
|
17
|
+
PICKUP: TenderType[];
|
|
18
|
+
DELIVERY: TenderType[];
|
|
19
|
+
}
|
|
14
20
|
export interface RevenueCenter {
|
|
15
21
|
credit: PaymentProcessing;
|
|
16
22
|
dine_in_prompt: boolean;
|
|
@@ -43,7 +49,8 @@ export interface RevenueCenter {
|
|
|
43
49
|
slug: string;
|
|
44
50
|
starting_cash: Money;
|
|
45
51
|
tax_exempt_approval: boolean;
|
|
46
|
-
taxes:
|
|
52
|
+
taxes: RevenueCenterTaxes;
|
|
53
|
+
tender_types: RevenueCenterTenderTypes;
|
|
47
54
|
week_start_day: Weekday;
|
|
48
55
|
delivery_wait_time_id: number | null;
|
|
49
56
|
temporary_delivery_wait_time_id: number | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.83",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|