@snagsolutions/sdk 0.1.0-alpha.151 → 0.1.0-alpha.153
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/CHANGELOG.md +25 -0
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auctions/auctions.d.ts +2 -2
- package/resources/auctions/auctions.d.ts.map +1 -1
- package/resources/auctions/auctions.js.map +1 -1
- package/resources/auctions/auctions.mjs.map +1 -1
- package/resources/auctions/index.d.ts +1 -1
- package/resources/auctions/index.d.ts.map +1 -1
- package/resources/auctions/index.js.map +1 -1
- package/resources/auctions/index.mjs.map +1 -1
- package/resources/auctions/website-user-attributes/index.d.ts +2 -2
- package/resources/auctions/website-user-attributes/index.d.ts.map +1 -1
- package/resources/auctions/website-user-attributes/index.js.map +1 -1
- package/resources/auctions/website-user-attributes/index.mjs +1 -1
- package/resources/auctions/website-user-attributes/index.mjs.map +1 -1
- package/resources/auctions/website-user-attributes/values.d.ts +1 -47
- package/resources/auctions/website-user-attributes/values.d.ts.map +1 -1
- package/resources/auctions/website-user-attributes/values.js +0 -14
- package/resources/auctions/website-user-attributes/values.js.map +1 -1
- package/resources/auctions/website-user-attributes/values.mjs +0 -14
- package/resources/auctions/website-user-attributes/values.mjs.map +1 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +3 -43
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.js +0 -7
- package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs +0 -7
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/loyalty/index.d.ts +1 -1
- package/resources/loyalty/index.d.ts.map +1 -1
- package/resources/loyalty/index.js.map +1 -1
- package/resources/loyalty/index.mjs.map +1 -1
- package/resources/loyalty/loyalty.d.ts +2 -2
- package/resources/loyalty/loyalty.d.ts.map +1 -1
- package/resources/loyalty/loyalty.js.map +1 -1
- package/resources/loyalty/loyalty.mjs.map +1 -1
- package/resources/loyalty/rule-edits.d.ts +16 -0
- package/resources/loyalty/rule-edits.d.ts.map +1 -1
- package/resources/loyalty/rule-groups.d.ts +4 -0
- package/resources/loyalty/rule-groups.d.ts.map +1 -1
- package/resources/loyalty/rules.d.ts +38 -5
- package/resources/loyalty/rules.d.ts.map +1 -1
- package/resources/loyalty/transactions/index.d.ts +2 -2
- package/resources/loyalty/transactions/index.d.ts.map +1 -1
- package/resources/loyalty/transactions/index.js.map +1 -1
- package/resources/loyalty/transactions/index.mjs +1 -1
- package/resources/loyalty/transactions/index.mjs.map +1 -1
- package/resources/loyalty/transactions/rule-statuses.d.ts +1 -60
- package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -1
- package/resources/loyalty/transactions/rule-statuses.js +0 -7
- package/resources/loyalty/transactions/rule-statuses.js.map +1 -1
- package/resources/loyalty/transactions/rule-statuses.mjs +0 -7
- package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -1
- package/resources/loyalty/transactions/transactions.d.ts +3 -121
- package/resources/loyalty/transactions/transactions.d.ts.map +1 -1
- package/resources/loyalty/transactions/transactions.js +0 -15
- package/resources/loyalty/transactions/transactions.js.map +1 -1
- package/resources/loyalty/transactions/transactions.mjs +1 -16
- package/resources/loyalty/transactions/transactions.mjs.map +1 -1
- package/resources/users/users.d.ts +14 -0
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs.map +1 -1
- package/resources/websites/index.d.ts +2 -2
- package/resources/websites/index.d.ts.map +1 -1
- package/resources/websites/index.js.map +1 -1
- package/resources/websites/index.mjs +2 -2
- package/resources/websites/index.mjs.map +1 -1
- package/resources/websites/website-collections.d.ts +0 -90
- package/resources/websites/website-collections.d.ts.map +1 -1
- package/resources/websites/website-collections.js +0 -37
- package/resources/websites/website-collections.js.map +1 -1
- package/resources/websites/website-collections.mjs +0 -37
- package/resources/websites/website-collections.mjs.map +1 -1
- package/resources/websites/websites.d.ts +3 -105
- package/resources/websites/websites.d.ts.map +1 -1
- package/resources/websites/websites.js +0 -13
- package/resources/websites/websites.js.map +1 -1
- package/resources/websites/websites.mjs +1 -14
- package/resources/websites/websites.mjs.map +1 -1
- package/src/index.ts +1 -9
- package/src/resources/auctions/auctions.ts +0 -4
- package/src/resources/auctions/index.ts +0 -2
- package/src/resources/auctions/website-user-attributes/index.ts +1 -9
- package/src/resources/auctions/website-user-attributes/values.ts +1 -69
- package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +1 -71
- package/src/resources/index.ts +1 -7
- package/src/resources/loyalty/index.ts +0 -2
- package/src/resources/loyalty/loyalty.ts +0 -4
- package/src/resources/loyalty/rule-edits.ts +20 -0
- package/src/resources/loyalty/rule-groups.ts +5 -0
- package/src/resources/loyalty/rules.ts +48 -7
- package/src/resources/loyalty/transactions/index.ts +1 -9
- package/src/resources/loyalty/transactions/rule-statuses.ts +0 -91
- package/src/resources/loyalty/transactions/transactions.ts +1 -160
- package/src/resources/users/users.ts +22 -0
- package/src/resources/websites/index.ts +2 -13
- package/src/resources/websites/website-collections.ts +1 -179
- package/src/resources/websites/websites.ts +3 -141
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -712,6 +712,11 @@ export namespace RuleCreateResponse {
|
|
|
712
712
|
*/
|
|
713
713
|
rewardByBatch?: boolean | null;
|
|
714
714
|
|
|
715
|
+
/**
|
|
716
|
+
* Criteria to evaluate the reward.
|
|
717
|
+
*/
|
|
718
|
+
rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
|
|
719
|
+
|
|
715
720
|
/**
|
|
716
721
|
* Flag indicating if the reward is rewarded per action.
|
|
717
722
|
*/
|
|
@@ -1895,6 +1900,11 @@ export namespace RuleUpdateResponse {
|
|
|
1895
1900
|
*/
|
|
1896
1901
|
rewardByBatch?: boolean | null;
|
|
1897
1902
|
|
|
1903
|
+
/**
|
|
1904
|
+
* Criteria to evaluate the reward.
|
|
1905
|
+
*/
|
|
1906
|
+
rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
|
|
1907
|
+
|
|
1898
1908
|
/**
|
|
1899
1909
|
* Flag indicating if the reward is rewarded per action.
|
|
1900
1910
|
*/
|
|
@@ -2958,6 +2968,11 @@ export namespace RuleListResponse {
|
|
|
2958
2968
|
*/
|
|
2959
2969
|
rewardByBatch?: boolean | null;
|
|
2960
2970
|
|
|
2971
|
+
/**
|
|
2972
|
+
* Criteria to evaluate the reward.
|
|
2973
|
+
*/
|
|
2974
|
+
rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
|
|
2975
|
+
|
|
2961
2976
|
/**
|
|
2962
2977
|
* Flag indicating if the reward is rewarded per action.
|
|
2963
2978
|
*/
|
|
@@ -3581,11 +3596,15 @@ export namespace RuleGetStatusResponse {
|
|
|
3581
3596
|
export interface Data {
|
|
3582
3597
|
loyaltyRuleId: string;
|
|
3583
3598
|
|
|
3584
|
-
status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
3585
|
-
|
|
3586
3599
|
userId: string;
|
|
3587
3600
|
|
|
3588
3601
|
message?: string;
|
|
3602
|
+
|
|
3603
|
+
/**
|
|
3604
|
+
* Status of the queued job, this is only returned if the job is queued and being
|
|
3605
|
+
* processed, this wil be retained for 10 minutes after the job is completed
|
|
3606
|
+
*/
|
|
3607
|
+
status?: 'pending' | 'processing' | 'completed' | 'failed';
|
|
3589
3608
|
}
|
|
3590
3609
|
}
|
|
3591
3610
|
|
|
@@ -4142,6 +4161,11 @@ export namespace RuleCreateParams {
|
|
|
4142
4161
|
*/
|
|
4143
4162
|
rewardByBatch?: boolean | null;
|
|
4144
4163
|
|
|
4164
|
+
/**
|
|
4165
|
+
* Criteria to evaluate the reward.
|
|
4166
|
+
*/
|
|
4167
|
+
rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
|
|
4168
|
+
|
|
4145
4169
|
/**
|
|
4146
4170
|
* Flag indicating if the reward is rewarded per action.
|
|
4147
4171
|
*/
|
|
@@ -5323,6 +5347,11 @@ export namespace RuleUpdateParams {
|
|
|
5323
5347
|
*/
|
|
5324
5348
|
rewardByBatch?: boolean | null;
|
|
5325
5349
|
|
|
5350
|
+
/**
|
|
5351
|
+
* Criteria to evaluate the reward.
|
|
5352
|
+
*/
|
|
5353
|
+
rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
|
|
5354
|
+
|
|
5326
5355
|
/**
|
|
5327
5356
|
* Flag indicating if the reward is rewarded per action.
|
|
5328
5357
|
*/
|
|
@@ -5941,11 +5970,6 @@ export interface RuleListParams {
|
|
|
5941
5970
|
*/
|
|
5942
5971
|
collectionAddress?: string;
|
|
5943
5972
|
|
|
5944
|
-
/**
|
|
5945
|
-
* If true this will only return loyalty rule chains
|
|
5946
|
-
*/
|
|
5947
|
-
includeLoyaltyRuleChains?: 'true' | 'false';
|
|
5948
|
-
|
|
5949
5973
|
/**
|
|
5950
5974
|
* If true this will only return active rules, the rules for which the startTime is
|
|
5951
5975
|
* in the past and the endTime is in the future
|
|
@@ -6046,8 +6070,25 @@ export interface RuleCompleteParams {
|
|
|
6046
6070
|
}
|
|
6047
6071
|
|
|
6048
6072
|
export interface RuleGetStatusParams {
|
|
6073
|
+
/**
|
|
6074
|
+
* Number of items to return
|
|
6075
|
+
*/
|
|
6076
|
+
limit?: number | null;
|
|
6077
|
+
|
|
6078
|
+
/**
|
|
6079
|
+
* Unique identifier for the loyalty rule[s]
|
|
6080
|
+
*/
|
|
6081
|
+
loyaltyRuleId?: string | Array<string>;
|
|
6082
|
+
|
|
6049
6083
|
organizationId?: string;
|
|
6050
6084
|
|
|
6085
|
+
/**
|
|
6086
|
+
* Starting after item
|
|
6087
|
+
*/
|
|
6088
|
+
startingAfter?: string;
|
|
6089
|
+
|
|
6090
|
+
userGroupId?: string;
|
|
6091
|
+
|
|
6051
6092
|
userId?: string;
|
|
6052
6093
|
|
|
6053
6094
|
walletAddress?: string;
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
4
|
-
RuleStatuses,
|
|
5
|
-
type RuleStatusUpdateResponse,
|
|
6
|
-
type RuleStatusListResponse,
|
|
7
|
-
type RuleStatusUpdateParams,
|
|
8
|
-
type RuleStatusListParams,
|
|
9
|
-
} from './rule-statuses';
|
|
3
|
+
export { RuleStatuses, type RuleStatusUpdateResponse, type RuleStatusUpdateParams } from './rule-statuses';
|
|
10
4
|
export {
|
|
11
5
|
Transactions,
|
|
12
6
|
type TransactionCreateTransactionResponse,
|
|
13
7
|
type TransactionGetTransactionEntriesResponse,
|
|
14
|
-
type TransactionListRuleChainsResponse,
|
|
15
8
|
type TransactionCreateTransactionParams,
|
|
16
9
|
type TransactionGetTransactionEntriesParams,
|
|
17
|
-
type TransactionListRuleChainsParams,
|
|
18
10
|
} from './transactions';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../resource';
|
|
4
|
-
import { isRequestOptions } from '../../../core';
|
|
5
4
|
import * as Core from '../../../core';
|
|
6
5
|
|
|
7
6
|
export class RuleStatuses extends APIResource {
|
|
@@ -22,27 +21,6 @@ export class RuleStatuses extends APIResource {
|
|
|
22
21
|
): Core.APIPromise<RuleStatusUpdateResponse> {
|
|
23
22
|
return this._client.post('/api/loyalty/rule_statuses', { body, ...options });
|
|
24
23
|
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Retrieve loyalty rule statuses
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```ts
|
|
31
|
-
* const ruleStatuses =
|
|
32
|
-
* await client.loyalty.transactions.ruleStatuses.list();
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
list(query?: RuleStatusListParams, options?: Core.RequestOptions): Core.APIPromise<RuleStatusListResponse>;
|
|
36
|
-
list(options?: Core.RequestOptions): Core.APIPromise<RuleStatusListResponse>;
|
|
37
|
-
list(
|
|
38
|
-
query: RuleStatusListParams | Core.RequestOptions = {},
|
|
39
|
-
options?: Core.RequestOptions,
|
|
40
|
-
): Core.APIPromise<RuleStatusListResponse> {
|
|
41
|
-
if (isRequestOptions(query)) {
|
|
42
|
-
return this.list({}, query);
|
|
43
|
-
}
|
|
44
|
-
return this._client.get('/api/loyalty/rule_statuses', { query, ...options });
|
|
45
|
-
}
|
|
46
24
|
}
|
|
47
25
|
|
|
48
26
|
export interface RuleStatusUpdateResponse {
|
|
@@ -63,32 +41,6 @@ export interface RuleStatusUpdateResponse {
|
|
|
63
41
|
websiteId: string;
|
|
64
42
|
}
|
|
65
43
|
|
|
66
|
-
export interface RuleStatusListResponse {
|
|
67
|
-
data: Array<RuleStatusListResponse.Data>;
|
|
68
|
-
|
|
69
|
-
hasNextPage: boolean;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export namespace RuleStatusListResponse {
|
|
73
|
-
export interface Data {
|
|
74
|
-
id: string;
|
|
75
|
-
|
|
76
|
-
createdAt: string;
|
|
77
|
-
|
|
78
|
-
loyaltyRuleId: string;
|
|
79
|
-
|
|
80
|
-
organizationId: string;
|
|
81
|
-
|
|
82
|
-
progress: number;
|
|
83
|
-
|
|
84
|
-
updatedAt: string;
|
|
85
|
-
|
|
86
|
-
userId: string;
|
|
87
|
-
|
|
88
|
-
websiteId: string;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
44
|
export interface RuleStatusUpdateParams {
|
|
93
45
|
/**
|
|
94
46
|
* Unique identifier for the loyalty rule
|
|
@@ -127,52 +79,9 @@ export interface RuleStatusUpdateParams {
|
|
|
127
79
|
websiteId?: string;
|
|
128
80
|
}
|
|
129
81
|
|
|
130
|
-
export interface RuleStatusListParams {
|
|
131
|
-
/**
|
|
132
|
-
* Number of items to return
|
|
133
|
-
*/
|
|
134
|
-
limit?: number | null;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Unique identifier for the loyalty rule[s]
|
|
138
|
-
*/
|
|
139
|
-
loyaltyRuleId?: string | Array<string>;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Unique identifier for the organization
|
|
143
|
-
*/
|
|
144
|
-
organizationId?: string;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Starting after item
|
|
148
|
-
*/
|
|
149
|
-
startingAfter?: string;
|
|
150
|
-
|
|
151
|
-
userGroupExternalIdentifier?: string;
|
|
152
|
-
|
|
153
|
-
userGroupId?: string;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* User ID(s) to filter accounts by
|
|
157
|
-
*/
|
|
158
|
-
userId?: string | Array<string>;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Wallet address(es) to filter accounts by
|
|
162
|
-
*/
|
|
163
|
-
walletAddress?: string | Array<string>;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Unique identifier for the website
|
|
167
|
-
*/
|
|
168
|
-
websiteId?: string;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
82
|
export declare namespace RuleStatuses {
|
|
172
83
|
export {
|
|
173
84
|
type RuleStatusUpdateResponse as RuleStatusUpdateResponse,
|
|
174
|
-
type RuleStatusListResponse as RuleStatusListResponse,
|
|
175
85
|
type RuleStatusUpdateParams as RuleStatusUpdateParams,
|
|
176
|
-
type RuleStatusListParams as RuleStatusListParams,
|
|
177
86
|
};
|
|
178
87
|
}
|
|
@@ -4,13 +4,7 @@ import { APIResource } from '../../../resource';
|
|
|
4
4
|
import { isRequestOptions } from '../../../core';
|
|
5
5
|
import * as Core from '../../../core';
|
|
6
6
|
import * as RuleStatusesAPI from './rule-statuses';
|
|
7
|
-
import {
|
|
8
|
-
RuleStatusListParams,
|
|
9
|
-
RuleStatusListResponse,
|
|
10
|
-
RuleStatusUpdateParams,
|
|
11
|
-
RuleStatusUpdateResponse,
|
|
12
|
-
RuleStatuses,
|
|
13
|
-
} from './rule-statuses';
|
|
7
|
+
import { RuleStatusUpdateParams, RuleStatusUpdateResponse, RuleStatuses } from './rule-statuses';
|
|
14
8
|
|
|
15
9
|
export class Transactions extends APIResource {
|
|
16
10
|
ruleStatuses: RuleStatusesAPI.RuleStatuses = new RuleStatusesAPI.RuleStatuses(this._client);
|
|
@@ -60,25 +54,6 @@ export class Transactions extends APIResource {
|
|
|
60
54
|
}
|
|
61
55
|
return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
|
|
62
56
|
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Retrieve configured loyalty rule chains
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* const response =
|
|
70
|
-
* await client.loyalty.transactions.listRuleChains({
|
|
71
|
-
* organizationId: '123e4567-e89b-12d3-a456-426614174001',
|
|
72
|
-
* websiteId: '123e4567-e89b-12d3-a456-426614174002',
|
|
73
|
-
* });
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
listRuleChains(
|
|
77
|
-
query: TransactionListRuleChainsParams,
|
|
78
|
-
options?: Core.RequestOptions,
|
|
79
|
-
): Core.APIPromise<TransactionListRuleChainsResponse> {
|
|
80
|
-
return this._client.get('/api/loyalty/rule_chains', { query, ...options });
|
|
81
|
-
}
|
|
82
57
|
}
|
|
83
58
|
|
|
84
59
|
export interface TransactionCreateTransactionResponse {
|
|
@@ -238,114 +213,6 @@ export namespace TransactionGetTransactionEntriesResponse {
|
|
|
238
213
|
}
|
|
239
214
|
}
|
|
240
215
|
|
|
241
|
-
export interface TransactionListRuleChainsResponse {
|
|
242
|
-
data: Array<TransactionListRuleChainsResponse.Data>;
|
|
243
|
-
|
|
244
|
-
hasNextPage: boolean;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
export namespace TransactionListRuleChainsResponse {
|
|
248
|
-
export interface Data {
|
|
249
|
-
/**
|
|
250
|
-
* Unique identifier for the rule chain
|
|
251
|
-
*/
|
|
252
|
-
id: string;
|
|
253
|
-
|
|
254
|
-
loyaltyConditions: Array<Data.LoyaltyCondition>;
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Unique identifier for the loyalty rule
|
|
258
|
-
*/
|
|
259
|
-
loyaltyRuleId: string;
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Name of the rule chain
|
|
263
|
-
*/
|
|
264
|
-
name: string;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
export namespace Data {
|
|
268
|
-
export interface LoyaltyCondition {
|
|
269
|
-
/**
|
|
270
|
-
* Unique identifier for the condition
|
|
271
|
-
*/
|
|
272
|
-
id: string;
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Amount of the condition
|
|
276
|
-
*/
|
|
277
|
-
amount: number | null;
|
|
278
|
-
|
|
279
|
-
association: Array<LoyaltyCondition.Association>;
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* URL of the CSV file
|
|
283
|
-
*/
|
|
284
|
-
csvUrl: string | null;
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Description of the condition
|
|
288
|
-
*/
|
|
289
|
-
description: string | null;
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Number of times the condition must be met
|
|
293
|
-
*/
|
|
294
|
-
repeatCount: number | null;
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* Number of times the condition must be met
|
|
298
|
-
*/
|
|
299
|
-
requiredCount: number | null;
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Type of the condition
|
|
303
|
-
*/
|
|
304
|
-
type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
export namespace LoyaltyCondition {
|
|
308
|
-
export interface Association {
|
|
309
|
-
/**
|
|
310
|
-
* Unique identifier for the association
|
|
311
|
-
*/
|
|
312
|
-
id: string;
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Unique identifier for the loyalty badge
|
|
316
|
-
*/
|
|
317
|
-
loyaltyBadgeId: string | null;
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Unique identifier for the loyalty currency
|
|
321
|
-
*/
|
|
322
|
-
loyaltyCurrencyId: string | null;
|
|
323
|
-
|
|
324
|
-
loyaltyRule: Association.LoyaltyRule | null;
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* Unique identifier for the loyalty rule group
|
|
328
|
-
*/
|
|
329
|
-
loyaltyRuleGroupId: string | null;
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* Unique identifier for the loyalty rule
|
|
333
|
-
*/
|
|
334
|
-
loyaltyRuleId: string | null;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
export namespace Association {
|
|
338
|
-
export interface LoyaltyRule {
|
|
339
|
-
/**
|
|
340
|
-
* Name of the loyalty rule
|
|
341
|
-
*/
|
|
342
|
-
name: string;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
216
|
export interface TransactionCreateTransactionParams {
|
|
350
217
|
/**
|
|
351
218
|
* Description of the loyalty transaction
|
|
@@ -633,45 +500,19 @@ export interface TransactionGetTransactionEntriesParams {
|
|
|
633
500
|
websiteId?: string;
|
|
634
501
|
}
|
|
635
502
|
|
|
636
|
-
export interface TransactionListRuleChainsParams {
|
|
637
|
-
/**
|
|
638
|
-
* Unique identifier for the organization
|
|
639
|
-
*/
|
|
640
|
-
organizationId: string;
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* Unique identifier for the website
|
|
644
|
-
*/
|
|
645
|
-
websiteId: string;
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* Number of rule chains to return
|
|
649
|
-
*/
|
|
650
|
-
limit?: number;
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* Starting after the given rule chain ID
|
|
654
|
-
*/
|
|
655
|
-
startingAfter?: string;
|
|
656
|
-
}
|
|
657
|
-
|
|
658
503
|
Transactions.RuleStatuses = RuleStatuses;
|
|
659
504
|
|
|
660
505
|
export declare namespace Transactions {
|
|
661
506
|
export {
|
|
662
507
|
type TransactionCreateTransactionResponse as TransactionCreateTransactionResponse,
|
|
663
508
|
type TransactionGetTransactionEntriesResponse as TransactionGetTransactionEntriesResponse,
|
|
664
|
-
type TransactionListRuleChainsResponse as TransactionListRuleChainsResponse,
|
|
665
509
|
type TransactionCreateTransactionParams as TransactionCreateTransactionParams,
|
|
666
510
|
type TransactionGetTransactionEntriesParams as TransactionGetTransactionEntriesParams,
|
|
667
|
-
type TransactionListRuleChainsParams as TransactionListRuleChainsParams,
|
|
668
511
|
};
|
|
669
512
|
|
|
670
513
|
export {
|
|
671
514
|
RuleStatuses as RuleStatuses,
|
|
672
515
|
type RuleStatusUpdateResponse as RuleStatusUpdateResponse,
|
|
673
|
-
type RuleStatusListResponse as RuleStatusListResponse,
|
|
674
516
|
type RuleStatusUpdateParams as RuleStatusUpdateParams,
|
|
675
|
-
type RuleStatusListParams as RuleStatusListParams,
|
|
676
517
|
};
|
|
677
518
|
}
|
|
@@ -164,6 +164,8 @@ export namespace UserListResponse {
|
|
|
164
164
|
temporaryLoyaltyUser?: boolean | null;
|
|
165
165
|
|
|
166
166
|
userMetadata?: Array<Data.UserMetadata> | null;
|
|
167
|
+
|
|
168
|
+
websiteUserAttributes?: Array<Data.WebsiteUserAttribute> | null;
|
|
167
169
|
}
|
|
168
170
|
|
|
169
171
|
export namespace Data {
|
|
@@ -257,6 +259,26 @@ export namespace UserListResponse {
|
|
|
257
259
|
|
|
258
260
|
YTChannelId?: string | null;
|
|
259
261
|
}
|
|
262
|
+
|
|
263
|
+
export interface WebsiteUserAttribute {
|
|
264
|
+
id: string;
|
|
265
|
+
|
|
266
|
+
label: string;
|
|
267
|
+
|
|
268
|
+
websiteUserAttributeValues: Array<WebsiteUserAttribute.WebsiteUserAttributeValue>;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export namespace WebsiteUserAttribute {
|
|
272
|
+
export interface WebsiteUserAttributeValue {
|
|
273
|
+
id: string;
|
|
274
|
+
|
|
275
|
+
userId: string;
|
|
276
|
+
|
|
277
|
+
value: string;
|
|
278
|
+
|
|
279
|
+
websiteUserAttributeId: string;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
260
282
|
}
|
|
261
283
|
}
|
|
262
284
|
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
4
|
-
WebsiteCollections,
|
|
5
|
-
type WebsiteCollectionListResponse,
|
|
6
|
-
type WebsiteCollectionCreateParams,
|
|
7
|
-
type WebsiteCollectionListParams,
|
|
8
|
-
} from './website-collections';
|
|
3
|
+
export { WebsiteCollections } from './website-collections';
|
|
9
4
|
export {
|
|
10
5
|
WebsiteUserRoles,
|
|
11
6
|
type WebsiteUserRoleListResponse,
|
|
@@ -13,10 +8,4 @@ export {
|
|
|
13
8
|
type WebsiteUserRoleListParams,
|
|
14
9
|
type WebsiteUserRoleAssignParams,
|
|
15
10
|
} from './website-user-roles';
|
|
16
|
-
export {
|
|
17
|
-
Websites,
|
|
18
|
-
type WebsiteCreateResponse,
|
|
19
|
-
type WebsiteListResponse,
|
|
20
|
-
type WebsiteCreateParams,
|
|
21
|
-
type WebsiteListParams,
|
|
22
|
-
} from './websites';
|
|
11
|
+
export { Websites, type WebsiteListResponse, type WebsiteListParams } from './websites';
|
|
@@ -1,183 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
|
-
import * as Core from '../../core';
|
|
5
4
|
|
|
6
|
-
export class WebsiteCollections extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Creates a new collection under a website
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* await client.websites.websiteCollections.create({
|
|
13
|
-
* collectionAddress:
|
|
14
|
-
* '0x2c02efDd09B3BA1AEaDd3dCAa7aC7A37C1CBDA8A',
|
|
15
|
-
* name: 'x',
|
|
16
|
-
* network: 'abstract',
|
|
17
|
-
* organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
18
|
-
* sortId: 99999,
|
|
19
|
-
* websiteId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
20
|
-
* });
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
create(body: WebsiteCollectionCreateParams, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
24
|
-
return this._client.post('/api/website_collections', {
|
|
25
|
-
body,
|
|
26
|
-
...options,
|
|
27
|
-
headers: { Accept: '*/*', ...options?.headers },
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Retrieves collections for a specific website.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```ts
|
|
36
|
-
* const websiteCollections =
|
|
37
|
-
* await client.websites.websiteCollections.list({
|
|
38
|
-
* websiteId: '123e4567-e89b-12d3-a456-426614174000',
|
|
39
|
-
* });
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
list(
|
|
43
|
-
query: WebsiteCollectionListParams,
|
|
44
|
-
options?: Core.RequestOptions,
|
|
45
|
-
): Core.APIPromise<WebsiteCollectionListResponse> {
|
|
46
|
-
return this._client.get('/api/website_collections', { query, ...options });
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Response schema for fetching website collections
|
|
52
|
-
*/
|
|
53
|
-
export interface WebsiteCollectionListResponse {
|
|
54
|
-
/**
|
|
55
|
-
* Array of websites
|
|
56
|
-
*/
|
|
57
|
-
data: Array<WebsiteCollectionListResponse.Data>;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Indicates if more pages are available
|
|
61
|
-
*/
|
|
62
|
-
hasNextPage: boolean;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export namespace WebsiteCollectionListResponse {
|
|
66
|
-
export interface Data {
|
|
67
|
-
/**
|
|
68
|
-
* Website Collection ID
|
|
69
|
-
*/
|
|
70
|
-
id: string;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface WebsiteCollectionCreateParams {
|
|
75
|
-
collectionAddress: string;
|
|
76
|
-
|
|
77
|
-
name: string;
|
|
78
|
-
|
|
79
|
-
network:
|
|
80
|
-
| 'abstract'
|
|
81
|
-
| 'abstractTestnet'
|
|
82
|
-
| 'apechain'
|
|
83
|
-
| 'arbitrum'
|
|
84
|
-
| 'avalanche'
|
|
85
|
-
| 'avalancheFuji'
|
|
86
|
-
| 'base'
|
|
87
|
-
| 'baseSepolia'
|
|
88
|
-
| 'berachain'
|
|
89
|
-
| 'berachainArtio'
|
|
90
|
-
| 'berachainBepolia'
|
|
91
|
-
| 'binance'
|
|
92
|
-
| 'bscTestnet'
|
|
93
|
-
| 'campTestnet'
|
|
94
|
-
| 'fantom'
|
|
95
|
-
| 'fantomTestnet'
|
|
96
|
-
| 'flowMainnet'
|
|
97
|
-
| 'mainnet'
|
|
98
|
-
| 'nexusTestnet'
|
|
99
|
-
| 'optimism'
|
|
100
|
-
| 'polygon'
|
|
101
|
-
| 'polygon_mumbai'
|
|
102
|
-
| 'skaleNebula'
|
|
103
|
-
| 'solana'
|
|
104
|
-
| 'sophon'
|
|
105
|
-
| 'sophonTestnet'
|
|
106
|
-
| 'sui'
|
|
107
|
-
| 'superseed'
|
|
108
|
-
| 'superseedSepolia'
|
|
109
|
-
| 'vanar'
|
|
110
|
-
| 'xai'
|
|
111
|
-
| 'zksync'
|
|
112
|
-
| 'coti'
|
|
113
|
-
| 'cotiTestnet'
|
|
114
|
-
| 'morph'
|
|
115
|
-
| 'morphTestnet'
|
|
116
|
-
| 'morphHolesky'
|
|
117
|
-
| 'ultra'
|
|
118
|
-
| 'ultraTestnet'
|
|
119
|
-
| 'nitrograph'
|
|
120
|
-
| 'sepolia'
|
|
121
|
-
| 'optimism_sepolia'
|
|
122
|
-
| 'arbitrumSepolia'
|
|
123
|
-
| 'goerli'
|
|
124
|
-
| 'optimism_goerli'
|
|
125
|
-
| 'arbitrumGoerli'
|
|
126
|
-
| 'basecamp';
|
|
127
|
-
|
|
128
|
-
organizationId: string;
|
|
129
|
-
|
|
130
|
-
sortId: number;
|
|
131
|
-
|
|
132
|
-
websiteId: string;
|
|
133
|
-
|
|
134
|
-
discordUrl?: string;
|
|
135
|
-
|
|
136
|
-
homeUrl?: string;
|
|
137
|
-
|
|
138
|
-
imageUrl?: string | null;
|
|
139
|
-
|
|
140
|
-
instagramUsername?: string;
|
|
141
|
-
|
|
142
|
-
royaltyFee?: number | null;
|
|
143
|
-
|
|
144
|
-
royaltyFeeAddress?: string | null;
|
|
145
|
-
|
|
146
|
-
stakingAddress?: string;
|
|
147
|
-
|
|
148
|
-
telegramUrl?: string;
|
|
149
|
-
|
|
150
|
-
themeId?: string;
|
|
151
|
-
|
|
152
|
-
twitterUsername?: string;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export interface WebsiteCollectionListParams {
|
|
156
|
-
/**
|
|
157
|
-
* Filter by website ID
|
|
158
|
-
*/
|
|
159
|
-
websiteId: string;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Number of items to return
|
|
163
|
-
*/
|
|
164
|
-
limit?: number;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Filter by organization ID
|
|
168
|
-
*/
|
|
169
|
-
organizationId?: string;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Pagination cursor, start after this ID
|
|
173
|
-
*/
|
|
174
|
-
startingAfter?: string;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export declare namespace WebsiteCollections {
|
|
178
|
-
export {
|
|
179
|
-
type WebsiteCollectionListResponse as WebsiteCollectionListResponse,
|
|
180
|
-
type WebsiteCollectionCreateParams as WebsiteCollectionCreateParams,
|
|
181
|
-
type WebsiteCollectionListParams as WebsiteCollectionListParams,
|
|
182
|
-
};
|
|
183
|
-
}
|
|
5
|
+
export class WebsiteCollections extends APIResource {}
|