@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 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
- ApiResponseSchema: () => ApiResponseSchema,
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
- MultiStatusResponseSchema: () => MultiStatusResponseSchema,
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
- createApiResponse: () => createApiResponse,
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 import_zod2 = require("zod");
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/api-error.ts
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 ApiError = class _ApiError extends BaseError {
320
- constructor(message, code = "INTERNAL_ERROR" /* INTERNAL_ERROR */, status = 500, details, recoverable = false) {
321
- super(message);
322
- this.code = code;
323
- this.status = status;
324
- this.details = details;
325
- this.recoverable = recoverable;
326
- }
327
- /**
328
- * Create a validation error
329
- */
330
- static validation(message, details) {
331
- return new _ApiError(
332
- message,
333
- "VALIDATION_ERROR" /* VALIDATION_ERROR */,
334
- 400,
335
- details,
336
- true
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/errors/composite-api-error.ts
417
- var CompositeApiError = class extends ApiError {
418
- constructor(message, errors, status = 207, details, recoverable = false) {
419
- super(
420
- message,
421
- "MULTI_STATUS" /* MULTI_STATUS */,
422
- status,
423
- { ...details, errors },
424
- recoverable
425
- );
426
- this.errors = errors;
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 import_zod3 = require("zod");
432
- var PlatformParamSchema = import_zod3.z.object({
433
- platform: import_zod3.z.string().describe("Social media 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 = import_zod3.z.object({
436
- successUrl: import_zod3.z.string().url().optional().describe(
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: import_zod3.z.string().url().optional().describe("URL to redirect to on authentication error")
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 = EnhancedResponseSchema(
442
- import_zod3.z.object({
443
- url: import_zod3.z.string().describe("Authentication URL to redirect the user to"),
444
- state: import_zod3.z.string().describe("State parameter for CSRF protection"),
445
- platform: PlatformSchema
446
- })
447
- ).describe("Auth URL response");
448
- var AuthCallbackQuerySchema = import_zod3.z.object({
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 = EnhancedResponseSchema(
453
- import_zod3.z.object({
454
- success: import_zod3.z.boolean().describe("Whether the authentication was successful"),
455
- platform: PlatformSchema,
456
- userId: import_zod3.z.string().describe("User ID"),
457
- redirectUrl: import_zod3.z.string().optional().describe("URL to redirect the user to after authentication")
458
- })
459
- ).describe("Auth callback response");
460
- var AuthStatusResponseSchema = EnhancedResponseSchema(
461
- import_zod3.z.object({
462
- platform: PlatformSchema,
463
- userId: import_zod3.z.string().describe("User ID"),
464
- authenticated: import_zod3.z.boolean().describe("Whether the user is authenticated"),
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 revoke response");
479
- var ConnectedAccountSchema = import_zod3.z.object({
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: import_zod3.z.string().describe("User ID on the platform"),
482
- username: import_zod3.z.string().optional().describe("Username on the platform (if available)"),
483
- profileUrl: import_zod3.z.string().optional().describe("URL to the user profile"),
484
- connectedAt: import_zod3.z.string().optional().describe("When the account was connected")
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 = EnhancedResponseSchema(
487
- import_zod3.z.array(ConnectedAccountSchema)
488
- ).describe("Connected accounts response");
489
- var NearAuthorizationRequestSchema = import_zod3.z.object({
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 = EnhancedResponseSchema(
493
- import_zod3.z.object({
494
- success: import_zod3.z.boolean().describe("Whether the authorization was successful"),
495
- nearAccount: import_zod3.z.string().describe("NEAR account ID"),
496
- authorized: import_zod3.z.boolean().describe("Whether the account is authorized")
497
- })
498
- ).describe("NEAR authorization response");
499
- var NearAuthorizationStatusResponseSchema = EnhancedResponseSchema(
500
- import_zod3.z.object({
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 import_zod4 = require("zod");
509
- var MediaContentSchema = import_zod4.z.object({
510
- data: import_zod4.z.union([import_zod4.z.string(), import_zod4.z.instanceof(Blob)]).describe("Media data as string or Blob"),
511
- mimeType: import_zod4.z.string().optional().describe("Media MIME type"),
512
- altText: import_zod4.z.string().optional().describe("Alt text for the media")
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 = import_zod4.z.object({
515
- id: import_zod4.z.string().describe("Media ID"),
516
- type: import_zod4.z.enum(["image", "video", "gif"]).describe("Media type"),
517
- url: import_zod4.z.string().optional().describe("Media URL"),
518
- altText: import_zod4.z.string().optional().describe("Alt text for the media")
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 = import_zod4.z.object({
521
- retweets: import_zod4.z.number().describe("Number of retweets"),
522
- quotes: import_zod4.z.number().describe("Number of quotes"),
523
- likes: import_zod4.z.number().describe("Number of likes"),
524
- replies: import_zod4.z.number().describe("Number of 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 = import_zod4.z.object({
527
- id: import_zod4.z.string().describe("Post ID"),
528
- text: import_zod4.z.string().describe("Post text content"),
529
- createdAt: import_zod4.z.string().describe("Post creation date"),
530
- authorId: import_zod4.z.string().describe("Author ID"),
531
- media: import_zod4.z.array(MediaSchema).optional().describe("Media attached to the post"),
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: import_zod4.z.string().optional().describe("ID of the post this is a reply to"),
534
- quotedPostId: import_zod4.z.string().optional().describe("ID of the post this is quoting")
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 = import_zod4.z.object({
537
- text: import_zod4.z.string().optional().describe("Text content for the post"),
538
- media: import_zod4.z.array(MediaContentSchema).optional().describe("Media attachments for the post")
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 = import_zod4.z.object({
541
- id: import_zod4.z.string().describe("Post ID"),
542
- text: import_zod4.z.string().optional().describe("Post text content"),
543
- createdAt: import_zod4.z.string().describe("Post creation date"),
544
- mediaIds: import_zod4.z.array(import_zod4.z.string()).optional().describe("Media IDs attached to the post"),
545
- threadIds: import_zod4.z.array(import_zod4.z.string()).optional().describe("Thread IDs for threaded posts"),
546
- quotedPostId: import_zod4.z.string().optional().describe("ID of the post this is quoting"),
547
- inReplyToId: import_zod4.z.string().optional().describe("ID of the post this is a reply to"),
548
- success: import_zod4.z.boolean().optional().describe("Whether the operation was successful")
549
- }).catchall(import_zod4.z.any()).describe("Post result");
550
- var DeleteResultSchema = import_zod4.z.object({
551
- success: import_zod4.z.boolean().describe("Whether the deletion was successful"),
552
- id: import_zod4.z.string().describe("ID of the deleted post")
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 = import_zod4.z.object({
555
- success: import_zod4.z.boolean().describe("Whether the like was successful"),
556
- id: import_zod4.z.string().describe("ID of the liked post")
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 = import_zod4.z.object({
324
+ var PostSuccessDetailSchema = import_zod5.z.object({
559
325
  platform: PlatformSchema,
560
- userId: import_zod4.z.string().describe("User ID"),
561
- status: import_zod4.z.literal("success"),
562
- postId: import_zod4.z.string().optional().describe("Post ID"),
563
- postUrl: import_zod4.z.string().optional().describe("URL to the post")
564
- }).catchall(import_zod4.z.any()).describe("Post success detail");
565
- var TargetSchema = import_zod4.z.object({
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: import_zod4.z.string().describe("User ID on the platform")
333
+ userId: import_zod5.z.string().describe("User ID on the platform")
568
334
  }).describe("Target for posting operations");
569
- var CreatePostRequestSchema = import_zod4.z.object({
570
- targets: import_zod4.z.array(TargetSchema).describe("Array of targets to post to (can be a single target)"),
571
- content: import_zod4.z.array(PostContentSchema).describe(
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 = import_zod4.z.object({
576
- targets: import_zod4.z.array(TargetSchema).describe("Array of targets to post to"),
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: import_zod4.z.string().describe("ID of the post to repost")
344
+ postId: import_zod5.z.string().describe("ID of the post to repost")
579
345
  }).describe("Repost request");
580
- var QuotePostRequestSchema = import_zod4.z.object({
581
- targets: import_zod4.z.array(TargetSchema).describe(
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: import_zod4.z.string().describe("ID of the post to quote"),
586
- content: import_zod4.z.array(PostContentSchema).describe(
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 = import_zod4.z.object({
591
- targets: import_zod4.z.array(TargetSchema).describe(
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: import_zod4.z.string().describe("ID of the post to reply to"),
596
- content: import_zod4.z.array(PostContentSchema).describe(
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 = import_zod4.z.object({
366
+ var PostToDeleteSchema = import_zod5.z.object({
601
367
  platform: PlatformSchema.describe("Platform of the post to delete"),
602
- userId: import_zod4.z.string().describe("User ID on the platform"),
603
- postId: import_zod4.z.string().describe("ID of the post to delete")
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 = import_zod4.z.object({
606
- targets: import_zod4.z.array(TargetSchema).describe("Array of targets to delete posts"),
607
- posts: import_zod4.z.array(PostToDeleteSchema).describe("Array of posts to delete")
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 = import_zod4.z.object({
610
- targets: import_zod4.z.array(TargetSchema).describe(
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: import_zod4.z.string().describe("ID of the post to like")
380
+ postId: import_zod5.z.string().describe("ID of the post to like")
615
381
  }).describe("Like post request");
616
- var UnlikePostRequestSchema = import_zod4.z.object({
617
- targets: import_zod4.z.array(TargetSchema).describe(
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: import_zod4.z.string().describe("ID of the post to unlike")
387
+ postId: import_zod5.z.string().describe("ID of the post to unlike")
622
388
  }).describe("Unlike post request");
623
- var PostResponseSchema = EnhancedResponseSchema(
624
- import_zod4.z.union([PostSchema, import_zod4.z.array(PostSchema)])
625
- ).describe("Post response");
626
- var CreatePostResponseLegacySchema = PostResponseSchema.describe(
627
- "Create post response (legacy)"
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 = EnhancedResponseSchema(
633
- import_zod4.z.object({
634
- success: import_zod4.z.boolean().describe("Whether the deletion was successful"),
635
- id: import_zod4.z.string().describe("ID of the deleted post")
636
- })
637
- ).describe("Delete post response");
638
- var LikePostResponseSchema = EnhancedResponseSchema(
639
- import_zod4.z.object({
640
- success: import_zod4.z.boolean().describe("Whether the like was successful"),
641
- id: import_zod4.z.string().describe("ID of the liked post")
642
- })
643
- ).describe("Like post response");
644
- var UnlikePostResponseSchema = EnhancedResponseSchema(
645
- import_zod4.z.object({
646
- success: import_zod4.z.boolean().describe("Whether the unlike was successful"),
647
- id: import_zod4.z.string().describe("ID of the unliked post")
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 import_zod5 = require("zod");
685
- var RateLimitEndpointParamSchema = import_zod5.z.object({
686
- endpoint: import_zod5.z.string().optional().describe(
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 = import_zod5.z.object({
691
- endpoint: import_zod5.z.string().describe("API endpoint"),
692
- method: import_zod5.z.enum(["GET", "POST", "PUT", "DELETE"]).describe("HTTP method"),
693
- limit: import_zod5.z.number().describe("Rate limit"),
694
- remaining: import_zod5.z.number().describe("Remaining requests"),
695
- reset: import_zod5.z.number().describe("Reset timestamp (Unix timestamp in seconds)"),
696
- resetDate: import_zod5.z.string().describe("Reset date (ISO string)")
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 = import_zod5.z.object({
699
- endpoint: import_zod5.z.string().describe("API endpoint or action"),
700
- limit: import_zod5.z.number().describe("Maximum number of requests allowed in the time window"),
701
- remaining: import_zod5.z.number().describe("Number of requests remaining in the current time window"),
702
- reset: import_zod5.z.string().datetime().describe("Timestamp when the rate limit will reset"),
703
- resetSeconds: import_zod5.z.number().describe("Seconds until the rate limit will reset")
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 = import_zod5.z.object({
439
+ var PlatformRateLimitSchema = import_zod6.z.object({
706
440
  platform: PlatformSchema,
707
- endpoints: import_zod5.z.record(import_zod5.z.string(), RateLimitStatusSchema).describe(
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 = import_zod5.z.object({
712
- endpoint: import_zod5.z.string().describe("API endpoint or action"),
713
- limit: import_zod5.z.number().describe("Maximum number of requests allowed in the time window"),
714
- remaining: import_zod5.z.number().describe("Number of requests remaining in the current time window"),
715
- reset: import_zod5.z.string().datetime().describe("Timestamp when the rate limit will reset"),
716
- resetSeconds: import_zod5.z.number().describe("Seconds until the rate limit will reset"),
717
- timeWindow: import_zod5.z.string().describe("Time window for the rate limit")
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 = EnhancedResponseSchema(
720
- import_zod5.z.object({
721
- platform: PlatformSchema,
722
- userId: import_zod5.z.string().optional().describe("User ID"),
723
- endpoints: import_zod5.z.array(RateLimitEndpointSchema).describe("Rate limits for specific endpoints"),
724
- app: import_zod5.z.object({
725
- limit: import_zod5.z.number().describe("App-wide rate limit"),
726
- remaining: import_zod5.z.number().describe("Remaining requests"),
727
- reset: import_zod5.z.number().describe("Reset timestamp (Unix timestamp in seconds)"),
728
- resetDate: import_zod5.z.string().describe("Reset date (ISO string)")
729
- }).optional().describe("App-wide rate limits")
730
- })
731
- ).describe("Rate limit status response");
732
- var AllRateLimitsResponseSchema = EnhancedResponseSchema(
733
- import_zod5.z.object({
734
- platforms: import_zod5.z.record(
735
- PlatformSchema,
736
- import_zod5.z.object({
737
- users: import_zod5.z.record(
738
- import_zod5.z.string(),
739
- import_zod5.z.object({
740
- endpoints: import_zod5.z.array(RateLimitEndpointSchema).describe(
741
- "Rate limits for specific endpoints"
742
- ),
743
- lastUpdated: import_zod5.z.string().describe("Last updated date (ISO string)")
744
- })
745
- ).describe("User-specific rate limits"),
746
- app: import_zod5.z.object({
747
- limit: import_zod5.z.number().describe("App-wide rate limit"),
748
- remaining: import_zod5.z.number().describe("Remaining requests"),
749
- reset: import_zod5.z.number().describe("Reset timestamp (Unix timestamp in seconds)"),
750
- resetDate: import_zod5.z.string().describe("Reset date (ISO string)")
751
- }).optional().describe("App-wide rate limits")
752
- })
753
- ).describe("Rate limits by platform")
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: import_zod5.z.string().describe("NEAR account ID")
491
+ signerId: import_zod6.z.string().describe("NEAR account ID")
762
492
  }).describe("Rate limit response");
763
- var EndpointRateLimitResponseSchema = import_zod5.z.object({
764
- platformLimits: import_zod5.z.array(
765
- import_zod5.z.object({
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: import_zod5.z.string().describe("API endpoint or action"),
772
- signerId: import_zod5.z.string().describe("NEAR account ID")
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 import_zod6 = require("zod");
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 = import_zod6.z.object({
786
- timeframe: import_zod6.z.nativeEnum(TimePeriod).optional().describe(
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: import_zod6.z.string().optional().transform((val) => val ? parseInt(val, 10) : void 0).pipe(import_zod6.z.number().min(1).max(100).optional()).describe("Maximum number of results to return (1-100)"),
790
- offset: import_zod6.z.string().optional().transform((val) => val ? parseInt(val, 10) : void 0).pipe(import_zod6.z.number().min(0).optional()).describe("Offset for pagination")
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 = import_zod6.z.object({
793
- signerId: import_zod6.z.string().describe("NEAR account ID"),
794
- totalPosts: import_zod6.z.number().describe("Total number of posts"),
795
- totalLikes: import_zod6.z.number().describe("Total number of likes"),
796
- totalReposts: import_zod6.z.number().describe("Total number of reposts"),
797
- totalReplies: import_zod6.z.number().describe("Total number of replies"),
798
- totalQuotes: import_zod6.z.number().describe("Total number of quote posts"),
799
- totalScore: import_zod6.z.number().describe("Total activity score"),
800
- rank: import_zod6.z.number().describe("Rank on the leaderboard"),
801
- lastActive: import_zod6.z.string().datetime().describe("Timestamp of last activity")
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 = EnhancedResponseSchema(
804
- import_zod6.z.object({
805
- timeframe: import_zod6.z.nativeEnum(TimePeriod).describe("Timeframe for the leaderboard"),
806
- entries: import_zod6.z.array(AccountActivityEntrySchema).describe("Leaderboard entries"),
807
- total: import_zod6.z.number().describe("Total number of entries in the leaderboard"),
808
- limit: import_zod6.z.number().describe("Maximum number of results returned"),
809
- offset: import_zod6.z.number().describe("Offset for pagination"),
810
- generatedAt: import_zod6.z.string().datetime().describe("Timestamp when the leaderboard was generated")
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 = import_zod6.z.object({
817
- timeframe: import_zod6.z.nativeEnum(TimePeriod).optional().describe(
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 = import_zod6.z.object({
547
+ var PlatformActivitySchema = import_zod7.z.object({
822
548
  platform: PlatformSchema,
823
- posts: import_zod6.z.number().describe("Number of posts on this platform"),
824
- likes: import_zod6.z.number().describe("Number of likes on this platform"),
825
- reposts: import_zod6.z.number().describe("Number of reposts on this platform"),
826
- replies: import_zod6.z.number().describe("Number of replies on this platform"),
827
- quotes: import_zod6.z.number().describe("Number of quote posts on this platform"),
828
- score: import_zod6.z.number().describe("Activity score on this platform"),
829
- lastActive: import_zod6.z.string().datetime().describe("Timestamp of last activity on this platform")
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 = EnhancedResponseSchema(
832
- import_zod6.z.object({
833
- signerId: import_zod6.z.string().describe("NEAR account ID"),
834
- timeframe: import_zod6.z.nativeEnum(TimePeriod).describe("Timeframe for the activity"),
835
- totalPosts: import_zod6.z.number().describe("Total number of posts across all platforms"),
836
- totalLikes: import_zod6.z.number().describe("Total number of likes across all platforms"),
837
- totalReposts: import_zod6.z.number().describe("Total number of reposts across all platforms"),
838
- totalReplies: import_zod6.z.number().describe("Total number of replies across all platforms"),
839
- totalQuotes: import_zod6.z.number().describe("Total number of quote posts across all platforms"),
840
- totalScore: import_zod6.z.number().describe("Total activity score across all platforms"),
841
- rank: import_zod6.z.number().describe("Rank on the leaderboard"),
842
- lastActive: import_zod6.z.string().datetime().describe("Timestamp of last activity across all platforms"),
843
- platforms: import_zod6.z.array(PlatformActivitySchema).describe("Activity breakdown by platform")
844
- })
845
- ).describe("Account activity response");
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 = import_zod6.z.object({
850
- platform: import_zod6.z.string().optional().describe("Filter by platform (optional)"),
851
- limit: import_zod6.z.string().optional().transform((val) => val ? parseInt(val, 10) : void 0).pipe(import_zod6.z.number().min(1).max(100).optional()).describe("Maximum number of results to return (1-100)"),
852
- offset: import_zod6.z.string().optional().transform((val) => val ? parseInt(val, 10) : void 0).pipe(import_zod6.z.number().min(0).optional()).describe("Offset for pagination"),
853
- type: import_zod6.z.enum(["post", "repost", "reply", "quote", "like", "all"]).optional().describe(
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 = import_zod6.z.object({
858
- id: import_zod6.z.string().describe("Post ID"),
581
+ var AccountPostSchema = import_zod7.z.object({
582
+ id: import_zod7.z.string().describe("Post ID"),
859
583
  platform: PlatformSchema,
860
- type: import_zod6.z.enum(["post", "repost", "reply", "quote", "like"]).describe("Type of post"),
861
- content: import_zod6.z.string().optional().describe("Post content (if available)"),
862
- url: import_zod6.z.string().url().optional().describe("URL to the post on the platform (if available)"),
863
- createdAt: import_zod6.z.string().datetime().describe("Timestamp when the post was created"),
864
- metrics: import_zod6.z.object({
865
- likes: import_zod6.z.number().optional().describe("Number of likes (if available)"),
866
- reposts: import_zod6.z.number().optional().describe("Number of reposts (if available)"),
867
- replies: import_zod6.z.number().optional().describe("Number of replies (if available)"),
868
- quotes: import_zod6.z.number().optional().describe("Number of quotes (if available)")
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: import_zod6.z.string().optional().describe("ID of the post this is a reply to (if applicable)"),
871
- quotedPostId: import_zod6.z.string().optional().describe("ID of the post this is quoting (if applicable)")
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 = EnhancedResponseSchema(
874
- import_zod6.z.object({
875
- signerId: import_zod6.z.string().describe("NEAR account ID"),
876
- posts: import_zod6.z.array(AccountPostSchema).describe("List of posts"),
877
- total: import_zod6.z.number().describe("Total number of posts matching the query"),
878
- limit: import_zod6.z.number().describe("Maximum number of results returned"),
879
- offset: import_zod6.z.number().describe("Offset for pagination"),
880
- platform: import_zod6.z.string().optional().describe("Platform filter (if applied)"),
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 import_zod7 = require("zod");
889
- var UserProfileSchema = import_zod7.z.object({
890
- userId: import_zod7.z.string().describe("User ID on the platform"),
891
- username: import_zod7.z.string().describe("Username on the platform"),
892
- url: import_zod7.z.string().url().optional().describe("URL to the user profile"),
893
- profileImageUrl: import_zod7.z.string().describe("URL to the user profile image"),
894
- isPremium: import_zod7.z.boolean().optional().describe("Whether the user has a premium account"),
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: import_zod7.z.number().describe("Timestamp when the profile was last updated")
615
+ lastUpdated: import_zod8.z.number().describe("Timestamp when the profile was last updated")
897
616
  }).describe("User profile");
898
- var ProfileRefreshResultSchema = import_zod7.z.object({
899
- success: import_zod7.z.boolean().describe("Whether the profile refresh was successful"),
900
- profile: UserProfileSchema.optional().describe("The refreshed user profile (if successful)"),
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
- ApiResponseSchema,
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
- MultiStatusResponseSchema,
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
- createApiResponse,
992
- createEnhancedApiResponse,
993
- createEnhancedErrorResponse,
994
- createErrorDetail,
995
- createErrorResponse,
996
- createMultiStatusResponse,
997
- createSuccessDetail,
692
+ errorCodeToStatusCode,
998
693
  isPlatformSupported
999
694
  });