@crosspost/types 0.1.5 → 0.1.7
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 +379 -667
- package/dist/index.d.cts +1469 -5894
- package/dist/index.d.ts +1469 -5894
- package/dist/index.js +374 -644
- package/package.json +1 -1
- package/src/activity.ts +30 -115
- package/src/auth.ts +40 -70
- package/src/common.ts +8 -10
- package/src/errors.ts +97 -0
- package/src/index.ts +1 -13
- package/src/post.ts +22 -168
- package/src/rate-limit.ts +33 -72
- package/src/response.ts +41 -288
- package/src/user-profile.ts +2 -26
- package/src/errors/api-error.ts +0 -153
- package/src/errors/base-error.ts +0 -13
- package/src/errors/index.ts +0 -7
- package/src/errors/platform-error.ts +0 -34
package/dist/index.cjs
CHANGED
@@ -23,52 +23,40 @@ __export(index_exports, {
|
|
23
23
|
AccountActivityEntrySchema: () => AccountActivityEntrySchema,
|
24
24
|
AccountActivityParamsSchema: () => AccountActivityParamsSchema,
|
25
25
|
AccountActivityQuerySchema: () => AccountActivityQuerySchema,
|
26
|
-
AccountActivityResponseSchema: () => AccountActivityResponseSchema,
|
27
26
|
AccountPostSchema: () => AccountPostSchema,
|
28
27
|
AccountPostsParamsSchema: () => AccountPostsParamsSchema,
|
29
28
|
AccountPostsQuerySchema: () => AccountPostsQuerySchema,
|
30
|
-
AccountPostsResponseSchema: () => AccountPostsResponseSchema,
|
31
29
|
ActivityLeaderboardQuerySchema: () => ActivityLeaderboardQuerySchema,
|
32
|
-
ActivityLeaderboardResponseSchema: () => ActivityLeaderboardResponseSchema,
|
33
30
|
AllRateLimitsResponseSchema: () => AllRateLimitsResponseSchema,
|
34
|
-
ApiError: () => ApiError,
|
35
31
|
ApiErrorCode: () => ApiErrorCode,
|
36
|
-
|
32
|
+
ApiErrorCodeSchema: () => ApiErrorCodeSchema,
|
37
33
|
AuthCallbackQuerySchema: () => AuthCallbackQuerySchema,
|
38
34
|
AuthCallbackResponseSchema: () => AuthCallbackResponseSchema,
|
39
35
|
AuthInitRequestSchema: () => AuthInitRequestSchema,
|
40
36
|
AuthRevokeResponseSchema: () => AuthRevokeResponseSchema,
|
41
37
|
AuthStatusResponseSchema: () => AuthStatusResponseSchema,
|
38
|
+
AuthTokenRequestSchema: () => AuthTokenRequestSchema,
|
42
39
|
AuthUrlResponseSchema: () => AuthUrlResponseSchema,
|
43
|
-
BaseError: () => BaseError,
|
44
40
|
ConnectedAccountSchema: () => ConnectedAccountSchema,
|
45
41
|
ConnectedAccountsResponseSchema: () => ConnectedAccountsResponseSchema,
|
46
42
|
CreatePostRequestSchema: () => CreatePostRequestSchema,
|
47
|
-
CreatePostResponseLegacySchema: () => CreatePostResponseLegacySchema,
|
48
43
|
CreatePostResponseSchema: () => CreatePostResponseSchema,
|
49
|
-
CreatePostTargetErrorSchema: () => CreatePostTargetErrorSchema,
|
50
|
-
CreatePostTargetResultSchema: () => CreatePostTargetResultSchema,
|
51
44
|
DeletePostRequestSchema: () => DeletePostRequestSchema,
|
52
45
|
DeletePostResponseSchema: () => DeletePostResponseSchema,
|
53
46
|
DeleteResultSchema: () => DeleteResultSchema,
|
54
47
|
EndpointRateLimitResponseSchema: () => EndpointRateLimitResponseSchema,
|
55
|
-
EnhancedErrorResponseSchema: () => EnhancedErrorResponseSchema,
|
56
|
-
EnhancedResponseMetaSchema: () => EnhancedResponseMetaSchema,
|
57
|
-
EnhancedResponseSchema: () => EnhancedResponseSchema,
|
58
48
|
ErrorDetailSchema: () => ErrorDetailSchema,
|
59
|
-
ErrorResponseSchema: () => ErrorResponseSchema,
|
60
49
|
LikePostRequestSchema: () => LikePostRequestSchema,
|
61
50
|
LikePostResponseSchema: () => LikePostResponseSchema,
|
62
51
|
LikeResultSchema: () => LikeResultSchema,
|
63
52
|
MediaContentSchema: () => MediaContentSchema,
|
64
53
|
MediaSchema: () => MediaSchema,
|
65
|
-
|
54
|
+
MultiStatusDataSchema: () => MultiStatusDataSchema,
|
66
55
|
NearAuthorizationRequestSchema: () => NearAuthorizationRequestSchema,
|
67
56
|
NearAuthorizationResponseSchema: () => NearAuthorizationResponseSchema,
|
68
57
|
NearAuthorizationStatusResponseSchema: () => NearAuthorizationStatusResponseSchema,
|
69
58
|
Platform: () => Platform,
|
70
59
|
PlatformActivitySchema: () => PlatformActivitySchema,
|
71
|
-
PlatformError: () => PlatformError,
|
72
60
|
PlatformParamSchema: () => PlatformParamSchema,
|
73
61
|
PlatformRateLimitSchema: () => PlatformRateLimitSchema,
|
74
62
|
PlatformSchema: () => PlatformSchema,
|
@@ -81,7 +69,6 @@ __export(index_exports, {
|
|
81
69
|
PostSuccessDetailSchema: () => PostSuccessDetailSchema,
|
82
70
|
PostToDeleteSchema: () => PostToDeleteSchema,
|
83
71
|
ProfileRefreshResponseSchema: () => ProfileRefreshResponseSchema,
|
84
|
-
ProfileRefreshResultSchema: () => ProfileRefreshResultSchema,
|
85
72
|
QuotePostRequestSchema: () => QuotePostRequestSchema,
|
86
73
|
QuotePostResponseSchema: () => QuotePostResponseSchema,
|
87
74
|
RateLimitEndpointParamSchema: () => RateLimitEndpointParamSchema,
|
@@ -93,6 +80,7 @@ __export(index_exports, {
|
|
93
80
|
ReplyToPostResponseSchema: () => ReplyToPostResponseSchema,
|
94
81
|
RepostRequestSchema: () => RepostRequestSchema,
|
95
82
|
RepostResponseSchema: () => RepostResponseSchema,
|
83
|
+
ResponseMetaSchema: () => ResponseMetaSchema,
|
96
84
|
SUPPORTED_PLATFORMS: () => SUPPORTED_PLATFORMS,
|
97
85
|
SuccessDetailSchema: () => SuccessDetailSchema,
|
98
86
|
SupportedPlatformSchema: () => SupportedPlatformSchema,
|
@@ -102,13 +90,7 @@ __export(index_exports, {
|
|
102
90
|
UnlikePostResponseSchema: () => UnlikePostResponseSchema,
|
103
91
|
UsageRateLimitSchema: () => UsageRateLimitSchema,
|
104
92
|
UserProfileSchema: () => UserProfileSchema,
|
105
|
-
|
106
|
-
createEnhancedApiResponse: () => createEnhancedApiResponse,
|
107
|
-
createEnhancedErrorResponse: () => createEnhancedErrorResponse,
|
108
|
-
createErrorDetail: () => createErrorDetail,
|
109
|
-
createErrorResponse: () => createErrorResponse,
|
110
|
-
createMultiStatusResponse: () => createMultiStatusResponse,
|
111
|
-
createSuccessDetail: () => createSuccessDetail,
|
93
|
+
errorCodeToStatusCode: () => errorCodeToStatusCode,
|
112
94
|
isPlatformSupported: () => isPlatformSupported
|
113
95
|
});
|
114
96
|
module.exports = __toCommonJS(index_exports);
|
@@ -132,167 +114,10 @@ function isPlatformSupported(platform) {
|
|
132
114
|
}
|
133
115
|
|
134
116
|
// src/response.ts
|
135
|
-
var
|
136
|
-
var ApiResponseSchema = import_zod2.z.object({
|
137
|
-
data: import_zod2.z.any().describe("Response data"),
|
138
|
-
meta: import_zod2.z.object({
|
139
|
-
rateLimit: import_zod2.z.object({
|
140
|
-
remaining: import_zod2.z.number().describe("Number of requests remaining in the current window"),
|
141
|
-
limit: import_zod2.z.number().describe("Total number of requests allowed in the window"),
|
142
|
-
reset: import_zod2.z.number().describe("Timestamp when the rate limit resets (in seconds since epoch)")
|
143
|
-
}).optional().describe("Rate limit information"),
|
144
|
-
pagination: import_zod2.z.object({
|
145
|
-
page: import_zod2.z.number().describe("Current page number"),
|
146
|
-
perPage: import_zod2.z.number().describe("Number of items per page"),
|
147
|
-
total: import_zod2.z.number().describe("Total number of items"),
|
148
|
-
totalPages: import_zod2.z.number().describe("Total number of pages"),
|
149
|
-
nextCursor: import_zod2.z.string().optional().describe("Next page cursor (if applicable)"),
|
150
|
-
prevCursor: import_zod2.z.string().optional().describe("Previous page cursor (if applicable)")
|
151
|
-
}).optional().describe("Pagination information")
|
152
|
-
}).optional().describe("Response metadata")
|
153
|
-
}).describe("Standard API response");
|
154
|
-
var ErrorResponseSchema = import_zod2.z.object({
|
155
|
-
error: import_zod2.z.object({
|
156
|
-
type: import_zod2.z.string().describe("Error type"),
|
157
|
-
message: import_zod2.z.string().describe("Error message"),
|
158
|
-
code: import_zod2.z.string().optional().describe("Error code (if applicable)"),
|
159
|
-
details: import_zod2.z.any().optional().describe("Additional error details")
|
160
|
-
}).describe("Error information")
|
161
|
-
}).describe("Error response");
|
162
|
-
var EnhancedResponseMetaSchema = import_zod2.z.object({
|
163
|
-
requestId: import_zod2.z.string().optional().describe("Unique request identifier"),
|
164
|
-
timestamp: import_zod2.z.string().optional().describe("Request timestamp"),
|
165
|
-
rateLimit: import_zod2.z.object({
|
166
|
-
remaining: import_zod2.z.number().describe("Number of requests remaining in the current window"),
|
167
|
-
limit: import_zod2.z.number().describe("Total number of requests allowed in the window"),
|
168
|
-
reset: import_zod2.z.number().describe("Timestamp when the rate limit resets (in seconds since epoch)")
|
169
|
-
}).optional().describe("Rate limit information"),
|
170
|
-
pagination: import_zod2.z.object({
|
171
|
-
page: import_zod2.z.number().describe("Current page number"),
|
172
|
-
perPage: import_zod2.z.number().describe("Number of items per page"),
|
173
|
-
total: import_zod2.z.number().describe("Total number of items"),
|
174
|
-
totalPages: import_zod2.z.number().describe("Total number of pages"),
|
175
|
-
nextCursor: import_zod2.z.string().optional().describe("Next page cursor (if applicable)"),
|
176
|
-
prevCursor: import_zod2.z.string().optional().describe("Previous page cursor (if applicable)")
|
177
|
-
}).optional().describe("Pagination information")
|
178
|
-
}).optional().describe("Response metadata");
|
179
|
-
var ErrorDetailSchema = import_zod2.z.object({
|
180
|
-
platform: import_zod2.z.string().optional().describe("Platform associated with the error (if applicable)"),
|
181
|
-
userId: import_zod2.z.string().optional().describe("User ID associated with the error (if applicable)"),
|
182
|
-
status: import_zod2.z.literal("error").describe("Error status"),
|
183
|
-
error: import_zod2.z.string().describe("Human-readable error message"),
|
184
|
-
errorCode: import_zod2.z.string().describe("Machine-readable error code"),
|
185
|
-
recoverable: import_zod2.z.boolean().describe("Whether the error is recoverable (can be retried)"),
|
186
|
-
details: import_zod2.z.record(import_zod2.z.any()).optional().describe("Additional error details (platform-specific)")
|
187
|
-
}).describe("Error detail");
|
188
|
-
var EnhancedErrorResponseSchema = import_zod2.z.object({
|
189
|
-
success: import_zod2.z.literal(false).describe("Success indicator (always false for error responses)"),
|
190
|
-
errors: import_zod2.z.array(ErrorDetailSchema).describe("Error information")
|
191
|
-
}).describe("Enhanced error response");
|
192
|
-
var SuccessDetailSchema = import_zod2.z.object({
|
193
|
-
platform: import_zod2.z.string().describe("Platform associated with the success"),
|
194
|
-
userId: import_zod2.z.string().describe("User ID associated with the success"),
|
195
|
-
status: import_zod2.z.literal("success").describe("Success status"),
|
196
|
-
postId: import_zod2.z.string().optional().describe("Post ID (if applicable)"),
|
197
|
-
postUrl: import_zod2.z.string().optional().describe("Post URL (if applicable)")
|
198
|
-
}).catchall(import_zod2.z.any()).describe("Success detail");
|
199
|
-
var MultiStatusResponseSchema = import_zod2.z.object({
|
200
|
-
success: import_zod2.z.boolean().describe("Success indicator (true if at least one operation succeeded)"),
|
201
|
-
data: import_zod2.z.object({
|
202
|
-
summary: import_zod2.z.object({
|
203
|
-
total: import_zod2.z.number().describe("Total number of operations"),
|
204
|
-
succeeded: import_zod2.z.number().describe("Number of successful operations"),
|
205
|
-
failed: import_zod2.z.number().describe("Number of failed operations")
|
206
|
-
}).describe("Summary of operations"),
|
207
|
-
results: import_zod2.z.array(SuccessDetailSchema).describe("Successful results"),
|
208
|
-
errors: import_zod2.z.array(ErrorDetailSchema).describe("Failed results")
|
209
|
-
}).describe("Response data")
|
210
|
-
}).describe("Multi-status response");
|
211
|
-
function EnhancedResponseSchema(schema) {
|
212
|
-
return import_zod2.z.object({
|
213
|
-
success: import_zod2.z.boolean().describe("Whether the request was successful"),
|
214
|
-
data: schema,
|
215
|
-
meta: EnhancedResponseMetaSchema
|
216
|
-
});
|
217
|
-
}
|
218
|
-
function createEnhancedApiResponse(data, meta) {
|
219
|
-
return {
|
220
|
-
success: true,
|
221
|
-
data,
|
222
|
-
meta
|
223
|
-
};
|
224
|
-
}
|
225
|
-
function createApiResponse(data, meta) {
|
226
|
-
return {
|
227
|
-
data,
|
228
|
-
meta
|
229
|
-
};
|
230
|
-
}
|
231
|
-
function createErrorResponse(type, message, code, details) {
|
232
|
-
return {
|
233
|
-
error: {
|
234
|
-
type,
|
235
|
-
message,
|
236
|
-
...code ? { code } : {},
|
237
|
-
...details ? { details } : {}
|
238
|
-
}
|
239
|
-
};
|
240
|
-
}
|
241
|
-
function createEnhancedErrorResponse(errors) {
|
242
|
-
return {
|
243
|
-
success: false,
|
244
|
-
errors
|
245
|
-
};
|
246
|
-
}
|
247
|
-
function createErrorDetail(error, errorCode, recoverable, platform, userId, details) {
|
248
|
-
return {
|
249
|
-
platform,
|
250
|
-
userId,
|
251
|
-
status: "error",
|
252
|
-
error,
|
253
|
-
errorCode,
|
254
|
-
recoverable,
|
255
|
-
details
|
256
|
-
};
|
257
|
-
}
|
258
|
-
function createSuccessDetail(platform, userId, additionalData) {
|
259
|
-
return {
|
260
|
-
platform,
|
261
|
-
userId,
|
262
|
-
status: "success",
|
263
|
-
...additionalData
|
264
|
-
};
|
265
|
-
}
|
266
|
-
function createMultiStatusResponse(results, errors) {
|
267
|
-
const total = results.length + errors.length;
|
268
|
-
const succeeded = results.length;
|
269
|
-
const failed = errors.length;
|
270
|
-
return {
|
271
|
-
success: succeeded > 0,
|
272
|
-
data: {
|
273
|
-
summary: {
|
274
|
-
total,
|
275
|
-
succeeded,
|
276
|
-
failed
|
277
|
-
},
|
278
|
-
results,
|
279
|
-
errors
|
280
|
-
}
|
281
|
-
};
|
282
|
-
}
|
283
|
-
|
284
|
-
// src/errors/base-error.ts
|
285
|
-
var BaseError = class extends Error {
|
286
|
-
constructor(message) {
|
287
|
-
super(message);
|
288
|
-
this.name = this.constructor.name;
|
289
|
-
if (Error.captureStackTrace) {
|
290
|
-
Error.captureStackTrace(this, this.constructor);
|
291
|
-
}
|
292
|
-
}
|
293
|
-
};
|
117
|
+
var import_zod3 = require("zod");
|
294
118
|
|
295
|
-
// src/errors
|
119
|
+
// src/errors.ts
|
120
|
+
var import_zod2 = require("zod");
|
296
121
|
var ApiErrorCode = /* @__PURE__ */ ((ApiErrorCode2) => {
|
297
122
|
ApiErrorCode2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
|
298
123
|
ApiErrorCode2["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
@@ -307,6 +132,7 @@ var ApiErrorCode = /* @__PURE__ */ ((ApiErrorCode2) => {
|
|
307
132
|
ApiErrorCode2["CONTENT_POLICY_VIOLATION"] = "CONTENT_POLICY_VIOLATION";
|
308
133
|
ApiErrorCode2["DUPLICATE_CONTENT"] = "DUPLICATE_CONTENT";
|
309
134
|
ApiErrorCode2["MEDIA_UPLOAD_FAILED"] = "MEDIA_UPLOAD_FAILED";
|
135
|
+
ApiErrorCode2["MULTI_STATUS"] = "MULTI_STATUS";
|
310
136
|
ApiErrorCode2["POST_CREATION_FAILED"] = "POST_CREATION_FAILED";
|
311
137
|
ApiErrorCode2["THREAD_CREATION_FAILED"] = "THREAD_CREATION_FAILED";
|
312
138
|
ApiErrorCode2["POST_DELETION_FAILED"] = "POST_DELETION_FAILED";
|
@@ -314,450 +140,370 @@ var ApiErrorCode = /* @__PURE__ */ ((ApiErrorCode2) => {
|
|
314
140
|
ApiErrorCode2["NETWORK_ERROR"] = "NETWORK_ERROR";
|
315
141
|
return ApiErrorCode2;
|
316
142
|
})(ApiErrorCode || {});
|
317
|
-
var
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
* Create an unauthorized error
|
339
|
-
*/
|
340
|
-
static unauthorized(message = "Unauthorized") {
|
341
|
-
return new _ApiError(
|
342
|
-
message,
|
343
|
-
"UNAUTHORIZED" /* UNAUTHORIZED */,
|
344
|
-
401,
|
345
|
-
void 0,
|
346
|
-
true
|
347
|
-
);
|
348
|
-
}
|
349
|
-
/**
|
350
|
-
* Create a forbidden error
|
351
|
-
*/
|
352
|
-
static forbidden(message = "Forbidden") {
|
353
|
-
return new _ApiError(
|
354
|
-
message,
|
355
|
-
"FORBIDDEN" /* FORBIDDEN */,
|
356
|
-
403,
|
357
|
-
void 0,
|
358
|
-
false
|
359
|
-
);
|
360
|
-
}
|
361
|
-
/**
|
362
|
-
* Create a not found error
|
363
|
-
*/
|
364
|
-
static notFound(message = "Resource not found") {
|
365
|
-
return new _ApiError(
|
366
|
-
message,
|
367
|
-
"NOT_FOUND" /* NOT_FOUND */,
|
368
|
-
404,
|
369
|
-
void 0,
|
370
|
-
false
|
371
|
-
);
|
372
|
-
}
|
373
|
-
/**
|
374
|
-
* Create a rate limit error
|
375
|
-
*/
|
376
|
-
static rateLimited(message = "Rate limit exceeded", details) {
|
377
|
-
return new _ApiError(
|
378
|
-
message,
|
379
|
-
"RATE_LIMITED" /* RATE_LIMITED */,
|
380
|
-
429,
|
381
|
-
details,
|
382
|
-
true
|
383
|
-
);
|
384
|
-
}
|
385
|
-
/**
|
386
|
-
* Create an internal server error
|
387
|
-
*/
|
388
|
-
static internal(message = "Internal server error", details) {
|
389
|
-
return new _ApiError(
|
390
|
-
message,
|
391
|
-
"INTERNAL_ERROR" /* INTERNAL_ERROR */,
|
392
|
-
500,
|
393
|
-
details,
|
394
|
-
false
|
395
|
-
);
|
396
|
-
}
|
143
|
+
var ApiErrorCodeSchema = import_zod2.z.enum(Object.values(ApiErrorCode));
|
144
|
+
var errorCodeToStatusCode = {
|
145
|
+
["MULTI_STATUS" /* MULTI_STATUS */]: 207,
|
146
|
+
["UNKNOWN_ERROR" /* UNKNOWN_ERROR */]: 500,
|
147
|
+
["INTERNAL_ERROR" /* INTERNAL_ERROR */]: 500,
|
148
|
+
["VALIDATION_ERROR" /* VALIDATION_ERROR */]: 400,
|
149
|
+
["INVALID_REQUEST" /* INVALID_REQUEST */]: 400,
|
150
|
+
["NOT_FOUND" /* NOT_FOUND */]: 404,
|
151
|
+
["UNAUTHORIZED" /* UNAUTHORIZED */]: 401,
|
152
|
+
["FORBIDDEN" /* FORBIDDEN */]: 403,
|
153
|
+
["RATE_LIMITED" /* RATE_LIMITED */]: 429,
|
154
|
+
["PLATFORM_ERROR" /* PLATFORM_ERROR */]: 502,
|
155
|
+
["PLATFORM_UNAVAILABLE" /* PLATFORM_UNAVAILABLE */]: 503,
|
156
|
+
["CONTENT_POLICY_VIOLATION" /* CONTENT_POLICY_VIOLATION */]: 400,
|
157
|
+
["DUPLICATE_CONTENT" /* DUPLICATE_CONTENT */]: 400,
|
158
|
+
["MEDIA_UPLOAD_FAILED" /* MEDIA_UPLOAD_FAILED */]: 400,
|
159
|
+
["POST_CREATION_FAILED" /* POST_CREATION_FAILED */]: 500,
|
160
|
+
["THREAD_CREATION_FAILED" /* THREAD_CREATION_FAILED */]: 500,
|
161
|
+
["POST_DELETION_FAILED" /* POST_DELETION_FAILED */]: 500,
|
162
|
+
["POST_INTERACTION_FAILED" /* POST_INTERACTION_FAILED */]: 500,
|
163
|
+
["NETWORK_ERROR" /* NETWORK_ERROR */]: 503
|
397
164
|
};
|
165
|
+
var ErrorDetailSchema = import_zod2.z.object({
|
166
|
+
message: import_zod2.z.string().describe("Human-readable error message"),
|
167
|
+
code: ApiErrorCodeSchema.describe("Machine-readable error code"),
|
168
|
+
recoverable: import_zod2.z.boolean().describe("Whether the error can be recovered from"),
|
169
|
+
details: import_zod2.z.record(import_zod2.z.unknown()).optional().describe("Additional error details")
|
170
|
+
});
|
398
171
|
|
399
|
-
// src/
|
400
|
-
var
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
172
|
+
// src/response.ts
|
173
|
+
var ResponseMetaSchema = import_zod3.z.object({
|
174
|
+
requestId: import_zod3.z.string().uuid().describe("Unique identifier for the request"),
|
175
|
+
timestamp: import_zod3.z.string().datetime().describe("ISO timestamp of response generation"),
|
176
|
+
rateLimit: import_zod3.z.object({
|
177
|
+
remaining: import_zod3.z.number().int().nonnegative(),
|
178
|
+
limit: import_zod3.z.number().int().positive(),
|
179
|
+
reset: import_zod3.z.number().int().positive().describe("Unix timestamp (seconds)")
|
180
|
+
}).optional().describe("Rate limit information if applicable"),
|
181
|
+
pagination: import_zod3.z.object({
|
182
|
+
page: import_zod3.z.number().int().positive().optional(),
|
183
|
+
perPage: import_zod3.z.number().int().positive().optional(),
|
184
|
+
total: import_zod3.z.number().int().nonnegative().optional(),
|
185
|
+
limit: import_zod3.z.number().int().nonnegative().optional(),
|
186
|
+
offset: import_zod3.z.number().int().nonnegative().optional(),
|
187
|
+
totalPages: import_zod3.z.number().int().nonnegative().optional(),
|
188
|
+
nextCursor: import_zod3.z.string().optional(),
|
189
|
+
prevCursor: import_zod3.z.string().optional()
|
190
|
+
}).optional().describe("Pagination information if applicable")
|
191
|
+
});
|
192
|
+
var SuccessDetailSchema = import_zod3.z.object({
|
193
|
+
platform: import_zod3.z.string(),
|
194
|
+
userId: import_zod3.z.string(),
|
195
|
+
additionalData: import_zod3.z.any().optional(),
|
196
|
+
status: import_zod3.z.literal("success")
|
197
|
+
}).catchall(import_zod3.z.any());
|
198
|
+
var MultiStatusDataSchema = import_zod3.z.object({
|
199
|
+
summary: import_zod3.z.object({
|
200
|
+
total: import_zod3.z.number().int().nonnegative(),
|
201
|
+
succeeded: import_zod3.z.number().int().nonnegative(),
|
202
|
+
failed: import_zod3.z.number().int().nonnegative()
|
203
|
+
}),
|
204
|
+
results: import_zod3.z.array(SuccessDetailSchema),
|
205
|
+
errors: import_zod3.z.array(ErrorDetailSchema)
|
206
|
+
});
|
413
207
|
|
414
208
|
// src/auth.ts
|
415
|
-
var
|
416
|
-
var PlatformParamSchema =
|
417
|
-
platform:
|
209
|
+
var import_zod4 = require("zod");
|
210
|
+
var PlatformParamSchema = import_zod4.z.object({
|
211
|
+
platform: import_zod4.z.string().describe("Social media platform")
|
418
212
|
}).describe("Platform parameter");
|
419
|
-
var AuthInitRequestSchema =
|
420
|
-
successUrl:
|
213
|
+
var AuthInitRequestSchema = import_zod4.z.object({
|
214
|
+
successUrl: import_zod4.z.string().url().optional().describe(
|
421
215
|
"URL to redirect to on successful authentication"
|
422
216
|
),
|
423
|
-
errorUrl:
|
217
|
+
errorUrl: import_zod4.z.string().url().optional().describe("URL to redirect to on authentication error")
|
424
218
|
}).describe("Auth initialization request");
|
425
|
-
var AuthUrlResponseSchema =
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
).describe("
|
432
|
-
|
433
|
-
code: import_zod3.z.string().describe("Authorization code from OAuth provider"),
|
434
|
-
state: import_zod3.z.string().describe("State parameter for CSRF protection")
|
219
|
+
var AuthUrlResponseSchema = import_zod4.z.object({
|
220
|
+
url: import_zod4.z.string().describe("Authentication URL to redirect the user to"),
|
221
|
+
state: import_zod4.z.string().describe("State parameter for CSRF protection"),
|
222
|
+
platform: PlatformSchema
|
223
|
+
}).describe("Auth URL response");
|
224
|
+
var AuthCallbackQuerySchema = import_zod4.z.object({
|
225
|
+
code: import_zod4.z.string().describe("Authorization code from OAuth provider"),
|
226
|
+
state: import_zod4.z.string().describe("State parameter for CSRF protection")
|
435
227
|
}).describe("Auth callback query");
|
436
|
-
var AuthCallbackResponseSchema =
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
).describe("
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
tokenStatus: import_zod3.z.object({
|
450
|
-
valid: import_zod3.z.boolean().describe("Whether the token is valid"),
|
451
|
-
expired: import_zod3.z.boolean().describe("Whether the token is expired"),
|
452
|
-
expiresAt: import_zod3.z.string().optional().describe("When the token expires")
|
453
|
-
})
|
454
|
-
})
|
455
|
-
).describe("Auth status response");
|
456
|
-
var AuthRevokeResponseSchema = EnhancedResponseSchema(
|
457
|
-
import_zod3.z.object({
|
458
|
-
success: import_zod3.z.boolean().describe("Whether the revocation was successful"),
|
459
|
-
platform: PlatformSchema,
|
460
|
-
userId: import_zod3.z.string().describe("User ID")
|
228
|
+
var AuthCallbackResponseSchema = import_zod4.z.object({
|
229
|
+
platform: PlatformSchema,
|
230
|
+
userId: import_zod4.z.string().describe("User ID"),
|
231
|
+
redirectUrl: import_zod4.z.string().optional().describe("URL to redirect the user to after authentication")
|
232
|
+
}).describe("Auth callback response");
|
233
|
+
var AuthStatusResponseSchema = import_zod4.z.object({
|
234
|
+
platform: PlatformSchema,
|
235
|
+
userId: import_zod4.z.string().describe("User ID"),
|
236
|
+
authenticated: import_zod4.z.boolean().describe("Whether the user is authenticated"),
|
237
|
+
tokenStatus: import_zod4.z.object({
|
238
|
+
valid: import_zod4.z.boolean().describe("Whether the token is valid"),
|
239
|
+
expired: import_zod4.z.boolean().describe("Whether the token is expired"),
|
240
|
+
expiresAt: import_zod4.z.string().optional().describe("When the token expires")
|
461
241
|
})
|
462
|
-
).describe("Auth
|
463
|
-
var
|
242
|
+
}).describe("Auth status response");
|
243
|
+
var AuthTokenRequestSchema = import_zod4.z.object({
|
244
|
+
userId: import_zod4.z.string().describe("User ID on the platform")
|
245
|
+
}).describe("Auth token request");
|
246
|
+
var AuthRevokeResponseSchema = import_zod4.z.object({
|
247
|
+
platform: PlatformSchema,
|
248
|
+
userId: import_zod4.z.string().describe("User ID")
|
249
|
+
}).describe("Auth revoke response");
|
250
|
+
var ConnectedAccountSchema = import_zod4.z.object({
|
464
251
|
platform: PlatformSchema,
|
465
|
-
userId:
|
466
|
-
username:
|
467
|
-
profileUrl:
|
468
|
-
connectedAt:
|
252
|
+
userId: import_zod4.z.string().describe("User ID on the platform"),
|
253
|
+
username: import_zod4.z.string().optional().describe("Username on the platform (if available)"),
|
254
|
+
profileUrl: import_zod4.z.string().optional().describe("URL to the user profile"),
|
255
|
+
connectedAt: import_zod4.z.string().optional().describe("When the account was connected")
|
469
256
|
}).describe("Connected account");
|
470
|
-
var ConnectedAccountsResponseSchema =
|
471
|
-
|
472
|
-
)
|
473
|
-
var NearAuthorizationRequestSchema =
|
257
|
+
var ConnectedAccountsResponseSchema = import_zod4.z.array(ConnectedAccountSchema).describe(
|
258
|
+
"Connected accounts response"
|
259
|
+
);
|
260
|
+
var NearAuthorizationRequestSchema = import_zod4.z.object({
|
474
261
|
// No additional parameters needed, as the NEAR account ID is extracted from the signature
|
475
262
|
}).describe("NEAR authorization request");
|
476
|
-
var NearAuthorizationResponseSchema =
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
).describe("
|
483
|
-
|
484
|
-
|
485
|
-
nearAccount: import_zod3.z.string().describe("NEAR account ID"),
|
486
|
-
authorized: import_zod3.z.boolean().describe("Whether the account is authorized"),
|
487
|
-
authorizedAt: import_zod3.z.string().optional().describe("When the account was authorized")
|
488
|
-
})
|
489
|
-
).describe("NEAR authorization status response");
|
263
|
+
var NearAuthorizationResponseSchema = import_zod4.z.object({
|
264
|
+
nearAccount: import_zod4.z.string().describe("NEAR account ID"),
|
265
|
+
authorized: import_zod4.z.boolean().describe("Whether the account is authorized")
|
266
|
+
}).describe("NEAR authorization response");
|
267
|
+
var NearAuthorizationStatusResponseSchema = import_zod4.z.object({
|
268
|
+
nearAccount: import_zod4.z.string().describe("NEAR account ID"),
|
269
|
+
authorized: import_zod4.z.boolean().describe("Whether the account is authorized"),
|
270
|
+
authorizedAt: import_zod4.z.string().optional().describe("When the account was authorized")
|
271
|
+
}).describe("NEAR authorization status response");
|
490
272
|
|
491
273
|
// src/post.ts
|
492
|
-
var
|
493
|
-
var MediaContentSchema =
|
494
|
-
data:
|
495
|
-
mimeType:
|
496
|
-
altText:
|
274
|
+
var import_zod5 = require("zod");
|
275
|
+
var MediaContentSchema = import_zod5.z.object({
|
276
|
+
data: import_zod5.z.union([import_zod5.z.string(), import_zod5.z.instanceof(Blob)]).describe("Media data as string or Blob"),
|
277
|
+
mimeType: import_zod5.z.string().optional().describe("Media MIME type"),
|
278
|
+
altText: import_zod5.z.string().optional().describe("Alt text for the media")
|
497
279
|
}).describe("Media content object");
|
498
|
-
var MediaSchema =
|
499
|
-
id:
|
500
|
-
type:
|
501
|
-
url:
|
502
|
-
altText:
|
280
|
+
var MediaSchema = import_zod5.z.object({
|
281
|
+
id: import_zod5.z.string().describe("Media ID"),
|
282
|
+
type: import_zod5.z.enum(["image", "video", "gif"]).describe("Media type"),
|
283
|
+
url: import_zod5.z.string().optional().describe("Media URL"),
|
284
|
+
altText: import_zod5.z.string().optional().describe("Alt text for the media")
|
503
285
|
}).describe("Media object");
|
504
|
-
var PostMetricsSchema =
|
505
|
-
retweets:
|
506
|
-
quotes:
|
507
|
-
likes:
|
508
|
-
replies:
|
286
|
+
var PostMetricsSchema = import_zod5.z.object({
|
287
|
+
retweets: import_zod5.z.number().describe("Number of retweets"),
|
288
|
+
quotes: import_zod5.z.number().describe("Number of quotes"),
|
289
|
+
likes: import_zod5.z.number().describe("Number of likes"),
|
290
|
+
replies: import_zod5.z.number().describe("Number of replies")
|
509
291
|
}).describe("Post metrics");
|
510
|
-
var PostSchema =
|
511
|
-
id:
|
512
|
-
text:
|
513
|
-
createdAt:
|
514
|
-
authorId:
|
515
|
-
media:
|
292
|
+
var PostSchema = import_zod5.z.object({
|
293
|
+
id: import_zod5.z.string().describe("Post ID"),
|
294
|
+
text: import_zod5.z.string().describe("Post text content"),
|
295
|
+
createdAt: import_zod5.z.string().describe("Post creation date"),
|
296
|
+
authorId: import_zod5.z.string().describe("Author ID"),
|
297
|
+
media: import_zod5.z.array(MediaSchema).optional().describe("Media attached to the post"),
|
516
298
|
metrics: PostMetricsSchema.optional().describe("Post metrics"),
|
517
|
-
inReplyToId:
|
518
|
-
quotedPostId:
|
299
|
+
inReplyToId: import_zod5.z.string().optional().describe("ID of the post this is a reply to"),
|
300
|
+
quotedPostId: import_zod5.z.string().optional().describe("ID of the post this is quoting")
|
519
301
|
}).describe("Post object");
|
520
|
-
var PostContentSchema =
|
521
|
-
text:
|
522
|
-
media:
|
302
|
+
var PostContentSchema = import_zod5.z.object({
|
303
|
+
text: import_zod5.z.string().optional().describe("Text content for the post"),
|
304
|
+
media: import_zod5.z.array(MediaContentSchema).optional().describe("Media attachments for the post")
|
523
305
|
}).describe("Post content");
|
524
|
-
var PostResultSchema =
|
525
|
-
id:
|
526
|
-
text:
|
527
|
-
createdAt:
|
528
|
-
mediaIds:
|
529
|
-
threadIds:
|
530
|
-
quotedPostId:
|
531
|
-
inReplyToId:
|
532
|
-
success:
|
533
|
-
}).catchall(
|
534
|
-
var DeleteResultSchema =
|
535
|
-
success:
|
536
|
-
id:
|
306
|
+
var PostResultSchema = import_zod5.z.object({
|
307
|
+
id: import_zod5.z.string().describe("Post ID"),
|
308
|
+
text: import_zod5.z.string().optional().describe("Post text content"),
|
309
|
+
createdAt: import_zod5.z.string().describe("Post creation date"),
|
310
|
+
mediaIds: import_zod5.z.array(import_zod5.z.string()).optional().describe("Media IDs attached to the post"),
|
311
|
+
threadIds: import_zod5.z.array(import_zod5.z.string()).optional().describe("Thread IDs for threaded posts"),
|
312
|
+
quotedPostId: import_zod5.z.string().optional().describe("ID of the post this is quoting"),
|
313
|
+
inReplyToId: import_zod5.z.string().optional().describe("ID of the post this is a reply to"),
|
314
|
+
success: import_zod5.z.boolean().optional().describe("Whether the operation was successful")
|
315
|
+
}).catchall(import_zod5.z.any()).describe("Post result");
|
316
|
+
var DeleteResultSchema = import_zod5.z.object({
|
317
|
+
success: import_zod5.z.boolean().describe("Whether the deletion was successful"),
|
318
|
+
id: import_zod5.z.string().describe("ID of the deleted post")
|
537
319
|
}).describe("Delete result");
|
538
|
-
var LikeResultSchema =
|
539
|
-
success:
|
540
|
-
id:
|
320
|
+
var LikeResultSchema = import_zod5.z.object({
|
321
|
+
success: import_zod5.z.boolean().describe("Whether the like was successful"),
|
322
|
+
id: import_zod5.z.string().describe("ID of the liked post")
|
541
323
|
}).describe("Like result");
|
542
|
-
var PostSuccessDetailSchema =
|
324
|
+
var PostSuccessDetailSchema = import_zod5.z.object({
|
543
325
|
platform: PlatformSchema,
|
544
|
-
userId:
|
545
|
-
status:
|
546
|
-
postId:
|
547
|
-
postUrl:
|
548
|
-
}).catchall(
|
549
|
-
var TargetSchema =
|
326
|
+
userId: import_zod5.z.string().describe("User ID"),
|
327
|
+
status: import_zod5.z.literal("success"),
|
328
|
+
postId: import_zod5.z.string().optional().describe("Post ID"),
|
329
|
+
postUrl: import_zod5.z.string().optional().describe("URL to the post")
|
330
|
+
}).catchall(import_zod5.z.any()).describe("Post success detail");
|
331
|
+
var TargetSchema = import_zod5.z.object({
|
550
332
|
platform: PlatformSchema.describe('The platform to post to (e.g., "twitter")'),
|
551
|
-
userId:
|
333
|
+
userId: import_zod5.z.string().describe("User ID on the platform")
|
552
334
|
}).describe("Target for posting operations");
|
553
|
-
var CreatePostRequestSchema =
|
554
|
-
targets:
|
555
|
-
content:
|
335
|
+
var CreatePostRequestSchema = import_zod5.z.object({
|
336
|
+
targets: import_zod5.z.array(TargetSchema).describe("Array of targets to post to (can be a single target)"),
|
337
|
+
content: import_zod5.z.array(PostContentSchema).describe(
|
556
338
|
"The content of the post, always an array of PostContent objects, even for a single post"
|
557
339
|
)
|
558
340
|
}).describe("Create post request");
|
559
|
-
var RepostRequestSchema =
|
560
|
-
targets:
|
341
|
+
var RepostRequestSchema = import_zod5.z.object({
|
342
|
+
targets: import_zod5.z.array(TargetSchema).describe("Array of targets to post to"),
|
561
343
|
platform: PlatformSchema.describe("Platform of the post being reposted"),
|
562
|
-
postId:
|
344
|
+
postId: import_zod5.z.string().describe("ID of the post to repost")
|
563
345
|
}).describe("Repost request");
|
564
|
-
var QuotePostRequestSchema =
|
565
|
-
targets:
|
346
|
+
var QuotePostRequestSchema = import_zod5.z.object({
|
347
|
+
targets: import_zod5.z.array(TargetSchema).describe(
|
566
348
|
"Array of targets to post to (must be on the same platform as the post being quoted)"
|
567
349
|
),
|
568
350
|
platform: PlatformSchema.describe("Platform of the post being quoted"),
|
569
|
-
postId:
|
570
|
-
content:
|
351
|
+
postId: import_zod5.z.string().describe("ID of the post to quote"),
|
352
|
+
content: import_zod5.z.array(PostContentSchema).describe(
|
571
353
|
"Content for the quote post(s), always an array, even for a single post"
|
572
354
|
)
|
573
355
|
}).describe("Quote post request");
|
574
|
-
var ReplyToPostRequestSchema =
|
575
|
-
targets:
|
356
|
+
var ReplyToPostRequestSchema = import_zod5.z.object({
|
357
|
+
targets: import_zod5.z.array(TargetSchema).describe(
|
576
358
|
"Array of targets to post to (must be on the same platform as the post being replied to)"
|
577
359
|
),
|
578
360
|
platform: PlatformSchema.describe("Platform of the post being replied to"),
|
579
|
-
postId:
|
580
|
-
content:
|
361
|
+
postId: import_zod5.z.string().describe("ID of the post to reply to"),
|
362
|
+
content: import_zod5.z.array(PostContentSchema).describe(
|
581
363
|
"Content for the reply post(s), always an array, even for a single post"
|
582
364
|
)
|
583
365
|
}).describe("Reply to post request");
|
584
|
-
var PostToDeleteSchema =
|
366
|
+
var PostToDeleteSchema = import_zod5.z.object({
|
585
367
|
platform: PlatformSchema.describe("Platform of the post to delete"),
|
586
|
-
userId:
|
587
|
-
postId:
|
368
|
+
userId: import_zod5.z.string().describe("User ID on the platform"),
|
369
|
+
postId: import_zod5.z.string().describe("ID of the post to delete")
|
588
370
|
}).describe("Post to delete");
|
589
|
-
var DeletePostRequestSchema =
|
590
|
-
targets:
|
591
|
-
posts:
|
371
|
+
var DeletePostRequestSchema = import_zod5.z.object({
|
372
|
+
targets: import_zod5.z.array(TargetSchema).describe("Array of targets to delete posts"),
|
373
|
+
posts: import_zod5.z.array(PostToDeleteSchema).describe("Array of posts to delete")
|
592
374
|
}).describe("Delete post request");
|
593
|
-
var LikePostRequestSchema =
|
594
|
-
targets:
|
375
|
+
var LikePostRequestSchema = import_zod5.z.object({
|
376
|
+
targets: import_zod5.z.array(TargetSchema).describe(
|
595
377
|
"Array of targets to like the post (must be on the same platform as the post being liked)"
|
596
378
|
),
|
597
379
|
platform: PlatformSchema.describe("Platform of the post being liked"),
|
598
|
-
postId:
|
380
|
+
postId: import_zod5.z.string().describe("ID of the post to like")
|
599
381
|
}).describe("Like post request");
|
600
|
-
var UnlikePostRequestSchema =
|
601
|
-
targets:
|
382
|
+
var UnlikePostRequestSchema = import_zod5.z.object({
|
383
|
+
targets: import_zod5.z.array(TargetSchema).describe(
|
602
384
|
"Array of targets to unlike the post (must be on the same platform as the post being unliked)"
|
603
385
|
),
|
604
386
|
platform: PlatformSchema.describe("Platform of the post being unliked"),
|
605
|
-
postId:
|
387
|
+
postId: import_zod5.z.string().describe("ID of the post to unlike")
|
606
388
|
}).describe("Unlike post request");
|
607
|
-
var PostResponseSchema =
|
608
|
-
|
609
|
-
)
|
610
|
-
var
|
611
|
-
"Create post response
|
389
|
+
var PostResponseSchema = import_zod5.z.union([PostSchema, import_zod5.z.array(PostSchema)]).describe(
|
390
|
+
"Post response"
|
391
|
+
);
|
392
|
+
var CreatePostResponseSchema = PostResponseSchema.describe(
|
393
|
+
"Create post response"
|
612
394
|
);
|
613
395
|
var RepostResponseSchema = PostResponseSchema.describe("Repost response");
|
614
396
|
var QuotePostResponseSchema = PostResponseSchema.describe("Quote post response");
|
615
397
|
var ReplyToPostResponseSchema = PostResponseSchema.describe("Reply to post response");
|
616
|
-
var DeletePostResponseSchema =
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
).describe("
|
622
|
-
var
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
).describe("
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
).describe("Unlike post response");
|
634
|
-
var PostMultiStatusResponseSchema = import_zod4.z.object({
|
635
|
-
success: import_zod4.z.boolean().describe("Whether the operation was partially or fully successful"),
|
636
|
-
data: import_zod4.z.object({
|
637
|
-
summary: import_zod4.z.object({
|
638
|
-
total: import_zod4.z.number().describe("Total number of operations"),
|
639
|
-
succeeded: import_zod4.z.number().describe("Number of successful operations"),
|
640
|
-
failed: import_zod4.z.number().describe("Number of failed operations")
|
641
|
-
}),
|
642
|
-
results: import_zod4.z.array(PostSuccessDetailSchema).describe("Successful operations"),
|
643
|
-
errors: import_zod4.z.array(ErrorDetailSchema).describe("Failed operations")
|
644
|
-
})
|
398
|
+
var DeletePostResponseSchema = import_zod5.z.object({
|
399
|
+
id: import_zod5.z.string().describe("ID of the deleted post")
|
400
|
+
}).describe("Delete post response");
|
401
|
+
var LikePostResponseSchema = import_zod5.z.object({
|
402
|
+
id: import_zod5.z.string().describe("ID of the liked post")
|
403
|
+
}).describe("Like post response");
|
404
|
+
var UnlikePostResponseSchema = import_zod5.z.object({
|
405
|
+
id: import_zod5.z.string().describe("ID of the unliked post")
|
406
|
+
}).describe("Unlike post response");
|
407
|
+
var PostMultiStatusResponseSchema = import_zod5.z.object({
|
408
|
+
summary: import_zod5.z.object({
|
409
|
+
total: import_zod5.z.number().describe("Total number of operations"),
|
410
|
+
succeeded: import_zod5.z.number().describe("Number of successful operations"),
|
411
|
+
failed: import_zod5.z.number().describe("Number of failed operations")
|
412
|
+
}),
|
413
|
+
results: import_zod5.z.array(PostSuccessDetailSchema).describe("Successful operations"),
|
414
|
+
errors: import_zod5.z.array(ErrorDetailSchema).describe("Failed operations")
|
645
415
|
}).describe("Multi-status response for post operations");
|
646
|
-
var CreatePostTargetResultSchema = import_zod4.z.object({
|
647
|
-
platform: PlatformSchema.describe("The platform the post was created on"),
|
648
|
-
userId: import_zod4.z.string().describe("The user ID on the platform"),
|
649
|
-
result: import_zod4.z.array(import_zod4.z.any()).describe("The result of the post creation")
|
650
|
-
}).describe("Create post target result");
|
651
|
-
var CreatePostTargetErrorSchema = import_zod4.z.object({
|
652
|
-
platform: PlatformSchema.optional().describe(
|
653
|
-
"The platform where the error occurred (if applicable)"
|
654
|
-
),
|
655
|
-
userId: import_zod4.z.string().optional().describe("The user ID where the error occurred (if applicable)"),
|
656
|
-
error: import_zod4.z.string().describe("The error message")
|
657
|
-
}).describe("Create post target error");
|
658
|
-
var CreatePostResponseSchema = EnhancedResponseSchema(
|
659
|
-
import_zod4.z.object({
|
660
|
-
results: import_zod4.z.array(CreatePostTargetResultSchema).describe("Array of successful post results"),
|
661
|
-
errors: import_zod4.z.array(CreatePostTargetErrorSchema).optional().describe(
|
662
|
-
"Array of errors that occurred (if any)"
|
663
|
-
)
|
664
|
-
})
|
665
|
-
).describe("Create post response");
|
666
416
|
|
667
417
|
// src/rate-limit.ts
|
668
|
-
var
|
669
|
-
var RateLimitEndpointParamSchema =
|
670
|
-
endpoint:
|
418
|
+
var import_zod6 = require("zod");
|
419
|
+
var RateLimitEndpointParamSchema = import_zod6.z.object({
|
420
|
+
endpoint: import_zod6.z.string().optional().describe(
|
671
421
|
"Specific endpoint to get rate limit information for (optional)"
|
672
422
|
)
|
673
423
|
}).describe("Rate limit endpoint parameter");
|
674
|
-
var RateLimitEndpointSchema =
|
675
|
-
endpoint:
|
676
|
-
method:
|
677
|
-
limit:
|
678
|
-
remaining:
|
679
|
-
reset:
|
680
|
-
resetDate:
|
424
|
+
var RateLimitEndpointSchema = import_zod6.z.object({
|
425
|
+
endpoint: import_zod6.z.string().describe("API endpoint"),
|
426
|
+
method: import_zod6.z.enum(["GET", "POST", "PUT", "DELETE"]).describe("HTTP method"),
|
427
|
+
limit: import_zod6.z.number().describe("Rate limit"),
|
428
|
+
remaining: import_zod6.z.number().describe("Remaining requests"),
|
429
|
+
reset: import_zod6.z.number().describe("Reset timestamp (Unix timestamp in seconds)"),
|
430
|
+
resetDate: import_zod6.z.string().describe("Reset date (ISO string)")
|
681
431
|
}).describe("Rate limit endpoint");
|
682
|
-
var RateLimitStatusSchema =
|
683
|
-
endpoint:
|
684
|
-
limit:
|
685
|
-
remaining:
|
686
|
-
reset:
|
687
|
-
resetSeconds:
|
432
|
+
var RateLimitStatusSchema = import_zod6.z.object({
|
433
|
+
endpoint: import_zod6.z.string().describe("API endpoint or action"),
|
434
|
+
limit: import_zod6.z.number().describe("Maximum number of requests allowed in the time window"),
|
435
|
+
remaining: import_zod6.z.number().describe("Number of requests remaining in the current time window"),
|
436
|
+
reset: import_zod6.z.string().datetime().describe("Timestamp when the rate limit will reset"),
|
437
|
+
resetSeconds: import_zod6.z.number().describe("Seconds until the rate limit will reset")
|
688
438
|
}).describe("Rate limit status");
|
689
|
-
var PlatformRateLimitSchema =
|
439
|
+
var PlatformRateLimitSchema = import_zod6.z.object({
|
690
440
|
platform: PlatformSchema,
|
691
|
-
endpoints:
|
441
|
+
endpoints: import_zod6.z.record(import_zod6.z.string(), RateLimitStatusSchema).describe(
|
692
442
|
"Rate limit status for each endpoint"
|
693
443
|
)
|
694
444
|
}).describe("Platform-specific rate limit");
|
695
|
-
var UsageRateLimitSchema =
|
696
|
-
endpoint:
|
697
|
-
limit:
|
698
|
-
remaining:
|
699
|
-
reset:
|
700
|
-
resetSeconds:
|
701
|
-
timeWindow:
|
445
|
+
var UsageRateLimitSchema = import_zod6.z.object({
|
446
|
+
endpoint: import_zod6.z.string().describe("API endpoint or action"),
|
447
|
+
limit: import_zod6.z.number().describe("Maximum number of requests allowed in the time window"),
|
448
|
+
remaining: import_zod6.z.number().describe("Number of requests remaining in the current time window"),
|
449
|
+
reset: import_zod6.z.string().datetime().describe("Timestamp when the rate limit will reset"),
|
450
|
+
resetSeconds: import_zod6.z.number().describe("Seconds until the rate limit will reset"),
|
451
|
+
timeWindow: import_zod6.z.string().describe("Time window for the rate limit")
|
702
452
|
}).describe("Usage rate limit");
|
703
|
-
var RateLimitStatusResponseSchema =
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
).describe("
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
).describe("All rate limits response");
|
740
|
-
var RateLimitResponseSchema = import_zod5.z.object({
|
741
|
-
platformLimits: import_zod5.z.array(PlatformRateLimitSchema).describe("Platform-specific rate limits"),
|
742
|
-
usageLimits: import_zod5.z.record(import_zod5.z.string(), UsageRateLimitSchema).describe(
|
453
|
+
var RateLimitStatusResponseSchema = import_zod6.z.object({
|
454
|
+
platform: PlatformSchema,
|
455
|
+
userId: import_zod6.z.string().optional().describe("User ID"),
|
456
|
+
endpoints: import_zod6.z.array(RateLimitEndpointSchema).describe("Rate limits for specific endpoints"),
|
457
|
+
app: import_zod6.z.object({
|
458
|
+
limit: import_zod6.z.number().describe("App-wide rate limit"),
|
459
|
+
remaining: import_zod6.z.number().describe("Remaining requests"),
|
460
|
+
reset: import_zod6.z.number().describe("Reset timestamp (Unix timestamp in seconds)"),
|
461
|
+
resetDate: import_zod6.z.string().describe("Reset date (ISO string)")
|
462
|
+
}).optional().describe("App-wide rate limits")
|
463
|
+
}).describe("Rate limit status response");
|
464
|
+
var AllRateLimitsResponseSchema = import_zod6.z.object({
|
465
|
+
platforms: import_zod6.z.record(
|
466
|
+
PlatformSchema,
|
467
|
+
import_zod6.z.object({
|
468
|
+
users: import_zod6.z.record(
|
469
|
+
import_zod6.z.string(),
|
470
|
+
import_zod6.z.object({
|
471
|
+
endpoints: import_zod6.z.array(RateLimitEndpointSchema).describe(
|
472
|
+
"Rate limits for specific endpoints"
|
473
|
+
),
|
474
|
+
lastUpdated: import_zod6.z.string().describe("Last updated date (ISO string)")
|
475
|
+
})
|
476
|
+
).describe("User-specific rate limits"),
|
477
|
+
app: import_zod6.z.object({
|
478
|
+
limit: import_zod6.z.number().describe("App-wide rate limit"),
|
479
|
+
remaining: import_zod6.z.number().describe("Remaining requests"),
|
480
|
+
reset: import_zod6.z.number().describe("Reset timestamp (Unix timestamp in seconds)"),
|
481
|
+
resetDate: import_zod6.z.string().describe("Reset date (ISO string)")
|
482
|
+
}).optional().describe("App-wide rate limits")
|
483
|
+
})
|
484
|
+
).describe("Rate limits by platform")
|
485
|
+
}).describe("All rate limits response");
|
486
|
+
var RateLimitResponseSchema = import_zod6.z.object({
|
487
|
+
platformLimits: import_zod6.z.array(PlatformRateLimitSchema).describe("Platform-specific rate limits"),
|
488
|
+
usageLimits: import_zod6.z.record(import_zod6.z.string(), UsageRateLimitSchema).describe(
|
743
489
|
"Usage-based rate limits for the NEAR account"
|
744
490
|
),
|
745
|
-
signerId:
|
491
|
+
signerId: import_zod6.z.string().describe("NEAR account ID")
|
746
492
|
}).describe("Rate limit response");
|
747
|
-
var EndpointRateLimitResponseSchema =
|
748
|
-
platformLimits:
|
749
|
-
|
493
|
+
var EndpointRateLimitResponseSchema = import_zod6.z.object({
|
494
|
+
platformLimits: import_zod6.z.array(
|
495
|
+
import_zod6.z.object({
|
750
496
|
platform: PlatformSchema,
|
751
497
|
status: RateLimitStatusSchema.describe("Rate limit status for the endpoint")
|
752
498
|
})
|
753
499
|
).describe("Platform-specific rate limits for the endpoint"),
|
754
500
|
usageLimit: UsageRateLimitSchema.describe("Usage-based rate limit for the NEAR account"),
|
755
|
-
endpoint:
|
756
|
-
signerId:
|
501
|
+
endpoint: import_zod6.z.string().describe("API endpoint or action"),
|
502
|
+
signerId: import_zod6.z.string().describe("NEAR account ID")
|
757
503
|
}).describe("Endpoint rate limit response");
|
758
504
|
|
759
505
|
// src/activity.ts
|
760
|
-
var
|
506
|
+
var import_zod7 = require("zod");
|
761
507
|
var TimePeriod = /* @__PURE__ */ ((TimePeriod2) => {
|
762
508
|
TimePeriod2["ALL"] = "all";
|
763
509
|
TimePeriod2["YEARLY"] = "year";
|
@@ -766,178 +512,150 @@ var TimePeriod = /* @__PURE__ */ ((TimePeriod2) => {
|
|
766
512
|
TimePeriod2["DAILY"] = "day";
|
767
513
|
return TimePeriod2;
|
768
514
|
})(TimePeriod || {});
|
769
|
-
var ActivityLeaderboardQuerySchema =
|
770
|
-
timeframe:
|
515
|
+
var ActivityLeaderboardQuerySchema = import_zod7.z.object({
|
516
|
+
timeframe: import_zod7.z.nativeEnum(TimePeriod).optional().describe(
|
771
517
|
"Timeframe for the leaderboard"
|
772
518
|
),
|
773
|
-
limit:
|
774
|
-
offset:
|
519
|
+
limit: import_zod7.z.string().optional().transform((val) => val ? parseInt(val, 10) : void 0).pipe(import_zod7.z.number().min(1).max(100).optional()).describe("Maximum number of results to return (1-100)"),
|
520
|
+
offset: import_zod7.z.string().optional().transform((val) => val ? parseInt(val, 10) : void 0).pipe(import_zod7.z.number().min(0).optional()).describe("Offset for pagination")
|
775
521
|
}).describe("Activity leaderboard query");
|
776
|
-
var AccountActivityEntrySchema =
|
777
|
-
signerId:
|
778
|
-
totalPosts:
|
779
|
-
totalLikes:
|
780
|
-
totalReposts:
|
781
|
-
totalReplies:
|
782
|
-
totalQuotes:
|
783
|
-
totalScore:
|
784
|
-
rank:
|
785
|
-
lastActive:
|
522
|
+
var AccountActivityEntrySchema = import_zod7.z.object({
|
523
|
+
signerId: import_zod7.z.string().describe("NEAR account ID"),
|
524
|
+
totalPosts: import_zod7.z.number().describe("Total number of posts"),
|
525
|
+
totalLikes: import_zod7.z.number().describe("Total number of likes"),
|
526
|
+
totalReposts: import_zod7.z.number().describe("Total number of reposts"),
|
527
|
+
totalReplies: import_zod7.z.number().describe("Total number of replies"),
|
528
|
+
totalQuotes: import_zod7.z.number().describe("Total number of quote posts"),
|
529
|
+
totalScore: import_zod7.z.number().describe("Total activity score"),
|
530
|
+
rank: import_zod7.z.number().describe("Rank on the leaderboard"),
|
531
|
+
lastActive: import_zod7.z.string().datetime().describe("Timestamp of last activity")
|
786
532
|
}).describe("Account activity entry");
|
787
|
-
var ActivityLeaderboardResponseSchema =
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
})
|
796
|
-
).describe("Activity leaderboard response");
|
797
|
-
var AccountActivityParamsSchema = import_zod6.z.object({
|
798
|
-
signerId: import_zod6.z.string().describe("NEAR account ID")
|
533
|
+
var ActivityLeaderboardResponseSchema = import_zod7.z.object({
|
534
|
+
timeframe: import_zod7.z.nativeEnum(TimePeriod).describe("Timeframe for the leaderboard"),
|
535
|
+
entries: import_zod7.z.array(AccountActivityEntrySchema).describe("Leaderboard entries"),
|
536
|
+
generatedAt: import_zod7.z.string().datetime().describe("Timestamp when the leaderboard was generated"),
|
537
|
+
platform: PlatformSchema.optional().describe("Platform filter (if applied)")
|
538
|
+
});
|
539
|
+
var AccountActivityParamsSchema = import_zod7.z.object({
|
540
|
+
signerId: import_zod7.z.string().describe("NEAR account ID")
|
799
541
|
}).describe("Account activity params");
|
800
|
-
var AccountActivityQuerySchema =
|
801
|
-
timeframe:
|
542
|
+
var AccountActivityQuerySchema = import_zod7.z.object({
|
543
|
+
timeframe: import_zod7.z.nativeEnum(TimePeriod).optional().describe(
|
802
544
|
"Timeframe for the activity"
|
803
545
|
)
|
804
546
|
}).describe("Account activity query");
|
805
|
-
var PlatformActivitySchema =
|
547
|
+
var PlatformActivitySchema = import_zod7.z.object({
|
806
548
|
platform: PlatformSchema,
|
807
|
-
posts:
|
808
|
-
likes:
|
809
|
-
reposts:
|
810
|
-
replies:
|
811
|
-
quotes:
|
812
|
-
score:
|
813
|
-
lastActive:
|
549
|
+
posts: import_zod7.z.number().describe("Number of posts on this platform"),
|
550
|
+
likes: import_zod7.z.number().describe("Number of likes on this platform"),
|
551
|
+
reposts: import_zod7.z.number().describe("Number of reposts on this platform"),
|
552
|
+
replies: import_zod7.z.number().describe("Number of replies on this platform"),
|
553
|
+
quotes: import_zod7.z.number().describe("Number of quote posts on this platform"),
|
554
|
+
score: import_zod7.z.number().describe("Activity score on this platform"),
|
555
|
+
lastActive: import_zod7.z.string().datetime().describe("Timestamp of last activity on this platform")
|
814
556
|
}).describe("Platform activity");
|
815
|
-
var AccountActivityResponseSchema =
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
).describe("
|
830
|
-
var AccountPostsParamsSchema = import_zod6.z.object({
|
831
|
-
signerId: import_zod6.z.string().describe("NEAR account ID")
|
557
|
+
var AccountActivityResponseSchema = import_zod7.z.object({
|
558
|
+
signerId: import_zod7.z.string().describe("NEAR account ID"),
|
559
|
+
timeframe: import_zod7.z.nativeEnum(TimePeriod).describe("Timeframe for the activity"),
|
560
|
+
totalPosts: import_zod7.z.number().describe("Total number of posts across all platforms"),
|
561
|
+
totalLikes: import_zod7.z.number().describe("Total number of likes across all platforms"),
|
562
|
+
totalReposts: import_zod7.z.number().describe("Total number of reposts across all platforms"),
|
563
|
+
totalReplies: import_zod7.z.number().describe("Total number of replies across all platforms"),
|
564
|
+
totalQuotes: import_zod7.z.number().describe("Total number of quote posts across all platforms"),
|
565
|
+
totalScore: import_zod7.z.number().describe("Total activity score across all platforms"),
|
566
|
+
rank: import_zod7.z.number().describe("Rank on the leaderboard"),
|
567
|
+
lastActive: import_zod7.z.string().datetime().describe("Timestamp of last activity across all platforms"),
|
568
|
+
platforms: import_zod7.z.array(PlatformActivitySchema).describe("Activity breakdown by platform")
|
569
|
+
});
|
570
|
+
var AccountPostsParamsSchema = import_zod7.z.object({
|
571
|
+
signerId: import_zod7.z.string().describe("NEAR account ID")
|
832
572
|
}).describe("Account posts params");
|
833
|
-
var AccountPostsQuerySchema =
|
834
|
-
platform:
|
835
|
-
limit:
|
836
|
-
offset:
|
837
|
-
type:
|
573
|
+
var AccountPostsQuerySchema = import_zod7.z.object({
|
574
|
+
platform: import_zod7.z.string().optional().describe("Filter by platform (optional)"),
|
575
|
+
limit: import_zod7.z.string().optional().transform((val) => val ? parseInt(val, 10) : void 0).pipe(import_zod7.z.number().min(1).max(100).optional()).describe("Maximum number of results to return (1-100)"),
|
576
|
+
offset: import_zod7.z.string().optional().transform((val) => val ? parseInt(val, 10) : void 0).pipe(import_zod7.z.number().min(0).optional()).describe("Offset for pagination"),
|
577
|
+
type: import_zod7.z.enum(["post", "repost", "reply", "quote", "like", "all"]).optional().describe(
|
838
578
|
"Filter by post type (optional)"
|
839
579
|
)
|
840
580
|
}).describe("Account posts query");
|
841
|
-
var AccountPostSchema =
|
842
|
-
id:
|
581
|
+
var AccountPostSchema = import_zod7.z.object({
|
582
|
+
id: import_zod7.z.string().describe("Post ID"),
|
843
583
|
platform: PlatformSchema,
|
844
|
-
type:
|
845
|
-
content:
|
846
|
-
url:
|
847
|
-
createdAt:
|
848
|
-
metrics:
|
849
|
-
likes:
|
850
|
-
reposts:
|
851
|
-
replies:
|
852
|
-
quotes:
|
584
|
+
type: import_zod7.z.enum(["post", "repost", "reply", "quote", "like"]).describe("Type of post"),
|
585
|
+
content: import_zod7.z.string().optional().describe("Post content (if available)"),
|
586
|
+
url: import_zod7.z.string().url().optional().describe("URL to the post on the platform (if available)"),
|
587
|
+
createdAt: import_zod7.z.string().datetime().describe("Timestamp when the post was created"),
|
588
|
+
metrics: import_zod7.z.object({
|
589
|
+
likes: import_zod7.z.number().optional().describe("Number of likes (if available)"),
|
590
|
+
reposts: import_zod7.z.number().optional().describe("Number of reposts (if available)"),
|
591
|
+
replies: import_zod7.z.number().optional().describe("Number of replies (if available)"),
|
592
|
+
quotes: import_zod7.z.number().optional().describe("Number of quotes (if available)")
|
853
593
|
}).optional().describe("Post metrics (if available)"),
|
854
|
-
inReplyToId:
|
855
|
-
quotedPostId:
|
594
|
+
inReplyToId: import_zod7.z.string().optional().describe("ID of the post this is a reply to (if applicable)"),
|
595
|
+
quotedPostId: import_zod7.z.string().optional().describe("ID of the post this is quoting (if applicable)")
|
856
596
|
}).describe("Account post");
|
857
|
-
var AccountPostsResponseSchema =
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
type: import_zod6.z.enum(["post", "repost", "reply", "quote", "like", "all"]).optional().describe(
|
866
|
-
"Post type filter (if applied)"
|
867
|
-
)
|
868
|
-
})
|
869
|
-
).describe("Account posts response");
|
597
|
+
var AccountPostsResponseSchema = import_zod7.z.object({
|
598
|
+
signerId: import_zod7.z.string().describe("NEAR account ID"),
|
599
|
+
posts: import_zod7.z.array(AccountPostSchema).describe("List of posts"),
|
600
|
+
platform: import_zod7.z.string().optional().describe("Platform filter (if applied)"),
|
601
|
+
type: import_zod7.z.enum(["post", "repost", "reply", "quote", "like", "all"]).optional().describe(
|
602
|
+
"Post type filter (if applied)"
|
603
|
+
)
|
604
|
+
});
|
870
605
|
|
871
606
|
// src/user-profile.ts
|
872
|
-
var
|
873
|
-
var UserProfileSchema =
|
874
|
-
userId:
|
875
|
-
username:
|
876
|
-
url:
|
877
|
-
profileImageUrl:
|
878
|
-
isPremium:
|
607
|
+
var import_zod8 = require("zod");
|
608
|
+
var UserProfileSchema = import_zod8.z.object({
|
609
|
+
userId: import_zod8.z.string().describe("User ID on the platform"),
|
610
|
+
username: import_zod8.z.string().describe("Username on the platform"),
|
611
|
+
url: import_zod8.z.string().url().optional().describe("URL to the user profile"),
|
612
|
+
profileImageUrl: import_zod8.z.string().describe("URL to the user profile image"),
|
613
|
+
isPremium: import_zod8.z.boolean().optional().describe("Whether the user has a premium account"),
|
879
614
|
platform: PlatformSchema.describe("The platform the user profile is from"),
|
880
|
-
lastUpdated:
|
615
|
+
lastUpdated: import_zod8.z.number().describe("Timestamp when the profile was last updated")
|
881
616
|
}).describe("User profile");
|
882
|
-
var
|
883
|
-
|
884
|
-
|
885
|
-
error: import_zod7.z.string().optional().describe("Error message (if unsuccessful)")
|
886
|
-
}).describe("Profile refresh result");
|
887
|
-
var ProfileRefreshResponseSchema = EnhancedResponseSchema(
|
888
|
-
ProfileRefreshResultSchema
|
889
|
-
).describe("Profile refresh response");
|
617
|
+
var ProfileRefreshResponseSchema = import_zod8.z.object({
|
618
|
+
profile: UserProfileSchema.optional().describe("The refreshed user profile (if successful)")
|
619
|
+
}).describe("Profile refresh response");
|
890
620
|
// Annotate the CommonJS export names for ESM import in node:
|
891
621
|
0 && (module.exports = {
|
892
622
|
AccountActivityEntrySchema,
|
893
623
|
AccountActivityParamsSchema,
|
894
624
|
AccountActivityQuerySchema,
|
895
|
-
AccountActivityResponseSchema,
|
896
625
|
AccountPostSchema,
|
897
626
|
AccountPostsParamsSchema,
|
898
627
|
AccountPostsQuerySchema,
|
899
|
-
AccountPostsResponseSchema,
|
900
628
|
ActivityLeaderboardQuerySchema,
|
901
|
-
ActivityLeaderboardResponseSchema,
|
902
629
|
AllRateLimitsResponseSchema,
|
903
|
-
ApiError,
|
904
630
|
ApiErrorCode,
|
905
|
-
|
631
|
+
ApiErrorCodeSchema,
|
906
632
|
AuthCallbackQuerySchema,
|
907
633
|
AuthCallbackResponseSchema,
|
908
634
|
AuthInitRequestSchema,
|
909
635
|
AuthRevokeResponseSchema,
|
910
636
|
AuthStatusResponseSchema,
|
637
|
+
AuthTokenRequestSchema,
|
911
638
|
AuthUrlResponseSchema,
|
912
|
-
BaseError,
|
913
639
|
ConnectedAccountSchema,
|
914
640
|
ConnectedAccountsResponseSchema,
|
915
641
|
CreatePostRequestSchema,
|
916
|
-
CreatePostResponseLegacySchema,
|
917
642
|
CreatePostResponseSchema,
|
918
|
-
CreatePostTargetErrorSchema,
|
919
|
-
CreatePostTargetResultSchema,
|
920
643
|
DeletePostRequestSchema,
|
921
644
|
DeletePostResponseSchema,
|
922
645
|
DeleteResultSchema,
|
923
646
|
EndpointRateLimitResponseSchema,
|
924
|
-
EnhancedErrorResponseSchema,
|
925
|
-
EnhancedResponseMetaSchema,
|
926
|
-
EnhancedResponseSchema,
|
927
647
|
ErrorDetailSchema,
|
928
|
-
ErrorResponseSchema,
|
929
648
|
LikePostRequestSchema,
|
930
649
|
LikePostResponseSchema,
|
931
650
|
LikeResultSchema,
|
932
651
|
MediaContentSchema,
|
933
652
|
MediaSchema,
|
934
|
-
|
653
|
+
MultiStatusDataSchema,
|
935
654
|
NearAuthorizationRequestSchema,
|
936
655
|
NearAuthorizationResponseSchema,
|
937
656
|
NearAuthorizationStatusResponseSchema,
|
938
657
|
Platform,
|
939
658
|
PlatformActivitySchema,
|
940
|
-
PlatformError,
|
941
659
|
PlatformParamSchema,
|
942
660
|
PlatformRateLimitSchema,
|
943
661
|
PlatformSchema,
|
@@ -950,7 +668,6 @@ var ProfileRefreshResponseSchema = EnhancedResponseSchema(
|
|
950
668
|
PostSuccessDetailSchema,
|
951
669
|
PostToDeleteSchema,
|
952
670
|
ProfileRefreshResponseSchema,
|
953
|
-
ProfileRefreshResultSchema,
|
954
671
|
QuotePostRequestSchema,
|
955
672
|
QuotePostResponseSchema,
|
956
673
|
RateLimitEndpointParamSchema,
|
@@ -962,6 +679,7 @@ var ProfileRefreshResponseSchema = EnhancedResponseSchema(
|
|
962
679
|
ReplyToPostResponseSchema,
|
963
680
|
RepostRequestSchema,
|
964
681
|
RepostResponseSchema,
|
682
|
+
ResponseMetaSchema,
|
965
683
|
SUPPORTED_PLATFORMS,
|
966
684
|
SuccessDetailSchema,
|
967
685
|
SupportedPlatformSchema,
|
@@ -971,12 +689,6 @@ var ProfileRefreshResponseSchema = EnhancedResponseSchema(
|
|
971
689
|
UnlikePostResponseSchema,
|
972
690
|
UsageRateLimitSchema,
|
973
691
|
UserProfileSchema,
|
974
|
-
|
975
|
-
createEnhancedApiResponse,
|
976
|
-
createEnhancedErrorResponse,
|
977
|
-
createErrorDetail,
|
978
|
-
createErrorResponse,
|
979
|
-
createMultiStatusResponse,
|
980
|
-
createSuccessDetail,
|
692
|
+
errorCodeToStatusCode,
|
981
693
|
isPlatformSupported
|
982
694
|
});
|