@trusted-solutions/sdit.models 0.18.0-alpha.18 → 0.18.0-alpha.22
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/constants/client-endpoints.d.ts +7 -0
- package/constants/client-endpoints.js +11 -0
- package/constants/client-endpoints.js.map +1 -0
- package/lambda/contract.d.ts +76 -0
- package/lambda/contract.js +3 -0
- package/lambda/contract.js.map +1 -0
- 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/invoice.d.ts +2 -0
- package/models/contract.d.ts +29 -0
- package/models/contract.js +3 -0
- package/models/contract.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.clientEndpoints = void 0;
|
|
4
|
+
exports.clientEndpoints = {
|
|
5
|
+
KshopOnline: {
|
|
6
|
+
dev: 'http://localhost:4200',
|
|
7
|
+
qa: 'https://kshop-online-qa.trusted-sol.com',
|
|
8
|
+
prod: 'https://kshop-online.trusted-sol.com',
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=client-endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-endpoints.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/constants/client-endpoints.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG;IAC7B,WAAW,EAAE;QACX,GAAG,EAAE,uBAAuB;QAC5B,EAAE,EAAE,yCAAyC;QAC7C,IAAI,EAAE,sCAAsC;KAC7C;CACF,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Contract, PlanLimits, Plan, ContractCore } from '../models/contract';
|
|
2
|
+
/**
|
|
3
|
+
* Get Store Contract use case
|
|
4
|
+
*/
|
|
5
|
+
export interface GetStoreContractRequest {
|
|
6
|
+
storeId: string;
|
|
7
|
+
}
|
|
8
|
+
export interface GetStoreContractResponse {
|
|
9
|
+
currentContract: Contract;
|
|
10
|
+
originalContract: Contract;
|
|
11
|
+
upcomingContract: Contract;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get Current Store Contract use case
|
|
15
|
+
*/
|
|
16
|
+
export interface GetCurrentStoreContractLimitRequest {
|
|
17
|
+
contractId: string;
|
|
18
|
+
/**
|
|
19
|
+
* 沒給的話,回傳全部的limit
|
|
20
|
+
*/
|
|
21
|
+
limitKeys?: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface GetCurrentStoreContractLimitResponse {
|
|
24
|
+
storeId: string;
|
|
25
|
+
contractId: string;
|
|
26
|
+
eachLimits: PlanLimits;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Create Contract use case
|
|
30
|
+
*/
|
|
31
|
+
export declare type CreateContractRequest = ContractCore;
|
|
32
|
+
export declare type CreateContractResponse = Contract;
|
|
33
|
+
/**
|
|
34
|
+
* Update Contract Duration use case
|
|
35
|
+
*/
|
|
36
|
+
export interface UpdateContractDurationRequest {
|
|
37
|
+
contractId: string;
|
|
38
|
+
startedAt: number;
|
|
39
|
+
endedAt: number;
|
|
40
|
+
}
|
|
41
|
+
export declare type UpdateContractDurationResponse = null;
|
|
42
|
+
/**
|
|
43
|
+
* Update Contract Plan use case
|
|
44
|
+
*/
|
|
45
|
+
export interface UpdateContractPlanRequest {
|
|
46
|
+
contractId: string;
|
|
47
|
+
planId: string;
|
|
48
|
+
}
|
|
49
|
+
export declare type UpdateContractPlanResponse = null;
|
|
50
|
+
/**
|
|
51
|
+
* Update Contract ForStore use case
|
|
52
|
+
*/
|
|
53
|
+
export interface UpdateContractForStoreRequest {
|
|
54
|
+
contractId: string;
|
|
55
|
+
forStoreId: string;
|
|
56
|
+
}
|
|
57
|
+
export declare type UpdateContractForStoreResponse = null;
|
|
58
|
+
/**
|
|
59
|
+
* Update Contract Owner use case
|
|
60
|
+
*/
|
|
61
|
+
export interface UpdateContractOwnerRequest {
|
|
62
|
+
contractId: string;
|
|
63
|
+
ownerCognitoUserId: string;
|
|
64
|
+
}
|
|
65
|
+
export declare type UpdateContractOwnerResponse = null;
|
|
66
|
+
export interface DeleteContractRequest {
|
|
67
|
+
contractId: string;
|
|
68
|
+
}
|
|
69
|
+
export declare type DeleteContractResponse = null;
|
|
70
|
+
/**
|
|
71
|
+
* Get Plan
|
|
72
|
+
*/
|
|
73
|
+
export interface GetPlanRequest {
|
|
74
|
+
planId: string;
|
|
75
|
+
}
|
|
76
|
+
export declare type GetPlanResponse = Plan;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/contract.ts"],"names":[],"mappings":""}
|
|
@@ -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":""}
|
|
@@ -34,6 +34,7 @@ export interface QueryLoveCodeRequest {
|
|
|
34
34
|
apiKey?: string;
|
|
35
35
|
}
|
|
36
36
|
export interface UploadInvoiceRequest {
|
|
37
|
+
storeId: string;
|
|
37
38
|
orderId: string;
|
|
38
39
|
receiptIssuedAt: number;
|
|
39
40
|
totalAmount: number;
|
|
@@ -48,6 +49,7 @@ export interface UploadInvoiceRequest {
|
|
|
48
49
|
taxAmount: number;
|
|
49
50
|
}
|
|
50
51
|
export interface UploadVoidInvoiceRequest {
|
|
52
|
+
storeId: string;
|
|
51
53
|
officeId: string;
|
|
52
54
|
invoice: Partial<OrderInvoice>;
|
|
53
55
|
receiptVoidedAt: number;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare type PlanValueType = boolean | number;
|
|
2
|
+
export interface PlanLimits {
|
|
3
|
+
[key: string]: PlanValueType;
|
|
4
|
+
}
|
|
5
|
+
export interface Plan {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
planLimits?: PlanLimits;
|
|
10
|
+
/** 方案的生效天數 */
|
|
11
|
+
rangeDays?: number;
|
|
12
|
+
}
|
|
13
|
+
/** 用於createContract */
|
|
14
|
+
export declare type ContractCore = {
|
|
15
|
+
name: string;
|
|
16
|
+
note?: string;
|
|
17
|
+
startedAt: number;
|
|
18
|
+
/** 不給: 由後端參考plan給值; 給了: 後端直接用這個值 */
|
|
19
|
+
endedAt?: number;
|
|
20
|
+
planId: string;
|
|
21
|
+
storeId: string;
|
|
22
|
+
ownerCognitoUserId: string;
|
|
23
|
+
};
|
|
24
|
+
export declare type Contract = {
|
|
25
|
+
id: string;
|
|
26
|
+
createdAt: number;
|
|
27
|
+
endedAt: number;
|
|
28
|
+
plan: Plan;
|
|
29
|
+
} & ContractCore;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/contract.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trusted-solutions/sdit.models",
|
|
3
|
-
"version": "0.18.0-alpha.
|
|
3
|
+
"version": "0.18.0-alpha.22",
|
|
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": {
|