@gala-chain/launchpad-sdk 4.0.1-beta.21 → 4.0.1-beta.25
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/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/src/LaunchpadSDK.d.ts +2 -24
- package/dist/src/LaunchpadSDK.d.ts.map +1 -1
- package/dist/src/constants/counts.d.ts +4 -7
- package/dist/src/constants/counts.d.ts.map +1 -1
- package/dist/src/constants/endpoints.d.ts +0 -3
- package/dist/src/constants/endpoints.d.ts.map +1 -1
- package/dist/src/constants/version.generated.d.ts +1 -1
- package/dist/src/index.d.ts +3 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/schemas/pagination.d.ts +0 -16
- package/dist/src/schemas/pagination.d.ts.map +1 -1
- package/dist/src/schemas/primitives.d.ts +0 -9
- package/dist/src/schemas/primitives.d.ts.map +1 -1
- package/dist/src/schemas/user.d.ts +1 -16
- package/dist/src/schemas/user.d.ts.map +1 -1
- package/dist/src/schemas/validators.d.ts +0 -13
- package/dist/src/schemas/validators.d.ts.map +1 -1
- package/dist/src/services/LaunchpadService.d.ts +2 -34
- package/dist/src/services/LaunchpadService.d.ts.map +1 -1
- package/dist/src/types/options.dto.d.ts +0 -30
- package/dist/src/types/options.dto.d.ts.map +1 -1
- package/dist/src/types/result.types.d.ts +1 -18
- package/dist/src/types/result.types.d.ts.map +1 -1
- package/dist/src/types/user.dto.d.ts +1 -35
- package/dist/src/types/user.dto.d.ts.map +1 -1
- package/dist/src/types/websocket-data.types.d.ts +0 -8
- package/dist/src/types/websocket-data.types.d.ts.map +1 -1
- package/dist/src/utils/auto-pagination.d.ts +2 -5
- package/dist/src/utils/auto-pagination.d.ts.map +1 -1
- package/dist/src/utils/error-factories.d.ts +2 -2
- package/dist/src/utils/query-params.d.ts +0 -1
- package/dist/src/utils/query-params.d.ts.map +1 -1
- package/dist/src/utils/response-handlers.d.ts +10 -10
- package/dist/src/utils/validation-helpers.d.ts +3 -12
- package/dist/src/utils/validation-helpers.d.ts.map +1 -1
- package/dist/src/utils/validation.d.ts +2 -2
- package/dist/src/utils/websocket-validators.d.ts +1 -5
- package/dist/src/utils/websocket-validators.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/services/CommentService.d.ts +0 -63
- package/dist/src/services/CommentService.d.ts.map +0 -1
- package/dist/src/services/FaucetService.d.ts +0 -55
- package/dist/src/services/FaucetService.d.ts.map +0 -1
- package/dist/src/types/comment.dto.d.ts +0 -169
- package/dist/src/types/comment.dto.d.ts.map +0 -1
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Comment API Data Transfer Objects and Types
|
|
3
|
-
*
|
|
4
|
-
* This module defines all types and interfaces for token comment operations including
|
|
5
|
-
* fetching comments and creating new comments.
|
|
6
|
-
*/
|
|
7
|
-
import { AddressFormat } from './common';
|
|
8
|
-
/**
|
|
9
|
-
* Options for fetching token comments
|
|
10
|
-
*/
|
|
11
|
-
export interface GetCommentsOptions {
|
|
12
|
-
/** Service vault address for the token */
|
|
13
|
-
vaultAddress: string;
|
|
14
|
-
/** Page number (1-based), defaults to 1 */
|
|
15
|
-
page?: number;
|
|
16
|
-
/** Number of items per page, defaults to 10 */
|
|
17
|
-
limit?: number;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Backend format for get comments options (handles type conversion)
|
|
21
|
-
*/
|
|
22
|
-
export interface BackendGetCommentsOptions {
|
|
23
|
-
/** Service vault address for the token */
|
|
24
|
-
vaultAddress: string;
|
|
25
|
-
/** Page number as string (backend quirk) */
|
|
26
|
-
page: string;
|
|
27
|
-
/** Limit as string (backend quirk) */
|
|
28
|
-
limit: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* User information associated with a comment
|
|
32
|
-
*/
|
|
33
|
-
export interface CommentUser {
|
|
34
|
-
/** User's full name */
|
|
35
|
-
fullName: string;
|
|
36
|
-
/** Profile image URL or null */
|
|
37
|
-
profileImage: string | null;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Comment information returned by the API
|
|
41
|
-
*/
|
|
42
|
-
export interface CommentInfo {
|
|
43
|
-
/** Comment ID */
|
|
44
|
-
id: number;
|
|
45
|
-
/** Comment content/text */
|
|
46
|
-
content: string;
|
|
47
|
-
/** User address who posted the comment */
|
|
48
|
-
userAddress: AddressFormat;
|
|
49
|
-
/** Comment creation timestamp */
|
|
50
|
-
createdAt: Date;
|
|
51
|
-
/** User information */
|
|
52
|
-
user: CommentUser;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Internal response from get comments endpoint
|
|
56
|
-
*/
|
|
57
|
-
export interface InternalGetCommentsResponse {
|
|
58
|
-
/** HTTP status code */
|
|
59
|
-
status: number;
|
|
60
|
-
/** Response message */
|
|
61
|
-
message: string;
|
|
62
|
-
/** Error status */
|
|
63
|
-
error: boolean;
|
|
64
|
-
/** Comment data */
|
|
65
|
-
data: {
|
|
66
|
-
/** Array of comments */
|
|
67
|
-
comments: CommentInfo[];
|
|
68
|
-
/** Total count of comments */
|
|
69
|
-
count: number;
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Clean result for fetching comments
|
|
74
|
-
*/
|
|
75
|
-
export interface CommentsResult {
|
|
76
|
-
/** Array of comments with Date objects */
|
|
77
|
-
comments: CommentInfo[];
|
|
78
|
-
/** Total count of comments */
|
|
79
|
-
total: number;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Data required for creating a new comment
|
|
83
|
-
*/
|
|
84
|
-
export interface CreateCommentData {
|
|
85
|
-
/** User address in backend format eth|[40-hex-chars] */
|
|
86
|
-
userAddress: AddressFormat;
|
|
87
|
-
/** Service vault address for the token */
|
|
88
|
-
vaultAddress: string;
|
|
89
|
-
/** Comment content/text */
|
|
90
|
-
content: string;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Internal response from create comment endpoint
|
|
94
|
-
*/
|
|
95
|
-
export interface InternalCreateCommentResponse {
|
|
96
|
-
/** HTTP status code */
|
|
97
|
-
status: number;
|
|
98
|
-
/** Response message */
|
|
99
|
-
message: string;
|
|
100
|
-
/** Error status */
|
|
101
|
-
error: boolean;
|
|
102
|
-
/** Created comment data */
|
|
103
|
-
data: {
|
|
104
|
-
/** Comment ID */
|
|
105
|
-
id: number;
|
|
106
|
-
/** User address who posted the comment */
|
|
107
|
-
userAddress: AddressFormat;
|
|
108
|
-
/** Comment content/text */
|
|
109
|
-
content: string;
|
|
110
|
-
/** Pool ID associated with the comment */
|
|
111
|
-
poolId: number;
|
|
112
|
-
/** Comment update timestamp */
|
|
113
|
-
updatedAt: string;
|
|
114
|
-
/** Comment creation timestamp */
|
|
115
|
-
createdAt: string;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Constraints for comment operations
|
|
120
|
-
*/
|
|
121
|
-
export declare const COMMENT_CONSTRAINTS: {
|
|
122
|
-
/** Pagination constraints */
|
|
123
|
-
readonly PAGINATION: {
|
|
124
|
-
readonly MIN_PAGE: 1;
|
|
125
|
-
readonly MAX_PAGE: 1000;
|
|
126
|
-
readonly MIN_LIMIT: 1;
|
|
127
|
-
readonly MAX_LIMIT: 50;
|
|
128
|
-
};
|
|
129
|
-
/** Comment content constraints */
|
|
130
|
-
readonly CONTENT: {
|
|
131
|
-
readonly MIN_LENGTH: 1;
|
|
132
|
-
readonly MAX_LENGTH: 500;
|
|
133
|
-
};
|
|
134
|
-
/** Vault address pattern for service tokens */
|
|
135
|
-
readonly VAULT_ADDRESS: {
|
|
136
|
-
/** Service vault pattern: service|[alphanumeric with special chars] */
|
|
137
|
-
readonly SERVICE_PATTERN: RegExp;
|
|
138
|
-
};
|
|
139
|
-
/** User address pattern */
|
|
140
|
-
readonly USER_ADDRESS: {
|
|
141
|
-
/** User address pattern: eth|[40-hex-chars] */
|
|
142
|
-
readonly PATTERN: RegExp;
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
/**
|
|
146
|
-
* Type guard to check if an object is valid GetCommentsOptions
|
|
147
|
-
*/
|
|
148
|
-
export declare function isGetCommentsOptions(obj: unknown): obj is GetCommentsOptions;
|
|
149
|
-
/**
|
|
150
|
-
* Type guard to check if an object is valid CreateCommentData
|
|
151
|
-
*/
|
|
152
|
-
export declare function isCreateCommentData(obj: unknown): obj is CreateCommentData;
|
|
153
|
-
/**
|
|
154
|
-
* Validates service vault address format
|
|
155
|
-
*/
|
|
156
|
-
export declare function isValidServiceVaultAddress(address: string): boolean;
|
|
157
|
-
/**
|
|
158
|
-
* Validates user address format
|
|
159
|
-
*/
|
|
160
|
-
export declare function isValidUserAddress(address: string): boolean;
|
|
161
|
-
/**
|
|
162
|
-
* Validates comment content format
|
|
163
|
-
*/
|
|
164
|
-
export declare function isValidCommentContent(content: string): boolean;
|
|
165
|
-
/**
|
|
166
|
-
* Validates pagination parameters
|
|
167
|
-
*/
|
|
168
|
-
export declare function isValidCommentPagination(page: number, limit: number): boolean;
|
|
169
|
-
//# sourceMappingURL=comment.dto.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comment.dto.d.ts","sourceRoot":"","sources":["../../../src/types/comment.dto.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMzC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,4CAA4C;I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