@builtbystack/sq-shopify-theme-sdk 0.0.8 → 0.0.10
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 +82 -1
- package/dist/sq-shopify-theme-sdk.d.ts +87 -3
- package/dist/sq-shopify-theme-sdk.js +138 -113
- package/dist/sq-shopify-theme-sdk.umd.js +35 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -177,6 +177,18 @@ getPurchasingCustomerCurrentRank は購入者の現在のランク情報を返
|
|
|
177
177
|
|
|
178
178
|
***
|
|
179
179
|
|
|
180
|
+
#### getPurchasingCustomerDiscountCodeCount()
|
|
181
|
+
|
|
182
|
+
> **getPurchasingCustomerDiscountCodeCount**(): `Promise`\<`number`\>
|
|
183
|
+
|
|
184
|
+
getPurchasingCustomerDiscountCodeCount は顧客に紐付くDiscountCodeの数を返します。
|
|
185
|
+
|
|
186
|
+
##### Returns
|
|
187
|
+
|
|
188
|
+
`Promise`\<`number`\>
|
|
189
|
+
|
|
190
|
+
***
|
|
191
|
+
|
|
180
192
|
#### getPurchasingCustomerDiscounts()
|
|
181
193
|
|
|
182
194
|
> **getPurchasingCustomerDiscounts**(`first`?, `after`?, `isReverse`?): `Promise`\<`null` \| [`PurchasingCustomerDiscounts`](#type-aliasespurchasingcustomerdiscountsmd)\>
|
|
@@ -334,14 +346,20 @@ CustomerRank は会員ランクを表す。
|
|
|
334
346
|
|
|
335
347
|
> **calculationCondition**: [`CustomerRankCalculationCondition`](#type-aliasescustomerrankcalculationconditionmd)
|
|
336
348
|
|
|
349
|
+
この会員ランクを算出した際の条件
|
|
350
|
+
|
|
337
351
|
#### earnedPointToRankUp
|
|
338
352
|
|
|
339
353
|
> **earnedPointToRankUp**: `number`
|
|
340
354
|
|
|
355
|
+
ランクアップするために必要な残り獲得ポイント
|
|
356
|
+
|
|
341
357
|
#### higherRank?
|
|
342
358
|
|
|
343
359
|
> `optional` **higherRank**: [`CustomerRankRule`](#type-aliasescustomerrankrulemd)
|
|
344
360
|
|
|
361
|
+
この会員ランクの一段階上の会員ランク。上の会員ランクが存在しない場合はnull
|
|
362
|
+
|
|
345
363
|
#### id
|
|
346
364
|
|
|
347
365
|
> **id**: `string`
|
|
@@ -350,22 +368,32 @@ CustomerRank は会員ランクを表す。
|
|
|
350
368
|
|
|
351
369
|
> `optional` **lowerRank**: [`CustomerRankRule`](#type-aliasescustomerrankrulemd)
|
|
352
370
|
|
|
371
|
+
この会員ランクの一段階下の会員ランク。下の会員ランクが存在しない場合はnull
|
|
372
|
+
|
|
353
373
|
#### name
|
|
354
374
|
|
|
355
375
|
> **name**: `string`
|
|
356
376
|
|
|
377
|
+
会員ランク名
|
|
378
|
+
|
|
357
379
|
#### pointMultiplier?
|
|
358
380
|
|
|
359
381
|
> `optional` **pointMultiplier**: [`PointMultiplierCustomerRankRule`](#type-aliasespointmultipliercustomerrankrulemd)
|
|
360
382
|
|
|
383
|
+
この会員ランクの注文時ポイント倍率。ポイント設定がなかったり、ポイント設定があってもポイント倍率設定がなければnullが返る
|
|
384
|
+
|
|
361
385
|
#### purchasePriceToRankUp
|
|
362
386
|
|
|
363
387
|
> **purchasePriceToRankUp**: `number`
|
|
364
388
|
|
|
389
|
+
ランクアップするために必要な残り購入金額
|
|
390
|
+
|
|
365
391
|
#### threshold
|
|
366
392
|
|
|
367
393
|
> **threshold**: `number`
|
|
368
394
|
|
|
395
|
+
この会員ランクへのランクアップに必要な値。会員ランクの算出方法によりthresholdが指す値は異なり、獲得ポイントと購入金額のどちらかになる
|
|
396
|
+
|
|
369
397
|
|
|
370
398
|
<a name="type-aliasescustomerrankcalculationconditionmd"></a>
|
|
371
399
|
|
|
@@ -387,14 +415,20 @@ CustomerRankCalculationCondition は会員ランクの算出条件を表す。
|
|
|
387
415
|
|
|
388
416
|
> `optional` **customerRankCalculationPeriod**: [`CustomerRankCalculationPeriod`](#type-aliasescustomerrankcalculationperiodmd)
|
|
389
417
|
|
|
418
|
+
会員ランク算出期間。期間が無期限の場合はnullを返す
|
|
419
|
+
|
|
390
420
|
#### earnedPoint
|
|
391
421
|
|
|
392
422
|
> **earnedPoint**: `number`
|
|
393
423
|
|
|
424
|
+
会員ランクの算出根拠となる獲得ポイント
|
|
425
|
+
|
|
394
426
|
#### purchasePrice
|
|
395
427
|
|
|
396
428
|
> **purchasePrice**: `number`
|
|
397
429
|
|
|
430
|
+
会員ランクの算出根拠となる購入金額
|
|
431
|
+
|
|
398
432
|
|
|
399
433
|
<a name="type-aliasescustomerrankcalculationperiodmd"></a>
|
|
400
434
|
|
|
@@ -416,10 +450,14 @@ CustomerRankCalculationPeriod は会員ランクの算出期間を表す。
|
|
|
416
450
|
|
|
417
451
|
> **end**: `Date`
|
|
418
452
|
|
|
453
|
+
集計期間終了日
|
|
454
|
+
|
|
419
455
|
#### start
|
|
420
456
|
|
|
421
457
|
> **start**: `Date`
|
|
422
458
|
|
|
459
|
+
集計期間開始日
|
|
460
|
+
|
|
423
461
|
|
|
424
462
|
<a name="type-aliasescustomerrankrulemd"></a>
|
|
425
463
|
|
|
@@ -445,10 +483,14 @@ CustomerRankRule は会員ランクのルールを表す。
|
|
|
445
483
|
|
|
446
484
|
> **name**: `string`
|
|
447
485
|
|
|
486
|
+
会員ランク名
|
|
487
|
+
|
|
448
488
|
#### threshold
|
|
449
489
|
|
|
450
490
|
> **threshold**: `number`
|
|
451
491
|
|
|
492
|
+
この会員ランクへのランクアップに必要な値。会員ランクの算出方法によりthresholdが指す値は異なり、獲得ポイントと購入金額のどちらかになる。
|
|
493
|
+
|
|
452
494
|
|
|
453
495
|
<a name="type-aliaseslocationmd"></a>
|
|
454
496
|
|
|
@@ -624,22 +666,33 @@ PointChange はポイントの変動を表す。
|
|
|
624
666
|
|
|
625
667
|
> `optional` **availableAt**: `Date`
|
|
626
668
|
|
|
669
|
+
ポイントが利用可能になる日時。nilの場合はまだ利用可能になる日時が決まっていない。主に未配送注文に関するポイントはnilになる。
|
|
670
|
+
|
|
627
671
|
#### availableUntil?
|
|
628
672
|
|
|
629
673
|
> `optional` **availableUntil**: `Date`
|
|
630
674
|
|
|
675
|
+
ポイントが利用できる期限。失効する直前を表すため、expiresDateから1ナノ秒を引いた値となる。
|
|
676
|
+
例えば、expiresDateが 2024-06-12 00:00:00 なら、availableUntilは 2024-06-11 23:59:59.999999999 となる。
|
|
677
|
+
|
|
631
678
|
#### createdAt
|
|
632
679
|
|
|
633
680
|
> **createdAt**: `Date`
|
|
634
681
|
|
|
682
|
+
PointChangeのコミットタイムスタンプ
|
|
683
|
+
|
|
635
684
|
#### delta
|
|
636
685
|
|
|
637
686
|
> **delta**: `number`
|
|
638
687
|
|
|
688
|
+
ポイント変動の数値。正負どちらの値も取りうる。
|
|
689
|
+
|
|
639
690
|
#### expiresDate?
|
|
640
691
|
|
|
641
692
|
> `optional` **expiresDate**: `Date`
|
|
642
693
|
|
|
694
|
+
ポイントの失効日。nilの場合はまだ失効日が決まっていない。ポイント消費や、未配送注文に関するポイントはnilになる。
|
|
695
|
+
|
|
643
696
|
#### id
|
|
644
697
|
|
|
645
698
|
> **id**: `string`
|
|
@@ -648,6 +701,8 @@ PointChange はポイントの変動を表す。
|
|
|
648
701
|
|
|
649
702
|
> **pointChangeCreatedAt**: `Date`
|
|
650
703
|
|
|
704
|
+
ポイントの発生日時
|
|
705
|
+
|
|
651
706
|
|
|
652
707
|
<a name="type-aliasespointchangeactivitiesmd"></a>
|
|
653
708
|
|
|
@@ -661,6 +716,8 @@ PointChange はポイントの変動を表す。
|
|
|
661
716
|
|
|
662
717
|
> **PointChangeActivities**: `object`
|
|
663
718
|
|
|
719
|
+
PointChangeActivities はポイントの変動の履歴一覧を表す。
|
|
720
|
+
|
|
664
721
|
### Type declaration
|
|
665
722
|
|
|
666
723
|
#### nodes
|
|
@@ -750,10 +807,14 @@ Points は SDK から取得できるポイントの情報を表す。
|
|
|
750
807
|
|
|
751
808
|
> **pointsApproved**: `number`
|
|
752
809
|
|
|
810
|
+
PointsApproved は保有ポイントを表す。
|
|
811
|
+
|
|
753
812
|
#### pointsPending
|
|
754
813
|
|
|
755
814
|
> **pointsPending**: `number`
|
|
756
815
|
|
|
816
|
+
PointsPending は獲得予定ポイントを表す。
|
|
817
|
+
|
|
757
818
|
|
|
758
819
|
<a name="type-aliasespurchasingcustomerdiscountmd"></a>
|
|
759
820
|
|
|
@@ -779,14 +840,34 @@ PurchasingCustomerDiscount は購入者の割引情報を表す。
|
|
|
779
840
|
|
|
780
841
|
> **createdAt**: `Date`
|
|
781
842
|
|
|
843
|
+
#### customerApplicable
|
|
844
|
+
|
|
845
|
+
> **customerApplicable**: `boolean`
|
|
846
|
+
|
|
847
|
+
Discountがこの顧客で有効かどうかを表す。
|
|
848
|
+
|
|
782
849
|
#### description
|
|
783
850
|
|
|
784
851
|
> **description**: `string`
|
|
785
852
|
|
|
853
|
+
#### endsAt
|
|
854
|
+
|
|
855
|
+
> **endsAt**: `Date`
|
|
856
|
+
|
|
786
857
|
#### id
|
|
787
858
|
|
|
788
859
|
> **id**: `string`
|
|
789
860
|
|
|
861
|
+
#### startsAt
|
|
862
|
+
|
|
863
|
+
> **startsAt**: `Date`
|
|
864
|
+
|
|
865
|
+
#### status
|
|
866
|
+
|
|
867
|
+
> **status**: `string`
|
|
868
|
+
|
|
869
|
+
Discountのステータス。"ACTIVE", "SCHEDULED", "EXPIRED" のいずれかが入る。
|
|
870
|
+
|
|
790
871
|
#### title
|
|
791
872
|
|
|
792
873
|
> **title**: `string`
|
|
@@ -808,7 +889,7 @@ PurchasingCustomerDiscount は購入者の割引情報を表す。
|
|
|
808
889
|
|
|
809
890
|
> **PurchasingCustomerDiscounts**: `object`
|
|
810
891
|
|
|
811
|
-
|
|
892
|
+
PurchasingCustomerDiscounts は PurchasingCustomerDiscount の一覧を取得するための情報を表す。
|
|
812
893
|
|
|
813
894
|
### Type declaration
|
|
814
895
|
|
|
@@ -18,13 +18,37 @@ export declare type Address = {
|
|
|
18
18
|
*/
|
|
19
19
|
export declare type CustomerRank = {
|
|
20
20
|
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* 会員ランク名
|
|
23
|
+
*/
|
|
21
24
|
name: string;
|
|
25
|
+
/**
|
|
26
|
+
* この会員ランクを算出した際の条件
|
|
27
|
+
*/
|
|
22
28
|
calculationCondition: CustomerRankCalculationCondition;
|
|
29
|
+
/**
|
|
30
|
+
* ランクアップするために必要な残り獲得ポイント
|
|
31
|
+
*/
|
|
23
32
|
earnedPointToRankUp: number;
|
|
33
|
+
/**
|
|
34
|
+
* この会員ランクの一段階上の会員ランク。上の会員ランクが存在しない場合はnull
|
|
35
|
+
*/
|
|
24
36
|
higherRank?: CustomerRankRule;
|
|
37
|
+
/**
|
|
38
|
+
* この会員ランクの一段階下の会員ランク。下の会員ランクが存在しない場合はnull
|
|
39
|
+
*/
|
|
25
40
|
lowerRank?: CustomerRankRule;
|
|
41
|
+
/**
|
|
42
|
+
* ランクアップするために必要な残り購入金額
|
|
43
|
+
*/
|
|
26
44
|
purchasePriceToRankUp: number;
|
|
45
|
+
/**
|
|
46
|
+
* この会員ランクへのランクアップに必要な値。会員ランクの算出方法によりthresholdが指す値は異なり、獲得ポイントと購入金額のどちらかになる
|
|
47
|
+
*/
|
|
27
48
|
threshold: number;
|
|
49
|
+
/**
|
|
50
|
+
* この会員ランクの注文時ポイント倍率。ポイント設定がなかったり、ポイント設定があってもポイント倍率設定がなければnullが返る
|
|
51
|
+
*/
|
|
28
52
|
pointMultiplier?: PointMultiplierCustomerRankRule;
|
|
29
53
|
};
|
|
30
54
|
|
|
@@ -32,8 +56,17 @@ export declare type CustomerRank = {
|
|
|
32
56
|
* CustomerRankCalculationCondition は会員ランクの算出条件を表す。
|
|
33
57
|
*/
|
|
34
58
|
export declare type CustomerRankCalculationCondition = {
|
|
59
|
+
/**
|
|
60
|
+
* 会員ランク算出期間。期間が無期限の場合はnullを返す
|
|
61
|
+
*/
|
|
35
62
|
customerRankCalculationPeriod?: CustomerRankCalculationPeriod;
|
|
63
|
+
/**
|
|
64
|
+
* 会員ランクの算出根拠となる獲得ポイント
|
|
65
|
+
*/
|
|
36
66
|
earnedPoint: number;
|
|
67
|
+
/**
|
|
68
|
+
* 会員ランクの算出根拠となる購入金額
|
|
69
|
+
*/
|
|
37
70
|
purchasePrice: number;
|
|
38
71
|
};
|
|
39
72
|
|
|
@@ -41,7 +74,13 @@ export declare type CustomerRankCalculationCondition = {
|
|
|
41
74
|
* CustomerRankCalculationPeriod は会員ランクの算出期間を表す。
|
|
42
75
|
*/
|
|
43
76
|
export declare type CustomerRankCalculationPeriod = {
|
|
77
|
+
/**
|
|
78
|
+
* 集計期間開始日
|
|
79
|
+
*/
|
|
44
80
|
start: Date;
|
|
81
|
+
/**
|
|
82
|
+
* 集計期間終了日
|
|
83
|
+
*/
|
|
45
84
|
end: Date;
|
|
46
85
|
};
|
|
47
86
|
|
|
@@ -50,7 +89,13 @@ export declare type CustomerRankCalculationPeriod = {
|
|
|
50
89
|
*/
|
|
51
90
|
export declare type CustomerRankRule = {
|
|
52
91
|
id: string;
|
|
92
|
+
/**
|
|
93
|
+
* 会員ランク名
|
|
94
|
+
*/
|
|
53
95
|
name: string;
|
|
96
|
+
/**
|
|
97
|
+
* この会員ランクへのランクアップに必要な値。会員ランクの算出方法によりthresholdが指す値は異なり、獲得ポイントと購入金額のどちらかになる。
|
|
98
|
+
*/
|
|
54
99
|
threshold: number;
|
|
55
100
|
};
|
|
56
101
|
|
|
@@ -123,16 +168,35 @@ export declare type PageInfo = {
|
|
|
123
168
|
*/
|
|
124
169
|
export declare type PointChange = {
|
|
125
170
|
id: string;
|
|
171
|
+
/**
|
|
172
|
+
* ポイント変動の数値。正負どちらの値も取りうる。
|
|
173
|
+
*/
|
|
126
174
|
delta: number;
|
|
175
|
+
/**
|
|
176
|
+
* ポイントが利用可能になる日時。nilの場合はまだ利用可能になる日時が決まっていない。主に未配送注文に関するポイントはnilになる。
|
|
177
|
+
*/
|
|
127
178
|
availableAt?: Date;
|
|
179
|
+
/**
|
|
180
|
+
* ポイントが利用できる期限。失効する直前を表すため、expiresDateから1ナノ秒を引いた値となる。
|
|
181
|
+
* 例えば、expiresDateが 2024-06-12 00:00:00 なら、availableUntilは 2024-06-11 23:59:59.999999999 となる。
|
|
182
|
+
*/
|
|
128
183
|
availableUntil?: Date;
|
|
184
|
+
/**
|
|
185
|
+
* ポイントの失効日。nilの場合はまだ失効日が決まっていない。ポイント消費や、未配送注文に関するポイントはnilになる。
|
|
186
|
+
*/
|
|
129
187
|
expiresDate?: Date;
|
|
188
|
+
/**
|
|
189
|
+
* ポイントの発生日時
|
|
190
|
+
*/
|
|
130
191
|
pointChangeCreatedAt: Date;
|
|
192
|
+
/**
|
|
193
|
+
* PointChangeのコミットタイムスタンプ
|
|
194
|
+
*/
|
|
131
195
|
createdAt: Date;
|
|
132
196
|
};
|
|
133
197
|
|
|
134
198
|
/**
|
|
135
|
-
*
|
|
199
|
+
* PointChangeActivities はポイントの変動の履歴一覧を表す。
|
|
136
200
|
*/
|
|
137
201
|
export declare type PointChangeActivities = {
|
|
138
202
|
nodes: PointChangeActivity[];
|
|
@@ -154,7 +218,7 @@ declare enum PointChangeActivitySortKey {
|
|
|
154
218
|
}
|
|
155
219
|
|
|
156
220
|
/**
|
|
157
|
-
*
|
|
221
|
+
* PointMultiplierCustomerRankRule はこの会員ランクの注文時ポイント倍率を表す。
|
|
158
222
|
*/
|
|
159
223
|
export declare type PointMultiplierCustomerRankRule = {
|
|
160
224
|
id: string;
|
|
@@ -166,7 +230,13 @@ export declare type PointMultiplierCustomerRankRule = {
|
|
|
166
230
|
* Points は SDK から取得できるポイントの情報を表す。
|
|
167
231
|
*/
|
|
168
232
|
export declare type Points = {
|
|
233
|
+
/**
|
|
234
|
+
* PointsApproved は保有ポイントを表す。
|
|
235
|
+
*/
|
|
169
236
|
pointsApproved: number;
|
|
237
|
+
/**
|
|
238
|
+
* PointsPending は獲得予定ポイントを表す。
|
|
239
|
+
*/
|
|
170
240
|
pointsPending: number;
|
|
171
241
|
};
|
|
172
242
|
|
|
@@ -177,13 +247,23 @@ export declare type PurchasingCustomerDiscount = {
|
|
|
177
247
|
id: string;
|
|
178
248
|
title: string;
|
|
179
249
|
description: string;
|
|
250
|
+
/**
|
|
251
|
+
* Discountのステータス。"ACTIVE", "SCHEDULED", "EXPIRED" のいずれかが入る。
|
|
252
|
+
*/
|
|
253
|
+
status: string;
|
|
180
254
|
code: string;
|
|
255
|
+
/**
|
|
256
|
+
* Discountがこの顧客で有効かどうかを表す。
|
|
257
|
+
*/
|
|
258
|
+
customerApplicable: boolean;
|
|
259
|
+
startsAt: Date;
|
|
260
|
+
endsAt: Date;
|
|
181
261
|
createdAt: Date;
|
|
182
262
|
updatedAt: Date;
|
|
183
263
|
};
|
|
184
264
|
|
|
185
265
|
/**
|
|
186
|
-
*
|
|
266
|
+
* PurchasingCustomerDiscounts は PurchasingCustomerDiscount の一覧を取得するための情報を表す。
|
|
187
267
|
*/
|
|
188
268
|
export declare type PurchasingCustomerDiscounts = {
|
|
189
269
|
id: string;
|
|
@@ -261,6 +341,10 @@ export declare class SDK {
|
|
|
261
341
|
* getPurchasingCustomerCurrentRank は購入者の現在のランク情報を返します。
|
|
262
342
|
*/
|
|
263
343
|
getPurchasingCustomerCurrentRank(): Promise<CustomerRank | null>;
|
|
344
|
+
/**
|
|
345
|
+
* getPurchasingCustomerDiscountCodeCount は顧客に紐付くDiscountCodeの数を返します。
|
|
346
|
+
*/
|
|
347
|
+
getPurchasingCustomerDiscountCodeCount(): Promise<number>;
|
|
264
348
|
}
|
|
265
349
|
|
|
266
350
|
export { }
|