@trusted-solutions/sdit.models 0.19.0-alpha.6 → 0.19.0-alpha.9

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.
@@ -1,5 +1,5 @@
1
1
  import { Order, Receipt, Operator } from '../models';
2
- import { OMMConfig, OOReasonCode, OnlinePlatformType, OMMItemContextType, OMMItemContentEntityType, SOPSContent, StoreOnlinePlatformStore } from '../models/online-integration';
2
+ import { OMMConfig, OOReasonCode, OnlinePlatformType, OMMItemContextType, OMMItemContentEntityType, SOPSContent, StoreOnlinePlatformStore, ThirdPartyStoreIntegrationType } from '../models/online-integration';
3
3
  /**
4
4
  * 若Order為已付款時,可在accept時帶入invoiceConfig, invoice
5
5
  * 反之,則不需帶入
@@ -76,7 +76,7 @@ export interface OMMItemRequest {
76
76
  /** ======== OnlinePlatformStore ============= */
77
77
  interface BaseSOPSRequest {
78
78
  storeId: string;
79
- onlinePlatformType?: OnlinePlatformType;
79
+ onlinePlatformType?: ThirdPartyStoreIntegrationType;
80
80
  onlinePlatformStoreId: string;
81
81
  }
82
82
  export interface BindOPSIdRequest extends StoreOnlinePlatformStore {
@@ -87,11 +87,11 @@ export interface UnbindOPSIdRequest extends BaseSOPSRequest {
87
87
  export declare type UnbindOPSIdResponse = null;
88
88
  export interface GetOPSByStoreIdRequest {
89
89
  storeId: string;
90
- onlinePlatformType: OnlinePlatformType;
90
+ onlinePlatformType: ThirdPartyStoreIntegrationType;
91
91
  }
92
92
  export interface GetStoreIdByOPSIdRequest {
93
93
  onlinePlatformStoreId: string;
94
- onlinePlatformType: OnlinePlatformType;
94
+ onlinePlatformType: ThirdPartyStoreIntegrationType;
95
95
  }
96
96
  export declare type GetOPSByStoreIdResponse = StoreOnlinePlatformStore;
97
97
  export declare type GetStoreIdByOPSIdResponse = string;
@@ -0,0 +1,12 @@
1
+ import { Store } from '../models';
2
+ export interface GetPoskyStoreConfigRequest {
3
+ storeId: string;
4
+ }
5
+ export interface GetPoskyStoreConfigResponse {
6
+ owner: {
7
+ email: string;
8
+ name: string;
9
+ phone: string;
10
+ };
11
+ store: Store;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=third-party-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"third-party-store.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/third-party-store.ts"],"names":[],"mappings":""}
@@ -31,6 +31,12 @@ export declare enum OMEntityType {
31
31
  ITEM = "ITEM",
32
32
  MODIFIER_GROUP = "MODIFIER_GROUP"
33
33
  }
34
+ /**
35
+ * 第三方店家與Kiosky店家的關聯,共用StoreOnlinePlatformStore
36
+ */
37
+ export declare enum ThirdPartyStoreProvider {
38
+ POSKY = "POSKY"
39
+ }
34
40
  export declare type OMMMenuEntity = UbMenuEntity;
35
41
  export interface OMMItem extends UbMenuItem {
36
42
  external_data: OMMItemContent[];
@@ -62,8 +68,11 @@ export interface SOPSContent {
62
68
  customPaymentConfigName?: string;
63
69
  };
64
70
  }
71
+ export declare type ThirdPartyStoreIntegrationType = OnlinePlatformType | ThirdPartyStoreProvider;
65
72
  export interface StoreOnlinePlatformStore extends SOPSContent {
66
73
  storeId: string;
67
- onlinePlatformType: OnlinePlatformType;
74
+ onlinePlatformType: ThirdPartyStoreIntegrationType;
68
75
  onlinePlatformStoreId: string;
69
76
  }
77
+ export declare type ThirdPartyType = 'pos' | 'onlinePlatform';
78
+ 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.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";
@@ -39,4 +39,21 @@ var OMEntityType;
39
39
  OMEntityType["ITEM"] = "ITEM";
40
40
  OMEntityType["MODIFIER_GROUP"] = "MODIFIER_GROUP";
41
41
  })(OMEntityType = exports.OMEntityType || (exports.OMEntityType = {}));
42
+ /**
43
+ * 第三方店家與Kiosky店家的關聯,共用StoreOnlinePlatformStore
44
+ */
45
+ var ThirdPartyStoreProvider;
46
+ (function (ThirdPartyStoreProvider) {
47
+ ThirdPartyStoreProvider["POSKY"] = "POSKY";
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;
42
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"}
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;AAiDD,SAAgB,iBAAiB,CAAC,MAAsC;IACtE,IAAI,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,MAA4B,CAAC,EAAE;QAC5E,OAAO,gBAAgB,CAAC;KACzB;IACD,IAAI,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,QAAQ,CAAC,MAAiC,CAAC,EAAE;QACtF,OAAO,KAAK,CAAC;KACd;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AARD,8CAQC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusted-solutions/sdit.models",
3
- "version": "0.19.0-alpha.6",
3
+ "version": "0.19.0-alpha.9",
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": {