@builtbystack/sq-shopify-theme-sdk 0.0.22 → 0.0.24
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 +219 -0
- package/dist/sq-shopify-theme-sdk.d.ts +75 -0
- package/dist/sq-shopify-theme-sdk.js +1277 -1207
- package/dist/sq-shopify-theme-sdk.umd.js +55 -32
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,6 +51,46 @@ SDKは名前空間 `SQ` 内に存在するため、SDKの初期化は `new SQ.SD
|
|
|
51
51
|
|
|
52
52
|
### Methods
|
|
53
53
|
|
|
54
|
+
#### getEstimatedShopifyCartLineItemPoint()
|
|
55
|
+
|
|
56
|
+
> **getEstimatedShopifyCartLineItemPoint**(`currencyCode`, `taxesIncluded`, `sku`, `quantity`, `unitPrice`): `Promise`\<`null` \| [`EstimatedPoint`](#type-aliasesestimatedpointmd)\>
|
|
57
|
+
|
|
58
|
+
##### Parameters
|
|
59
|
+
|
|
60
|
+
• **currencyCode**: [`CurrencyCode`](#enumerationscurrencycodemd)
|
|
61
|
+
|
|
62
|
+
• **taxesIncluded**: `boolean`
|
|
63
|
+
|
|
64
|
+
• **sku**: `string`
|
|
65
|
+
|
|
66
|
+
• **quantity**: `number`
|
|
67
|
+
|
|
68
|
+
• **unitPrice**: `string`
|
|
69
|
+
|
|
70
|
+
##### Returns
|
|
71
|
+
|
|
72
|
+
`Promise`\<`null` \| [`EstimatedPoint`](#type-aliasesestimatedpointmd)\>
|
|
73
|
+
|
|
74
|
+
***
|
|
75
|
+
|
|
76
|
+
#### getEstimatedShopifyCartPoint()
|
|
77
|
+
|
|
78
|
+
> **getEstimatedShopifyCartPoint**(`currencyCode`, `taxesIncluded`, `lineItems`): `Promise`\<`null` \| [`EstimatedPoint`](#type-aliasesestimatedpointmd)\>
|
|
79
|
+
|
|
80
|
+
##### Parameters
|
|
81
|
+
|
|
82
|
+
• **currencyCode**: [`CurrencyCode`](#enumerationscurrencycodemd)
|
|
83
|
+
|
|
84
|
+
• **taxesIncluded**: `boolean`
|
|
85
|
+
|
|
86
|
+
• **lineItems**: [`CartLineItem`](#type-aliasescartlineitemmd)[]
|
|
87
|
+
|
|
88
|
+
##### Returns
|
|
89
|
+
|
|
90
|
+
`Promise`\<`null` \| [`EstimatedPoint`](#type-aliasesestimatedpointmd)\>
|
|
91
|
+
|
|
92
|
+
***
|
|
93
|
+
|
|
54
94
|
#### getLocationAvailabilities()
|
|
55
95
|
|
|
56
96
|
> **getLocationAvailabilities**(`sku`, `first`?, `after`?, `isReverse`?): `Promise`\<[`LocationAvailabilities`](#type-aliaseslocationavailabilitiesmd)\>
|
|
@@ -137,6 +177,16 @@ getLocations は ShopifyIntegration に紐づく LocationGroup の Location の
|
|
|
137
177
|
|
|
138
178
|
***
|
|
139
179
|
|
|
180
|
+
#### getPointCampaignOrderRuleTargetCustomerRank()
|
|
181
|
+
|
|
182
|
+
> **getPointCampaignOrderRuleTargetCustomerRank**(): `Promise`\<`null` \| [`PointCampaignOrderRuleTargetCustomerRank`](#type-aliasespointcampaignorderruletargetcustomerrankmd)\>
|
|
183
|
+
|
|
184
|
+
##### Returns
|
|
185
|
+
|
|
186
|
+
`Promise`\<`null` \| [`PointCampaignOrderRuleTargetCustomerRank`](#type-aliasespointcampaignorderruletargetcustomerrankmd)\>
|
|
187
|
+
|
|
188
|
+
***
|
|
189
|
+
|
|
140
190
|
#### getPointChangeActivities()
|
|
141
191
|
|
|
142
192
|
> **getPointChangeActivities**(`first`?, `after`?, `isReverse`?, `sortKeys`?): `Promise`\<`null` \| [`PointChangeActivities`](#type-aliasespointchangeactivitiesmd)\>
|
|
@@ -327,6 +377,39 @@ purchasingCustomerSendCustomerSharingActivationCode はログインしている
|
|
|
327
377
|
|
|
328
378
|
`Promise`\<`null` \| [`CustomerSharingActivationCode`](#type-aliasescustomersharingactivationcodemd)\>
|
|
329
379
|
|
|
380
|
+
# Enumerations
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
<a name="enumerationscurrencycodemd"></a>
|
|
384
|
+
|
|
385
|
+
[**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
|
|
386
|
+
|
|
387
|
+
***
|
|
388
|
+
|
|
389
|
+
[@builtbystack/sq-shopify-theme-sdk](#globalsmd) / CurrencyCode
|
|
390
|
+
|
|
391
|
+
## Enumeration: CurrencyCode
|
|
392
|
+
|
|
393
|
+
CurrencyCode は通貨コードを表す
|
|
394
|
+
|
|
395
|
+
### Enumeration Members
|
|
396
|
+
|
|
397
|
+
#### Eur
|
|
398
|
+
|
|
399
|
+
> **Eur**: `"EUR"`
|
|
400
|
+
|
|
401
|
+
***
|
|
402
|
+
|
|
403
|
+
#### Jpy
|
|
404
|
+
|
|
405
|
+
> **Jpy**: `"JPY"`
|
|
406
|
+
|
|
407
|
+
***
|
|
408
|
+
|
|
409
|
+
#### Usd
|
|
410
|
+
|
|
411
|
+
> **Usd**: `"USD"`
|
|
412
|
+
|
|
330
413
|
|
|
331
414
|
<a name="globalsmd"></a>
|
|
332
415
|
|
|
@@ -336,6 +419,10 @@ purchasingCustomerSendCustomerSharingActivationCode はログインしている
|
|
|
336
419
|
|
|
337
420
|
# @builtbystack/sq-shopify-theme-sdk
|
|
338
421
|
|
|
422
|
+
## Enumerations
|
|
423
|
+
|
|
424
|
+
- [CurrencyCode](#enumerationscurrencycodemd)
|
|
425
|
+
|
|
339
426
|
## Classes
|
|
340
427
|
|
|
341
428
|
- [SDK](#classessdkmd)
|
|
@@ -343,17 +430,21 @@ purchasingCustomerSendCustomerSharingActivationCode はログインしている
|
|
|
343
430
|
## Type Aliases
|
|
344
431
|
|
|
345
432
|
- [Address](#type-aliasesaddressmd)
|
|
433
|
+
- [CartLineItem](#type-aliasescartlineitemmd)
|
|
346
434
|
- [CustomerRank](#type-aliasescustomerrankmd)
|
|
347
435
|
- [CustomerRankCalculationCondition](#type-aliasescustomerrankcalculationconditionmd)
|
|
348
436
|
- [CustomerRankCalculationPeriod](#type-aliasescustomerrankcalculationperiodmd)
|
|
349
437
|
- [CustomerRankRule](#type-aliasescustomerrankrulemd)
|
|
350
438
|
- [CustomerSharingActivationCode](#type-aliasescustomersharingactivationcodemd)
|
|
439
|
+
- [EstimatedPoint](#type-aliasesestimatedpointmd)
|
|
351
440
|
- [InventoryItem](#type-aliasesinventoryitemmd)
|
|
352
441
|
- [Location](#type-aliaseslocationmd)
|
|
353
442
|
- [LocationAvailabilities](#type-aliaseslocationavailabilitiesmd)
|
|
354
443
|
- [LocationAvailability](#type-aliaseslocationavailabilitymd)
|
|
355
444
|
- [Locations](#type-aliaseslocationsmd)
|
|
356
445
|
- [PageInfo](#type-aliasespageinfomd)
|
|
446
|
+
- [PointCampaignOrderRule](#type-aliasespointcampaignorderrulemd)
|
|
447
|
+
- [PointCampaignOrderRuleTargetCustomerRank](#type-aliasespointcampaignorderruletargetcustomerrankmd)
|
|
357
448
|
- [PointChange](#type-aliasespointchangemd)
|
|
358
449
|
- [PointChangeActivities](#type-aliasespointchangeactivitiesmd)
|
|
359
450
|
- [PointChangeActivity](#type-aliasespointchangeactivitymd)
|
|
@@ -425,6 +516,41 @@ Address はLocationの住所を表す。
|
|
|
425
516
|
> **provinceCode**: `string`
|
|
426
517
|
|
|
427
518
|
|
|
519
|
+
<a name="type-aliasescartlineitemmd"></a>
|
|
520
|
+
|
|
521
|
+
[**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
|
|
522
|
+
|
|
523
|
+
***
|
|
524
|
+
|
|
525
|
+
[@builtbystack/sq-shopify-theme-sdk](#globalsmd) / CartLineItem
|
|
526
|
+
|
|
527
|
+
## Type Alias: CartLineItem
|
|
528
|
+
|
|
529
|
+
> **CartLineItem**: `object`
|
|
530
|
+
|
|
531
|
+
CartLineItem はカートの商品明細情報を表す
|
|
532
|
+
|
|
533
|
+
### Type declaration
|
|
534
|
+
|
|
535
|
+
#### quantity
|
|
536
|
+
|
|
537
|
+
> **quantity**: `number`
|
|
538
|
+
|
|
539
|
+
商品の数量
|
|
540
|
+
|
|
541
|
+
#### sku
|
|
542
|
+
|
|
543
|
+
> **sku**: `string`
|
|
544
|
+
|
|
545
|
+
商品のSKU
|
|
546
|
+
|
|
547
|
+
#### unitPrice
|
|
548
|
+
|
|
549
|
+
> **unitPrice**: `string`
|
|
550
|
+
|
|
551
|
+
商品の単価
|
|
552
|
+
|
|
553
|
+
|
|
428
554
|
<a name="type-aliasescustomerrankmd"></a>
|
|
429
555
|
|
|
430
556
|
[**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
|
|
@@ -614,6 +740,27 @@ CustomerRankRule は会員ランクのルールを表す。
|
|
|
614
740
|
> **purchasingCustomer**: [`PurchasingCustomer`](#type-aliasespurchasingcustomermd)
|
|
615
741
|
|
|
616
742
|
|
|
743
|
+
<a name="type-aliasesestimatedpointmd"></a>
|
|
744
|
+
|
|
745
|
+
[**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
|
|
746
|
+
|
|
747
|
+
***
|
|
748
|
+
|
|
749
|
+
[@builtbystack/sq-shopify-theme-sdk](#globalsmd) / EstimatedPoint
|
|
750
|
+
|
|
751
|
+
## Type Alias: EstimatedPoint
|
|
752
|
+
|
|
753
|
+
> **EstimatedPoint**: `object`
|
|
754
|
+
|
|
755
|
+
EstimatedPoint は獲得予想ポイントを表す
|
|
756
|
+
|
|
757
|
+
### Type declaration
|
|
758
|
+
|
|
759
|
+
#### pointsEarned
|
|
760
|
+
|
|
761
|
+
> **pointsEarned**: `number`
|
|
762
|
+
|
|
763
|
+
|
|
617
764
|
<a name="type-aliasesinventoryitemmd"></a>
|
|
618
765
|
|
|
619
766
|
[**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
|
|
@@ -801,6 +948,78 @@ hasPreviousPage は前のページがあるかどうかを表す。
|
|
|
801
948
|
startCursor は一覧の先頭のカーソルを表す。
|
|
802
949
|
|
|
803
950
|
|
|
951
|
+
<a name="type-aliasespointcampaignorderrulemd"></a>
|
|
952
|
+
|
|
953
|
+
[**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
|
|
954
|
+
|
|
955
|
+
***
|
|
956
|
+
|
|
957
|
+
[@builtbystack/sq-shopify-theme-sdk](#globalsmd) / PointCampaignOrderRule
|
|
958
|
+
|
|
959
|
+
## Type Alias: PointCampaignOrderRule
|
|
960
|
+
|
|
961
|
+
> **PointCampaignOrderRule**: `object`
|
|
962
|
+
|
|
963
|
+
PointCampaignOrderRule はポイントキャンペーンの設定を表す。
|
|
964
|
+
|
|
965
|
+
### Type declaration
|
|
966
|
+
|
|
967
|
+
#### id
|
|
968
|
+
|
|
969
|
+
> **id**: `string`
|
|
970
|
+
|
|
971
|
+
#### title
|
|
972
|
+
|
|
973
|
+
> **title**: `string`
|
|
974
|
+
|
|
975
|
+
キャンペーンのタイトル
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
<a name="type-aliasespointcampaignorderruletargetcustomerrankmd"></a>
|
|
979
|
+
|
|
980
|
+
[**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
|
|
981
|
+
|
|
982
|
+
***
|
|
983
|
+
|
|
984
|
+
[@builtbystack/sq-shopify-theme-sdk](#globalsmd) / PointCampaignOrderRuleTargetCustomerRank
|
|
985
|
+
|
|
986
|
+
## Type Alias: PointCampaignOrderRuleTargetCustomerRank
|
|
987
|
+
|
|
988
|
+
> **PointCampaignOrderRuleTargetCustomerRank**: `object`
|
|
989
|
+
|
|
990
|
+
PointCampaignOrderRuleTargetCustomerRank は会員ランク種別のポイントキャンペーンの設定を表す。
|
|
991
|
+
以下の場合はnullを返す
|
|
992
|
+
- 開催期間中であるキャンペーンが存在しない場合
|
|
993
|
+
- 存在するが種別が会員ランクではない場合
|
|
994
|
+
- 未ログインの場合
|
|
995
|
+
|
|
996
|
+
### Type declaration
|
|
997
|
+
|
|
998
|
+
#### fixedPoint?
|
|
999
|
+
|
|
1000
|
+
> `optional` **fixedPoint**: `string`
|
|
1001
|
+
|
|
1002
|
+
顧客に適用されるキャンペーン倍率
|
|
1003
|
+
以下の場合はnullを返す
|
|
1004
|
+
- 該当キャンペーンが存在しない場合
|
|
1005
|
+
- 未ログイン状態の場合
|
|
1006
|
+
- 計算方法が固定ポイントでない場合
|
|
1007
|
+
|
|
1008
|
+
#### multiplier?
|
|
1009
|
+
|
|
1010
|
+
> `optional` **multiplier**: `string`
|
|
1011
|
+
|
|
1012
|
+
顧客に適用されるキャンペーン倍率
|
|
1013
|
+
以下の場合はnullを返す
|
|
1014
|
+
- 該当キャンペーンが存在しない場合
|
|
1015
|
+
- 未ログイン状態の場合
|
|
1016
|
+
- 計算方法が倍率でない場合
|
|
1017
|
+
|
|
1018
|
+
#### pointCampaignOrderRule
|
|
1019
|
+
|
|
1020
|
+
> **pointCampaignOrderRule**: [`PointCampaignOrderRule`](#type-aliasespointcampaignorderrulemd)
|
|
1021
|
+
|
|
1022
|
+
|
|
804
1023
|
<a name="type-aliasespointchangemd"></a>
|
|
805
1024
|
|
|
806
1025
|
[**@builtbystack/sq-shopify-theme-sdk**](#readmemd) • **Docs**
|
|
@@ -13,6 +13,33 @@ export declare type Address = {
|
|
|
13
13
|
address2: string;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* CartLineItem はカートの商品明細情報を表す
|
|
18
|
+
*/
|
|
19
|
+
export declare type CartLineItem = {
|
|
20
|
+
/**
|
|
21
|
+
* 商品のSKU
|
|
22
|
+
*/
|
|
23
|
+
sku: string;
|
|
24
|
+
/**
|
|
25
|
+
* 商品の数量
|
|
26
|
+
*/
|
|
27
|
+
quantity: number;
|
|
28
|
+
/**
|
|
29
|
+
* 商品の単価
|
|
30
|
+
*/
|
|
31
|
+
unitPrice: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* CurrencyCode は通貨コードを表す
|
|
36
|
+
*/
|
|
37
|
+
export declare enum CurrencyCode {
|
|
38
|
+
Eur = "EUR",
|
|
39
|
+
Jpy = "JPY",
|
|
40
|
+
Usd = "USD"
|
|
41
|
+
}
|
|
42
|
+
|
|
16
43
|
/**
|
|
17
44
|
* CustomerRank は会員ランクを表す。
|
|
18
45
|
*/
|
|
@@ -104,6 +131,13 @@ export declare type CustomerSharingActivationCode = {
|
|
|
104
131
|
customerSharingActivationCodeID: string;
|
|
105
132
|
};
|
|
106
133
|
|
|
134
|
+
/**
|
|
135
|
+
* EstimatedPoint は獲得予想ポイントを表す
|
|
136
|
+
*/
|
|
137
|
+
export declare type EstimatedPoint = {
|
|
138
|
+
pointsEarned: number;
|
|
139
|
+
};
|
|
140
|
+
|
|
107
141
|
/**
|
|
108
142
|
* InventoryItem は在庫情報を表す。
|
|
109
143
|
*/
|
|
@@ -178,6 +212,44 @@ export declare type PageInfo = {
|
|
|
178
212
|
hasPreviousPage: boolean;
|
|
179
213
|
};
|
|
180
214
|
|
|
215
|
+
/**
|
|
216
|
+
* PointCampaignOrderRule はポイントキャンペーンの設定を表す。
|
|
217
|
+
*/
|
|
218
|
+
export declare type PointCampaignOrderRule = {
|
|
219
|
+
id: string;
|
|
220
|
+
/**
|
|
221
|
+
* キャンペーンのタイトル
|
|
222
|
+
*/
|
|
223
|
+
title: string;
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* PointCampaignOrderRuleTargetCustomerRank は会員ランク種別のポイントキャンペーンの設定を表す。
|
|
228
|
+
* 以下の場合はnullを返す
|
|
229
|
+
* - 開催期間中であるキャンペーンが存在しない場合
|
|
230
|
+
* - 存在するが種別が会員ランクではない場合
|
|
231
|
+
* - 未ログインの場合
|
|
232
|
+
*/
|
|
233
|
+
export declare type PointCampaignOrderRuleTargetCustomerRank = {
|
|
234
|
+
pointCampaignOrderRule: PointCampaignOrderRule;
|
|
235
|
+
/**
|
|
236
|
+
* 顧客に適用されるキャンペーン倍率
|
|
237
|
+
* 以下の場合はnullを返す
|
|
238
|
+
* - 該当キャンペーンが存在しない場合
|
|
239
|
+
* - 未ログイン状態の場合
|
|
240
|
+
* - 計算方法が倍率でない場合
|
|
241
|
+
*/
|
|
242
|
+
multiplier?: string;
|
|
243
|
+
/**
|
|
244
|
+
* 顧客に適用されるキャンペーン倍率
|
|
245
|
+
* 以下の場合はnullを返す
|
|
246
|
+
* - 該当キャンペーンが存在しない場合
|
|
247
|
+
* - 未ログイン状態の場合
|
|
248
|
+
* - 計算方法が固定ポイントでない場合
|
|
249
|
+
*/
|
|
250
|
+
fixedPoint?: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
181
253
|
/**
|
|
182
254
|
* PointChange はポイントの変動を表す。
|
|
183
255
|
*/
|
|
@@ -450,6 +522,9 @@ export declare class SDK {
|
|
|
450
522
|
*/
|
|
451
523
|
getPurchasingCustomerSharing(): Promise<PurchasingCustomerSharing | null>;
|
|
452
524
|
getProduct(id: string, first?: number, after?: string, isReverse?: boolean, sortKeys?: ProductVariantSortKeys): Promise<Product | null>;
|
|
525
|
+
getPointCampaignOrderRuleTargetCustomerRank(): Promise<PointCampaignOrderRuleTargetCustomerRank | null>;
|
|
526
|
+
getEstimatedShopifyCartPoint(currencyCode: CurrencyCode, taxesIncluded: boolean, lineItems: CartLineItem[]): Promise<EstimatedPoint | null>;
|
|
527
|
+
getEstimatedShopifyCartLineItemPoint(currencyCode: CurrencyCode, taxesIncluded: boolean, sku: string, quantity: number, unitPrice: string): Promise<EstimatedPoint | null>;
|
|
453
528
|
/**
|
|
454
529
|
* purchasingCustomerSendCustomerSharingActivationCode はログインしているアカウントのメールアドレスに顧客情報共有のためのアクティベーションコードを送信します。
|
|
455
530
|
*/
|