@snagsolutions/sdk 0.1.0-alpha.215 → 0.1.0-alpha.216

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.
Files changed (101) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/index.d.mts +5 -2
  3. package/index.d.ts +5 -2
  4. package/index.d.ts.map +1 -1
  5. package/index.js +4 -1
  6. package/index.js.map +1 -1
  7. package/index.mjs +4 -1
  8. package/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/index.d.ts +2 -1
  11. package/resources/index.d.ts.map +1 -1
  12. package/resources/index.js +4 -2
  13. package/resources/index.js.map +1 -1
  14. package/resources/index.mjs +2 -1
  15. package/resources/index.mjs.map +1 -1
  16. package/resources/loyalty/index.d.ts +1 -1
  17. package/resources/loyalty/index.d.ts.map +1 -1
  18. package/resources/loyalty/index.js.map +1 -1
  19. package/resources/loyalty/index.mjs.map +1 -1
  20. package/resources/loyalty/loyalty.d.ts +2 -2
  21. package/resources/loyalty/loyalty.d.ts.map +1 -1
  22. package/resources/loyalty/loyalty.js.map +1 -1
  23. package/resources/loyalty/loyalty.mjs.map +1 -1
  24. package/resources/loyalty/transactions/index.d.ts +2 -1
  25. package/resources/loyalty/transactions/index.d.ts.map +1 -1
  26. package/resources/loyalty/transactions/index.js +3 -1
  27. package/resources/loyalty/transactions/index.js.map +1 -1
  28. package/resources/loyalty/transactions/index.mjs +1 -0
  29. package/resources/loyalty/transactions/index.mjs.map +1 -1
  30. package/resources/loyalty/transactions/posts.d.ts +145 -0
  31. package/resources/loyalty/transactions/posts.d.ts.map +1 -0
  32. package/resources/loyalty/transactions/posts.js +32 -0
  33. package/resources/loyalty/transactions/posts.js.map +1 -0
  34. package/resources/loyalty/transactions/posts.mjs +28 -0
  35. package/resources/loyalty/transactions/posts.mjs.map +1 -0
  36. package/resources/loyalty/transactions/transactions.d.ts +143 -1
  37. package/resources/loyalty/transactions/transactions.d.ts.map +1 -1
  38. package/resources/loyalty/transactions/transactions.js +34 -0
  39. package/resources/loyalty/transactions/transactions.js.map +1 -1
  40. package/resources/loyalty/transactions/transactions.mjs +34 -0
  41. package/resources/loyalty/transactions/transactions.mjs.map +1 -1
  42. package/resources/minting/allowlist.d.ts +84 -0
  43. package/resources/minting/allowlist.d.ts.map +1 -0
  44. package/resources/minting/allowlist.js +42 -0
  45. package/resources/minting/allowlist.js.map +1 -0
  46. package/resources/minting/allowlist.mjs +38 -0
  47. package/resources/minting/allowlist.mjs.map +1 -0
  48. package/resources/minting/contracts.d.ts +38 -0
  49. package/resources/minting/contracts.d.ts.map +1 -0
  50. package/resources/minting/contracts.js +23 -0
  51. package/resources/minting/contracts.js.map +1 -0
  52. package/resources/minting/contracts.mjs +19 -0
  53. package/resources/minting/contracts.mjs.map +1 -0
  54. package/resources/minting/index.d.ts +5 -0
  55. package/resources/minting/index.d.ts.map +1 -0
  56. package/resources/minting/index.js +13 -0
  57. package/resources/minting/index.js.map +1 -0
  58. package/resources/minting/index.mjs +6 -0
  59. package/resources/minting/index.mjs.map +1 -0
  60. package/resources/minting/minting.d.ts +142 -0
  61. package/resources/minting/minting.d.ts.map +1 -0
  62. package/resources/minting/minting.js +79 -0
  63. package/resources/minting/minting.js.map +1 -0
  64. package/resources/minting/minting.mjs +52 -0
  65. package/resources/minting/minting.mjs.map +1 -0
  66. package/resources/minting/status.d.ts +44 -0
  67. package/resources/minting/status.d.ts.map +1 -0
  68. package/resources/minting/status.js +33 -0
  69. package/resources/minting/status.js.map +1 -0
  70. package/resources/minting/status.mjs +29 -0
  71. package/resources/minting/status.mjs.map +1 -0
  72. package/resources/minting.d.ts +1 -94
  73. package/resources/minting.d.ts.map +1 -1
  74. package/resources/minting.js +15 -11
  75. package/resources/minting.js.map +1 -1
  76. package/resources/minting.mjs +1 -9
  77. package/resources/minting.mjs.map +1 -1
  78. package/resources/token-claims.d.ts +160 -0
  79. package/resources/token-claims.d.ts.map +1 -0
  80. package/resources/token-claims.js +46 -0
  81. package/resources/token-claims.js.map +1 -0
  82. package/resources/token-claims.mjs +42 -0
  83. package/resources/token-claims.mjs.map +1 -0
  84. package/src/index.ts +42 -1
  85. package/src/resources/index.ts +22 -1
  86. package/src/resources/loyalty/index.ts +4 -0
  87. package/src/resources/loyalty/loyalty.ts +8 -0
  88. package/src/resources/loyalty/transactions/index.ts +11 -0
  89. package/src/resources/loyalty/transactions/posts.ts +221 -0
  90. package/src/resources/loyalty/transactions/transactions.ts +194 -0
  91. package/src/resources/minting/allowlist.ts +116 -0
  92. package/src/resources/minting/contracts.ts +73 -0
  93. package/src/resources/minting/index.ts +23 -0
  94. package/src/resources/minting/minting.ts +269 -0
  95. package/src/resources/minting/status.ts +70 -0
  96. package/src/resources/minting.ts +1 -176
  97. package/src/resources/token-claims.ts +307 -0
  98. package/src/version.ts +1 -1
  99. package/version.d.ts +1 -1
  100. package/version.js +1 -1
  101. package/version.mjs +1 -1
@@ -0,0 +1,269 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+ import * as AllowlistAPI from './allowlist';
6
+ import {
7
+ Allowlist,
8
+ AllowlistListParams,
9
+ AllowlistListResponse,
10
+ AllowlistUpsertParams,
11
+ AllowlistUpsertResponse,
12
+ } from './allowlist';
13
+ import * as ContractsAPI from './contracts';
14
+ import { ContractMintParams, ContractMintResponse, Contracts } from './contracts';
15
+ import * as StatusAPI from './status';
16
+ import { Status, StatusRetrieveResponse, StatusUpdateParams, StatusUpdateResponse } from './status';
17
+
18
+ export class Minting extends APIResource {
19
+ status: StatusAPI.Status = new StatusAPI.Status(this._client);
20
+ allowlist: AllowlistAPI.Allowlist = new AllowlistAPI.Allowlist(this._client);
21
+ contracts: ContractsAPI.Contracts = new ContractsAPI.Contracts(this._client);
22
+
23
+ /**
24
+ * Returns minting assets and any relevant context
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const response = await client.minting.getAssets({
29
+ * organizationId: '00000000-0000-0000-0000-000000000000',
30
+ * websiteId: '00000000-0000-0000-0000-000000000000',
31
+ * });
32
+ * ```
33
+ */
34
+ getAssets(
35
+ query: MintingGetAssetsParams,
36
+ options?: Core.RequestOptions,
37
+ ): Core.APIPromise<MintingGetAssetsResponse> {
38
+ return this._client.get('/api/minting/assets', { query, ...options });
39
+ }
40
+
41
+ /**
42
+ * Pass in to see if a token is eligible for minting
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const response = await client.minting.getTokenGateStatus({
47
+ * collectionAddress: 'collectionAddress',
48
+ * mintingContractAssetId:
49
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
50
+ * mintingContractId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
51
+ * network: 'network',
52
+ * tokenId: 'tokenId',
53
+ * });
54
+ * ```
55
+ */
56
+ getTokenGateStatus(
57
+ query: MintingGetTokenGateStatusParams,
58
+ options?: Core.RequestOptions,
59
+ ): Core.APIPromise<MintingGetTokenGateStatusResponse> {
60
+ return this._client.get('/api/minting/token_gate', { query, ...options });
61
+ }
62
+ }
63
+
64
+ /**
65
+ * Schema for getting minting assets response
66
+ */
67
+ export interface MintingGetAssetsResponse {
68
+ /**
69
+ * Array of minting assets
70
+ */
71
+ data: Array<MintingGetAssetsResponse.Data>;
72
+
73
+ /**
74
+ * Indicates if more pages are available
75
+ */
76
+ hasNextPage: boolean;
77
+ }
78
+
79
+ export namespace MintingGetAssetsResponse {
80
+ export interface Data {
81
+ /**
82
+ * UUID of the minting asset
83
+ */
84
+ id: string;
85
+ }
86
+ }
87
+
88
+ export interface MintingGetTokenGateStatusResponse {
89
+ eligible: boolean;
90
+
91
+ message: string;
92
+ }
93
+
94
+ export interface MintingGetAssetsParams {
95
+ /**
96
+ * Organization ID
97
+ */
98
+ organizationId: string;
99
+
100
+ /**
101
+ * Website ID
102
+ */
103
+ websiteId: string;
104
+
105
+ /**
106
+ * Contract Address
107
+ */
108
+ contractAddress?: string;
109
+
110
+ /**
111
+ * Currency Type
112
+ */
113
+ currencyType?: 'loyalty' | 'native' | null;
114
+
115
+ /**
116
+ * Whether to include deleted assets in the response
117
+ */
118
+ includeDeleted?: boolean | null;
119
+
120
+ /**
121
+ * Whether to include metadata in the response
122
+ */
123
+ includeMetadata?: boolean | null;
124
+
125
+ /**
126
+ * Whether to include listed assets in the response
127
+ */
128
+ isListed?: boolean | null;
129
+
130
+ /**
131
+ * Minting Contract Asset ID
132
+ */
133
+ mintingContractAssetId?: string | null;
134
+
135
+ /**
136
+ * Comma-separated list of Minting Contract UUIDs
137
+ */
138
+ mintingContractIds?: string | null;
139
+
140
+ /**
141
+ * Network
142
+ */
143
+ network?:
144
+ | 'abstract'
145
+ | 'abstractTestnet'
146
+ | 'apechain'
147
+ | 'arbitrum'
148
+ | 'avalanche'
149
+ | 'avalancheFuji'
150
+ | 'base'
151
+ | 'baseSepolia'
152
+ | 'berachain'
153
+ | 'berachainArtio'
154
+ | 'berachainBepolia'
155
+ | 'binance'
156
+ | 'bscTestnet'
157
+ | 'campTestnet'
158
+ | 'fantom'
159
+ | 'fantomTestnet'
160
+ | 'flowMainnet'
161
+ | 'mainnet'
162
+ | 'nexusTestnet'
163
+ | 'optimism'
164
+ | 'polygon'
165
+ | 'polygon_mumbai'
166
+ | 'skaleNebula'
167
+ | 'skaleEuropa'
168
+ | 'skaleCalypso'
169
+ | 'solana'
170
+ | 'sophon'
171
+ | 'sophonTestnet'
172
+ | 'sui'
173
+ | 'superseed'
174
+ | 'superseedSepolia'
175
+ | 'vanar'
176
+ | 'xai'
177
+ | 'zksync'
178
+ | 'coti'
179
+ | 'cotiTestnet'
180
+ | 'morph'
181
+ | 'morphTestnet'
182
+ | 'morphHolesky'
183
+ | 'ultra'
184
+ | 'ultraTestnet'
185
+ | 'nitrograph'
186
+ | 'sepolia'
187
+ | 'optimism_sepolia'
188
+ | 'arbitrumSepolia'
189
+ | 'goerli'
190
+ | 'optimism_goerli'
191
+ | 'arbitrumGoerli'
192
+ | 'basecamp'
193
+ | 'somnia'
194
+ | 'zkverify'
195
+ | 'polkadot'
196
+ | 'kusama'
197
+ | 'flow_cadence';
198
+
199
+ /**
200
+ * Sort Key
201
+ */
202
+ sortBy?: 'price' | 'startsAt' | 'assetNr' | null;
203
+
204
+ /**
205
+ * Sort Dir
206
+ */
207
+ sortDir?: 'asc' | 'desc' | null;
208
+
209
+ /**
210
+ * Status
211
+ */
212
+ status?: 'active' | 'past' | null;
213
+
214
+ /**
215
+ * Token ID
216
+ */
217
+ tokenId?: string | Array<number> | null;
218
+
219
+ /**
220
+ * Wallet Address
221
+ */
222
+ walletAddress?: string | Array<string>;
223
+ }
224
+
225
+ export interface MintingGetTokenGateStatusParams {
226
+ collectionAddress: string;
227
+
228
+ mintingContractAssetId: string;
229
+
230
+ mintingContractId: string;
231
+
232
+ network: string;
233
+
234
+ tokenId: string;
235
+ }
236
+
237
+ Minting.Status = Status;
238
+ Minting.Allowlist = Allowlist;
239
+ Minting.Contracts = Contracts;
240
+
241
+ export declare namespace Minting {
242
+ export {
243
+ type MintingGetAssetsResponse as MintingGetAssetsResponse,
244
+ type MintingGetTokenGateStatusResponse as MintingGetTokenGateStatusResponse,
245
+ type MintingGetAssetsParams as MintingGetAssetsParams,
246
+ type MintingGetTokenGateStatusParams as MintingGetTokenGateStatusParams,
247
+ };
248
+
249
+ export {
250
+ Status as Status,
251
+ type StatusRetrieveResponse as StatusRetrieveResponse,
252
+ type StatusUpdateResponse as StatusUpdateResponse,
253
+ type StatusUpdateParams as StatusUpdateParams,
254
+ };
255
+
256
+ export {
257
+ Allowlist as Allowlist,
258
+ type AllowlistListResponse as AllowlistListResponse,
259
+ type AllowlistUpsertResponse as AllowlistUpsertResponse,
260
+ type AllowlistListParams as AllowlistListParams,
261
+ type AllowlistUpsertParams as AllowlistUpsertParams,
262
+ };
263
+
264
+ export {
265
+ Contracts as Contracts,
266
+ type ContractMintResponse as ContractMintResponse,
267
+ type ContractMintParams as ContractMintParams,
268
+ };
269
+ }
@@ -0,0 +1,70 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+
6
+ export class Status extends APIResource {
7
+ /**
8
+ * Get the status of a mint
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const status = await client.minting.status.retrieve('id');
13
+ * ```
14
+ */
15
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<StatusRetrieveResponse> {
16
+ return this._client.get(`/api/minting/status/${id}`, options);
17
+ }
18
+
19
+ /**
20
+ * Update the status of a mint
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const status = await client.minting.status.update('id', {
25
+ * status: 'failed',
26
+ * });
27
+ * ```
28
+ */
29
+ update(
30
+ id: string,
31
+ body: StatusUpdateParams,
32
+ options?: Core.RequestOptions,
33
+ ): Core.APIPromise<StatusUpdateResponse> {
34
+ return this._client.post(`/api/minting/status/${id}`, { body, ...options });
35
+ }
36
+ }
37
+
38
+ export interface StatusRetrieveResponse {
39
+ errorCode: number | null;
40
+
41
+ errorMessage: string | null;
42
+
43
+ price: number | null;
44
+
45
+ relayerTxId: string | null;
46
+
47
+ status: 'minted' | 'minting' | 'failed' | 'generatingSignature';
48
+
49
+ txHash: string | null;
50
+
51
+ signature?: unknown;
52
+ }
53
+
54
+ export interface StatusUpdateResponse {
55
+ message: string;
56
+ }
57
+
58
+ export interface StatusUpdateParams {
59
+ status: 'failed' | 'minted';
60
+
61
+ txHash?: string;
62
+ }
63
+
64
+ export declare namespace Status {
65
+ export {
66
+ type StatusRetrieveResponse as StatusRetrieveResponse,
67
+ type StatusUpdateResponse as StatusUpdateResponse,
68
+ type StatusUpdateParams as StatusUpdateParams,
69
+ };
70
+ }
@@ -1,178 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../resource';
4
- import * as Core from '../core';
5
-
6
- export class Minting extends APIResource {
7
- /**
8
- * Returns minting assets and any relevant context
9
- */
10
- getAssets(
11
- query: MintingGetAssetsParams,
12
- options?: Core.RequestOptions,
13
- ): Core.APIPromise<MintingGetAssetsResponse> {
14
- return this._client.get('/api/minting/assets', { query, ...options });
15
- }
16
- }
17
-
18
- /**
19
- * Schema for getting minting assets response
20
- */
21
- export interface MintingGetAssetsResponse {
22
- /**
23
- * Array of minting assets
24
- */
25
- data: Array<MintingGetAssetsResponse.Data>;
26
-
27
- /**
28
- * Indicates if more pages are available
29
- */
30
- hasNextPage: boolean;
31
- }
32
-
33
- export namespace MintingGetAssetsResponse {
34
- export interface Data {
35
- /**
36
- * UUID of the minting asset
37
- */
38
- id: string;
39
- }
40
- }
41
-
42
- export interface MintingGetAssetsParams {
43
- /**
44
- * Organization ID
45
- */
46
- organizationId: string;
47
-
48
- /**
49
- * Website ID
50
- */
51
- websiteId: string;
52
-
53
- /**
54
- * Contract Address
55
- */
56
- contractAddress?: string;
57
-
58
- /**
59
- * Currency Type
60
- */
61
- currencyType?: 'loyalty' | 'native' | null;
62
-
63
- /**
64
- * Whether to include deleted assets in the response
65
- */
66
- includeDeleted?: boolean | null;
67
-
68
- /**
69
- * Whether to include metadata in the response
70
- */
71
- includeMetadata?: boolean | null;
72
-
73
- /**
74
- * Whether to include listed assets in the response
75
- */
76
- isListed?: boolean | null;
77
-
78
- /**
79
- * Minting Contract Asset ID
80
- */
81
- mintingContractAssetId?: string | null;
82
-
83
- /**
84
- * Comma-separated list of Minting Contract UUIDs
85
- */
86
- mintingContractIds?: string | null;
87
-
88
- /**
89
- * Network
90
- */
91
- network?:
92
- | 'abstract'
93
- | 'abstractTestnet'
94
- | 'apechain'
95
- | 'arbitrum'
96
- | 'avalanche'
97
- | 'avalancheFuji'
98
- | 'base'
99
- | 'baseSepolia'
100
- | 'berachain'
101
- | 'berachainArtio'
102
- | 'berachainBepolia'
103
- | 'binance'
104
- | 'bscTestnet'
105
- | 'campTestnet'
106
- | 'fantom'
107
- | 'fantomTestnet'
108
- | 'flowMainnet'
109
- | 'mainnet'
110
- | 'nexusTestnet'
111
- | 'optimism'
112
- | 'polygon'
113
- | 'polygon_mumbai'
114
- | 'skaleNebula'
115
- | 'skaleEuropa'
116
- | 'skaleCalypso'
117
- | 'solana'
118
- | 'sophon'
119
- | 'sophonTestnet'
120
- | 'sui'
121
- | 'superseed'
122
- | 'superseedSepolia'
123
- | 'vanar'
124
- | 'xai'
125
- | 'zksync'
126
- | 'coti'
127
- | 'cotiTestnet'
128
- | 'morph'
129
- | 'morphTestnet'
130
- | 'morphHolesky'
131
- | 'ultra'
132
- | 'ultraTestnet'
133
- | 'nitrograph'
134
- | 'sepolia'
135
- | 'optimism_sepolia'
136
- | 'arbitrumSepolia'
137
- | 'goerli'
138
- | 'optimism_goerli'
139
- | 'arbitrumGoerli'
140
- | 'basecamp'
141
- | 'somnia'
142
- | 'zkverify'
143
- | 'polkadot'
144
- | 'kusama'
145
- | 'flow_cadence';
146
-
147
- /**
148
- * Sort Key
149
- */
150
- sortBy?: 'price' | 'startsAt' | 'assetNr' | null;
151
-
152
- /**
153
- * Sort Dir
154
- */
155
- sortDir?: 'asc' | 'desc' | null;
156
-
157
- /**
158
- * Status
159
- */
160
- status?: 'active' | 'past' | null;
161
-
162
- /**
163
- * Token ID
164
- */
165
- tokenId?: string | Array<number> | null;
166
-
167
- /**
168
- * Wallet Address
169
- */
170
- walletAddress?: string | Array<string>;
171
- }
172
-
173
- export declare namespace Minting {
174
- export {
175
- type MintingGetAssetsResponse as MintingGetAssetsResponse,
176
- type MintingGetAssetsParams as MintingGetAssetsParams,
177
- };
178
- }
3
+ export * from './minting/index';