@builtbystack/sq-shopify-theme-sdk 0.0.27 → 0.0.29

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
@@ -91,6 +91,23 @@ SDKは名前空間 `SQ` 内に存在するため、SDKの初期化は `new SQ.SD
91
91
 
92
92
  ***
93
93
 
94
+ #### getHasBackOrderProductVariants()
95
+
96
+ > **getHasBackOrderProductVariants**(`id`): `Promise`\<`null` \| `boolean`\>
97
+
98
+ getHasBackOrderProductVariants はIDで指定した商品が持つ商品バリエーションに1つでも予約販売設定がされている場合trueを返します。
99
+ 指定したIDの商品が存在しない場合はnullを返します。
100
+
101
+ ##### Parameters
102
+
103
+ • **id**: `string`
104
+
105
+ ##### Returns
106
+
107
+ `Promise`\<`null` \| `boolean`\>
108
+
109
+ ***
110
+
94
111
  #### getLocationAvailabilities()
95
112
 
96
113
  > **getLocationAvailabilities**(`sku`, `first`?, `after`?, `isReverse`?): `Promise`\<[`LocationAvailabilities`](#type-aliaseslocationavailabilitiesmd)\>
@@ -600,6 +617,12 @@ CustomerRank は会員ランクを表す。
600
617
 
601
618
  この会員ランクを算出した際の条件
602
619
 
620
+ #### earnedPoint
621
+
622
+ > **earnedPoint**: `number`
623
+
624
+ 現在時刻時点を含む算出期間における顧客のリアルタイムな獲得ポイント数
625
+
603
626
  #### earnedPointToRankUp
604
627
 
605
628
  > **earnedPointToRankUp**: `number`
@@ -634,6 +657,12 @@ CustomerRank は会員ランクを表す。
634
657
 
635
658
  この会員ランクの注文時ポイント倍率。ポイント設定がなかったり、ポイント設定があってもポイント倍率設定がなければnullが返る
636
659
 
660
+ #### purchasePrice
661
+
662
+ > **purchasePrice**: `number`
663
+
664
+ 現在時刻時点を含む算出期間における顧客のリアルタイムな購入金額
665
+
637
666
  #### purchasePriceToRankUp
638
667
 
639
668
  > **purchasePriceToRankUp**: `number`
@@ -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
  */
@@ -318,15 +326,15 @@ export declare type PointChange = {
318
326
  * ポイントが利用可能になる日時。nilの場合はまだ利用可能になる日時が決まっていない。主に未配送注文に関するポイントはnilになる。
319
327
  */
320
328
  availableAt?: Date;
329
+ /**
330
+ * ポイントの失効日。nilの場合はまだ失効日が決まっていない。ポイント消費や、未配送注文に関するポイントはnilになる。
331
+ */
332
+ expiresDate?: Date;
321
333
  /**
322
334
  * ポイントが利用できる期限。失効する直前を表すため、expiresDateから1ナノ秒を引いた値となる。
323
335
  * 例えば、expiresDateが 2024-06-12 00:00:00 なら、availableUntilは 2024-06-11 23:59:59.999999999 となる。
324
336
  */
325
337
  availableUntil?: Date;
326
- /**
327
- * ポイントの失効日。nilの場合はまだ失効日が決まっていない。ポイント消費や、未配送注文に関するポイントはnilになる。
328
- */
329
- expiresDate?: Date;
330
338
  /**
331
339
  * ポイントの発生日時
332
340
  */
@@ -355,9 +363,9 @@ export declare type PointChangeActivities = {
355
363
  export declare type PointChangeActivity = {
356
364
  id: string;
357
365
  title: string;
366
+ tenant: Tenant;
358
367
  pointChange: PointChange;
359
368
  retailLocation?: Location_2;
360
- tenant: Tenant;
361
369
  };
362
370
 
363
371
  declare enum PointChangeActivitySortKey {
@@ -438,6 +446,10 @@ export declare type ProductVariant = {
438
446
  * 商品バリエーションのタイトル
439
447
  */
440
448
  title: string;
449
+ /**
450
+ * 在庫情報
451
+ */
452
+ inventoryItem: InventoryItem;
441
453
  /**
442
454
  * 予約販売が設定されている場合にtrueが返る
443
455
  */
@@ -446,10 +458,6 @@ export declare type ProductVariant = {
446
458
  * 商品の店舗受取が可能な場合にtrueが返る
447
459
  */
448
460
  isLocalPickupAvailable: boolean;
449
- /**
450
- * 在庫情報
451
- */
452
- inventoryItem: InventoryItem;
453
461
  };
454
462
 
455
463
  /**
@@ -476,11 +484,11 @@ export declare type PurchasingCustomer = {
476
484
  export declare type PurchasingCustomerDiscount = {
477
485
  id: string;
478
486
  title: string;
479
- description: string;
480
487
  /**
481
488
  * Discountのステータス。"ACTIVE", "SCHEDULED", "EXPIRED" のいずれかが入る。
482
489
  */
483
490
  status: string;
491
+ description: string;
484
492
  code: string;
485
493
  /**
486
494
  * Discountがこの顧客で有効かどうかを表す。
@@ -593,6 +601,12 @@ export declare class SDK {
593
601
  */
594
602
  getPurchasingCustomerSharing(): Promise<PurchasingCustomerSharing | null>;
595
603
  getProduct(id: string, first?: number, after?: string, isReverse?: boolean, sortKeys?: ProductVariantSortKeys): Promise<Product | null>;
604
+ /**
605
+ * getHasBackOrderProductVariants はIDで指定した商品が持つ商品バリエーションに1つでも予約販売設定がされている場合trueを返します。
606
+ * 指定したIDの商品が存在しない場合はnullを返します。
607
+ * @param {string} [productShopifyLegacyResourceID] 商品のShopifyLegacyResourceID(gid://shopify/Product/xxxのxxxの部分)
608
+ */
609
+ getHasBackOrderProductVariants(id: string): Promise<boolean | null>;
596
610
  getPointCampaignOrderRuleTargetCustomerRank(): Promise<PointCampaignOrderRuleTargetCustomerRank | null>;
597
611
  getEstimatedShopifyCartPoint(currencyCode: CurrencyCode, taxesIncluded: boolean, lineItems: CartLineItem[]): Promise<EstimatedPoint | null>;
598
612
  getEstimatedShopifyCartLineItemPoint(currencyCode: CurrencyCode, taxesIncluded: boolean, sku: string, quantity: number, unitPrice: string): Promise<EstimatedPoint | null>;