@trusted-solutions/sdit.models 0.19.0-alpha.8 → 0.20.0-alpha.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.
- package/lambda/index.d.ts +1 -0
- package/lambda/index.js +1 -0
- package/lambda/index.js.map +1 -1
- package/lambda/online-integration.d.ts +2 -1
- package/lambda/pos-integration.d.ts +19 -0
- package/lambda/pos-integration.js +3 -0
- package/lambda/pos-integration.js.map +1 -0
- package/lambda/request/menu.d.ts +7 -0
- package/lambda/response/menu.d.ts +1 -0
- package/models/online-integration.d.ts +5 -0
- package/models/online-integration.js +11 -1
- package/models/online-integration.js.map +1 -1
- package/models/store.d.ts +3 -0
- package/package.json +1 -1
package/lambda/index.d.ts
CHANGED
package/lambda/index.js
CHANGED
|
@@ -8,4 +8,5 @@ tslib_1.__exportStar(require("./online-integration"), exports);
|
|
|
8
8
|
tslib_1.__exportStar(require("./online-ordering"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./line-notify"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./contract"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./pos-integration"), exports);
|
|
11
12
|
//# sourceMappingURL=index.js.map
|
package/lambda/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,oDAA0B;AAC1B,qDAA2B;AAG3B,+DAAqC;AACrC,4DAAkC;AAElC,wDAA8B;AAE9B,qDAA2B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,oDAA0B;AAC1B,qDAA2B;AAG3B,+DAAqC;AACrC,4DAAkC;AAElC,wDAA8B;AAE9B,qDAA2B;AAE3B,4DAAkC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Order, Receipt, Operator } from '../models';
|
|
2
2
|
import { OMMConfig, OOReasonCode, OnlinePlatformType, OMMItemContextType, OMMItemContentEntityType, SOPSContent, StoreOnlinePlatformStore, ThirdPartyStoreIntegrationType } from '../models/online-integration';
|
|
3
|
+
import { SingleItem } from './response';
|
|
3
4
|
/**
|
|
4
5
|
* 若Order為已付款時,可在accept時帶入invoiceConfig, invoice
|
|
5
6
|
* 反之,則不需帶入
|
|
@@ -94,7 +95,7 @@ export interface GetStoreIdByOPSIdRequest {
|
|
|
94
95
|
onlinePlatformType: ThirdPartyStoreIntegrationType;
|
|
95
96
|
}
|
|
96
97
|
export declare type GetOPSByStoreIdResponse = StoreOnlinePlatformStore;
|
|
97
|
-
export declare type GetStoreIdByOPSIdResponse = string
|
|
98
|
+
export declare type GetStoreIdByOPSIdResponse = SingleItem<string>;
|
|
98
99
|
export interface UpdateSOPSContentRequest extends BaseSOPSRequest, SOPSContent {
|
|
99
100
|
}
|
|
100
101
|
export declare type UpdateSOPSContentResponse = null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Store } from '../models';
|
|
2
|
+
import { OverwriteMenuResponse } from './response';
|
|
3
|
+
export interface GetPoskyStoreConfigRequest {
|
|
4
|
+
/** Posky storeId */
|
|
5
|
+
storeId: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GetPoskyStoreConfigResponse {
|
|
8
|
+
owner: {
|
|
9
|
+
email: string;
|
|
10
|
+
name: string;
|
|
11
|
+
phone: string;
|
|
12
|
+
};
|
|
13
|
+
store: Store;
|
|
14
|
+
}
|
|
15
|
+
export interface OverwriteMenuFromIntegrationPosRequest {
|
|
16
|
+
/** Kiosky storeId */
|
|
17
|
+
storeId: string;
|
|
18
|
+
}
|
|
19
|
+
export declare type OverwriteMenuFromIntegrationPosResponse = OverwriteMenuResponse;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pos-integration.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/pos-integration.ts"],"names":[],"mappings":""}
|
package/lambda/request/menu.d.ts
CHANGED
|
@@ -78,3 +78,10 @@ export interface SetProductAndProductAttributeRelationRequest extends StoreTempl
|
|
|
78
78
|
productIds: string[];
|
|
79
79
|
productAttributeIds: string[];
|
|
80
80
|
}
|
|
81
|
+
/** overwrite product, productAttributes, productCategories, and productAttributeCategories */
|
|
82
|
+
export interface OverwriteMenuRequest extends StoreTemplateItemRequest {
|
|
83
|
+
products: Product[];
|
|
84
|
+
productAttributes: ProductAttribute[];
|
|
85
|
+
productCategories: ProductCategory[];
|
|
86
|
+
productAttributeCategories: ProductAttributeCategory[];
|
|
87
|
+
}
|
|
@@ -65,7 +65,10 @@ export interface OMMContent {
|
|
|
65
65
|
/** ======== OnlinePlatformStore ============= */
|
|
66
66
|
export interface SOPSContent {
|
|
67
67
|
content?: {
|
|
68
|
+
/** for online platform */
|
|
68
69
|
customPaymentConfigName?: string;
|
|
70
|
+
/** for pos integration */
|
|
71
|
+
isIntegration?: boolean;
|
|
69
72
|
};
|
|
70
73
|
}
|
|
71
74
|
export declare type ThirdPartyStoreIntegrationType = OnlinePlatformType | ThirdPartyStoreProvider;
|
|
@@ -74,3 +77,5 @@ export interface StoreOnlinePlatformStore extends SOPSContent {
|
|
|
74
77
|
onlinePlatformType: ThirdPartyStoreIntegrationType;
|
|
75
78
|
onlinePlatformStoreId: string;
|
|
76
79
|
}
|
|
80
|
+
export declare type ThirdPartyType = 'pos' | 'onlinePlatform';
|
|
81
|
+
export declare function getThirdPartyType(params: ThirdPartyStoreIntegrationType): ThirdPartyType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ThirdPartyStoreProvider = exports.OMEntityType = exports.OOReasonCode = exports.OnlinePlatformType = exports.OMMItemContentEntityType = exports.OMMItemContextType = exports.OnlineOrderMappingWarningCode = void 0;
|
|
3
|
+
exports.getThirdPartyType = exports.ThirdPartyStoreProvider = exports.OMEntityType = exports.OOReasonCode = exports.OnlinePlatformType = exports.OMMItemContentEntityType = exports.OMMItemContextType = exports.OnlineOrderMappingWarningCode = void 0;
|
|
4
4
|
var OnlineOrderMappingWarningCode;
|
|
5
5
|
(function (OnlineOrderMappingWarningCode) {
|
|
6
6
|
OnlineOrderMappingWarningCode["ROOT_ITEM"] = "ROOT_ITEM";
|
|
@@ -46,4 +46,14 @@ var ThirdPartyStoreProvider;
|
|
|
46
46
|
(function (ThirdPartyStoreProvider) {
|
|
47
47
|
ThirdPartyStoreProvider["POSKY"] = "POSKY";
|
|
48
48
|
})(ThirdPartyStoreProvider = exports.ThirdPartyStoreProvider || (exports.ThirdPartyStoreProvider = {}));
|
|
49
|
+
function getThirdPartyType(params) {
|
|
50
|
+
if (Object.values(OnlinePlatformType).includes(params)) {
|
|
51
|
+
return 'onlinePlatform';
|
|
52
|
+
}
|
|
53
|
+
if (Object.values(ThirdPartyStoreProvider).includes(params)) {
|
|
54
|
+
return 'pos';
|
|
55
|
+
}
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
exports.getThirdPartyType = getThirdPartyType;
|
|
49
59
|
//# sourceMappingURL=online-integration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"online-integration.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/online-integration.ts"],"names":[],"mappings":";;;AAEA,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACvC,wDAAuB,CAAA;IACvB,kEAAiC,CAAA;IACjC,oDAAmB,CAAA;AACrB,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;AAID,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,2DAAQ,CAAA;IACR,2DAAQ,CAAA;IACR,+EAAkB,CAAA;AACpB,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B;AAGD,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,mEAAuC,CAAA;AACzC,CAAC,EAHW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAGnC;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,6CAAuB,CAAA;IACvB,+CAAyB,CAAA;IACzB,mCAAa,CAAA;AACf,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B;AAED,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,2DAA2C,CAAA;IAC3C,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,uEAAuD,CAAA;IACvD,+EAA+D,CAAA;IAC/D,mDAAmC,CAAA;IACnC,+BAAe,CAAA;AACjB,CAAC,EARW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAQvB;AAID,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,iDAAiC,CAAA;AACnC,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB;AAED;;GAEG;AACH,IAAY,uBAEX;AAFD,WAAY,uBAAuB;IACjC,0CAAe,CAAA;AACjB,CAAC,EAFW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAElC"}
|
|
1
|
+
{"version":3,"file":"online-integration.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/online-integration.ts"],"names":[],"mappings":";;;AAEA,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACvC,wDAAuB,CAAA;IACvB,kEAAiC,CAAA;IACjC,oDAAmB,CAAA;AACrB,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;AAID,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,2DAAQ,CAAA;IACR,2DAAQ,CAAA;IACR,+EAAkB,CAAA;AACpB,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI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} from './table';
|
|
6
6
|
import { CustomerConfig } from './customer';
|
|
7
7
|
import { MultiLanguageText } from './language';
|
|
8
|
+
import { StoreOnlinePlatformStore } from './online-integration';
|
|
8
9
|
export interface StoreUser {
|
|
9
10
|
id?: string;
|
|
10
11
|
storeId: string;
|
|
@@ -89,6 +90,8 @@ export interface Store {
|
|
|
89
90
|
chainId?: string;
|
|
90
91
|
uberEatsStoreId?: string;
|
|
91
92
|
uberEatsCustomPaymentConfigName?: string;
|
|
93
|
+
/** for pos integration */
|
|
94
|
+
posIntegration?: StoreOnlinePlatformStore;
|
|
92
95
|
/**
|
|
93
96
|
* 線上店名
|
|
94
97
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trusted-solutions/sdit.models",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0-alpha.1",
|
|
4
4
|
"description": "TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|