@snagsolutions/sdk 0.1.0-alpha.10
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 +125 -0
- package/LICENSE +201 -0
- package/README.md +297 -0
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +101 -0
- package/_shims/auto/types.js +3 -0
- package/_shims/auto/types.mjs +3 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +81 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +89 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +56 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +41 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +37 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +78 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +71 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +83 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +241 -0
- package/core.d.ts.map +1 -0
- package/core.js +908 -0
- package/core.js.map +1 -0
- package/core.mjs +876 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +47 -0
- package/error.d.ts.map +1 -0
- package/error.js +113 -0
- package/error.js.map +1 -0
- package/error.mjs +97 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +126 -0
- package/index.d.ts +126 -0
- package/index.d.ts.map +1 -0
- package/index.js +141 -0
- package/index.js.map +1 -0
- package/index.mjs +98 -0
- package/index.mjs.map +1 -0
- package/internal/qs/formats.d.ts +6 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +11 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +8 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +280 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +276 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.ts +14 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +229 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/package.json +103 -0
- package/resource.d.ts +6 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +11 -0
- package/resource.js.map +1 -0
- package/resource.mjs +7 -0
- package/resource.mjs.map +1 -0
- package/resources/assets.d.ts +50 -0
- package/resources/assets.d.ts.map +1 -0
- package/resources/assets.js +17 -0
- package/resources/assets.js.map +1 -0
- package/resources/assets.mjs +13 -0
- package/resources/assets.mjs.map +1 -0
- package/resources/auction-bids.d.ts +81 -0
- package/resources/auction-bids.d.ts.map +1 -0
- package/resources/auction-bids.js +30 -0
- package/resources/auction-bids.js.map +1 -0
- package/resources/auction-bids.mjs +26 -0
- package/resources/auction-bids.mjs.map +1 -0
- package/resources/drip/drip.d.ts +14 -0
- package/resources/drip/drip.d.ts.map +1 -0
- package/resources/drip/drip.js +43 -0
- package/resources/drip/drip.js.map +1 -0
- package/resources/drip/drip.mjs +16 -0
- package/resources/drip/drip.mjs.map +1 -0
- package/resources/drip/index.d.ts +4 -0
- package/resources/drip/index.d.ts.map +1 -0
- package/resources/drip/index.js +11 -0
- package/resources/drip/index.js.map +1 -0
- package/resources/drip/index.mjs +5 -0
- package/resources/drip/index.mjs.map +1 -0
- package/resources/drip/quests.d.ts +168 -0
- package/resources/drip/quests.d.ts.map +1 -0
- package/resources/drip/quests.js +17 -0
- package/resources/drip/quests.js.map +1 -0
- package/resources/drip/quests.mjs +13 -0
- package/resources/drip/quests.mjs.map +1 -0
- package/resources/drip/status.d.ts +26 -0
- package/resources/drip/status.d.ts.map +1 -0
- package/resources/drip/status.js +16 -0
- package/resources/drip/status.js.map +1 -0
- package/resources/drip/status.mjs +12 -0
- package/resources/drip/status.mjs.map +1 -0
- package/resources/index.d.ts +7 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +17 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +8 -0
- package/resources/index.mjs.map +1 -0
- package/resources/loyalty/accounts.d.ts +157 -0
- package/resources/loyalty/accounts.d.ts.map +1 -0
- package/resources/loyalty/accounts.js +16 -0
- package/resources/loyalty/accounts.js.map +1 -0
- package/resources/loyalty/accounts.mjs +12 -0
- package/resources/loyalty/accounts.mjs.map +1 -0
- package/resources/loyalty/badges.d.ts +299 -0
- package/resources/loyalty/badges.d.ts.map +1 -0
- package/resources/loyalty/badges.js +46 -0
- package/resources/loyalty/badges.js.map +1 -0
- package/resources/loyalty/badges.mjs +42 -0
- package/resources/loyalty/badges.mjs.map +1 -0
- package/resources/loyalty/currencies.d.ts +252 -0
- package/resources/loyalty/currencies.d.ts.map +1 -0
- package/resources/loyalty/currencies.js +21 -0
- package/resources/loyalty/currencies.js.map +1 -0
- package/resources/loyalty/currencies.mjs +17 -0
- package/resources/loyalty/currencies.mjs.map +1 -0
- package/resources/loyalty/index.d.ts +9 -0
- package/resources/loyalty/index.d.ts.map +1 -0
- package/resources/loyalty/index.js +21 -0
- package/resources/loyalty/index.js.map +1 -0
- package/resources/loyalty/index.mjs +10 -0
- package/resources/loyalty/index.mjs.map +1 -0
- package/resources/loyalty/loyalty.d.ts +34 -0
- package/resources/loyalty/loyalty.d.ts.map +1 -0
- package/resources/loyalty/loyalty.js +63 -0
- package/resources/loyalty/loyalty.js.map +1 -0
- package/resources/loyalty/loyalty.mjs +36 -0
- package/resources/loyalty/loyalty.mjs.map +1 -0
- package/resources/loyalty/multipliers.d.ts +129 -0
- package/resources/loyalty/multipliers.d.ts.map +1 -0
- package/resources/loyalty/multipliers.js +34 -0
- package/resources/loyalty/multipliers.js.map +1 -0
- package/resources/loyalty/multipliers.mjs +30 -0
- package/resources/loyalty/multipliers.mjs.map +1 -0
- package/resources/loyalty/rule-edits.d.ts +330 -0
- package/resources/loyalty/rule-edits.d.ts.map +1 -0
- package/resources/loyalty/rule-edits.js +21 -0
- package/resources/loyalty/rule-edits.js.map +1 -0
- package/resources/loyalty/rule-edits.mjs +17 -0
- package/resources/loyalty/rule-edits.mjs.map +1 -0
- package/resources/loyalty/rules.d.ts +2430 -0
- package/resources/loyalty/rules.d.ts.map +1 -0
- package/resources/loyalty/rules.js +46 -0
- package/resources/loyalty/rules.js.map +1 -0
- package/resources/loyalty/rules.mjs +42 -0
- package/resources/loyalty/rules.mjs.map +1 -0
- package/resources/loyalty/transaction-entries.d.ts +175 -0
- package/resources/loyalty/transaction-entries.d.ts.map +1 -0
- package/resources/loyalty/transaction-entries.js +16 -0
- package/resources/loyalty/transaction-entries.js.map +1 -0
- package/resources/loyalty/transaction-entries.mjs +12 -0
- package/resources/loyalty/transaction-entries.mjs.map +1 -0
- package/resources/users/index.d.ts +4 -0
- package/resources/users/index.d.ts.map +1 -0
- package/resources/users/index.js +11 -0
- package/resources/users/index.js.map +1 -0
- package/resources/users/index.mjs +5 -0
- package/resources/users/index.mjs.map +1 -0
- package/resources/users/metadatas.d.ts +64 -0
- package/resources/users/metadatas.d.ts.map +1 -0
- package/resources/users/metadatas.js +16 -0
- package/resources/users/metadatas.js.map +1 -0
- package/resources/users/metadatas.mjs +12 -0
- package/resources/users/metadatas.mjs.map +1 -0
- package/resources/users/users.d.ts +14 -0
- package/resources/users/users.d.ts.map +1 -0
- package/resources/users/users.js +43 -0
- package/resources/users/users.js.map +1 -0
- package/resources/users/users.mjs +16 -0
- package/resources/users/users.mjs.map +1 -0
- package/resources/users/wallets.d.ts +193 -0
- package/resources/users/wallets.d.ts.map +1 -0
- package/resources/users/wallets.js +28 -0
- package/resources/users/wallets.js.map +1 -0
- package/resources/users/wallets.mjs +24 -0
- package/resources/users/wallets.mjs.map +1 -0
- package/resources/websites.d.ts +203 -0
- package/resources/websites.d.ts.map +1 -0
- package/resources/websites.js +22 -0
- package/resources/websites.js.map +1 -0
- package/resources/websites.mjs +18 -0
- package/resources/websites.mjs.map +1 -0
- package/shims/node.d.ts +30 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +101 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +81 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +81 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +67 -0
- package/src/_shims/web-runtime.ts +103 -0
- package/src/_shims/web-types.d.ts +83 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +1201 -0
- package/src/error.ts +130 -0
- package/src/index.ts +235 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +9 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +388 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +11 -0
- package/src/resources/assets.ts +71 -0
- package/src/resources/auction-bids.ts +123 -0
- package/src/resources/drip/drip.ts +25 -0
- package/src/resources/drip/index.ts +5 -0
- package/src/resources/drip/quests.ts +210 -0
- package/src/resources/drip/status.ts +33 -0
- package/src/resources/index.ts +14 -0
- package/src/resources/loyalty/accounts.ts +199 -0
- package/src/resources/loyalty/badges.ts +435 -0
- package/src/resources/loyalty/currencies.ts +321 -0
- package/src/resources/loyalty/index.ts +61 -0
- package/src/resources/loyalty/loyalty.ts +159 -0
- package/src/resources/loyalty/multipliers.ts +238 -0
- package/src/resources/loyalty/rule-edits.ts +421 -0
- package/src/resources/loyalty/rules.ts +3513 -0
- package/src/resources/loyalty/transaction-entries.ts +229 -0
- package/src/resources/users/index.ts +12 -0
- package/src/resources/users/metadatas.ts +103 -0
- package/src/resources/users/users.ts +39 -0
- package/src/resources/users/wallets.ts +271 -0
- package/src/resources/websites.ts +259 -0
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +255 -0
- package/src/version.ts +1 -0
- package/uploads.d.ts +75 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +171 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +158 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
|
+
|
|
7
|
+
export class Multipliers extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new loyalty multiplier for a wallet.
|
|
10
|
+
*/
|
|
11
|
+
create(
|
|
12
|
+
body: MultiplierCreateParams,
|
|
13
|
+
options?: Core.RequestOptions,
|
|
14
|
+
): Core.APIPromise<MultiplierCreateResponse> {
|
|
15
|
+
return this._client.post('/api/loyalty/multipliers', { body, ...options });
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Update an existing loyalty multiplier.
|
|
20
|
+
*/
|
|
21
|
+
update(
|
|
22
|
+
multiplierId: string,
|
|
23
|
+
body?: MultiplierUpdateParams,
|
|
24
|
+
options?: Core.RequestOptions,
|
|
25
|
+
): Core.APIPromise<MultiplierUpdateResponse>;
|
|
26
|
+
update(multiplierId: string, options?: Core.RequestOptions): Core.APIPromise<MultiplierUpdateResponse>;
|
|
27
|
+
update(
|
|
28
|
+
multiplierId: string,
|
|
29
|
+
body: MultiplierUpdateParams | Core.RequestOptions = {},
|
|
30
|
+
options?: Core.RequestOptions,
|
|
31
|
+
): Core.APIPromise<MultiplierUpdateResponse> {
|
|
32
|
+
if (isRequestOptions(body)) {
|
|
33
|
+
return this.update(multiplierId, {}, body);
|
|
34
|
+
}
|
|
35
|
+
return this._client.post(`/api/loyalty/multipliers/${multiplierId}`, { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get Loyalty Multipliers
|
|
40
|
+
*/
|
|
41
|
+
list(query?: MultiplierListParams, options?: Core.RequestOptions): Core.APIPromise<MultiplierListResponse>;
|
|
42
|
+
list(options?: Core.RequestOptions): Core.APIPromise<MultiplierListResponse>;
|
|
43
|
+
list(
|
|
44
|
+
query: MultiplierListParams | Core.RequestOptions = {},
|
|
45
|
+
options?: Core.RequestOptions,
|
|
46
|
+
): Core.APIPromise<MultiplierListResponse> {
|
|
47
|
+
if (isRequestOptions(query)) {
|
|
48
|
+
return this.list({}, query);
|
|
49
|
+
}
|
|
50
|
+
return this._client.get('/api/loyalty/multipliers', { query, ...options });
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Delete a loyalty multiplier by its ID.
|
|
55
|
+
*/
|
|
56
|
+
delete(multiplierId: string, options?: Core.RequestOptions): Core.APIPromise<MultiplierDeleteResponse> {
|
|
57
|
+
return this._client.delete(`/api/loyalty/multipliers/${multiplierId}`, options);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Schema for loyalty multiplier
|
|
63
|
+
*/
|
|
64
|
+
export interface MultiplierCreateResponse {
|
|
65
|
+
id: string;
|
|
66
|
+
|
|
67
|
+
createdAt: string;
|
|
68
|
+
|
|
69
|
+
deletedAt: string | null;
|
|
70
|
+
|
|
71
|
+
description: string | null;
|
|
72
|
+
|
|
73
|
+
externalIdentifier: string | null;
|
|
74
|
+
|
|
75
|
+
multiplier: number;
|
|
76
|
+
|
|
77
|
+
organizationId: string;
|
|
78
|
+
|
|
79
|
+
title: string | null;
|
|
80
|
+
|
|
81
|
+
updatedAt: string;
|
|
82
|
+
|
|
83
|
+
user: MultiplierCreateResponse.User;
|
|
84
|
+
|
|
85
|
+
userId: string;
|
|
86
|
+
|
|
87
|
+
websiteId: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export namespace MultiplierCreateResponse {
|
|
91
|
+
export interface User {
|
|
92
|
+
id: string;
|
|
93
|
+
|
|
94
|
+
walletAddress: string;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Schema for loyalty multiplier
|
|
100
|
+
*/
|
|
101
|
+
export interface MultiplierUpdateResponse {
|
|
102
|
+
id: string;
|
|
103
|
+
|
|
104
|
+
createdAt: string;
|
|
105
|
+
|
|
106
|
+
deletedAt: string | null;
|
|
107
|
+
|
|
108
|
+
description: string | null;
|
|
109
|
+
|
|
110
|
+
externalIdentifier: string | null;
|
|
111
|
+
|
|
112
|
+
multiplier: number;
|
|
113
|
+
|
|
114
|
+
organizationId: string;
|
|
115
|
+
|
|
116
|
+
title: string | null;
|
|
117
|
+
|
|
118
|
+
updatedAt: string;
|
|
119
|
+
|
|
120
|
+
user: MultiplierUpdateResponse.User;
|
|
121
|
+
|
|
122
|
+
userId: string;
|
|
123
|
+
|
|
124
|
+
websiteId: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export namespace MultiplierUpdateResponse {
|
|
128
|
+
export interface User {
|
|
129
|
+
id: string;
|
|
130
|
+
|
|
131
|
+
walletAddress: string;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface MultiplierListResponse {
|
|
136
|
+
data: Array<MultiplierListResponse.Data>;
|
|
137
|
+
|
|
138
|
+
hasNextPage: boolean;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export namespace MultiplierListResponse {
|
|
142
|
+
/**
|
|
143
|
+
* Schema for loyalty multiplier
|
|
144
|
+
*/
|
|
145
|
+
export interface Data {
|
|
146
|
+
id: string;
|
|
147
|
+
|
|
148
|
+
createdAt: string;
|
|
149
|
+
|
|
150
|
+
deletedAt: string | null;
|
|
151
|
+
|
|
152
|
+
description: string | null;
|
|
153
|
+
|
|
154
|
+
externalIdentifier: string | null;
|
|
155
|
+
|
|
156
|
+
multiplier: number;
|
|
157
|
+
|
|
158
|
+
organizationId: string;
|
|
159
|
+
|
|
160
|
+
title: string | null;
|
|
161
|
+
|
|
162
|
+
updatedAt: string;
|
|
163
|
+
|
|
164
|
+
user: Data.User;
|
|
165
|
+
|
|
166
|
+
userId: string;
|
|
167
|
+
|
|
168
|
+
websiteId: string;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export namespace Data {
|
|
172
|
+
export interface User {
|
|
173
|
+
id: string;
|
|
174
|
+
|
|
175
|
+
walletAddress: string;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface MultiplierDeleteResponse {
|
|
181
|
+
id: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface MultiplierCreateParams {
|
|
185
|
+
multiplier: number;
|
|
186
|
+
|
|
187
|
+
walletAddress: string;
|
|
188
|
+
|
|
189
|
+
description?: string | null;
|
|
190
|
+
|
|
191
|
+
externalIdentifier?: string | null;
|
|
192
|
+
|
|
193
|
+
title?: string | null;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface MultiplierUpdateParams {
|
|
197
|
+
description?: string | null;
|
|
198
|
+
|
|
199
|
+
multiplier?: number;
|
|
200
|
+
|
|
201
|
+
title?: string | null;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface MultiplierListParams {
|
|
205
|
+
discordUser?: string;
|
|
206
|
+
|
|
207
|
+
externalIdentifier?: string;
|
|
208
|
+
|
|
209
|
+
includeDeleted?: boolean;
|
|
210
|
+
|
|
211
|
+
limit?: number;
|
|
212
|
+
|
|
213
|
+
organizationId?: string;
|
|
214
|
+
|
|
215
|
+
startingAfter?: string;
|
|
216
|
+
|
|
217
|
+
twitterUser?: string;
|
|
218
|
+
|
|
219
|
+
userId?: string | Array<string>;
|
|
220
|
+
|
|
221
|
+
walletAddress?: string | Array<string>;
|
|
222
|
+
|
|
223
|
+
walletGroupIdentifier?: string;
|
|
224
|
+
|
|
225
|
+
websiteId?: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export declare namespace Multipliers {
|
|
229
|
+
export {
|
|
230
|
+
type MultiplierCreateResponse as MultiplierCreateResponse,
|
|
231
|
+
type MultiplierUpdateResponse as MultiplierUpdateResponse,
|
|
232
|
+
type MultiplierListResponse as MultiplierListResponse,
|
|
233
|
+
type MultiplierDeleteResponse as MultiplierDeleteResponse,
|
|
234
|
+
type MultiplierCreateParams as MultiplierCreateParams,
|
|
235
|
+
type MultiplierUpdateParams as MultiplierUpdateParams,
|
|
236
|
+
type MultiplierListParams as MultiplierListParams,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
@@ -0,0 +1,421 @@
|
|
|
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 RuleEdits extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve configured loyalty rule edits with optional pagination and filters
|
|
9
|
+
*/
|
|
10
|
+
retrieve(
|
|
11
|
+
query: RuleEditRetrieveParams,
|
|
12
|
+
options?: Core.RequestOptions,
|
|
13
|
+
): Core.APIPromise<RuleEditRetrieveResponse> {
|
|
14
|
+
return this._client.get('/api/loyalty/rule_edits', { query, ...options });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Restore a loyalty rule from a rule edit
|
|
19
|
+
*/
|
|
20
|
+
restore(
|
|
21
|
+
id: string,
|
|
22
|
+
body?: RuleEditRestoreParams | null | undefined,
|
|
23
|
+
options?: Core.RequestOptions,
|
|
24
|
+
): Core.APIPromise<RuleEditRestoreResponse> {
|
|
25
|
+
return this._client.post(`/api/api/loyalty/rule_edits/${id}/restore`, { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface RuleEditRetrieveResponse {
|
|
30
|
+
data: Array<RuleEditRetrieveResponse.Data>;
|
|
31
|
+
|
|
32
|
+
hasNextPage: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export namespace RuleEditRetrieveResponse {
|
|
36
|
+
export interface Data {
|
|
37
|
+
/**
|
|
38
|
+
* Unique identifier for the rule edit
|
|
39
|
+
*/
|
|
40
|
+
id: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Type of action that was made on the rule
|
|
44
|
+
*/
|
|
45
|
+
action: 'create' | 'update' | 'delete' | 'restore';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Data that was changed on the rule
|
|
49
|
+
*/
|
|
50
|
+
data: Data.Data;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Timestamp of when the rule edit was made
|
|
54
|
+
*/
|
|
55
|
+
editedAt: string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* User ID of the user who made the edit
|
|
59
|
+
*/
|
|
60
|
+
editedByUserId: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* ID of the loyalty rule
|
|
64
|
+
*/
|
|
65
|
+
loyaltyRuleId: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Unique identifier for the organization
|
|
69
|
+
*/
|
|
70
|
+
organizationId: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Unique identifier for the website
|
|
74
|
+
*/
|
|
75
|
+
websiteId: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Comment that was made on the edit
|
|
79
|
+
*/
|
|
80
|
+
comment?: string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Previous data of the rule before the edit
|
|
84
|
+
*/
|
|
85
|
+
previousData?: Data.PreviousData;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export namespace Data {
|
|
89
|
+
/**
|
|
90
|
+
* Data that was changed on the rule
|
|
91
|
+
*/
|
|
92
|
+
export interface Data {
|
|
93
|
+
/**
|
|
94
|
+
* Unique identifier for the loyalty rule
|
|
95
|
+
*/
|
|
96
|
+
id: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Amount associated with the loyalty rule
|
|
100
|
+
*/
|
|
101
|
+
amount: number;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Timestamp when the loyalty rule was created
|
|
105
|
+
*/
|
|
106
|
+
createdAt: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Timestamp when the loyalty rule was deleted (if applicable)
|
|
110
|
+
*/
|
|
111
|
+
deletedAt: string | null;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Frequency of the loyalty rule
|
|
115
|
+
*/
|
|
116
|
+
frequency: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Unique identifier for the organization
|
|
120
|
+
*/
|
|
121
|
+
organizationId: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Type of the loyalty rule
|
|
125
|
+
*/
|
|
126
|
+
type: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Timestamp when the loyalty rule was last updated
|
|
130
|
+
*/
|
|
131
|
+
updatedAt: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Unique identifier for the website
|
|
135
|
+
*/
|
|
136
|
+
websiteId: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Optional address of the collection
|
|
140
|
+
*/
|
|
141
|
+
collectionAddress?: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Optional metadata for the loyalty rule
|
|
145
|
+
*/
|
|
146
|
+
metadata?: Record<string, unknown>;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Previous data of the rule before the edit
|
|
151
|
+
*/
|
|
152
|
+
export interface PreviousData {
|
|
153
|
+
/**
|
|
154
|
+
* Unique identifier for the loyalty rule
|
|
155
|
+
*/
|
|
156
|
+
id: string;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Amount associated with the loyalty rule
|
|
160
|
+
*/
|
|
161
|
+
amount: number;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Timestamp when the loyalty rule was created
|
|
165
|
+
*/
|
|
166
|
+
createdAt: string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Timestamp when the loyalty rule was deleted (if applicable)
|
|
170
|
+
*/
|
|
171
|
+
deletedAt: string | null;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Frequency of the loyalty rule
|
|
175
|
+
*/
|
|
176
|
+
frequency: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Unique identifier for the organization
|
|
180
|
+
*/
|
|
181
|
+
organizationId: string;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Type of the loyalty rule
|
|
185
|
+
*/
|
|
186
|
+
type: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Timestamp when the loyalty rule was last updated
|
|
190
|
+
*/
|
|
191
|
+
updatedAt: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Unique identifier for the website
|
|
195
|
+
*/
|
|
196
|
+
websiteId: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Optional address of the collection
|
|
200
|
+
*/
|
|
201
|
+
collectionAddress?: string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Optional metadata for the loyalty rule
|
|
205
|
+
*/
|
|
206
|
+
metadata?: Record<string, unknown>;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export interface RuleEditRestoreResponse {
|
|
212
|
+
/**
|
|
213
|
+
* Unique identifier for the rule edit
|
|
214
|
+
*/
|
|
215
|
+
id: string;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Type of action that was made on the rule
|
|
219
|
+
*/
|
|
220
|
+
action: 'create' | 'update' | 'delete' | 'restore';
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Data that was changed on the rule
|
|
224
|
+
*/
|
|
225
|
+
data: RuleEditRestoreResponse.Data;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Timestamp of when the rule edit was made
|
|
229
|
+
*/
|
|
230
|
+
editedAt: string;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* User ID of the user who made the edit
|
|
234
|
+
*/
|
|
235
|
+
editedByUserId: string;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* ID of the loyalty rule
|
|
239
|
+
*/
|
|
240
|
+
loyaltyRuleId: string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Unique identifier for the organization
|
|
244
|
+
*/
|
|
245
|
+
organizationId: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Unique identifier for the website
|
|
249
|
+
*/
|
|
250
|
+
websiteId: string;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Comment that was made on the edit
|
|
254
|
+
*/
|
|
255
|
+
comment?: string;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Previous data of the rule before the edit
|
|
259
|
+
*/
|
|
260
|
+
previousData?: RuleEditRestoreResponse.PreviousData;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export namespace RuleEditRestoreResponse {
|
|
264
|
+
/**
|
|
265
|
+
* Data that was changed on the rule
|
|
266
|
+
*/
|
|
267
|
+
export interface Data {
|
|
268
|
+
/**
|
|
269
|
+
* Unique identifier for the loyalty rule
|
|
270
|
+
*/
|
|
271
|
+
id: string;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Amount associated with the loyalty rule
|
|
275
|
+
*/
|
|
276
|
+
amount: number;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Timestamp when the loyalty rule was created
|
|
280
|
+
*/
|
|
281
|
+
createdAt: string;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Timestamp when the loyalty rule was deleted (if applicable)
|
|
285
|
+
*/
|
|
286
|
+
deletedAt: string | null;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Frequency of the loyalty rule
|
|
290
|
+
*/
|
|
291
|
+
frequency: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Unique identifier for the organization
|
|
295
|
+
*/
|
|
296
|
+
organizationId: string;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Type of the loyalty rule
|
|
300
|
+
*/
|
|
301
|
+
type: string;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Timestamp when the loyalty rule was last updated
|
|
305
|
+
*/
|
|
306
|
+
updatedAt: string;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Unique identifier for the website
|
|
310
|
+
*/
|
|
311
|
+
websiteId: string;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Optional address of the collection
|
|
315
|
+
*/
|
|
316
|
+
collectionAddress?: string;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Optional metadata for the loyalty rule
|
|
320
|
+
*/
|
|
321
|
+
metadata?: Record<string, unknown>;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Previous data of the rule before the edit
|
|
326
|
+
*/
|
|
327
|
+
export interface PreviousData {
|
|
328
|
+
/**
|
|
329
|
+
* Unique identifier for the loyalty rule
|
|
330
|
+
*/
|
|
331
|
+
id: string;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Amount associated with the loyalty rule
|
|
335
|
+
*/
|
|
336
|
+
amount: number;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Timestamp when the loyalty rule was created
|
|
340
|
+
*/
|
|
341
|
+
createdAt: string;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Timestamp when the loyalty rule was deleted (if applicable)
|
|
345
|
+
*/
|
|
346
|
+
deletedAt: string | null;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Frequency of the loyalty rule
|
|
350
|
+
*/
|
|
351
|
+
frequency: string;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Unique identifier for the organization
|
|
355
|
+
*/
|
|
356
|
+
organizationId: string;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Type of the loyalty rule
|
|
360
|
+
*/
|
|
361
|
+
type: string;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Timestamp when the loyalty rule was last updated
|
|
365
|
+
*/
|
|
366
|
+
updatedAt: string;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Unique identifier for the website
|
|
370
|
+
*/
|
|
371
|
+
websiteId: string;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Optional address of the collection
|
|
375
|
+
*/
|
|
376
|
+
collectionAddress?: string;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Optional metadata for the loyalty rule
|
|
380
|
+
*/
|
|
381
|
+
metadata?: Record<string, unknown>;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export interface RuleEditRetrieveParams {
|
|
386
|
+
/**
|
|
387
|
+
* ID of the loyalty rule
|
|
388
|
+
*/
|
|
389
|
+
loyaltyRuleId: boolean;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Maximum number of edits to return
|
|
393
|
+
*/
|
|
394
|
+
limit?: number | null;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Unique identifier for the organization to filter by
|
|
398
|
+
*/
|
|
399
|
+
organizationId?: string;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Pagination cursor to start after a specific rule edit ID
|
|
403
|
+
*/
|
|
404
|
+
startingAfter?: string;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Unique identifier for the website to filter by
|
|
408
|
+
*/
|
|
409
|
+
websiteId?: string;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export interface RuleEditRestoreParams {}
|
|
413
|
+
|
|
414
|
+
export declare namespace RuleEdits {
|
|
415
|
+
export {
|
|
416
|
+
type RuleEditRetrieveResponse as RuleEditRetrieveResponse,
|
|
417
|
+
type RuleEditRestoreResponse as RuleEditRestoreResponse,
|
|
418
|
+
type RuleEditRetrieveParams as RuleEditRetrieveParams,
|
|
419
|
+
type RuleEditRestoreParams as RuleEditRestoreParams,
|
|
420
|
+
};
|
|
421
|
+
}
|