@natsuneko-laboratory/catalyst-sdk 0.7.1 → 0.7.3

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.d.mts CHANGED
@@ -53,8 +53,8 @@ interface EgeriaUpdateProfileRequest {
53
53
  }
54
54
 
55
55
  interface MediaMetadata {
56
- width?: number;
57
- height?: number;
56
+ width: number | null;
57
+ height: number | null;
58
58
  isSensitive: boolean;
59
59
  isSpoiler: boolean;
60
60
  }
@@ -62,8 +62,10 @@ interface Media {
62
62
  id: string;
63
63
  alt: string;
64
64
  url: string;
65
- metadata?: MediaMetadata;
65
+ order: number;
66
+ metadata: MediaMetadata | null;
66
67
  privacyMetadata?: boolean;
68
+ blurhash?: string | null;
67
69
  }
68
70
  interface MediaUploadUrls {
69
71
  url: string;
@@ -83,17 +85,188 @@ interface MediaDownloadRequest {
83
85
  url: string;
84
86
  }
85
87
 
88
+ interface CatalystReaction {
89
+ name: string;
90
+ symbol: string;
91
+ url: string;
92
+ count: number;
93
+ hasSelfReaction?: boolean;
94
+ }
95
+ interface CatalystReactions {
96
+ reactions: Record<string, CatalystReaction>;
97
+ }
98
+ interface CatalystCustomReaction {
99
+ id: string;
100
+ name: string;
101
+ symbol: string;
102
+ url: string;
103
+ }
104
+ type CatalystCustomReactionStatus = "active" | "moderated" | "hidden" | "disabled";
105
+ type SupporterTier = "none" | "tier_0" | "tier_1" | "tier_2" | "tier_3" | "tier_4" | "tier_5";
106
+ interface CatalystUserCustomReaction {
107
+ id: string;
108
+ shortcode: string;
109
+ displayName: string;
110
+ imageUrl: string;
111
+ mimeType: string;
112
+ sortOrder: number;
113
+ status: CatalystCustomReactionStatus;
114
+ createdAt: string;
115
+ }
116
+ interface CatalystCustomReactionList {
117
+ plan: SupporterTier;
118
+ limit: number;
119
+ used: number;
120
+ items: CatalystUserCustomReaction[];
121
+ }
122
+ interface UpdateCustomReactionRequest {
123
+ displayName?: string;
124
+ sortOrder?: number;
125
+ }
126
+
127
+ interface CatalystCreateContestRequest {
128
+ title: string;
129
+ description: string;
130
+ theme: string;
131
+ }
132
+ interface CatalystEditContestRequest {
133
+ title?: string;
134
+ description?: string;
135
+ theme?: string;
136
+ terms?: string;
137
+ headerUrl?: string;
138
+ bannerUrl?: string;
139
+ winnersOpenAt?: string;
140
+ winnersMessageSendAt?: string;
141
+ publishedAt?: string;
142
+ application?: {
143
+ since?: string;
144
+ until?: string;
145
+ allowSensitive: boolean;
146
+ maxMediaPerEntry?: number | null;
147
+ };
148
+ voting?: {
149
+ since?: string;
150
+ until?: string;
151
+ maxVotes?: number;
152
+ isEnableVoting?: boolean;
153
+ };
154
+ winners?: {
155
+ since?: string;
156
+ until?: string;
157
+ };
158
+ ranks?: Omit<CatalystContestRank, "id" | "winners">[];
159
+ }
160
+ interface CatalystContestRank {
161
+ id: string;
162
+ name: string;
163
+ description?: string;
164
+ count: number;
165
+ prize: string;
166
+ winners: EgeriaUser[];
167
+ }
168
+ type CatalystContestState = "draft" | "published" | "opening" | "closing" | "voting" | "electing" | "closed";
169
+ interface CatalystContest {
170
+ slug: string;
171
+ draft: boolean;
172
+ state: CatalystContestState;
173
+ title: string;
174
+ description: string;
175
+ theme: string;
176
+ terms: string;
177
+ headerUrl: string;
178
+ bannerUrl: string;
179
+ organizer: EgeriaUser;
180
+ winnersOpenAt: string;
181
+ winnersMessageSendAt: string;
182
+ publishedAt: string;
183
+ since: string;
184
+ until: string;
185
+ allowSensitive: boolean;
186
+ maxMediaPerEntry: number | null;
187
+ voting: {
188
+ since: string;
189
+ until: string;
190
+ maxVotes: number;
191
+ isEnable: boolean;
192
+ };
193
+ ranks: CatalystContestRank[];
194
+ }
195
+ interface CatalystContestAward {
196
+ id: string;
197
+ name: string;
198
+ winners: (CatalystStatus & {
199
+ message?: string | null;
200
+ commentary?: string | null;
201
+ attachment?: {
202
+ name: string;
203
+ id: string;
204
+ } | null;
205
+ })[];
206
+ order: number;
207
+ count: number;
208
+ remaining: number;
209
+ }
210
+ interface CatalystSetContestAwardRequest {
211
+ status: string;
212
+ message?: string;
213
+ commentary?: string;
214
+ }
215
+ interface CatalystUnsetContestAwardRequest {
216
+ status: string;
217
+ message?: string;
218
+ commentary?: string;
219
+ }
220
+ interface CatalystContestCollaborator {
221
+ user: Omit<EgeriaUser, "profile">;
222
+ role: "admin" | "collaborator" | "contributor";
223
+ }
224
+ interface CatalystContestAddCollaboratorRequest {
225
+ userId: string;
226
+ role: "collaborator" | "contributor";
227
+ }
228
+ interface CatalystContestRemoveCollaboratorRequest {
229
+ userId: string;
230
+ }
231
+ interface CatalystContestPolls {
232
+ status: CatalystStatus;
233
+ count: number;
234
+ }
235
+ interface CatalystUserVoteRights {
236
+ remaining: number;
237
+ statuses: string[];
238
+ }
239
+
86
240
  type CatalystStatusPrivacy = "public" | "quiet_public" | "followers" | "private";
241
+ type CatalystStatusContest = Pick<CatalystContest, "slug" | "title" | "headerUrl" | "bannerUrl">;
87
242
  interface CatalystStatus {
88
243
  id: string;
89
244
  body: string;
90
- user?: EgeriaUser;
245
+ user: EgeriaUser | null;
246
+ medias: Media[];
247
+ contest: CatalystStatusContest | null;
248
+ createdAt: string;
249
+ /** @deprecated 常に空配列。リアクションは reactions()/bulkStatusReactions() を利用すること */
250
+ reactions: unknown[];
251
+ }
252
+ interface CatalystStatusVisitor {
253
+ favorite: boolean;
254
+ reactions?: string[];
255
+ }
256
+ interface CatalystStatusV1_1 {
257
+ id: string;
258
+ body: string;
259
+ user: EgeriaUser | null;
91
260
  medias: Media[];
261
+ contest: Pick<CatalystStatusContest, "slug" | "title" | "headerUrl"> | null;
262
+ reactions: Record<string, Omit<CatalystReaction, "hasSelfReaction">>;
92
263
  createdAt: string;
93
- updatedAt?: string;
264
+ updatedAt: string;
265
+ visitor?: CatalystStatusVisitor;
266
+ privacy: CatalystStatusPrivacy;
94
267
  }
95
268
  interface CatalystStatusWrapper {
96
- status: CatalystStatus;
269
+ status: CatalystStatusV1_1;
97
270
  }
98
271
  interface CatalystStatuses {
99
272
  statuses: CatalystStatus[];
@@ -134,7 +307,7 @@ interface CatalystSmartAlbum {
134
307
  until?: string;
135
308
  isPublic: boolean;
136
309
  mode: CatalystAlbumDisplayMode;
137
- user?: EgeriaUser;
310
+ user: EgeriaUser | null;
138
311
  type?: string;
139
312
  statuses: CatalystStatus[];
140
313
  hashtags: string[];
@@ -183,45 +356,6 @@ interface CatalystEditSmartAlbumRequest {
183
356
  mode?: CatalystAlbumDisplayMode;
184
357
  }
185
358
 
186
- interface CatalystReaction {
187
- name: string;
188
- symbol: string;
189
- url: string;
190
- count: number;
191
- hasSelfReaction?: boolean;
192
- }
193
- interface CatalystReactions {
194
- reactions: Record<string, CatalystReaction>;
195
- }
196
- interface CatalystCustomReaction {
197
- id: string;
198
- name: string;
199
- symbol: string;
200
- url: string;
201
- }
202
- type CatalystCustomReactionStatus = "active" | "moderated" | "hidden" | "disabled";
203
- type SupporterTier = "none" | "tier_0" | "tier_1" | "tier_2" | "tier_3" | "tier_4" | "tier_5";
204
- interface CatalystUserCustomReaction {
205
- id: string;
206
- shortcode: string;
207
- displayName: string;
208
- imageUrl: string;
209
- mimeType: string;
210
- sortOrder: number;
211
- status: CatalystCustomReactionStatus;
212
- createdAt: string;
213
- }
214
- interface CatalystCustomReactionList {
215
- plan: SupporterTier;
216
- limit: number;
217
- used: number;
218
- items: CatalystUserCustomReaction[];
219
- }
220
- interface UpdateCustomReactionRequest {
221
- displayName?: string;
222
- sortOrder?: number;
223
- }
224
-
225
359
  interface CatalystRelationships {
226
360
  isMyself: boolean;
227
361
  isFollowing: boolean;
@@ -304,6 +438,7 @@ interface CatalystFleetMedia {
304
438
  interface CatalystFleet extends CatalystReactions {
305
439
  id: string;
306
440
  backgroundColor: string;
441
+ renderedImageUrl: string | null;
307
442
  user: EgeriaUser;
308
443
  texts: CatalystFleetText[];
309
444
  media: CatalystFleetMedia | null;
@@ -322,117 +457,6 @@ interface CatalystFleetRing {
322
457
  fleetCount: number;
323
458
  }
324
459
 
325
- interface CatalystCreateContestRequest {
326
- title: string;
327
- description: string;
328
- theme: string;
329
- }
330
- interface CatalystEditContestRequest {
331
- title?: string;
332
- description?: string;
333
- theme?: string;
334
- terms?: string;
335
- headerUrl?: string;
336
- bannerUrl?: string;
337
- winnersOpenAt?: string;
338
- winnersMessageSendAt?: string;
339
- publishedAt?: string;
340
- application?: {
341
- since?: string;
342
- until?: string;
343
- allowSensitive: boolean;
344
- maxMediaPerEntry?: number;
345
- };
346
- voting?: {
347
- since?: string;
348
- until?: string;
349
- maxVotes?: number;
350
- isEnableVoting?: boolean;
351
- };
352
- ranks?: Omit<CatalystContestRank, "id" | "winners">[];
353
- }
354
- interface CatalystContestRank {
355
- id: string;
356
- name: string;
357
- description?: string;
358
- count: number;
359
- prize: string;
360
- winners: EgeriaUser[];
361
- }
362
- interface CatalystContest {
363
- slug: string;
364
- draft: boolean;
365
- state: string;
366
- title: string;
367
- description: string;
368
- theme: string;
369
- terms: string;
370
- headerUrl: string;
371
- bannerUrl: string;
372
- winnersOpenAt: string;
373
- winnersMessageSendAt: string;
374
- publishedAt: string;
375
- since: string;
376
- until: string;
377
- allowSensitive: boolean;
378
- maxMediaPerEntry: number | null;
379
- voting: {
380
- since: string;
381
- until: string;
382
- maxVotes: number;
383
- isEnable: boolean;
384
- };
385
- winners: {
386
- since: string;
387
- until: string;
388
- };
389
- ranks: CatalystContestRank[];
390
- }
391
- interface CatalystContestAward {
392
- id: string;
393
- name: string;
394
- winners: CatalystStatus & {
395
- message?: string | null;
396
- commentary?: string | null;
397
- attachment?: {
398
- name: string;
399
- id: string;
400
- } | null;
401
- }[];
402
- order: number;
403
- count: number;
404
- remaining: number;
405
- }
406
- interface CatalystSetContestAwardRequest {
407
- status: string;
408
- message?: string;
409
- commentary?: string;
410
- }
411
- interface CatalystUnsetContestAwardRequest {
412
- status: string;
413
- message?: string;
414
- commentary?: string;
415
- }
416
- interface CatalystContestCollaborator {
417
- user: Omit<EgeriaUser, "profile">;
418
- role: "admin" | "collaborator" | "contributor";
419
- }
420
- interface CatalystContestAddCollaboratorRequest {
421
- userId: string;
422
- role: "collaborator" | "contributor";
423
- }
424
- interface CatalystContestRemoveCollaboratorRequest {
425
- userId: string;
426
- }
427
- interface CatalystContestPolls {
428
- status: CatalystStatus;
429
- count: number;
430
- }
431
- interface CatalystUserVoteRights {
432
- remaining: number;
433
- statuses: string[];
434
- }
435
-
436
460
  interface ReportRequest {
437
461
  reason: "nsfw" | "tos_violation" | "harassment" | "spam" | "other";
438
462
  description?: string;
@@ -564,7 +588,7 @@ declare class CatalystClient {
564
588
  firehoseTimeline(opts?: {
565
589
  since?: string;
566
590
  until?: string;
567
- }): Promise<CatalystStatus[]>;
591
+ }): Promise<CatalystStatusV1_1[]>;
568
592
  galleryTimeline(opts?: {
569
593
  since?: string;
570
594
  until?: string;
@@ -572,7 +596,7 @@ declare class CatalystClient {
572
596
  homeTimeline(opts?: {
573
597
  since?: string;
574
598
  until?: string;
575
- }): Promise<CatalystStatus[]>;
599
+ }): Promise<CatalystStatusV1_1[]>;
576
600
  searchTimeline(opts?: {
577
601
  q?: string;
578
602
  exact?: boolean;
@@ -611,7 +635,7 @@ declare class CatalystClient {
611
635
  setContestAward(slug: string, id: string, data: CatalystSetContestAwardRequest): Promise<void>;
612
636
  unsetContestAward(slug: string, id: string, data: CatalystUnsetContestAwardRequest): Promise<void>;
613
637
  getContestCollaborators(slug: string): Promise<{
614
- collaborators: string[];
638
+ collaborators: CatalystContestCollaborator[];
615
639
  }>;
616
640
  addContestCollaborator(slug: string, data: CatalystContestAddCollaboratorRequest): Promise<void>;
617
641
  removeContestCollaborator(slug: string, data: CatalystContestRemoveCollaboratorRequest): Promise<void>;
@@ -1031,4 +1055,4 @@ declare class LoggingInterceptor implements RequestInterceptor {
1031
1055
  retry(request: Request, error: unknown): Promise<boolean>;
1032
1056
  }
1033
1057
 
1034
- export { ApiError, AuthInterceptor, type CatalystAlbum, type CatalystAlbumDisplayMode, type CatalystAnnouncement, CatalystClient, type CatalystContest, type CatalystContestAddCollaboratorRequest, type CatalystContestAward, type CatalystContestCollaborator, type CatalystContestPolls, type CatalystContestRank, type CatalystContestRemoveCollaboratorRequest, type CatalystCreateAlbumRequest, type CatalystCreateContestRequest, type CatalystCreateFleetMedia, type CatalystCreateFleetRequest, type CatalystCreateFleetSticker, type CatalystCreateFleetText, type CatalystCreateSmartAlbumRequest, type CatalystCreateStatusRequest, type CatalystCustomReaction, type CatalystCustomReactionList, type CatalystCustomReactionStatus, type CatalystEditAlbumRequest, type CatalystEditContestRequest, type CatalystEditSmartAlbumRequest, type CatalystEditStatusRequest, CatalystEndpoint, CatalystError, type CatalystFleet, type CatalystFleetMedia, type CatalystFleetRing, type CatalystFleetSticker, type CatalystFleetText, type CatalystFleetViewer, type CatalystInsertToAlbumRequest, type CatalystMediaWithMetadata, type CatalystPrivacySettings, type CatalystPrivacySettingsRequest, type CatalystReaction, type CatalystReactions, type CatalystRelationshipRequest, type CatalystRelationships, type CatalystRemoveFromAlbumRequest, type CatalystSetContestAwardRequest, type CatalystSmartAlbum, type CatalystSmartAlbums, type CatalystStatus, type CatalystStatusPrivacy, type CatalystStatusWrapper, type CatalystStatuses, CatalystTS, type CatalystTSOptions, type CatalystUnsetContestAwardRequest, type CatalystUserCustomReaction, type CatalystUserVoteRights, EgeriaClient, EgeriaEndpoint, type EgeriaUpdateProfileRequest, type EgeriaUser, type EgeriaUserProfile, type EgeriaUserWrapper, type EgeriaUsers, type Endpoint, HttpClient, type HttpMethod, ISSUER_CATALYST_SYSTEM_MESSAGE, ISSUER_CATALYST_USER_MESSAGE, ISSUER_EGERIA_SYSTEM_MESSAGE, type Identity, LoggingInterceptor, type Media, MediaClient, type MediaDeleteRequest, type MediaDownloadRequest, MediaEndpoint, type MediaMetadata, type MediaUploadUrls, type Notification, type NotificationAdditionalContext, type NotificationGroup, type NotificationUnreadCount, type Notifications, OAuth, OAuthError, PKCE, PUBLIC_API_ENDPOINT, PUBLIC_AUTHORIZE_ENDPOINT, PUBLIC_GRAPHQL_ENDPOINT, type ProfileTag, type ProfileTagSuggestion, type ProfileTagUser, type ReportRequest, type RequestInterceptor, SteambirdClient, SteambirdEndpoint, type SupporterTier, type Token, type UpdateCustomReactionRequest, type UpdateProfileTagsRequest, UserAgentInterceptor };
1058
+ export { ApiError, AuthInterceptor, type CatalystAlbum, type CatalystAlbumDisplayMode, type CatalystAnnouncement, CatalystClient, type CatalystContest, type CatalystContestAddCollaboratorRequest, type CatalystContestAward, type CatalystContestCollaborator, type CatalystContestPolls, type CatalystContestRank, type CatalystContestRemoveCollaboratorRequest, type CatalystContestState, type CatalystCreateAlbumRequest, type CatalystCreateContestRequest, type CatalystCreateFleetMedia, type CatalystCreateFleetRequest, type CatalystCreateFleetSticker, type CatalystCreateFleetText, type CatalystCreateSmartAlbumRequest, type CatalystCreateStatusRequest, type CatalystCustomReaction, type CatalystCustomReactionList, type CatalystCustomReactionStatus, type CatalystEditAlbumRequest, type CatalystEditContestRequest, type CatalystEditSmartAlbumRequest, type CatalystEditStatusRequest, CatalystEndpoint, CatalystError, type CatalystFleet, type CatalystFleetMedia, type CatalystFleetRing, type CatalystFleetSticker, type CatalystFleetText, type CatalystFleetViewer, type CatalystInsertToAlbumRequest, type CatalystMediaWithMetadata, type CatalystPrivacySettings, type CatalystPrivacySettingsRequest, type CatalystReaction, type CatalystReactions, type CatalystRelationshipRequest, type CatalystRelationships, type CatalystRemoveFromAlbumRequest, type CatalystSetContestAwardRequest, type CatalystSmartAlbum, type CatalystSmartAlbums, type CatalystStatus, type CatalystStatusContest, type CatalystStatusPrivacy, type CatalystStatusV1_1, type CatalystStatusVisitor, type CatalystStatusWrapper, type CatalystStatuses, CatalystTS, type CatalystTSOptions, type CatalystUnsetContestAwardRequest, type CatalystUserCustomReaction, type CatalystUserVoteRights, EgeriaClient, EgeriaEndpoint, type EgeriaUpdateProfileRequest, type EgeriaUser, type EgeriaUserProfile, type EgeriaUserWrapper, type EgeriaUsers, type Endpoint, HttpClient, type HttpMethod, ISSUER_CATALYST_SYSTEM_MESSAGE, ISSUER_CATALYST_USER_MESSAGE, ISSUER_EGERIA_SYSTEM_MESSAGE, type Identity, LoggingInterceptor, type Media, MediaClient, type MediaDeleteRequest, type MediaDownloadRequest, MediaEndpoint, type MediaMetadata, type MediaUploadUrls, type Notification, type NotificationAdditionalContext, type NotificationGroup, type NotificationUnreadCount, type Notifications, OAuth, OAuthError, PKCE, PUBLIC_API_ENDPOINT, PUBLIC_AUTHORIZE_ENDPOINT, PUBLIC_GRAPHQL_ENDPOINT, type ProfileTag, type ProfileTagSuggestion, type ProfileTagUser, type ReportRequest, type RequestInterceptor, SteambirdClient, SteambirdEndpoint, type SupporterTier, type Token, type UpdateCustomReactionRequest, type UpdateProfileTagsRequest, UserAgentInterceptor };
package/dist/index.d.ts CHANGED
@@ -53,8 +53,8 @@ interface EgeriaUpdateProfileRequest {
53
53
  }
54
54
 
55
55
  interface MediaMetadata {
56
- width?: number;
57
- height?: number;
56
+ width: number | null;
57
+ height: number | null;
58
58
  isSensitive: boolean;
59
59
  isSpoiler: boolean;
60
60
  }
@@ -62,8 +62,10 @@ interface Media {
62
62
  id: string;
63
63
  alt: string;
64
64
  url: string;
65
- metadata?: MediaMetadata;
65
+ order: number;
66
+ metadata: MediaMetadata | null;
66
67
  privacyMetadata?: boolean;
68
+ blurhash?: string | null;
67
69
  }
68
70
  interface MediaUploadUrls {
69
71
  url: string;
@@ -83,17 +85,188 @@ interface MediaDownloadRequest {
83
85
  url: string;
84
86
  }
85
87
 
88
+ interface CatalystReaction {
89
+ name: string;
90
+ symbol: string;
91
+ url: string;
92
+ count: number;
93
+ hasSelfReaction?: boolean;
94
+ }
95
+ interface CatalystReactions {
96
+ reactions: Record<string, CatalystReaction>;
97
+ }
98
+ interface CatalystCustomReaction {
99
+ id: string;
100
+ name: string;
101
+ symbol: string;
102
+ url: string;
103
+ }
104
+ type CatalystCustomReactionStatus = "active" | "moderated" | "hidden" | "disabled";
105
+ type SupporterTier = "none" | "tier_0" | "tier_1" | "tier_2" | "tier_3" | "tier_4" | "tier_5";
106
+ interface CatalystUserCustomReaction {
107
+ id: string;
108
+ shortcode: string;
109
+ displayName: string;
110
+ imageUrl: string;
111
+ mimeType: string;
112
+ sortOrder: number;
113
+ status: CatalystCustomReactionStatus;
114
+ createdAt: string;
115
+ }
116
+ interface CatalystCustomReactionList {
117
+ plan: SupporterTier;
118
+ limit: number;
119
+ used: number;
120
+ items: CatalystUserCustomReaction[];
121
+ }
122
+ interface UpdateCustomReactionRequest {
123
+ displayName?: string;
124
+ sortOrder?: number;
125
+ }
126
+
127
+ interface CatalystCreateContestRequest {
128
+ title: string;
129
+ description: string;
130
+ theme: string;
131
+ }
132
+ interface CatalystEditContestRequest {
133
+ title?: string;
134
+ description?: string;
135
+ theme?: string;
136
+ terms?: string;
137
+ headerUrl?: string;
138
+ bannerUrl?: string;
139
+ winnersOpenAt?: string;
140
+ winnersMessageSendAt?: string;
141
+ publishedAt?: string;
142
+ application?: {
143
+ since?: string;
144
+ until?: string;
145
+ allowSensitive: boolean;
146
+ maxMediaPerEntry?: number | null;
147
+ };
148
+ voting?: {
149
+ since?: string;
150
+ until?: string;
151
+ maxVotes?: number;
152
+ isEnableVoting?: boolean;
153
+ };
154
+ winners?: {
155
+ since?: string;
156
+ until?: string;
157
+ };
158
+ ranks?: Omit<CatalystContestRank, "id" | "winners">[];
159
+ }
160
+ interface CatalystContestRank {
161
+ id: string;
162
+ name: string;
163
+ description?: string;
164
+ count: number;
165
+ prize: string;
166
+ winners: EgeriaUser[];
167
+ }
168
+ type CatalystContestState = "draft" | "published" | "opening" | "closing" | "voting" | "electing" | "closed";
169
+ interface CatalystContest {
170
+ slug: string;
171
+ draft: boolean;
172
+ state: CatalystContestState;
173
+ title: string;
174
+ description: string;
175
+ theme: string;
176
+ terms: string;
177
+ headerUrl: string;
178
+ bannerUrl: string;
179
+ organizer: EgeriaUser;
180
+ winnersOpenAt: string;
181
+ winnersMessageSendAt: string;
182
+ publishedAt: string;
183
+ since: string;
184
+ until: string;
185
+ allowSensitive: boolean;
186
+ maxMediaPerEntry: number | null;
187
+ voting: {
188
+ since: string;
189
+ until: string;
190
+ maxVotes: number;
191
+ isEnable: boolean;
192
+ };
193
+ ranks: CatalystContestRank[];
194
+ }
195
+ interface CatalystContestAward {
196
+ id: string;
197
+ name: string;
198
+ winners: (CatalystStatus & {
199
+ message?: string | null;
200
+ commentary?: string | null;
201
+ attachment?: {
202
+ name: string;
203
+ id: string;
204
+ } | null;
205
+ })[];
206
+ order: number;
207
+ count: number;
208
+ remaining: number;
209
+ }
210
+ interface CatalystSetContestAwardRequest {
211
+ status: string;
212
+ message?: string;
213
+ commentary?: string;
214
+ }
215
+ interface CatalystUnsetContestAwardRequest {
216
+ status: string;
217
+ message?: string;
218
+ commentary?: string;
219
+ }
220
+ interface CatalystContestCollaborator {
221
+ user: Omit<EgeriaUser, "profile">;
222
+ role: "admin" | "collaborator" | "contributor";
223
+ }
224
+ interface CatalystContestAddCollaboratorRequest {
225
+ userId: string;
226
+ role: "collaborator" | "contributor";
227
+ }
228
+ interface CatalystContestRemoveCollaboratorRequest {
229
+ userId: string;
230
+ }
231
+ interface CatalystContestPolls {
232
+ status: CatalystStatus;
233
+ count: number;
234
+ }
235
+ interface CatalystUserVoteRights {
236
+ remaining: number;
237
+ statuses: string[];
238
+ }
239
+
86
240
  type CatalystStatusPrivacy = "public" | "quiet_public" | "followers" | "private";
241
+ type CatalystStatusContest = Pick<CatalystContest, "slug" | "title" | "headerUrl" | "bannerUrl">;
87
242
  interface CatalystStatus {
88
243
  id: string;
89
244
  body: string;
90
- user?: EgeriaUser;
245
+ user: EgeriaUser | null;
246
+ medias: Media[];
247
+ contest: CatalystStatusContest | null;
248
+ createdAt: string;
249
+ /** @deprecated 常に空配列。リアクションは reactions()/bulkStatusReactions() を利用すること */
250
+ reactions: unknown[];
251
+ }
252
+ interface CatalystStatusVisitor {
253
+ favorite: boolean;
254
+ reactions?: string[];
255
+ }
256
+ interface CatalystStatusV1_1 {
257
+ id: string;
258
+ body: string;
259
+ user: EgeriaUser | null;
91
260
  medias: Media[];
261
+ contest: Pick<CatalystStatusContest, "slug" | "title" | "headerUrl"> | null;
262
+ reactions: Record<string, Omit<CatalystReaction, "hasSelfReaction">>;
92
263
  createdAt: string;
93
- updatedAt?: string;
264
+ updatedAt: string;
265
+ visitor?: CatalystStatusVisitor;
266
+ privacy: CatalystStatusPrivacy;
94
267
  }
95
268
  interface CatalystStatusWrapper {
96
- status: CatalystStatus;
269
+ status: CatalystStatusV1_1;
97
270
  }
98
271
  interface CatalystStatuses {
99
272
  statuses: CatalystStatus[];
@@ -134,7 +307,7 @@ interface CatalystSmartAlbum {
134
307
  until?: string;
135
308
  isPublic: boolean;
136
309
  mode: CatalystAlbumDisplayMode;
137
- user?: EgeriaUser;
310
+ user: EgeriaUser | null;
138
311
  type?: string;
139
312
  statuses: CatalystStatus[];
140
313
  hashtags: string[];
@@ -183,45 +356,6 @@ interface CatalystEditSmartAlbumRequest {
183
356
  mode?: CatalystAlbumDisplayMode;
184
357
  }
185
358
 
186
- interface CatalystReaction {
187
- name: string;
188
- symbol: string;
189
- url: string;
190
- count: number;
191
- hasSelfReaction?: boolean;
192
- }
193
- interface CatalystReactions {
194
- reactions: Record<string, CatalystReaction>;
195
- }
196
- interface CatalystCustomReaction {
197
- id: string;
198
- name: string;
199
- symbol: string;
200
- url: string;
201
- }
202
- type CatalystCustomReactionStatus = "active" | "moderated" | "hidden" | "disabled";
203
- type SupporterTier = "none" | "tier_0" | "tier_1" | "tier_2" | "tier_3" | "tier_4" | "tier_5";
204
- interface CatalystUserCustomReaction {
205
- id: string;
206
- shortcode: string;
207
- displayName: string;
208
- imageUrl: string;
209
- mimeType: string;
210
- sortOrder: number;
211
- status: CatalystCustomReactionStatus;
212
- createdAt: string;
213
- }
214
- interface CatalystCustomReactionList {
215
- plan: SupporterTier;
216
- limit: number;
217
- used: number;
218
- items: CatalystUserCustomReaction[];
219
- }
220
- interface UpdateCustomReactionRequest {
221
- displayName?: string;
222
- sortOrder?: number;
223
- }
224
-
225
359
  interface CatalystRelationships {
226
360
  isMyself: boolean;
227
361
  isFollowing: boolean;
@@ -304,6 +438,7 @@ interface CatalystFleetMedia {
304
438
  interface CatalystFleet extends CatalystReactions {
305
439
  id: string;
306
440
  backgroundColor: string;
441
+ renderedImageUrl: string | null;
307
442
  user: EgeriaUser;
308
443
  texts: CatalystFleetText[];
309
444
  media: CatalystFleetMedia | null;
@@ -322,117 +457,6 @@ interface CatalystFleetRing {
322
457
  fleetCount: number;
323
458
  }
324
459
 
325
- interface CatalystCreateContestRequest {
326
- title: string;
327
- description: string;
328
- theme: string;
329
- }
330
- interface CatalystEditContestRequest {
331
- title?: string;
332
- description?: string;
333
- theme?: string;
334
- terms?: string;
335
- headerUrl?: string;
336
- bannerUrl?: string;
337
- winnersOpenAt?: string;
338
- winnersMessageSendAt?: string;
339
- publishedAt?: string;
340
- application?: {
341
- since?: string;
342
- until?: string;
343
- allowSensitive: boolean;
344
- maxMediaPerEntry?: number;
345
- };
346
- voting?: {
347
- since?: string;
348
- until?: string;
349
- maxVotes?: number;
350
- isEnableVoting?: boolean;
351
- };
352
- ranks?: Omit<CatalystContestRank, "id" | "winners">[];
353
- }
354
- interface CatalystContestRank {
355
- id: string;
356
- name: string;
357
- description?: string;
358
- count: number;
359
- prize: string;
360
- winners: EgeriaUser[];
361
- }
362
- interface CatalystContest {
363
- slug: string;
364
- draft: boolean;
365
- state: string;
366
- title: string;
367
- description: string;
368
- theme: string;
369
- terms: string;
370
- headerUrl: string;
371
- bannerUrl: string;
372
- winnersOpenAt: string;
373
- winnersMessageSendAt: string;
374
- publishedAt: string;
375
- since: string;
376
- until: string;
377
- allowSensitive: boolean;
378
- maxMediaPerEntry: number | null;
379
- voting: {
380
- since: string;
381
- until: string;
382
- maxVotes: number;
383
- isEnable: boolean;
384
- };
385
- winners: {
386
- since: string;
387
- until: string;
388
- };
389
- ranks: CatalystContestRank[];
390
- }
391
- interface CatalystContestAward {
392
- id: string;
393
- name: string;
394
- winners: CatalystStatus & {
395
- message?: string | null;
396
- commentary?: string | null;
397
- attachment?: {
398
- name: string;
399
- id: string;
400
- } | null;
401
- }[];
402
- order: number;
403
- count: number;
404
- remaining: number;
405
- }
406
- interface CatalystSetContestAwardRequest {
407
- status: string;
408
- message?: string;
409
- commentary?: string;
410
- }
411
- interface CatalystUnsetContestAwardRequest {
412
- status: string;
413
- message?: string;
414
- commentary?: string;
415
- }
416
- interface CatalystContestCollaborator {
417
- user: Omit<EgeriaUser, "profile">;
418
- role: "admin" | "collaborator" | "contributor";
419
- }
420
- interface CatalystContestAddCollaboratorRequest {
421
- userId: string;
422
- role: "collaborator" | "contributor";
423
- }
424
- interface CatalystContestRemoveCollaboratorRequest {
425
- userId: string;
426
- }
427
- interface CatalystContestPolls {
428
- status: CatalystStatus;
429
- count: number;
430
- }
431
- interface CatalystUserVoteRights {
432
- remaining: number;
433
- statuses: string[];
434
- }
435
-
436
460
  interface ReportRequest {
437
461
  reason: "nsfw" | "tos_violation" | "harassment" | "spam" | "other";
438
462
  description?: string;
@@ -564,7 +588,7 @@ declare class CatalystClient {
564
588
  firehoseTimeline(opts?: {
565
589
  since?: string;
566
590
  until?: string;
567
- }): Promise<CatalystStatus[]>;
591
+ }): Promise<CatalystStatusV1_1[]>;
568
592
  galleryTimeline(opts?: {
569
593
  since?: string;
570
594
  until?: string;
@@ -572,7 +596,7 @@ declare class CatalystClient {
572
596
  homeTimeline(opts?: {
573
597
  since?: string;
574
598
  until?: string;
575
- }): Promise<CatalystStatus[]>;
599
+ }): Promise<CatalystStatusV1_1[]>;
576
600
  searchTimeline(opts?: {
577
601
  q?: string;
578
602
  exact?: boolean;
@@ -611,7 +635,7 @@ declare class CatalystClient {
611
635
  setContestAward(slug: string, id: string, data: CatalystSetContestAwardRequest): Promise<void>;
612
636
  unsetContestAward(slug: string, id: string, data: CatalystUnsetContestAwardRequest): Promise<void>;
613
637
  getContestCollaborators(slug: string): Promise<{
614
- collaborators: string[];
638
+ collaborators: CatalystContestCollaborator[];
615
639
  }>;
616
640
  addContestCollaborator(slug: string, data: CatalystContestAddCollaboratorRequest): Promise<void>;
617
641
  removeContestCollaborator(slug: string, data: CatalystContestRemoveCollaboratorRequest): Promise<void>;
@@ -1031,4 +1055,4 @@ declare class LoggingInterceptor implements RequestInterceptor {
1031
1055
  retry(request: Request, error: unknown): Promise<boolean>;
1032
1056
  }
1033
1057
 
1034
- export { ApiError, AuthInterceptor, type CatalystAlbum, type CatalystAlbumDisplayMode, type CatalystAnnouncement, CatalystClient, type CatalystContest, type CatalystContestAddCollaboratorRequest, type CatalystContestAward, type CatalystContestCollaborator, type CatalystContestPolls, type CatalystContestRank, type CatalystContestRemoveCollaboratorRequest, type CatalystCreateAlbumRequest, type CatalystCreateContestRequest, type CatalystCreateFleetMedia, type CatalystCreateFleetRequest, type CatalystCreateFleetSticker, type CatalystCreateFleetText, type CatalystCreateSmartAlbumRequest, type CatalystCreateStatusRequest, type CatalystCustomReaction, type CatalystCustomReactionList, type CatalystCustomReactionStatus, type CatalystEditAlbumRequest, type CatalystEditContestRequest, type CatalystEditSmartAlbumRequest, type CatalystEditStatusRequest, CatalystEndpoint, CatalystError, type CatalystFleet, type CatalystFleetMedia, type CatalystFleetRing, type CatalystFleetSticker, type CatalystFleetText, type CatalystFleetViewer, type CatalystInsertToAlbumRequest, type CatalystMediaWithMetadata, type CatalystPrivacySettings, type CatalystPrivacySettingsRequest, type CatalystReaction, type CatalystReactions, type CatalystRelationshipRequest, type CatalystRelationships, type CatalystRemoveFromAlbumRequest, type CatalystSetContestAwardRequest, type CatalystSmartAlbum, type CatalystSmartAlbums, type CatalystStatus, type CatalystStatusPrivacy, type CatalystStatusWrapper, type CatalystStatuses, CatalystTS, type CatalystTSOptions, type CatalystUnsetContestAwardRequest, type CatalystUserCustomReaction, type CatalystUserVoteRights, EgeriaClient, EgeriaEndpoint, type EgeriaUpdateProfileRequest, type EgeriaUser, type EgeriaUserProfile, type EgeriaUserWrapper, type EgeriaUsers, type Endpoint, HttpClient, type HttpMethod, ISSUER_CATALYST_SYSTEM_MESSAGE, ISSUER_CATALYST_USER_MESSAGE, ISSUER_EGERIA_SYSTEM_MESSAGE, type Identity, LoggingInterceptor, type Media, MediaClient, type MediaDeleteRequest, type MediaDownloadRequest, MediaEndpoint, type MediaMetadata, type MediaUploadUrls, type Notification, type NotificationAdditionalContext, type NotificationGroup, type NotificationUnreadCount, type Notifications, OAuth, OAuthError, PKCE, PUBLIC_API_ENDPOINT, PUBLIC_AUTHORIZE_ENDPOINT, PUBLIC_GRAPHQL_ENDPOINT, type ProfileTag, type ProfileTagSuggestion, type ProfileTagUser, type ReportRequest, type RequestInterceptor, SteambirdClient, SteambirdEndpoint, type SupporterTier, type Token, type UpdateCustomReactionRequest, type UpdateProfileTagsRequest, UserAgentInterceptor };
1058
+ export { ApiError, AuthInterceptor, type CatalystAlbum, type CatalystAlbumDisplayMode, type CatalystAnnouncement, CatalystClient, type CatalystContest, type CatalystContestAddCollaboratorRequest, type CatalystContestAward, type CatalystContestCollaborator, type CatalystContestPolls, type CatalystContestRank, type CatalystContestRemoveCollaboratorRequest, type CatalystContestState, type CatalystCreateAlbumRequest, type CatalystCreateContestRequest, type CatalystCreateFleetMedia, type CatalystCreateFleetRequest, type CatalystCreateFleetSticker, type CatalystCreateFleetText, type CatalystCreateSmartAlbumRequest, type CatalystCreateStatusRequest, type CatalystCustomReaction, type CatalystCustomReactionList, type CatalystCustomReactionStatus, type CatalystEditAlbumRequest, type CatalystEditContestRequest, type CatalystEditSmartAlbumRequest, type CatalystEditStatusRequest, CatalystEndpoint, CatalystError, type CatalystFleet, type CatalystFleetMedia, type CatalystFleetRing, type CatalystFleetSticker, type CatalystFleetText, type CatalystFleetViewer, type CatalystInsertToAlbumRequest, type CatalystMediaWithMetadata, type CatalystPrivacySettings, type CatalystPrivacySettingsRequest, type CatalystReaction, type CatalystReactions, type CatalystRelationshipRequest, type CatalystRelationships, type CatalystRemoveFromAlbumRequest, type CatalystSetContestAwardRequest, type CatalystSmartAlbum, type CatalystSmartAlbums, type CatalystStatus, type CatalystStatusContest, type CatalystStatusPrivacy, type CatalystStatusV1_1, type CatalystStatusVisitor, type CatalystStatusWrapper, type CatalystStatuses, CatalystTS, type CatalystTSOptions, type CatalystUnsetContestAwardRequest, type CatalystUserCustomReaction, type CatalystUserVoteRights, EgeriaClient, EgeriaEndpoint, type EgeriaUpdateProfileRequest, type EgeriaUser, type EgeriaUserProfile, type EgeriaUserWrapper, type EgeriaUsers, type Endpoint, HttpClient, type HttpMethod, ISSUER_CATALYST_SYSTEM_MESSAGE, ISSUER_CATALYST_USER_MESSAGE, ISSUER_EGERIA_SYSTEM_MESSAGE, type Identity, LoggingInterceptor, type Media, MediaClient, type MediaDeleteRequest, type MediaDownloadRequest, MediaEndpoint, type MediaMetadata, type MediaUploadUrls, type Notification, type NotificationAdditionalContext, type NotificationGroup, type NotificationUnreadCount, type Notifications, OAuth, OAuthError, PKCE, PUBLIC_API_ENDPOINT, PUBLIC_AUTHORIZE_ENDPOINT, PUBLIC_GRAPHQL_ENDPOINT, type ProfileTag, type ProfileTagSuggestion, type ProfileTagUser, type ReportRequest, type RequestInterceptor, SteambirdClient, SteambirdEndpoint, type SupporterTier, type Token, type UpdateCustomReactionRequest, type UpdateProfileTagsRequest, UserAgentInterceptor };
package/dist/index.js CHANGED
@@ -221,7 +221,11 @@ var CatalystEndpoint = {
221
221
  return { path: "/catalyst/v1/custom-reactions", method: "GET" };
222
222
  },
223
223
  createCustomReaction(data) {
224
- return { path: "/catalyst/v1/custom-reactions", method: "POST", body: data };
224
+ return {
225
+ path: "/catalyst/v1/custom-reactions",
226
+ method: "POST",
227
+ body: data
228
+ };
225
229
  },
226
230
  updateCustomReaction(id, data) {
227
231
  return {
@@ -571,7 +575,7 @@ var CatalystEndpoint = {
571
575
  },
572
576
  getContestVotes(slug) {
573
577
  return {
574
- path: `/catalyst/v1/contest/by/slug/${slug}/votes`,
578
+ path: `/catalyst/v1/contest/by/slug/${slug}/vote`,
575
579
  method: "GET"
576
580
  };
577
581
  },
package/dist/index.mjs CHANGED
@@ -172,7 +172,11 @@ var CatalystEndpoint = {
172
172
  return { path: "/catalyst/v1/custom-reactions", method: "GET" };
173
173
  },
174
174
  createCustomReaction(data) {
175
- return { path: "/catalyst/v1/custom-reactions", method: "POST", body: data };
175
+ return {
176
+ path: "/catalyst/v1/custom-reactions",
177
+ method: "POST",
178
+ body: data
179
+ };
176
180
  },
177
181
  updateCustomReaction(id, data) {
178
182
  return {
@@ -522,7 +526,7 @@ var CatalystEndpoint = {
522
526
  },
523
527
  getContestVotes(slug) {
524
528
  return {
525
- path: `/catalyst/v1/contest/by/slug/${slug}/votes`,
529
+ path: `/catalyst/v1/contest/by/slug/${slug}/vote`,
526
530
  method: "GET"
527
531
  };
528
532
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natsuneko-laboratory/catalyst-sdk",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "TypeScript/JavaScript SDK for the Natsuneko Laboratory platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",