@snagsolutions/sdk 0.1.0-alpha.21 → 0.1.0-alpha.210
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 +1703 -0
- package/LICENSE +1 -1
- package/README.md +15 -23
- package/core.d.ts +19 -5
- package/core.d.ts.map +1 -1
- package/core.js +24 -17
- package/core.js.map +1 -1
- package/core.mjs +24 -17
- package/core.mjs.map +1 -1
- package/index.d.mts +7 -4
- package/index.d.ts +7 -4
- package/index.d.ts.map +1 -1
- package/index.js +8 -4
- package/index.js.map +1 -1
- package/index.mjs +8 -4
- package/index.mjs.map +1 -1
- package/package.json +4 -5
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/assets.d.ts +16 -2
- package/resources/assets.d.ts.map +1 -1
- package/resources/assets.js +8 -0
- package/resources/assets.js.map +1 -1
- package/resources/assets.mjs +8 -0
- package/resources/assets.mjs.map +1 -1
- package/resources/auctions/auctions.d.ts +368 -0
- package/resources/auctions/auctions.d.ts.map +1 -0
- package/resources/auctions/auctions.js +72 -0
- package/resources/auctions/auctions.js.map +1 -0
- package/resources/auctions/auctions.mjs +45 -0
- package/resources/auctions/auctions.mjs.map +1 -0
- package/resources/auctions/index.d.ts +3 -0
- package/resources/auctions/index.d.ts.map +1 -0
- package/resources/auctions/index.js +9 -0
- package/resources/auctions/index.js.map +1 -0
- package/resources/auctions/index.mjs +4 -0
- package/resources/auctions/index.mjs.map +1 -0
- package/resources/auctions/website-user-attributes/index.d.ts +3 -0
- package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
- package/resources/auctions/website-user-attributes/index.js +9 -0
- package/resources/auctions/website-user-attributes/index.js.map +1 -0
- package/resources/auctions/website-user-attributes/index.mjs +4 -0
- package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
- package/resources/auctions/website-user-attributes/values.d.ts +126 -0
- package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
- package/resources/auctions/website-user-attributes/values.js +49 -0
- package/resources/auctions/website-user-attributes/values.js.map +1 -0
- package/resources/auctions/website-user-attributes/values.mjs +45 -0
- package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +136 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
- package/resources/auctions/website-user-attributes.d.ts +2 -0
- package/resources/auctions/website-user-attributes.d.ts.map +1 -0
- package/resources/auctions/website-user-attributes.js +19 -0
- package/resources/auctions/website-user-attributes.js.map +1 -0
- package/resources/auctions/website-user-attributes.mjs +3 -0
- package/resources/auctions/website-user-attributes.mjs.map +1 -0
- package/resources/auctions.d.ts +1 -133
- package/resources/auctions.d.ts.map +1 -1
- package/resources/auctions.js +15 -22
- package/resources/auctions.js.map +1 -1
- package/resources/auctions.mjs +1 -20
- package/resources/auctions.mjs.map +1 -1
- package/resources/auth.d.ts +17 -4
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.js.map +1 -1
- package/resources/auth.mjs.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +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/account-streaks.d.ts +96 -0
- package/resources/loyalty/account-streaks.d.ts.map +1 -0
- package/resources/loyalty/account-streaks.js +24 -0
- package/resources/loyalty/account-streaks.js.map +1 -0
- package/resources/loyalty/account-streaks.mjs +20 -0
- package/resources/loyalty/account-streaks.mjs.map +1 -0
- package/resources/loyalty/accounts.d.ts +60 -16
- package/resources/loyalty/accounts.d.ts.map +1 -1
- package/resources/loyalty/accounts.js +14 -0
- package/resources/loyalty/accounts.js.map +1 -1
- package/resources/loyalty/accounts.mjs +14 -0
- package/resources/loyalty/accounts.mjs.map +1 -1
- package/resources/loyalty/badges.d.ts +666 -135
- package/resources/loyalty/badges.d.ts.map +1 -1
- package/resources/loyalty/badges.js +19 -1
- package/resources/loyalty/badges.js.map +1 -1
- package/resources/loyalty/badges.mjs +19 -1
- package/resources/loyalty/badges.mjs.map +1 -1
- package/resources/loyalty/currencies.d.ts +19 -0
- package/resources/loyalty/currencies.d.ts.map +1 -1
- package/resources/loyalty/currencies.js +19 -0
- package/resources/loyalty/currencies.js.map +1 -1
- package/resources/loyalty/currencies.mjs +19 -0
- package/resources/loyalty/currencies.mjs.map +1 -1
- package/resources/loyalty/index.d.ts +4 -4
- package/resources/loyalty/index.d.ts.map +1 -1
- package/resources/loyalty/index.js +5 -5
- package/resources/loyalty/index.js.map +1 -1
- package/resources/loyalty/index.mjs +3 -3
- package/resources/loyalty/index.mjs.map +1 -1
- package/resources/loyalty/loyalty.d.ts +11 -11
- package/resources/loyalty/loyalty.d.ts.map +1 -1
- package/resources/loyalty/loyalty.js +6 -6
- package/resources/loyalty/loyalty.js.map +1 -1
- package/resources/loyalty/loyalty.mjs +7 -7
- package/resources/loyalty/loyalty.mjs.map +1 -1
- package/resources/loyalty/multipliers.d.ts +39 -2
- package/resources/loyalty/multipliers.d.ts.map +1 -1
- package/resources/loyalty/multipliers.js +23 -0
- package/resources/loyalty/multipliers.js.map +1 -1
- package/resources/loyalty/multipliers.mjs +23 -0
- package/resources/loyalty/multipliers.mjs.map +1 -1
- package/resources/loyalty/questions-responses.d.ts +55 -4
- package/resources/loyalty/questions-responses.d.ts.map +1 -1
- package/resources/loyalty/questions-responses.js +9 -0
- package/resources/loyalty/questions-responses.js.map +1 -1
- package/resources/loyalty/questions-responses.mjs +9 -0
- package/resources/loyalty/questions-responses.mjs.map +1 -1
- package/resources/loyalty/questions.d.ts +60 -6
- package/resources/loyalty/questions.d.ts.map +1 -1
- package/resources/loyalty/questions.js +39 -0
- package/resources/loyalty/questions.js.map +1 -1
- package/resources/loyalty/questions.mjs +39 -0
- package/resources/loyalty/questions.mjs.map +1 -1
- package/resources/loyalty/rule-edits.d.ts +2714 -8
- package/resources/loyalty/rule-edits.d.ts.map +1 -1
- package/resources/loyalty/rule-edits.js +14 -0
- package/resources/loyalty/rule-edits.js.map +1 -1
- package/resources/loyalty/rule-edits.mjs +14 -0
- package/resources/loyalty/rule-edits.mjs.map +1 -1
- package/resources/loyalty/rule-groups.d.ts +300 -64
- package/resources/loyalty/rule-groups.d.ts.map +1 -1
- package/resources/loyalty/rule-groups.js +38 -2
- package/resources/loyalty/rule-groups.js.map +1 -1
- package/resources/loyalty/rule-groups.mjs +38 -2
- package/resources/loyalty/rule-groups.mjs.map +1 -1
- package/resources/loyalty/rules.d.ts +2036 -290
- package/resources/loyalty/rules.d.ts.map +1 -1
- package/resources/loyalty/rules.js +40 -9
- package/resources/loyalty/rules.js.map +1 -1
- package/resources/loyalty/rules.mjs +40 -9
- package/resources/loyalty/rules.mjs.map +1 -1
- package/resources/loyalty/transactions/index.d.ts +3 -0
- package/resources/loyalty/transactions/index.d.ts.map +1 -0
- package/resources/loyalty/transactions/index.js +9 -0
- package/resources/loyalty/transactions/index.js.map +1 -0
- package/resources/loyalty/transactions/index.mjs +4 -0
- package/resources/loyalty/transactions/index.mjs.map +1 -0
- package/resources/loyalty/transactions/rule-statuses.d.ts +120 -0
- package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
- package/resources/loyalty/transactions/rule-statuses.js +30 -0
- package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
- package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
- package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
- package/resources/loyalty/transactions/transactions.d.ts +410 -0
- package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
- package/resources/loyalty/transactions/transactions.js +76 -0
- package/resources/loyalty/transactions/transactions.js.map +1 -0
- package/resources/loyalty/transactions/transactions.mjs +49 -0
- package/resources/loyalty/transactions/transactions.mjs.map +1 -0
- package/resources/loyalty/transactions.d.ts +1 -248
- package/resources/loyalty/transactions.d.ts.map +1 -1
- package/resources/loyalty/transactions.js +15 -18
- package/resources/loyalty/transactions.js.map +1 -1
- package/resources/loyalty/transactions.mjs +1 -16
- package/resources/loyalty/transactions.mjs.map +1 -1
- package/resources/minting.d.ts +5 -5
- package/resources/minting.d.ts.map +1 -1
- package/resources/referral/referral.d.ts +12 -3
- package/resources/referral/referral.d.ts.map +1 -1
- package/resources/referral/referral.js +11 -5
- package/resources/referral/referral.js.map +1 -1
- package/resources/referral/referral.mjs +11 -5
- package/resources/referral/referral.mjs.map +1 -1
- package/resources/referral/users.d.ts +30 -3
- package/resources/referral/users.d.ts.map +1 -1
- package/resources/referral/users.js +12 -4
- package/resources/referral/users.js.map +1 -1
- package/resources/referral/users.mjs +12 -4
- package/resources/referral/users.mjs.map +1 -1
- package/resources/users/index.d.ts +1 -1
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/index.js.map +1 -1
- package/resources/users/index.mjs.map +1 -1
- package/resources/users/metadatas.d.ts +36 -3
- package/resources/users/metadatas.d.ts.map +1 -1
- package/resources/users/metadatas.js.map +1 -1
- package/resources/users/metadatas.mjs.map +1 -1
- package/resources/users/users.d.ts +192 -35
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js +58 -1
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs +58 -1
- package/resources/users/users.mjs.map +1 -1
- package/resources/websites/website-collections.d.ts +22 -1
- package/resources/websites/website-collections.d.ts.map +1 -1
- package/resources/websites/website-collections.js +21 -0
- package/resources/websites/website-collections.js.map +1 -1
- package/resources/websites/website-collections.mjs +21 -0
- package/resources/websites/website-collections.mjs.map +1 -1
- package/resources/websites/website-user-roles.d.ts +24 -1
- package/resources/websites/website-user-roles.d.ts.map +1 -1
- package/resources/websites/website-user-roles.js +23 -0
- package/resources/websites/website-user-roles.js.map +1 -1
- package/resources/websites/website-user-roles.mjs +23 -0
- package/resources/websites/website-user-roles.mjs.map +1 -1
- package/resources/websites/websites.d.ts +12 -0
- package/resources/websites/websites.d.ts.map +1 -1
- package/resources/websites/websites.js +7 -0
- package/resources/websites/websites.js.map +1 -1
- package/resources/websites/websites.mjs +7 -0
- package/resources/websites/websites.mjs.map +1 -1
- package/src/core.ts +39 -16
- package/src/index.ts +31 -2
- package/src/resource.ts +1 -1
- package/src/resources/assets.ts +18 -3
- package/src/resources/auctions/auctions.ts +561 -0
- package/src/resources/auctions/index.ts +19 -0
- package/src/resources/auctions/website-user-attributes/index.ts +18 -0
- package/src/resources/auctions/website-user-attributes/values.ts +170 -0
- package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +212 -0
- package/src/resources/auctions/website-user-attributes.ts +3 -0
- package/src/resources/auctions.ts +1 -207
- package/src/resources/auth.ts +21 -5
- package/src/resources/index.ts +12 -1
- package/src/resources/loyalty/account-streaks.ts +128 -0
- package/src/resources/loyalty/accounts.ts +65 -18
- package/src/resources/loyalty/badges.ts +790 -146
- package/src/resources/loyalty/currencies.ts +19 -0
- package/src/resources/loyalty/index.ts +19 -3
- package/src/resources/loyalty/loyalty.ts +39 -15
- package/src/resources/loyalty/multipliers.ts +43 -4
- package/src/resources/loyalty/questions-responses.ts +64 -4
- package/src/resources/loyalty/questions.ts +64 -6
- package/src/resources/loyalty/rule-edits.ts +3942 -100
- package/src/resources/loyalty/rule-groups.ts +527 -76
- package/src/resources/loyalty/rules.ts +3143 -301
- package/src/resources/loyalty/transactions/index.ts +18 -0
- package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
- package/src/resources/loyalty/transactions/transactions.ts +699 -0
- package/src/resources/loyalty/transactions.ts +1 -440
- package/src/resources/minting.ts +25 -5
- package/src/resources/referral/referral.ts +15 -11
- package/src/resources/referral/users.ts +45 -5
- package/src/resources/users/index.ts +4 -0
- package/src/resources/users/metadatas.ts +61 -3
- package/src/resources/users/users.ts +259 -38
- package/src/resources/websites/website-collections.ts +42 -1
- package/src/resources/websites/website-user-roles.ts +25 -1
- package/src/resources/websites/websites.ts +12 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/loyalty/rule-chains.d.ts +0 -34
- package/resources/loyalty/rule-chains.d.ts.map +0 -1
- package/resources/loyalty/rule-chains.js +0 -15
- package/resources/loyalty/rule-chains.js.map +0 -1
- package/resources/loyalty/rule-chains.mjs +0 -11
- package/resources/loyalty/rule-chains.mjs.map +0 -1
- package/src/resources/loyalty/rule-chains.ts +0 -45
|
@@ -1,249 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import * as Core from "../../core.js";
|
|
3
|
-
export declare class Transactions extends APIResource {
|
|
4
|
-
/**
|
|
5
|
-
* Create a loyalty transaction to update account balances.
|
|
6
|
-
*/
|
|
7
|
-
createTransaction(body: TransactionCreateTransactionParams, options?: Core.RequestOptions): Core.APIPromise<TransactionCreateTransactionResponse>;
|
|
8
|
-
/**
|
|
9
|
-
* Fetch loyalty transaction entries for wallets or users, representing account
|
|
10
|
-
* balance changes.
|
|
11
|
-
*/
|
|
12
|
-
getTransactionEntries(query?: TransactionGetTransactionEntriesParams, options?: Core.RequestOptions): Core.APIPromise<TransactionGetTransactionEntriesResponse>;
|
|
13
|
-
getTransactionEntries(options?: Core.RequestOptions): Core.APIPromise<TransactionGetTransactionEntriesResponse>;
|
|
14
|
-
}
|
|
15
|
-
export interface TransactionCreateTransactionResponse {
|
|
16
|
-
id: string;
|
|
17
|
-
createdAt: string;
|
|
18
|
-
description: string;
|
|
19
|
-
entries: Array<TransactionCreateTransactionResponse.Entry>;
|
|
20
|
-
updatedAt: string;
|
|
21
|
-
}
|
|
22
|
-
export declare namespace TransactionCreateTransactionResponse {
|
|
23
|
-
interface Entry {
|
|
24
|
-
amount: number;
|
|
25
|
-
/**
|
|
26
|
-
* Direction of the transaction entry
|
|
27
|
-
*/
|
|
28
|
-
direction: 'credit' | 'debit';
|
|
29
|
-
walletAddress: string;
|
|
30
|
-
idempotencyKey?: string;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
export interface TransactionGetTransactionEntriesResponse {
|
|
34
|
-
data: Array<TransactionGetTransactionEntriesResponse.Data>;
|
|
35
|
-
hasNextPage: boolean;
|
|
36
|
-
}
|
|
37
|
-
export declare namespace TransactionGetTransactionEntriesResponse {
|
|
38
|
-
/**
|
|
39
|
-
* Schema for a loyalty transaction entry
|
|
40
|
-
*/
|
|
41
|
-
interface Data {
|
|
42
|
-
/**
|
|
43
|
-
* Unique identifier for the transaction entry
|
|
44
|
-
*/
|
|
45
|
-
id: string;
|
|
46
|
-
/**
|
|
47
|
-
* Amount involved in the transaction
|
|
48
|
-
*/
|
|
49
|
-
amount: number;
|
|
50
|
-
/**
|
|
51
|
-
* Timestamp when the transaction entry was created
|
|
52
|
-
*/
|
|
53
|
-
createdAt: string;
|
|
54
|
-
/**
|
|
55
|
-
* Direction of the transaction entry
|
|
56
|
-
*/
|
|
57
|
-
direction: 'credit' | 'debit';
|
|
58
|
-
/**
|
|
59
|
-
* Unique identifier for the loyalty account
|
|
60
|
-
*/
|
|
61
|
-
loyaltyAccountId: string;
|
|
62
|
-
/**
|
|
63
|
-
* Details of the loyalty transaction
|
|
64
|
-
*/
|
|
65
|
-
loyaltyTransaction: Data.LoyaltyTransaction;
|
|
66
|
-
/**
|
|
67
|
-
* Unique identifier for the organization
|
|
68
|
-
*/
|
|
69
|
-
organizationId: string;
|
|
70
|
-
/**
|
|
71
|
-
* Type of the loyalty transaction
|
|
72
|
-
*/
|
|
73
|
-
type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
|
|
74
|
-
/**
|
|
75
|
-
* Timestamp when the transaction entry was last updated
|
|
76
|
-
*/
|
|
77
|
-
updatedAt: string;
|
|
78
|
-
/**
|
|
79
|
-
* Unique identifier for the website
|
|
80
|
-
*/
|
|
81
|
-
websiteId: string;
|
|
82
|
-
/**
|
|
83
|
-
* Optional metadata for the transaction entry
|
|
84
|
-
*/
|
|
85
|
-
metadata?: Record<string, unknown>;
|
|
86
|
-
}
|
|
87
|
-
namespace Data {
|
|
88
|
-
/**
|
|
89
|
-
* Details of the loyalty transaction
|
|
90
|
-
*/
|
|
91
|
-
interface LoyaltyTransaction {
|
|
92
|
-
/**
|
|
93
|
-
* Unique identifier for the loyalty transaction
|
|
94
|
-
*/
|
|
95
|
-
id: string;
|
|
96
|
-
/**
|
|
97
|
-
* Type of the loyalty transaction
|
|
98
|
-
*/
|
|
99
|
-
type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
|
|
100
|
-
/**
|
|
101
|
-
* Details of the loyalty rule associated with the transaction
|
|
102
|
-
*/
|
|
103
|
-
loyaltyRule?: LoyaltyTransaction.LoyaltyRule;
|
|
104
|
-
}
|
|
105
|
-
namespace LoyaltyTransaction {
|
|
106
|
-
/**
|
|
107
|
-
* Details of the loyalty rule associated with the transaction
|
|
108
|
-
*/
|
|
109
|
-
interface LoyaltyRule {
|
|
110
|
-
/**
|
|
111
|
-
* Unique identifier for the loyalty rule
|
|
112
|
-
*/
|
|
113
|
-
id: string;
|
|
114
|
-
/**
|
|
115
|
-
* Type of the loyalty rule
|
|
116
|
-
*/
|
|
117
|
-
type: string;
|
|
118
|
-
/**
|
|
119
|
-
* Description of the loyalty rule
|
|
120
|
-
*/
|
|
121
|
-
description?: string;
|
|
122
|
-
/**
|
|
123
|
-
* Optional metadata for the loyalty rule
|
|
124
|
-
*/
|
|
125
|
-
metadata?: Record<string, unknown>;
|
|
126
|
-
/**
|
|
127
|
-
* Name of the loyalty rule
|
|
128
|
-
*/
|
|
129
|
-
name?: string;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
export interface TransactionCreateTransactionParams {
|
|
135
|
-
/**
|
|
136
|
-
* Description of the loyalty transaction
|
|
137
|
-
*/
|
|
138
|
-
description: string;
|
|
139
|
-
/**
|
|
140
|
-
* Array of transaction entries
|
|
141
|
-
*/
|
|
142
|
-
entries: Array<TransactionCreateTransactionParams.Entry>;
|
|
143
|
-
/**
|
|
144
|
-
* Unique identifier for the loyalty currency
|
|
145
|
-
*/
|
|
146
|
-
loyaltyCurrencyId?: string;
|
|
147
|
-
}
|
|
148
|
-
export declare namespace TransactionCreateTransactionParams {
|
|
149
|
-
interface Entry {
|
|
150
|
-
/**
|
|
151
|
-
* Transaction entry amount.
|
|
152
|
-
*/
|
|
153
|
-
amount: number;
|
|
154
|
-
/**
|
|
155
|
-
* Direction of the transaction entry for this wallet address
|
|
156
|
-
*/
|
|
157
|
-
direction?: 'credit' | 'debit';
|
|
158
|
-
/**
|
|
159
|
-
* Idempotency key for the transaction entry. Creation will fail if already exists
|
|
160
|
-
* for this wallet address.
|
|
161
|
-
*/
|
|
162
|
-
idempotencyKey?: string;
|
|
163
|
-
/**
|
|
164
|
-
* The wallet address of the user
|
|
165
|
-
*/
|
|
166
|
-
walletAddress?: string;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
export interface TransactionGetTransactionEntriesParams {
|
|
170
|
-
/**
|
|
171
|
-
* End date to filter by (exclusive, less than)
|
|
172
|
-
*/
|
|
173
|
-
createdAtEnd?: string;
|
|
174
|
-
/**
|
|
175
|
-
* Start date to filter by (inclusive, greater than or equal to)
|
|
176
|
-
*/
|
|
177
|
-
createdAtStart?: string;
|
|
178
|
-
/**
|
|
179
|
-
* Direction of the transaction entry to filter by
|
|
180
|
-
*/
|
|
181
|
-
direction?: 'credit' | 'debit';
|
|
182
|
-
/**
|
|
183
|
-
* Key to ensure idempotency of the request
|
|
184
|
-
*/
|
|
185
|
-
idempotencyKey?: string;
|
|
186
|
-
/**
|
|
187
|
-
* Maximum number of records to return (max 1000)
|
|
188
|
-
*/
|
|
189
|
-
limit?: number;
|
|
190
|
-
/**
|
|
191
|
-
* Unique identifier for the loyalty rule to filter by
|
|
192
|
-
*/
|
|
193
|
-
loyaltyRuleId?: string;
|
|
194
|
-
loyaltyRuleType?: 'Bonus' | 'BoughtOn' | 'BoughtWithRoyalties' | 'DiscordMessages' | 'Listing' | 'Lodging' | 'MintOn' | 'PoapClaim' | 'SnagSocialsConnected' | 'SnapshotFullset' | 'SnapshotHold' | 'SoldOn' | 'SoldWithRoyalties' | 'TokenHold' | 'TwitterBio' | 'TwitterHashTagPost' | 'Retweet' | 'check_in' | 'code_entry' | 'connect_wallet' | 'connected_discord' | 'connected_email' | 'connected_epic' | 'connected_steam' | 'connected_telegram' | 'connected_twitter' | 'create_partner_account' | 'discord_member' | 'drip_x_follow' | 'drip_x_new_tweet' | 'drip_x_text_in_bio' | 'drip_x_text_in_comment' | 'drip_x_text_in_name' | 'drip_x_tweet' | 'external_rule' | 'link_click' | 'manual_upload' | 'profile_completed' | 'referred_user' | 'smart_contract_event' | 'snapshot_governance' | 'telegram_join' | 'telegram_messages' | 'text_input' | 'token_hold_erc20' | 'tweet_liked_by_project' | 'twitter_comment' | 'twitter_follow' | 'twitter_followers' | 'twitter_like' | 'twitter_post_hashtag' | 'quiz' | 'poll' | Array<'Bonus' | 'BoughtOn' | 'BoughtWithRoyalties' | 'DiscordMessages' | 'Listing' | 'Lodging' | 'MintOn' | 'PoapClaim' | 'SnagSocialsConnected' | 'SnapshotFullset' | 'SnapshotHold' | 'SoldOn' | 'SoldWithRoyalties' | 'TokenHold' | 'TwitterBio' | 'TwitterHashTagPost' | 'Retweet' | 'check_in' | 'code_entry' | 'connect_wallet' | 'connected_discord' | 'connected_email' | 'connected_epic' | 'connected_steam' | 'connected_telegram' | 'connected_twitter' | 'create_partner_account' | 'discord_member' | 'drip_x_follow' | 'drip_x_new_tweet' | 'drip_x_text_in_bio' | 'drip_x_text_in_comment' | 'drip_x_text_in_name' | 'drip_x_tweet' | 'external_rule' | 'link_click' | 'manual_upload' | 'profile_completed' | 'referred_user' | 'smart_contract_event' | 'snapshot_governance' | 'telegram_join' | 'telegram_messages' | 'text_input' | 'token_hold_erc20' | 'tweet_liked_by_project' | 'twitter_comment' | 'twitter_follow' | 'twitter_followers' | 'twitter_like' | 'twitter_post_hashtag' | 'quiz' | 'poll'>;
|
|
195
|
-
/**
|
|
196
|
-
* Unique identifier for the loyalty transaction to filter by
|
|
197
|
-
*/
|
|
198
|
-
loyaltyTransactionId?: string;
|
|
199
|
-
/**
|
|
200
|
-
* Field to order the results by
|
|
201
|
-
*/
|
|
202
|
-
orderBy?: 'createdAt' | 'updatedAt' | 'loyaltyAccountLockVersion';
|
|
203
|
-
/**
|
|
204
|
-
* Unique identifier for the organization to filter by
|
|
205
|
-
*/
|
|
206
|
-
organizationId?: string;
|
|
207
|
-
/**
|
|
208
|
-
* Pagination cursor to start after a specific resource ID
|
|
209
|
-
*/
|
|
210
|
-
startingAfter?: string;
|
|
211
|
-
/**
|
|
212
|
-
* Type of the loyalty transaction to filter by
|
|
213
|
-
*/
|
|
214
|
-
type?: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
|
|
215
|
-
/**
|
|
216
|
-
* When passed in return the list of fulfilled entries for loyalty rules. If a
|
|
217
|
-
* loyalty rule has a fulfilled entry this means the user cannot currently complete
|
|
218
|
-
* the rule. Must be passed in with userId or walletAddress.
|
|
219
|
-
*/
|
|
220
|
-
userCompletedLoyaltyRuleId?: string | Array<string>;
|
|
221
|
-
/**
|
|
222
|
-
* External identifier for the user group controlled by you
|
|
223
|
-
*/
|
|
224
|
-
userGroupExternalIdentifier?: string;
|
|
225
|
-
/**
|
|
226
|
-
* Unique identifier for the user group
|
|
227
|
-
*/
|
|
228
|
-
userGroupId?: string;
|
|
229
|
-
/**
|
|
230
|
-
* User ID or array of User IDs to filter by
|
|
231
|
-
*/
|
|
232
|
-
userId?: string | Array<string>;
|
|
233
|
-
/**
|
|
234
|
-
* Wallet address or array of wallet addresses to filter by
|
|
235
|
-
*/
|
|
236
|
-
walletAddress?: string | Array<string>;
|
|
237
|
-
/**
|
|
238
|
-
* Identifier for the wallet group to filter by
|
|
239
|
-
*/
|
|
240
|
-
walletGroupIdentifier?: string;
|
|
241
|
-
/**
|
|
242
|
-
* Unique identifier for the website to filter by
|
|
243
|
-
*/
|
|
244
|
-
websiteId?: string;
|
|
245
|
-
}
|
|
246
|
-
export declare namespace Transactions {
|
|
247
|
-
export { type TransactionCreateTransactionResponse as TransactionCreateTransactionResponse, type TransactionGetTransactionEntriesResponse as TransactionGetTransactionEntriesResponse, type TransactionCreateTransactionParams as TransactionCreateTransactionParams, type TransactionGetTransactionEntriesParams as TransactionGetTransactionEntriesParams, };
|
|
248
|
-
}
|
|
1
|
+
export * from "./transactions/index.js";
|
|
249
2
|
//# sourceMappingURL=transactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../src/resources/loyalty/transactions.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../src/resources/loyalty/transactions.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Create a loyalty transaction to update account balances.
|
|
10
|
-
*/
|
|
11
|
-
createTransaction(body, options) {
|
|
12
|
-
return this._client.post('/api/loyalty/transactions', { body, ...options });
|
|
13
|
-
}
|
|
14
|
-
getTransactionEntries(query = {}, options) {
|
|
15
|
-
if ((0, core_1.isRequestOptions)(query)) {
|
|
16
|
-
return this.getTransactionEntries({}, query);
|
|
17
|
-
}
|
|
18
|
-
return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
8
|
}
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./transactions/index.js"), exports);
|
|
22
19
|
//# sourceMappingURL=transactions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../src/resources/loyalty/transactions.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../src/resources/loyalty/transactions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,0DAAqC"}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { isRequestOptions } from "../../core.mjs";
|
|
4
|
-
export class Transactions extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Create a loyalty transaction to update account balances.
|
|
7
|
-
*/
|
|
8
|
-
createTransaction(body, options) {
|
|
9
|
-
return this._client.post('/api/loyalty/transactions', { body, ...options });
|
|
10
|
-
}
|
|
11
|
-
getTransactionEntries(query = {}, options) {
|
|
12
|
-
if (isRequestOptions(query)) {
|
|
13
|
-
return this.getTransactionEntries({}, query);
|
|
14
|
-
}
|
|
15
|
-
return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
|
|
16
|
-
}
|
|
17
|
-
}
|
|
2
|
+
export * from "./transactions/index.mjs";
|
|
18
3
|
//# sourceMappingURL=transactions.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.mjs","sourceRoot":"","sources":["../../src/resources/loyalty/transactions.ts"],"names":[],"mappings":"AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"transactions.mjs","sourceRoot":"","sources":["../../src/resources/loyalty/transactions.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
package/resources/minting.d.ts
CHANGED
|
@@ -67,15 +67,15 @@ export interface MintingGetAssetsParams {
|
|
|
67
67
|
/**
|
|
68
68
|
* Network
|
|
69
69
|
*/
|
|
70
|
-
network?: 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachainArtio' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp' | '
|
|
70
|
+
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'nexusTestnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'skaleEuropa' | 'skaleCalypso' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp' | 'somnia' | 'zkverify' | 'polkadot' | 'kusama' | 'flow_cadence';
|
|
71
71
|
/**
|
|
72
|
-
* Sort
|
|
72
|
+
* Sort Key
|
|
73
73
|
*/
|
|
74
|
-
|
|
74
|
+
sortBy?: 'price' | 'startsAt' | 'assetNr' | null;
|
|
75
75
|
/**
|
|
76
|
-
* Sort
|
|
76
|
+
* Sort Dir
|
|
77
77
|
*/
|
|
78
|
-
|
|
78
|
+
sortDir?: 'asc' | 'desc' | null;
|
|
79
79
|
/**
|
|
80
80
|
* Status
|
|
81
81
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minting.d.ts","sourceRoot":"","sources":["../src/resources/minting.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,SAAS,CACP,KAAK,EAAE,sBAAsB,EAC7B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;CAG7C;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAE3C;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,yBAAiB,wBAAwB,CAAC;IACxC,UAAiB,IAAI;QACnB;;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ACT,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,cAAc,GACd,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,KAAK,GACL,WAAW,GACX,kBAAkB,GAClB,OAAO,GACP,KAAK,GACL,QAAQ,GACR,MAAM,GACN,aAAa,GACb,OAAO,GACP,cAAc,GACd,cAAc,GACd,OAAO,GACP,cAAc,GACd,YAAY,GACZ,SAAS,GACT,kBAAkB,GAClB,iBAAiB,GACjB,QAAQ,GACR,iBAAiB,GACjB,gBAAgB,GAChB,UAAU,GACV,QAAQ,GACR,UAAU,GACV,UAAU,GACV,QAAQ,GACR,cAAc,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC;IAEjD;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;CACxC;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -6,9 +6,15 @@ export declare class Referral extends APIResource {
|
|
|
6
6
|
users: UsersAPI.Users;
|
|
7
7
|
/**
|
|
8
8
|
* This endpoint allows you to create a referral code
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response = await client.referral.createCode({
|
|
13
|
+
* loyaltyRuleId: '558bcf56-24f1-4ef4-9787-043086295780',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
9
16
|
*/
|
|
10
|
-
createCode(body
|
|
11
|
-
createCode(options?: Core.RequestOptions): Core.APIPromise<ReferralCreateCodeResponse>;
|
|
17
|
+
createCode(body: ReferralCreateCodeParams, options?: Core.RequestOptions): Core.APIPromise<ReferralCreateCodeResponse>;
|
|
12
18
|
}
|
|
13
19
|
export interface ReferralCreateCodeResponse {
|
|
14
20
|
id: string;
|
|
@@ -21,8 +27,11 @@ export interface ReferralCreateCodeResponse {
|
|
|
21
27
|
websiteId: string;
|
|
22
28
|
}
|
|
23
29
|
export interface ReferralCreateCodeParams {
|
|
24
|
-
loyaltyRuleId
|
|
30
|
+
loyaltyRuleId: string;
|
|
31
|
+
customReferralCode?: string;
|
|
32
|
+
organizationId?: string;
|
|
25
33
|
userId?: string;
|
|
34
|
+
websiteId?: string;
|
|
26
35
|
}
|
|
27
36
|
export declare namespace Referral {
|
|
28
37
|
export { type ReferralCreateCodeResponse as ReferralCreateCodeResponse, type ReferralCreateCodeParams as ReferralCreateCodeParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referral.d.ts","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"referral.d.ts","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAExG,qBAAa,QAAS,SAAQ,WAAW;IACvC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;;;;;;;OASG;IACH,UAAU,CACR,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,0BAA0B,CAAC;CAG/C;AAED,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,cAAc,EAAE,MAAM,CAAC;IAEvB,YAAY,EAAE,MAAM,CAAC;IAErB,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,MAAM,CAAC;IAEf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,MAAM,CAAC;IAEtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
|
@@ -26,7 +26,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.Referral = void 0;
|
|
28
28
|
const resource_1 = require("../../resource.js");
|
|
29
|
-
const core_1 = require("../../core.js");
|
|
30
29
|
const UsersAPI = __importStar(require("./users.js"));
|
|
31
30
|
const users_1 = require("./users.js");
|
|
32
31
|
class Referral extends resource_1.APIResource {
|
|
@@ -34,10 +33,17 @@ class Referral extends resource_1.APIResource {
|
|
|
34
33
|
super(...arguments);
|
|
35
34
|
this.users = new UsersAPI.Users(this._client);
|
|
36
35
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
/**
|
|
37
|
+
* This endpoint allows you to create a referral code
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const response = await client.referral.createCode({
|
|
42
|
+
* loyaltyRuleId: '558bcf56-24f1-4ef4-9787-043086295780',
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
createCode(body, options) {
|
|
41
47
|
return this._client.post('/api/referral/codes', { body, ...options });
|
|
42
48
|
}
|
|
43
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referral.js","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;
|
|
1
|
+
{"version":3,"file":"referral.js","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAE7C,qDAAoC;AACpC,sCAAwG;AAExG,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkB3D,CAAC;IAhBC;;;;;;;;;OASG;IACH,UAAU,CACR,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAnBD,4BAmBC;AAgCD,QAAQ,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../resource.mjs";
|
|
3
|
-
import { isRequestOptions } from "../../core.mjs";
|
|
4
3
|
import * as UsersAPI from "./users.mjs";
|
|
5
4
|
import { Users } from "./users.mjs";
|
|
6
5
|
export class Referral extends APIResource {
|
|
@@ -8,10 +7,17 @@ export class Referral extends APIResource {
|
|
|
8
7
|
super(...arguments);
|
|
9
8
|
this.users = new UsersAPI.Users(this._client);
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
/**
|
|
11
|
+
* This endpoint allows you to create a referral code
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response = await client.referral.createCode({
|
|
16
|
+
* loyaltyRuleId: '558bcf56-24f1-4ef4-9787-043086295780',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
createCode(body, options) {
|
|
15
21
|
return this._client.post('/api/referral/codes', { body, ...options });
|
|
16
22
|
}
|
|
17
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referral.mjs","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"referral.mjs","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,EAA0E,KAAK,EAAE;AAExF,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkB3D,CAAC;IAhBC;;;;;;;;;OASG;IACH,UAAU,CACR,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAgCD,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
|
@@ -3,12 +3,25 @@ import * as Core from "../../core.js";
|
|
|
3
3
|
export declare class Users extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* This endpoint allows you to create a referral user
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const user = await client.referral.users.create({
|
|
10
|
+
* userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
|
|
11
|
+
* });
|
|
12
|
+
* ```
|
|
6
13
|
*/
|
|
7
14
|
create(body: UserCreateParams, options?: Core.RequestOptions): Core.APIPromise<UserCreateResponse>;
|
|
8
15
|
/**
|
|
9
16
|
* This endpoint allows you to get referrals
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const users = await client.referral.users.list();
|
|
21
|
+
* ```
|
|
10
22
|
*/
|
|
11
|
-
list(query
|
|
23
|
+
list(query?: UserListParams, options?: Core.RequestOptions): Core.APIPromise<UserListResponse>;
|
|
24
|
+
list(options?: Core.RequestOptions): Core.APIPromise<UserListResponse>;
|
|
12
25
|
}
|
|
13
26
|
export interface UserCreateResponse {
|
|
14
27
|
message: string;
|
|
@@ -20,8 +33,21 @@ export interface UserListResponse {
|
|
|
20
33
|
export declare namespace UserListResponse {
|
|
21
34
|
interface Data {
|
|
22
35
|
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* This will only return data for earnings after 2025-04-24
|
|
38
|
+
*/
|
|
39
|
+
amount: number;
|
|
23
40
|
referralCode: Data.ReferralCode;
|
|
41
|
+
/**
|
|
42
|
+
* This will only return data for earnings after 2025-04-24
|
|
43
|
+
*/
|
|
44
|
+
tier1Amount: number;
|
|
45
|
+
/**
|
|
46
|
+
* This will only return data for earnings after 2025-04-24
|
|
47
|
+
*/
|
|
48
|
+
tier2Amount: number;
|
|
24
49
|
user: Data.User;
|
|
50
|
+
eligible?: boolean | null;
|
|
25
51
|
}
|
|
26
52
|
namespace Data {
|
|
27
53
|
interface ReferralCode {
|
|
@@ -31,6 +57,7 @@ export declare namespace UserListResponse {
|
|
|
31
57
|
referralCode: string;
|
|
32
58
|
updatedAt: string;
|
|
33
59
|
userId: string;
|
|
60
|
+
loyaltyRuleId?: string;
|
|
34
61
|
}
|
|
35
62
|
interface User {
|
|
36
63
|
id: string;
|
|
@@ -44,11 +71,11 @@ export interface UserCreateParams {
|
|
|
44
71
|
referralCodeId?: string;
|
|
45
72
|
}
|
|
46
73
|
export interface UserListParams {
|
|
47
|
-
walletAddress: string | Array<string>;
|
|
48
|
-
includeEligibility?: boolean | null;
|
|
49
74
|
limit?: number;
|
|
75
|
+
loyaltyRuleId?: string;
|
|
50
76
|
organizationId?: string;
|
|
51
77
|
startingAfter?: string;
|
|
78
|
+
walletAddress?: string | Array<string>;
|
|
52
79
|
websiteId?: string;
|
|
53
80
|
}
|
|
54
81
|
export declare namespace Users {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAIlG;;;;;;;OAOG;IACH,IAAI,CAAC,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M,CAAC;IAEtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAEvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
|
@@ -3,17 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Users = void 0;
|
|
5
5
|
const resource_1 = require("../../resource.js");
|
|
6
|
+
const core_1 = require("../../core.js");
|
|
6
7
|
class Users extends resource_1.APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* This endpoint allows you to create a referral user
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const user = await client.referral.users.create({
|
|
14
|
+
* userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
9
17
|
*/
|
|
10
18
|
create(body, options) {
|
|
11
19
|
return this._client.post('/api/referral/users', { body, ...options });
|
|
12
20
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
list(query = {}, options) {
|
|
22
|
+
if ((0, core_1.isRequestOptions)(query)) {
|
|
23
|
+
return this.list({}, query);
|
|
24
|
+
}
|
|
17
25
|
return this._client.get('/api/referral/users', { query, ...options });
|
|
18
26
|
}
|
|
19
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAG9C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAYD,IAAI,CACF,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAlCD,sBAkCC"}
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
import { isRequestOptions } from "../../core.mjs";
|
|
3
4
|
export class Users extends APIResource {
|
|
4
5
|
/**
|
|
5
6
|
* This endpoint allows you to create a referral user
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const user = await client.referral.users.create({
|
|
11
|
+
* userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
|
|
12
|
+
* });
|
|
13
|
+
* ```
|
|
6
14
|
*/
|
|
7
15
|
create(body, options) {
|
|
8
16
|
return this._client.post('/api/referral/users', { body, ...options });
|
|
9
17
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
list(query = {}, options) {
|
|
19
|
+
if (isRequestOptions(query)) {
|
|
20
|
+
return this.list({}, query);
|
|
21
|
+
}
|
|
14
22
|
return this._client.get('/api/referral/users', { query, ...options });
|
|
15
23
|
}
|
|
16
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.mjs","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"users.mjs","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAYD,IAAI,CACF,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF"}
|