@wix/referral 1.0.4 → 1.0.5
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/build/cjs/context.d.ts +1 -0
- package/build/cjs/context.js +2 -1
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +2 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +1 -0
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +1 -0
- package/build/es/meta.js.map +1 -1
- package/package.json +3 -2
- package/type-bundles/context.bundle.d.ts +418 -68
- package/type-bundles/index.bundle.d.ts +733 -139
- package/type-bundles/meta.bundle.d.ts +754 -97
|
@@ -116,11 +116,11 @@ interface GetReferralEventResponse$1 {
|
|
|
116
116
|
}
|
|
117
117
|
interface QueryReferralEventRequest$1 {
|
|
118
118
|
/** Query to filter ReferralEvents. */
|
|
119
|
-
query: CursorQuery$
|
|
119
|
+
query: CursorQuery$7;
|
|
120
120
|
}
|
|
121
|
-
interface CursorQuery$
|
|
121
|
+
interface CursorQuery$7 extends CursorQueryPagingMethodOneOf$7 {
|
|
122
122
|
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
123
|
-
cursorPaging?: CursorPaging$
|
|
123
|
+
cursorPaging?: CursorPaging$7;
|
|
124
124
|
/**
|
|
125
125
|
* Filter object in the following format:
|
|
126
126
|
* `"filter" : {
|
|
@@ -134,24 +134,24 @@ interface CursorQuery$5 extends CursorQueryPagingMethodOneOf$5 {
|
|
|
134
134
|
* Sort object in the following format:
|
|
135
135
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
136
136
|
*/
|
|
137
|
-
sort?: Sorting$
|
|
137
|
+
sort?: Sorting$7[];
|
|
138
138
|
}
|
|
139
139
|
/** @oneof */
|
|
140
|
-
interface CursorQueryPagingMethodOneOf$
|
|
140
|
+
interface CursorQueryPagingMethodOneOf$7 {
|
|
141
141
|
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
142
|
-
cursorPaging?: CursorPaging$
|
|
142
|
+
cursorPaging?: CursorPaging$7;
|
|
143
143
|
}
|
|
144
|
-
interface Sorting$
|
|
144
|
+
interface Sorting$7 {
|
|
145
145
|
/** Name of the field to sort by. */
|
|
146
146
|
fieldName?: string;
|
|
147
147
|
/** Sort order. */
|
|
148
|
-
order?: SortOrder$
|
|
148
|
+
order?: SortOrder$7;
|
|
149
149
|
}
|
|
150
|
-
declare enum SortOrder$
|
|
150
|
+
declare enum SortOrder$7 {
|
|
151
151
|
ASC = "ASC",
|
|
152
152
|
DESC = "DESC"
|
|
153
153
|
}
|
|
154
|
-
interface CursorPaging$
|
|
154
|
+
interface CursorPaging$7 {
|
|
155
155
|
/** Maximum number of items to return in the results. */
|
|
156
156
|
limit?: number | null;
|
|
157
157
|
/**
|
|
@@ -166,13 +166,13 @@ interface QueryReferralEventResponse$1 {
|
|
|
166
166
|
/** List of ReferralEvents that match the query. */
|
|
167
167
|
referralEvents?: ReferralEvent$1[];
|
|
168
168
|
/** Paging metadata. */
|
|
169
|
-
metadata?: CursorPagingMetadata$
|
|
169
|
+
metadata?: CursorPagingMetadata$7;
|
|
170
170
|
}
|
|
171
|
-
interface CursorPagingMetadata$
|
|
171
|
+
interface CursorPagingMetadata$7 {
|
|
172
172
|
/** Number of items returned in the response. */
|
|
173
173
|
count?: number | null;
|
|
174
174
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
175
|
-
cursors?: Cursors$
|
|
175
|
+
cursors?: Cursors$7;
|
|
176
176
|
/**
|
|
177
177
|
* Whether there are more pages to retrieve following the current page.
|
|
178
178
|
*
|
|
@@ -181,7 +181,7 @@ interface CursorPagingMetadata$5 {
|
|
|
181
181
|
*/
|
|
182
182
|
hasNext?: boolean | null;
|
|
183
183
|
}
|
|
184
|
-
interface Cursors$
|
|
184
|
+
interface Cursors$7 {
|
|
185
185
|
/** Cursor string pointing to the next page in the list of results. */
|
|
186
186
|
next?: string | null;
|
|
187
187
|
/** Cursor pointing to the previous page in the list of results. */
|
|
@@ -199,7 +199,7 @@ interface GetReferralStatisticsResponse$1 {
|
|
|
199
199
|
}
|
|
200
200
|
interface QueryReferringCustomerTotalsRequest$1 {
|
|
201
201
|
/** Query to filter ReferringCustomerTotals. */
|
|
202
|
-
query?: CursorQuery$
|
|
202
|
+
query?: CursorQuery$7;
|
|
203
203
|
/** List of contact ids to filter ReferringCustomerTotals. */
|
|
204
204
|
contactIds?: string[];
|
|
205
205
|
}
|
|
@@ -207,7 +207,7 @@ interface QueryReferringCustomerTotalsResponse$1 {
|
|
|
207
207
|
/** List of ReferringCustomerTotals that match the query. */
|
|
208
208
|
referringCustomerTotals?: ReferringCustomerTotal$1[];
|
|
209
209
|
/** Paging metadata. */
|
|
210
|
-
metadata?: CursorPagingMetadata$
|
|
210
|
+
metadata?: CursorPagingMetadata$7;
|
|
211
211
|
}
|
|
212
212
|
interface ReferringCustomerTotal$1 {
|
|
213
213
|
/**
|
|
@@ -248,7 +248,7 @@ interface ReferringCustomerTotal$1 {
|
|
|
248
248
|
}
|
|
249
249
|
interface QueryReferredFriendActionsRequest$1 {
|
|
250
250
|
/** Query to filter ReferredFriendActions. */
|
|
251
|
-
query?: CursorQuery$
|
|
251
|
+
query?: CursorQuery$7;
|
|
252
252
|
/** List of contact ids to filter ReferredFriendActions. */
|
|
253
253
|
contactIds?: string[];
|
|
254
254
|
}
|
|
@@ -256,11 +256,11 @@ interface QueryReferredFriendActionsResponse$1 {
|
|
|
256
256
|
/** List of ReferredFriendActions that match the query. */
|
|
257
257
|
referredFriendActions?: ReferredFriendAction$1[];
|
|
258
258
|
/** Paging metadata. */
|
|
259
|
-
metadata?: CursorPagingMetadata$
|
|
259
|
+
metadata?: CursorPagingMetadata$7;
|
|
260
260
|
}
|
|
261
261
|
interface ReferredFriendAction$1 extends ReferredFriendActionRewardTypeOptionsOneOf$1 {
|
|
262
262
|
/** Coupon reward type options. */
|
|
263
|
-
coupon?: V1Coupon$
|
|
263
|
+
coupon?: V1Coupon$3;
|
|
264
264
|
/** Loyalty points reward type options. */
|
|
265
265
|
loyaltyPoints?: LoyaltyPoints$1;
|
|
266
266
|
/**
|
|
@@ -301,11 +301,11 @@ interface ReferredFriendAction$1 extends ReferredFriendActionRewardTypeOptionsOn
|
|
|
301
301
|
/** @oneof */
|
|
302
302
|
interface ReferredFriendActionRewardTypeOptionsOneOf$1 {
|
|
303
303
|
/** Coupon reward type options. */
|
|
304
|
-
coupon?: V1Coupon$
|
|
304
|
+
coupon?: V1Coupon$3;
|
|
305
305
|
/** Loyalty points reward type options. */
|
|
306
306
|
loyaltyPoints?: LoyaltyPoints$1;
|
|
307
307
|
}
|
|
308
|
-
interface V1Coupon$
|
|
308
|
+
interface V1Coupon$3 {
|
|
309
309
|
/**
|
|
310
310
|
* Coupon ID.
|
|
311
311
|
* @readonly
|
|
@@ -320,14 +320,14 @@ interface V1Coupon$1 {
|
|
|
320
320
|
* Coupon status.
|
|
321
321
|
* @readonly
|
|
322
322
|
*/
|
|
323
|
-
status?: Status$
|
|
323
|
+
status?: Status$5;
|
|
324
324
|
/**
|
|
325
325
|
* Coupon specification.
|
|
326
326
|
* @readonly
|
|
327
327
|
*/
|
|
328
|
-
couponSpecification?: Coupon$
|
|
328
|
+
couponSpecification?: Coupon$3;
|
|
329
329
|
}
|
|
330
|
-
declare enum Status$
|
|
330
|
+
declare enum Status$5 {
|
|
331
331
|
/** Unknown coupon status. */
|
|
332
332
|
UNKNOWN = "UNKNOWN",
|
|
333
333
|
/** Coupon is active and can be applied. */
|
|
@@ -337,19 +337,19 @@ declare enum Status$3 {
|
|
|
337
337
|
/** Coupon was deleted. */
|
|
338
338
|
DELETED = "DELETED"
|
|
339
339
|
}
|
|
340
|
-
interface Coupon$
|
|
340
|
+
interface Coupon$3 extends CouponDiscountTypeOptionsOneOf$3, CouponScopeOrMinSubtotalOneOf$3 {
|
|
341
341
|
/** Options for fixed amount discount type */
|
|
342
|
-
fixedAmountOptions?: FixedAmountDiscount$
|
|
342
|
+
fixedAmountOptions?: FixedAmountDiscount$3;
|
|
343
343
|
/** Options for percentage discount type */
|
|
344
|
-
percentageOptions?: PercentageDiscount$
|
|
344
|
+
percentageOptions?: PercentageDiscount$3;
|
|
345
345
|
/** Limit the coupon to carts with a subtotal above this number. */
|
|
346
346
|
minimumSubtotal?: number;
|
|
347
347
|
/** Specifies the type of line items this coupon will apply to. */
|
|
348
|
-
scope?: CouponScope$
|
|
348
|
+
scope?: CouponScope$3;
|
|
349
349
|
/** Coupon name */
|
|
350
350
|
name?: string;
|
|
351
351
|
/** Coupon discount type */
|
|
352
|
-
discountType?: DiscountType$
|
|
352
|
+
discountType?: DiscountType$3;
|
|
353
353
|
/** Limit the coupon to only apply to one item in cart. */
|
|
354
354
|
limitedToOneItem?: boolean | null;
|
|
355
355
|
/** If true, coupon also applies to subscriptions. */
|
|
@@ -358,20 +358,20 @@ interface Coupon$1 extends CouponDiscountTypeOptionsOneOf$1, CouponScopeOrMinSub
|
|
|
358
358
|
discountedCycleCount?: number | null;
|
|
359
359
|
}
|
|
360
360
|
/** @oneof */
|
|
361
|
-
interface CouponDiscountTypeOptionsOneOf$
|
|
361
|
+
interface CouponDiscountTypeOptionsOneOf$3 {
|
|
362
362
|
/** Options for fixed amount discount type */
|
|
363
|
-
fixedAmountOptions?: FixedAmountDiscount$
|
|
363
|
+
fixedAmountOptions?: FixedAmountDiscount$3;
|
|
364
364
|
/** Options for percentage discount type */
|
|
365
|
-
percentageOptions?: PercentageDiscount$
|
|
365
|
+
percentageOptions?: PercentageDiscount$3;
|
|
366
366
|
}
|
|
367
367
|
/** @oneof */
|
|
368
|
-
interface CouponScopeOrMinSubtotalOneOf$
|
|
368
|
+
interface CouponScopeOrMinSubtotalOneOf$3 {
|
|
369
369
|
/** Limit the coupon to carts with a subtotal above this number. */
|
|
370
370
|
minimumSubtotal?: number;
|
|
371
371
|
/** Specifies the type of line items this coupon will apply to. */
|
|
372
|
-
scope?: CouponScope$
|
|
372
|
+
scope?: CouponScope$3;
|
|
373
373
|
}
|
|
374
|
-
declare enum DiscountType$
|
|
374
|
+
declare enum DiscountType$3 {
|
|
375
375
|
UNKNOWN = "UNKNOWN",
|
|
376
376
|
/** Discount as a fixed amount */
|
|
377
377
|
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
@@ -380,18 +380,18 @@ declare enum DiscountType$1 {
|
|
|
380
380
|
/** Free shipping */
|
|
381
381
|
FREE_SHIPPING = "FREE_SHIPPING"
|
|
382
382
|
}
|
|
383
|
-
interface FixedAmountDiscount$
|
|
383
|
+
interface FixedAmountDiscount$3 {
|
|
384
384
|
/** Fixed amount to discount */
|
|
385
385
|
amount?: number;
|
|
386
386
|
}
|
|
387
|
-
interface PercentageDiscount$
|
|
387
|
+
interface PercentageDiscount$3 {
|
|
388
388
|
percentage?: number;
|
|
389
389
|
}
|
|
390
|
-
interface CouponScope$
|
|
390
|
+
interface CouponScope$3 {
|
|
391
391
|
namespace?: string;
|
|
392
|
-
group?: Group$
|
|
392
|
+
group?: Group$3;
|
|
393
393
|
}
|
|
394
|
-
interface Group$
|
|
394
|
+
interface Group$3 {
|
|
395
395
|
name?: string;
|
|
396
396
|
entityId?: string | null;
|
|
397
397
|
}
|
|
@@ -476,7 +476,7 @@ interface QueryReferredFriendActionsResponseNonNullableFields$1 {
|
|
|
476
476
|
coupon?: {
|
|
477
477
|
id: string;
|
|
478
478
|
code: string;
|
|
479
|
-
status: Status$
|
|
479
|
+
status: Status$5;
|
|
480
480
|
couponSpecification?: {
|
|
481
481
|
fixedAmountOptions?: {
|
|
482
482
|
amount: number;
|
|
@@ -492,7 +492,7 @@ interface QueryReferredFriendActionsResponseNonNullableFields$1 {
|
|
|
492
492
|
};
|
|
493
493
|
};
|
|
494
494
|
name: string;
|
|
495
|
-
discountType: DiscountType$
|
|
495
|
+
discountType: DiscountType$3;
|
|
496
496
|
};
|
|
497
497
|
};
|
|
498
498
|
loyaltyPoints?: {
|
|
@@ -629,11 +629,11 @@ interface GetReferralEventResponse {
|
|
|
629
629
|
}
|
|
630
630
|
interface QueryReferralEventRequest {
|
|
631
631
|
/** Query to filter ReferralEvents. */
|
|
632
|
-
query: CursorQuery$
|
|
632
|
+
query: CursorQuery$6;
|
|
633
633
|
}
|
|
634
|
-
interface CursorQuery$
|
|
634
|
+
interface CursorQuery$6 extends CursorQueryPagingMethodOneOf$6 {
|
|
635
635
|
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
636
|
-
cursorPaging?: CursorPaging$
|
|
636
|
+
cursorPaging?: CursorPaging$6;
|
|
637
637
|
/**
|
|
638
638
|
* Filter object in the following format:
|
|
639
639
|
* `"filter" : {
|
|
@@ -647,24 +647,24 @@ interface CursorQuery$4 extends CursorQueryPagingMethodOneOf$4 {
|
|
|
647
647
|
* Sort object in the following format:
|
|
648
648
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
649
649
|
*/
|
|
650
|
-
sort?: Sorting$
|
|
650
|
+
sort?: Sorting$6[];
|
|
651
651
|
}
|
|
652
652
|
/** @oneof */
|
|
653
|
-
interface CursorQueryPagingMethodOneOf$
|
|
653
|
+
interface CursorQueryPagingMethodOneOf$6 {
|
|
654
654
|
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
655
|
-
cursorPaging?: CursorPaging$
|
|
655
|
+
cursorPaging?: CursorPaging$6;
|
|
656
656
|
}
|
|
657
|
-
interface Sorting$
|
|
657
|
+
interface Sorting$6 {
|
|
658
658
|
/** Name of the field to sort by. */
|
|
659
659
|
fieldName?: string;
|
|
660
660
|
/** Sort order. */
|
|
661
|
-
order?: SortOrder$
|
|
661
|
+
order?: SortOrder$6;
|
|
662
662
|
}
|
|
663
|
-
declare enum SortOrder$
|
|
663
|
+
declare enum SortOrder$6 {
|
|
664
664
|
ASC = "ASC",
|
|
665
665
|
DESC = "DESC"
|
|
666
666
|
}
|
|
667
|
-
interface CursorPaging$
|
|
667
|
+
interface CursorPaging$6 {
|
|
668
668
|
/** Maximum number of items to return in the results. */
|
|
669
669
|
limit?: number | null;
|
|
670
670
|
/**
|
|
@@ -679,13 +679,13 @@ interface QueryReferralEventResponse {
|
|
|
679
679
|
/** List of ReferralEvents that match the query. */
|
|
680
680
|
referralEvents?: ReferralEvent[];
|
|
681
681
|
/** Paging metadata. */
|
|
682
|
-
metadata?: CursorPagingMetadata$
|
|
682
|
+
metadata?: CursorPagingMetadata$6;
|
|
683
683
|
}
|
|
684
|
-
interface CursorPagingMetadata$
|
|
684
|
+
interface CursorPagingMetadata$6 {
|
|
685
685
|
/** Number of items returned in the response. */
|
|
686
686
|
count?: number | null;
|
|
687
687
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
688
|
-
cursors?: Cursors$
|
|
688
|
+
cursors?: Cursors$6;
|
|
689
689
|
/**
|
|
690
690
|
* Whether there are more pages to retrieve following the current page.
|
|
691
691
|
*
|
|
@@ -694,7 +694,7 @@ interface CursorPagingMetadata$4 {
|
|
|
694
694
|
*/
|
|
695
695
|
hasNext?: boolean | null;
|
|
696
696
|
}
|
|
697
|
-
interface Cursors$
|
|
697
|
+
interface Cursors$6 {
|
|
698
698
|
/** Cursor string pointing to the next page in the list of results. */
|
|
699
699
|
next?: string | null;
|
|
700
700
|
/** Cursor pointing to the previous page in the list of results. */
|
|
@@ -712,7 +712,7 @@ interface GetReferralStatisticsResponse {
|
|
|
712
712
|
}
|
|
713
713
|
interface QueryReferringCustomerTotalsRequest {
|
|
714
714
|
/** Query to filter ReferringCustomerTotals. */
|
|
715
|
-
query?: CursorQuery$
|
|
715
|
+
query?: CursorQuery$6;
|
|
716
716
|
/** List of contact ids to filter ReferringCustomerTotals. */
|
|
717
717
|
contactIds?: string[];
|
|
718
718
|
}
|
|
@@ -720,7 +720,7 @@ interface QueryReferringCustomerTotalsResponse {
|
|
|
720
720
|
/** List of ReferringCustomerTotals that match the query. */
|
|
721
721
|
referringCustomerTotals?: ReferringCustomerTotal[];
|
|
722
722
|
/** Paging metadata. */
|
|
723
|
-
metadata?: CursorPagingMetadata$
|
|
723
|
+
metadata?: CursorPagingMetadata$6;
|
|
724
724
|
}
|
|
725
725
|
interface ReferringCustomerTotal {
|
|
726
726
|
/**
|
|
@@ -761,7 +761,7 @@ interface ReferringCustomerTotal {
|
|
|
761
761
|
}
|
|
762
762
|
interface QueryReferredFriendActionsRequest {
|
|
763
763
|
/** Query to filter ReferredFriendActions. */
|
|
764
|
-
query?: CursorQuery$
|
|
764
|
+
query?: CursorQuery$6;
|
|
765
765
|
/** List of contact ids to filter ReferredFriendActions. */
|
|
766
766
|
contactIds?: string[];
|
|
767
767
|
}
|
|
@@ -769,11 +769,11 @@ interface QueryReferredFriendActionsResponse {
|
|
|
769
769
|
/** List of ReferredFriendActions that match the query. */
|
|
770
770
|
referredFriendActions?: ReferredFriendAction[];
|
|
771
771
|
/** Paging metadata. */
|
|
772
|
-
metadata?: CursorPagingMetadata$
|
|
772
|
+
metadata?: CursorPagingMetadata$6;
|
|
773
773
|
}
|
|
774
774
|
interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneOf {
|
|
775
775
|
/** Coupon reward type options. */
|
|
776
|
-
coupon?: V1Coupon;
|
|
776
|
+
coupon?: V1Coupon$2;
|
|
777
777
|
/** Loyalty points reward type options. */
|
|
778
778
|
loyaltyPoints?: LoyaltyPoints;
|
|
779
779
|
/**
|
|
@@ -814,11 +814,11 @@ interface ReferredFriendAction extends ReferredFriendActionRewardTypeOptionsOneO
|
|
|
814
814
|
/** @oneof */
|
|
815
815
|
interface ReferredFriendActionRewardTypeOptionsOneOf {
|
|
816
816
|
/** Coupon reward type options. */
|
|
817
|
-
coupon?: V1Coupon;
|
|
817
|
+
coupon?: V1Coupon$2;
|
|
818
818
|
/** Loyalty points reward type options. */
|
|
819
819
|
loyaltyPoints?: LoyaltyPoints;
|
|
820
820
|
}
|
|
821
|
-
interface V1Coupon {
|
|
821
|
+
interface V1Coupon$2 {
|
|
822
822
|
/**
|
|
823
823
|
* Coupon ID.
|
|
824
824
|
* @readonly
|
|
@@ -833,14 +833,14 @@ interface V1Coupon {
|
|
|
833
833
|
* Coupon status.
|
|
834
834
|
* @readonly
|
|
835
835
|
*/
|
|
836
|
-
status?: Status$
|
|
836
|
+
status?: Status$4;
|
|
837
837
|
/**
|
|
838
838
|
* Coupon specification.
|
|
839
839
|
* @readonly
|
|
840
840
|
*/
|
|
841
|
-
couponSpecification?: Coupon;
|
|
841
|
+
couponSpecification?: Coupon$2;
|
|
842
842
|
}
|
|
843
|
-
declare enum Status$
|
|
843
|
+
declare enum Status$4 {
|
|
844
844
|
/** Unknown coupon status. */
|
|
845
845
|
UNKNOWN = "UNKNOWN",
|
|
846
846
|
/** Coupon is active and can be applied. */
|
|
@@ -850,19 +850,19 @@ declare enum Status$2 {
|
|
|
850
850
|
/** Coupon was deleted. */
|
|
851
851
|
DELETED = "DELETED"
|
|
852
852
|
}
|
|
853
|
-
interface Coupon extends CouponDiscountTypeOptionsOneOf, CouponScopeOrMinSubtotalOneOf {
|
|
853
|
+
interface Coupon$2 extends CouponDiscountTypeOptionsOneOf$2, CouponScopeOrMinSubtotalOneOf$2 {
|
|
854
854
|
/** Options for fixed amount discount type */
|
|
855
|
-
fixedAmountOptions?: FixedAmountDiscount;
|
|
855
|
+
fixedAmountOptions?: FixedAmountDiscount$2;
|
|
856
856
|
/** Options for percentage discount type */
|
|
857
|
-
percentageOptions?: PercentageDiscount;
|
|
857
|
+
percentageOptions?: PercentageDiscount$2;
|
|
858
858
|
/** Limit the coupon to carts with a subtotal above this number. */
|
|
859
859
|
minimumSubtotal?: number;
|
|
860
860
|
/** Specifies the type of line items this coupon will apply to. */
|
|
861
|
-
scope?: CouponScope;
|
|
861
|
+
scope?: CouponScope$2;
|
|
862
862
|
/** Coupon name */
|
|
863
863
|
name?: string;
|
|
864
864
|
/** Coupon discount type */
|
|
865
|
-
discountType?: DiscountType;
|
|
865
|
+
discountType?: DiscountType$2;
|
|
866
866
|
/** Limit the coupon to only apply to one item in cart. */
|
|
867
867
|
limitedToOneItem?: boolean | null;
|
|
868
868
|
/** If true, coupon also applies to subscriptions. */
|
|
@@ -871,20 +871,20 @@ interface Coupon extends CouponDiscountTypeOptionsOneOf, CouponScopeOrMinSubtota
|
|
|
871
871
|
discountedCycleCount?: number | null;
|
|
872
872
|
}
|
|
873
873
|
/** @oneof */
|
|
874
|
-
interface CouponDiscountTypeOptionsOneOf {
|
|
874
|
+
interface CouponDiscountTypeOptionsOneOf$2 {
|
|
875
875
|
/** Options for fixed amount discount type */
|
|
876
|
-
fixedAmountOptions?: FixedAmountDiscount;
|
|
876
|
+
fixedAmountOptions?: FixedAmountDiscount$2;
|
|
877
877
|
/** Options for percentage discount type */
|
|
878
|
-
percentageOptions?: PercentageDiscount;
|
|
878
|
+
percentageOptions?: PercentageDiscount$2;
|
|
879
879
|
}
|
|
880
880
|
/** @oneof */
|
|
881
|
-
interface CouponScopeOrMinSubtotalOneOf {
|
|
881
|
+
interface CouponScopeOrMinSubtotalOneOf$2 {
|
|
882
882
|
/** Limit the coupon to carts with a subtotal above this number. */
|
|
883
883
|
minimumSubtotal?: number;
|
|
884
884
|
/** Specifies the type of line items this coupon will apply to. */
|
|
885
|
-
scope?: CouponScope;
|
|
885
|
+
scope?: CouponScope$2;
|
|
886
886
|
}
|
|
887
|
-
declare enum DiscountType {
|
|
887
|
+
declare enum DiscountType$2 {
|
|
888
888
|
UNKNOWN = "UNKNOWN",
|
|
889
889
|
/** Discount as a fixed amount */
|
|
890
890
|
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
@@ -893,18 +893,18 @@ declare enum DiscountType {
|
|
|
893
893
|
/** Free shipping */
|
|
894
894
|
FREE_SHIPPING = "FREE_SHIPPING"
|
|
895
895
|
}
|
|
896
|
-
interface FixedAmountDiscount {
|
|
896
|
+
interface FixedAmountDiscount$2 {
|
|
897
897
|
/** Fixed amount to discount */
|
|
898
898
|
amount?: number;
|
|
899
899
|
}
|
|
900
|
-
interface PercentageDiscount {
|
|
900
|
+
interface PercentageDiscount$2 {
|
|
901
901
|
percentage?: number;
|
|
902
902
|
}
|
|
903
|
-
interface CouponScope {
|
|
903
|
+
interface CouponScope$2 {
|
|
904
904
|
namespace?: string;
|
|
905
|
-
group?: Group;
|
|
905
|
+
group?: Group$2;
|
|
906
906
|
}
|
|
907
|
-
interface Group {
|
|
907
|
+
interface Group$2 {
|
|
908
908
|
name?: string;
|
|
909
909
|
entityId?: string | null;
|
|
910
910
|
}
|
|
@@ -989,7 +989,7 @@ interface QueryReferredFriendActionsResponseNonNullableFields {
|
|
|
989
989
|
coupon?: {
|
|
990
990
|
_id: string;
|
|
991
991
|
code: string;
|
|
992
|
-
status: Status$
|
|
992
|
+
status: Status$4;
|
|
993
993
|
couponSpecification?: {
|
|
994
994
|
fixedAmountOptions?: {
|
|
995
995
|
amount: number;
|
|
@@ -1005,7 +1005,7 @@ interface QueryReferredFriendActionsResponseNonNullableFields {
|
|
|
1005
1005
|
};
|
|
1006
1006
|
};
|
|
1007
1007
|
name: string;
|
|
1008
|
-
discountType: DiscountType;
|
|
1008
|
+
discountType: DiscountType$2;
|
|
1009
1009
|
};
|
|
1010
1010
|
};
|
|
1011
1011
|
loyaltyPoints?: {
|
|
@@ -1024,7 +1024,7 @@ interface QueryReferredFriendActionsResponseNonNullableFields {
|
|
|
1024
1024
|
}[];
|
|
1025
1025
|
}
|
|
1026
1026
|
|
|
1027
|
-
type __PublicMethodMetaInfo$
|
|
1027
|
+
type __PublicMethodMetaInfo$3<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
1028
1028
|
getUrl: (context: any) => string;
|
|
1029
1029
|
httpMethod: K;
|
|
1030
1030
|
path: string;
|
|
@@ -1034,21 +1034,678 @@ type __PublicMethodMetaInfo$2<K = string, M = unknown, T = unknown, S = unknown,
|
|
|
1034
1034
|
__responseType: Q;
|
|
1035
1035
|
__originalResponseType: R;
|
|
1036
1036
|
};
|
|
1037
|
-
declare function getReferralEvent(): __PublicMethodMetaInfo$
|
|
1037
|
+
declare function getReferralEvent(): __PublicMethodMetaInfo$3<'GET', {
|
|
1038
1038
|
referralEventId: string;
|
|
1039
1039
|
}, GetReferralEventRequest, GetReferralEventRequest$1, GetReferralEventResponse & GetReferralEventResponseNonNullableFields, GetReferralEventResponse$1 & GetReferralEventResponseNonNullableFields$1>;
|
|
1040
|
-
declare function queryReferralEvent(): __PublicMethodMetaInfo$
|
|
1041
|
-
declare function getReferralStatistics(): __PublicMethodMetaInfo$
|
|
1042
|
-
declare function queryReferringCustomerTotals(): __PublicMethodMetaInfo$
|
|
1043
|
-
declare function queryReferredFriendActions(): __PublicMethodMetaInfo$
|
|
1040
|
+
declare function queryReferralEvent(): __PublicMethodMetaInfo$3<'POST', {}, QueryReferralEventRequest, QueryReferralEventRequest$1, QueryReferralEventResponse & QueryReferralEventResponseNonNullableFields, QueryReferralEventResponse$1 & QueryReferralEventResponseNonNullableFields$1>;
|
|
1041
|
+
declare function getReferralStatistics(): __PublicMethodMetaInfo$3<'GET', {}, GetReferralStatisticsRequest, GetReferralStatisticsRequest$1, GetReferralStatisticsResponse & GetReferralStatisticsResponseNonNullableFields, GetReferralStatisticsResponse$1 & GetReferralStatisticsResponseNonNullableFields$1>;
|
|
1042
|
+
declare function queryReferringCustomerTotals(): __PublicMethodMetaInfo$3<'POST', {}, QueryReferringCustomerTotalsRequest, QueryReferringCustomerTotalsRequest$1, QueryReferringCustomerTotalsResponse & QueryReferringCustomerTotalsResponseNonNullableFields, QueryReferringCustomerTotalsResponse$1 & QueryReferringCustomerTotalsResponseNonNullableFields$1>;
|
|
1043
|
+
declare function queryReferredFriendActions(): __PublicMethodMetaInfo$3<'POST', {}, QueryReferredFriendActionsRequest, QueryReferredFriendActionsRequest$1, QueryReferredFriendActionsResponse & QueryReferredFriendActionsResponseNonNullableFields, QueryReferredFriendActionsResponse$1 & QueryReferredFriendActionsResponseNonNullableFields$1>;
|
|
1044
|
+
|
|
1045
|
+
declare const meta$3_getReferralEvent: typeof getReferralEvent;
|
|
1046
|
+
declare const meta$3_getReferralStatistics: typeof getReferralStatistics;
|
|
1047
|
+
declare const meta$3_queryReferralEvent: typeof queryReferralEvent;
|
|
1048
|
+
declare const meta$3_queryReferredFriendActions: typeof queryReferredFriendActions;
|
|
1049
|
+
declare const meta$3_queryReferringCustomerTotals: typeof queryReferringCustomerTotals;
|
|
1050
|
+
declare namespace meta$3 {
|
|
1051
|
+
export { type __PublicMethodMetaInfo$3 as __PublicMethodMetaInfo, meta$3_getReferralEvent as getReferralEvent, meta$3_getReferralStatistics as getReferralStatistics, meta$3_queryReferralEvent as queryReferralEvent, meta$3_queryReferredFriendActions as queryReferredFriendActions, meta$3_queryReferringCustomerTotals as queryReferringCustomerTotals };
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
/** ReferralReward is the main entity of ReferralRewards that can be used for lorem ipsum dolor */
|
|
1055
|
+
interface ReferralReward$1 extends ReferralRewardReceiverOneOf$1, ReferralRewardRewardTypeOptionsOneOf$1 {
|
|
1056
|
+
/**
|
|
1057
|
+
* Referring customer ID.
|
|
1058
|
+
* @readonly
|
|
1059
|
+
*/
|
|
1060
|
+
rewardedReferringCustomerId?: string;
|
|
1061
|
+
/**
|
|
1062
|
+
* Referred friend ID.
|
|
1063
|
+
* @readonly
|
|
1064
|
+
*/
|
|
1065
|
+
rewardedReferredFriendId?: string;
|
|
1066
|
+
/** Coupon reward type options. */
|
|
1067
|
+
coupon?: V1Coupon$1;
|
|
1068
|
+
/** Loyalty points reward type options. */
|
|
1069
|
+
loyaltyPoints?: V1LoyaltyPoints$1;
|
|
1070
|
+
/**
|
|
1071
|
+
* ReferralReward ID.
|
|
1072
|
+
* @readonly
|
|
1073
|
+
*/
|
|
1074
|
+
id?: string | null;
|
|
1075
|
+
/** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision. */
|
|
1076
|
+
revision?: string | null;
|
|
1077
|
+
/**
|
|
1078
|
+
* Represents the time this ReferralReward was created.
|
|
1079
|
+
* @readonly
|
|
1080
|
+
*/
|
|
1081
|
+
createdDate?: Date;
|
|
1082
|
+
/**
|
|
1083
|
+
* Represents the time this ReferralReward was last updated.
|
|
1084
|
+
* @readonly
|
|
1085
|
+
*/
|
|
1086
|
+
updatedDate?: Date;
|
|
1087
|
+
/** Reward type. */
|
|
1088
|
+
rewardType?: RewardTypeType$1;
|
|
1089
|
+
}
|
|
1090
|
+
/** @oneof */
|
|
1091
|
+
interface ReferralRewardReceiverOneOf$1 {
|
|
1092
|
+
/**
|
|
1093
|
+
* Referring customer ID.
|
|
1094
|
+
* @readonly
|
|
1095
|
+
*/
|
|
1096
|
+
rewardedReferringCustomerId?: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* Referred friend ID.
|
|
1099
|
+
* @readonly
|
|
1100
|
+
*/
|
|
1101
|
+
rewardedReferredFriendId?: string;
|
|
1102
|
+
}
|
|
1103
|
+
/** @oneof */
|
|
1104
|
+
interface ReferralRewardRewardTypeOptionsOneOf$1 {
|
|
1105
|
+
/** Coupon reward type options. */
|
|
1106
|
+
coupon?: V1Coupon$1;
|
|
1107
|
+
/** Loyalty points reward type options. */
|
|
1108
|
+
loyaltyPoints?: V1LoyaltyPoints$1;
|
|
1109
|
+
}
|
|
1110
|
+
declare enum RewardTypeType$1 {
|
|
1111
|
+
/** Unknown reward type. */
|
|
1112
|
+
UNKNOWN = "UNKNOWN",
|
|
1113
|
+
/** Coupon reward type. */
|
|
1114
|
+
COUPON = "COUPON",
|
|
1115
|
+
/** Loyalty points reward type. */
|
|
1116
|
+
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
1117
|
+
/** No reward. */
|
|
1118
|
+
NOTHING = "NOTHING"
|
|
1119
|
+
}
|
|
1120
|
+
interface V1Coupon$1 {
|
|
1121
|
+
/**
|
|
1122
|
+
* Coupon ID.
|
|
1123
|
+
* @readonly
|
|
1124
|
+
*/
|
|
1125
|
+
id?: string;
|
|
1126
|
+
/**
|
|
1127
|
+
* Coupon code.
|
|
1128
|
+
* @readonly
|
|
1129
|
+
*/
|
|
1130
|
+
code?: string;
|
|
1131
|
+
/**
|
|
1132
|
+
* Coupon status.
|
|
1133
|
+
* @readonly
|
|
1134
|
+
*/
|
|
1135
|
+
status?: Status$3;
|
|
1136
|
+
/**
|
|
1137
|
+
* Coupon specification.
|
|
1138
|
+
* @readonly
|
|
1139
|
+
*/
|
|
1140
|
+
couponSpecification?: Coupon$1;
|
|
1141
|
+
}
|
|
1142
|
+
declare enum Status$3 {
|
|
1143
|
+
/** Unknown coupon status. */
|
|
1144
|
+
UNKNOWN = "UNKNOWN",
|
|
1145
|
+
/** Coupon is active and can be applied. */
|
|
1146
|
+
ACTIVE = "ACTIVE",
|
|
1147
|
+
/** Coupon was already applied and can not be used anymore. */
|
|
1148
|
+
APPLIED = "APPLIED",
|
|
1149
|
+
/** Coupon was deleted. */
|
|
1150
|
+
DELETED = "DELETED"
|
|
1151
|
+
}
|
|
1152
|
+
interface Coupon$1 extends CouponDiscountTypeOptionsOneOf$1, CouponScopeOrMinSubtotalOneOf$1 {
|
|
1153
|
+
/** Options for fixed amount discount type */
|
|
1154
|
+
fixedAmountOptions?: FixedAmountDiscount$1;
|
|
1155
|
+
/** Options for percentage discount type */
|
|
1156
|
+
percentageOptions?: PercentageDiscount$1;
|
|
1157
|
+
/** Limit the coupon to carts with a subtotal above this number. */
|
|
1158
|
+
minimumSubtotal?: number;
|
|
1159
|
+
/** Specifies the type of line items this coupon will apply to. */
|
|
1160
|
+
scope?: CouponScope$1;
|
|
1161
|
+
/** Coupon name */
|
|
1162
|
+
name?: string;
|
|
1163
|
+
/** Coupon discount type */
|
|
1164
|
+
discountType?: DiscountType$1;
|
|
1165
|
+
/** Limit the coupon to only apply to one item in cart. */
|
|
1166
|
+
limitedToOneItem?: boolean | null;
|
|
1167
|
+
/** If true, coupon also applies to subscriptions. */
|
|
1168
|
+
appliesToSubscriptions?: boolean | null;
|
|
1169
|
+
/** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
|
|
1170
|
+
discountedCycleCount?: number | null;
|
|
1171
|
+
}
|
|
1172
|
+
/** @oneof */
|
|
1173
|
+
interface CouponDiscountTypeOptionsOneOf$1 {
|
|
1174
|
+
/** Options for fixed amount discount type */
|
|
1175
|
+
fixedAmountOptions?: FixedAmountDiscount$1;
|
|
1176
|
+
/** Options for percentage discount type */
|
|
1177
|
+
percentageOptions?: PercentageDiscount$1;
|
|
1178
|
+
}
|
|
1179
|
+
/** @oneof */
|
|
1180
|
+
interface CouponScopeOrMinSubtotalOneOf$1 {
|
|
1181
|
+
/** Limit the coupon to carts with a subtotal above this number. */
|
|
1182
|
+
minimumSubtotal?: number;
|
|
1183
|
+
/** Specifies the type of line items this coupon will apply to. */
|
|
1184
|
+
scope?: CouponScope$1;
|
|
1185
|
+
}
|
|
1186
|
+
declare enum DiscountType$1 {
|
|
1187
|
+
UNKNOWN = "UNKNOWN",
|
|
1188
|
+
/** Discount as a fixed amount */
|
|
1189
|
+
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
1190
|
+
/** Discount as a percentage */
|
|
1191
|
+
PERCENTAGE = "PERCENTAGE",
|
|
1192
|
+
/** Free shipping */
|
|
1193
|
+
FREE_SHIPPING = "FREE_SHIPPING"
|
|
1194
|
+
}
|
|
1195
|
+
interface FixedAmountDiscount$1 {
|
|
1196
|
+
/** Fixed amount to discount */
|
|
1197
|
+
amount?: number;
|
|
1198
|
+
}
|
|
1199
|
+
interface PercentageDiscount$1 {
|
|
1200
|
+
percentage?: number;
|
|
1201
|
+
}
|
|
1202
|
+
interface CouponScope$1 {
|
|
1203
|
+
namespace?: string;
|
|
1204
|
+
group?: Group$1;
|
|
1205
|
+
}
|
|
1206
|
+
interface Group$1 {
|
|
1207
|
+
name?: string;
|
|
1208
|
+
entityId?: string | null;
|
|
1209
|
+
}
|
|
1210
|
+
interface V1LoyaltyPoints$1 {
|
|
1211
|
+
/**
|
|
1212
|
+
* Loyalty transaction ID.
|
|
1213
|
+
* @readonly
|
|
1214
|
+
*/
|
|
1215
|
+
transactionId?: string;
|
|
1216
|
+
/**
|
|
1217
|
+
* Loyalty points amount given.
|
|
1218
|
+
* @readonly
|
|
1219
|
+
*/
|
|
1220
|
+
amount?: number;
|
|
1221
|
+
}
|
|
1222
|
+
interface GetReferralRewardRequest$1 {
|
|
1223
|
+
/** Id of the ReferralReward to retrieve. */
|
|
1224
|
+
id: string;
|
|
1225
|
+
}
|
|
1226
|
+
interface GetReferralRewardResponse$1 {
|
|
1227
|
+
/** The retrieved ReferralReward. */
|
|
1228
|
+
referralReward?: ReferralReward$1;
|
|
1229
|
+
}
|
|
1230
|
+
interface QueryReferralRewardsRequest$1 {
|
|
1231
|
+
/** Query to filter ReferralRewards. */
|
|
1232
|
+
query: CursorQuery$5;
|
|
1233
|
+
/** Filter by contact id or set to "me" for current identity's rewards. */
|
|
1234
|
+
contactId?: string | null;
|
|
1235
|
+
}
|
|
1236
|
+
interface CursorQuery$5 extends CursorQueryPagingMethodOneOf$5 {
|
|
1237
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1238
|
+
cursorPaging?: CursorPaging$5;
|
|
1239
|
+
/**
|
|
1240
|
+
* Filter object in the following format:
|
|
1241
|
+
* `"filter" : {
|
|
1242
|
+
* "fieldName1": "value1",
|
|
1243
|
+
* "fieldName2":{"$operator":"value2"}
|
|
1244
|
+
* }`
|
|
1245
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
1246
|
+
*/
|
|
1247
|
+
filter?: Record<string, any> | null;
|
|
1248
|
+
/**
|
|
1249
|
+
* Sort object in the following format:
|
|
1250
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1251
|
+
*/
|
|
1252
|
+
sort?: Sorting$5[];
|
|
1253
|
+
}
|
|
1254
|
+
/** @oneof */
|
|
1255
|
+
interface CursorQueryPagingMethodOneOf$5 {
|
|
1256
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1257
|
+
cursorPaging?: CursorPaging$5;
|
|
1258
|
+
}
|
|
1259
|
+
interface Sorting$5 {
|
|
1260
|
+
/** Name of the field to sort by. */
|
|
1261
|
+
fieldName?: string;
|
|
1262
|
+
/** Sort order. */
|
|
1263
|
+
order?: SortOrder$5;
|
|
1264
|
+
}
|
|
1265
|
+
declare enum SortOrder$5 {
|
|
1266
|
+
ASC = "ASC",
|
|
1267
|
+
DESC = "DESC"
|
|
1268
|
+
}
|
|
1269
|
+
interface CursorPaging$5 {
|
|
1270
|
+
/** Maximum number of items to return in the results. */
|
|
1271
|
+
limit?: number | null;
|
|
1272
|
+
/**
|
|
1273
|
+
* Pointer to the next or previous page in the list of results.
|
|
1274
|
+
*
|
|
1275
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1276
|
+
* Not relevant for the first request.
|
|
1277
|
+
*/
|
|
1278
|
+
cursor?: string | null;
|
|
1279
|
+
}
|
|
1280
|
+
interface QueryReferralRewardsResponse$1 {
|
|
1281
|
+
/** The retrieved ReferralRewards. */
|
|
1282
|
+
referralRewards?: ReferralReward$1[];
|
|
1283
|
+
/** Metadata for paging. */
|
|
1284
|
+
metadata?: CursorPagingMetadata$5;
|
|
1285
|
+
}
|
|
1286
|
+
interface CursorPagingMetadata$5 {
|
|
1287
|
+
/** Number of items returned in the response. */
|
|
1288
|
+
count?: number | null;
|
|
1289
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
1290
|
+
cursors?: Cursors$5;
|
|
1291
|
+
/**
|
|
1292
|
+
* Whether there are more pages to retrieve following the current page.
|
|
1293
|
+
*
|
|
1294
|
+
* + `true`: Another page of results can be retrieved.
|
|
1295
|
+
* + `false`: This is the last page.
|
|
1296
|
+
*/
|
|
1297
|
+
hasNext?: boolean | null;
|
|
1298
|
+
}
|
|
1299
|
+
interface Cursors$5 {
|
|
1300
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
1301
|
+
next?: string | null;
|
|
1302
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
1303
|
+
prev?: string | null;
|
|
1304
|
+
}
|
|
1305
|
+
interface GetReferralRewardResponseNonNullableFields$1 {
|
|
1306
|
+
referralReward?: {
|
|
1307
|
+
rewardedReferringCustomerId: string;
|
|
1308
|
+
rewardedReferredFriendId: string;
|
|
1309
|
+
coupon?: {
|
|
1310
|
+
id: string;
|
|
1311
|
+
code: string;
|
|
1312
|
+
status: Status$3;
|
|
1313
|
+
couponSpecification?: {
|
|
1314
|
+
fixedAmountOptions?: {
|
|
1315
|
+
amount: number;
|
|
1316
|
+
};
|
|
1317
|
+
percentageOptions?: {
|
|
1318
|
+
percentage: number;
|
|
1319
|
+
};
|
|
1320
|
+
minimumSubtotal: number;
|
|
1321
|
+
scope?: {
|
|
1322
|
+
namespace: string;
|
|
1323
|
+
group?: {
|
|
1324
|
+
name: string;
|
|
1325
|
+
};
|
|
1326
|
+
};
|
|
1327
|
+
name: string;
|
|
1328
|
+
discountType: DiscountType$1;
|
|
1329
|
+
};
|
|
1330
|
+
};
|
|
1331
|
+
loyaltyPoints?: {
|
|
1332
|
+
transactionId: string;
|
|
1333
|
+
amount: number;
|
|
1334
|
+
};
|
|
1335
|
+
rewardType: RewardTypeType$1;
|
|
1336
|
+
};
|
|
1337
|
+
}
|
|
1338
|
+
interface QueryReferralRewardsResponseNonNullableFields$1 {
|
|
1339
|
+
referralRewards: {
|
|
1340
|
+
rewardedReferringCustomerId: string;
|
|
1341
|
+
rewardedReferredFriendId: string;
|
|
1342
|
+
coupon?: {
|
|
1343
|
+
id: string;
|
|
1344
|
+
code: string;
|
|
1345
|
+
status: Status$3;
|
|
1346
|
+
couponSpecification?: {
|
|
1347
|
+
fixedAmountOptions?: {
|
|
1348
|
+
amount: number;
|
|
1349
|
+
};
|
|
1350
|
+
percentageOptions?: {
|
|
1351
|
+
percentage: number;
|
|
1352
|
+
};
|
|
1353
|
+
minimumSubtotal: number;
|
|
1354
|
+
scope?: {
|
|
1355
|
+
namespace: string;
|
|
1356
|
+
group?: {
|
|
1357
|
+
name: string;
|
|
1358
|
+
};
|
|
1359
|
+
};
|
|
1360
|
+
name: string;
|
|
1361
|
+
discountType: DiscountType$1;
|
|
1362
|
+
};
|
|
1363
|
+
};
|
|
1364
|
+
loyaltyPoints?: {
|
|
1365
|
+
transactionId: string;
|
|
1366
|
+
amount: number;
|
|
1367
|
+
};
|
|
1368
|
+
rewardType: RewardTypeType$1;
|
|
1369
|
+
}[];
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
/** ReferralReward is the main entity of ReferralRewards that can be used for lorem ipsum dolor */
|
|
1373
|
+
interface ReferralReward extends ReferralRewardReceiverOneOf, ReferralRewardRewardTypeOptionsOneOf {
|
|
1374
|
+
/**
|
|
1375
|
+
* Referring customer ID.
|
|
1376
|
+
* @readonly
|
|
1377
|
+
*/
|
|
1378
|
+
rewardedReferringCustomerId?: string;
|
|
1379
|
+
/**
|
|
1380
|
+
* Referred friend ID.
|
|
1381
|
+
* @readonly
|
|
1382
|
+
*/
|
|
1383
|
+
rewardedReferredFriendId?: string;
|
|
1384
|
+
/** Coupon reward type options. */
|
|
1385
|
+
coupon?: V1Coupon;
|
|
1386
|
+
/** Loyalty points reward type options. */
|
|
1387
|
+
loyaltyPoints?: V1LoyaltyPoints;
|
|
1388
|
+
/**
|
|
1389
|
+
* ReferralReward ID.
|
|
1390
|
+
* @readonly
|
|
1391
|
+
*/
|
|
1392
|
+
_id?: string | null;
|
|
1393
|
+
/** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision. */
|
|
1394
|
+
revision?: string | null;
|
|
1395
|
+
/**
|
|
1396
|
+
* Represents the time this ReferralReward was created.
|
|
1397
|
+
* @readonly
|
|
1398
|
+
*/
|
|
1399
|
+
_createdDate?: Date;
|
|
1400
|
+
/**
|
|
1401
|
+
* Represents the time this ReferralReward was last updated.
|
|
1402
|
+
* @readonly
|
|
1403
|
+
*/
|
|
1404
|
+
_updatedDate?: Date;
|
|
1405
|
+
/** Reward type. */
|
|
1406
|
+
rewardType?: RewardTypeType;
|
|
1407
|
+
}
|
|
1408
|
+
/** @oneof */
|
|
1409
|
+
interface ReferralRewardReceiverOneOf {
|
|
1410
|
+
/**
|
|
1411
|
+
* Referring customer ID.
|
|
1412
|
+
* @readonly
|
|
1413
|
+
*/
|
|
1414
|
+
rewardedReferringCustomerId?: string;
|
|
1415
|
+
/**
|
|
1416
|
+
* Referred friend ID.
|
|
1417
|
+
* @readonly
|
|
1418
|
+
*/
|
|
1419
|
+
rewardedReferredFriendId?: string;
|
|
1420
|
+
}
|
|
1421
|
+
/** @oneof */
|
|
1422
|
+
interface ReferralRewardRewardTypeOptionsOneOf {
|
|
1423
|
+
/** Coupon reward type options. */
|
|
1424
|
+
coupon?: V1Coupon;
|
|
1425
|
+
/** Loyalty points reward type options. */
|
|
1426
|
+
loyaltyPoints?: V1LoyaltyPoints;
|
|
1427
|
+
}
|
|
1428
|
+
declare enum RewardTypeType {
|
|
1429
|
+
/** Unknown reward type. */
|
|
1430
|
+
UNKNOWN = "UNKNOWN",
|
|
1431
|
+
/** Coupon reward type. */
|
|
1432
|
+
COUPON = "COUPON",
|
|
1433
|
+
/** Loyalty points reward type. */
|
|
1434
|
+
LOYALTY_POINTS = "LOYALTY_POINTS",
|
|
1435
|
+
/** No reward. */
|
|
1436
|
+
NOTHING = "NOTHING"
|
|
1437
|
+
}
|
|
1438
|
+
interface V1Coupon {
|
|
1439
|
+
/**
|
|
1440
|
+
* Coupon ID.
|
|
1441
|
+
* @readonly
|
|
1442
|
+
*/
|
|
1443
|
+
_id?: string;
|
|
1444
|
+
/**
|
|
1445
|
+
* Coupon code.
|
|
1446
|
+
* @readonly
|
|
1447
|
+
*/
|
|
1448
|
+
code?: string;
|
|
1449
|
+
/**
|
|
1450
|
+
* Coupon status.
|
|
1451
|
+
* @readonly
|
|
1452
|
+
*/
|
|
1453
|
+
status?: Status$2;
|
|
1454
|
+
/**
|
|
1455
|
+
* Coupon specification.
|
|
1456
|
+
* @readonly
|
|
1457
|
+
*/
|
|
1458
|
+
couponSpecification?: Coupon;
|
|
1459
|
+
}
|
|
1460
|
+
declare enum Status$2 {
|
|
1461
|
+
/** Unknown coupon status. */
|
|
1462
|
+
UNKNOWN = "UNKNOWN",
|
|
1463
|
+
/** Coupon is active and can be applied. */
|
|
1464
|
+
ACTIVE = "ACTIVE",
|
|
1465
|
+
/** Coupon was already applied and can not be used anymore. */
|
|
1466
|
+
APPLIED = "APPLIED",
|
|
1467
|
+
/** Coupon was deleted. */
|
|
1468
|
+
DELETED = "DELETED"
|
|
1469
|
+
}
|
|
1470
|
+
interface Coupon extends CouponDiscountTypeOptionsOneOf, CouponScopeOrMinSubtotalOneOf {
|
|
1471
|
+
/** Options for fixed amount discount type */
|
|
1472
|
+
fixedAmountOptions?: FixedAmountDiscount;
|
|
1473
|
+
/** Options for percentage discount type */
|
|
1474
|
+
percentageOptions?: PercentageDiscount;
|
|
1475
|
+
/** Limit the coupon to carts with a subtotal above this number. */
|
|
1476
|
+
minimumSubtotal?: number;
|
|
1477
|
+
/** Specifies the type of line items this coupon will apply to. */
|
|
1478
|
+
scope?: CouponScope;
|
|
1479
|
+
/** Coupon name */
|
|
1480
|
+
name?: string;
|
|
1481
|
+
/** Coupon discount type */
|
|
1482
|
+
discountType?: DiscountType;
|
|
1483
|
+
/** Limit the coupon to only apply to one item in cart. */
|
|
1484
|
+
limitedToOneItem?: boolean | null;
|
|
1485
|
+
/** If true, coupon also applies to subscriptions. */
|
|
1486
|
+
appliesToSubscriptions?: boolean | null;
|
|
1487
|
+
/** Specifies the amount of discounted cycles for subscription item. See Stores Coupons documentation for more info. */
|
|
1488
|
+
discountedCycleCount?: number | null;
|
|
1489
|
+
}
|
|
1490
|
+
/** @oneof */
|
|
1491
|
+
interface CouponDiscountTypeOptionsOneOf {
|
|
1492
|
+
/** Options for fixed amount discount type */
|
|
1493
|
+
fixedAmountOptions?: FixedAmountDiscount;
|
|
1494
|
+
/** Options for percentage discount type */
|
|
1495
|
+
percentageOptions?: PercentageDiscount;
|
|
1496
|
+
}
|
|
1497
|
+
/** @oneof */
|
|
1498
|
+
interface CouponScopeOrMinSubtotalOneOf {
|
|
1499
|
+
/** Limit the coupon to carts with a subtotal above this number. */
|
|
1500
|
+
minimumSubtotal?: number;
|
|
1501
|
+
/** Specifies the type of line items this coupon will apply to. */
|
|
1502
|
+
scope?: CouponScope;
|
|
1503
|
+
}
|
|
1504
|
+
declare enum DiscountType {
|
|
1505
|
+
UNKNOWN = "UNKNOWN",
|
|
1506
|
+
/** Discount as a fixed amount */
|
|
1507
|
+
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
1508
|
+
/** Discount as a percentage */
|
|
1509
|
+
PERCENTAGE = "PERCENTAGE",
|
|
1510
|
+
/** Free shipping */
|
|
1511
|
+
FREE_SHIPPING = "FREE_SHIPPING"
|
|
1512
|
+
}
|
|
1513
|
+
interface FixedAmountDiscount {
|
|
1514
|
+
/** Fixed amount to discount */
|
|
1515
|
+
amount?: number;
|
|
1516
|
+
}
|
|
1517
|
+
interface PercentageDiscount {
|
|
1518
|
+
percentage?: number;
|
|
1519
|
+
}
|
|
1520
|
+
interface CouponScope {
|
|
1521
|
+
namespace?: string;
|
|
1522
|
+
group?: Group;
|
|
1523
|
+
}
|
|
1524
|
+
interface Group {
|
|
1525
|
+
name?: string;
|
|
1526
|
+
entityId?: string | null;
|
|
1527
|
+
}
|
|
1528
|
+
interface V1LoyaltyPoints {
|
|
1529
|
+
/**
|
|
1530
|
+
* Loyalty transaction ID.
|
|
1531
|
+
* @readonly
|
|
1532
|
+
*/
|
|
1533
|
+
transactionId?: string;
|
|
1534
|
+
/**
|
|
1535
|
+
* Loyalty points amount given.
|
|
1536
|
+
* @readonly
|
|
1537
|
+
*/
|
|
1538
|
+
amount?: number;
|
|
1539
|
+
}
|
|
1540
|
+
interface GetReferralRewardRequest {
|
|
1541
|
+
/** Id of the ReferralReward to retrieve. */
|
|
1542
|
+
_id: string;
|
|
1543
|
+
}
|
|
1544
|
+
interface GetReferralRewardResponse {
|
|
1545
|
+
/** The retrieved ReferralReward. */
|
|
1546
|
+
referralReward?: ReferralReward;
|
|
1547
|
+
}
|
|
1548
|
+
interface QueryReferralRewardsRequest {
|
|
1549
|
+
/** Query to filter ReferralRewards. */
|
|
1550
|
+
query: CursorQuery$4;
|
|
1551
|
+
/** Filter by contact id or set to "me" for current identity's rewards. */
|
|
1552
|
+
contactId?: string | null;
|
|
1553
|
+
}
|
|
1554
|
+
interface CursorQuery$4 extends CursorQueryPagingMethodOneOf$4 {
|
|
1555
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1556
|
+
cursorPaging?: CursorPaging$4;
|
|
1557
|
+
/**
|
|
1558
|
+
* Filter object in the following format:
|
|
1559
|
+
* `"filter" : {
|
|
1560
|
+
* "fieldName1": "value1",
|
|
1561
|
+
* "fieldName2":{"$operator":"value2"}
|
|
1562
|
+
* }`
|
|
1563
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
1564
|
+
*/
|
|
1565
|
+
filter?: Record<string, any> | null;
|
|
1566
|
+
/**
|
|
1567
|
+
* Sort object in the following format:
|
|
1568
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1569
|
+
*/
|
|
1570
|
+
sort?: Sorting$4[];
|
|
1571
|
+
}
|
|
1572
|
+
/** @oneof */
|
|
1573
|
+
interface CursorQueryPagingMethodOneOf$4 {
|
|
1574
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1575
|
+
cursorPaging?: CursorPaging$4;
|
|
1576
|
+
}
|
|
1577
|
+
interface Sorting$4 {
|
|
1578
|
+
/** Name of the field to sort by. */
|
|
1579
|
+
fieldName?: string;
|
|
1580
|
+
/** Sort order. */
|
|
1581
|
+
order?: SortOrder$4;
|
|
1582
|
+
}
|
|
1583
|
+
declare enum SortOrder$4 {
|
|
1584
|
+
ASC = "ASC",
|
|
1585
|
+
DESC = "DESC"
|
|
1586
|
+
}
|
|
1587
|
+
interface CursorPaging$4 {
|
|
1588
|
+
/** Maximum number of items to return in the results. */
|
|
1589
|
+
limit?: number | null;
|
|
1590
|
+
/**
|
|
1591
|
+
* Pointer to the next or previous page in the list of results.
|
|
1592
|
+
*
|
|
1593
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1594
|
+
* Not relevant for the first request.
|
|
1595
|
+
*/
|
|
1596
|
+
cursor?: string | null;
|
|
1597
|
+
}
|
|
1598
|
+
interface QueryReferralRewardsResponse {
|
|
1599
|
+
/** The retrieved ReferralRewards. */
|
|
1600
|
+
referralRewards?: ReferralReward[];
|
|
1601
|
+
/** Metadata for paging. */
|
|
1602
|
+
metadata?: CursorPagingMetadata$4;
|
|
1603
|
+
}
|
|
1604
|
+
interface CursorPagingMetadata$4 {
|
|
1605
|
+
/** Number of items returned in the response. */
|
|
1606
|
+
count?: number | null;
|
|
1607
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
1608
|
+
cursors?: Cursors$4;
|
|
1609
|
+
/**
|
|
1610
|
+
* Whether there are more pages to retrieve following the current page.
|
|
1611
|
+
*
|
|
1612
|
+
* + `true`: Another page of results can be retrieved.
|
|
1613
|
+
* + `false`: This is the last page.
|
|
1614
|
+
*/
|
|
1615
|
+
hasNext?: boolean | null;
|
|
1616
|
+
}
|
|
1617
|
+
interface Cursors$4 {
|
|
1618
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
1619
|
+
next?: string | null;
|
|
1620
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
1621
|
+
prev?: string | null;
|
|
1622
|
+
}
|
|
1623
|
+
interface GetReferralRewardResponseNonNullableFields {
|
|
1624
|
+
referralReward?: {
|
|
1625
|
+
rewardedReferringCustomerId: string;
|
|
1626
|
+
rewardedReferredFriendId: string;
|
|
1627
|
+
coupon?: {
|
|
1628
|
+
_id: string;
|
|
1629
|
+
code: string;
|
|
1630
|
+
status: Status$2;
|
|
1631
|
+
couponSpecification?: {
|
|
1632
|
+
fixedAmountOptions?: {
|
|
1633
|
+
amount: number;
|
|
1634
|
+
};
|
|
1635
|
+
percentageOptions?: {
|
|
1636
|
+
percentage: number;
|
|
1637
|
+
};
|
|
1638
|
+
minimumSubtotal: number;
|
|
1639
|
+
scope?: {
|
|
1640
|
+
namespace: string;
|
|
1641
|
+
group?: {
|
|
1642
|
+
name: string;
|
|
1643
|
+
};
|
|
1644
|
+
};
|
|
1645
|
+
name: string;
|
|
1646
|
+
discountType: DiscountType;
|
|
1647
|
+
};
|
|
1648
|
+
};
|
|
1649
|
+
loyaltyPoints?: {
|
|
1650
|
+
transactionId: string;
|
|
1651
|
+
amount: number;
|
|
1652
|
+
};
|
|
1653
|
+
rewardType: RewardTypeType;
|
|
1654
|
+
};
|
|
1655
|
+
}
|
|
1656
|
+
interface QueryReferralRewardsResponseNonNullableFields {
|
|
1657
|
+
referralRewards: {
|
|
1658
|
+
rewardedReferringCustomerId: string;
|
|
1659
|
+
rewardedReferredFriendId: string;
|
|
1660
|
+
coupon?: {
|
|
1661
|
+
_id: string;
|
|
1662
|
+
code: string;
|
|
1663
|
+
status: Status$2;
|
|
1664
|
+
couponSpecification?: {
|
|
1665
|
+
fixedAmountOptions?: {
|
|
1666
|
+
amount: number;
|
|
1667
|
+
};
|
|
1668
|
+
percentageOptions?: {
|
|
1669
|
+
percentage: number;
|
|
1670
|
+
};
|
|
1671
|
+
minimumSubtotal: number;
|
|
1672
|
+
scope?: {
|
|
1673
|
+
namespace: string;
|
|
1674
|
+
group?: {
|
|
1675
|
+
name: string;
|
|
1676
|
+
};
|
|
1677
|
+
};
|
|
1678
|
+
name: string;
|
|
1679
|
+
discountType: DiscountType;
|
|
1680
|
+
};
|
|
1681
|
+
};
|
|
1682
|
+
loyaltyPoints?: {
|
|
1683
|
+
transactionId: string;
|
|
1684
|
+
amount: number;
|
|
1685
|
+
};
|
|
1686
|
+
rewardType: RewardTypeType;
|
|
1687
|
+
}[];
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
type __PublicMethodMetaInfo$2<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
1691
|
+
getUrl: (context: any) => string;
|
|
1692
|
+
httpMethod: K;
|
|
1693
|
+
path: string;
|
|
1694
|
+
pathParams: M;
|
|
1695
|
+
__requestType: T;
|
|
1696
|
+
__originalRequestType: S;
|
|
1697
|
+
__responseType: Q;
|
|
1698
|
+
__originalResponseType: R;
|
|
1699
|
+
};
|
|
1700
|
+
declare function getReferralReward(): __PublicMethodMetaInfo$2<'GET', {
|
|
1701
|
+
id: string;
|
|
1702
|
+
}, GetReferralRewardRequest, GetReferralRewardRequest$1, GetReferralRewardResponse & GetReferralRewardResponseNonNullableFields, GetReferralRewardResponse$1 & GetReferralRewardResponseNonNullableFields$1>;
|
|
1703
|
+
declare function queryReferralRewards(): __PublicMethodMetaInfo$2<'POST', {}, QueryReferralRewardsRequest, QueryReferralRewardsRequest$1, QueryReferralRewardsResponse & QueryReferralRewardsResponseNonNullableFields, QueryReferralRewardsResponse$1 & QueryReferralRewardsResponseNonNullableFields$1>;
|
|
1044
1704
|
|
|
1045
|
-
declare const meta$
|
|
1046
|
-
declare const meta$
|
|
1047
|
-
declare const meta$2_queryReferralEvent: typeof queryReferralEvent;
|
|
1048
|
-
declare const meta$2_queryReferredFriendActions: typeof queryReferredFriendActions;
|
|
1049
|
-
declare const meta$2_queryReferringCustomerTotals: typeof queryReferringCustomerTotals;
|
|
1705
|
+
declare const meta$2_getReferralReward: typeof getReferralReward;
|
|
1706
|
+
declare const meta$2_queryReferralRewards: typeof queryReferralRewards;
|
|
1050
1707
|
declare namespace meta$2 {
|
|
1051
|
-
export { type __PublicMethodMetaInfo$2 as __PublicMethodMetaInfo, meta$
|
|
1708
|
+
export { type __PublicMethodMetaInfo$2 as __PublicMethodMetaInfo, meta$2_getReferralReward as getReferralReward, meta$2_queryReferralRewards as queryReferralRewards };
|
|
1052
1709
|
}
|
|
1053
1710
|
|
|
1054
1711
|
/** ReferredFriend is the main entity of ReferredFriends that can be used for lorem ipsum dolor */
|
|
@@ -1836,4 +2493,4 @@ declare namespace meta {
|
|
|
1836
2493
|
export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_deleteReferringCustomer as deleteReferringCustomer, meta_generateReferringCustomerForContact as generateReferringCustomerForContact, meta_getReferringCustomer as getReferringCustomer, meta_getReferringCustomerByReferralCode as getReferringCustomerByReferralCode, meta_queryReferringCustomers as queryReferringCustomers };
|
|
1837
2494
|
}
|
|
1838
2495
|
|
|
1839
|
-
export { meta as customers, meta$1 as friends, meta$2 as tracker };
|
|
2496
|
+
export { meta as customers, meta$1 as friends, meta$2 as rewards, meta$3 as tracker };
|