@builtbystack/sq-shopify-theme-sdk 0.0.5 → 0.0.6

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,3 +1,43 @@
1
+ /**
2
+ * CustomerRank は会員ランクを表す。
3
+ */
4
+ export declare type CustomerRank = {
5
+ id: string;
6
+ name: string;
7
+ calculationCondition: CustomerRankCalculationCondition;
8
+ earnedPointToRankUp: number;
9
+ higherRank?: CustomerRankRule;
10
+ lowerRank?: CustomerRankRule;
11
+ purchasePriceToRankUp: number;
12
+ threshold: number;
13
+ };
14
+
15
+ /**
16
+ * CustomerRankCalculationCondition は会員ランクの算出条件を表す。
17
+ */
18
+ export declare type CustomerRankCalculationCondition = {
19
+ customerRankCalculationPeriod?: CustomerRankCalculationPeriod;
20
+ earnedPoint: number;
21
+ purchasePrice: number;
22
+ };
23
+
24
+ /**
25
+ * CustomerRankCalculationPeriod は会員ランクの算出期間を表す。
26
+ */
27
+ export declare type CustomerRankCalculationPeriod = {
28
+ start: Date;
29
+ end: Date;
30
+ };
31
+
32
+ /**
33
+ * CustomerRankRule は会員ランクのルールを表す。
34
+ */
35
+ export declare type CustomerRankRule = {
36
+ id: string;
37
+ name: string;
38
+ threshold: number;
39
+ };
40
+
1
41
  /**
2
42
  * Location は ShopifyIntegration に紐付いている Location を表す。
3
43
  */
@@ -12,7 +52,7 @@ export { Location_2 as Location }
12
52
  */
13
53
  export declare type LocationAvailabilities = {
14
54
  nodes: LocationAvailability[];
15
- pageInfo: PageInfo | null;
55
+ pageInfo: PageInfo;
16
56
  };
17
57
 
18
58
  /**
@@ -39,7 +79,7 @@ export declare type LocationAvailability = {
39
79
  */
40
80
  export declare type Locations = {
41
81
  nodes: Location_2[];
42
- pageInfo: PageInfo | null;
82
+ pageInfo: PageInfo;
43
83
  };
44
84
 
45
85
  /**
@@ -65,6 +105,41 @@ export declare type PageInfo = {
65
105
  hasPreviousPage: boolean;
66
106
  };
67
107
 
108
+ /**
109
+ * PointChange はポイントの変動を表す。
110
+ */
111
+ export declare type PointChange = {
112
+ id: string;
113
+ delta: number;
114
+ availableAt?: Date;
115
+ availableUntil?: Date;
116
+ expiresDate?: Date;
117
+ pointChangeCreatedAt: Date;
118
+ createdAt: Date;
119
+ };
120
+
121
+ /**
122
+ *
123
+ */
124
+ export declare type PointChangeActivities = {
125
+ nodes: PointChangeActivity[];
126
+ pageInfo: PageInfo;
127
+ };
128
+
129
+ /**
130
+ * PointChangeActivity はポイントの変動の履歴を表す。
131
+ */
132
+ export declare type PointChangeActivity = {
133
+ id: string;
134
+ title: string;
135
+ pointChange: PointChange;
136
+ };
137
+
138
+ declare enum PointChangeActivitySortKey {
139
+ CreatedAt = "CREATED_AT",
140
+ PointChangeCreatedAt = "POINT_CHANGE_CREATED_AT"
141
+ }
142
+
68
143
  /**
69
144
  * Points は SDK から取得できるポイントの情報を表す。
70
145
  */
@@ -91,7 +166,7 @@ export declare type PurchasingCustomerDiscount = {
91
166
  export declare type PurchasingCustomerDiscounts = {
92
167
  id: string;
93
168
  nodes: PurchasingCustomerDiscount[];
94
- pageInfo: PageInfo | null;
169
+ pageInfo: PageInfo;
95
170
  };
96
171
 
97
172
  /**
@@ -150,7 +225,20 @@ export declare class SDK {
150
225
  * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
151
226
  * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
152
227
  */
153
- getPurchasingCustomerDiscounts(first?: number, after?: string, isReverse?: boolean): Promise<PurchasingCustomerDiscounts>;
228
+ getPurchasingCustomerDiscounts(first?: number, after?: string, isReverse?: boolean): Promise<PurchasingCustomerDiscounts | null>;
229
+ /**
230
+ * getPointChangeActivities は購入者のポイント変動履歴を返します。
231
+ *
232
+ * @param {number} [first] 取得してくる個数。デフォルトは250。
233
+ * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
234
+ * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
235
+ * @param {PointChangeActivitySortKey} [sortKeys] ソートキー。CREATED_ATかPOINT_CHANGE_CREATED_ATを渡す。デフォルトはCREATED_AT。
236
+ */
237
+ getPointChangeActivities(first?: number, after?: string, isReverse?: boolean, sortKeys?: PointChangeActivitySortKey): Promise<PointChangeActivities | null>;
238
+ /**
239
+ * getPurchasingCustomerCurrentRank は購入者の現在のランク情報を返します。
240
+ */
241
+ getPurchasingCustomerCurrentRank(): Promise<CustomerRank | null>;
154
242
  }
155
243
 
156
244
  export { }