@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,321 @@
|
|
|
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 Currencies extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a loyalty currency
|
|
9
|
+
*/
|
|
10
|
+
create(body: CurrencyCreateParams, options?: Core.RequestOptions): Core.APIPromise<CurrencyCreateResponse> {
|
|
11
|
+
return this._client.post('/api/loyalty/currencies', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get loyalty currencies
|
|
16
|
+
*/
|
|
17
|
+
list(query: CurrencyListParams, options?: Core.RequestOptions): Core.APIPromise<CurrencyListResponse> {
|
|
18
|
+
return this._client.get('/api/loyalty/currencies', { query, ...options });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Schema for a loyalty currency
|
|
24
|
+
*/
|
|
25
|
+
export interface CurrencyCreateResponse {
|
|
26
|
+
/**
|
|
27
|
+
* Unique identifier for the loyalty currency
|
|
28
|
+
*/
|
|
29
|
+
id: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Authentication key for API
|
|
33
|
+
*/
|
|
34
|
+
apiAuthKey: string | null;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Type of authentication used for API
|
|
38
|
+
*/
|
|
39
|
+
apiAuthType: 'none' | 'basic' | 'bearer' | 'apiKey' | null;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Authentication value for API
|
|
43
|
+
*/
|
|
44
|
+
apiAuthValue: string | null;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* API GET URL for fetching transaction entry data
|
|
48
|
+
*/
|
|
49
|
+
apiGetTransactionEntryUrl: string | null;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* API GET URL for fetching data
|
|
53
|
+
*/
|
|
54
|
+
apiGetUrl: string | null;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* API POST URL for sending data
|
|
58
|
+
*/
|
|
59
|
+
apiPostUrl: string | null;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Timestamp when the currency was created
|
|
63
|
+
*/
|
|
64
|
+
createdAt: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* ID of the user who created the currency
|
|
68
|
+
*/
|
|
69
|
+
createdById: string | null;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Number of decimal places for the currency
|
|
73
|
+
*/
|
|
74
|
+
decimals: number;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Timestamp when the currency was deleted, if applicable
|
|
78
|
+
*/
|
|
79
|
+
deletedAt: string | null;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* URL of the image
|
|
83
|
+
*/
|
|
84
|
+
imageUrl: string | null;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Name of the loyalty currency
|
|
88
|
+
*/
|
|
89
|
+
name: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Unique identifier for the organization
|
|
93
|
+
*/
|
|
94
|
+
organizationId: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Sorting identifier
|
|
98
|
+
*/
|
|
99
|
+
sortId: number | null;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Symbol representing the loyalty currency
|
|
103
|
+
*/
|
|
104
|
+
symbol: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Timestamp when the currency was last updated
|
|
108
|
+
*/
|
|
109
|
+
updatedAt: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Unique identifier for the website
|
|
113
|
+
*/
|
|
114
|
+
websiteId: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface CurrencyListResponse {
|
|
118
|
+
data: Array<CurrencyListResponse.Data>;
|
|
119
|
+
|
|
120
|
+
hasNextPage: boolean;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export namespace CurrencyListResponse {
|
|
124
|
+
/**
|
|
125
|
+
* Schema for a loyalty currency
|
|
126
|
+
*/
|
|
127
|
+
export interface Data {
|
|
128
|
+
/**
|
|
129
|
+
* Unique identifier for the loyalty currency
|
|
130
|
+
*/
|
|
131
|
+
id: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Authentication key for API
|
|
135
|
+
*/
|
|
136
|
+
apiAuthKey: string | null;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Type of authentication used for API
|
|
140
|
+
*/
|
|
141
|
+
apiAuthType: 'none' | 'basic' | 'bearer' | 'apiKey' | null;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Authentication value for API
|
|
145
|
+
*/
|
|
146
|
+
apiAuthValue: string | null;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* API GET URL for fetching transaction entry data
|
|
150
|
+
*/
|
|
151
|
+
apiGetTransactionEntryUrl: string | null;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* API GET URL for fetching data
|
|
155
|
+
*/
|
|
156
|
+
apiGetUrl: string | null;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* API POST URL for sending data
|
|
160
|
+
*/
|
|
161
|
+
apiPostUrl: string | null;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Timestamp when the currency was created
|
|
165
|
+
*/
|
|
166
|
+
createdAt: string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* ID of the user who created the currency
|
|
170
|
+
*/
|
|
171
|
+
createdById: string | null;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Number of decimal places for the currency
|
|
175
|
+
*/
|
|
176
|
+
decimals: number;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Timestamp when the currency was deleted, if applicable
|
|
180
|
+
*/
|
|
181
|
+
deletedAt: string | null;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* URL of the image
|
|
185
|
+
*/
|
|
186
|
+
imageUrl: string | null;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Name of the loyalty currency
|
|
190
|
+
*/
|
|
191
|
+
name: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Unique identifier for the organization
|
|
195
|
+
*/
|
|
196
|
+
organizationId: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Sorting identifier
|
|
200
|
+
*/
|
|
201
|
+
sortId: number | null;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Symbol representing the loyalty currency
|
|
205
|
+
*/
|
|
206
|
+
symbol: string;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Timestamp when the currency was last updated
|
|
210
|
+
*/
|
|
211
|
+
updatedAt: string;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Unique identifier for the website
|
|
215
|
+
*/
|
|
216
|
+
websiteId: string;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface CurrencyCreateParams {
|
|
221
|
+
/**
|
|
222
|
+
* Number of decimal places for the currency
|
|
223
|
+
*/
|
|
224
|
+
decimals: number;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Name of the loyalty currency
|
|
228
|
+
*/
|
|
229
|
+
name: string;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Unique identifier for the organization
|
|
233
|
+
*/
|
|
234
|
+
organizationId: string;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Symbol representing the loyalty currency
|
|
238
|
+
*/
|
|
239
|
+
symbol: string;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Unique identifier for the website
|
|
243
|
+
*/
|
|
244
|
+
websiteId: string;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Authentication key for API
|
|
248
|
+
*/
|
|
249
|
+
apiAuthKey?: string | null;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Type of authentication used for API
|
|
253
|
+
*/
|
|
254
|
+
apiAuthType?: 'none' | 'basic' | 'bearer' | 'apiKey' | null;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Authentication value for API
|
|
258
|
+
*/
|
|
259
|
+
apiAuthValue?: string | null;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Optional API GET URL for fetching transaction entry data
|
|
263
|
+
*/
|
|
264
|
+
apiGetTransactionEntryUrl?: string | null;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Optional API GET URL for fetching data
|
|
268
|
+
*/
|
|
269
|
+
apiGetUrl?: string | null;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Optional API POST URL for sending data
|
|
273
|
+
*/
|
|
274
|
+
apiPostUrl?: string | null;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* URL of the image; must start with AWS S3 asset URL base
|
|
278
|
+
*/
|
|
279
|
+
imageUrl?: string | null;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Optional sorting identifier
|
|
283
|
+
*/
|
|
284
|
+
sortId?: number;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export interface CurrencyListParams {
|
|
288
|
+
/**
|
|
289
|
+
* Unique identifier for the organization
|
|
290
|
+
*/
|
|
291
|
+
organizationId: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Unique identifier for the website
|
|
295
|
+
*/
|
|
296
|
+
websiteId: string;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Whether to include deleted currencies
|
|
300
|
+
*/
|
|
301
|
+
includeDeleted?: string;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Maximum number of records to return
|
|
305
|
+
*/
|
|
306
|
+
limit?: number | null;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Cursor for pagination; start after this ID
|
|
310
|
+
*/
|
|
311
|
+
startingAfter?: string;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export declare namespace Currencies {
|
|
315
|
+
export {
|
|
316
|
+
type CurrencyCreateResponse as CurrencyCreateResponse,
|
|
317
|
+
type CurrencyListResponse as CurrencyListResponse,
|
|
318
|
+
type CurrencyCreateParams as CurrencyCreateParams,
|
|
319
|
+
type CurrencyListParams as CurrencyListParams,
|
|
320
|
+
};
|
|
321
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export { Accounts, type AccountListResponse, type AccountListParams } from './accounts';
|
|
4
|
+
export {
|
|
5
|
+
Badges,
|
|
6
|
+
type BadgeCreateResponse,
|
|
7
|
+
type BadgeUpdateResponse,
|
|
8
|
+
type BadgeListResponse,
|
|
9
|
+
type BadgeDeleteResponse,
|
|
10
|
+
type BadgeRevokeResponse,
|
|
11
|
+
type BadgeRewardResponse,
|
|
12
|
+
type BadgeCreateParams,
|
|
13
|
+
type BadgeUpdateParams,
|
|
14
|
+
type BadgeListParams,
|
|
15
|
+
type BadgeRevokeParams,
|
|
16
|
+
type BadgeRewardParams,
|
|
17
|
+
} from './badges';
|
|
18
|
+
export {
|
|
19
|
+
Currencies,
|
|
20
|
+
type CurrencyCreateResponse,
|
|
21
|
+
type CurrencyListResponse,
|
|
22
|
+
type CurrencyCreateParams,
|
|
23
|
+
type CurrencyListParams,
|
|
24
|
+
} from './currencies';
|
|
25
|
+
export { Loyalty } from './loyalty';
|
|
26
|
+
export {
|
|
27
|
+
Multipliers,
|
|
28
|
+
type MultiplierCreateResponse,
|
|
29
|
+
type MultiplierUpdateResponse,
|
|
30
|
+
type MultiplierListResponse,
|
|
31
|
+
type MultiplierDeleteResponse,
|
|
32
|
+
type MultiplierCreateParams,
|
|
33
|
+
type MultiplierUpdateParams,
|
|
34
|
+
type MultiplierListParams,
|
|
35
|
+
} from './multipliers';
|
|
36
|
+
export {
|
|
37
|
+
RuleEdits,
|
|
38
|
+
type RuleEditRetrieveResponse,
|
|
39
|
+
type RuleEditRestoreResponse,
|
|
40
|
+
type RuleEditRetrieveParams,
|
|
41
|
+
type RuleEditRestoreParams,
|
|
42
|
+
} from './rule-edits';
|
|
43
|
+
export {
|
|
44
|
+
Rules,
|
|
45
|
+
type RuleCreateResponse,
|
|
46
|
+
type RuleUpdateResponse,
|
|
47
|
+
type RuleListResponse,
|
|
48
|
+
type RuleDeleteResponse,
|
|
49
|
+
type RuleCompleteResponse,
|
|
50
|
+
type RuleStatusResponse,
|
|
51
|
+
type RuleCreateParams,
|
|
52
|
+
type RuleUpdateParams,
|
|
53
|
+
type RuleListParams,
|
|
54
|
+
type RuleCompleteParams,
|
|
55
|
+
type RuleStatusParams,
|
|
56
|
+
} from './rules';
|
|
57
|
+
export {
|
|
58
|
+
TransactionEntries,
|
|
59
|
+
type TransactionEntryListResponse,
|
|
60
|
+
type TransactionEntryListParams,
|
|
61
|
+
} from './transaction-entries';
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as AccountsAPI from './accounts';
|
|
5
|
+
import { AccountListParams, AccountListResponse, Accounts } from './accounts';
|
|
6
|
+
import * as BadgesAPI from './badges';
|
|
7
|
+
import {
|
|
8
|
+
BadgeCreateParams,
|
|
9
|
+
BadgeCreateResponse,
|
|
10
|
+
BadgeDeleteResponse,
|
|
11
|
+
BadgeListParams,
|
|
12
|
+
BadgeListResponse,
|
|
13
|
+
BadgeRevokeParams,
|
|
14
|
+
BadgeRevokeResponse,
|
|
15
|
+
BadgeRewardParams,
|
|
16
|
+
BadgeRewardResponse,
|
|
17
|
+
BadgeUpdateParams,
|
|
18
|
+
BadgeUpdateResponse,
|
|
19
|
+
Badges,
|
|
20
|
+
} from './badges';
|
|
21
|
+
import * as CurrenciesAPI from './currencies';
|
|
22
|
+
import {
|
|
23
|
+
Currencies,
|
|
24
|
+
CurrencyCreateParams,
|
|
25
|
+
CurrencyCreateResponse,
|
|
26
|
+
CurrencyListParams,
|
|
27
|
+
CurrencyListResponse,
|
|
28
|
+
} from './currencies';
|
|
29
|
+
import * as MultipliersAPI from './multipliers';
|
|
30
|
+
import {
|
|
31
|
+
MultiplierCreateParams,
|
|
32
|
+
MultiplierCreateResponse,
|
|
33
|
+
MultiplierDeleteResponse,
|
|
34
|
+
MultiplierListParams,
|
|
35
|
+
MultiplierListResponse,
|
|
36
|
+
MultiplierUpdateParams,
|
|
37
|
+
MultiplierUpdateResponse,
|
|
38
|
+
Multipliers,
|
|
39
|
+
} from './multipliers';
|
|
40
|
+
import * as RuleEditsAPI from './rule-edits';
|
|
41
|
+
import {
|
|
42
|
+
RuleEditRestoreParams,
|
|
43
|
+
RuleEditRestoreResponse,
|
|
44
|
+
RuleEditRetrieveParams,
|
|
45
|
+
RuleEditRetrieveResponse,
|
|
46
|
+
RuleEdits,
|
|
47
|
+
} from './rule-edits';
|
|
48
|
+
import * as RulesAPI from './rules';
|
|
49
|
+
import {
|
|
50
|
+
RuleCompleteParams,
|
|
51
|
+
RuleCompleteResponse,
|
|
52
|
+
RuleCreateParams,
|
|
53
|
+
RuleCreateResponse,
|
|
54
|
+
RuleDeleteResponse,
|
|
55
|
+
RuleListParams,
|
|
56
|
+
RuleListResponse,
|
|
57
|
+
RuleStatusParams,
|
|
58
|
+
RuleStatusResponse,
|
|
59
|
+
RuleUpdateParams,
|
|
60
|
+
RuleUpdateResponse,
|
|
61
|
+
Rules,
|
|
62
|
+
} from './rules';
|
|
63
|
+
import * as TransactionEntriesAPI from './transaction-entries';
|
|
64
|
+
import {
|
|
65
|
+
TransactionEntries,
|
|
66
|
+
TransactionEntryListParams,
|
|
67
|
+
TransactionEntryListResponse,
|
|
68
|
+
} from './transaction-entries';
|
|
69
|
+
|
|
70
|
+
export class Loyalty extends APIResource {
|
|
71
|
+
rules: RulesAPI.Rules = new RulesAPI.Rules(this._client);
|
|
72
|
+
currencies: CurrenciesAPI.Currencies = new CurrenciesAPI.Currencies(this._client);
|
|
73
|
+
transactionEntries: TransactionEntriesAPI.TransactionEntries = new TransactionEntriesAPI.TransactionEntries(
|
|
74
|
+
this._client,
|
|
75
|
+
);
|
|
76
|
+
ruleEdits: RuleEditsAPI.RuleEdits = new RuleEditsAPI.RuleEdits(this._client);
|
|
77
|
+
accounts: AccountsAPI.Accounts = new AccountsAPI.Accounts(this._client);
|
|
78
|
+
multipliers: MultipliersAPI.Multipliers = new MultipliersAPI.Multipliers(this._client);
|
|
79
|
+
badges: BadgesAPI.Badges = new BadgesAPI.Badges(this._client);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
Loyalty.Rules = Rules;
|
|
83
|
+
Loyalty.Currencies = Currencies;
|
|
84
|
+
Loyalty.TransactionEntries = TransactionEntries;
|
|
85
|
+
Loyalty.RuleEdits = RuleEdits;
|
|
86
|
+
Loyalty.Accounts = Accounts;
|
|
87
|
+
Loyalty.Multipliers = Multipliers;
|
|
88
|
+
Loyalty.Badges = Badges;
|
|
89
|
+
|
|
90
|
+
export declare namespace Loyalty {
|
|
91
|
+
export {
|
|
92
|
+
Rules as Rules,
|
|
93
|
+
type RuleCreateResponse as RuleCreateResponse,
|
|
94
|
+
type RuleUpdateResponse as RuleUpdateResponse,
|
|
95
|
+
type RuleListResponse as RuleListResponse,
|
|
96
|
+
type RuleDeleteResponse as RuleDeleteResponse,
|
|
97
|
+
type RuleCompleteResponse as RuleCompleteResponse,
|
|
98
|
+
type RuleStatusResponse as RuleStatusResponse,
|
|
99
|
+
type RuleCreateParams as RuleCreateParams,
|
|
100
|
+
type RuleUpdateParams as RuleUpdateParams,
|
|
101
|
+
type RuleListParams as RuleListParams,
|
|
102
|
+
type RuleCompleteParams as RuleCompleteParams,
|
|
103
|
+
type RuleStatusParams as RuleStatusParams,
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export {
|
|
107
|
+
Currencies as Currencies,
|
|
108
|
+
type CurrencyCreateResponse as CurrencyCreateResponse,
|
|
109
|
+
type CurrencyListResponse as CurrencyListResponse,
|
|
110
|
+
type CurrencyCreateParams as CurrencyCreateParams,
|
|
111
|
+
type CurrencyListParams as CurrencyListParams,
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export {
|
|
115
|
+
TransactionEntries as TransactionEntries,
|
|
116
|
+
type TransactionEntryListResponse as TransactionEntryListResponse,
|
|
117
|
+
type TransactionEntryListParams as TransactionEntryListParams,
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export {
|
|
121
|
+
RuleEdits as RuleEdits,
|
|
122
|
+
type RuleEditRetrieveResponse as RuleEditRetrieveResponse,
|
|
123
|
+
type RuleEditRestoreResponse as RuleEditRestoreResponse,
|
|
124
|
+
type RuleEditRetrieveParams as RuleEditRetrieveParams,
|
|
125
|
+
type RuleEditRestoreParams as RuleEditRestoreParams,
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export {
|
|
129
|
+
Accounts as Accounts,
|
|
130
|
+
type AccountListResponse as AccountListResponse,
|
|
131
|
+
type AccountListParams as AccountListParams,
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export {
|
|
135
|
+
Multipliers as Multipliers,
|
|
136
|
+
type MultiplierCreateResponse as MultiplierCreateResponse,
|
|
137
|
+
type MultiplierUpdateResponse as MultiplierUpdateResponse,
|
|
138
|
+
type MultiplierListResponse as MultiplierListResponse,
|
|
139
|
+
type MultiplierDeleteResponse as MultiplierDeleteResponse,
|
|
140
|
+
type MultiplierCreateParams as MultiplierCreateParams,
|
|
141
|
+
type MultiplierUpdateParams as MultiplierUpdateParams,
|
|
142
|
+
type MultiplierListParams as MultiplierListParams,
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export {
|
|
146
|
+
Badges as Badges,
|
|
147
|
+
type BadgeCreateResponse as BadgeCreateResponse,
|
|
148
|
+
type BadgeUpdateResponse as BadgeUpdateResponse,
|
|
149
|
+
type BadgeListResponse as BadgeListResponse,
|
|
150
|
+
type BadgeDeleteResponse as BadgeDeleteResponse,
|
|
151
|
+
type BadgeRevokeResponse as BadgeRevokeResponse,
|
|
152
|
+
type BadgeRewardResponse as BadgeRewardResponse,
|
|
153
|
+
type BadgeCreateParams as BadgeCreateParams,
|
|
154
|
+
type BadgeUpdateParams as BadgeUpdateParams,
|
|
155
|
+
type BadgeListParams as BadgeListParams,
|
|
156
|
+
type BadgeRevokeParams as BadgeRevokeParams,
|
|
157
|
+
type BadgeRewardParams as BadgeRewardParams,
|
|
158
|
+
};
|
|
159
|
+
}
|