@crosspost/types 0.1.6 → 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 -684
- package/dist/index.d.cts +1469 -5908
- package/dist/index.d.ts +1469 -5908
- package/dist/index.js +374 -660
- 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 -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,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
|
-
CompositeApiError: () => CompositeApiError,
|
45
40
|
ConnectedAccountSchema: () => ConnectedAccountSchema,
|
46
41
|
ConnectedAccountsResponseSchema: () => ConnectedAccountsResponseSchema,
|
47
42
|
CreatePostRequestSchema: () => CreatePostRequestSchema,
|
48
|
-
CreatePostResponseLegacySchema: () => CreatePostResponseLegacySchema,
|
49
43
|
CreatePostResponseSchema: () => CreatePostResponseSchema,
|
50
|
-
CreatePostTargetErrorSchema: () => CreatePostTargetErrorSchema,
|
51
|
-
CreatePostTargetResultSchema: () => CreatePostTargetResultSchema,
|
52
44
|
DeletePostRequestSchema: () => DeletePostRequestSchema,
|
53
45
|
DeletePostResponseSchema: () => DeletePostResponseSchema,
|
54
46
|
DeleteResultSchema: () => DeleteResultSchema,
|
55
47
|
EndpointRateLimitResponseSchema: () => EndpointRateLimitResponseSchema,
|
56
|
-
EnhancedErrorResponseSchema: () => EnhancedErrorResponseSchema,
|
57
|
-
EnhancedResponseMetaSchema: () => EnhancedResponseMetaSchema,
|
58
|
-
EnhancedResponseSchema: () => EnhancedResponseSchema,
|
59
48
|
ErrorDetailSchema: () => ErrorDetailSchema,
|
60
|
-
ErrorResponseSchema: () => ErrorResponseSchema,
|
61
49
|
LikePostRequestSchema: () => LikePostRequestSchema,
|
62
50
|
LikePostResponseSchema: () => LikePostResponseSchema,
|
63
51
|
LikeResultSchema: () => LikeResultSchema,
|
64
52
|
MediaContentSchema: () => MediaContentSchema,
|
65
53
|
MediaSchema: () => MediaSchema,
|
66
|
-
|
54
|
+
MultiStatusDataSchema: () => MultiStatusDataSchema,
|
67
55
|
NearAuthorizationRequestSchema: () => NearAuthorizationRequestSchema,
|
68
56
|
NearAuthorizationResponseSchema: () => NearAuthorizationResponseSchema,
|
69
57
|
NearAuthorizationStatusResponseSchema: () => NearAuthorizationStatusResponseSchema,
|
70
58
|
Platform: () => Platform,
|
71
59
|
PlatformActivitySchema: () => PlatformActivitySchema,
|
72
|
-
PlatformError: () => PlatformError,
|
73
60
|
PlatformParamSchema: () => PlatformParamSchema,
|
74
61
|
PlatformRateLimitSchema: () => PlatformRateLimitSchema,
|
75
62
|
PlatformSchema: () => PlatformSchema,
|
@@ -82,7 +69,6 @@ __export(index_exports, {
|
|
82
69
|
PostSuccessDetailSchema: () => PostSuccessDetailSchema,
|
83
70
|
PostToDeleteSchema: () => PostToDeleteSchema,
|
84
71
|
ProfileRefreshResponseSchema: () => ProfileRefreshResponseSchema,
|
85
|
-
ProfileRefreshResultSchema: () => ProfileRefreshResultSchema,
|
86
72
|
QuotePostRequestSchema: () => QuotePostRequestSchema,
|
87
73
|
QuotePostResponseSchema: () => QuotePostResponseSchema,
|
88
74
|
RateLimitEndpointParamSchema: () => RateLimitEndpointParamSchema,
|
@@ -94,6 +80,7 @@ __export(index_exports, {
|
|
94
80
|
ReplyToPostResponseSchema: () => ReplyToPostResponseSchema,
|
95
81
|
RepostRequestSchema: () => RepostRequestSchema,
|
96
82
|
RepostResponseSchema: () => RepostResponseSchema,
|
83
|
+
ResponseMetaSchema: () => ResponseMetaSchema,
|
97
84
|
SUPPORTED_PLATFORMS: () => SUPPORTED_PLATFORMS,
|
98
85
|
SuccessDetailSchema: () => SuccessDetailSchema,
|
99
86
|
SupportedPlatformSchema: () => SupportedPlatformSchema,
|
@@ -103,13 +90,7 @@ __export(index_exports, {
|
|
103
90
|
UnlikePostResponseSchema: () => UnlikePostResponseSchema,
|
104
91
|
UsageRateLimitSchema: () => UsageRateLimitSchema,
|
105
92
|
UserProfileSchema: () => UserProfileSchema,
|
106
|
-
|
107
|
-
createEnhancedApiResponse: () => createEnhancedApiResponse,
|
108
|
-
createEnhancedErrorResponse: () => createEnhancedErrorResponse,
|
109
|
-
createErrorDetail: () => createErrorDetail,
|
110
|
-
createErrorResponse: () => createErrorResponse,
|
111
|
-
createMultiStatusResponse: () => createMultiStatusResponse,
|
112
|
-
createSuccessDetail: () => createSuccessDetail,
|
93
|
+
errorCodeToStatusCode: () => errorCodeToStatusCode,
|
113
94
|
isPlatformSupported: () => isPlatformSupported
|
114
95
|
});
|
115
96
|
module.exports = __toCommonJS(index_exports);
|
@@ -133,167 +114,10 @@ function isPlatformSupported(platform) {
|
|
133
114
|
}
|
134
115
|
|
135
116
|
// 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
|
-
};
|
117
|
+
var import_zod3 = require("zod");
|
295
118
|
|
296
|
-
// src/errors
|
119
|
+
// src/errors.ts
|
120
|
+
var import_zod2 = require("zod");
|
297
121
|
var ApiErrorCode = /* @__PURE__ */ ((ApiErrorCode2) => {
|
298
122
|
ApiErrorCode2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
|
299
123
|
ApiErrorCode2["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
@@ -308,472 +132,378 @@ var ApiErrorCode = /* @__PURE__ */ ((ApiErrorCode2) => {
|
|
308
132
|
ApiErrorCode2["CONTENT_POLICY_VIOLATION"] = "CONTENT_POLICY_VIOLATION";
|
309
133
|
ApiErrorCode2["DUPLICATE_CONTENT"] = "DUPLICATE_CONTENT";
|
310
134
|
ApiErrorCode2["MEDIA_UPLOAD_FAILED"] = "MEDIA_UPLOAD_FAILED";
|
135
|
+
ApiErrorCode2["MULTI_STATUS"] = "MULTI_STATUS";
|
311
136
|
ApiErrorCode2["POST_CREATION_FAILED"] = "POST_CREATION_FAILED";
|
312
137
|
ApiErrorCode2["THREAD_CREATION_FAILED"] = "THREAD_CREATION_FAILED";
|
313
138
|
ApiErrorCode2["POST_DELETION_FAILED"] = "POST_DELETION_FAILED";
|
314
139
|
ApiErrorCode2["POST_INTERACTION_FAILED"] = "POST_INTERACTION_FAILED";
|
315
140
|
ApiErrorCode2["NETWORK_ERROR"] = "NETWORK_ERROR";
|
316
|
-
ApiErrorCode2["MULTI_STATUS"] = "MULTI_STATUS";
|
317
141
|
return ApiErrorCode2;
|
318
142
|
})(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
|
-
}
|
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
|
414
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
|
+
});
|
415
171
|
|
416
|
-
// src/
|
417
|
-
var
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
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
|
+
});
|
429
207
|
|
430
208
|
// src/auth.ts
|
431
|
-
var
|
432
|
-
var PlatformParamSchema =
|
433
|
-
platform:
|
209
|
+
var import_zod4 = require("zod");
|
210
|
+
var PlatformParamSchema = import_zod4.z.object({
|
211
|
+
platform: import_zod4.z.string().describe("Social media platform")
|
434
212
|
}).describe("Platform parameter");
|
435
|
-
var AuthInitRequestSchema =
|
436
|
-
successUrl:
|
213
|
+
var AuthInitRequestSchema = import_zod4.z.object({
|
214
|
+
successUrl: import_zod4.z.string().url().optional().describe(
|
437
215
|
"URL to redirect to on successful authentication"
|
438
216
|
),
|
439
|
-
errorUrl:
|
217
|
+
errorUrl: import_zod4.z.string().url().optional().describe("URL to redirect to on authentication error")
|
440
218
|
}).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")
|
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")
|
451
227
|
}).describe("Auth callback query");
|
452
|
-
var AuthCallbackResponseSchema =
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
).describe("
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
tokenStatus: import_zod3.z.object({
|
466
|
-
valid: import_zod3.z.boolean().describe("Whether the token is valid"),
|
467
|
-
expired: import_zod3.z.boolean().describe("Whether the token is expired"),
|
468
|
-
expiresAt: import_zod3.z.string().optional().describe("When the token expires")
|
469
|
-
})
|
470
|
-
})
|
471
|
-
).describe("Auth status response");
|
472
|
-
var AuthRevokeResponseSchema = EnhancedResponseSchema(
|
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")
|
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")
|
477
241
|
})
|
478
|
-
).describe("Auth
|
479
|
-
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({
|
480
251
|
platform: PlatformSchema,
|
481
|
-
userId:
|
482
|
-
username:
|
483
|
-
profileUrl:
|
484
|
-
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")
|
485
256
|
}).describe("Connected account");
|
486
|
-
var ConnectedAccountsResponseSchema =
|
487
|
-
|
488
|
-
)
|
489
|
-
var NearAuthorizationRequestSchema =
|
257
|
+
var ConnectedAccountsResponseSchema = import_zod4.z.array(ConnectedAccountSchema).describe(
|
258
|
+
"Connected accounts response"
|
259
|
+
);
|
260
|
+
var NearAuthorizationRequestSchema = import_zod4.z.object({
|
490
261
|
// No additional parameters needed, as the NEAR account ID is extracted from the signature
|
491
262
|
}).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");
|
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");
|
506
272
|
|
507
273
|
// src/post.ts
|
508
|
-
var
|
509
|
-
var MediaContentSchema =
|
510
|
-
data:
|
511
|
-
mimeType:
|
512
|
-
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")
|
513
279
|
}).describe("Media content object");
|
514
|
-
var MediaSchema =
|
515
|
-
id:
|
516
|
-
type:
|
517
|
-
url:
|
518
|
-
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")
|
519
285
|
}).describe("Media object");
|
520
|
-
var PostMetricsSchema =
|
521
|
-
retweets:
|
522
|
-
quotes:
|
523
|
-
likes:
|
524
|
-
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")
|
525
291
|
}).describe("Post metrics");
|
526
|
-
var PostSchema =
|
527
|
-
id:
|
528
|
-
text:
|
529
|
-
createdAt:
|
530
|
-
authorId:
|
531
|
-
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"),
|
532
298
|
metrics: PostMetricsSchema.optional().describe("Post metrics"),
|
533
|
-
inReplyToId:
|
534
|
-
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")
|
535
301
|
}).describe("Post object");
|
536
|
-
var PostContentSchema =
|
537
|
-
text:
|
538
|
-
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")
|
539
305
|
}).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:
|
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")
|
553
319
|
}).describe("Delete result");
|
554
|
-
var LikeResultSchema =
|
555
|
-
success:
|
556
|
-
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")
|
557
323
|
}).describe("Like result");
|
558
|
-
var PostSuccessDetailSchema =
|
324
|
+
var PostSuccessDetailSchema = import_zod5.z.object({
|
559
325
|
platform: PlatformSchema,
|
560
|
-
userId:
|
561
|
-
status:
|
562
|
-
postId:
|
563
|
-
postUrl:
|
564
|
-
}).catchall(
|
565
|
-
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({
|
566
332
|
platform: PlatformSchema.describe('The platform to post to (e.g., "twitter")'),
|
567
|
-
userId:
|
333
|
+
userId: import_zod5.z.string().describe("User ID on the platform")
|
568
334
|
}).describe("Target for posting operations");
|
569
|
-
var CreatePostRequestSchema =
|
570
|
-
targets:
|
571
|
-
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(
|
572
338
|
"The content of the post, always an array of PostContent objects, even for a single post"
|
573
339
|
)
|
574
340
|
}).describe("Create post request");
|
575
|
-
var RepostRequestSchema =
|
576
|
-
targets:
|
341
|
+
var RepostRequestSchema = import_zod5.z.object({
|
342
|
+
targets: import_zod5.z.array(TargetSchema).describe("Array of targets to post to"),
|
577
343
|
platform: PlatformSchema.describe("Platform of the post being reposted"),
|
578
|
-
postId:
|
344
|
+
postId: import_zod5.z.string().describe("ID of the post to repost")
|
579
345
|
}).describe("Repost request");
|
580
|
-
var QuotePostRequestSchema =
|
581
|
-
targets:
|
346
|
+
var QuotePostRequestSchema = import_zod5.z.object({
|
347
|
+
targets: import_zod5.z.array(TargetSchema).describe(
|
582
348
|
"Array of targets to post to (must be on the same platform as the post being quoted)"
|
583
349
|
),
|
584
350
|
platform: PlatformSchema.describe("Platform of the post being quoted"),
|
585
|
-
postId:
|
586
|
-
content:
|
351
|
+
postId: import_zod5.z.string().describe("ID of the post to quote"),
|
352
|
+
content: import_zod5.z.array(PostContentSchema).describe(
|
587
353
|
"Content for the quote post(s), always an array, even for a single post"
|
588
354
|
)
|
589
355
|
}).describe("Quote post request");
|
590
|
-
var ReplyToPostRequestSchema =
|
591
|
-
targets:
|
356
|
+
var ReplyToPostRequestSchema = import_zod5.z.object({
|
357
|
+
targets: import_zod5.z.array(TargetSchema).describe(
|
592
358
|
"Array of targets to post to (must be on the same platform as the post being replied to)"
|
593
359
|
),
|
594
360
|
platform: PlatformSchema.describe("Platform of the post being replied to"),
|
595
|
-
postId:
|
596
|
-
content:
|
361
|
+
postId: import_zod5.z.string().describe("ID of the post to reply to"),
|
362
|
+
content: import_zod5.z.array(PostContentSchema).describe(
|
597
363
|
"Content for the reply post(s), always an array, even for a single post"
|
598
364
|
)
|
599
365
|
}).describe("Reply to post request");
|
600
|
-
var PostToDeleteSchema =
|
366
|
+
var PostToDeleteSchema = import_zod5.z.object({
|
601
367
|
platform: PlatformSchema.describe("Platform of the post to delete"),
|
602
|
-
userId:
|
603
|
-
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")
|
604
370
|
}).describe("Post to delete");
|
605
|
-
var DeletePostRequestSchema =
|
606
|
-
targets:
|
607
|
-
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")
|
608
374
|
}).describe("Delete post request");
|
609
|
-
var LikePostRequestSchema =
|
610
|
-
targets:
|
375
|
+
var LikePostRequestSchema = import_zod5.z.object({
|
376
|
+
targets: import_zod5.z.array(TargetSchema).describe(
|
611
377
|
"Array of targets to like the post (must be on the same platform as the post being liked)"
|
612
378
|
),
|
613
379
|
platform: PlatformSchema.describe("Platform of the post being liked"),
|
614
|
-
postId:
|
380
|
+
postId: import_zod5.z.string().describe("ID of the post to like")
|
615
381
|
}).describe("Like post request");
|
616
|
-
var UnlikePostRequestSchema =
|
617
|
-
targets:
|
382
|
+
var UnlikePostRequestSchema = import_zod5.z.object({
|
383
|
+
targets: import_zod5.z.array(TargetSchema).describe(
|
618
384
|
"Array of targets to unlike the post (must be on the same platform as the post being unliked)"
|
619
385
|
),
|
620
386
|
platform: PlatformSchema.describe("Platform of the post being unliked"),
|
621
|
-
postId:
|
387
|
+
postId: import_zod5.z.string().describe("ID of the post to unlike")
|
622
388
|
}).describe("Unlike post request");
|
623
|
-
var PostResponseSchema =
|
624
|
-
|
625
|
-
)
|
626
|
-
var
|
627
|
-
"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"
|
628
394
|
);
|
629
395
|
var RepostResponseSchema = PostResponseSchema.describe("Repost response");
|
630
396
|
var QuotePostResponseSchema = PostResponseSchema.describe("Quote post response");
|
631
397
|
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
|
-
})
|
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")
|
661
415
|
}).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
416
|
|
683
417
|
// src/rate-limit.ts
|
684
|
-
var
|
685
|
-
var RateLimitEndpointParamSchema =
|
686
|
-
endpoint:
|
418
|
+
var import_zod6 = require("zod");
|
419
|
+
var RateLimitEndpointParamSchema = import_zod6.z.object({
|
420
|
+
endpoint: import_zod6.z.string().optional().describe(
|
687
421
|
"Specific endpoint to get rate limit information for (optional)"
|
688
422
|
)
|
689
423
|
}).describe("Rate limit endpoint parameter");
|
690
|
-
var RateLimitEndpointSchema =
|
691
|
-
endpoint:
|
692
|
-
method:
|
693
|
-
limit:
|
694
|
-
remaining:
|
695
|
-
reset:
|
696
|
-
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)")
|
697
431
|
}).describe("Rate limit endpoint");
|
698
|
-
var RateLimitStatusSchema =
|
699
|
-
endpoint:
|
700
|
-
limit:
|
701
|
-
remaining:
|
702
|
-
reset:
|
703
|
-
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")
|
704
438
|
}).describe("Rate limit status");
|
705
|
-
var PlatformRateLimitSchema =
|
439
|
+
var PlatformRateLimitSchema = import_zod6.z.object({
|
706
440
|
platform: PlatformSchema,
|
707
|
-
endpoints:
|
441
|
+
endpoints: import_zod6.z.record(import_zod6.z.string(), RateLimitStatusSchema).describe(
|
708
442
|
"Rate limit status for each endpoint"
|
709
443
|
)
|
710
444
|
}).describe("Platform-specific rate limit");
|
711
|
-
var UsageRateLimitSchema =
|
712
|
-
endpoint:
|
713
|
-
limit:
|
714
|
-
remaining:
|
715
|
-
reset:
|
716
|
-
resetSeconds:
|
717
|
-
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")
|
718
452
|
}).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(
|
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(
|
759
489
|
"Usage-based rate limits for the NEAR account"
|
760
490
|
),
|
761
|
-
signerId:
|
491
|
+
signerId: import_zod6.z.string().describe("NEAR account ID")
|
762
492
|
}).describe("Rate limit response");
|
763
|
-
var EndpointRateLimitResponseSchema =
|
764
|
-
platformLimits:
|
765
|
-
|
493
|
+
var EndpointRateLimitResponseSchema = import_zod6.z.object({
|
494
|
+
platformLimits: import_zod6.z.array(
|
495
|
+
import_zod6.z.object({
|
766
496
|
platform: PlatformSchema,
|
767
497
|
status: RateLimitStatusSchema.describe("Rate limit status for the endpoint")
|
768
498
|
})
|
769
499
|
).describe("Platform-specific rate limits for the endpoint"),
|
770
500
|
usageLimit: UsageRateLimitSchema.describe("Usage-based rate limit for the NEAR account"),
|
771
|
-
endpoint:
|
772
|
-
signerId:
|
501
|
+
endpoint: import_zod6.z.string().describe("API endpoint or action"),
|
502
|
+
signerId: import_zod6.z.string().describe("NEAR account ID")
|
773
503
|
}).describe("Endpoint rate limit response");
|
774
504
|
|
775
505
|
// src/activity.ts
|
776
|
-
var
|
506
|
+
var import_zod7 = require("zod");
|
777
507
|
var TimePeriod = /* @__PURE__ */ ((TimePeriod2) => {
|
778
508
|
TimePeriod2["ALL"] = "all";
|
779
509
|
TimePeriod2["YEARLY"] = "year";
|
@@ -782,179 +512,150 @@ var TimePeriod = /* @__PURE__ */ ((TimePeriod2) => {
|
|
782
512
|
TimePeriod2["DAILY"] = "day";
|
783
513
|
return TimePeriod2;
|
784
514
|
})(TimePeriod || {});
|
785
|
-
var ActivityLeaderboardQuerySchema =
|
786
|
-
timeframe:
|
515
|
+
var ActivityLeaderboardQuerySchema = import_zod7.z.object({
|
516
|
+
timeframe: import_zod7.z.nativeEnum(TimePeriod).optional().describe(
|
787
517
|
"Timeframe for the leaderboard"
|
788
518
|
),
|
789
|
-
limit:
|
790
|
-
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")
|
791
521
|
}).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:
|
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")
|
802
532
|
}).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")
|
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")
|
815
541
|
}).describe("Account activity params");
|
816
|
-
var AccountActivityQuerySchema =
|
817
|
-
timeframe:
|
542
|
+
var AccountActivityQuerySchema = import_zod7.z.object({
|
543
|
+
timeframe: import_zod7.z.nativeEnum(TimePeriod).optional().describe(
|
818
544
|
"Timeframe for the activity"
|
819
545
|
)
|
820
546
|
}).describe("Account activity query");
|
821
|
-
var PlatformActivitySchema =
|
547
|
+
var PlatformActivitySchema = import_zod7.z.object({
|
822
548
|
platform: PlatformSchema,
|
823
|
-
posts:
|
824
|
-
likes:
|
825
|
-
reposts:
|
826
|
-
replies:
|
827
|
-
quotes:
|
828
|
-
score:
|
829
|
-
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")
|
830
556
|
}).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")
|
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")
|
848
572
|
}).describe("Account posts params");
|
849
|
-
var AccountPostsQuerySchema =
|
850
|
-
platform:
|
851
|
-
limit:
|
852
|
-
offset:
|
853
|
-
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(
|
854
578
|
"Filter by post type (optional)"
|
855
579
|
)
|
856
580
|
}).describe("Account posts query");
|
857
|
-
var AccountPostSchema =
|
858
|
-
id:
|
581
|
+
var AccountPostSchema = import_zod7.z.object({
|
582
|
+
id: import_zod7.z.string().describe("Post ID"),
|
859
583
|
platform: PlatformSchema,
|
860
|
-
type:
|
861
|
-
content:
|
862
|
-
url:
|
863
|
-
createdAt:
|
864
|
-
metrics:
|
865
|
-
likes:
|
866
|
-
reposts:
|
867
|
-
replies:
|
868
|
-
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)")
|
869
593
|
}).optional().describe("Post metrics (if available)"),
|
870
|
-
inReplyToId:
|
871
|
-
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)")
|
872
596
|
}).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");
|
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
|
+
});
|
886
605
|
|
887
606
|
// src/user-profile.ts
|
888
|
-
var
|
889
|
-
var UserProfileSchema =
|
890
|
-
userId:
|
891
|
-
username:
|
892
|
-
url:
|
893
|
-
profileImageUrl:
|
894
|
-
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"),
|
895
614
|
platform: PlatformSchema.describe("The platform the user profile is from"),
|
896
|
-
lastUpdated:
|
615
|
+
lastUpdated: import_zod8.z.number().describe("Timestamp when the profile was last updated")
|
897
616
|
}).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");
|
617
|
+
var ProfileRefreshResponseSchema = import_zod8.z.object({
|
618
|
+
profile: UserProfileSchema.optional().describe("The refreshed user profile (if successful)")
|
619
|
+
}).describe("Profile refresh response");
|
906
620
|
// Annotate the CommonJS export names for ESM import in node:
|
907
621
|
0 && (module.exports = {
|
908
622
|
AccountActivityEntrySchema,
|
909
623
|
AccountActivityParamsSchema,
|
910
624
|
AccountActivityQuerySchema,
|
911
|
-
AccountActivityResponseSchema,
|
912
625
|
AccountPostSchema,
|
913
626
|
AccountPostsParamsSchema,
|
914
627
|
AccountPostsQuerySchema,
|
915
|
-
AccountPostsResponseSchema,
|
916
628
|
ActivityLeaderboardQuerySchema,
|
917
|
-
ActivityLeaderboardResponseSchema,
|
918
629
|
AllRateLimitsResponseSchema,
|
919
|
-
ApiError,
|
920
630
|
ApiErrorCode,
|
921
|
-
|
631
|
+
ApiErrorCodeSchema,
|
922
632
|
AuthCallbackQuerySchema,
|
923
633
|
AuthCallbackResponseSchema,
|
924
634
|
AuthInitRequestSchema,
|
925
635
|
AuthRevokeResponseSchema,
|
926
636
|
AuthStatusResponseSchema,
|
637
|
+
AuthTokenRequestSchema,
|
927
638
|
AuthUrlResponseSchema,
|
928
|
-
BaseError,
|
929
|
-
CompositeApiError,
|
930
639
|
ConnectedAccountSchema,
|
931
640
|
ConnectedAccountsResponseSchema,
|
932
641
|
CreatePostRequestSchema,
|
933
|
-
CreatePostResponseLegacySchema,
|
934
642
|
CreatePostResponseSchema,
|
935
|
-
CreatePostTargetErrorSchema,
|
936
|
-
CreatePostTargetResultSchema,
|
937
643
|
DeletePostRequestSchema,
|
938
644
|
DeletePostResponseSchema,
|
939
645
|
DeleteResultSchema,
|
940
646
|
EndpointRateLimitResponseSchema,
|
941
|
-
EnhancedErrorResponseSchema,
|
942
|
-
EnhancedResponseMetaSchema,
|
943
|
-
EnhancedResponseSchema,
|
944
647
|
ErrorDetailSchema,
|
945
|
-
ErrorResponseSchema,
|
946
648
|
LikePostRequestSchema,
|
947
649
|
LikePostResponseSchema,
|
948
650
|
LikeResultSchema,
|
949
651
|
MediaContentSchema,
|
950
652
|
MediaSchema,
|
951
|
-
|
653
|
+
MultiStatusDataSchema,
|
952
654
|
NearAuthorizationRequestSchema,
|
953
655
|
NearAuthorizationResponseSchema,
|
954
656
|
NearAuthorizationStatusResponseSchema,
|
955
657
|
Platform,
|
956
658
|
PlatformActivitySchema,
|
957
|
-
PlatformError,
|
958
659
|
PlatformParamSchema,
|
959
660
|
PlatformRateLimitSchema,
|
960
661
|
PlatformSchema,
|
@@ -967,7 +668,6 @@ var ProfileRefreshResponseSchema = EnhancedResponseSchema(
|
|
967
668
|
PostSuccessDetailSchema,
|
968
669
|
PostToDeleteSchema,
|
969
670
|
ProfileRefreshResponseSchema,
|
970
|
-
ProfileRefreshResultSchema,
|
971
671
|
QuotePostRequestSchema,
|
972
672
|
QuotePostResponseSchema,
|
973
673
|
RateLimitEndpointParamSchema,
|
@@ -979,6 +679,7 @@ var ProfileRefreshResponseSchema = EnhancedResponseSchema(
|
|
979
679
|
ReplyToPostResponseSchema,
|
980
680
|
RepostRequestSchema,
|
981
681
|
RepostResponseSchema,
|
682
|
+
ResponseMetaSchema,
|
982
683
|
SUPPORTED_PLATFORMS,
|
983
684
|
SuccessDetailSchema,
|
984
685
|
SupportedPlatformSchema,
|
@@ -988,12 +689,6 @@ var ProfileRefreshResponseSchema = EnhancedResponseSchema(
|
|
988
689
|
UnlikePostResponseSchema,
|
989
690
|
UsageRateLimitSchema,
|
990
691
|
UserProfileSchema,
|
991
|
-
|
992
|
-
createEnhancedApiResponse,
|
993
|
-
createEnhancedErrorResponse,
|
994
|
-
createErrorDetail,
|
995
|
-
createErrorResponse,
|
996
|
-
createMultiStatusResponse,
|
997
|
-
createSuccessDetail,
|
692
|
+
errorCodeToStatusCode,
|
998
693
|
isPlatformSupported
|
999
694
|
});
|