@ichos/sdk 1.0.6 → 1.0.8
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/api/resources/audio/client/Client.d.ts +1 -1
- package/dist/api/resources/audio/client/Client.js +2 -2
- package/dist/api/resources/audio/client/Client.js.map +1 -1
- package/dist/api/resources/audio/client/requests/FinalizeAudioUploadRequest.d.ts +2 -2
- package/dist/api/resources/audio/client/requests/FinalizeAudioUploadRequest.d.ts.map +1 -1
- package/dist/api/resources/episodes/client/Client.d.ts +19 -0
- package/dist/api/resources/episodes/client/Client.d.ts.map +1 -1
- package/dist/api/resources/episodes/client/Client.js +77 -0
- package/dist/api/resources/episodes/client/Client.js.map +1 -1
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.d.ts +1 -0
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.d.ts.map +1 -1
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.js.map +1 -1
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.d.ts +1 -0
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.d.ts.map +1 -1
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.js.map +1 -1
- package/dist/api/resources/episodes/client/requests/SearchEpisodesRequest.d.ts +23 -0
- package/dist/api/resources/episodes/client/requests/SearchEpisodesRequest.d.ts.map +1 -0
- package/dist/api/resources/episodes/client/requests/SearchEpisodesRequest.js +3 -0
- package/dist/api/resources/episodes/client/requests/SearchEpisodesRequest.js.map +1 -0
- package/dist/api/resources/episodes/client/requests/index.d.ts +1 -0
- package/dist/api/resources/episodes/client/requests/index.d.ts.map +1 -1
- package/dist/api/resources/podcasts/client/Client.d.ts +19 -0
- package/dist/api/resources/podcasts/client/Client.d.ts.map +1 -1
- package/dist/api/resources/podcasts/client/Client.js +77 -0
- package/dist/api/resources/podcasts/client/Client.js.map +1 -1
- package/dist/api/resources/podcasts/client/requests/PodcastCreate.d.ts +1 -0
- package/dist/api/resources/podcasts/client/requests/PodcastCreate.d.ts.map +1 -1
- package/dist/api/resources/podcasts/client/requests/PodcastCreate.js.map +1 -1
- package/dist/api/resources/podcasts/client/requests/PodcastUpdate.d.ts +1 -0
- package/dist/api/resources/podcasts/client/requests/PodcastUpdate.d.ts.map +1 -1
- package/dist/api/resources/podcasts/client/requests/PodcastUpdate.js.map +1 -1
- package/dist/api/resources/podcasts/client/requests/SearchPodcastsRequest.d.ts +23 -0
- package/dist/api/resources/podcasts/client/requests/SearchPodcastsRequest.d.ts.map +1 -0
- package/dist/api/resources/podcasts/client/requests/SearchPodcastsRequest.js +3 -0
- package/dist/api/resources/podcasts/client/requests/SearchPodcastsRequest.js.map +1 -0
- package/dist/api/resources/podcasts/client/requests/index.d.ts +1 -0
- package/dist/api/resources/podcasts/client/requests/index.d.ts.map +1 -1
- package/dist/api/types/AudioEntityLink.d.ts +3 -3
- package/dist/api/types/AudioEntityLink.d.ts.map +1 -1
- package/dist/api/types/Episode.d.ts +2 -1
- package/dist/api/types/Episode.d.ts.map +1 -1
- package/dist/api/types/Episode.js.map +1 -1
- package/dist/api/types/EpisodeCreatedResponseData.d.ts +2 -1
- package/dist/api/types/EpisodeCreatedResponseData.d.ts.map +1 -1
- package/dist/api/types/EpisodeCreatedResponseData.js.map +1 -1
- package/dist/api/types/EpisodeSearchParams.d.ts +21 -0
- package/dist/api/types/EpisodeSearchParams.d.ts.map +1 -0
- package/dist/api/types/EpisodeSearchParams.js +3 -0
- package/dist/api/types/EpisodeSearchParams.js.map +1 -0
- package/dist/api/types/Organization.d.ts +2 -0
- package/dist/api/types/Organization.d.ts.map +1 -1
- package/dist/api/types/Organization.js.map +1 -1
- package/dist/api/types/Podcast.d.ts +3 -0
- package/dist/api/types/Podcast.d.ts.map +1 -1
- package/dist/api/types/Podcast.js.map +1 -1
- package/dist/api/types/PodcastSearchParams.d.ts +21 -0
- package/dist/api/types/PodcastSearchParams.d.ts.map +1 -0
- package/dist/api/types/PodcastSearchParams.js +3 -0
- package/dist/api/types/PodcastSearchParams.js.map +1 -0
- package/dist/api/types/Segment.d.ts +2 -0
- package/dist/api/types/Segment.d.ts.map +1 -1
- package/dist/api/types/Segment.js.map +1 -1
- package/dist/api/types/index.d.ts +2 -3
- package/dist/api/types/index.d.ts.map +1 -1
- package/dist/api/types/index.js +2 -3
- package/dist/api/types/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/resources/audio/client/Client.ts +2 -2
- package/src/api/resources/audio/client/requests/FinalizeAudioUploadRequest.ts +2 -2
- package/src/api/resources/episodes/client/Client.ts +110 -0
- package/src/api/resources/episodes/client/requests/EpisodeCreate.ts +1 -0
- package/src/api/resources/episodes/client/requests/EpisodeUpdate.ts +1 -0
- package/src/api/resources/episodes/client/requests/SearchEpisodesRequest.ts +24 -0
- package/src/api/resources/episodes/client/requests/index.ts +1 -0
- package/src/api/resources/podcasts/client/Client.ts +110 -0
- package/src/api/resources/podcasts/client/requests/PodcastCreate.ts +1 -0
- package/src/api/resources/podcasts/client/requests/PodcastUpdate.ts +1 -0
- package/src/api/resources/podcasts/client/requests/SearchPodcastsRequest.ts +24 -0
- package/src/api/resources/podcasts/client/requests/index.ts +1 -0
- package/src/api/types/AudioEntityLink.ts +3 -3
- package/src/api/types/Episode.ts +2 -1
- package/src/api/types/EpisodeCreatedResponseData.ts +2 -1
- package/src/api/types/EpisodeSearchParams.ts +23 -0
- package/src/api/types/Organization.ts +3 -0
- package/src/api/types/Podcast.ts +3 -0
- package/src/api/types/PodcastSearchParams.ts +23 -0
- package/src/api/types/Segment.ts +3 -0
- package/src/api/types/index.ts +2 -3
- package/dist/api/types/AdId.d.ts +0 -10
- package/dist/api/types/AdId.d.ts.map +0 -1
- package/dist/api/types/AdId.js +0 -8
- package/dist/api/types/AdId.js.map +0 -1
- package/dist/api/types/EpisodeId.d.ts +0 -10
- package/dist/api/types/EpisodeId.d.ts.map +0 -1
- package/dist/api/types/EpisodeId.js +0 -8
- package/dist/api/types/EpisodeId.js.map +0 -1
- package/dist/api/types/SegmentId.d.ts +0 -10
- package/dist/api/types/SegmentId.d.ts.map +0 -1
- package/dist/api/types/SegmentId.js +0 -8
- package/dist/api/types/SegmentId.js.map +0 -1
- package/src/api/types/AdId.ts +0 -12
- package/src/api/types/EpisodeId.ts +0 -12
- package/src/api/types/SegmentId.ts +0 -12
|
@@ -272,7 +272,7 @@ export class AudioClient {
|
|
|
272
272
|
* audioId: "audioId",
|
|
273
273
|
* body: {
|
|
274
274
|
* type: "episode",
|
|
275
|
-
* id:
|
|
275
|
+
* id: "id"
|
|
276
276
|
* }
|
|
277
277
|
* })
|
|
278
278
|
*/
|
|
@@ -307,7 +307,7 @@ export class AudioClient {
|
|
|
307
307
|
contentType: "application/json",
|
|
308
308
|
queryParameters: requestOptions?.queryParams,
|
|
309
309
|
requestType: "json",
|
|
310
|
-
body: _body,
|
|
310
|
+
body: _body != null ? _body : undefined,
|
|
311
311
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
312
312
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
313
313
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -8,12 +8,12 @@ import type * as Ichos from "../../../../index.js";
|
|
|
8
8
|
* audioId: "audioId",
|
|
9
9
|
* body: {
|
|
10
10
|
* type: "episode",
|
|
11
|
-
* id:
|
|
11
|
+
* id: "id"
|
|
12
12
|
* }
|
|
13
13
|
* }
|
|
14
14
|
*/
|
|
15
15
|
export interface FinalizeAudioUploadRequest {
|
|
16
16
|
/** - The ID of the audio resource (returned by /put) */
|
|
17
17
|
audioId: string;
|
|
18
|
-
body: Ichos.AudioEntityLink;
|
|
18
|
+
body: Ichos.AudioEntityLink | null;
|
|
19
19
|
}
|
|
@@ -205,6 +205,116 @@ export class EpisodesClient {
|
|
|
205
205
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/episodes");
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
+
/**
|
|
209
|
+
* Search episodes in the authenticated organization.
|
|
210
|
+
*
|
|
211
|
+
* @param {Ichos.SearchEpisodesRequest} request
|
|
212
|
+
* @param {EpisodesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
213
|
+
*
|
|
214
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
215
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
216
|
+
* @throws {@link Ichos.InternalServerError}
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* await client.episodes.searchEpisodes({
|
|
220
|
+
* metadataJson: "{\"externalId\":\"123\",\"source\":\"crm\"}",
|
|
221
|
+
* metadataKey: "externalId",
|
|
222
|
+
* query: "launch"
|
|
223
|
+
* })
|
|
224
|
+
*/
|
|
225
|
+
public searchEpisodes(
|
|
226
|
+
request: Ichos.SearchEpisodesRequest = {},
|
|
227
|
+
requestOptions?: EpisodesClient.RequestOptions,
|
|
228
|
+
): core.HttpResponsePromise<Ichos.EpisodesResponse> {
|
|
229
|
+
return core.HttpResponsePromise.fromPromise(this.__searchEpisodes(request, requestOptions));
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
private async __searchEpisodes(
|
|
233
|
+
request: Ichos.SearchEpisodesRequest = {},
|
|
234
|
+
requestOptions?: EpisodesClient.RequestOptions,
|
|
235
|
+
): Promise<core.WithRawResponse<Ichos.EpisodesResponse>> {
|
|
236
|
+
const { metadataJson, metadataKey, metadataValue, query, limit, offset } = request;
|
|
237
|
+
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
|
|
238
|
+
if (metadataJson != null) {
|
|
239
|
+
_queryParams.metadataJson = metadataJson;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (metadataKey != null) {
|
|
243
|
+
_queryParams.metadataKey = metadataKey;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (metadataValue != null) {
|
|
247
|
+
_queryParams.metadataValue = metadataValue;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (query != null) {
|
|
251
|
+
_queryParams.query = query;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (limit != null) {
|
|
255
|
+
_queryParams.limit = limit.toString();
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (offset != null) {
|
|
259
|
+
_queryParams.offset = offset.toString();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
|
|
263
|
+
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
|
264
|
+
_authRequest.headers,
|
|
265
|
+
this._options?.headers,
|
|
266
|
+
mergeOnlyDefinedHeaders({ "x-virtual-user": requestOptions?.virtualUser ?? this._options?.virtualUser }),
|
|
267
|
+
requestOptions?.headers,
|
|
268
|
+
);
|
|
269
|
+
const _response = await core.fetcher({
|
|
270
|
+
url: core.url.join(
|
|
271
|
+
(await core.Supplier.get(this._options.baseUrl)) ??
|
|
272
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
273
|
+
environments.IchosEnvironment.Default,
|
|
274
|
+
"v1/episodes/search",
|
|
275
|
+
),
|
|
276
|
+
method: "GET",
|
|
277
|
+
headers: _headers,
|
|
278
|
+
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
|
|
279
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
280
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
281
|
+
abortSignal: requestOptions?.abortSignal,
|
|
282
|
+
fetchFn: this._options?.fetch,
|
|
283
|
+
logging: this._options.logging,
|
|
284
|
+
});
|
|
285
|
+
if (_response.ok) {
|
|
286
|
+
return { data: _response.body as Ichos.EpisodesResponse, rawResponse: _response.rawResponse };
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
if (_response.error.reason === "status-code") {
|
|
290
|
+
switch (_response.error.statusCode) {
|
|
291
|
+
case 401:
|
|
292
|
+
throw new Ichos.UnauthorizedError(
|
|
293
|
+
_response.error.body as Ichos.UnauthorizedErrorResponse,
|
|
294
|
+
_response.rawResponse,
|
|
295
|
+
);
|
|
296
|
+
case 403:
|
|
297
|
+
throw new Ichos.ForbiddenError(
|
|
298
|
+
_response.error.body as Ichos.UnauthenticatedErrorResponse,
|
|
299
|
+
_response.rawResponse,
|
|
300
|
+
);
|
|
301
|
+
case 500:
|
|
302
|
+
throw new Ichos.InternalServerError(
|
|
303
|
+
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
304
|
+
_response.rawResponse,
|
|
305
|
+
);
|
|
306
|
+
default:
|
|
307
|
+
throw new errors.IchosError({
|
|
308
|
+
statusCode: _response.error.statusCode,
|
|
309
|
+
body: _response.error.body,
|
|
310
|
+
rawResponse: _response.rawResponse,
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/episodes/search");
|
|
316
|
+
}
|
|
317
|
+
|
|
208
318
|
/**
|
|
209
319
|
* Retrieve a single episode by ID.
|
|
210
320
|
*
|
|
@@ -27,6 +27,7 @@ export interface EpisodeCreate {
|
|
|
27
27
|
persons?: Ichos.Person[] | null;
|
|
28
28
|
license?: string | null;
|
|
29
29
|
status?: EpisodeCreate.Status;
|
|
30
|
+
metadata?: Ichos.Metadata | null;
|
|
30
31
|
autoPublish?: boolean;
|
|
31
32
|
coverOptions?: Ichos.CoverUploadOptions;
|
|
32
33
|
audioOptions?: Ichos.AudioUploadOptions;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @example
|
|
5
|
+
* {
|
|
6
|
+
* metadataJson: "{\"externalId\":\"123\",\"source\":\"crm\"}",
|
|
7
|
+
* metadataKey: "externalId",
|
|
8
|
+
* query: "launch"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface SearchEpisodesRequest {
|
|
12
|
+
/** JSON object string to match against metadata (JSONB containment). */
|
|
13
|
+
metadataJson?: string;
|
|
14
|
+
/** Metadata key to filter by. */
|
|
15
|
+
metadataKey?: string;
|
|
16
|
+
/** Metadata value to filter by (string, number, boolean, or null). */
|
|
17
|
+
metadataValue?: string;
|
|
18
|
+
/** Search query string. Searches across episode fields and metadata. */
|
|
19
|
+
query?: string;
|
|
20
|
+
/** Max number of records to return. */
|
|
21
|
+
limit?: number;
|
|
22
|
+
/** Number of records to skip. */
|
|
23
|
+
offset?: number;
|
|
24
|
+
}
|
|
@@ -10,3 +10,4 @@ export type { LinkEpisodeAudioRequest } from "./LinkEpisodeAudioRequest.js";
|
|
|
10
10
|
export type { ListPodcastEpisodesRequest } from "./ListPodcastEpisodesRequest.js";
|
|
11
11
|
export type { PublishEpisodeRequest } from "./PublishEpisodeRequest.js";
|
|
12
12
|
export type { PullEpisodeCoverFromUrlRequest } from "./PullEpisodeCoverFromUrlRequest.js";
|
|
13
|
+
export type { SearchEpisodesRequest } from "./SearchEpisodesRequest.js";
|
|
@@ -191,6 +191,116 @@ export class PodcastsClient {
|
|
|
191
191
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/podcasts");
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
+
/**
|
|
195
|
+
* Search podcasts in the authenticated organization.
|
|
196
|
+
*
|
|
197
|
+
* @param {Ichos.SearchPodcastsRequest} request
|
|
198
|
+
* @param {PodcastsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
199
|
+
*
|
|
200
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
201
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
202
|
+
* @throws {@link Ichos.InternalServerError}
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* await client.podcasts.searchPodcasts({
|
|
206
|
+
* metadataJson: "{\"externalId\":\"123\",\"source\":\"crm\"}",
|
|
207
|
+
* metadataKey: "externalId",
|
|
208
|
+
* query: "tech"
|
|
209
|
+
* })
|
|
210
|
+
*/
|
|
211
|
+
public searchPodcasts(
|
|
212
|
+
request: Ichos.SearchPodcastsRequest = {},
|
|
213
|
+
requestOptions?: PodcastsClient.RequestOptions,
|
|
214
|
+
): core.HttpResponsePromise<Ichos.PodcastsResponse> {
|
|
215
|
+
return core.HttpResponsePromise.fromPromise(this.__searchPodcasts(request, requestOptions));
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
private async __searchPodcasts(
|
|
219
|
+
request: Ichos.SearchPodcastsRequest = {},
|
|
220
|
+
requestOptions?: PodcastsClient.RequestOptions,
|
|
221
|
+
): Promise<core.WithRawResponse<Ichos.PodcastsResponse>> {
|
|
222
|
+
const { metadataJson, metadataKey, metadataValue, query, limit, offset } = request;
|
|
223
|
+
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
|
|
224
|
+
if (metadataJson != null) {
|
|
225
|
+
_queryParams.metadataJson = metadataJson;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (metadataKey != null) {
|
|
229
|
+
_queryParams.metadataKey = metadataKey;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (metadataValue != null) {
|
|
233
|
+
_queryParams.metadataValue = metadataValue;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (query != null) {
|
|
237
|
+
_queryParams.query = query;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (limit != null) {
|
|
241
|
+
_queryParams.limit = limit.toString();
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if (offset != null) {
|
|
245
|
+
_queryParams.offset = offset.toString();
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
|
|
249
|
+
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
|
250
|
+
_authRequest.headers,
|
|
251
|
+
this._options?.headers,
|
|
252
|
+
mergeOnlyDefinedHeaders({ "x-virtual-user": requestOptions?.virtualUser ?? this._options?.virtualUser }),
|
|
253
|
+
requestOptions?.headers,
|
|
254
|
+
);
|
|
255
|
+
const _response = await core.fetcher({
|
|
256
|
+
url: core.url.join(
|
|
257
|
+
(await core.Supplier.get(this._options.baseUrl)) ??
|
|
258
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
259
|
+
environments.IchosEnvironment.Default,
|
|
260
|
+
"v1/podcasts/search",
|
|
261
|
+
),
|
|
262
|
+
method: "GET",
|
|
263
|
+
headers: _headers,
|
|
264
|
+
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
|
|
265
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
266
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
267
|
+
abortSignal: requestOptions?.abortSignal,
|
|
268
|
+
fetchFn: this._options?.fetch,
|
|
269
|
+
logging: this._options.logging,
|
|
270
|
+
});
|
|
271
|
+
if (_response.ok) {
|
|
272
|
+
return { data: _response.body as Ichos.PodcastsResponse, rawResponse: _response.rawResponse };
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if (_response.error.reason === "status-code") {
|
|
276
|
+
switch (_response.error.statusCode) {
|
|
277
|
+
case 401:
|
|
278
|
+
throw new Ichos.UnauthorizedError(
|
|
279
|
+
_response.error.body as Ichos.UnauthorizedErrorResponse,
|
|
280
|
+
_response.rawResponse,
|
|
281
|
+
);
|
|
282
|
+
case 403:
|
|
283
|
+
throw new Ichos.ForbiddenError(
|
|
284
|
+
_response.error.body as Ichos.UnauthenticatedErrorResponse,
|
|
285
|
+
_response.rawResponse,
|
|
286
|
+
);
|
|
287
|
+
case 500:
|
|
288
|
+
throw new Ichos.InternalServerError(
|
|
289
|
+
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
290
|
+
_response.rawResponse,
|
|
291
|
+
);
|
|
292
|
+
default:
|
|
293
|
+
throw new errors.IchosError({
|
|
294
|
+
statusCode: _response.error.statusCode,
|
|
295
|
+
body: _response.error.body,
|
|
296
|
+
rawResponse: _response.rawResponse,
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/podcasts/search");
|
|
302
|
+
}
|
|
303
|
+
|
|
194
304
|
/**
|
|
195
305
|
* Import a podcast from an RSS feed URL.
|
|
196
306
|
*
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @example
|
|
5
|
+
* {
|
|
6
|
+
* metadataJson: "{\"externalId\":\"123\",\"source\":\"crm\"}",
|
|
7
|
+
* metadataKey: "externalId",
|
|
8
|
+
* query: "tech"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface SearchPodcastsRequest {
|
|
12
|
+
/** JSON object string to match against metadata (JSONB containment). */
|
|
13
|
+
metadataJson?: string;
|
|
14
|
+
/** Metadata key to filter by. */
|
|
15
|
+
metadataKey?: string;
|
|
16
|
+
/** Metadata value to filter by (string, number, boolean, or null). */
|
|
17
|
+
metadataValue?: string;
|
|
18
|
+
/** Search query string. Searches across podcast fields and metadata. */
|
|
19
|
+
query?: string;
|
|
20
|
+
/** Max number of records to return. */
|
|
21
|
+
limit?: number;
|
|
22
|
+
/** Number of records to skip. */
|
|
23
|
+
offset?: number;
|
|
24
|
+
}
|
|
@@ -9,4 +9,5 @@ export type { PodcastCreate } from "./PodcastCreate.js";
|
|
|
9
9
|
export type { PodcastUpdate } from "./PodcastUpdate.js";
|
|
10
10
|
export type { PublishPodcastRequest } from "./PublishPodcastRequest.js";
|
|
11
11
|
export type { PullPodcastCoverFromUrlRequest } from "./PullPodcastCoverFromUrlRequest.js";
|
|
12
|
+
export type { SearchPodcastsRequest } from "./SearchPodcastsRequest.js";
|
|
12
13
|
export type { ValidatePodcastRequest } from "./ValidatePodcastRequest.js";
|
|
@@ -7,16 +7,16 @@ export type AudioEntityLink = Ichos.AudioEntityLink.Episode | Ichos.AudioEntityL
|
|
|
7
7
|
export namespace AudioEntityLink {
|
|
8
8
|
export interface Episode {
|
|
9
9
|
type: "episode";
|
|
10
|
-
id:
|
|
10
|
+
id: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export interface Ad {
|
|
14
14
|
type: "ad";
|
|
15
|
-
id:
|
|
15
|
+
id: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export interface Segment {
|
|
19
19
|
type: "segment";
|
|
20
|
-
id:
|
|
20
|
+
id: string;
|
|
21
21
|
}
|
|
22
22
|
}
|
package/src/api/types/Episode.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface Episode {
|
|
|
14
14
|
season: number | null;
|
|
15
15
|
episode: number | null;
|
|
16
16
|
episodeType: Episode.EpisodeType;
|
|
17
|
-
|
|
17
|
+
coverUrl: string | null;
|
|
18
18
|
transcripts: Ichos.EpisodeTranscript[] | null;
|
|
19
19
|
chaptersUrl: string | null;
|
|
20
20
|
persons: Ichos.Person[] | null;
|
|
@@ -24,6 +24,7 @@ export interface Episode {
|
|
|
24
24
|
audioId: string | null;
|
|
25
25
|
guid: string;
|
|
26
26
|
slug: string;
|
|
27
|
+
metadata: Ichos.Metadata;
|
|
27
28
|
url: string;
|
|
28
29
|
createdAt: string;
|
|
29
30
|
updatedAt: string;
|
|
@@ -14,7 +14,7 @@ export interface EpisodeCreatedResponseData {
|
|
|
14
14
|
season: number | null;
|
|
15
15
|
episode: number | null;
|
|
16
16
|
episodeType: EpisodeCreatedResponseData.EpisodeType;
|
|
17
|
-
|
|
17
|
+
coverUrl: string | null;
|
|
18
18
|
transcripts: Ichos.EpisodeTranscript[] | null;
|
|
19
19
|
chaptersUrl: string | null;
|
|
20
20
|
persons: Ichos.Person[] | null;
|
|
@@ -24,6 +24,7 @@ export interface EpisodeCreatedResponseData {
|
|
|
24
24
|
audioId: string | null;
|
|
25
25
|
guid: string;
|
|
26
26
|
slug: string;
|
|
27
|
+
metadata: Ichos.Metadata;
|
|
27
28
|
url: string;
|
|
28
29
|
createdAt: string;
|
|
29
30
|
updatedAt: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
export interface EpisodeSearchParams {
|
|
4
|
+
/** JSON object string to match against metadata (JSONB containment). */
|
|
5
|
+
metadataJson?: string;
|
|
6
|
+
/** Metadata key to filter by. */
|
|
7
|
+
metadataKey?: string;
|
|
8
|
+
/** Metadata value to filter by (string, number, boolean, or null). */
|
|
9
|
+
metadataValue?: EpisodeSearchParams.MetadataValue | null;
|
|
10
|
+
/** Search query string. Searches across episode fields and metadata. */
|
|
11
|
+
query?: string;
|
|
12
|
+
/** Max number of records to return. */
|
|
13
|
+
limit?: number;
|
|
14
|
+
/** Number of records to skip. */
|
|
15
|
+
offset?: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export namespace EpisodeSearchParams {
|
|
19
|
+
/**
|
|
20
|
+
* Metadata value to filter by (string, number, boolean, or null).
|
|
21
|
+
*/
|
|
22
|
+
export type MetadataValue = string | number | boolean;
|
|
23
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
import type * as Ichos from "../index.js";
|
|
4
|
+
|
|
3
5
|
export interface Organization {
|
|
4
6
|
/** Unique identifier for the organization. */
|
|
5
7
|
id: string;
|
|
@@ -7,6 +9,7 @@ export interface Organization {
|
|
|
7
9
|
name: string;
|
|
8
10
|
/** The status of the organization. */
|
|
9
11
|
status: Organization.Status;
|
|
12
|
+
metadata: Ichos.Metadata;
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
export namespace Organization {
|
package/src/api/types/Podcast.ts
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
export interface PodcastSearchParams {
|
|
4
|
+
/** JSON object string to match against metadata (JSONB containment). */
|
|
5
|
+
metadataJson?: string;
|
|
6
|
+
/** Metadata key to filter by. */
|
|
7
|
+
metadataKey?: string;
|
|
8
|
+
/** Metadata value to filter by (string, number, boolean, or null). */
|
|
9
|
+
metadataValue?: PodcastSearchParams.MetadataValue | null;
|
|
10
|
+
/** Search query string. Searches across podcast fields and metadata. */
|
|
11
|
+
query?: string;
|
|
12
|
+
/** Max number of records to return. */
|
|
13
|
+
limit?: number;
|
|
14
|
+
/** Number of records to skip. */
|
|
15
|
+
offset?: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export namespace PodcastSearchParams {
|
|
19
|
+
/**
|
|
20
|
+
* Metadata value to filter by (string, number, boolean, or null).
|
|
21
|
+
*/
|
|
22
|
+
export type MetadataValue = string | number | boolean;
|
|
23
|
+
}
|
package/src/api/types/Segment.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
import type * as Ichos from "../index.js";
|
|
4
|
+
|
|
3
5
|
export interface Segment {
|
|
4
6
|
id: string;
|
|
5
7
|
scope: Segment.Scope;
|
|
@@ -9,6 +11,7 @@ export interface Segment {
|
|
|
9
11
|
virtualUserId?: string | null;
|
|
10
12
|
podcastId?: string | null;
|
|
11
13
|
audioId?: string | null;
|
|
14
|
+
metadata: Ichos.Metadata;
|
|
12
15
|
createdAt: string;
|
|
13
16
|
updatedAt: string;
|
|
14
17
|
}
|
package/src/api/types/index.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from "./Ad.js";
|
|
2
|
-
export * from "./AdId.js";
|
|
3
2
|
export * from "./AdInsertionPoint.js";
|
|
4
3
|
export * from "./AdInsertionPointListResponse.js";
|
|
5
4
|
export * from "./AdInsertionPointResponse.js";
|
|
@@ -26,8 +25,8 @@ export * from "./CoverUploadResponse.js";
|
|
|
26
25
|
export * from "./Episode.js";
|
|
27
26
|
export * from "./EpisodeCreatedResponseData.js";
|
|
28
27
|
export * from "./EpisodeCreateResponse.js";
|
|
29
|
-
export * from "./EpisodeId.js";
|
|
30
28
|
export * from "./EpisodeResponse.js";
|
|
29
|
+
export * from "./EpisodeSearchParams.js";
|
|
31
30
|
export * from "./EpisodesResponse.js";
|
|
32
31
|
export * from "./EpisodeTranscript.js";
|
|
33
32
|
export * from "./InternalServerErrorBody.js";
|
|
@@ -50,11 +49,11 @@ export * from "./Podcast.js";
|
|
|
50
49
|
export * from "./PodcastImportCompletedPayload.js";
|
|
51
50
|
export * from "./PodcastImportFailedPayload.js";
|
|
52
51
|
export * from "./PodcastResponse.js";
|
|
52
|
+
export * from "./PodcastSearchParams.js";
|
|
53
53
|
export * from "./PodcastsResponse.js";
|
|
54
54
|
export * from "./PublishPodcastOutput.js";
|
|
55
55
|
export * from "./RetrieveCoverResponse.js";
|
|
56
56
|
export * from "./Segment.js";
|
|
57
|
-
export * from "./SegmentId.js";
|
|
58
57
|
export * from "./SegmentListResponse.js";
|
|
59
58
|
export * from "./SegmentResponse.js";
|
|
60
59
|
export * from "./StringOrNullResponse.js";
|
package/dist/api/types/AdId.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AdId.d.ts","sourceRoot":"","sources":["../../../src/api/types/AdId.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,IAAI;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;CAC9B;AAED,yBAAiB,IAAI,CAAC;IACX,MAAM,SAAS;;KAEZ,CAAC;IACX,KAAY,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;CACtE"}
|
package/dist/api/types/AdId.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AdId.js","sourceRoot":"","sources":["../../../src/api/types/AdId.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAMhE,MAAM,KAAW,IAAI,CAKpB;AALD,WAAiB,IAAI;IACJ,cAAS,GAAG;QACrB,IAAI,EAAE,MAAM;KACN,CAAC;AAEf,CAAC,EALgB,IAAI,KAAJ,IAAI,QAKpB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface EpisodeId {
|
|
2
|
-
undefined?: EpisodeId.Undefined;
|
|
3
|
-
}
|
|
4
|
-
export declare namespace EpisodeId {
|
|
5
|
-
const Undefined: {
|
|
6
|
-
readonly EpisodeId: "EpisodeId";
|
|
7
|
-
};
|
|
8
|
-
type Undefined = (typeof Undefined)[keyof typeof Undefined];
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=EpisodeId.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EpisodeId.d.ts","sourceRoot":"","sources":["../../../src/api/types/EpisodeId.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC;CACnC;AAED,yBAAiB,SAAS,CAAC;IAChB,MAAM,SAAS;;KAEZ,CAAC;IACX,KAAY,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;CACtE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EpisodeId.js","sourceRoot":"","sources":["../../../src/api/types/EpisodeId.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAMhE,MAAM,KAAW,SAAS,CAKzB;AALD,WAAiB,SAAS;IACT,mBAAS,GAAG;QACrB,SAAS,EAAE,WAAW;KAChB,CAAC;AAEf,CAAC,EALgB,SAAS,KAAT,SAAS,QAKzB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface SegmentId {
|
|
2
|
-
undefined?: SegmentId.Undefined;
|
|
3
|
-
}
|
|
4
|
-
export declare namespace SegmentId {
|
|
5
|
-
const Undefined: {
|
|
6
|
-
readonly SegmentId: "SegmentId";
|
|
7
|
-
};
|
|
8
|
-
type Undefined = (typeof Undefined)[keyof typeof Undefined];
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=SegmentId.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentId.d.ts","sourceRoot":"","sources":["../../../src/api/types/SegmentId.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC;CACnC;AAED,yBAAiB,SAAS,CAAC;IAChB,MAAM,SAAS;;KAEZ,CAAC;IACX,KAAY,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;CACtE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentId.js","sourceRoot":"","sources":["../../../src/api/types/SegmentId.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAMhE,MAAM,KAAW,SAAS,CAKzB;AALD,WAAiB,SAAS;IACT,mBAAS,GAAG;QACrB,SAAS,EAAE,WAAW;KAChB,CAAC;AAEf,CAAC,EALgB,SAAS,KAAT,SAAS,QAKzB"}
|
package/src/api/types/AdId.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
export interface AdId {
|
|
4
|
-
undefined?: AdId.Undefined;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export namespace AdId {
|
|
8
|
-
export const Undefined = {
|
|
9
|
-
AdId: "AdId",
|
|
10
|
-
} as const;
|
|
11
|
-
export type Undefined = (typeof Undefined)[keyof typeof Undefined];
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
export interface EpisodeId {
|
|
4
|
-
undefined?: EpisodeId.Undefined;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export namespace EpisodeId {
|
|
8
|
-
export const Undefined = {
|
|
9
|
-
EpisodeId: "EpisodeId",
|
|
10
|
-
} as const;
|
|
11
|
-
export type Undefined = (typeof Undefined)[keyof typeof Undefined];
|
|
12
|
-
}
|