@trusted-solutions/sdit.models 0.24.3 → 0.25.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.
@@ -56,6 +56,16 @@ export interface UpdateContractPlanRequest {
56
56
  * Will ignore `planId` if provided.
57
57
  */
58
58
  planIds?: string[];
59
+ /**
60
+ * undefined: 不變更
61
+ * null/空字串: 移除此property
62
+ */
63
+ name?: string;
64
+ /**
65
+ * undefined: 不變更
66
+ * null/空字串: 移除此property
67
+ */
68
+ note?: string;
59
69
  }
60
70
  export declare type UpdateContractPlanResponse = null;
61
71
  /**
@@ -1,7 +1,8 @@
1
1
  import { Contract } from '../models/contract';
2
2
  export declare enum SubscriptionVariantType {
3
3
  month = "M",
4
- year = "Y"
4
+ year = "Y",
5
+ custom = "C"
5
6
  }
6
7
  export declare type Subscription = {
7
8
  id: string;
@@ -12,6 +13,7 @@ export declare type Subscription = {
12
13
  ownerCognitoUserEmail: string;
13
14
  ownerCognitoUserName: string;
14
15
  externalCustomerId: string;
16
+ note?: string;
15
17
  variantType: SubscriptionVariantType;
16
18
  details: SubscriptionItem[];
17
19
  totalAmount: number;
@@ -109,3 +111,25 @@ export declare type StopSubscriptionResponse = Subscription;
109
111
  export declare type DeleteSubscriptionRequest = {
110
112
  subscriptionId: string;
111
113
  };
114
+ export declare type CreateSubscriptionRequest = {
115
+ storeId: string;
116
+ ownerCognitoUserId: string;
117
+ externalCustomerId: string;
118
+ variantType: SubscriptionVariantType;
119
+ subscriptionProductIds: string[];
120
+ startedAt: number | null;
121
+ endedAt?: number;
122
+ };
123
+ export declare type CreateSubscriptionResponse = Subscription;
124
+ export declare type UpdateSubscriptionItemRequest = {
125
+ subscriptionId: string;
126
+ subscriptionProductIds: string[];
127
+ };
128
+ export declare type UpdateSubscriptionItemResponse = Subscription;
129
+ export declare type UpdateSubscriptionDurationRequest = {
130
+ subscriptionId: string;
131
+ variantType: SubscriptionVariantType;
132
+ startedAt: number;
133
+ endedAt?: number;
134
+ };
135
+ export declare type UpdateSubscriptionDurationResponse = Subscription;
@@ -5,5 +5,6 @@ var SubscriptionVariantType;
5
5
  (function (SubscriptionVariantType) {
6
6
  SubscriptionVariantType["month"] = "M";
7
7
  SubscriptionVariantType["year"] = "Y";
8
+ SubscriptionVariantType["custom"] = "C";
8
9
  })(SubscriptionVariantType = exports.SubscriptionVariantType || (exports.SubscriptionVariantType = {}));
9
10
  //# sourceMappingURL=subscription.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/subscription.ts"],"names":[],"mappings":";;;AAEA,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,sCAAW,CAAA;IACX,qCAAU,CAAA;AACZ,CAAC,EAHW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAGlC"}
1
+ {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/subscription.ts"],"names":[],"mappings":";;;AAEA,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,sCAAW,CAAA;IACX,qCAAU,CAAA;IACV,uCAAY,CAAA;AACd,CAAC,EAJW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAIlC"}
@@ -13,7 +13,6 @@ export interface Plan {
13
13
  /** 用於createContract */
14
14
  export declare type ContractCore = {
15
15
  name: string;
16
- note?: string;
17
16
  startedAt: number;
18
17
  endedAt: number;
19
18
  /** planId, planIds 二選一填 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusted-solutions/sdit.models",
3
- "version": "0.24.3",
3
+ "version": "0.25.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": {