@snagsolutions/sdk 0.1.0-alpha.173 → 0.1.0-alpha.174
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 +8 -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 +47 -1
- package/resources/auctions/website-user-attributes/values.d.ts.map +1 -1
- package/resources/auctions/website-user-attributes/values.js +14 -0
- package/resources/auctions/website-user-attributes/values.js.map +1 -1
- package/resources/auctions/website-user-attributes/values.mjs +14 -0
- package/resources/auctions/website-user-attributes/values.mjs.map +1 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +43 -3
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.js +7 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -1
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs +7 -0
- 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/transactions/index.d.ts +1 -1
- 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.map +1 -1
- package/resources/loyalty/transactions/transactions.d.ts +119 -1
- package/resources/loyalty/transactions/transactions.d.ts.map +1 -1
- package/resources/loyalty/transactions/transactions.js +15 -0
- package/resources/loyalty/transactions/transactions.js.map +1 -1
- package/resources/loyalty/transactions/transactions.mjs +15 -0
- package/resources/loyalty/transactions/transactions.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 +90 -0
- package/resources/websites/website-collections.d.ts.map +1 -1
- package/resources/websites/website-collections.js +37 -0
- package/resources/websites/website-collections.js.map +1 -1
- package/resources/websites/website-collections.mjs +37 -0
- package/resources/websites/website-collections.mjs.map +1 -1
- package/resources/websites/websites.d.ts +105 -3
- package/resources/websites/websites.d.ts.map +1 -1
- package/resources/websites/websites.js +13 -0
- package/resources/websites/websites.js.map +1 -1
- package/resources/websites/websites.mjs +14 -1
- package/resources/websites/websites.mjs.map +1 -1
- package/src/index.ts +9 -1
- package/src/resources/auctions/auctions.ts +4 -0
- package/src/resources/auctions/index.ts +2 -0
- package/src/resources/auctions/website-user-attributes/index.ts +9 -1
- package/src/resources/auctions/website-user-attributes/values.ts +69 -1
- package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +71 -1
- package/src/resources/index.ts +7 -1
- package/src/resources/loyalty/index.ts +2 -0
- package/src/resources/loyalty/loyalty.ts +4 -0
- package/src/resources/loyalty/transactions/index.ts +2 -0
- package/src/resources/loyalty/transactions/transactions.ts +151 -0
- package/src/resources/websites/index.ts +13 -2
- package/src/resources/websites/website-collections.ts +183 -1
- package/src/resources/websites/websites.ts +141 -3
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import { APIResource } from "../../resource.js";
|
|
2
2
|
import * as Core from "../../core.js";
|
|
3
3
|
import * as WebsiteCollectionsAPI from "./website-collections.js";
|
|
4
|
-
import { WebsiteCollections } from "./website-collections.js";
|
|
4
|
+
import { WebsiteCollectionCreateParams, WebsiteCollectionListParams, WebsiteCollectionListResponse, WebsiteCollections } from "./website-collections.js";
|
|
5
5
|
import * as WebsiteUserRolesAPI from "./website-user-roles.js";
|
|
6
6
|
import { WebsiteUserRoleAssignParams, WebsiteUserRoleAssignResponse, WebsiteUserRoleListParams, WebsiteUserRoleListResponse, WebsiteUserRoles } from "./website-user-roles.js";
|
|
7
7
|
export declare class Websites extends APIResource {
|
|
8
8
|
websiteCollections: WebsiteCollectionsAPI.WebsiteCollections;
|
|
9
9
|
websiteUserRoles: WebsiteUserRolesAPI.WebsiteUserRoles;
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new website
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const website = await client.websites.create({
|
|
16
|
+
* name: 'My New Website',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(body: WebsiteCreateParams, options?: Core.RequestOptions): Core.APIPromise<WebsiteCreateResponse>;
|
|
10
21
|
/**
|
|
11
22
|
* Returns a list of websites. Includes optional query parameters for filtering and
|
|
12
23
|
* pagination.
|
|
@@ -19,6 +30,67 @@ export declare class Websites extends APIResource {
|
|
|
19
30
|
list(query?: WebsiteListParams, options?: Core.RequestOptions): Core.APIPromise<WebsiteListResponse>;
|
|
20
31
|
list(options?: Core.RequestOptions): Core.APIPromise<WebsiteListResponse>;
|
|
21
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Schema representing a website
|
|
35
|
+
*/
|
|
36
|
+
export interface WebsiteCreateResponse {
|
|
37
|
+
/**
|
|
38
|
+
* Website ID
|
|
39
|
+
*/
|
|
40
|
+
id: string;
|
|
41
|
+
/**
|
|
42
|
+
* Counts of related entities
|
|
43
|
+
*/
|
|
44
|
+
_count: WebsiteCreateResponse._Count;
|
|
45
|
+
/**
|
|
46
|
+
* Collections associated with the website
|
|
47
|
+
*/
|
|
48
|
+
collections: Array<WebsiteCreateResponse.Collection>;
|
|
49
|
+
/**
|
|
50
|
+
* Website name
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
53
|
+
/**
|
|
54
|
+
* Date when terms were signed
|
|
55
|
+
*/
|
|
56
|
+
termsSignedAt: string | null;
|
|
57
|
+
}
|
|
58
|
+
export declare namespace WebsiteCreateResponse {
|
|
59
|
+
/**
|
|
60
|
+
* Counts of related entities
|
|
61
|
+
*/
|
|
62
|
+
interface _Count {
|
|
63
|
+
/**
|
|
64
|
+
* Count of minting contract assets
|
|
65
|
+
*/
|
|
66
|
+
mintingContractAssets: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Schema representing a collection
|
|
70
|
+
*/
|
|
71
|
+
interface Collection {
|
|
72
|
+
/**
|
|
73
|
+
* Collection ID
|
|
74
|
+
*/
|
|
75
|
+
id: string;
|
|
76
|
+
/**
|
|
77
|
+
* URL of the collection image
|
|
78
|
+
*/
|
|
79
|
+
imageUrl: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* Collection name
|
|
82
|
+
*/
|
|
83
|
+
name: string;
|
|
84
|
+
/**
|
|
85
|
+
* Royalty fee percentage
|
|
86
|
+
*/
|
|
87
|
+
royaltyFee: number;
|
|
88
|
+
/**
|
|
89
|
+
* Address to receive royalty fees
|
|
90
|
+
*/
|
|
91
|
+
royaltyFeeAddress: string;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
22
94
|
/**
|
|
23
95
|
* Response schema for fetching websites
|
|
24
96
|
*/
|
|
@@ -95,6 +167,36 @@ export declare namespace WebsiteListResponse {
|
|
|
95
167
|
}
|
|
96
168
|
}
|
|
97
169
|
}
|
|
170
|
+
export interface WebsiteCreateParams {
|
|
171
|
+
/**
|
|
172
|
+
* Name of the website
|
|
173
|
+
*/
|
|
174
|
+
name: string;
|
|
175
|
+
/**
|
|
176
|
+
* Discord URL of the website account
|
|
177
|
+
*/
|
|
178
|
+
discordUrl?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Home URL of the official website
|
|
181
|
+
*/
|
|
182
|
+
homeUrl?: string;
|
|
183
|
+
/**
|
|
184
|
+
* Instagram username of the website account
|
|
185
|
+
*/
|
|
186
|
+
instagramUsername?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Organization ID for which this website is being created
|
|
189
|
+
*/
|
|
190
|
+
organizationId?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Telegram URL of the website account
|
|
193
|
+
*/
|
|
194
|
+
telegramUrl?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Twitter username of the website account
|
|
197
|
+
*/
|
|
198
|
+
twitterUsername?: string;
|
|
199
|
+
}
|
|
98
200
|
export interface WebsiteListParams {
|
|
99
201
|
/**
|
|
100
202
|
* Number of items to return
|
|
@@ -114,8 +216,8 @@ export interface WebsiteListParams {
|
|
|
114
216
|
startingAfter?: string;
|
|
115
217
|
}
|
|
116
218
|
export declare namespace Websites {
|
|
117
|
-
export { type WebsiteListResponse as WebsiteListResponse, type WebsiteListParams as WebsiteListParams };
|
|
118
|
-
export { WebsiteCollections as WebsiteCollections };
|
|
219
|
+
export { type WebsiteCreateResponse as WebsiteCreateResponse, type WebsiteListResponse as WebsiteListResponse, type WebsiteCreateParams as WebsiteCreateParams, type WebsiteListParams as WebsiteListParams, };
|
|
220
|
+
export { WebsiteCollections as WebsiteCollections, type WebsiteCollectionListResponse as WebsiteCollectionListResponse, type WebsiteCollectionCreateParams as WebsiteCollectionCreateParams, type WebsiteCollectionListParams as WebsiteCollectionListParams, };
|
|
119
221
|
export { WebsiteUserRoles as WebsiteUserRoles, type WebsiteUserRoleListResponse as WebsiteUserRoleListResponse, type WebsiteUserRoleAssignResponse as WebsiteUserRoleAssignResponse, type WebsiteUserRoleListParams as WebsiteUserRoleListParams, type WebsiteUserRoleAssignParams as WebsiteUserRoleAssignParams, };
|
|
120
222
|
}
|
|
121
223
|
//# sourceMappingURL=websites.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websites.d.ts","sourceRoot":"","sources":["../../src/resources/websites/websites.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"websites.d.ts","sourceRoot":"","sources":["../../src/resources/websites/websites.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,2BAA2B,EAC3B,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAE9B,qBAAa,QAAS,SAAQ,WAAW;IACvC,kBAA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AEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAKD,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,kBAAkB,IAAI,kBAAkB,EACxC,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;IAEF,OAAO,EACL,gBAAgB,IAAI,gBAAgB,EACpC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
|
@@ -37,6 +37,19 @@ class Websites extends resource_1.APIResource {
|
|
|
37
37
|
this.websiteCollections = new WebsiteCollectionsAPI.WebsiteCollections(this._client);
|
|
38
38
|
this.websiteUserRoles = new WebsiteUserRolesAPI.WebsiteUserRoles(this._client);
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new website
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const website = await client.websites.create({
|
|
46
|
+
* name: 'My New Website',
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
create(body, options) {
|
|
51
|
+
return this._client.post('/api/websites', { body, ...options });
|
|
52
|
+
}
|
|
40
53
|
list(query = {}, options) {
|
|
41
54
|
if ((0, core_1.isRequestOptions)(query)) {
|
|
42
55
|
return this.list({}, query);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websites.js","sourceRoot":"","sources":["../../src/resources/websites/websites.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAE9C,gFAA+D;AAC/D,
|
|
1
|
+
{"version":3,"file":"websites.js","sourceRoot":"","sources":["../../src/resources/websites/websites.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAE9C,gFAA+D;AAC/D,kEAK+B;AAC/B,6EAA4D;AAC5D,gEAM8B;AAE9B,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,uBAAkB,GAA6C,IAAI,qBAAqB,CAAC,kBAAkB,CACzG,IAAI,CAAC,OAAO,CACb,CAAC;QACF,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;IAoCJ,CAAC;IAlCC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAaD,IAAI,CACF,QAAiD,EAAE,EACnD,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,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AA1CD,4BA0CC;AA8ND,QAAQ,CAAC,kBAAkB,GAAG,wCAAkB,CAAC;AACjD,QAAQ,CAAC,gBAAgB,GAAG,qCAAgB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { APIResource } from "../../resource.mjs";
|
|
3
3
|
import { isRequestOptions } from "../../core.mjs";
|
|
4
4
|
import * as WebsiteCollectionsAPI from "./website-collections.mjs";
|
|
5
|
-
import { WebsiteCollections } from "./website-collections.mjs";
|
|
5
|
+
import { WebsiteCollections, } from "./website-collections.mjs";
|
|
6
6
|
import * as WebsiteUserRolesAPI from "./website-user-roles.mjs";
|
|
7
7
|
import { WebsiteUserRoles, } from "./website-user-roles.mjs";
|
|
8
8
|
export class Websites extends APIResource {
|
|
@@ -11,6 +11,19 @@ export class Websites extends APIResource {
|
|
|
11
11
|
this.websiteCollections = new WebsiteCollectionsAPI.WebsiteCollections(this._client);
|
|
12
12
|
this.websiteUserRoles = new WebsiteUserRolesAPI.WebsiteUserRoles(this._client);
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new website
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const website = await client.websites.create({
|
|
20
|
+
* name: 'My New Website',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(body, options) {
|
|
25
|
+
return this._client.post('/api/websites', { body, ...options });
|
|
26
|
+
}
|
|
14
27
|
list(query = {}, options) {
|
|
15
28
|
if (isRequestOptions(query)) {
|
|
16
29
|
return this.list({}, query);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websites.mjs","sourceRoot":"","sources":["../../src/resources/websites/websites.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,KAAK,qBAAqB;OAC1B,
|
|
1
|
+
{"version":3,"file":"websites.mjs","sourceRoot":"","sources":["../../src/resources/websites/websites.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,KAAK,qBAAqB;OAC1B,EAIL,kBAAkB,GACnB;OACM,KAAK,mBAAmB;OACxB,EAKL,gBAAgB,GACjB;AAED,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,uBAAkB,GAA6C,IAAI,qBAAqB,CAAC,kBAAkB,CACzG,IAAI,CAAC,OAAO,CACb,CAAC;QACF,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;IAoCJ,CAAC;IAlCC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAaD,IAAI,CACF,QAAiD,EAAE,EACnD,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,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AA8ND,QAAQ,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACjD,QAAQ,CAAC,gBAAgB,GAAG,gBAAgB,CAAC"}
|
package/src/index.ts
CHANGED
|
@@ -37,7 +37,13 @@ import {
|
|
|
37
37
|
UserVerifyResponse,
|
|
38
38
|
Users,
|
|
39
39
|
} from './resources/users/users';
|
|
40
|
-
import {
|
|
40
|
+
import {
|
|
41
|
+
WebsiteCreateParams,
|
|
42
|
+
WebsiteCreateResponse,
|
|
43
|
+
WebsiteListParams,
|
|
44
|
+
WebsiteListResponse,
|
|
45
|
+
Websites,
|
|
46
|
+
} from './resources/websites/websites';
|
|
41
47
|
|
|
42
48
|
export interface ClientOptions {
|
|
43
49
|
/**
|
|
@@ -275,7 +281,9 @@ export declare namespace SnagSolutions {
|
|
|
275
281
|
|
|
276
282
|
export {
|
|
277
283
|
Websites as Websites,
|
|
284
|
+
type WebsiteCreateResponse as WebsiteCreateResponse,
|
|
278
285
|
type WebsiteListResponse as WebsiteListResponse,
|
|
286
|
+
type WebsiteCreateParams as WebsiteCreateParams,
|
|
279
287
|
type WebsiteListParams as WebsiteListParams,
|
|
280
288
|
};
|
|
281
289
|
}
|
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
WebsiteUserAttributeCreateResponse,
|
|
10
10
|
WebsiteUserAttributeDeleteParams,
|
|
11
11
|
WebsiteUserAttributeDeleteResponse,
|
|
12
|
+
WebsiteUserAttributeListParams,
|
|
13
|
+
WebsiteUserAttributeListResponse,
|
|
12
14
|
WebsiteUserAttributes,
|
|
13
15
|
} from './website-user-attributes/website-user-attributes';
|
|
14
16
|
|
|
@@ -425,8 +427,10 @@ export declare namespace Auctions {
|
|
|
425
427
|
export {
|
|
426
428
|
WebsiteUserAttributes as WebsiteUserAttributes,
|
|
427
429
|
type WebsiteUserAttributeCreateResponse as WebsiteUserAttributeCreateResponse,
|
|
430
|
+
type WebsiteUserAttributeListResponse as WebsiteUserAttributeListResponse,
|
|
428
431
|
type WebsiteUserAttributeDeleteResponse as WebsiteUserAttributeDeleteResponse,
|
|
429
432
|
type WebsiteUserAttributeCreateParams as WebsiteUserAttributeCreateParams,
|
|
433
|
+
type WebsiteUserAttributeListParams as WebsiteUserAttributeListParams,
|
|
430
434
|
type WebsiteUserAttributeDeleteParams as WebsiteUserAttributeDeleteParams,
|
|
431
435
|
};
|
|
432
436
|
}
|
|
@@ -10,7 +10,9 @@ export {
|
|
|
10
10
|
export {
|
|
11
11
|
WebsiteUserAttributes,
|
|
12
12
|
type WebsiteUserAttributeCreateResponse,
|
|
13
|
+
type WebsiteUserAttributeListResponse,
|
|
13
14
|
type WebsiteUserAttributeDeleteResponse,
|
|
14
15
|
type WebsiteUserAttributeCreateParams,
|
|
16
|
+
type WebsiteUserAttributeListParams,
|
|
15
17
|
type WebsiteUserAttributeDeleteParams,
|
|
16
18
|
} from './website-user-attributes/index';
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export {
|
|
4
|
+
Values,
|
|
5
|
+
type ValueCreateResponse,
|
|
6
|
+
type ValueListResponse,
|
|
7
|
+
type ValueCreateParams,
|
|
8
|
+
type ValueListParams,
|
|
9
|
+
} from './values';
|
|
4
10
|
export {
|
|
5
11
|
WebsiteUserAttributes,
|
|
6
12
|
type WebsiteUserAttributeCreateResponse,
|
|
13
|
+
type WebsiteUserAttributeListResponse,
|
|
7
14
|
type WebsiteUserAttributeDeleteResponse,
|
|
8
15
|
type WebsiteUserAttributeCreateParams,
|
|
16
|
+
type WebsiteUserAttributeListParams,
|
|
9
17
|
type WebsiteUserAttributeDeleteParams,
|
|
10
18
|
} from './website-user-attributes';
|
|
@@ -30,6 +30,21 @@ export class Values extends APIResource {
|
|
|
30
30
|
create(body: ValueCreateParams, options?: Core.RequestOptions): Core.APIPromise<ValueCreateResponse> {
|
|
31
31
|
return this._client.post('/api/website_user_attributes/values', { body, ...options });
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Get all website user attribute values
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const values =
|
|
40
|
+
* await client.auctions.websiteUserAttributes.values.list({
|
|
41
|
+
* userIds: '123e4567-e89b-12d3-a456-426614174004',
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
list(query: ValueListParams, options?: Core.RequestOptions): Core.APIPromise<ValueListResponse> {
|
|
46
|
+
return this._client.get('/api/website_user_attributes/values', { query, ...options });
|
|
47
|
+
}
|
|
33
48
|
}
|
|
34
49
|
|
|
35
50
|
export type ValueCreateResponse = Array<ValueCreateResponse.ValueCreateResponseItem>;
|
|
@@ -54,6 +69,32 @@ export namespace ValueCreateResponse {
|
|
|
54
69
|
}
|
|
55
70
|
}
|
|
56
71
|
|
|
72
|
+
export interface ValueListResponse {
|
|
73
|
+
data: Array<ValueListResponse.Data>;
|
|
74
|
+
|
|
75
|
+
hasNextPage: boolean;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export namespace ValueListResponse {
|
|
79
|
+
export interface Data {
|
|
80
|
+
id: string;
|
|
81
|
+
|
|
82
|
+
createdAt: string;
|
|
83
|
+
|
|
84
|
+
customFieldId: string;
|
|
85
|
+
|
|
86
|
+
organizationId: string;
|
|
87
|
+
|
|
88
|
+
updatedAt: string;
|
|
89
|
+
|
|
90
|
+
userId: string;
|
|
91
|
+
|
|
92
|
+
value: string;
|
|
93
|
+
|
|
94
|
+
websiteId: string;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
57
98
|
export interface ValueCreateParams {
|
|
58
99
|
data: Array<ValueCreateParams.Data>;
|
|
59
100
|
|
|
@@ -92,6 +133,33 @@ export namespace ValueCreateParams {
|
|
|
92
133
|
}
|
|
93
134
|
}
|
|
94
135
|
|
|
136
|
+
export interface ValueListParams {
|
|
137
|
+
/**
|
|
138
|
+
* Unique identifier for the user
|
|
139
|
+
*/
|
|
140
|
+
userIds: string | Array<string>;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Number of website user attributes to return
|
|
144
|
+
*/
|
|
145
|
+
limit?: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Unique identifier for the organization
|
|
149
|
+
*/
|
|
150
|
+
organizationId?: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Unique identifier for the website
|
|
154
|
+
*/
|
|
155
|
+
websiteId?: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
95
158
|
export declare namespace Values {
|
|
96
|
-
export {
|
|
159
|
+
export {
|
|
160
|
+
type ValueCreateResponse as ValueCreateResponse,
|
|
161
|
+
type ValueListResponse as ValueListResponse,
|
|
162
|
+
type ValueCreateParams as ValueCreateParams,
|
|
163
|
+
type ValueListParams as ValueListParams,
|
|
164
|
+
};
|
|
97
165
|
}
|
|
@@ -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
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -31,4 +31,10 @@ export {
|
|
|
31
31
|
type UserDisconnectParams,
|
|
32
32
|
type UserVerifyParams,
|
|
33
33
|
} from './users/users';
|
|
34
|
-
export {
|
|
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 {
|
|
@@ -5,6 +5,8 @@ export {
|
|
|
5
5
|
Transactions,
|
|
6
6
|
type TransactionCreateTransactionResponse,
|
|
7
7
|
type TransactionGetTransactionEntriesResponse,
|
|
8
|
+
type TransactionListRuleChainsResponse,
|
|
8
9
|
type TransactionCreateTransactionParams,
|
|
9
10
|
type TransactionGetTransactionEntriesParams,
|
|
11
|
+
type TransactionListRuleChainsParams,
|
|
10
12
|
} from './transactions';
|