@sanity/client 7.18.0 → 7.20.0
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.browser.cjs +22 -2
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +57 -24
- package/dist/index.browser.d.ts +57 -24
- package/dist/index.browser.js +22 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +23 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +57 -24
- package/dist/index.d.ts +57 -24
- package/dist/index.js +23 -3
- package/dist/index.js.map +1 -1
- package/dist/media-library.cjs.map +1 -1
- package/dist/media-library.d.cts +27 -0
- package/dist/media-library.d.ts +27 -0
- package/dist/media-library.js.map +1 -1
- package/dist/stega.browser.d.cts +57 -24
- package/dist/stega.browser.d.ts +57 -24
- package/dist/stega.d.cts +57 -24
- package/dist/stega.d.ts +57 -24
- package/package.json +1 -1
- package/src/media-library.ts +1 -0
- package/src/projects/ProjectsClient.ts +37 -36
- package/src/types.ts +28 -0
- package/umd/sanityClient.js +22 -2
- package/umd/sanityClient.min.js +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-library.cjs","sources":["../src/media-library.ts"],"sourcesContent":["import type {\n VideoPlaybackInfo,\n VideoPlaybackInfoItem,\n VideoPlaybackInfoItemSigned,\n VideoPlaybackInfoSigned,\n VideoPlaybackTokens,\n} from './types'\n\nexport type {VideoRenditionInfo, VideoRenditionInfoPublic, VideoRenditionInfoSigned} from './types'\n\n/**\n * Check if a playback info item (stream/thumbnail/etc) has a signed token\n * @internal\n */\nfunction isSignedPlayback(item: VideoPlaybackInfoItem): item is VideoPlaybackInfoItemSigned {\n return 'token' in item\n}\n\n/**\n * Check if the entire playback info response requires signed URLs\n * @public\n */\nexport function isSignedPlaybackInfo(\n playbackInfo: VideoPlaybackInfo,\n): playbackInfo is VideoPlaybackInfoSigned {\n return isSignedPlayback(playbackInfo.stream)\n}\n\n/**\n * Extract playback tokens from signed video playback info\n * @param playbackInfo - The video playback info\n * @returns The playback tokens or undefined if the response is not signed\n * @public\n * @example\n * const tokens = getPlaybackTokens(playbackInfo)\n * console.log(tokens)\n * ```json\n * {\n * stream: \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n * thumbnail: \"eyJ0a2VuIjoiVGh1bWJuYWlsVG9rZW4tMTIz...\",\n * animated: \"eyJ0a2VuIjoiQW5pbWF0ZWRUb2tlbi1kZWY...\",\n * storyboard: \"eyJ0a2VuIjoiU3Rvcnlib2FyZFRva2VuLTc4...\"\n * }\n * ```\n */\nexport function getPlaybackTokens(\n playbackInfo: VideoPlaybackInfo,\n): VideoPlaybackTokens | undefined {\n if (isSignedPlaybackInfo(playbackInfo)) {\n return {\n stream: playbackInfo.stream.token,\n thumbnail: playbackInfo.thumbnail.token,\n storyboard: playbackInfo.storyboard.token,\n animated: playbackInfo.animated.token,\n }\n }\n\n return undefined\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"media-library.cjs","sources":["../src/media-library.ts"],"sourcesContent":["import type {\n VideoPlaybackInfo,\n VideoPlaybackInfoItem,\n VideoPlaybackInfoItemSigned,\n VideoPlaybackInfoSigned,\n VideoPlaybackTokens,\n} from './types'\n\nexport type {VideoRenditionInfo, VideoRenditionInfoPublic, VideoRenditionInfoSigned} from './types'\nexport type {VideoSubtitleInfo, VideoSubtitleInfoPublic, VideoSubtitleInfoSigned} from './types'\n\n/**\n * Check if a playback info item (stream/thumbnail/etc) has a signed token\n * @internal\n */\nfunction isSignedPlayback(item: VideoPlaybackInfoItem): item is VideoPlaybackInfoItemSigned {\n return 'token' in item\n}\n\n/**\n * Check if the entire playback info response requires signed URLs\n * @public\n */\nexport function isSignedPlaybackInfo(\n playbackInfo: VideoPlaybackInfo,\n): playbackInfo is VideoPlaybackInfoSigned {\n return isSignedPlayback(playbackInfo.stream)\n}\n\n/**\n * Extract playback tokens from signed video playback info\n * @param playbackInfo - The video playback info\n * @returns The playback tokens or undefined if the response is not signed\n * @public\n * @example\n * const tokens = getPlaybackTokens(playbackInfo)\n * console.log(tokens)\n * ```json\n * {\n * stream: \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n * thumbnail: \"eyJ0a2VuIjoiVGh1bWJuYWlsVG9rZW4tMTIz...\",\n * animated: \"eyJ0a2VuIjoiQW5pbWF0ZWRUb2tlbi1kZWY...\",\n * storyboard: \"eyJ0a2VuIjoiU3Rvcnlib2FyZFRva2VuLTc4...\"\n * }\n * ```\n */\nexport function getPlaybackTokens(\n playbackInfo: VideoPlaybackInfo,\n): VideoPlaybackTokens | undefined {\n if (isSignedPlaybackInfo(playbackInfo)) {\n return {\n stream: playbackInfo.stream.token,\n thumbnail: playbackInfo.thumbnail.token,\n storyboard: playbackInfo.storyboard.token,\n animated: playbackInfo.animated.token,\n }\n }\n\n return undefined\n}\n"],"names":[],"mappings":";;AAeA,SAAS,iBAAiB,MAAkE;AAC1F,SAAO,WAAW;AACpB;AAMO,SAAS,qBACd,cACyC;AACzC,SAAO,iBAAiB,aAAa,MAAM;AAC7C;AAmBO,SAAS,kBACd,cACiC;AACjC,MAAI,qBAAqB,YAAY;AACnC,WAAO;AAAA,MACL,QAAQ,aAAa,OAAO;AAAA,MAC5B,WAAW,aAAa,UAAU;AAAA,MAClC,YAAY,aAAa,WAAW;AAAA,MACpC,UAAU,aAAa,SAAS;AAAA,IAAA;AAKtC;;;"}
|
package/dist/media-library.d.cts
CHANGED
|
@@ -33,6 +33,9 @@ declare interface VideoPlaybackInfo<
|
|
|
33
33
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
34
34
|
? VideoRenditionInfoSigned
|
|
35
35
|
: VideoRenditionInfo,
|
|
36
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
37
|
+
? VideoSubtitleInfoSigned
|
|
38
|
+
: VideoSubtitleInfo,
|
|
36
39
|
> {
|
|
37
40
|
id: string
|
|
38
41
|
thumbnail: T
|
|
@@ -42,6 +45,7 @@ declare interface VideoPlaybackInfo<
|
|
|
42
45
|
duration: number
|
|
43
46
|
aspectRatio: number
|
|
44
47
|
renditions?: R[]
|
|
48
|
+
subtitles?: S[]
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
/** @public */
|
|
@@ -87,4 +91,27 @@ export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPubl
|
|
|
87
91
|
expiresAt: string
|
|
88
92
|
}
|
|
89
93
|
|
|
94
|
+
/** @public */
|
|
95
|
+
export declare type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
96
|
+
|
|
97
|
+
/** @public */
|
|
98
|
+
export declare interface VideoSubtitleInfoPublic {
|
|
99
|
+
/** Subtitle track identifier */
|
|
100
|
+
trackId: string
|
|
101
|
+
/** ISO 639-1 language code */
|
|
102
|
+
languageCode: string
|
|
103
|
+
/** URL to the subtitle file */
|
|
104
|
+
url: string
|
|
105
|
+
/** Whether this track contains closed captions */
|
|
106
|
+
closedCaptions: boolean
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** @public */
|
|
110
|
+
export declare interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
111
|
+
/** Authentication token for signed playback */
|
|
112
|
+
token: string
|
|
113
|
+
/** Token expiration time in ISO 8601 format */
|
|
114
|
+
expiresAt: string
|
|
115
|
+
}
|
|
116
|
+
|
|
90
117
|
export {}
|
package/dist/media-library.d.ts
CHANGED
|
@@ -33,6 +33,9 @@ declare interface VideoPlaybackInfo<
|
|
|
33
33
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
34
34
|
? VideoRenditionInfoSigned
|
|
35
35
|
: VideoRenditionInfo,
|
|
36
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
37
|
+
? VideoSubtitleInfoSigned
|
|
38
|
+
: VideoSubtitleInfo,
|
|
36
39
|
> {
|
|
37
40
|
id: string
|
|
38
41
|
thumbnail: T
|
|
@@ -42,6 +45,7 @@ declare interface VideoPlaybackInfo<
|
|
|
42
45
|
duration: number
|
|
43
46
|
aspectRatio: number
|
|
44
47
|
renditions?: R[]
|
|
48
|
+
subtitles?: S[]
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
/** @public */
|
|
@@ -87,4 +91,27 @@ export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPubl
|
|
|
87
91
|
expiresAt: string
|
|
88
92
|
}
|
|
89
93
|
|
|
94
|
+
/** @public */
|
|
95
|
+
export declare type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
96
|
+
|
|
97
|
+
/** @public */
|
|
98
|
+
export declare interface VideoSubtitleInfoPublic {
|
|
99
|
+
/** Subtitle track identifier */
|
|
100
|
+
trackId: string
|
|
101
|
+
/** ISO 639-1 language code */
|
|
102
|
+
languageCode: string
|
|
103
|
+
/** URL to the subtitle file */
|
|
104
|
+
url: string
|
|
105
|
+
/** Whether this track contains closed captions */
|
|
106
|
+
closedCaptions: boolean
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** @public */
|
|
110
|
+
export declare interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
111
|
+
/** Authentication token for signed playback */
|
|
112
|
+
token: string
|
|
113
|
+
/** Token expiration time in ISO 8601 format */
|
|
114
|
+
expiresAt: string
|
|
115
|
+
}
|
|
116
|
+
|
|
90
117
|
export {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-library.js","sources":["../src/media-library.ts"],"sourcesContent":["import type {\n VideoPlaybackInfo,\n VideoPlaybackInfoItem,\n VideoPlaybackInfoItemSigned,\n VideoPlaybackInfoSigned,\n VideoPlaybackTokens,\n} from './types'\n\nexport type {VideoRenditionInfo, VideoRenditionInfoPublic, VideoRenditionInfoSigned} from './types'\n\n/**\n * Check if a playback info item (stream/thumbnail/etc) has a signed token\n * @internal\n */\nfunction isSignedPlayback(item: VideoPlaybackInfoItem): item is VideoPlaybackInfoItemSigned {\n return 'token' in item\n}\n\n/**\n * Check if the entire playback info response requires signed URLs\n * @public\n */\nexport function isSignedPlaybackInfo(\n playbackInfo: VideoPlaybackInfo,\n): playbackInfo is VideoPlaybackInfoSigned {\n return isSignedPlayback(playbackInfo.stream)\n}\n\n/**\n * Extract playback tokens from signed video playback info\n * @param playbackInfo - The video playback info\n * @returns The playback tokens or undefined if the response is not signed\n * @public\n * @example\n * const tokens = getPlaybackTokens(playbackInfo)\n * console.log(tokens)\n * ```json\n * {\n * stream: \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n * thumbnail: \"eyJ0a2VuIjoiVGh1bWJuYWlsVG9rZW4tMTIz...\",\n * animated: \"eyJ0a2VuIjoiQW5pbWF0ZWRUb2tlbi1kZWY...\",\n * storyboard: \"eyJ0a2VuIjoiU3Rvcnlib2FyZFRva2VuLTc4...\"\n * }\n * ```\n */\nexport function getPlaybackTokens(\n playbackInfo: VideoPlaybackInfo,\n): VideoPlaybackTokens | undefined {\n if (isSignedPlaybackInfo(playbackInfo)) {\n return {\n stream: playbackInfo.stream.token,\n thumbnail: playbackInfo.thumbnail.token,\n storyboard: playbackInfo.storyboard.token,\n animated: playbackInfo.animated.token,\n }\n }\n\n return undefined\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"media-library.js","sources":["../src/media-library.ts"],"sourcesContent":["import type {\n VideoPlaybackInfo,\n VideoPlaybackInfoItem,\n VideoPlaybackInfoItemSigned,\n VideoPlaybackInfoSigned,\n VideoPlaybackTokens,\n} from './types'\n\nexport type {VideoRenditionInfo, VideoRenditionInfoPublic, VideoRenditionInfoSigned} from './types'\nexport type {VideoSubtitleInfo, VideoSubtitleInfoPublic, VideoSubtitleInfoSigned} from './types'\n\n/**\n * Check if a playback info item (stream/thumbnail/etc) has a signed token\n * @internal\n */\nfunction isSignedPlayback(item: VideoPlaybackInfoItem): item is VideoPlaybackInfoItemSigned {\n return 'token' in item\n}\n\n/**\n * Check if the entire playback info response requires signed URLs\n * @public\n */\nexport function isSignedPlaybackInfo(\n playbackInfo: VideoPlaybackInfo,\n): playbackInfo is VideoPlaybackInfoSigned {\n return isSignedPlayback(playbackInfo.stream)\n}\n\n/**\n * Extract playback tokens from signed video playback info\n * @param playbackInfo - The video playback info\n * @returns The playback tokens or undefined if the response is not signed\n * @public\n * @example\n * const tokens = getPlaybackTokens(playbackInfo)\n * console.log(tokens)\n * ```json\n * {\n * stream: \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n * thumbnail: \"eyJ0a2VuIjoiVGh1bWJuYWlsVG9rZW4tMTIz...\",\n * animated: \"eyJ0a2VuIjoiQW5pbWF0ZWRUb2tlbi1kZWY...\",\n * storyboard: \"eyJ0a2VuIjoiU3Rvcnlib2FyZFRva2VuLTc4...\"\n * }\n * ```\n */\nexport function getPlaybackTokens(\n playbackInfo: VideoPlaybackInfo,\n): VideoPlaybackTokens | undefined {\n if (isSignedPlaybackInfo(playbackInfo)) {\n return {\n stream: playbackInfo.stream.token,\n thumbnail: playbackInfo.thumbnail.token,\n storyboard: playbackInfo.storyboard.token,\n animated: playbackInfo.animated.token,\n }\n }\n\n return undefined\n}\n"],"names":[],"mappings":"AAeA,SAAS,iBAAiB,MAAkE;AAC1F,SAAO,WAAW;AACpB;AAMO,SAAS,qBACd,cACyC;AACzC,SAAO,iBAAiB,aAAa,MAAM;AAC7C;AAmBO,SAAS,kBACd,cACiC;AACjC,MAAI,qBAAqB,YAAY;AACnC,WAAO;AAAA,MACL,QAAQ,aAAa,OAAO;AAAA,MAC5B,WAAW,aAAa,UAAU;AAAA,MAClC,YAAY,aAAa,WAAW;AAAA,MACpC,UAAU,aAAa,SAAS;AAAA,IAAA;AAKtC;"}
|
package/dist/stega.browser.d.cts
CHANGED
|
@@ -2299,6 +2299,13 @@ export declare type ListenParams = {
|
|
|
2299
2299
|
[key: string]: Any
|
|
2300
2300
|
}
|
|
2301
2301
|
|
|
2302
|
+
declare type ListOptions = {
|
|
2303
|
+
includeMembers?: boolean
|
|
2304
|
+
includeFeatures?: boolean
|
|
2305
|
+
organizationId?: string
|
|
2306
|
+
onlyExplicitMembership?: boolean
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2302
2309
|
/**
|
|
2303
2310
|
* @public
|
|
2304
2311
|
*/
|
|
@@ -2862,19 +2869,13 @@ export declare class ObservableProjectsClient {
|
|
|
2862
2869
|
*
|
|
2863
2870
|
* @param options - Options for the list request
|
|
2864
2871
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
2872
|
+
* - `includeFeatures` - Whether to include features in the response (default: true)
|
|
2865
2873
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
2866
|
-
* - `onlyExplicitMembership` -
|
|
2867
|
-
*/
|
|
2868
|
-
list(
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
onlyExplicitMembership?: boolean
|
|
2872
|
-
}): Observable<SanityProject[]>
|
|
2873
|
-
list(options?: {
|
|
2874
|
-
includeMembers?: false
|
|
2875
|
-
organizationId?: string
|
|
2876
|
-
onlyExplicitMembership?: boolean
|
|
2877
|
-
}): Observable<Omit<SanityProject, 'members'>[]>
|
|
2874
|
+
* - `onlyExplicitMembership` - Whether to include only projects with explicit membership (default: false)
|
|
2875
|
+
*/
|
|
2876
|
+
list<T extends ListOptions>(
|
|
2877
|
+
options?: T,
|
|
2878
|
+
): Observable<Omit<SanityProject, OmittedProjectFields<T>>[]>
|
|
2878
2879
|
/**
|
|
2879
2880
|
* Fetch a project by project ID
|
|
2880
2881
|
*
|
|
@@ -4035,6 +4036,18 @@ export declare class ObservableUsersClient {
|
|
|
4035
4036
|
): Observable<T extends 'me' ? CurrentSanityUser : SanityUser>
|
|
4036
4037
|
}
|
|
4037
4038
|
|
|
4039
|
+
declare type OmittedProjectFields<T extends ListOptions | undefined> =
|
|
4040
|
+
| (T extends {
|
|
4041
|
+
includeMembers: false
|
|
4042
|
+
}
|
|
4043
|
+
? 'members'
|
|
4044
|
+
: never)
|
|
4045
|
+
| (T extends {
|
|
4046
|
+
includeFeatures: false
|
|
4047
|
+
}
|
|
4048
|
+
? 'features'
|
|
4049
|
+
: never)
|
|
4050
|
+
|
|
4038
4051
|
/**
|
|
4039
4052
|
* The listener connection has been established
|
|
4040
4053
|
* note: it's usually a better option to use the 'welcome' event
|
|
@@ -4251,19 +4264,11 @@ export declare class ProjectsClient {
|
|
|
4251
4264
|
*
|
|
4252
4265
|
* @param options - Options for the list request
|
|
4253
4266
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
4267
|
+
* - `includeFeatures` - Whether to include features in the response (default: true)
|
|
4254
4268
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
4255
|
-
* - `onlyExplicitMembership` -
|
|
4256
|
-
*/
|
|
4257
|
-
list(options?:
|
|
4258
|
-
includeMembers?: true
|
|
4259
|
-
organizationId?: string
|
|
4260
|
-
onlyExplicitMembership?: boolean
|
|
4261
|
-
}): Promise<SanityProject[]>
|
|
4262
|
-
list(options?: {
|
|
4263
|
-
includeMembers?: false
|
|
4264
|
-
organizationId?: string
|
|
4265
|
-
onlyExplicitMembership?: boolean
|
|
4266
|
-
}): Promise<Omit<SanityProject, 'members'>[]>
|
|
4269
|
+
* - `onlyExplicitMembership` - Whether to include only projects with explicit membership (default: false)
|
|
4270
|
+
*/
|
|
4271
|
+
list<T extends ListOptions>(options?: T): Promise<Omit<SanityProject, OmittedProjectFields<T>>[]>
|
|
4267
4272
|
/**
|
|
4268
4273
|
* Fetch a project by project ID
|
|
4269
4274
|
*
|
|
@@ -5922,6 +5927,7 @@ export declare interface SanityProject {
|
|
|
5922
5927
|
pendingInvites?: number
|
|
5923
5928
|
maxRetentionDays?: number
|
|
5924
5929
|
members: SanityProjectMember[]
|
|
5930
|
+
features: string[]
|
|
5925
5931
|
metadata: {
|
|
5926
5932
|
cliInitializedAt?: string
|
|
5927
5933
|
color?: string
|
|
@@ -6814,6 +6820,9 @@ export declare interface VideoPlaybackInfo<
|
|
|
6814
6820
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
6815
6821
|
? VideoRenditionInfoSigned
|
|
6816
6822
|
: VideoRenditionInfo,
|
|
6823
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
6824
|
+
? VideoSubtitleInfoSigned
|
|
6825
|
+
: VideoSubtitleInfo,
|
|
6817
6826
|
> {
|
|
6818
6827
|
id: string
|
|
6819
6828
|
thumbnail: T
|
|
@@ -6823,6 +6832,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6823
6832
|
duration: number
|
|
6824
6833
|
aspectRatio: number
|
|
6825
6834
|
renditions?: R[]
|
|
6835
|
+
subtitles?: S[]
|
|
6826
6836
|
}
|
|
6827
6837
|
|
|
6828
6838
|
/** @public */
|
|
@@ -6873,6 +6883,29 @@ export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPubl
|
|
|
6873
6883
|
expiresAt: string
|
|
6874
6884
|
}
|
|
6875
6885
|
|
|
6886
|
+
/** @public */
|
|
6887
|
+
export declare type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
6888
|
+
|
|
6889
|
+
/** @public */
|
|
6890
|
+
export declare interface VideoSubtitleInfoPublic {
|
|
6891
|
+
/** Subtitle track identifier */
|
|
6892
|
+
trackId: string
|
|
6893
|
+
/** ISO 639-1 language code */
|
|
6894
|
+
languageCode: string
|
|
6895
|
+
/** URL to the subtitle file */
|
|
6896
|
+
url: string
|
|
6897
|
+
/** Whether this track contains closed captions */
|
|
6898
|
+
closedCaptions: boolean
|
|
6899
|
+
}
|
|
6900
|
+
|
|
6901
|
+
/** @public */
|
|
6902
|
+
export declare interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
6903
|
+
/** Authentication token for signed playback */
|
|
6904
|
+
token: string
|
|
6905
|
+
/** Token expiration time in ISO 8601 format */
|
|
6906
|
+
expiresAt: string
|
|
6907
|
+
}
|
|
6908
|
+
|
|
6876
6909
|
/**
|
|
6877
6910
|
* Emitted when the listener reconnects and successfully resumes from
|
|
6878
6911
|
* its previous position.
|
package/dist/stega.browser.d.ts
CHANGED
|
@@ -2299,6 +2299,13 @@ export declare type ListenParams = {
|
|
|
2299
2299
|
[key: string]: Any
|
|
2300
2300
|
}
|
|
2301
2301
|
|
|
2302
|
+
declare type ListOptions = {
|
|
2303
|
+
includeMembers?: boolean
|
|
2304
|
+
includeFeatures?: boolean
|
|
2305
|
+
organizationId?: string
|
|
2306
|
+
onlyExplicitMembership?: boolean
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2302
2309
|
/**
|
|
2303
2310
|
* @public
|
|
2304
2311
|
*/
|
|
@@ -2862,19 +2869,13 @@ export declare class ObservableProjectsClient {
|
|
|
2862
2869
|
*
|
|
2863
2870
|
* @param options - Options for the list request
|
|
2864
2871
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
2872
|
+
* - `includeFeatures` - Whether to include features in the response (default: true)
|
|
2865
2873
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
2866
|
-
* - `onlyExplicitMembership` -
|
|
2867
|
-
*/
|
|
2868
|
-
list(
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
onlyExplicitMembership?: boolean
|
|
2872
|
-
}): Observable<SanityProject[]>
|
|
2873
|
-
list(options?: {
|
|
2874
|
-
includeMembers?: false
|
|
2875
|
-
organizationId?: string
|
|
2876
|
-
onlyExplicitMembership?: boolean
|
|
2877
|
-
}): Observable<Omit<SanityProject, 'members'>[]>
|
|
2874
|
+
* - `onlyExplicitMembership` - Whether to include only projects with explicit membership (default: false)
|
|
2875
|
+
*/
|
|
2876
|
+
list<T extends ListOptions>(
|
|
2877
|
+
options?: T,
|
|
2878
|
+
): Observable<Omit<SanityProject, OmittedProjectFields<T>>[]>
|
|
2878
2879
|
/**
|
|
2879
2880
|
* Fetch a project by project ID
|
|
2880
2881
|
*
|
|
@@ -4035,6 +4036,18 @@ export declare class ObservableUsersClient {
|
|
|
4035
4036
|
): Observable<T extends 'me' ? CurrentSanityUser : SanityUser>
|
|
4036
4037
|
}
|
|
4037
4038
|
|
|
4039
|
+
declare type OmittedProjectFields<T extends ListOptions | undefined> =
|
|
4040
|
+
| (T extends {
|
|
4041
|
+
includeMembers: false
|
|
4042
|
+
}
|
|
4043
|
+
? 'members'
|
|
4044
|
+
: never)
|
|
4045
|
+
| (T extends {
|
|
4046
|
+
includeFeatures: false
|
|
4047
|
+
}
|
|
4048
|
+
? 'features'
|
|
4049
|
+
: never)
|
|
4050
|
+
|
|
4038
4051
|
/**
|
|
4039
4052
|
* The listener connection has been established
|
|
4040
4053
|
* note: it's usually a better option to use the 'welcome' event
|
|
@@ -4251,19 +4264,11 @@ export declare class ProjectsClient {
|
|
|
4251
4264
|
*
|
|
4252
4265
|
* @param options - Options for the list request
|
|
4253
4266
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
4267
|
+
* - `includeFeatures` - Whether to include features in the response (default: true)
|
|
4254
4268
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
4255
|
-
* - `onlyExplicitMembership` -
|
|
4256
|
-
*/
|
|
4257
|
-
list(options?:
|
|
4258
|
-
includeMembers?: true
|
|
4259
|
-
organizationId?: string
|
|
4260
|
-
onlyExplicitMembership?: boolean
|
|
4261
|
-
}): Promise<SanityProject[]>
|
|
4262
|
-
list(options?: {
|
|
4263
|
-
includeMembers?: false
|
|
4264
|
-
organizationId?: string
|
|
4265
|
-
onlyExplicitMembership?: boolean
|
|
4266
|
-
}): Promise<Omit<SanityProject, 'members'>[]>
|
|
4269
|
+
* - `onlyExplicitMembership` - Whether to include only projects with explicit membership (default: false)
|
|
4270
|
+
*/
|
|
4271
|
+
list<T extends ListOptions>(options?: T): Promise<Omit<SanityProject, OmittedProjectFields<T>>[]>
|
|
4267
4272
|
/**
|
|
4268
4273
|
* Fetch a project by project ID
|
|
4269
4274
|
*
|
|
@@ -5922,6 +5927,7 @@ export declare interface SanityProject {
|
|
|
5922
5927
|
pendingInvites?: number
|
|
5923
5928
|
maxRetentionDays?: number
|
|
5924
5929
|
members: SanityProjectMember[]
|
|
5930
|
+
features: string[]
|
|
5925
5931
|
metadata: {
|
|
5926
5932
|
cliInitializedAt?: string
|
|
5927
5933
|
color?: string
|
|
@@ -6814,6 +6820,9 @@ export declare interface VideoPlaybackInfo<
|
|
|
6814
6820
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
6815
6821
|
? VideoRenditionInfoSigned
|
|
6816
6822
|
: VideoRenditionInfo,
|
|
6823
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
6824
|
+
? VideoSubtitleInfoSigned
|
|
6825
|
+
: VideoSubtitleInfo,
|
|
6817
6826
|
> {
|
|
6818
6827
|
id: string
|
|
6819
6828
|
thumbnail: T
|
|
@@ -6823,6 +6832,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6823
6832
|
duration: number
|
|
6824
6833
|
aspectRatio: number
|
|
6825
6834
|
renditions?: R[]
|
|
6835
|
+
subtitles?: S[]
|
|
6826
6836
|
}
|
|
6827
6837
|
|
|
6828
6838
|
/** @public */
|
|
@@ -6873,6 +6883,29 @@ export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPubl
|
|
|
6873
6883
|
expiresAt: string
|
|
6874
6884
|
}
|
|
6875
6885
|
|
|
6886
|
+
/** @public */
|
|
6887
|
+
export declare type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
6888
|
+
|
|
6889
|
+
/** @public */
|
|
6890
|
+
export declare interface VideoSubtitleInfoPublic {
|
|
6891
|
+
/** Subtitle track identifier */
|
|
6892
|
+
trackId: string
|
|
6893
|
+
/** ISO 639-1 language code */
|
|
6894
|
+
languageCode: string
|
|
6895
|
+
/** URL to the subtitle file */
|
|
6896
|
+
url: string
|
|
6897
|
+
/** Whether this track contains closed captions */
|
|
6898
|
+
closedCaptions: boolean
|
|
6899
|
+
}
|
|
6900
|
+
|
|
6901
|
+
/** @public */
|
|
6902
|
+
export declare interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
6903
|
+
/** Authentication token for signed playback */
|
|
6904
|
+
token: string
|
|
6905
|
+
/** Token expiration time in ISO 8601 format */
|
|
6906
|
+
expiresAt: string
|
|
6907
|
+
}
|
|
6908
|
+
|
|
6876
6909
|
/**
|
|
6877
6910
|
* Emitted when the listener reconnects and successfully resumes from
|
|
6878
6911
|
* its previous position.
|
package/dist/stega.d.cts
CHANGED
|
@@ -2299,6 +2299,13 @@ export declare type ListenParams = {
|
|
|
2299
2299
|
[key: string]: Any
|
|
2300
2300
|
}
|
|
2301
2301
|
|
|
2302
|
+
declare type ListOptions = {
|
|
2303
|
+
includeMembers?: boolean
|
|
2304
|
+
includeFeatures?: boolean
|
|
2305
|
+
organizationId?: string
|
|
2306
|
+
onlyExplicitMembership?: boolean
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2302
2309
|
/**
|
|
2303
2310
|
* @public
|
|
2304
2311
|
*/
|
|
@@ -2862,19 +2869,13 @@ export declare class ObservableProjectsClient {
|
|
|
2862
2869
|
*
|
|
2863
2870
|
* @param options - Options for the list request
|
|
2864
2871
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
2872
|
+
* - `includeFeatures` - Whether to include features in the response (default: true)
|
|
2865
2873
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
2866
|
-
* - `onlyExplicitMembership` -
|
|
2867
|
-
*/
|
|
2868
|
-
list(
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
onlyExplicitMembership?: boolean
|
|
2872
|
-
}): Observable<SanityProject[]>
|
|
2873
|
-
list(options?: {
|
|
2874
|
-
includeMembers?: false
|
|
2875
|
-
organizationId?: string
|
|
2876
|
-
onlyExplicitMembership?: boolean
|
|
2877
|
-
}): Observable<Omit<SanityProject, 'members'>[]>
|
|
2874
|
+
* - `onlyExplicitMembership` - Whether to include only projects with explicit membership (default: false)
|
|
2875
|
+
*/
|
|
2876
|
+
list<T extends ListOptions>(
|
|
2877
|
+
options?: T,
|
|
2878
|
+
): Observable<Omit<SanityProject, OmittedProjectFields<T>>[]>
|
|
2878
2879
|
/**
|
|
2879
2880
|
* Fetch a project by project ID
|
|
2880
2881
|
*
|
|
@@ -4035,6 +4036,18 @@ export declare class ObservableUsersClient {
|
|
|
4035
4036
|
): Observable<T extends 'me' ? CurrentSanityUser : SanityUser>
|
|
4036
4037
|
}
|
|
4037
4038
|
|
|
4039
|
+
declare type OmittedProjectFields<T extends ListOptions | undefined> =
|
|
4040
|
+
| (T extends {
|
|
4041
|
+
includeMembers: false
|
|
4042
|
+
}
|
|
4043
|
+
? 'members'
|
|
4044
|
+
: never)
|
|
4045
|
+
| (T extends {
|
|
4046
|
+
includeFeatures: false
|
|
4047
|
+
}
|
|
4048
|
+
? 'features'
|
|
4049
|
+
: never)
|
|
4050
|
+
|
|
4038
4051
|
/**
|
|
4039
4052
|
* The listener connection has been established
|
|
4040
4053
|
* note: it's usually a better option to use the 'welcome' event
|
|
@@ -4251,19 +4264,11 @@ export declare class ProjectsClient {
|
|
|
4251
4264
|
*
|
|
4252
4265
|
* @param options - Options for the list request
|
|
4253
4266
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
4267
|
+
* - `includeFeatures` - Whether to include features in the response (default: true)
|
|
4254
4268
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
4255
|
-
* - `onlyExplicitMembership` -
|
|
4256
|
-
*/
|
|
4257
|
-
list(options?:
|
|
4258
|
-
includeMembers?: true
|
|
4259
|
-
organizationId?: string
|
|
4260
|
-
onlyExplicitMembership?: boolean
|
|
4261
|
-
}): Promise<SanityProject[]>
|
|
4262
|
-
list(options?: {
|
|
4263
|
-
includeMembers?: false
|
|
4264
|
-
organizationId?: string
|
|
4265
|
-
onlyExplicitMembership?: boolean
|
|
4266
|
-
}): Promise<Omit<SanityProject, 'members'>[]>
|
|
4269
|
+
* - `onlyExplicitMembership` - Whether to include only projects with explicit membership (default: false)
|
|
4270
|
+
*/
|
|
4271
|
+
list<T extends ListOptions>(options?: T): Promise<Omit<SanityProject, OmittedProjectFields<T>>[]>
|
|
4267
4272
|
/**
|
|
4268
4273
|
* Fetch a project by project ID
|
|
4269
4274
|
*
|
|
@@ -5922,6 +5927,7 @@ export declare interface SanityProject {
|
|
|
5922
5927
|
pendingInvites?: number
|
|
5923
5928
|
maxRetentionDays?: number
|
|
5924
5929
|
members: SanityProjectMember[]
|
|
5930
|
+
features: string[]
|
|
5925
5931
|
metadata: {
|
|
5926
5932
|
cliInitializedAt?: string
|
|
5927
5933
|
color?: string
|
|
@@ -6814,6 +6820,9 @@ export declare interface VideoPlaybackInfo<
|
|
|
6814
6820
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
6815
6821
|
? VideoRenditionInfoSigned
|
|
6816
6822
|
: VideoRenditionInfo,
|
|
6823
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
6824
|
+
? VideoSubtitleInfoSigned
|
|
6825
|
+
: VideoSubtitleInfo,
|
|
6817
6826
|
> {
|
|
6818
6827
|
id: string
|
|
6819
6828
|
thumbnail: T
|
|
@@ -6823,6 +6832,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6823
6832
|
duration: number
|
|
6824
6833
|
aspectRatio: number
|
|
6825
6834
|
renditions?: R[]
|
|
6835
|
+
subtitles?: S[]
|
|
6826
6836
|
}
|
|
6827
6837
|
|
|
6828
6838
|
/** @public */
|
|
@@ -6873,6 +6883,29 @@ export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPubl
|
|
|
6873
6883
|
expiresAt: string
|
|
6874
6884
|
}
|
|
6875
6885
|
|
|
6886
|
+
/** @public */
|
|
6887
|
+
export declare type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
6888
|
+
|
|
6889
|
+
/** @public */
|
|
6890
|
+
export declare interface VideoSubtitleInfoPublic {
|
|
6891
|
+
/** Subtitle track identifier */
|
|
6892
|
+
trackId: string
|
|
6893
|
+
/** ISO 639-1 language code */
|
|
6894
|
+
languageCode: string
|
|
6895
|
+
/** URL to the subtitle file */
|
|
6896
|
+
url: string
|
|
6897
|
+
/** Whether this track contains closed captions */
|
|
6898
|
+
closedCaptions: boolean
|
|
6899
|
+
}
|
|
6900
|
+
|
|
6901
|
+
/** @public */
|
|
6902
|
+
export declare interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
6903
|
+
/** Authentication token for signed playback */
|
|
6904
|
+
token: string
|
|
6905
|
+
/** Token expiration time in ISO 8601 format */
|
|
6906
|
+
expiresAt: string
|
|
6907
|
+
}
|
|
6908
|
+
|
|
6876
6909
|
/**
|
|
6877
6910
|
* Emitted when the listener reconnects and successfully resumes from
|
|
6878
6911
|
* its previous position.
|
package/dist/stega.d.ts
CHANGED
|
@@ -2299,6 +2299,13 @@ export declare type ListenParams = {
|
|
|
2299
2299
|
[key: string]: Any
|
|
2300
2300
|
}
|
|
2301
2301
|
|
|
2302
|
+
declare type ListOptions = {
|
|
2303
|
+
includeMembers?: boolean
|
|
2304
|
+
includeFeatures?: boolean
|
|
2305
|
+
organizationId?: string
|
|
2306
|
+
onlyExplicitMembership?: boolean
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2302
2309
|
/**
|
|
2303
2310
|
* @public
|
|
2304
2311
|
*/
|
|
@@ -2862,19 +2869,13 @@ export declare class ObservableProjectsClient {
|
|
|
2862
2869
|
*
|
|
2863
2870
|
* @param options - Options for the list request
|
|
2864
2871
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
2872
|
+
* - `includeFeatures` - Whether to include features in the response (default: true)
|
|
2865
2873
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
2866
|
-
* - `onlyExplicitMembership` -
|
|
2867
|
-
*/
|
|
2868
|
-
list(
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
onlyExplicitMembership?: boolean
|
|
2872
|
-
}): Observable<SanityProject[]>
|
|
2873
|
-
list(options?: {
|
|
2874
|
-
includeMembers?: false
|
|
2875
|
-
organizationId?: string
|
|
2876
|
-
onlyExplicitMembership?: boolean
|
|
2877
|
-
}): Observable<Omit<SanityProject, 'members'>[]>
|
|
2874
|
+
* - `onlyExplicitMembership` - Whether to include only projects with explicit membership (default: false)
|
|
2875
|
+
*/
|
|
2876
|
+
list<T extends ListOptions>(
|
|
2877
|
+
options?: T,
|
|
2878
|
+
): Observable<Omit<SanityProject, OmittedProjectFields<T>>[]>
|
|
2878
2879
|
/**
|
|
2879
2880
|
* Fetch a project by project ID
|
|
2880
2881
|
*
|
|
@@ -4035,6 +4036,18 @@ export declare class ObservableUsersClient {
|
|
|
4035
4036
|
): Observable<T extends 'me' ? CurrentSanityUser : SanityUser>
|
|
4036
4037
|
}
|
|
4037
4038
|
|
|
4039
|
+
declare type OmittedProjectFields<T extends ListOptions | undefined> =
|
|
4040
|
+
| (T extends {
|
|
4041
|
+
includeMembers: false
|
|
4042
|
+
}
|
|
4043
|
+
? 'members'
|
|
4044
|
+
: never)
|
|
4045
|
+
| (T extends {
|
|
4046
|
+
includeFeatures: false
|
|
4047
|
+
}
|
|
4048
|
+
? 'features'
|
|
4049
|
+
: never)
|
|
4050
|
+
|
|
4038
4051
|
/**
|
|
4039
4052
|
* The listener connection has been established
|
|
4040
4053
|
* note: it's usually a better option to use the 'welcome' event
|
|
@@ -4251,19 +4264,11 @@ export declare class ProjectsClient {
|
|
|
4251
4264
|
*
|
|
4252
4265
|
* @param options - Options for the list request
|
|
4253
4266
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
4267
|
+
* - `includeFeatures` - Whether to include features in the response (default: true)
|
|
4254
4268
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
4255
|
-
* - `onlyExplicitMembership` -
|
|
4256
|
-
*/
|
|
4257
|
-
list(options?:
|
|
4258
|
-
includeMembers?: true
|
|
4259
|
-
organizationId?: string
|
|
4260
|
-
onlyExplicitMembership?: boolean
|
|
4261
|
-
}): Promise<SanityProject[]>
|
|
4262
|
-
list(options?: {
|
|
4263
|
-
includeMembers?: false
|
|
4264
|
-
organizationId?: string
|
|
4265
|
-
onlyExplicitMembership?: boolean
|
|
4266
|
-
}): Promise<Omit<SanityProject, 'members'>[]>
|
|
4269
|
+
* - `onlyExplicitMembership` - Whether to include only projects with explicit membership (default: false)
|
|
4270
|
+
*/
|
|
4271
|
+
list<T extends ListOptions>(options?: T): Promise<Omit<SanityProject, OmittedProjectFields<T>>[]>
|
|
4267
4272
|
/**
|
|
4268
4273
|
* Fetch a project by project ID
|
|
4269
4274
|
*
|
|
@@ -5922,6 +5927,7 @@ export declare interface SanityProject {
|
|
|
5922
5927
|
pendingInvites?: number
|
|
5923
5928
|
maxRetentionDays?: number
|
|
5924
5929
|
members: SanityProjectMember[]
|
|
5930
|
+
features: string[]
|
|
5925
5931
|
metadata: {
|
|
5926
5932
|
cliInitializedAt?: string
|
|
5927
5933
|
color?: string
|
|
@@ -6814,6 +6820,9 @@ export declare interface VideoPlaybackInfo<
|
|
|
6814
6820
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
6815
6821
|
? VideoRenditionInfoSigned
|
|
6816
6822
|
: VideoRenditionInfo,
|
|
6823
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
6824
|
+
? VideoSubtitleInfoSigned
|
|
6825
|
+
: VideoSubtitleInfo,
|
|
6817
6826
|
> {
|
|
6818
6827
|
id: string
|
|
6819
6828
|
thumbnail: T
|
|
@@ -6823,6 +6832,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6823
6832
|
duration: number
|
|
6824
6833
|
aspectRatio: number
|
|
6825
6834
|
renditions?: R[]
|
|
6835
|
+
subtitles?: S[]
|
|
6826
6836
|
}
|
|
6827
6837
|
|
|
6828
6838
|
/** @public */
|
|
@@ -6873,6 +6883,29 @@ export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPubl
|
|
|
6873
6883
|
expiresAt: string
|
|
6874
6884
|
}
|
|
6875
6885
|
|
|
6886
|
+
/** @public */
|
|
6887
|
+
export declare type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
6888
|
+
|
|
6889
|
+
/** @public */
|
|
6890
|
+
export declare interface VideoSubtitleInfoPublic {
|
|
6891
|
+
/** Subtitle track identifier */
|
|
6892
|
+
trackId: string
|
|
6893
|
+
/** ISO 639-1 language code */
|
|
6894
|
+
languageCode: string
|
|
6895
|
+
/** URL to the subtitle file */
|
|
6896
|
+
url: string
|
|
6897
|
+
/** Whether this track contains closed captions */
|
|
6898
|
+
closedCaptions: boolean
|
|
6899
|
+
}
|
|
6900
|
+
|
|
6901
|
+
/** @public */
|
|
6902
|
+
export declare interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
6903
|
+
/** Authentication token for signed playback */
|
|
6904
|
+
token: string
|
|
6905
|
+
/** Token expiration time in ISO 8601 format */
|
|
6906
|
+
expiresAt: string
|
|
6907
|
+
}
|
|
6908
|
+
|
|
6876
6909
|
/**
|
|
6877
6910
|
* Emitted when the listener reconnects and successfully resumes from
|
|
6878
6911
|
* its previous position.
|
package/package.json
CHANGED
package/src/media-library.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
} from './types'
|
|
8
8
|
|
|
9
9
|
export type {VideoRenditionInfo, VideoRenditionInfoPublic, VideoRenditionInfoSigned} from './types'
|
|
10
|
+
export type {VideoSubtitleInfo, VideoSubtitleInfoPublic, VideoSubtitleInfoSigned} from './types'
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Check if a playback info item (stream/thumbnail/etc) has a signed token
|