@syra.fm/sdk 0.12.0 → 0.13.1
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/lib/commonjs/client.js +17 -0
- package/lib/commonjs/client.js.map +1 -1
- package/lib/commonjs/index.js +12 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/live/components/LiveRoomSheet.js +1 -1
- package/lib/commonjs/live/components/RecordingCard.js +1 -1
- package/lib/commonjs/live/components/RoomCard.js +1 -1
- package/lib/commonjs/live/components/StreamConfigModal.js +1 -1
- package/lib/commonjs/live/hooks/useRoomConnection.js +1 -1
- package/lib/commonjs/live/hooks/useRoomUsers.js +1 -1
- package/lib/commonjs/schema.js +22 -1
- package/lib/commonjs/schema.js.map +1 -1
- package/lib/module/client.js +18 -1
- package/lib/module/client.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/live/components/LiveRoomSheet.js +1 -1
- package/lib/module/live/components/LiveRoomSheet.js.map +1 -1
- package/lib/module/live/components/RecordingCard.js +1 -1
- package/lib/module/live/components/RecordingCard.js.map +1 -1
- package/lib/module/live/components/RoomCard.js +1 -1
- package/lib/module/live/components/RoomCard.js.map +1 -1
- package/lib/module/live/components/StreamConfigModal.js +1 -1
- package/lib/module/live/components/StreamConfigModal.js.map +1 -1
- package/lib/module/live/hooks/useRoomConnection.js +1 -1
- package/lib/module/live/hooks/useRoomConnection.js.map +1 -1
- package/lib/module/live/hooks/useRoomUsers.js +1 -1
- package/lib/module/live/hooks/useRoomUsers.js.map +1 -1
- package/lib/module/schema.js +21 -0
- package/lib/module/schema.js.map +1 -1
- package/lib/typescript/commonjs/client.d.ts +63 -1
- package/lib/typescript/commonjs/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/schema.d.ts +23 -0
- package/lib/typescript/commonjs/schema.d.ts.map +1 -1
- package/lib/typescript/module/client.d.ts +63 -1
- package/lib/typescript/module/client.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/schema.d.ts +23 -0
- package/lib/typescript/module/schema.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/client.ts +85 -0
- package/src/index.ts +4 -0
- package/src/live/components/LiveRoomSheet.tsx +1 -1
- package/src/live/components/RecordingCard.tsx +1 -1
- package/src/live/components/RoomCard.tsx +1 -1
- package/src/live/components/StreamConfigModal.tsx +1 -1
- package/src/live/hooks/useRoomConnection.ts +1 -1
- package/src/live/hooks/useRoomUsers.ts +1 -1
- package/src/schema.ts +25 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type TrackSummary, type PodcastSummary, type EpisodeSummary, type EpisodeDraft, type EpisodeStream, type UploadedImage, type PodcastVisibility, type CoverArtSizes, type ArtworkSize } from './schema';
|
|
1
|
+
import { type TrackSummary, type PodcastSummary, type EpisodeSummary, type EpisodeDraft, type EpisodeStream, type UploadedImage, type PodcastDeleted, type EpisodeDeleted, type PodcastVisibility, type CoverArtSizes, type ArtworkSize } from './schema';
|
|
2
2
|
/** Default base URL of the public Syra API. */
|
|
3
3
|
export declare const DEFAULT_SYRA_BASE_URL = "https://api.syra.fm";
|
|
4
4
|
/** Default base URL of the Syra web app, used for deep links. */
|
|
@@ -275,6 +275,68 @@ export interface SyraClient {
|
|
|
275
275
|
* there, because the API re-hosts artwork rather than hotlinking it.
|
|
276
276
|
*/
|
|
277
277
|
uploadPodcastImage(image: UploadPayload, filename?: string): Promise<UploadedImage>;
|
|
278
|
+
/**
|
|
279
|
+
* `DELETE /api/podcasts/:id` — permanently delete a Syra-hosted show you own.
|
|
280
|
+
*
|
|
281
|
+
* IRREVERSIBLE, and it takes more than the show. Verified against the handler
|
|
282
|
+
* and against the migrated schema's own `pg_constraint` rows rather than read
|
|
283
|
+
* off a doc comment:
|
|
284
|
+
*
|
|
285
|
+
* - **Every episode row goes** (`episodes.podcast_id` is `ON DELETE CASCADE`),
|
|
286
|
+
* and with each one its HLS renditions, transcripts, credits, AES stream
|
|
287
|
+
* key and any outstanding ingest ticket.
|
|
288
|
+
* - **The audio in S3 goes** — the server sweeps the show's three storage
|
|
289
|
+
* trees (`hls/{id}/`, `podcasts/audio/{id}/`, `podcasts/cache/{id}/`), so
|
|
290
|
+
* segments that no row names are removed too. {@link PodcastDeleted.objectsDeleted}
|
|
291
|
+
* is the count actually deleted.
|
|
292
|
+
* - **Other people's rows go with it**: every listener's saved position
|
|
293
|
+
* (`episode_progress`) and every subscriber's subscription
|
|
294
|
+
* (`user_podcast_subscriptions`).
|
|
295
|
+
*
|
|
296
|
+
* **What it does NOT remove: the cover artwork.** `image_assets` is referenced
|
|
297
|
+
* `ON DELETE set null`, and the artwork's S3 objects live under
|
|
298
|
+
* `images/{imageId}/`, which is not one of the three swept trees — so the
|
|
299
|
+
* image rows and their bytes are deliberately left behind. One asset may be
|
|
300
|
+
* referenced by several shows and episodes and nothing records how many, so
|
|
301
|
+
* deleting it could blank a show nobody asked to touch. Reclaiming that
|
|
302
|
+
* storage needs a sweeper that can prove non-reference; it is not this call's
|
|
303
|
+
* job and this call will not do it silently.
|
|
304
|
+
*
|
|
305
|
+
* Two more consequences worth knowing before calling it for real:
|
|
306
|
+
*
|
|
307
|
+
* - The server sets the show `unavailable` BEFORE deleting a single object, so
|
|
308
|
+
* a delete that fails midway leaves an UNPUBLISHED show with some dead
|
|
309
|
+
* audio — not the show as it was. Calling delete again finishes the job.
|
|
310
|
+
* The ordering is deliberate: the failure that is possible is a show still
|
|
311
|
+
* listed but broken, never one that is gone but still published.
|
|
312
|
+
* - Afterwards the feed 404s rather than answering `410 Gone`, because no row
|
|
313
|
+
* survives to answer from — so a podcast client stops eventually rather than
|
|
314
|
+
* at once, and episodes already downloaded to a device stay there.
|
|
315
|
+
*
|
|
316
|
+
* Refused (`403`) for a show you do not own and for an RSS-mirrored one, which
|
|
317
|
+
* belongs to the catalogue and to nobody; `409` for a show under a platform
|
|
318
|
+
* takedown, whose record a creator does not get to erase.
|
|
319
|
+
*/
|
|
320
|
+
deletePodcast(podcastId: string): Promise<PodcastDeleted>;
|
|
321
|
+
/**
|
|
322
|
+
* `DELETE /api/episodes/:id` — permanently delete one episode of a Syra-hosted
|
|
323
|
+
* show you own.
|
|
324
|
+
*
|
|
325
|
+
* IRREVERSIBLE. Its row goes with its HLS ladder, transcript, credits, AES
|
|
326
|
+
* key, any outstanding ingest ticket and every listener's saved position in
|
|
327
|
+
* it; its audio is swept from the episode's own `hls/{showId}/{episodeId}/`
|
|
328
|
+
* directory plus the keys the row records. The parent show's `episodeCount`
|
|
329
|
+
* and `lastEpisodeAt` are recomputed in the same transaction.
|
|
330
|
+
*
|
|
331
|
+
* `unpublishEpisode` is the reversible half of this space, and it is not
|
|
332
|
+
* exposed here — reach for {@link SyraClient.updatePodcast} territory only if
|
|
333
|
+
* you want the episode BACK later. This one does not come back.
|
|
334
|
+
*
|
|
335
|
+
* Refused exactly as {@link SyraClient.deletePodcast} is: `403` for an episode
|
|
336
|
+
* on a show you do not own or that is not Syra-hosted, `409` when the show is
|
|
337
|
+
* under a platform takedown.
|
|
338
|
+
*/
|
|
339
|
+
deleteEpisode(episodeId: string): Promise<EpisodeDeleted>;
|
|
278
340
|
/**
|
|
279
341
|
* `POST /api/podcasts/:id/episodes/draft` — reserve an episode now and get a
|
|
280
342
|
* single-use ticket to attach its audio later, from a process with no session.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAA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W,GAAG,cAAc,CAAC,EACvD,KAAK,EAAE,aAAa,EACpB,KAAK,CAAC,EAAE,kBAAkB,EAC1B,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,cAAc,CAAC,CAAC;IAC3B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,oBAAoB,CAClB,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,cAAc,CAAC,EACvD,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,cAAc,CAAC,CAAC;IAC3B;;;;OAIG;IACH,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAC7D;AAsDD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,iBAAsB,GAAG,UAAU,CAkhB5E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createSyraClient, DEFAULT_SYRA_BASE_URL, DEFAULT_SYRA_WEB_BASE_URL, } from './client';
|
|
2
2
|
export type { SyraClient, SyraClientOptions, SearchTracksOptions, SearchPodcastsOptions, PodcastEpisodesOptions, SearchPage, ArtworkSource, PodcastArtworkSource, EpisodeArtworkSource, CreatePodcastInput, UpdatePodcastInput, CreateEpisodeDraftInput, IngestEpisodeInput, UploadPayload, } from './client';
|
|
3
|
-
export { trackSummarySchema, podcastSummarySchema, podcastVisibilitySchema, episodeSummarySchema, episodeAudioSourceSchema, episodeStatusSchema, episodeDraftSchema, episodeStreamSchema, uploadedImageSchema, coverArtSizesSchema, coverArtVariantSchema, } from './schema';
|
|
4
|
-
export type { TrackSummary, PodcastSummary, PodcastVisibility, EpisodeSummary, EpisodeAudioSource, EpisodeStatus, EpisodeDraft, EpisodeStream, UploadedImage, CoverArtSizes, CoverArtVariant, ArtworkSize, } from './schema';
|
|
3
|
+
export { trackSummarySchema, podcastSummarySchema, podcastVisibilitySchema, episodeSummarySchema, episodeAudioSourceSchema, episodeStatusSchema, episodeDraftSchema, episodeStreamSchema, podcastDeletedSchema, episodeDeletedSchema, uploadedImageSchema, coverArtSizesSchema, coverArtVariantSchema, } from './schema';
|
|
4
|
+
export type { TrackSummary, PodcastSummary, PodcastVisibility, EpisodeSummary, EpisodeAudioSource, EpisodeStatus, EpisodeDraft, EpisodeStream, PodcastDeleted, EpisodeDeleted, UploadedImage, CoverArtSizes, CoverArtVariant, ArtworkSize, } from './schema';
|
|
5
5
|
export { SyraApiError } from './errors';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,EACf,WAAW,GACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,cAAc,EACd,cAAc,EACd,aAAa,EACb,aAAa,EACb,eAAe,EACf,WAAW,GACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -313,6 +313,29 @@ export declare const episodeDraftSchema: z.ZodObject<{
|
|
|
313
313
|
expiresAt: z.ZodString;
|
|
314
314
|
}, z.core.$strip>;
|
|
315
315
|
export type EpisodeDraft = z.infer<typeof episodeDraftSchema>;
|
|
316
|
+
/**
|
|
317
|
+
* What `deletePodcast` hands back — a receipt, and it is worth reading rather
|
|
318
|
+
* than discarding.
|
|
319
|
+
*
|
|
320
|
+
* Both counts are of things that were actually removed by THIS call, so they are
|
|
321
|
+
* how a caller mirroring the delete elsewhere can tell a real deletion from a
|
|
322
|
+
* no-op. `objectsDeleted` counts stored objects (source audio, manifests and
|
|
323
|
+
* every segment beside them); a show whose episodes were never ingested reports
|
|
324
|
+
* zero for both, which is a success, not a failure.
|
|
325
|
+
*/
|
|
326
|
+
export declare const podcastDeletedSchema: z.ZodObject<{
|
|
327
|
+
id: z.ZodString;
|
|
328
|
+
episodesDeleted: z.ZodNumber;
|
|
329
|
+
objectsDeleted: z.ZodNumber;
|
|
330
|
+
}, z.core.$strip>;
|
|
331
|
+
export type PodcastDeleted = z.infer<typeof podcastDeletedSchema>;
|
|
332
|
+
/** What `deleteEpisode` hands back. `podcastId` names the show it was removed from. */
|
|
333
|
+
export declare const episodeDeletedSchema: z.ZodObject<{
|
|
334
|
+
id: z.ZodString;
|
|
335
|
+
podcastId: z.ZodString;
|
|
336
|
+
objectsDeleted: z.ZodNumber;
|
|
337
|
+
}, z.core.$strip>;
|
|
338
|
+
export type EpisodeDeleted = z.infer<typeof episodeDeletedSchema>;
|
|
316
339
|
/** What `getEpisodeStream` hands back: a tokenized HLS URL with its own deadline. */
|
|
317
340
|
export declare const episodeStreamSchema: z.ZodObject<{
|
|
318
341
|
url: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AAEH,mFAAmF;AACnF,eAAO,MAAM,qBAAqB;;;;;iBAKhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,4CAA4C;AAC5C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAO9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,yBAAyB;AACzB,MAAM,MAAM,WAAW,GAAG,MAAM,aAAa,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iB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
-
import { type TrackSummary, type PodcastSummary, type EpisodeSummary, type EpisodeDraft, type EpisodeStream, type UploadedImage, type PodcastVisibility, type CoverArtSizes, type ArtworkSize } from './schema';
|
|
1
|
+
import { type TrackSummary, type PodcastSummary, type EpisodeSummary, type EpisodeDraft, type EpisodeStream, type UploadedImage, type PodcastDeleted, type EpisodeDeleted, type PodcastVisibility, type CoverArtSizes, type ArtworkSize } from './schema';
|
|
2
2
|
/** Default base URL of the public Syra API. */
|
|
3
3
|
export declare const DEFAULT_SYRA_BASE_URL = "https://api.syra.fm";
|
|
4
4
|
/** Default base URL of the Syra web app, used for deep links. */
|
|
@@ -275,6 +275,68 @@ export interface SyraClient {
|
|
|
275
275
|
* there, because the API re-hosts artwork rather than hotlinking it.
|
|
276
276
|
*/
|
|
277
277
|
uploadPodcastImage(image: UploadPayload, filename?: string): Promise<UploadedImage>;
|
|
278
|
+
/**
|
|
279
|
+
* `DELETE /api/podcasts/:id` — permanently delete a Syra-hosted show you own.
|
|
280
|
+
*
|
|
281
|
+
* IRREVERSIBLE, and it takes more than the show. Verified against the handler
|
|
282
|
+
* and against the migrated schema's own `pg_constraint` rows rather than read
|
|
283
|
+
* off a doc comment:
|
|
284
|
+
*
|
|
285
|
+
* - **Every episode row goes** (`episodes.podcast_id` is `ON DELETE CASCADE`),
|
|
286
|
+
* and with each one its HLS renditions, transcripts, credits, AES stream
|
|
287
|
+
* key and any outstanding ingest ticket.
|
|
288
|
+
* - **The audio in S3 goes** — the server sweeps the show's three storage
|
|
289
|
+
* trees (`hls/{id}/`, `podcasts/audio/{id}/`, `podcasts/cache/{id}/`), so
|
|
290
|
+
* segments that no row names are removed too. {@link PodcastDeleted.objectsDeleted}
|
|
291
|
+
* is the count actually deleted.
|
|
292
|
+
* - **Other people's rows go with it**: every listener's saved position
|
|
293
|
+
* (`episode_progress`) and every subscriber's subscription
|
|
294
|
+
* (`user_podcast_subscriptions`).
|
|
295
|
+
*
|
|
296
|
+
* **What it does NOT remove: the cover artwork.** `image_assets` is referenced
|
|
297
|
+
* `ON DELETE set null`, and the artwork's S3 objects live under
|
|
298
|
+
* `images/{imageId}/`, which is not one of the three swept trees — so the
|
|
299
|
+
* image rows and their bytes are deliberately left behind. One asset may be
|
|
300
|
+
* referenced by several shows and episodes and nothing records how many, so
|
|
301
|
+
* deleting it could blank a show nobody asked to touch. Reclaiming that
|
|
302
|
+
* storage needs a sweeper that can prove non-reference; it is not this call's
|
|
303
|
+
* job and this call will not do it silently.
|
|
304
|
+
*
|
|
305
|
+
* Two more consequences worth knowing before calling it for real:
|
|
306
|
+
*
|
|
307
|
+
* - The server sets the show `unavailable` BEFORE deleting a single object, so
|
|
308
|
+
* a delete that fails midway leaves an UNPUBLISHED show with some dead
|
|
309
|
+
* audio — not the show as it was. Calling delete again finishes the job.
|
|
310
|
+
* The ordering is deliberate: the failure that is possible is a show still
|
|
311
|
+
* listed but broken, never one that is gone but still published.
|
|
312
|
+
* - Afterwards the feed 404s rather than answering `410 Gone`, because no row
|
|
313
|
+
* survives to answer from — so a podcast client stops eventually rather than
|
|
314
|
+
* at once, and episodes already downloaded to a device stay there.
|
|
315
|
+
*
|
|
316
|
+
* Refused (`403`) for a show you do not own and for an RSS-mirrored one, which
|
|
317
|
+
* belongs to the catalogue and to nobody; `409` for a show under a platform
|
|
318
|
+
* takedown, whose record a creator does not get to erase.
|
|
319
|
+
*/
|
|
320
|
+
deletePodcast(podcastId: string): Promise<PodcastDeleted>;
|
|
321
|
+
/**
|
|
322
|
+
* `DELETE /api/episodes/:id` — permanently delete one episode of a Syra-hosted
|
|
323
|
+
* show you own.
|
|
324
|
+
*
|
|
325
|
+
* IRREVERSIBLE. Its row goes with its HLS ladder, transcript, credits, AES
|
|
326
|
+
* key, any outstanding ingest ticket and every listener's saved position in
|
|
327
|
+
* it; its audio is swept from the episode's own `hls/{showId}/{episodeId}/`
|
|
328
|
+
* directory plus the keys the row records. The parent show's `episodeCount`
|
|
329
|
+
* and `lastEpisodeAt` are recomputed in the same transaction.
|
|
330
|
+
*
|
|
331
|
+
* `unpublishEpisode` is the reversible half of this space, and it is not
|
|
332
|
+
* exposed here — reach for {@link SyraClient.updatePodcast} territory only if
|
|
333
|
+
* you want the episode BACK later. This one does not come back.
|
|
334
|
+
*
|
|
335
|
+
* Refused exactly as {@link SyraClient.deletePodcast} is: `403` for an episode
|
|
336
|
+
* on a show you do not own or that is not Syra-hosted, `409` when the show is
|
|
337
|
+
* under a platform takedown.
|
|
338
|
+
*/
|
|
339
|
+
deleteEpisode(episodeId: string): Promise<EpisodeDeleted>;
|
|
278
340
|
/**
|
|
279
341
|
* `POST /api/podcasts/:id/episodes/draft` — reserve an episode now and get a
|
|
280
342
|
* single-use ticket to attach its audio later, from a process with no session.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAGlB,+CAA+C;AAC/C,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAE3D,iEAAiE;AACjE,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAE3D,MAAM,WAAW,iBAAiB;IAChC,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB;;;;;;;;;;;;;;OAcG;IACH,cAAc,CAAC,EAAE,MAAM,M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AsB,GAAG,UAAU,CAkhB5E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createSyraClient, DEFAULT_SYRA_BASE_URL, DEFAULT_SYRA_WEB_BASE_URL, } from './client';
|
|
2
2
|
export type { SyraClient, SyraClientOptions, SearchTracksOptions, SearchPodcastsOptions, PodcastEpisodesOptions, SearchPage, ArtworkSource, PodcastArtworkSource, EpisodeArtworkSource, CreatePodcastInput, UpdatePodcastInput, CreateEpisodeDraftInput, IngestEpisodeInput, UploadPayload, } from './client';
|
|
3
|
-
export { trackSummarySchema, podcastSummarySchema, podcastVisibilitySchema, episodeSummarySchema, episodeAudioSourceSchema, episodeStatusSchema, episodeDraftSchema, episodeStreamSchema, uploadedImageSchema, coverArtSizesSchema, coverArtVariantSchema, } from './schema';
|
|
4
|
-
export type { TrackSummary, PodcastSummary, PodcastVisibility, EpisodeSummary, EpisodeAudioSource, EpisodeStatus, EpisodeDraft, EpisodeStream, UploadedImage, CoverArtSizes, CoverArtVariant, ArtworkSize, } from './schema';
|
|
3
|
+
export { trackSummarySchema, podcastSummarySchema, podcastVisibilitySchema, episodeSummarySchema, episodeAudioSourceSchema, episodeStatusSchema, episodeDraftSchema, episodeStreamSchema, podcastDeletedSchema, episodeDeletedSchema, uploadedImageSchema, coverArtSizesSchema, coverArtVariantSchema, } from './schema';
|
|
4
|
+
export type { TrackSummary, PodcastSummary, PodcastVisibility, EpisodeSummary, EpisodeAudioSource, EpisodeStatus, EpisodeDraft, EpisodeStream, PodcastDeleted, EpisodeDeleted, UploadedImage, CoverArtSizes, CoverArtVariant, ArtworkSize, } from './schema';
|
|
5
5
|
export { SyraApiError } from './errors';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,EACf,WAAW,GACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,cAAc,EACd,cAAc,EACd,aAAa,EACb,aAAa,EACb,eAAe,EACf,WAAW,GACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -313,6 +313,29 @@ export declare const episodeDraftSchema: z.ZodObject<{
|
|
|
313
313
|
expiresAt: z.ZodString;
|
|
314
314
|
}, z.core.$strip>;
|
|
315
315
|
export type EpisodeDraft = z.infer<typeof episodeDraftSchema>;
|
|
316
|
+
/**
|
|
317
|
+
* What `deletePodcast` hands back — a receipt, and it is worth reading rather
|
|
318
|
+
* than discarding.
|
|
319
|
+
*
|
|
320
|
+
* Both counts are of things that were actually removed by THIS call, so they are
|
|
321
|
+
* how a caller mirroring the delete elsewhere can tell a real deletion from a
|
|
322
|
+
* no-op. `objectsDeleted` counts stored objects (source audio, manifests and
|
|
323
|
+
* every segment beside them); a show whose episodes were never ingested reports
|
|
324
|
+
* zero for both, which is a success, not a failure.
|
|
325
|
+
*/
|
|
326
|
+
export declare const podcastDeletedSchema: z.ZodObject<{
|
|
327
|
+
id: z.ZodString;
|
|
328
|
+
episodesDeleted: z.ZodNumber;
|
|
329
|
+
objectsDeleted: z.ZodNumber;
|
|
330
|
+
}, z.core.$strip>;
|
|
331
|
+
export type PodcastDeleted = z.infer<typeof podcastDeletedSchema>;
|
|
332
|
+
/** What `deleteEpisode` hands back. `podcastId` names the show it was removed from. */
|
|
333
|
+
export declare const episodeDeletedSchema: z.ZodObject<{
|
|
334
|
+
id: z.ZodString;
|
|
335
|
+
podcastId: z.ZodString;
|
|
336
|
+
objectsDeleted: z.ZodNumber;
|
|
337
|
+
}, z.core.$strip>;
|
|
338
|
+
export type EpisodeDeleted = z.infer<typeof episodeDeletedSchema>;
|
|
316
339
|
/** What `getEpisodeStream` hands back: a tokenized HLS URL with its own deadline. */
|
|
317
340
|
export declare const episodeStreamSchema: z.ZodObject<{
|
|
318
341
|
url: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AAEH,mFAAmF;AACnF,eAAO,MAAM,qBAAqB;;;;;iBAKhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,4CAA4C;AAC5C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAO9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,yBAAyB;AACzB,MAAM,MAAM,WAAW,GAAG,MAAM,aAAa,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB;;;;EAA4C,CAAC;AACjF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiB/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH;;;;;;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,CAAC,CAAC;AAElE,gGAAgG;AAChG,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,uFAAuF;AACvF,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,qFAAqF;AACrF,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,iDAAiD;AACjD,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syra.fm/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Syra SDK — headless, isomorphic catalog client (Node/React-free, public reads + 30s previews) that also ships the Syra live-rooms engine (audio rooms over LiveKit) on React Native and web.",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"react-native": "^0.85.3",
|
|
93
93
|
"react-native-reanimated": "^4.3.1",
|
|
94
94
|
"react-native-safe-area-context": "^5.7.0",
|
|
95
|
-
"@
|
|
95
|
+
"@oxy.so/services": "^1.0.0",
|
|
96
96
|
"livekit-client": "^2.20.0",
|
|
97
97
|
"@livekit/react-native": "^2.11.1",
|
|
98
98
|
"expo-audio": "~56.0.12",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"react-native-safe-area-context": {
|
|
116
116
|
"optional": true
|
|
117
117
|
},
|
|
118
|
-
"@
|
|
118
|
+
"@oxy.so/services": {
|
|
119
119
|
"optional": true
|
|
120
120
|
},
|
|
121
121
|
"livekit-client": {
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"react-native": "^0.85.3",
|
|
154
154
|
"react-native-reanimated": "^4.3.1",
|
|
155
155
|
"react-native-safe-area-context": "^5.7.0",
|
|
156
|
-
"@
|
|
156
|
+
"@oxy.so/services": "^1.0.0",
|
|
157
157
|
"livekit-client": "^2.20.0",
|
|
158
158
|
"@livekit/react-native": "^2.11.1",
|
|
159
159
|
"expo-audio": "~56.0.12",
|
package/src/client.ts
CHANGED
|
@@ -5,12 +5,16 @@ import {
|
|
|
5
5
|
episodeDraftSchema,
|
|
6
6
|
episodeStreamSchema,
|
|
7
7
|
uploadedImageSchema,
|
|
8
|
+
podcastDeletedSchema,
|
|
9
|
+
episodeDeletedSchema,
|
|
8
10
|
type TrackSummary,
|
|
9
11
|
type PodcastSummary,
|
|
10
12
|
type EpisodeSummary,
|
|
11
13
|
type EpisodeDraft,
|
|
12
14
|
type EpisodeStream,
|
|
13
15
|
type UploadedImage,
|
|
16
|
+
type PodcastDeleted,
|
|
17
|
+
type EpisodeDeleted,
|
|
14
18
|
type PodcastVisibility,
|
|
15
19
|
type CoverArtSizes,
|
|
16
20
|
type ArtworkSize,
|
|
@@ -314,6 +318,68 @@ export interface SyraClient {
|
|
|
314
318
|
* there, because the API re-hosts artwork rather than hotlinking it.
|
|
315
319
|
*/
|
|
316
320
|
uploadPodcastImage(image: UploadPayload, filename?: string): Promise<UploadedImage>;
|
|
321
|
+
/**
|
|
322
|
+
* `DELETE /api/podcasts/:id` — permanently delete a Syra-hosted show you own.
|
|
323
|
+
*
|
|
324
|
+
* IRREVERSIBLE, and it takes more than the show. Verified against the handler
|
|
325
|
+
* and against the migrated schema's own `pg_constraint` rows rather than read
|
|
326
|
+
* off a doc comment:
|
|
327
|
+
*
|
|
328
|
+
* - **Every episode row goes** (`episodes.podcast_id` is `ON DELETE CASCADE`),
|
|
329
|
+
* and with each one its HLS renditions, transcripts, credits, AES stream
|
|
330
|
+
* key and any outstanding ingest ticket.
|
|
331
|
+
* - **The audio in S3 goes** — the server sweeps the show's three storage
|
|
332
|
+
* trees (`hls/{id}/`, `podcasts/audio/{id}/`, `podcasts/cache/{id}/`), so
|
|
333
|
+
* segments that no row names are removed too. {@link PodcastDeleted.objectsDeleted}
|
|
334
|
+
* is the count actually deleted.
|
|
335
|
+
* - **Other people's rows go with it**: every listener's saved position
|
|
336
|
+
* (`episode_progress`) and every subscriber's subscription
|
|
337
|
+
* (`user_podcast_subscriptions`).
|
|
338
|
+
*
|
|
339
|
+
* **What it does NOT remove: the cover artwork.** `image_assets` is referenced
|
|
340
|
+
* `ON DELETE set null`, and the artwork's S3 objects live under
|
|
341
|
+
* `images/{imageId}/`, which is not one of the three swept trees — so the
|
|
342
|
+
* image rows and their bytes are deliberately left behind. One asset may be
|
|
343
|
+
* referenced by several shows and episodes and nothing records how many, so
|
|
344
|
+
* deleting it could blank a show nobody asked to touch. Reclaiming that
|
|
345
|
+
* storage needs a sweeper that can prove non-reference; it is not this call's
|
|
346
|
+
* job and this call will not do it silently.
|
|
347
|
+
*
|
|
348
|
+
* Two more consequences worth knowing before calling it for real:
|
|
349
|
+
*
|
|
350
|
+
* - The server sets the show `unavailable` BEFORE deleting a single object, so
|
|
351
|
+
* a delete that fails midway leaves an UNPUBLISHED show with some dead
|
|
352
|
+
* audio — not the show as it was. Calling delete again finishes the job.
|
|
353
|
+
* The ordering is deliberate: the failure that is possible is a show still
|
|
354
|
+
* listed but broken, never one that is gone but still published.
|
|
355
|
+
* - Afterwards the feed 404s rather than answering `410 Gone`, because no row
|
|
356
|
+
* survives to answer from — so a podcast client stops eventually rather than
|
|
357
|
+
* at once, and episodes already downloaded to a device stay there.
|
|
358
|
+
*
|
|
359
|
+
* Refused (`403`) for a show you do not own and for an RSS-mirrored one, which
|
|
360
|
+
* belongs to the catalogue and to nobody; `409` for a show under a platform
|
|
361
|
+
* takedown, whose record a creator does not get to erase.
|
|
362
|
+
*/
|
|
363
|
+
deletePodcast(podcastId: string): Promise<PodcastDeleted>;
|
|
364
|
+
/**
|
|
365
|
+
* `DELETE /api/episodes/:id` — permanently delete one episode of a Syra-hosted
|
|
366
|
+
* show you own.
|
|
367
|
+
*
|
|
368
|
+
* IRREVERSIBLE. Its row goes with its HLS ladder, transcript, credits, AES
|
|
369
|
+
* key, any outstanding ingest ticket and every listener's saved position in
|
|
370
|
+
* it; its audio is swept from the episode's own `hls/{showId}/{episodeId}/`
|
|
371
|
+
* directory plus the keys the row records. The parent show's `episodeCount`
|
|
372
|
+
* and `lastEpisodeAt` are recomputed in the same transaction.
|
|
373
|
+
*
|
|
374
|
+
* `unpublishEpisode` is the reversible half of this space, and it is not
|
|
375
|
+
* exposed here — reach for {@link SyraClient.updatePodcast} territory only if
|
|
376
|
+
* you want the episode BACK later. This one does not come back.
|
|
377
|
+
*
|
|
378
|
+
* Refused exactly as {@link SyraClient.deletePodcast} is: `403` for an episode
|
|
379
|
+
* on a show you do not own or that is not Syra-hosted, `409` when the show is
|
|
380
|
+
* under a platform takedown.
|
|
381
|
+
*/
|
|
382
|
+
deleteEpisode(episodeId: string): Promise<EpisodeDeleted>;
|
|
317
383
|
/**
|
|
318
384
|
* `POST /api/podcasts/:id/episodes/draft` — reserve an episode now and get a
|
|
319
385
|
* single-use ticket to attach its audio later, from a process with no session.
|
|
@@ -853,6 +919,25 @@ export function createSyraClient(options: SyraClientOptions = {}): SyraClient {
|
|
|
853
919
|
return this.updatePodcast(podcastId, { visibility });
|
|
854
920
|
},
|
|
855
921
|
|
|
922
|
+
async deletePodcast(podcastId) {
|
|
923
|
+
const json = (await request(`/api/podcasts/${encodeURIComponent(podcastId)}`, {
|
|
924
|
+
method: 'DELETE',
|
|
925
|
+
requires: 'deletePodcast',
|
|
926
|
+
})) as { data?: unknown };
|
|
927
|
+
return podcastDeletedSchema.parse(json?.data);
|
|
928
|
+
},
|
|
929
|
+
|
|
930
|
+
async deleteEpisode(episodeId) {
|
|
931
|
+
// `/api/episodes/:id`, NOT `/api/podcasts/episodes/:id` — the episode
|
|
932
|
+
// write routes live on their own router, and the podcast router's
|
|
933
|
+
// `/episodes/:id/...` paths are the media and ingest ones.
|
|
934
|
+
const json = (await request(`/api/episodes/${encodeURIComponent(episodeId)}`, {
|
|
935
|
+
method: 'DELETE',
|
|
936
|
+
requires: 'deleteEpisode',
|
|
937
|
+
})) as { data?: unknown };
|
|
938
|
+
return episodeDeletedSchema.parse(json?.data);
|
|
939
|
+
},
|
|
940
|
+
|
|
856
941
|
async uploadPodcastImage(image, filename) {
|
|
857
942
|
const form = new FormData();
|
|
858
943
|
// `image` is the field name `POST /api/images/upload` reads.
|
package/src/index.ts
CHANGED
|
@@ -33,6 +33,8 @@ export {
|
|
|
33
33
|
episodeStatusSchema,
|
|
34
34
|
episodeDraftSchema,
|
|
35
35
|
episodeStreamSchema,
|
|
36
|
+
podcastDeletedSchema,
|
|
37
|
+
episodeDeletedSchema,
|
|
36
38
|
uploadedImageSchema,
|
|
37
39
|
coverArtSizesSchema,
|
|
38
40
|
coverArtVariantSchema,
|
|
@@ -46,6 +48,8 @@ export type {
|
|
|
46
48
|
EpisodeStatus,
|
|
47
49
|
EpisodeDraft,
|
|
48
50
|
EpisodeStream,
|
|
51
|
+
PodcastDeleted,
|
|
52
|
+
EpisodeDeleted,
|
|
49
53
|
UploadedImage,
|
|
50
54
|
CoverArtSizes,
|
|
51
55
|
CoverArtVariant,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
type ViewStyle,
|
|
10
10
|
} from 'react-native';
|
|
11
11
|
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
12
|
-
import { useAuth } from '@
|
|
12
|
+
import { useAuth } from '@oxy.so/services';
|
|
13
13
|
|
|
14
14
|
import { useLiveConfig } from '../context/LiveConfigContext';
|
|
15
15
|
import { MiniRoomBar } from './MiniRoomBar';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, Text, StyleSheet, TouchableOpacity, StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
4
|
-
import { useAuth } from '@
|
|
4
|
+
import { useAuth } from '@oxy.so/services';
|
|
5
5
|
|
|
6
6
|
import { useLiveConfig } from '../context/LiveConfigContext';
|
|
7
7
|
import { getAvatarUrl, getDisplayName } from '../hooks/useRoomUsers';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { View, Text, TouchableOpacity, StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
4
|
-
import { useAuth } from '@
|
|
4
|
+
import { useAuth } from '@oxy.so/services';
|
|
5
5
|
|
|
6
6
|
import { useLiveConfig } from '../context/LiveConfigContext';
|
|
7
7
|
import { AnimatedPulse } from './AnimatedPulse';
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
KeyboardAvoidingView,
|
|
14
14
|
} from 'react-native';
|
|
15
15
|
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
16
|
-
import { useAuth } from '@
|
|
16
|
+
import { useAuth } from '@oxy.so/services';
|
|
17
17
|
import * as ImagePicker from 'expo-image-picker';
|
|
18
18
|
|
|
19
19
|
import { useLiveConfig } from '../context/LiveConfigContext';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback, useRef } from 'react';
|
|
2
|
-
import { useAuth } from '@
|
|
2
|
+
import { useAuth } from '@oxy.so/services';
|
|
3
3
|
import { createAudioPlayer } from 'expo-audio';
|
|
4
4
|
import { useLiveConfig } from '../context/LiveConfigContext';
|
|
5
5
|
import type { RoomParticipant, StreamInfo } from '../types';
|
package/src/schema.ts
CHANGED
|
@@ -171,6 +171,31 @@ export const episodeDraftSchema = z.object({
|
|
|
171
171
|
});
|
|
172
172
|
export type EpisodeDraft = z.infer<typeof episodeDraftSchema>;
|
|
173
173
|
|
|
174
|
+
/**
|
|
175
|
+
* What `deletePodcast` hands back — a receipt, and it is worth reading rather
|
|
176
|
+
* than discarding.
|
|
177
|
+
*
|
|
178
|
+
* Both counts are of things that were actually removed by THIS call, so they are
|
|
179
|
+
* how a caller mirroring the delete elsewhere can tell a real deletion from a
|
|
180
|
+
* no-op. `objectsDeleted` counts stored objects (source audio, manifests and
|
|
181
|
+
* every segment beside them); a show whose episodes were never ingested reports
|
|
182
|
+
* zero for both, which is a success, not a failure.
|
|
183
|
+
*/
|
|
184
|
+
export const podcastDeletedSchema = z.object({
|
|
185
|
+
id: z.string(),
|
|
186
|
+
episodesDeleted: z.number(),
|
|
187
|
+
objectsDeleted: z.number(),
|
|
188
|
+
});
|
|
189
|
+
export type PodcastDeleted = z.infer<typeof podcastDeletedSchema>;
|
|
190
|
+
|
|
191
|
+
/** What `deleteEpisode` hands back. `podcastId` names the show it was removed from. */
|
|
192
|
+
export const episodeDeletedSchema = z.object({
|
|
193
|
+
id: z.string(),
|
|
194
|
+
podcastId: z.string(),
|
|
195
|
+
objectsDeleted: z.number(),
|
|
196
|
+
});
|
|
197
|
+
export type EpisodeDeleted = z.infer<typeof episodeDeletedSchema>;
|
|
198
|
+
|
|
174
199
|
/** What `getEpisodeStream` hands back: a tokenized HLS URL with its own deadline. */
|
|
175
200
|
export const episodeStreamSchema = z.object({
|
|
176
201
|
url: z.string(),
|