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