@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,299 @@
|
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
|
2
|
+
import * as Core from "../../core.js";
|
|
3
|
+
export declare class Badges extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* This endpoint allows you to configure a new badge.
|
|
6
|
+
*/
|
|
7
|
+
create(body: BadgeCreateParams, options?: Core.RequestOptions): Core.APIPromise<BadgeCreateResponse>;
|
|
8
|
+
/**
|
|
9
|
+
* This endpoint allows you to update an existing badge.
|
|
10
|
+
*/
|
|
11
|
+
update(id: string, body?: BadgeUpdateParams, options?: Core.RequestOptions): Core.APIPromise<BadgeUpdateResponse>;
|
|
12
|
+
update(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeUpdateResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* This endpoint allows you to fetch badge(s) data.
|
|
15
|
+
*/
|
|
16
|
+
list(query?: BadgeListParams, options?: Core.RequestOptions): Core.APIPromise<BadgeListResponse>;
|
|
17
|
+
list(options?: Core.RequestOptions): Core.APIPromise<BadgeListResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* This endpoint allows you to delete a badge.
|
|
20
|
+
*/
|
|
21
|
+
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeDeleteResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* This endpoint allows you to revoke a badge from an account
|
|
24
|
+
*/
|
|
25
|
+
revoke(id: string, body?: BadgeRevokeParams, options?: Core.RequestOptions): Core.APIPromise<BadgeRevokeResponse>;
|
|
26
|
+
revoke(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeRevokeResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* This endpoint allows you to reward a badge for an account
|
|
29
|
+
*/
|
|
30
|
+
reward(id: string, body?: BadgeRewardParams, options?: Core.RequestOptions): Core.APIPromise<BadgeRewardResponse>;
|
|
31
|
+
reward(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeRewardResponse>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Response returned upon successful creation of the badge.
|
|
35
|
+
*/
|
|
36
|
+
export interface BadgeCreateResponse {
|
|
37
|
+
id: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Response returned upon successful update of the badge.
|
|
41
|
+
*/
|
|
42
|
+
export interface BadgeUpdateResponse {
|
|
43
|
+
id: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Response returned upon successful fetching of the badges.
|
|
47
|
+
*/
|
|
48
|
+
export interface BadgeListResponse {
|
|
49
|
+
badges: Array<BadgeListResponse.Badge>;
|
|
50
|
+
}
|
|
51
|
+
export declare namespace BadgeListResponse {
|
|
52
|
+
interface Badge {
|
|
53
|
+
/**
|
|
54
|
+
* UUID of the badge (converted to lowercase)
|
|
55
|
+
*/
|
|
56
|
+
id: string;
|
|
57
|
+
/**
|
|
58
|
+
* Count of rules and accounts with the badge
|
|
59
|
+
*/
|
|
60
|
+
_count: Badge._Count;
|
|
61
|
+
/**
|
|
62
|
+
* The URL of the badge image
|
|
63
|
+
*/
|
|
64
|
+
imageUrl: string;
|
|
65
|
+
/**
|
|
66
|
+
* Array of rules for the badge
|
|
67
|
+
*/
|
|
68
|
+
loyaltyConditions: Array<Badge.LoyaltyCondition>;
|
|
69
|
+
/**
|
|
70
|
+
* The name of the badge
|
|
71
|
+
*/
|
|
72
|
+
name: string;
|
|
73
|
+
/**
|
|
74
|
+
* The description of the badge
|
|
75
|
+
*/
|
|
76
|
+
description?: string;
|
|
77
|
+
}
|
|
78
|
+
namespace Badge {
|
|
79
|
+
/**
|
|
80
|
+
* Count of rules and accounts with the badge
|
|
81
|
+
*/
|
|
82
|
+
interface _Count {
|
|
83
|
+
/**
|
|
84
|
+
* The number of accounts with the badge
|
|
85
|
+
*/
|
|
86
|
+
LoyaltyBadgeUser: number;
|
|
87
|
+
/**
|
|
88
|
+
* The number of rules
|
|
89
|
+
*/
|
|
90
|
+
loyaltyConditions: number;
|
|
91
|
+
}
|
|
92
|
+
interface LoyaltyCondition {
|
|
93
|
+
/**
|
|
94
|
+
* UUID of the rule (converted to lowercase)
|
|
95
|
+
*/
|
|
96
|
+
id: string;
|
|
97
|
+
/**
|
|
98
|
+
* The type of rule
|
|
99
|
+
*/
|
|
100
|
+
type: 'rule' | 'section' | 'level' | 'points' | 'api' | 'badge';
|
|
101
|
+
/**
|
|
102
|
+
* The amount of the rule
|
|
103
|
+
*/
|
|
104
|
+
amount?: number;
|
|
105
|
+
/**
|
|
106
|
+
* The description of the rule
|
|
107
|
+
*/
|
|
108
|
+
description?: string;
|
|
109
|
+
/**
|
|
110
|
+
* UUID of the currency (optional, converted to lowercase)
|
|
111
|
+
*/
|
|
112
|
+
loyaltyCurrencyId?: string;
|
|
113
|
+
/**
|
|
114
|
+
* UUID of the rule group (optional, converted to lowercase)
|
|
115
|
+
*/
|
|
116
|
+
loyaltyRuleGroupId?: string;
|
|
117
|
+
/**
|
|
118
|
+
* UUID of the rule (optional, converted to lowercase)
|
|
119
|
+
*/
|
|
120
|
+
loyaltyRuleId?: string;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Response returned upon successful deletion of the badge.
|
|
126
|
+
*/
|
|
127
|
+
export interface BadgeDeleteResponse {
|
|
128
|
+
id: string;
|
|
129
|
+
deletedAt: string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Response returned upon successful update of the user badge
|
|
133
|
+
*/
|
|
134
|
+
export interface BadgeRevokeResponse {
|
|
135
|
+
data: BadgeRevokeResponse.Data;
|
|
136
|
+
/**
|
|
137
|
+
* The message returned upon update of the badge
|
|
138
|
+
*/
|
|
139
|
+
message: string;
|
|
140
|
+
}
|
|
141
|
+
export declare namespace BadgeRevokeResponse {
|
|
142
|
+
interface Data {
|
|
143
|
+
id: string;
|
|
144
|
+
loyaltyBadgeId: string;
|
|
145
|
+
status: 'active' | 'inactive' | 'revoked';
|
|
146
|
+
userId: string;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Response returned upon successful update of the user badge
|
|
151
|
+
*/
|
|
152
|
+
export interface BadgeRewardResponse {
|
|
153
|
+
data: BadgeRewardResponse.Data;
|
|
154
|
+
/**
|
|
155
|
+
* The message returned upon update of the badge
|
|
156
|
+
*/
|
|
157
|
+
message: string;
|
|
158
|
+
}
|
|
159
|
+
export declare namespace BadgeRewardResponse {
|
|
160
|
+
interface Data {
|
|
161
|
+
id: string;
|
|
162
|
+
loyaltyBadgeId: string;
|
|
163
|
+
status: 'active' | 'inactive' | 'revoked';
|
|
164
|
+
userId: string;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
export interface BadgeCreateParams {
|
|
168
|
+
/**
|
|
169
|
+
* The URL of the badge image
|
|
170
|
+
*/
|
|
171
|
+
imageUrl: string;
|
|
172
|
+
/**
|
|
173
|
+
* The name of the badge
|
|
174
|
+
*/
|
|
175
|
+
name: string;
|
|
176
|
+
/**
|
|
177
|
+
* UUID of the organization (optional, converted to lowercase)
|
|
178
|
+
*/
|
|
179
|
+
organizationId: string;
|
|
180
|
+
/**
|
|
181
|
+
* Array of rules for the badge
|
|
182
|
+
*/
|
|
183
|
+
rules: Array<BadgeCreateParams.Rule>;
|
|
184
|
+
/**
|
|
185
|
+
* UUID of the website (optional, converted to lowercase)
|
|
186
|
+
*/
|
|
187
|
+
websiteId: string;
|
|
188
|
+
/**
|
|
189
|
+
* The description of the badge
|
|
190
|
+
*/
|
|
191
|
+
description?: string;
|
|
192
|
+
}
|
|
193
|
+
export declare namespace BadgeCreateParams {
|
|
194
|
+
/**
|
|
195
|
+
* Schema for a loyalty condition rule.
|
|
196
|
+
*/
|
|
197
|
+
interface Rule {
|
|
198
|
+
/**
|
|
199
|
+
* The type of rule
|
|
200
|
+
*/
|
|
201
|
+
type: 'rule' | 'section' | 'level' | 'points' | 'api' | 'badge';
|
|
202
|
+
/**
|
|
203
|
+
* The amount of the rule
|
|
204
|
+
*/
|
|
205
|
+
amount?: number | null;
|
|
206
|
+
/**
|
|
207
|
+
* The description of the rule
|
|
208
|
+
*/
|
|
209
|
+
description?: string;
|
|
210
|
+
/**
|
|
211
|
+
* UUID of the badge (optional, converted to lowercase)
|
|
212
|
+
*/
|
|
213
|
+
loyaltyBadgeId?: string | null;
|
|
214
|
+
/**
|
|
215
|
+
* UUID of the currency (optional, converted to lowercase)
|
|
216
|
+
*/
|
|
217
|
+
loyaltyCurrencyId?: string | null;
|
|
218
|
+
/**
|
|
219
|
+
* UUID of the Loyalty Leaderboard (optional, converted to lowercase)
|
|
220
|
+
*/
|
|
221
|
+
loyaltyLeaderboardViewId?: string | null;
|
|
222
|
+
/**
|
|
223
|
+
* UUID of the rule group (optional, converted to lowercase)
|
|
224
|
+
*/
|
|
225
|
+
loyaltyRuleGroupId?: string | null;
|
|
226
|
+
/**
|
|
227
|
+
* UUID of the rule (optional, converted to lowercase)
|
|
228
|
+
*/
|
|
229
|
+
loyaltyRuleId?: string | null;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
export interface BadgeUpdateParams {
|
|
233
|
+
/**
|
|
234
|
+
* The description of the badge
|
|
235
|
+
*/
|
|
236
|
+
description?: string;
|
|
237
|
+
/**
|
|
238
|
+
* The URL of the badge image
|
|
239
|
+
*/
|
|
240
|
+
imageUrl?: string;
|
|
241
|
+
/**
|
|
242
|
+
* The name of the badge
|
|
243
|
+
*/
|
|
244
|
+
name?: string;
|
|
245
|
+
}
|
|
246
|
+
export interface BadgeListParams {
|
|
247
|
+
/**
|
|
248
|
+
* Array of badge IDs (converted to lowercase) to fetch
|
|
249
|
+
*/
|
|
250
|
+
badgeIds?: Array<string>;
|
|
251
|
+
/**
|
|
252
|
+
* Include deleted badges in the response
|
|
253
|
+
*/
|
|
254
|
+
includeDeleted?: boolean | null;
|
|
255
|
+
/**
|
|
256
|
+
* Number of badges to fetch
|
|
257
|
+
*/
|
|
258
|
+
limit?: number | null;
|
|
259
|
+
/**
|
|
260
|
+
* UUID of the organization (optional, converted to lowercase)
|
|
261
|
+
*/
|
|
262
|
+
organizationId?: string;
|
|
263
|
+
/**
|
|
264
|
+
* UUID of the badge to start after (converted to lowercase)
|
|
265
|
+
*/
|
|
266
|
+
startingAfter?: string;
|
|
267
|
+
/**
|
|
268
|
+
* UUID of the user (optional, converted to lowercase)
|
|
269
|
+
*/
|
|
270
|
+
userId?: string;
|
|
271
|
+
/**
|
|
272
|
+
* UUID of the website (optional, converted to lowercase)
|
|
273
|
+
*/
|
|
274
|
+
websiteId?: string;
|
|
275
|
+
}
|
|
276
|
+
export interface BadgeRevokeParams {
|
|
277
|
+
/**
|
|
278
|
+
* UUID of the user (converted to lowercase)
|
|
279
|
+
*/
|
|
280
|
+
userId?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Validated and formatted wallet address
|
|
283
|
+
*/
|
|
284
|
+
walletAddress?: string;
|
|
285
|
+
}
|
|
286
|
+
export interface BadgeRewardParams {
|
|
287
|
+
/**
|
|
288
|
+
* UUID of the user (converted to lowercase)
|
|
289
|
+
*/
|
|
290
|
+
userId?: string;
|
|
291
|
+
/**
|
|
292
|
+
* Validated and formatted wallet address
|
|
293
|
+
*/
|
|
294
|
+
walletAddress?: string;
|
|
295
|
+
}
|
|
296
|
+
export declare namespace Badges {
|
|
297
|
+
export { type BadgeCreateResponse as BadgeCreateResponse, type BadgeUpdateResponse as BadgeUpdateResponse, type BadgeListResponse as BadgeListResponse, type BadgeDeleteResponse as BadgeDeleteResponse, type BadgeRevokeResponse as BadgeRevokeResponse, type BadgeRewardResponse as BadgeRewardResponse, type BadgeCreateParams as BadgeCreateParams, type BadgeUpdateParams as BadgeUpdateParams, type BadgeListParams as BadgeListParams, type BadgeRevokeParams as BadgeRevokeParams, type BadgeRewardParams as BadgeRewardParams, };
|
|
298
|
+
}
|
|
299
|
+
//# sourceMappingURL=badges.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badges.d.ts","sourceRoot":"","sources":["../../src/resources/loyalty/badges.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAIpG;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,iBAAiB,EACxB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;IACvC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAYvF;;OAEG;IACH,IAAI,CAAC,KAAK,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAChG,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAWvE;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAIvF;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,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B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Badges = void 0;
|
|
5
|
+
const resource_1 = require("../../resource.js");
|
|
6
|
+
const core_1 = require("../../core.js");
|
|
7
|
+
class Badges extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* This endpoint allows you to configure a new badge.
|
|
10
|
+
*/
|
|
11
|
+
create(body, options) {
|
|
12
|
+
return this._client.post('/api/loyalty/badges', { body, ...options });
|
|
13
|
+
}
|
|
14
|
+
update(id, body = {}, options) {
|
|
15
|
+
if ((0, core_1.isRequestOptions)(body)) {
|
|
16
|
+
return this.update(id, {}, body);
|
|
17
|
+
}
|
|
18
|
+
return this._client.post(`/api/loyalty/badges/${id}`, { body, ...options });
|
|
19
|
+
}
|
|
20
|
+
list(query = {}, options) {
|
|
21
|
+
if ((0, core_1.isRequestOptions)(query)) {
|
|
22
|
+
return this.list({}, query);
|
|
23
|
+
}
|
|
24
|
+
return this._client.get('/api/loyalty/badges', { query, ...options });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* This endpoint allows you to delete a badge.
|
|
28
|
+
*/
|
|
29
|
+
delete(id, options) {
|
|
30
|
+
return this._client.delete(`/api/loyalty/badges/${id}`, options);
|
|
31
|
+
}
|
|
32
|
+
revoke(id, body = {}, options) {
|
|
33
|
+
if ((0, core_1.isRequestOptions)(body)) {
|
|
34
|
+
return this.revoke(id, {}, body);
|
|
35
|
+
}
|
|
36
|
+
return this._client.post(`/api/loyalty/badges/${id}/revoke`, { body, ...options });
|
|
37
|
+
}
|
|
38
|
+
reward(id, body = {}, options) {
|
|
39
|
+
if ((0, core_1.isRequestOptions)(body)) {
|
|
40
|
+
return this.reward(id, {}, body);
|
|
41
|
+
}
|
|
42
|
+
return this._client.post(`/api/loyalty/badges/${id}/reward`, { body, ...options });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Badges = Badges;
|
|
46
|
+
//# sourceMappingURL=badges.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badges.js","sourceRoot":"","sources":["../../src/resources/loyalty/badges.ts"],"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;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAWD,MAAM,CACJ,EAAU,EACV,OAAgD,EAAE,EAClD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;SAClC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AAzFD,wBAyFC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
import { isRequestOptions } from "../../core.mjs";
|
|
4
|
+
export class Badges extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* This endpoint allows you to configure a new badge.
|
|
7
|
+
*/
|
|
8
|
+
create(body, options) {
|
|
9
|
+
return this._client.post('/api/loyalty/badges', { body, ...options });
|
|
10
|
+
}
|
|
11
|
+
update(id, body = {}, options) {
|
|
12
|
+
if (isRequestOptions(body)) {
|
|
13
|
+
return this.update(id, {}, body);
|
|
14
|
+
}
|
|
15
|
+
return this._client.post(`/api/loyalty/badges/${id}`, { body, ...options });
|
|
16
|
+
}
|
|
17
|
+
list(query = {}, options) {
|
|
18
|
+
if (isRequestOptions(query)) {
|
|
19
|
+
return this.list({}, query);
|
|
20
|
+
}
|
|
21
|
+
return this._client.get('/api/loyalty/badges', { query, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* This endpoint allows you to delete a badge.
|
|
25
|
+
*/
|
|
26
|
+
delete(id, options) {
|
|
27
|
+
return this._client.delete(`/api/loyalty/badges/${id}`, options);
|
|
28
|
+
}
|
|
29
|
+
revoke(id, body = {}, options) {
|
|
30
|
+
if (isRequestOptions(body)) {
|
|
31
|
+
return this.revoke(id, {}, body);
|
|
32
|
+
}
|
|
33
|
+
return this._client.post(`/api/loyalty/badges/${id}/revoke`, { body, ...options });
|
|
34
|
+
}
|
|
35
|
+
reward(id, body = {}, options) {
|
|
36
|
+
if (isRequestOptions(body)) {
|
|
37
|
+
return this.reward(id, {}, body);
|
|
38
|
+
}
|
|
39
|
+
return this._client.post(`/api/loyalty/badges/${id}/reward`, { body, ...options });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=badges.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badges.mjs","sourceRoot":"","sources":["../../src/resources/loyalty/badges.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAA6B;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAWD,MAAM,CACJ,EAAU,EACV,OAAgD,EAAE,EAClD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;SAClC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAOD,IAAI,CACF,QAA+C,EAAE,EACjD,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,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAA6B;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,uBAAuB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;IAWD,MAAM,CACJ,EAAU,EACV,OAAgD,EAAE,EAClD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;SAClC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAWD,MAAM,CACJ,EAAU,EACV,OAAgD,EAAE,EAClD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;SAClC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
|
2
|
+
import * as Core from "../../core.js";
|
|
3
|
+
export declare class Currencies extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Create a loyalty currency
|
|
6
|
+
*/
|
|
7
|
+
create(body: CurrencyCreateParams, options?: Core.RequestOptions): Core.APIPromise<CurrencyCreateResponse>;
|
|
8
|
+
/**
|
|
9
|
+
* Get loyalty currencies
|
|
10
|
+
*/
|
|
11
|
+
list(query: CurrencyListParams, options?: Core.RequestOptions): Core.APIPromise<CurrencyListResponse>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Schema for a loyalty currency
|
|
15
|
+
*/
|
|
16
|
+
export interface CurrencyCreateResponse {
|
|
17
|
+
/**
|
|
18
|
+
* Unique identifier for the loyalty currency
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* Authentication key for API
|
|
23
|
+
*/
|
|
24
|
+
apiAuthKey: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Type of authentication used for API
|
|
27
|
+
*/
|
|
28
|
+
apiAuthType: 'none' | 'basic' | 'bearer' | 'apiKey' | null;
|
|
29
|
+
/**
|
|
30
|
+
* Authentication value for API
|
|
31
|
+
*/
|
|
32
|
+
apiAuthValue: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* API GET URL for fetching transaction entry data
|
|
35
|
+
*/
|
|
36
|
+
apiGetTransactionEntryUrl: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* API GET URL for fetching data
|
|
39
|
+
*/
|
|
40
|
+
apiGetUrl: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* API POST URL for sending data
|
|
43
|
+
*/
|
|
44
|
+
apiPostUrl: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Timestamp when the currency was created
|
|
47
|
+
*/
|
|
48
|
+
createdAt: string;
|
|
49
|
+
/**
|
|
50
|
+
* ID of the user who created the currency
|
|
51
|
+
*/
|
|
52
|
+
createdById: string | null;
|
|
53
|
+
/**
|
|
54
|
+
* Number of decimal places for the currency
|
|
55
|
+
*/
|
|
56
|
+
decimals: number;
|
|
57
|
+
/**
|
|
58
|
+
* Timestamp when the currency was deleted, if applicable
|
|
59
|
+
*/
|
|
60
|
+
deletedAt: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* URL of the image
|
|
63
|
+
*/
|
|
64
|
+
imageUrl: string | null;
|
|
65
|
+
/**
|
|
66
|
+
* Name of the loyalty currency
|
|
67
|
+
*/
|
|
68
|
+
name: string;
|
|
69
|
+
/**
|
|
70
|
+
* Unique identifier for the organization
|
|
71
|
+
*/
|
|
72
|
+
organizationId: string;
|
|
73
|
+
/**
|
|
74
|
+
* Sorting identifier
|
|
75
|
+
*/
|
|
76
|
+
sortId: number | null;
|
|
77
|
+
/**
|
|
78
|
+
* Symbol representing the loyalty currency
|
|
79
|
+
*/
|
|
80
|
+
symbol: string;
|
|
81
|
+
/**
|
|
82
|
+
* Timestamp when the currency was last updated
|
|
83
|
+
*/
|
|
84
|
+
updatedAt: string;
|
|
85
|
+
/**
|
|
86
|
+
* Unique identifier for the website
|
|
87
|
+
*/
|
|
88
|
+
websiteId: string;
|
|
89
|
+
}
|
|
90
|
+
export interface CurrencyListResponse {
|
|
91
|
+
data: Array<CurrencyListResponse.Data>;
|
|
92
|
+
hasNextPage: boolean;
|
|
93
|
+
}
|
|
94
|
+
export declare namespace CurrencyListResponse {
|
|
95
|
+
/**
|
|
96
|
+
* Schema for a loyalty currency
|
|
97
|
+
*/
|
|
98
|
+
interface Data {
|
|
99
|
+
/**
|
|
100
|
+
* Unique identifier for the loyalty currency
|
|
101
|
+
*/
|
|
102
|
+
id: string;
|
|
103
|
+
/**
|
|
104
|
+
* Authentication key for API
|
|
105
|
+
*/
|
|
106
|
+
apiAuthKey: string | null;
|
|
107
|
+
/**
|
|
108
|
+
* Type of authentication used for API
|
|
109
|
+
*/
|
|
110
|
+
apiAuthType: 'none' | 'basic' | 'bearer' | 'apiKey' | null;
|
|
111
|
+
/**
|
|
112
|
+
* Authentication value for API
|
|
113
|
+
*/
|
|
114
|
+
apiAuthValue: string | null;
|
|
115
|
+
/**
|
|
116
|
+
* API GET URL for fetching transaction entry data
|
|
117
|
+
*/
|
|
118
|
+
apiGetTransactionEntryUrl: string | null;
|
|
119
|
+
/**
|
|
120
|
+
* API GET URL for fetching data
|
|
121
|
+
*/
|
|
122
|
+
apiGetUrl: string | null;
|
|
123
|
+
/**
|
|
124
|
+
* API POST URL for sending data
|
|
125
|
+
*/
|
|
126
|
+
apiPostUrl: string | null;
|
|
127
|
+
/**
|
|
128
|
+
* Timestamp when the currency was created
|
|
129
|
+
*/
|
|
130
|
+
createdAt: string;
|
|
131
|
+
/**
|
|
132
|
+
* ID of the user who created the currency
|
|
133
|
+
*/
|
|
134
|
+
createdById: string | null;
|
|
135
|
+
/**
|
|
136
|
+
* Number of decimal places for the currency
|
|
137
|
+
*/
|
|
138
|
+
decimals: number;
|
|
139
|
+
/**
|
|
140
|
+
* Timestamp when the currency was deleted, if applicable
|
|
141
|
+
*/
|
|
142
|
+
deletedAt: string | null;
|
|
143
|
+
/**
|
|
144
|
+
* URL of the image
|
|
145
|
+
*/
|
|
146
|
+
imageUrl: string | null;
|
|
147
|
+
/**
|
|
148
|
+
* Name of the loyalty currency
|
|
149
|
+
*/
|
|
150
|
+
name: string;
|
|
151
|
+
/**
|
|
152
|
+
* Unique identifier for the organization
|
|
153
|
+
*/
|
|
154
|
+
organizationId: string;
|
|
155
|
+
/**
|
|
156
|
+
* Sorting identifier
|
|
157
|
+
*/
|
|
158
|
+
sortId: number | null;
|
|
159
|
+
/**
|
|
160
|
+
* Symbol representing the loyalty currency
|
|
161
|
+
*/
|
|
162
|
+
symbol: string;
|
|
163
|
+
/**
|
|
164
|
+
* Timestamp when the currency was last updated
|
|
165
|
+
*/
|
|
166
|
+
updatedAt: string;
|
|
167
|
+
/**
|
|
168
|
+
* Unique identifier for the website
|
|
169
|
+
*/
|
|
170
|
+
websiteId: string;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
export interface CurrencyCreateParams {
|
|
174
|
+
/**
|
|
175
|
+
* Number of decimal places for the currency
|
|
176
|
+
*/
|
|
177
|
+
decimals: number;
|
|
178
|
+
/**
|
|
179
|
+
* Name of the loyalty currency
|
|
180
|
+
*/
|
|
181
|
+
name: string;
|
|
182
|
+
/**
|
|
183
|
+
* Unique identifier for the organization
|
|
184
|
+
*/
|
|
185
|
+
organizationId: string;
|
|
186
|
+
/**
|
|
187
|
+
* Symbol representing the loyalty currency
|
|
188
|
+
*/
|
|
189
|
+
symbol: string;
|
|
190
|
+
/**
|
|
191
|
+
* Unique identifier for the website
|
|
192
|
+
*/
|
|
193
|
+
websiteId: string;
|
|
194
|
+
/**
|
|
195
|
+
* Authentication key for API
|
|
196
|
+
*/
|
|
197
|
+
apiAuthKey?: string | null;
|
|
198
|
+
/**
|
|
199
|
+
* Type of authentication used for API
|
|
200
|
+
*/
|
|
201
|
+
apiAuthType?: 'none' | 'basic' | 'bearer' | 'apiKey' | null;
|
|
202
|
+
/**
|
|
203
|
+
* Authentication value for API
|
|
204
|
+
*/
|
|
205
|
+
apiAuthValue?: string | null;
|
|
206
|
+
/**
|
|
207
|
+
* Optional API GET URL for fetching transaction entry data
|
|
208
|
+
*/
|
|
209
|
+
apiGetTransactionEntryUrl?: string | null;
|
|
210
|
+
/**
|
|
211
|
+
* Optional API GET URL for fetching data
|
|
212
|
+
*/
|
|
213
|
+
apiGetUrl?: string | null;
|
|
214
|
+
/**
|
|
215
|
+
* Optional API POST URL for sending data
|
|
216
|
+
*/
|
|
217
|
+
apiPostUrl?: string | null;
|
|
218
|
+
/**
|
|
219
|
+
* URL of the image; must start with AWS S3 asset URL base
|
|
220
|
+
*/
|
|
221
|
+
imageUrl?: string | null;
|
|
222
|
+
/**
|
|
223
|
+
* Optional sorting identifier
|
|
224
|
+
*/
|
|
225
|
+
sortId?: number;
|
|
226
|
+
}
|
|
227
|
+
export interface CurrencyListParams {
|
|
228
|
+
/**
|
|
229
|
+
* Unique identifier for the organization
|
|
230
|
+
*/
|
|
231
|
+
organizationId: string;
|
|
232
|
+
/**
|
|
233
|
+
* Unique identifier for the website
|
|
234
|
+
*/
|
|
235
|
+
websiteId: string;
|
|
236
|
+
/**
|
|
237
|
+
* Whether to include deleted currencies
|
|
238
|
+
*/
|
|
239
|
+
includeDeleted?: string;
|
|
240
|
+
/**
|
|
241
|
+
* Maximum number of records to return
|
|
242
|
+
*/
|
|
243
|
+
limit?: number | null;
|
|
244
|
+
/**
|
|
245
|
+
* Cursor for pagination; start after this ID
|
|
246
|
+
*/
|
|
247
|
+
startingAfter?: string;
|
|
248
|
+
}
|
|
249
|
+
export declare namespace Currencies {
|
|
250
|
+
export { type CurrencyCreateResponse as CurrencyCreateResponse, type CurrencyListResponse as CurrencyListResponse, type CurrencyCreateParams as CurrencyCreateParams, type CurrencyListParams as CurrencyListParams, };
|
|
251
|
+
}
|
|
252
|
+
//# sourceMappingURL=currencies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currencies.d.ts","sourceRoot":"","sources":["../../src/resources/loyalty/currencies.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAI1G;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC;CAGtG;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAAC;IAE3D;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CA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IAAI,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Currencies = void 0;
|
|
5
|
+
const resource_1 = require("../../resource.js");
|
|
6
|
+
class Currencies extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a loyalty currency
|
|
9
|
+
*/
|
|
10
|
+
create(body, options) {
|
|
11
|
+
return this._client.post('/api/loyalty/currencies', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get loyalty currencies
|
|
15
|
+
*/
|
|
16
|
+
list(query, options) {
|
|
17
|
+
return this._client.get('/api/loyalty/currencies', { query, ...options });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.Currencies = Currencies;
|
|
21
|
+
//# sourceMappingURL=currencies.js.map
|