@trusted-solutions/sdit.models 0.19.0-alpha.2 → 0.19.0-alpha.5

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,4 +1,4 @@
1
- import { Contract, PlanLimits } from '../models/contract';
1
+ import { Contract, PlanLimits, Plan, ContractCore } from '../models/contract';
2
2
  /**
3
3
  * Get Store Contract use case
4
4
  */
@@ -28,7 +28,7 @@ export interface GetCurrentStoreContractLimitResponse {
28
28
  /**
29
29
  * Create Contract use case
30
30
  */
31
- export declare type CreateContractRequest = Contract;
31
+ export declare type CreateContractRequest = ContractCore;
32
32
  export declare type CreateContractResponse = Contract;
33
33
  /**
34
34
  * Update Contract Duration use case
@@ -69,3 +69,4 @@ export declare type UpdateContractOwnerResponse = null;
69
69
  export interface GetPlanRequest {
70
70
  planId: string;
71
71
  }
72
+ export declare type GetPlanResponse = Plan;
@@ -1,4 +1,3 @@
1
- import { Operator } from './store';
2
1
  export declare type PlanValueType = boolean | number;
3
2
  export interface PlanLimits {
4
3
  [key: string]: PlanValueType;
@@ -11,19 +10,20 @@ export interface Plan {
11
10
  /** 方案的生效天數 */
12
11
  rangeDays?: number;
13
12
  }
14
- export interface Contract {
15
- /** createContractRequest 不用給 id */
16
- id?: string;
13
+ /** 用於createContract */
14
+ export declare type ContractCore = {
17
15
  name: string;
18
16
  note?: string;
19
- createdAt?: number;
20
17
  startedAt: number;
21
- endedAt: number;
22
- createdBy?: Operator;
18
+ /** 不給: 由後端參考plan給值; 給了: 後端直接用這個值 */
19
+ endedAt?: number;
23
20
  planId: string;
24
- /** createContractRequest 不用給 plan */
25
- plan?: Plan;
26
- contractProofImageUrls?: string[];
27
- forStoreId: string;
21
+ storeId: string;
28
22
  ownerCognitoUserId: string;
29
- }
23
+ };
24
+ export declare type Contract = {
25
+ id: string;
26
+ createdAt: number;
27
+ endedAt: number;
28
+ plan: Plan;
29
+ } & ContractCore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusted-solutions/sdit.models",
3
- "version": "0.19.0-alpha.2",
3
+ "version": "0.19.0-alpha.5",
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": {