-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): update via SDK Studio (#357)
- Loading branch information
1 parent
0bdd105
commit a63f145
Showing
21 changed files
with
782 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
configured_endpoints: 1259 | ||
configured_endpoints: 1266 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
import * as Core from 'cloudflare/core'; | ||
import { APIResource } from 'cloudflare/resource'; | ||
import * as CaptionsAPI from 'cloudflare/resources/stream/captions/captions'; | ||
import * as LanguageAPI from 'cloudflare/resources/stream/captions/language/language'; | ||
|
||
export class Captions extends APIResource { | ||
language: LanguageAPI.Language = new LanguageAPI.Language(this._client); | ||
|
||
/** | ||
* Lists the available captions or subtitles for a specific video. | ||
*/ | ||
get( | ||
identifier: string, | ||
params: CaptionGetParams, | ||
options?: Core.RequestOptions, | ||
): Core.APIPromise<CaptionGetResponse> { | ||
const { account_id } = params; | ||
return ( | ||
this._client.get(`/accounts/${account_id}/stream/${identifier}/captions`, options) as Core.APIPromise<{ | ||
result: CaptionGetResponse; | ||
}> | ||
)._thenUnwrap((obj) => obj.result); | ||
} | ||
} | ||
|
||
export interface Caption { | ||
/** | ||
* The language label displayed in the native language to users. | ||
*/ | ||
label?: string; | ||
|
||
/** | ||
* The language tag in BCP 47 format. | ||
*/ | ||
language?: string; | ||
} | ||
|
||
export type CaptionGetResponse = Array<Caption>; | ||
|
||
export interface CaptionGetParams { | ||
/** | ||
* Identifier | ||
*/ | ||
account_id: string; | ||
} | ||
|
||
export namespace Captions { | ||
export import Caption = CaptionsAPI.Caption; | ||
export import CaptionGetResponse = CaptionsAPI.CaptionGetResponse; | ||
export import CaptionGetParams = CaptionsAPI.CaptionGetParams; | ||
export import Language = LanguageAPI.Language; | ||
export import LanguageDeleteResponse = LanguageAPI.LanguageDeleteResponse; | ||
export import LanguageUpdateParams = LanguageAPI.LanguageUpdateParams; | ||
export import LanguageDeleteParams = LanguageAPI.LanguageDeleteParams; | ||
export import LanguageGetParams = LanguageAPI.LanguageGetParams; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
export { Caption, CaptionGetResponse, CaptionGetParams, Captions } from './captions'; | ||
export { | ||
LanguageDeleteResponse, | ||
LanguageUpdateParams, | ||
LanguageDeleteParams, | ||
LanguageGetParams, | ||
Language, | ||
} from './language/index'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
export { | ||
LanguageDeleteResponse, | ||
LanguageUpdateParams, | ||
LanguageDeleteParams, | ||
LanguageGetParams, | ||
Language, | ||
} from './language'; | ||
export { VttGetResponse, VttGetParams, Vtt } from './vtt'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
import * as Core from 'cloudflare/core'; | ||
import { APIResource } from 'cloudflare/resource'; | ||
import * as VttAPI from 'cloudflare/resources/stream/captions/language/vtt'; | ||
|
||
export class Vtt extends APIResource { | ||
/** | ||
* Return WebVTT captions for a provided language. | ||
*/ | ||
get( | ||
identifier: string, | ||
language: string, | ||
params: VttGetParams, | ||
options?: Core.RequestOptions, | ||
): Core.APIPromise<string> { | ||
const { account_id, body } = params; | ||
return this._client.get(`/accounts/${account_id}/stream/${identifier}/captions/${language}/vtt`, { | ||
body: body, | ||
...options, | ||
headers: { Accept: 'text/vtt', ...options?.headers }, | ||
}); | ||
} | ||
} | ||
|
||
export type VttGetResponse = string; | ||
|
||
export interface VttGetParams { | ||
/** | ||
* Path param: Identifier | ||
*/ | ||
account_id: string; | ||
|
||
/** | ||
* Body param: | ||
*/ | ||
body: unknown; | ||
} | ||
|
||
export namespace Vtt { | ||
export import VttGetResponse = VttAPI.VttGetResponse; | ||
export import VttGetParams = VttAPI.VttGetParams; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.