@crosspost/types 0.2.1 → 0.2.4

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
@@ -305,12 +305,12 @@ var NearAuthorizationRequestSchema = import_zod5.z.object({
305
305
  // No additional parameters needed, as the NEAR account ID is extracted from the signature
306
306
  }).describe("NEAR authorization request");
307
307
  var NearAuthorizationResponseSchema = import_zod5.z.object({
308
- nearAccount: import_zod5.z.string().describe("NEAR account ID"),
309
- authorized: import_zod5.z.boolean().describe("Whether the account is authorized")
308
+ signerId: import_zod5.z.string().describe("NEAR account ID"),
309
+ isAuthorized: import_zod5.z.boolean().describe("Whether the account is authorized")
310
310
  }).describe("NEAR authorization response");
311
311
  var NearAuthorizationStatusResponseSchema = import_zod5.z.object({
312
- nearAccount: import_zod5.z.string().describe("NEAR account ID"),
313
- authorized: import_zod5.z.boolean().describe("Whether the account is authorized"),
312
+ signerId: import_zod5.z.string().describe("NEAR account ID"),
313
+ isAuthorized: import_zod5.z.boolean().describe("Whether the account is authorized"),
314
314
  authorizedAt: import_zod5.z.string().optional().describe("When the account was authorized")
315
315
  }).describe("NEAR authorization status response");
316
316
 
package/dist/index.d.cts CHANGED
@@ -270,7 +270,7 @@ declare const MultiStatusDataSchema: z.ZodObject<{
270
270
  }>;
271
271
  interface ApiResponse<T> {
272
272
  success: boolean;
273
- data?: T | MultiStatusData | null;
273
+ data?: T | null;
274
274
  errors?: ErrorDetail[] | null;
275
275
  meta: ResponseMeta;
276
276
  }
@@ -585,26 +585,26 @@ declare const ConnectedAccountsResponseSchema: z.ZodObject<{
585
585
  }>;
586
586
  declare const NearAuthorizationRequestSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
587
587
  declare const NearAuthorizationResponseSchema: z.ZodObject<{
588
- nearAccount: z.ZodString;
589
- authorized: z.ZodBoolean;
588
+ signerId: z.ZodString;
589
+ isAuthorized: z.ZodBoolean;
590
590
  }, "strip", z.ZodTypeAny, {
591
- nearAccount: string;
592
- authorized: boolean;
591
+ signerId: string;
592
+ isAuthorized: boolean;
593
593
  }, {
594
- nearAccount: string;
595
- authorized: boolean;
594
+ signerId: string;
595
+ isAuthorized: boolean;
596
596
  }>;
597
597
  declare const NearAuthorizationStatusResponseSchema: z.ZodObject<{
598
- nearAccount: z.ZodString;
599
- authorized: z.ZodBoolean;
598
+ signerId: z.ZodString;
599
+ isAuthorized: z.ZodBoolean;
600
600
  authorizedAt: z.ZodOptional<z.ZodString>;
601
601
  }, "strip", z.ZodTypeAny, {
602
- nearAccount: string;
603
- authorized: boolean;
602
+ signerId: string;
603
+ isAuthorized: boolean;
604
604
  authorizedAt?: string | undefined;
605
605
  }, {
606
- nearAccount: string;
607
- authorized: boolean;
606
+ signerId: string;
607
+ isAuthorized: boolean;
608
608
  authorizedAt?: string | undefined;
609
609
  }>;
610
610
  type PlatformParam = z.infer<typeof PlatformParamSchema>;
@@ -2406,6 +2406,7 @@ declare const RateLimitResponseSchema: z.ZodObject<{
2406
2406
  }>>;
2407
2407
  signerId: z.ZodString;
2408
2408
  }, "strip", z.ZodTypeAny, {
2409
+ signerId: string;
2409
2410
  platformLimits: {
2410
2411
  platform: Platform;
2411
2412
  endpoints: Record<string, {
@@ -2424,8 +2425,8 @@ declare const RateLimitResponseSchema: z.ZodObject<{
2424
2425
  resetSeconds: number;
2425
2426
  timeWindow: string;
2426
2427
  }>;
2427
- signerId: string;
2428
2428
  }, {
2429
+ signerId: string;
2429
2430
  platformLimits: {
2430
2431
  platform: Platform;
2431
2432
  endpoints: Record<string, {
@@ -2444,7 +2445,6 @@ declare const RateLimitResponseSchema: z.ZodObject<{
2444
2445
  resetSeconds: number;
2445
2446
  timeWindow: string;
2446
2447
  }>;
2447
- signerId: string;
2448
2448
  }>;
2449
2449
  declare const EndpointRateLimitResponseSchema: z.ZodObject<{
2450
2450
  platformLimits: z.ZodArray<z.ZodObject<{
@@ -2512,6 +2512,7 @@ declare const EndpointRateLimitResponseSchema: z.ZodObject<{
2512
2512
  endpoint: z.ZodString;
2513
2513
  signerId: z.ZodString;
2514
2514
  }, "strip", z.ZodTypeAny, {
2515
+ signerId: string;
2515
2516
  endpoint: string;
2516
2517
  platformLimits: {
2517
2518
  status: {
@@ -2523,7 +2524,6 @@ declare const EndpointRateLimitResponseSchema: z.ZodObject<{
2523
2524
  };
2524
2525
  platform: Platform;
2525
2526
  }[];
2526
- signerId: string;
2527
2527
  usageLimit: {
2528
2528
  remaining: number;
2529
2529
  limit: number;
@@ -2533,6 +2533,7 @@ declare const EndpointRateLimitResponseSchema: z.ZodObject<{
2533
2533
  timeWindow: string;
2534
2534
  };
2535
2535
  }, {
2536
+ signerId: string;
2536
2537
  endpoint: string;
2537
2538
  platformLimits: {
2538
2539
  status: {
@@ -2544,7 +2545,6 @@ declare const EndpointRateLimitResponseSchema: z.ZodObject<{
2544
2545
  };
2545
2546
  platform: Platform;
2546
2547
  }[];
2547
- signerId: string;
2548
2548
  usageLimit: {
2549
2549
  remaining: number;
2550
2550
  limit: number;
@@ -2864,6 +2864,7 @@ declare const AccountActivityResponseSchema: z.ZodObject<{
2864
2864
  score: number;
2865
2865
  }>, "many">;
2866
2866
  }, "strip", z.ZodTypeAny, {
2867
+ signerId: string;
2867
2868
  platforms: {
2868
2869
  platform: Platform;
2869
2870
  quotes: number;
@@ -2874,7 +2875,6 @@ declare const AccountActivityResponseSchema: z.ZodObject<{
2874
2875
  reposts: number;
2875
2876
  score: number;
2876
2877
  }[];
2877
- signerId: string;
2878
2878
  timeframe: TimePeriod;
2879
2879
  totalPosts: number;
2880
2880
  totalLikes: number;
@@ -2885,6 +2885,7 @@ declare const AccountActivityResponseSchema: z.ZodObject<{
2885
2885
  rank: number;
2886
2886
  lastActive: string;
2887
2887
  }, {
2888
+ signerId: string;
2888
2889
  platforms: {
2889
2890
  platform: Platform;
2890
2891
  quotes: number;
@@ -2895,7 +2896,6 @@ declare const AccountActivityResponseSchema: z.ZodObject<{
2895
2896
  reposts: number;
2896
2897
  score: number;
2897
2898
  }[];
2898
- signerId: string;
2899
2899
  timeframe: TimePeriod;
2900
2900
  totalPosts: number;
2901
2901
  totalLikes: number;
@@ -3073,6 +3073,7 @@ declare const AccountPostsResponseSchema: z.ZodObject<{
3073
3073
  platforms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3074
3074
  types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3075
3075
  }, "strip", z.ZodTypeAny, {
3076
+ signerId: string;
3076
3077
  posts: {
3077
3078
  type: ActivityType;
3078
3079
  platform: Platform;
@@ -3090,10 +3091,10 @@ declare const AccountPostsResponseSchema: z.ZodObject<{
3090
3091
  quotedPostId?: string | undefined;
3091
3092
  content?: string | undefined;
3092
3093
  }[];
3093
- signerId: string;
3094
3094
  platforms?: string[] | undefined;
3095
3095
  types?: string[] | undefined;
3096
3096
  }, {
3097
+ signerId: string;
3097
3098
  posts: {
3098
3099
  type: ActivityType;
3099
3100
  platform: Platform;
@@ -3111,7 +3112,6 @@ declare const AccountPostsResponseSchema: z.ZodObject<{
3111
3112
  quotedPostId?: string | undefined;
3112
3113
  content?: string | undefined;
3113
3114
  }[];
3114
- signerId: string;
3115
3115
  platforms?: string[] | undefined;
3116
3116
  types?: string[] | undefined;
3117
3117
  }>;
package/dist/index.d.ts CHANGED
@@ -270,7 +270,7 @@ declare const MultiStatusDataSchema: z.ZodObject<{
270
270
  }>;
271
271
  interface ApiResponse<T> {
272
272
  success: boolean;
273
- data?: T | MultiStatusData | null;
273
+ data?: T | null;
274
274
  errors?: ErrorDetail[] | null;
275
275
  meta: ResponseMeta;
276
276
  }
@@ -585,26 +585,26 @@ declare const ConnectedAccountsResponseSchema: z.ZodObject<{
585
585
  }>;
586
586
  declare const NearAuthorizationRequestSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
587
587
  declare const NearAuthorizationResponseSchema: z.ZodObject<{
588
- nearAccount: z.ZodString;
589
- authorized: z.ZodBoolean;
588
+ signerId: z.ZodString;
589
+ isAuthorized: z.ZodBoolean;
590
590
  }, "strip", z.ZodTypeAny, {
591
- nearAccount: string;
592
- authorized: boolean;
591
+ signerId: string;
592
+ isAuthorized: boolean;
593
593
  }, {
594
- nearAccount: string;
595
- authorized: boolean;
594
+ signerId: string;
595
+ isAuthorized: boolean;
596
596
  }>;
597
597
  declare const NearAuthorizationStatusResponseSchema: z.ZodObject<{
598
- nearAccount: z.ZodString;
599
- authorized: z.ZodBoolean;
598
+ signerId: z.ZodString;
599
+ isAuthorized: z.ZodBoolean;
600
600
  authorizedAt: z.ZodOptional<z.ZodString>;
601
601
  }, "strip", z.ZodTypeAny, {
602
- nearAccount: string;
603
- authorized: boolean;
602
+ signerId: string;
603
+ isAuthorized: boolean;
604
604
  authorizedAt?: string | undefined;
605
605
  }, {
606
- nearAccount: string;
607
- authorized: boolean;
606
+ signerId: string;
607
+ isAuthorized: boolean;
608
608
  authorizedAt?: string | undefined;
609
609
  }>;
610
610
  type PlatformParam = z.infer<typeof PlatformParamSchema>;
@@ -2406,6 +2406,7 @@ declare const RateLimitResponseSchema: z.ZodObject<{
2406
2406
  }>>;
2407
2407
  signerId: z.ZodString;
2408
2408
  }, "strip", z.ZodTypeAny, {
2409
+ signerId: string;
2409
2410
  platformLimits: {
2410
2411
  platform: Platform;
2411
2412
  endpoints: Record<string, {
@@ -2424,8 +2425,8 @@ declare const RateLimitResponseSchema: z.ZodObject<{
2424
2425
  resetSeconds: number;
2425
2426
  timeWindow: string;
2426
2427
  }>;
2427
- signerId: string;
2428
2428
  }, {
2429
+ signerId: string;
2429
2430
  platformLimits: {
2430
2431
  platform: Platform;
2431
2432
  endpoints: Record<string, {
@@ -2444,7 +2445,6 @@ declare const RateLimitResponseSchema: z.ZodObject<{
2444
2445
  resetSeconds: number;
2445
2446
  timeWindow: string;
2446
2447
  }>;
2447
- signerId: string;
2448
2448
  }>;
2449
2449
  declare const EndpointRateLimitResponseSchema: z.ZodObject<{
2450
2450
  platformLimits: z.ZodArray<z.ZodObject<{
@@ -2512,6 +2512,7 @@ declare const EndpointRateLimitResponseSchema: z.ZodObject<{
2512
2512
  endpoint: z.ZodString;
2513
2513
  signerId: z.ZodString;
2514
2514
  }, "strip", z.ZodTypeAny, {
2515
+ signerId: string;
2515
2516
  endpoint: string;
2516
2517
  platformLimits: {
2517
2518
  status: {
@@ -2523,7 +2524,6 @@ declare const EndpointRateLimitResponseSchema: z.ZodObject<{
2523
2524
  };
2524
2525
  platform: Platform;
2525
2526
  }[];
2526
- signerId: string;
2527
2527
  usageLimit: {
2528
2528
  remaining: number;
2529
2529
  limit: number;
@@ -2533,6 +2533,7 @@ declare const EndpointRateLimitResponseSchema: z.ZodObject<{
2533
2533
  timeWindow: string;
2534
2534
  };
2535
2535
  }, {
2536
+ signerId: string;
2536
2537
  endpoint: string;
2537
2538
  platformLimits: {
2538
2539
  status: {
@@ -2544,7 +2545,6 @@ declare const EndpointRateLimitResponseSchema: z.ZodObject<{
2544
2545
  };
2545
2546
  platform: Platform;
2546
2547
  }[];
2547
- signerId: string;
2548
2548
  usageLimit: {
2549
2549
  remaining: number;
2550
2550
  limit: number;
@@ -2864,6 +2864,7 @@ declare const AccountActivityResponseSchema: z.ZodObject<{
2864
2864
  score: number;
2865
2865
  }>, "many">;
2866
2866
  }, "strip", z.ZodTypeAny, {
2867
+ signerId: string;
2867
2868
  platforms: {
2868
2869
  platform: Platform;
2869
2870
  quotes: number;
@@ -2874,7 +2875,6 @@ declare const AccountActivityResponseSchema: z.ZodObject<{
2874
2875
  reposts: number;
2875
2876
  score: number;
2876
2877
  }[];
2877
- signerId: string;
2878
2878
  timeframe: TimePeriod;
2879
2879
  totalPosts: number;
2880
2880
  totalLikes: number;
@@ -2885,6 +2885,7 @@ declare const AccountActivityResponseSchema: z.ZodObject<{
2885
2885
  rank: number;
2886
2886
  lastActive: string;
2887
2887
  }, {
2888
+ signerId: string;
2888
2889
  platforms: {
2889
2890
  platform: Platform;
2890
2891
  quotes: number;
@@ -2895,7 +2896,6 @@ declare const AccountActivityResponseSchema: z.ZodObject<{
2895
2896
  reposts: number;
2896
2897
  score: number;
2897
2898
  }[];
2898
- signerId: string;
2899
2899
  timeframe: TimePeriod;
2900
2900
  totalPosts: number;
2901
2901
  totalLikes: number;
@@ -3073,6 +3073,7 @@ declare const AccountPostsResponseSchema: z.ZodObject<{
3073
3073
  platforms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3074
3074
  types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3075
3075
  }, "strip", z.ZodTypeAny, {
3076
+ signerId: string;
3076
3077
  posts: {
3077
3078
  type: ActivityType;
3078
3079
  platform: Platform;
@@ -3090,10 +3091,10 @@ declare const AccountPostsResponseSchema: z.ZodObject<{
3090
3091
  quotedPostId?: string | undefined;
3091
3092
  content?: string | undefined;
3092
3093
  }[];
3093
- signerId: string;
3094
3094
  platforms?: string[] | undefined;
3095
3095
  types?: string[] | undefined;
3096
3096
  }, {
3097
+ signerId: string;
3097
3098
  posts: {
3098
3099
  type: ActivityType;
3099
3100
  platform: Platform;
@@ -3111,7 +3112,6 @@ declare const AccountPostsResponseSchema: z.ZodObject<{
3111
3112
  quotedPostId?: string | undefined;
3112
3113
  content?: string | undefined;
3113
3114
  }[];
3114
- signerId: string;
3115
3115
  platforms?: string[] | undefined;
3116
3116
  types?: string[] | undefined;
3117
3117
  }>;
package/dist/index.js CHANGED
@@ -202,12 +202,12 @@ var NearAuthorizationRequestSchema = z5.object({
202
202
  // No additional parameters needed, as the NEAR account ID is extracted from the signature
203
203
  }).describe("NEAR authorization request");
204
204
  var NearAuthorizationResponseSchema = z5.object({
205
- nearAccount: z5.string().describe("NEAR account ID"),
206
- authorized: z5.boolean().describe("Whether the account is authorized")
205
+ signerId: z5.string().describe("NEAR account ID"),
206
+ isAuthorized: z5.boolean().describe("Whether the account is authorized")
207
207
  }).describe("NEAR authorization response");
208
208
  var NearAuthorizationStatusResponseSchema = z5.object({
209
- nearAccount: z5.string().describe("NEAR account ID"),
210
- authorized: z5.boolean().describe("Whether the account is authorized"),
209
+ signerId: z5.string().describe("NEAR account ID"),
210
+ isAuthorized: z5.boolean().describe("Whether the account is authorized"),
211
211
  authorizedAt: z5.string().optional().describe("When the account was authorized")
212
212
  }).describe("NEAR authorization status response");
213
213
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crosspost/types",
3
- "version": "0.2.1",
3
+ "version": "0.2.4",
4
4
  "description": "Shared type definitions for Crosspost API",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
package/src/auth.ts CHANGED
@@ -84,13 +84,13 @@ export const NearAuthorizationRequestSchema = z.object({
84
84
  }).describe('NEAR authorization request');
85
85
 
86
86
  export const NearAuthorizationResponseSchema = z.object({
87
- nearAccount: z.string().describe('NEAR account ID'),
88
- authorized: z.boolean().describe('Whether the account is authorized'),
87
+ signerId: z.string().describe('NEAR account ID'),
88
+ isAuthorized: z.boolean().describe('Whether the account is authorized'),
89
89
  }).describe('NEAR authorization response');
90
90
 
91
91
  export const NearAuthorizationStatusResponseSchema = z.object({
92
- nearAccount: z.string().describe('NEAR account ID'),
93
- authorized: z.boolean().describe('Whether the account is authorized'),
92
+ signerId: z.string().describe('NEAR account ID'),
93
+ isAuthorized: z.boolean().describe('Whether the account is authorized'),
94
94
  authorizedAt: z.string().optional().describe('When the account was authorized'),
95
95
  }).describe('NEAR authorization status response');
96
96
 
package/src/response.ts CHANGED
@@ -43,7 +43,7 @@ export const MultiStatusDataSchema = z.object({
43
43
 
44
44
  export interface ApiResponse<T> {
45
45
  success: boolean;
46
- data?: T | MultiStatusData | null; // Allow null for success without data, updated type name
46
+ data?: T | null; // Allow null for success without data, updated type name
47
47
  errors?: ErrorDetail[] | null; // Allow null for success
48
48
  meta: ResponseMeta; // Mandatory, holds request id
49
49
  }