@builtbystack/sq-shopify-theme-sdk 0.0.19 → 0.0.22

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.doc.md CHANGED
@@ -4,6 +4,13 @@
4
4
 
5
5
  `@x.x.x` で指定されているバージョンは適宜最新のものを利用してください。
6
6
 
7
+ SDKは名前空間 `SQ` 内に存在するため、SDKの初期化は `new SQ.SDK()` で行ってください。
8
+
7
9
  ```html
8
10
  <script src="https://unpkg.com/@builtbystack/sq-shopify-theme-sdk@x.x.x/dist/sq-shopify-theme-sdk.umd.js" defer></script>
11
+ <script type="text/javascript">
12
+ window.onload = async () => {
13
+ const sdk = new SQ.SDK({{ request.origin | json }});
14
+ }
15
+ </script>
9
16
  ```
package/README.md CHANGED
@@ -11,8 +11,15 @@
11
11
 
12
12
  `@x.x.x` で指定されているバージョンは適宜最新のものを利用してください。
13
13
 
14
+ SDKは名前空間 `SQ` 内に存在するため、SDKの初期化は `new SQ.SDK()` で行ってください。
15
+
14
16
  ```html
15
17
  <script src="https://unpkg.com/@builtbystack/sq-shopify-theme-sdk@x.x.x/dist/sq-shopify-theme-sdk.umd.js" defer></script>
18
+ <script type="text/javascript">
19
+ window.onload = async () => {
20
+ const sdk = new SQ.SDK({{ request.origin | json }});
21
+ }
22
+ </script>
16
23
  ```
17
24
 
18
25
  # Classes
@@ -98,12 +105,20 @@ getLocationAvailability は渡されたSKUとLocationIDにおける在庫情報
98
105
 
99
106
  #### getLocations()
100
107
 
101
- > **getLocations**(`first`?, `after`?, `isReverse`?): `Promise`\<[`Locations`](#type-aliaseslocationsmd)\>
108
+ > **getLocations**(`tag`?, `provinceCodes`?, `first`?, `after`?, `isReverse`?): `Promise`\<[`Locations`](#type-aliaseslocationsmd)\>
102
109
 
103
110
  getLocations は ShopifyIntegration に紐づく LocationGroup の Location の一覧を取得します。
104
111
 
105
112
  ##### Parameters
106
113
 
114
+ • **tag?**: `string`
115
+
116
+ 取得したいLocationのタグ。
117
+
118
+ • **provinceCodes?**: `string`[]
119
+
120
+ 取得したいLocationの都道府県コード。
121
+
107
122
  • **first?**: `number`
108
123
 
109
124
  取得してくる個数。デフォルトは250。
@@ -660,6 +675,10 @@ Location は ShopifyIntegration に紐付いている Location を表す。
660
675
 
661
676
  > **phone**: `string`
662
677
 
678
+ #### tags
679
+
680
+ > **tags**: `string`[]
681
+
663
682
 
664
683
  <a name="type-aliaseslocationavailabilitiesmd"></a>
665
684
 
@@ -982,18 +1001,34 @@ Product は商品情報を表す。
982
1001
 
983
1002
  ### Type declaration
984
1003
 
1004
+ #### hasBackOrderProductVariants
1005
+
1006
+ > **hasBackOrderProductVariants**: `boolean`
1007
+
1008
+ 商品が持つバリエーションに1つでも予約販売設定がされている場合trueが返る
1009
+
985
1010
  #### id
986
1011
 
987
1012
  > **id**: `string`
988
1013
 
1014
+ #### isLocalPickupAvailable
1015
+
1016
+ > **isLocalPickupAvailable**: `boolean`
1017
+
1018
+ 商品の店舗受取が可能な場合にtrueが返る
1019
+
989
1020
  #### title
990
1021
 
991
1022
  > **title**: `string`
992
1023
 
1024
+ 商品のタイトル
1025
+
993
1026
  #### variants
994
1027
 
995
1028
  > **variants**: [`ProductVariants`](#type-aliasesproductvariantsmd)
996
1029
 
1030
+ 商品のバリエーション一覧
1031
+
997
1032
 
998
1033
  <a name="type-aliasesproductvariantmd"></a>
999
1034
 
@@ -1019,14 +1054,26 @@ ProductVariant は商品のバリエーションを表す。
1019
1054
 
1020
1055
  > **inventoryItem**: [`InventoryItem`](#type-aliasesinventoryitemmd)
1021
1056
 
1057
+ 在庫情報
1058
+
1022
1059
  #### isBackOrderEnable
1023
1060
 
1024
1061
  > **isBackOrderEnable**: `boolean`
1025
1062
 
1063
+ 予約販売が設定されている場合にtrueが返る
1064
+
1065
+ #### isLocalPickupAvailable
1066
+
1067
+ > **isLocalPickupAvailable**: `boolean`
1068
+
1069
+ 商品の店舗受取が可能な場合にtrueが返る
1070
+
1026
1071
  #### title
1027
1072
 
1028
1073
  > **title**: `string`
1029
1074
 
1075
+ 商品バリエーションのタイトル
1076
+
1030
1077
 
1031
1078
  <a name="type-aliasesproductvariantsmd"></a>
1032
1079
 
@@ -120,6 +120,7 @@ declare type Location_2 = {
120
120
  name: string;
121
121
  phone: string;
122
122
  mapURL?: string;
123
+ tags: string[];
123
124
  address?: Address;
124
125
  };
125
126
  export { Location_2 as Location }
@@ -265,7 +266,21 @@ export declare type Points = {
265
266
  */
266
267
  export declare type Product = {
267
268
  id: string;
269
+ /**
270
+ * 商品のタイトル
271
+ */
268
272
  title: string;
273
+ /**
274
+ * 商品が持つバリエーションに1つでも予約販売設定がされている場合trueが返る
275
+ */
276
+ hasBackOrderProductVariants: boolean;
277
+ /**
278
+ * 商品の店舗受取が可能な場合にtrueが返る
279
+ */
280
+ isLocalPickupAvailable: boolean;
281
+ /**
282
+ * 商品のバリエーション一覧
283
+ */
269
284
  variants: ProductVariants;
270
285
  };
271
286
 
@@ -274,8 +289,21 @@ export declare type Product = {
274
289
  */
275
290
  export declare type ProductVariant = {
276
291
  id: string;
292
+ /**
293
+ * 商品バリエーションのタイトル
294
+ */
277
295
  title: string;
296
+ /**
297
+ * 予約販売が設定されている場合にtrueが返る
298
+ */
278
299
  isBackOrderEnable: boolean;
300
+ /**
301
+ * 商品の店舗受取が可能な場合にtrueが返る
302
+ */
303
+ isLocalPickupAvailable: boolean;
304
+ /**
305
+ * 在庫情報
306
+ */
279
307
  inventoryItem: InventoryItem;
280
308
  };
281
309
 
@@ -380,11 +408,13 @@ export declare class SDK {
380
408
  /**
381
409
  * getLocations は ShopifyIntegration に紐づく LocationGroup の Location の一覧を取得します。
382
410
  *
411
+ * @param {string} [tag] 取得したいLocationのタグ。
412
+ * @param {string[]} [provinceCodes] 取得したいLocationの都道府県コード。
383
413
  * @param {number} [first] 取得してくる個数。デフォルトは250。
384
414
  * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
385
415
  * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
386
416
  */
387
- getLocations(first?: number, after?: string, isReverse?: boolean): Promise<Locations>;
417
+ getLocations(tag?: string, provinceCodes?: string[], first?: number, after?: string, isReverse?: boolean): Promise<Locations>;
388
418
  /**
389
419
  * getPurchasingCustomerDiscounts は購入者の割引情報を返します。
390
420
  *