@trusted-solutions/sdit.models 0.19.0-alpha.7 → 0.20.0-alpha.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.
@@ -1,5 +1,6 @@
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
+ import { SingleItem } from './response';
3
4
  /**
4
5
  * 若Order為已付款時,可在accept時帶入invoiceConfig, invoice
5
6
  * 反之,則不需帶入
@@ -76,7 +77,7 @@ export interface OMMItemRequest {
76
77
  /** ======== OnlinePlatformStore ============= */
77
78
  interface BaseSOPSRequest {
78
79
  storeId: string;
79
- onlinePlatformType?: OnlinePlatformType;
80
+ onlinePlatformType?: ThirdPartyStoreIntegrationType;
80
81
  onlinePlatformStoreId: string;
81
82
  }
82
83
  export interface BindOPSIdRequest extends StoreOnlinePlatformStore {
@@ -87,14 +88,14 @@ export interface UnbindOPSIdRequest extends BaseSOPSRequest {
87
88
  export declare type UnbindOPSIdResponse = null;
88
89
  export interface GetOPSByStoreIdRequest {
89
90
  storeId: string;
90
- onlinePlatformType: OnlinePlatformType;
91
+ onlinePlatformType: ThirdPartyStoreIntegrationType;
91
92
  }
92
93
  export interface GetStoreIdByOPSIdRequest {
93
94
  onlinePlatformStoreId: string;
94
- onlinePlatformType: OnlinePlatformType;
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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pos-integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pos-integration.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/pos-integration.ts"],"names":[],"mappings":""}
@@ -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
+ }
@@ -51,3 +51,4 @@ export interface SoldOutSwitchResponse {
51
51
  categoryId: string;
52
52
  soldOut: boolean;
53
53
  }
54
+ export declare type OverwriteMenuResponse = {};
@@ -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.7",
3
+ "version": "0.20.0-alpha.0",
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": {