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

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