@builtbystack/sq-shopify-theme-sdk 0.0.25 → 0.0.28

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/README.md CHANGED
@@ -145,20 +145,12 @@ getLocationAvailability は渡されたSKUとLocationIDにおける在庫情報
145
145
 
146
146
  #### getLocations()
147
147
 
148
- > **getLocations**(`tag`?, `provinceCodes`?, `first`?, `after`?, `isReverse`?): `Promise`\<[`Locations`](#type-aliaseslocationsmd)\>
148
+ > **getLocations**(`first`?, `after`?, `locationFilter`?, `isReverse`?): `Promise`\<[`Locations`](#type-aliaseslocationsmd)\>
149
149
 
150
150
  getLocations は ShopifyIntegration に紐づく LocationGroup の Location の一覧を取得します。
151
151
 
152
152
  ##### Parameters
153
153
 
154
- • **tag?**: `string`
155
-
156
- 取得したいLocationのタグ。
157
-
158
- • **provinceCodes?**: `string`[]
159
-
160
- 取得したいLocationの都道府県コード。
161
-
162
154
  • **first?**: `number`
163
155
 
164
156
  取得してくる個数。デフォルトは250。
@@ -167,6 +159,10 @@ getLocations は ShopifyIntegration に紐づく LocationGroup の Location の
167
159
 
168
160
  ページングの値。指定しない場合先頭から取得してくる。
169
161
 
162
+ • **locationFilter?**: [`LocationFilter`](#type-aliaseslocationfiltermd)
163
+
164
+ ロケーションのロケーションのフィルタリング条件。
165
+
170
166
  • **isReverse?**: `boolean`
171
167
 
172
168
  並び順。デフォルトはfalse。
@@ -410,6 +406,35 @@ CurrencyCode は通貨コードを表す
410
406
  > **Usd**: `"USD"`
411
407
 
412
408
 
409
+ <a name="enumerationslocationtypemd"></a>
410
+
411
+ [**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
412
+
413
+ ***
414
+
415
+ [@builtbystack/sq-shopify-theme-sdk](#globalsmd) / LocationType
416
+
417
+ ## Enumeration: LocationType
418
+
419
+ LocationType はロケーションの種別を表す
420
+
421
+ ### Enumeration Members
422
+
423
+ #### Retail
424
+
425
+ > **Retail**: `"RETAIL"`
426
+
427
+ 店舗
428
+
429
+ ***
430
+
431
+ #### Warehouse
432
+
433
+ > **Warehouse**: `"WAREHOUSE"`
434
+
435
+ 倉庫
436
+
437
+
413
438
  <a name="globalsmd"></a>
414
439
 
415
440
  [**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
@@ -421,6 +446,7 @@ CurrencyCode は通貨コードを表す
421
446
  ## Enumerations
422
447
 
423
448
  - [CurrencyCode](#enumerationscurrencycodemd)
449
+ - [LocationType](#enumerationslocationtypemd)
424
450
 
425
451
  ## Classes
426
452
 
@@ -436,10 +462,12 @@ CurrencyCode は通貨コードを表す
436
462
  - [CustomerRankRule](#type-aliasescustomerrankrulemd)
437
463
  - [CustomerSharingActivationCode](#type-aliasescustomersharingactivationcodemd)
438
464
  - [EstimatedPoint](#type-aliasesestimatedpointmd)
465
+ - [EstimatedPointCampaign](#type-aliasesestimatedpointcampaignmd)
439
466
  - [InventoryItem](#type-aliasesinventoryitemmd)
440
467
  - [Location](#type-aliaseslocationmd)
441
468
  - [LocationAvailabilities](#type-aliaseslocationavailabilitiesmd)
442
469
  - [LocationAvailability](#type-aliaseslocationavailabilitymd)
470
+ - [LocationFilter](#type-aliaseslocationfiltermd)
443
471
  - [Locations](#type-aliaseslocationsmd)
444
472
  - [PageInfo](#type-aliasespageinfomd)
445
473
  - [PointCampaignOrderRule](#type-aliasespointcampaignorderrulemd)
@@ -572,6 +600,12 @@ CustomerRank は会員ランクを表す。
572
600
 
573
601
  この会員ランクを算出した際の条件
574
602
 
603
+ #### earnedPoint
604
+
605
+ > **earnedPoint**: `number`
606
+
607
+ 現在時刻時点を含む算出期間における顧客のリアルタイムな獲得ポイント数
608
+
575
609
  #### earnedPointToRankUp
576
610
 
577
611
  > **earnedPointToRankUp**: `number`
@@ -606,6 +640,12 @@ CustomerRank は会員ランクを表す。
606
640
 
607
641
  この会員ランクの注文時ポイント倍率。ポイント設定がなかったり、ポイント設定があってもポイント倍率設定がなければnullが返る
608
642
 
643
+ #### purchasePrice
644
+
645
+ > **purchasePrice**: `number`
646
+
647
+ 現在時刻時点を含む算出期間における顧客のリアルタイムな購入金額
648
+
609
649
  #### purchasePriceToRankUp
610
650
 
611
651
  > **purchasePriceToRankUp**: `number`
@@ -755,9 +795,49 @@ EstimatedPoint は獲得予想ポイントを表す
755
795
 
756
796
  ### Type declaration
757
797
 
758
- #### pointsEarned
798
+ #### pointCampaign?
799
+
800
+ > `optional` **pointCampaign**: [`EstimatedPointCampaign`](#type-aliasesestimatedpointcampaignmd)
801
+
802
+ 適用されるポイントキャンペーン
803
+ 注文日時に開催期間内で条件を満たすキャンペーンが存在しなかった場合はnilを返す
804
+ カートの場合、明細ごとのポイント計算ロジック内でポイントが加算されるため、ポイントキャンペーンの種別が「商品」の場合もnilを返す
805
+ 商品に適用されるポイントキャンペーンはgetEstimatedShopifyCartLineItemPointから取得が可能
806
+
807
+ #### pointsEarning
808
+
809
+ > **pointsEarning**: `number`
810
+
811
+ ポイントキャンペーン適用前の獲得予想ポイント
812
+
813
+ #### totalPointsEarning
814
+
815
+ > **totalPointsEarning**: `number`
816
+
817
+ ポイントキャンペーン適用後の獲得予想ポイント
818
+
819
+
820
+ <a name="type-aliasesestimatedpointcampaignmd"></a>
821
+
822
+ [**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
823
+
824
+ ***
825
+
826
+ [@builtbystack/sq-shopify-theme-sdk](#globalsmd) / EstimatedPointCampaign
827
+
828
+ ## Type Alias: EstimatedPointCampaign
829
+
830
+ > **EstimatedPointCampaign**: `object`
831
+
832
+ ### Type declaration
833
+
834
+ #### pointCampaignOrderRule
835
+
836
+ > **pointCampaignOrderRule**: [`PointCampaignOrderRule`](#type-aliasespointcampaignorderrulemd)
837
+
838
+ #### pointsEarning
759
839
 
760
- > **pointsEarned**: `number`
840
+ > **pointsEarning**: `number`
761
841
 
762
842
 
763
843
  <a name="type-aliasesinventoryitemmd"></a>
@@ -880,6 +960,41 @@ inventoryQuantity は在庫数を表す。
880
960
  location は在庫のLocationを表す。
881
961
 
882
962
 
963
+ <a name="type-aliaseslocationfiltermd"></a>
964
+
965
+ [**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
966
+
967
+ ***
968
+
969
+ [@builtbystack/sq-shopify-theme-sdk](#globalsmd) / LocationFilter
970
+
971
+ ## Type Alias: LocationFilter
972
+
973
+ > **LocationFilter**: `object`
974
+
975
+ LocationType はロケーションのフィルタリング条件を表現するオブジェクト
976
+
977
+ ### Type declaration
978
+
979
+ #### locationType?
980
+
981
+ > `optional` **locationType**: [`LocationType`](#enumerationslocationtypemd)
982
+
983
+ ロケーションの種別
984
+
985
+ #### provinceCodes?
986
+
987
+ > `optional` **provinceCodes**: `string`[]
988
+
989
+ ロケーションの都道府県コード
990
+
991
+ #### tag?
992
+
993
+ > `optional` **tag**: `string`
994
+
995
+ ロケーションのタグ
996
+
997
+
883
998
  <a name="type-aliaseslocationsmd"></a>
884
999
 
885
1000
  [**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
@@ -967,6 +1082,18 @@ PointCampaignOrderRule はポイントキャンペーンの設定を表す。
967
1082
 
968
1083
  > **id**: `string`
969
1084
 
1085
+ #### pointMethod
1086
+
1087
+ > **pointMethod**: `string`
1088
+
1089
+ キャンペーンポイントの計算方法
1090
+
1091
+ #### targetType
1092
+
1093
+ > **targetType**: `string`
1094
+
1095
+ キャンペーンポイント付与対象の種別
1096
+
970
1097
  #### title
971
1098
 
972
1099
  > **title**: `string`
@@ -50,13 +50,9 @@ export declare type CustomerRank = {
50
50
  */
51
51
  name: string;
52
52
  /**
53
- * この会員ランクを算出した際の条件
54
- */
55
- calculationCondition: CustomerRankCalculationCondition;
56
- /**
57
- * ランクアップするために必要な残り獲得ポイント
53
+ * この会員ランクへのランクアップに必要な値。会員ランクの算出方法によりthresholdが指す値は異なり、獲得ポイントと購入金額のどちらかになる
58
54
  */
59
- earnedPointToRankUp: number;
55
+ threshold: number;
60
56
  /**
61
57
  * この会員ランクの一段階上の会員ランク。上の会員ランクが存在しない場合はnull
62
58
  */
@@ -65,14 +61,26 @@ export declare type CustomerRank = {
65
61
  * この会員ランクの一段階下の会員ランク。下の会員ランクが存在しない場合はnull
66
62
  */
67
63
  lowerRank?: CustomerRankRule;
64
+ /**
65
+ * 現在時刻時点を含む算出期間における顧客のリアルタイムな獲得ポイント数
66
+ */
67
+ earnedPoint: number;
68
+ /**
69
+ * 現在時刻時点を含む算出期間における顧客のリアルタイムな購入金額
70
+ */
71
+ purchasePrice: number;
72
+ /**
73
+ * ランクアップするために必要な残り獲得ポイント
74
+ */
75
+ earnedPointToRankUp: number;
68
76
  /**
69
77
  * ランクアップするために必要な残り購入金額
70
78
  */
71
79
  purchasePriceToRankUp: number;
72
80
  /**
73
- * この会員ランクへのランクアップに必要な値。会員ランクの算出方法によりthresholdが指す値は異なり、獲得ポイントと購入金額のどちらかになる
81
+ * この会員ランクを算出した際の条件
74
82
  */
75
- threshold: number;
83
+ calculationCondition: CustomerRankCalculationCondition;
76
84
  /**
77
85
  * この会員ランクの注文時ポイント倍率。ポイント設定がなかったり、ポイント設定があってもポイント倍率設定がなければnullが返る
78
86
  */
@@ -135,7 +143,26 @@ export declare type CustomerSharingActivationCode = {
135
143
  * EstimatedPoint は獲得予想ポイントを表す
136
144
  */
137
145
  export declare type EstimatedPoint = {
138
- pointsEarned: number;
146
+ /**
147
+ * ポイントキャンペーン適用前の獲得予想ポイント
148
+ */
149
+ pointsEarning: number;
150
+ /**
151
+ * ポイントキャンペーン適用後の獲得予想ポイント
152
+ */
153
+ totalPointsEarning: number;
154
+ /**
155
+ * 適用されるポイントキャンペーン
156
+ * 注文日時に開催期間内で条件を満たすキャンペーンが存在しなかった場合はnilを返す
157
+ * カートの場合、明細ごとのポイント計算ロジック内でポイントが加算されるため、ポイントキャンペーンの種別が「商品」の場合もnilを返す
158
+ * 商品に適用されるポイントキャンペーンはgetEstimatedShopifyCartLineItemPointから取得が可能
159
+ */
160
+ pointCampaign?: EstimatedPointCampaign;
161
+ };
162
+
163
+ export declare type EstimatedPointCampaign = {
164
+ pointsEarning: number;
165
+ pointCampaignOrderRule: PointCampaignOrderRule;
139
166
  };
140
167
 
141
168
  /**
@@ -181,6 +208,24 @@ export declare type LocationAvailability = {
181
208
  inventoryQuantity: number;
182
209
  };
183
210
 
211
+ /**
212
+ * LocationType はロケーションのフィルタリング条件を表現するオブジェクト
213
+ */
214
+ export declare type LocationFilter = {
215
+ /**
216
+ * ロケーションの種別
217
+ */
218
+ locationType?: LocationType;
219
+ /**
220
+ * ロケーションのタグ
221
+ */
222
+ tag?: string;
223
+ /**
224
+ * ロケーションの都道府県コード
225
+ */
226
+ provinceCodes?: string[];
227
+ };
228
+
184
229
  /**
185
230
  * Locations は Location の一覧を取得するための情報を表す。
186
231
  */
@@ -189,6 +234,16 @@ export declare type Locations = {
189
234
  pageInfo: PageInfo;
190
235
  };
191
236
 
237
+ /**
238
+ * LocationType はロケーションの種別を表す
239
+ */
240
+ export declare enum LocationType {
241
+ /** 店舗 */
242
+ Retail = "RETAIL",
243
+ /** 倉庫 */
244
+ Warehouse = "WAREHOUSE"
245
+ }
246
+
192
247
  /**
193
248
  * PageInfo はページングを伴って一覧を取得したときに、その一覧のページングの情報を表す。
194
249
  */
@@ -221,6 +276,14 @@ export declare type PointCampaignOrderRule = {
221
276
  * キャンペーンのタイトル
222
277
  */
223
278
  title: string;
279
+ /**
280
+ * キャンペーンポイントの計算方法
281
+ */
282
+ pointMethod: string;
283
+ /**
284
+ * キャンペーンポイント付与対象の種別
285
+ */
286
+ targetType: string;
224
287
  };
225
288
 
226
289
  /**
@@ -263,15 +326,15 @@ export declare type PointChange = {
263
326
  * ポイントが利用可能になる日時。nilの場合はまだ利用可能になる日時が決まっていない。主に未配送注文に関するポイントはnilになる。
264
327
  */
265
328
  availableAt?: Date;
329
+ /**
330
+ * ポイントの失効日。nilの場合はまだ失効日が決まっていない。ポイント消費や、未配送注文に関するポイントはnilになる。
331
+ */
332
+ expiresDate?: Date;
266
333
  /**
267
334
  * ポイントが利用できる期限。失効する直前を表すため、expiresDateから1ナノ秒を引いた値となる。
268
335
  * 例えば、expiresDateが 2024-06-12 00:00:00 なら、availableUntilは 2024-06-11 23:59:59.999999999 となる。
269
336
  */
270
337
  availableUntil?: Date;
271
- /**
272
- * ポイントの失効日。nilの場合はまだ失効日が決まっていない。ポイント消費や、未配送注文に関するポイントはnilになる。
273
- */
274
- expiresDate?: Date;
275
338
  /**
276
339
  * ポイントの発生日時
277
340
  */
@@ -300,9 +363,9 @@ export declare type PointChangeActivities = {
300
363
  export declare type PointChangeActivity = {
301
364
  id: string;
302
365
  title: string;
366
+ tenant: Tenant;
303
367
  pointChange: PointChange;
304
368
  retailLocation?: Location_2;
305
- tenant: Tenant;
306
369
  };
307
370
 
308
371
  declare enum PointChangeActivitySortKey {
@@ -383,6 +446,10 @@ export declare type ProductVariant = {
383
446
  * 商品バリエーションのタイトル
384
447
  */
385
448
  title: string;
449
+ /**
450
+ * 在庫情報
451
+ */
452
+ inventoryItem: InventoryItem;
386
453
  /**
387
454
  * 予約販売が設定されている場合にtrueが返る
388
455
  */
@@ -391,10 +458,6 @@ export declare type ProductVariant = {
391
458
  * 商品の店舗受取が可能な場合にtrueが返る
392
459
  */
393
460
  isLocalPickupAvailable: boolean;
394
- /**
395
- * 在庫情報
396
- */
397
- inventoryItem: InventoryItem;
398
461
  };
399
462
 
400
463
  /**
@@ -421,11 +484,11 @@ export declare type PurchasingCustomer = {
421
484
  export declare type PurchasingCustomerDiscount = {
422
485
  id: string;
423
486
  title: string;
424
- description: string;
425
487
  /**
426
488
  * Discountのステータス。"ACTIVE", "SCHEDULED", "EXPIRED" のいずれかが入る。
427
489
  */
428
490
  status: string;
491
+ description: string;
429
492
  code: string;
430
493
  /**
431
494
  * Discountがこの顧客で有効かどうかを表す。
@@ -497,13 +560,12 @@ export declare class SDK {
497
560
  /**
498
561
  * getLocations は ShopifyIntegration に紐づく LocationGroup の Location の一覧を取得します。
499
562
  *
500
- * @param {string} [tag] 取得したいLocationのタグ。
501
- * @param {string[]} [provinceCodes] 取得したいLocationの都道府県コード。
502
563
  * @param {number} [first] 取得してくる個数。デフォルトは250。
503
564
  * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
565
+ * @param {LocationFilter} [locationFilter] ロケーションのロケーションのフィルタリング条件。
504
566
  * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
505
567
  */
506
- getLocations(tag?: string, provinceCodes?: string[], first?: number, after?: string, isReverse?: boolean): Promise<Locations>;
568
+ getLocations(first?: number, after?: string, locationFilter?: LocationFilter, isReverse?: boolean): Promise<Locations>;
507
569
  /**
508
570
  * getPurchasingCustomerDiscounts は購入者の割引情報を返します。
509
571
  *