@snagsolutions/sdk 0.1.0-alpha.173 → 0.1.0-alpha.175

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 (99) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/index.d.mts +2 -2
  3. package/index.d.ts +2 -2
  4. package/index.d.ts.map +1 -1
  5. package/index.js.map +1 -1
  6. package/index.mjs +1 -1
  7. package/index.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/auctions/auctions.d.ts +2 -2
  10. package/resources/auctions/auctions.d.ts.map +1 -1
  11. package/resources/auctions/auctions.js.map +1 -1
  12. package/resources/auctions/auctions.mjs.map +1 -1
  13. package/resources/auctions/index.d.ts +1 -1
  14. package/resources/auctions/index.d.ts.map +1 -1
  15. package/resources/auctions/index.js.map +1 -1
  16. package/resources/auctions/index.mjs.map +1 -1
  17. package/resources/auctions/website-user-attributes/index.d.ts +2 -2
  18. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -1
  19. package/resources/auctions/website-user-attributes/index.js.map +1 -1
  20. package/resources/auctions/website-user-attributes/index.mjs +1 -1
  21. package/resources/auctions/website-user-attributes/index.mjs.map +1 -1
  22. package/resources/auctions/website-user-attributes/values.d.ts +47 -1
  23. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -1
  24. package/resources/auctions/website-user-attributes/values.js +14 -0
  25. package/resources/auctions/website-user-attributes/values.js.map +1 -1
  26. package/resources/auctions/website-user-attributes/values.mjs +14 -0
  27. package/resources/auctions/website-user-attributes/values.mjs.map +1 -1
  28. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +43 -3
  29. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -1
  30. package/resources/auctions/website-user-attributes/website-user-attributes.js +7 -0
  31. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -1
  32. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +7 -0
  33. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -1
  34. package/resources/index.d.ts +1 -1
  35. package/resources/index.d.ts.map +1 -1
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +1 -1
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/loyalty/index.d.ts +1 -1
  40. package/resources/loyalty/index.d.ts.map +1 -1
  41. package/resources/loyalty/index.js.map +1 -1
  42. package/resources/loyalty/index.mjs.map +1 -1
  43. package/resources/loyalty/loyalty.d.ts +2 -2
  44. package/resources/loyalty/loyalty.d.ts.map +1 -1
  45. package/resources/loyalty/loyalty.js.map +1 -1
  46. package/resources/loyalty/loyalty.mjs.map +1 -1
  47. package/resources/loyalty/transactions/index.d.ts +2 -2
  48. package/resources/loyalty/transactions/index.d.ts.map +1 -1
  49. package/resources/loyalty/transactions/index.js.map +1 -1
  50. package/resources/loyalty/transactions/index.mjs +1 -1
  51. package/resources/loyalty/transactions/index.mjs.map +1 -1
  52. package/resources/loyalty/transactions/rule-statuses.d.ts +60 -1
  53. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -1
  54. package/resources/loyalty/transactions/rule-statuses.js +7 -0
  55. package/resources/loyalty/transactions/rule-statuses.js.map +1 -1
  56. package/resources/loyalty/transactions/rule-statuses.mjs +7 -0
  57. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -1
  58. package/resources/loyalty/transactions/transactions.d.ts +121 -3
  59. package/resources/loyalty/transactions/transactions.d.ts.map +1 -1
  60. package/resources/loyalty/transactions/transactions.js +15 -0
  61. package/resources/loyalty/transactions/transactions.js.map +1 -1
  62. package/resources/loyalty/transactions/transactions.mjs +16 -1
  63. package/resources/loyalty/transactions/transactions.mjs.map +1 -1
  64. package/resources/websites/index.d.ts +2 -2
  65. package/resources/websites/index.d.ts.map +1 -1
  66. package/resources/websites/index.js.map +1 -1
  67. package/resources/websites/index.mjs +2 -2
  68. package/resources/websites/index.mjs.map +1 -1
  69. package/resources/websites/website-collections.d.ts +90 -0
  70. package/resources/websites/website-collections.d.ts.map +1 -1
  71. package/resources/websites/website-collections.js +37 -0
  72. package/resources/websites/website-collections.js.map +1 -1
  73. package/resources/websites/website-collections.mjs +37 -0
  74. package/resources/websites/website-collections.mjs.map +1 -1
  75. package/resources/websites/websites.d.ts +105 -3
  76. package/resources/websites/websites.d.ts.map +1 -1
  77. package/resources/websites/websites.js +13 -0
  78. package/resources/websites/websites.js.map +1 -1
  79. package/resources/websites/websites.mjs +14 -1
  80. package/resources/websites/websites.mjs.map +1 -1
  81. package/src/index.ts +9 -1
  82. package/src/resources/auctions/auctions.ts +4 -0
  83. package/src/resources/auctions/index.ts +2 -0
  84. package/src/resources/auctions/website-user-attributes/index.ts +9 -1
  85. package/src/resources/auctions/website-user-attributes/values.ts +69 -1
  86. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +71 -1
  87. package/src/resources/index.ts +7 -1
  88. package/src/resources/loyalty/index.ts +2 -0
  89. package/src/resources/loyalty/loyalty.ts +4 -0
  90. package/src/resources/loyalty/transactions/index.ts +9 -1
  91. package/src/resources/loyalty/transactions/rule-statuses.ts +91 -0
  92. package/src/resources/loyalty/transactions/transactions.ts +160 -1
  93. package/src/resources/websites/index.ts +13 -2
  94. package/src/resources/websites/website-collections.ts +183 -1
  95. package/src/resources/websites/websites.ts +141 -3
  96. package/src/version.ts +1 -1
  97. package/version.d.ts +1 -1
  98. package/version.js +1 -1
  99. package/version.mjs +1 -1
@@ -1,9 +1,10 @@
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';
4
5
  import * as Core from '../../../core';
5
6
  import * as ValuesAPI from './values';
6
- import { ValueCreateParams, ValueCreateResponse, Values } from './values';
7
+ import { ValueCreateParams, ValueCreateResponse, ValueListParams, ValueListResponse, Values } from './values';
7
8
 
8
9
  export class WebsiteUserAttributes extends APIResource {
9
10
  values: ValuesAPI.Values = new ValuesAPI.Values(this._client);
@@ -26,6 +27,30 @@ export class WebsiteUserAttributes extends APIResource {
26
27
  return this._client.post('/api/website_user_attributes', { body, ...options });
27
28
  }
28
29
 
30
+ /**
31
+ * Get all website user attributes
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const websiteUserAttributes =
36
+ * await client.auctions.websiteUserAttributes.list();
37
+ * ```
38
+ */
39
+ list(
40
+ query?: WebsiteUserAttributeListParams,
41
+ options?: Core.RequestOptions,
42
+ ): Core.APIPromise<WebsiteUserAttributeListResponse>;
43
+ list(options?: Core.RequestOptions): Core.APIPromise<WebsiteUserAttributeListResponse>;
44
+ list(
45
+ query: WebsiteUserAttributeListParams | Core.RequestOptions = {},
46
+ options?: Core.RequestOptions,
47
+ ): Core.APIPromise<WebsiteUserAttributeListResponse> {
48
+ if (isRequestOptions(query)) {
49
+ return this.list({}, query);
50
+ }
51
+ return this._client.get('/api/website_user_attributes', { query, ...options });
52
+ }
53
+
29
54
  /**
30
55
  * Delete a website user attribute
31
56
  *
@@ -70,6 +95,30 @@ export namespace WebsiteUserAttributeCreateResponse {
70
95
  }
71
96
  }
72
97
 
98
+ export interface WebsiteUserAttributeListResponse {
99
+ data: Array<WebsiteUserAttributeListResponse.Data>;
100
+
101
+ hasNextPage: boolean;
102
+ }
103
+
104
+ export namespace WebsiteUserAttributeListResponse {
105
+ export interface Data {
106
+ id: string;
107
+
108
+ createdAt: string;
109
+
110
+ deletedAt: string | null;
111
+
112
+ label: string;
113
+
114
+ organizationId: string;
115
+
116
+ updatedAt: string;
117
+
118
+ websiteId: string;
119
+ }
120
+ }
121
+
73
122
  export interface WebsiteUserAttributeDeleteResponse {
74
123
  message: string;
75
124
  }
@@ -102,6 +151,23 @@ export namespace WebsiteUserAttributeCreateParams {
102
151
  }
103
152
  }
104
153
 
154
+ export interface WebsiteUserAttributeListParams {
155
+ /**
156
+ * Number of website user attributes to return
157
+ */
158
+ limit?: string;
159
+
160
+ /**
161
+ * Unique identifier for the organization
162
+ */
163
+ organizationId?: string;
164
+
165
+ /**
166
+ * Unique identifier for the website
167
+ */
168
+ websiteId?: string;
169
+ }
170
+
105
171
  export interface WebsiteUserAttributeDeleteParams {
106
172
  /**
107
173
  * Unique identifier for the website user attribute
@@ -124,14 +190,18 @@ WebsiteUserAttributes.Values = Values;
124
190
  export declare namespace WebsiteUserAttributes {
125
191
  export {
126
192
  type WebsiteUserAttributeCreateResponse as WebsiteUserAttributeCreateResponse,
193
+ type WebsiteUserAttributeListResponse as WebsiteUserAttributeListResponse,
127
194
  type WebsiteUserAttributeDeleteResponse as WebsiteUserAttributeDeleteResponse,
128
195
  type WebsiteUserAttributeCreateParams as WebsiteUserAttributeCreateParams,
196
+ type WebsiteUserAttributeListParams as WebsiteUserAttributeListParams,
129
197
  type WebsiteUserAttributeDeleteParams as WebsiteUserAttributeDeleteParams,
130
198
  };
131
199
 
132
200
  export {
133
201
  Values as Values,
134
202
  type ValueCreateResponse as ValueCreateResponse,
203
+ type ValueListResponse as ValueListResponse,
135
204
  type ValueCreateParams as ValueCreateParams,
205
+ type ValueListParams as ValueListParams,
136
206
  };
137
207
  }
@@ -31,4 +31,10 @@ export {
31
31
  type UserDisconnectParams,
32
32
  type UserVerifyParams,
33
33
  } from './users/users';
34
- export { Websites, type WebsiteListResponse, type WebsiteListParams } from './websites/websites';
34
+ export {
35
+ Websites,
36
+ type WebsiteCreateResponse,
37
+ type WebsiteListResponse,
38
+ type WebsiteCreateParams,
39
+ type WebsiteListParams,
40
+ } from './websites/websites';
@@ -98,6 +98,8 @@ export {
98
98
  Transactions,
99
99
  type TransactionCreateTransactionResponse,
100
100
  type TransactionGetTransactionEntriesResponse,
101
+ type TransactionListRuleChainsResponse,
101
102
  type TransactionCreateTransactionParams,
102
103
  type TransactionGetTransactionEntriesParams,
104
+ type TransactionListRuleChainsParams,
103
105
  } from './transactions/index';
@@ -110,6 +110,8 @@ import {
110
110
  TransactionCreateTransactionResponse,
111
111
  TransactionGetTransactionEntriesParams,
112
112
  TransactionGetTransactionEntriesResponse,
113
+ TransactionListRuleChainsParams,
114
+ TransactionListRuleChainsResponse,
113
115
  Transactions,
114
116
  } from './transactions/transactions';
115
117
 
@@ -157,8 +159,10 @@ export declare namespace Loyalty {
157
159
  Transactions as Transactions,
158
160
  type TransactionCreateTransactionResponse as TransactionCreateTransactionResponse,
159
161
  type TransactionGetTransactionEntriesResponse as TransactionGetTransactionEntriesResponse,
162
+ type TransactionListRuleChainsResponse as TransactionListRuleChainsResponse,
160
163
  type TransactionCreateTransactionParams as TransactionCreateTransactionParams,
161
164
  type TransactionGetTransactionEntriesParams as TransactionGetTransactionEntriesParams,
165
+ type TransactionListRuleChainsParams as TransactionListRuleChainsParams,
162
166
  };
163
167
 
164
168
  export {
@@ -1,10 +1,18 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { RuleStatuses, type RuleStatusUpdateResponse, type RuleStatusUpdateParams } from './rule-statuses';
3
+ export {
4
+ RuleStatuses,
5
+ type RuleStatusUpdateResponse,
6
+ type RuleStatusListResponse,
7
+ type RuleStatusUpdateParams,
8
+ type RuleStatusListParams,
9
+ } from './rule-statuses';
4
10
  export {
5
11
  Transactions,
6
12
  type TransactionCreateTransactionResponse,
7
13
  type TransactionGetTransactionEntriesResponse,
14
+ type TransactionListRuleChainsResponse,
8
15
  type TransactionCreateTransactionParams,
9
16
  type TransactionGetTransactionEntriesParams,
17
+ type TransactionListRuleChainsParams,
10
18
  } from './transactions';
@@ -1,6 +1,7 @@
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';
4
5
  import * as Core from '../../../core';
5
6
 
6
7
  export class RuleStatuses extends APIResource {
@@ -21,6 +22,27 @@ export class RuleStatuses extends APIResource {
21
22
  ): Core.APIPromise<RuleStatusUpdateResponse> {
22
23
  return this._client.post('/api/loyalty/rule_statuses', { body, ...options });
23
24
  }
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
+ }
24
46
  }
25
47
 
26
48
  export interface RuleStatusUpdateResponse {
@@ -41,6 +63,32 @@ export interface RuleStatusUpdateResponse {
41
63
  websiteId: string;
42
64
  }
43
65
 
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
+
44
92
  export interface RuleStatusUpdateParams {
45
93
  /**
46
94
  * Unique identifier for the loyalty rule
@@ -79,9 +127,52 @@ export interface RuleStatusUpdateParams {
79
127
  websiteId?: string;
80
128
  }
81
129
 
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
+
82
171
  export declare namespace RuleStatuses {
83
172
  export {
84
173
  type RuleStatusUpdateResponse as RuleStatusUpdateResponse,
174
+ type RuleStatusListResponse as RuleStatusListResponse,
85
175
  type RuleStatusUpdateParams as RuleStatusUpdateParams,
176
+ type RuleStatusListParams as RuleStatusListParams,
86
177
  };
87
178
  }
@@ -4,7 +4,13 @@ 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 { RuleStatusUpdateParams, RuleStatusUpdateResponse, RuleStatuses } from './rule-statuses';
7
+ import {
8
+ RuleStatusListParams,
9
+ RuleStatusListResponse,
10
+ RuleStatusUpdateParams,
11
+ RuleStatusUpdateResponse,
12
+ RuleStatuses,
13
+ } from './rule-statuses';
8
14
 
9
15
  export class Transactions extends APIResource {
10
16
  ruleStatuses: RuleStatusesAPI.RuleStatuses = new RuleStatusesAPI.RuleStatuses(this._client);
@@ -54,6 +60,25 @@ export class Transactions extends APIResource {
54
60
  }
55
61
  return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
56
62
  }
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
+ }
57
82
  }
58
83
 
59
84
  export interface TransactionCreateTransactionResponse {
@@ -213,6 +238,114 @@ export namespace TransactionGetTransactionEntriesResponse {
213
238
  }
214
239
  }
215
240
 
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
+
216
349
  export interface TransactionCreateTransactionParams {
217
350
  /**
218
351
  * Description of the loyalty transaction
@@ -504,19 +637,45 @@ export interface TransactionGetTransactionEntriesParams {
504
637
  websiteId?: string;
505
638
  }
506
639
 
640
+ export interface TransactionListRuleChainsParams {
641
+ /**
642
+ * Unique identifier for the organization
643
+ */
644
+ organizationId: string;
645
+
646
+ /**
647
+ * Unique identifier for the website
648
+ */
649
+ websiteId: string;
650
+
651
+ /**
652
+ * Number of rule chains to return
653
+ */
654
+ limit?: number;
655
+
656
+ /**
657
+ * Starting after the given rule chain ID
658
+ */
659
+ startingAfter?: string;
660
+ }
661
+
507
662
  Transactions.RuleStatuses = RuleStatuses;
508
663
 
509
664
  export declare namespace Transactions {
510
665
  export {
511
666
  type TransactionCreateTransactionResponse as TransactionCreateTransactionResponse,
512
667
  type TransactionGetTransactionEntriesResponse as TransactionGetTransactionEntriesResponse,
668
+ type TransactionListRuleChainsResponse as TransactionListRuleChainsResponse,
513
669
  type TransactionCreateTransactionParams as TransactionCreateTransactionParams,
514
670
  type TransactionGetTransactionEntriesParams as TransactionGetTransactionEntriesParams,
671
+ type TransactionListRuleChainsParams as TransactionListRuleChainsParams,
515
672
  };
516
673
 
517
674
  export {
518
675
  RuleStatuses as RuleStatuses,
519
676
  type RuleStatusUpdateResponse as RuleStatusUpdateResponse,
677
+ type RuleStatusListResponse as RuleStatusListResponse,
520
678
  type RuleStatusUpdateParams as RuleStatusUpdateParams,
679
+ type RuleStatusListParams as RuleStatusListParams,
521
680
  };
522
681
  }
@@ -1,6 +1,11 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { WebsiteCollections } from './website-collections';
3
+ export {
4
+ WebsiteCollections,
5
+ type WebsiteCollectionListResponse,
6
+ type WebsiteCollectionCreateParams,
7
+ type WebsiteCollectionListParams,
8
+ } from './website-collections';
4
9
  export {
5
10
  WebsiteUserRoles,
6
11
  type WebsiteUserRoleListResponse,
@@ -8,4 +13,10 @@ export {
8
13
  type WebsiteUserRoleListParams,
9
14
  type WebsiteUserRoleAssignParams,
10
15
  } from './website-user-roles';
11
- export { Websites, type WebsiteListResponse, type WebsiteListParams } from './websites';
16
+ export {
17
+ Websites,
18
+ type WebsiteCreateResponse,
19
+ type WebsiteListResponse,
20
+ type WebsiteCreateParams,
21
+ type WebsiteListParams,
22
+ } from './websites';
@@ -1,5 +1,187 @@
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';
4
5
 
5
- export class WebsiteCollections extends APIResource {}
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
+ | 'skaleEuropa'
104
+ | 'skaleCalypso'
105
+ | 'solana'
106
+ | 'sophon'
107
+ | 'sophonTestnet'
108
+ | 'sui'
109
+ | 'superseed'
110
+ | 'superseedSepolia'
111
+ | 'vanar'
112
+ | 'xai'
113
+ | 'zksync'
114
+ | 'coti'
115
+ | 'cotiTestnet'
116
+ | 'morph'
117
+ | 'morphTestnet'
118
+ | 'morphHolesky'
119
+ | 'ultra'
120
+ | 'ultraTestnet'
121
+ | 'nitrograph'
122
+ | 'sepolia'
123
+ | 'optimism_sepolia'
124
+ | 'arbitrumSepolia'
125
+ | 'goerli'
126
+ | 'optimism_goerli'
127
+ | 'arbitrumGoerli'
128
+ | 'basecamp'
129
+ | 'somnia'
130
+ | 'flow_cadence';
131
+
132
+ organizationId: string;
133
+
134
+ sortId: number;
135
+
136
+ websiteId: string;
137
+
138
+ discordUrl?: string;
139
+
140
+ homeUrl?: string;
141
+
142
+ imageUrl?: string | null;
143
+
144
+ instagramUsername?: string;
145
+
146
+ royaltyFee?: number | null;
147
+
148
+ royaltyFeeAddress?: string | null;
149
+
150
+ stakingAddress?: string;
151
+
152
+ telegramUrl?: string;
153
+
154
+ themeId?: string;
155
+
156
+ twitterUsername?: string;
157
+ }
158
+
159
+ export interface WebsiteCollectionListParams {
160
+ /**
161
+ * Filter by website ID
162
+ */
163
+ websiteId: string;
164
+
165
+ /**
166
+ * Number of items to return
167
+ */
168
+ limit?: number;
169
+
170
+ /**
171
+ * Filter by organization ID
172
+ */
173
+ organizationId?: string;
174
+
175
+ /**
176
+ * Pagination cursor, start after this ID
177
+ */
178
+ startingAfter?: string;
179
+ }
180
+
181
+ export declare namespace WebsiteCollections {
182
+ export {
183
+ type WebsiteCollectionListResponse as WebsiteCollectionListResponse,
184
+ type WebsiteCollectionCreateParams as WebsiteCollectionCreateParams,
185
+ type WebsiteCollectionListParams as WebsiteCollectionListParams,
186
+ };
187
+ }