@sanity/client 7.16.0 → 7.18.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/README.md +46 -2
- package/dist/_chunks-cjs/config.cjs.map +1 -1
- package/dist/_chunks-cjs/isRecord.cjs.map +1 -1
- package/dist/_chunks-cjs/resolveEditInfo.cjs +1 -1
- package/dist/_chunks-cjs/resolveEditInfo.cjs.map +1 -1
- package/dist/_chunks-cjs/stegaClean.cjs +34 -12
- package/dist/_chunks-cjs/stegaClean.cjs.map +1 -1
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs +3 -57
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs.map +1 -1
- package/dist/_chunks-es/config.js.map +1 -1
- package/dist/_chunks-es/isRecord.js.map +1 -1
- package/dist/_chunks-es/resolveEditInfo.js +1 -1
- package/dist/_chunks-es/resolveEditInfo.js.map +1 -1
- package/dist/_chunks-es/stegaClean.js +35 -13
- package/dist/_chunks-es/stegaClean.js.map +1 -1
- package/dist/_chunks-es/stegaEncodeSourceMap.js +4 -58
- package/dist/_chunks-es/stegaEncodeSourceMap.js.map +1 -1
- package/dist/csm.cjs.map +1 -1
- package/dist/csm.js.map +1 -1
- package/dist/index.browser.cjs +2 -2
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +37 -2
- package/dist/index.browser.d.ts +37 -2
- package/dist/index.browser.js +3 -3
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -2
- package/dist/index.d.ts +37 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/media-library.cjs.map +1 -1
- package/dist/media-library.d.cts +26 -1
- package/dist/media-library.d.ts +26 -1
- package/dist/media-library.js.map +1 -1
- package/dist/stega.browser.cjs.map +1 -1
- package/dist/stega.browser.d.cts +37 -2
- package/dist/stega.browser.d.ts +37 -2
- package/dist/stega.browser.js +1 -1
- package/dist/stega.browser.js.map +1 -1
- package/dist/stega.cjs.map +1 -1
- package/dist/stega.d.cts +37 -2
- package/dist/stega.d.ts +37 -2
- package/dist/stega.js +1 -1
- package/dist/stega.js.map +1 -1
- package/package.json +2 -2
- package/src/media-library.ts +2 -0
- package/src/projects/ProjectsClient.ts +22 -2
- package/src/stega/stegaEncodeSourceMap.ts +4 -3
- package/src/types.ts +26 -1
- package/umd/sanityClient.js +55 -88
- package/umd/sanityClient.min.js +2 -2
- package/src/stega/stega.ts +0 -163
|
@@ -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\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'\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":";;AAcA,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
|
@@ -28,7 +28,12 @@ export declare function isSignedPlaybackInfo(
|
|
|
28
28
|
): playbackInfo is VideoPlaybackInfoSigned
|
|
29
29
|
|
|
30
30
|
/** @public */
|
|
31
|
-
declare interface VideoPlaybackInfo<
|
|
31
|
+
declare interface VideoPlaybackInfo<
|
|
32
|
+
T extends VideoPlaybackInfoItem = VideoPlaybackInfoItem,
|
|
33
|
+
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
34
|
+
? VideoRenditionInfoSigned
|
|
35
|
+
: VideoRenditionInfo,
|
|
36
|
+
> {
|
|
32
37
|
id: string
|
|
33
38
|
thumbnail: T
|
|
34
39
|
animated: T
|
|
@@ -36,6 +41,7 @@ declare interface VideoPlaybackInfo<T extends VideoPlaybackInfoItem = VideoPlayb
|
|
|
36
41
|
stream: T
|
|
37
42
|
duration: number
|
|
38
43
|
aspectRatio: number
|
|
44
|
+
renditions?: R[]
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
/** @public */
|
|
@@ -62,4 +68,23 @@ declare interface VideoPlaybackTokens {
|
|
|
62
68
|
animated?: string
|
|
63
69
|
}
|
|
64
70
|
|
|
71
|
+
/** @public */
|
|
72
|
+
export declare type VideoRenditionInfo = VideoRenditionInfoPublic | VideoRenditionInfoSigned
|
|
73
|
+
|
|
74
|
+
/** @public */
|
|
75
|
+
export declare interface VideoRenditionInfoPublic {
|
|
76
|
+
/** URL to the MP4 rendition (redirects to CDN) */
|
|
77
|
+
url: string
|
|
78
|
+
/** Resolution identifier, e.g. "1080p", "480p", "270p" */
|
|
79
|
+
resolution: '1080p' | '480p' | '270p' | (string & {})
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** @public */
|
|
83
|
+
export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPublic {
|
|
84
|
+
/** Authentication token for signed playback */
|
|
85
|
+
token: string
|
|
86
|
+
/** Token expiration time in ISO 8601 format */
|
|
87
|
+
expiresAt: string
|
|
88
|
+
}
|
|
89
|
+
|
|
65
90
|
export {}
|
package/dist/media-library.d.ts
CHANGED
|
@@ -28,7 +28,12 @@ export declare function isSignedPlaybackInfo(
|
|
|
28
28
|
): playbackInfo is VideoPlaybackInfoSigned
|
|
29
29
|
|
|
30
30
|
/** @public */
|
|
31
|
-
declare interface VideoPlaybackInfo<
|
|
31
|
+
declare interface VideoPlaybackInfo<
|
|
32
|
+
T extends VideoPlaybackInfoItem = VideoPlaybackInfoItem,
|
|
33
|
+
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
34
|
+
? VideoRenditionInfoSigned
|
|
35
|
+
: VideoRenditionInfo,
|
|
36
|
+
> {
|
|
32
37
|
id: string
|
|
33
38
|
thumbnail: T
|
|
34
39
|
animated: T
|
|
@@ -36,6 +41,7 @@ declare interface VideoPlaybackInfo<T extends VideoPlaybackInfoItem = VideoPlayb
|
|
|
36
41
|
stream: T
|
|
37
42
|
duration: number
|
|
38
43
|
aspectRatio: number
|
|
44
|
+
renditions?: R[]
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
/** @public */
|
|
@@ -62,4 +68,23 @@ declare interface VideoPlaybackTokens {
|
|
|
62
68
|
animated?: string
|
|
63
69
|
}
|
|
64
70
|
|
|
71
|
+
/** @public */
|
|
72
|
+
export declare type VideoRenditionInfo = VideoRenditionInfoPublic | VideoRenditionInfoSigned
|
|
73
|
+
|
|
74
|
+
/** @public */
|
|
75
|
+
export declare interface VideoRenditionInfoPublic {
|
|
76
|
+
/** URL to the MP4 rendition (redirects to CDN) */
|
|
77
|
+
url: string
|
|
78
|
+
/** Resolution identifier, e.g. "1080p", "480p", "270p" */
|
|
79
|
+
resolution: '1080p' | '480p' | '270p' | (string & {})
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** @public */
|
|
83
|
+
export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPublic {
|
|
84
|
+
/** Authentication token for signed playback */
|
|
85
|
+
token: string
|
|
86
|
+
/** Token expiration time in ISO 8601 format */
|
|
87
|
+
expiresAt: string
|
|
88
|
+
}
|
|
89
|
+
|
|
65
90
|
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\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'\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":"AAcA,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;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stega.browser.cjs","sources":["../src/stega/index.ts"],"sourcesContent":["export * from '@sanity/client'\nimport {\n createClient as originalCreateClient,\n ObservableSanityClient,\n requester as originalRequester,\n SanityClient,\n} from '@sanity/client'\n\nexport {encodeIntoResult} from './encodeIntoResult'\nexport {stegaClean, vercelStegaCleanAll} from './stegaClean'\nexport {stegaEncodeSourceMap} from './stegaEncodeSourceMap'\nexport * from './types'\n\n/**\n * @deprecated -- Use `import {SanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class SanityStegaClient extends SanityClient {}\n\n/**\n * @deprecated -- Use `import {ObservableSanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class ObservableSanityStegaClient extends ObservableSanityClient {}\n\n/**\n * @deprecated -- Use `import {requester} from '@sanity/client'` instead\n * @public\n */\nexport const requester = originalRequester\n\n/**\n * @deprecated -- Use `import {createClient} from '@sanity/client'` instead\n * @public\n */\nexport const createClient = originalCreateClient\n"],"names":["SanityClient","ObservableSanityClient","originalRequester","originalCreateClient"],"mappings":";;;AAiBO,MAAM,0BAA0BA,OAAAA,aAAa;AAAC;AAM9C,MAAM,oCAAoCC,OAAAA,uBAAuB;AAAC;
|
|
1
|
+
{"version":3,"file":"stega.browser.cjs","sources":["../src/stega/index.ts"],"sourcesContent":["export * from '@sanity/client'\nimport {\n createClient as originalCreateClient,\n ObservableSanityClient,\n requester as originalRequester,\n SanityClient,\n} from '@sanity/client'\n\nexport {encodeIntoResult} from './encodeIntoResult'\nexport {stegaClean, vercelStegaCleanAll} from './stegaClean'\nexport {stegaEncodeSourceMap} from './stegaEncodeSourceMap'\nexport * from './types'\n\n/**\n * @deprecated -- Use `import {SanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class SanityStegaClient extends SanityClient {}\n\n/**\n * @deprecated -- Use `import {ObservableSanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class ObservableSanityStegaClient extends ObservableSanityClient {}\n\n/**\n * @deprecated -- Use `import {requester} from '@sanity/client'` instead\n * @public\n */\nexport const requester = originalRequester\n\n/**\n * @deprecated -- Use `import {createClient} from '@sanity/client'` instead\n * @public\n */\nexport const createClient = originalCreateClient\n"],"names":["SanityClient","ObservableSanityClient","originalRequester","originalCreateClient"],"mappings":";;;AAiBO,MAAM,0BAA0BA,OAAAA,aAAa;AAAC;AAM9C,MAAM,oCAAoCC,OAAAA,uBAAuB;AAAC;AAMlE,MAAM,YAAYC,OAAAA,WAMZ,eAAeC,OAAAA;;;;;;;;;;;;;;;;;"}
|
package/dist/stega.browser.d.cts
CHANGED
|
@@ -2863,11 +2863,17 @@ export declare class ObservableProjectsClient {
|
|
|
2863
2863
|
* @param options - Options for the list request
|
|
2864
2864
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
2865
2865
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
2866
|
+
* - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
|
|
2866
2867
|
*/
|
|
2867
|
-
list(options?: {
|
|
2868
|
+
list(options?: {
|
|
2869
|
+
includeMembers?: true
|
|
2870
|
+
organizationId?: string
|
|
2871
|
+
onlyExplicitMembership?: boolean
|
|
2872
|
+
}): Observable<SanityProject[]>
|
|
2868
2873
|
list(options?: {
|
|
2869
2874
|
includeMembers?: false
|
|
2870
2875
|
organizationId?: string
|
|
2876
|
+
onlyExplicitMembership?: boolean
|
|
2871
2877
|
}): Observable<Omit<SanityProject, 'members'>[]>
|
|
2872
2878
|
/**
|
|
2873
2879
|
* Fetch a project by project ID
|
|
@@ -4246,11 +4252,17 @@ export declare class ProjectsClient {
|
|
|
4246
4252
|
* @param options - Options for the list request
|
|
4247
4253
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
4248
4254
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
4255
|
+
* - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
|
|
4249
4256
|
*/
|
|
4250
|
-
list(options?: {
|
|
4257
|
+
list(options?: {
|
|
4258
|
+
includeMembers?: true
|
|
4259
|
+
organizationId?: string
|
|
4260
|
+
onlyExplicitMembership?: boolean
|
|
4261
|
+
}): Promise<SanityProject[]>
|
|
4251
4262
|
list(options?: {
|
|
4252
4263
|
includeMembers?: false
|
|
4253
4264
|
organizationId?: string
|
|
4265
|
+
onlyExplicitMembership?: boolean
|
|
4254
4266
|
}): Promise<Omit<SanityProject, 'members'>[]>
|
|
4255
4267
|
/**
|
|
4256
4268
|
* Fetch a project by project ID
|
|
@@ -6799,6 +6811,9 @@ export declare type VersionAction =
|
|
|
6799
6811
|
/** @public */
|
|
6800
6812
|
export declare interface VideoPlaybackInfo<
|
|
6801
6813
|
T extends VideoPlaybackInfoItem = VideoPlaybackInfoItem,
|
|
6814
|
+
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
6815
|
+
? VideoRenditionInfoSigned
|
|
6816
|
+
: VideoRenditionInfo,
|
|
6802
6817
|
> {
|
|
6803
6818
|
id: string
|
|
6804
6819
|
thumbnail: T
|
|
@@ -6807,6 +6822,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6807
6822
|
stream: T
|
|
6808
6823
|
duration: number
|
|
6809
6824
|
aspectRatio: number
|
|
6825
|
+
renditions?: R[]
|
|
6810
6826
|
}
|
|
6811
6827
|
|
|
6812
6828
|
/** @public */
|
|
@@ -6838,6 +6854,25 @@ export declare interface VideoPlaybackTokens {
|
|
|
6838
6854
|
animated?: string
|
|
6839
6855
|
}
|
|
6840
6856
|
|
|
6857
|
+
/** @public */
|
|
6858
|
+
export declare type VideoRenditionInfo = VideoRenditionInfoPublic | VideoRenditionInfoSigned
|
|
6859
|
+
|
|
6860
|
+
/** @public */
|
|
6861
|
+
export declare interface VideoRenditionInfoPublic {
|
|
6862
|
+
/** URL to the MP4 rendition (redirects to CDN) */
|
|
6863
|
+
url: string
|
|
6864
|
+
/** Resolution identifier, e.g. "1080p", "480p", "270p" */
|
|
6865
|
+
resolution: '1080p' | '480p' | '270p' | (string & {})
|
|
6866
|
+
}
|
|
6867
|
+
|
|
6868
|
+
/** @public */
|
|
6869
|
+
export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPublic {
|
|
6870
|
+
/** Authentication token for signed playback */
|
|
6871
|
+
token: string
|
|
6872
|
+
/** Token expiration time in ISO 8601 format */
|
|
6873
|
+
expiresAt: string
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6841
6876
|
/**
|
|
6842
6877
|
* Emitted when the listener reconnects and successfully resumes from
|
|
6843
6878
|
* its previous position.
|
package/dist/stega.browser.d.ts
CHANGED
|
@@ -2863,11 +2863,17 @@ export declare class ObservableProjectsClient {
|
|
|
2863
2863
|
* @param options - Options for the list request
|
|
2864
2864
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
2865
2865
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
2866
|
+
* - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
|
|
2866
2867
|
*/
|
|
2867
|
-
list(options?: {
|
|
2868
|
+
list(options?: {
|
|
2869
|
+
includeMembers?: true
|
|
2870
|
+
organizationId?: string
|
|
2871
|
+
onlyExplicitMembership?: boolean
|
|
2872
|
+
}): Observable<SanityProject[]>
|
|
2868
2873
|
list(options?: {
|
|
2869
2874
|
includeMembers?: false
|
|
2870
2875
|
organizationId?: string
|
|
2876
|
+
onlyExplicitMembership?: boolean
|
|
2871
2877
|
}): Observable<Omit<SanityProject, 'members'>[]>
|
|
2872
2878
|
/**
|
|
2873
2879
|
* Fetch a project by project ID
|
|
@@ -4246,11 +4252,17 @@ export declare class ProjectsClient {
|
|
|
4246
4252
|
* @param options - Options for the list request
|
|
4247
4253
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
4248
4254
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
4255
|
+
* - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
|
|
4249
4256
|
*/
|
|
4250
|
-
list(options?: {
|
|
4257
|
+
list(options?: {
|
|
4258
|
+
includeMembers?: true
|
|
4259
|
+
organizationId?: string
|
|
4260
|
+
onlyExplicitMembership?: boolean
|
|
4261
|
+
}): Promise<SanityProject[]>
|
|
4251
4262
|
list(options?: {
|
|
4252
4263
|
includeMembers?: false
|
|
4253
4264
|
organizationId?: string
|
|
4265
|
+
onlyExplicitMembership?: boolean
|
|
4254
4266
|
}): Promise<Omit<SanityProject, 'members'>[]>
|
|
4255
4267
|
/**
|
|
4256
4268
|
* Fetch a project by project ID
|
|
@@ -6799,6 +6811,9 @@ export declare type VersionAction =
|
|
|
6799
6811
|
/** @public */
|
|
6800
6812
|
export declare interface VideoPlaybackInfo<
|
|
6801
6813
|
T extends VideoPlaybackInfoItem = VideoPlaybackInfoItem,
|
|
6814
|
+
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
6815
|
+
? VideoRenditionInfoSigned
|
|
6816
|
+
: VideoRenditionInfo,
|
|
6802
6817
|
> {
|
|
6803
6818
|
id: string
|
|
6804
6819
|
thumbnail: T
|
|
@@ -6807,6 +6822,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6807
6822
|
stream: T
|
|
6808
6823
|
duration: number
|
|
6809
6824
|
aspectRatio: number
|
|
6825
|
+
renditions?: R[]
|
|
6810
6826
|
}
|
|
6811
6827
|
|
|
6812
6828
|
/** @public */
|
|
@@ -6838,6 +6854,25 @@ export declare interface VideoPlaybackTokens {
|
|
|
6838
6854
|
animated?: string
|
|
6839
6855
|
}
|
|
6840
6856
|
|
|
6857
|
+
/** @public */
|
|
6858
|
+
export declare type VideoRenditionInfo = VideoRenditionInfoPublic | VideoRenditionInfoSigned
|
|
6859
|
+
|
|
6860
|
+
/** @public */
|
|
6861
|
+
export declare interface VideoRenditionInfoPublic {
|
|
6862
|
+
/** URL to the MP4 rendition (redirects to CDN) */
|
|
6863
|
+
url: string
|
|
6864
|
+
/** Resolution identifier, e.g. "1080p", "480p", "270p" */
|
|
6865
|
+
resolution: '1080p' | '480p' | '270p' | (string & {})
|
|
6866
|
+
}
|
|
6867
|
+
|
|
6868
|
+
/** @public */
|
|
6869
|
+
export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPublic {
|
|
6870
|
+
/** Authentication token for signed playback */
|
|
6871
|
+
token: string
|
|
6872
|
+
/** Token expiration time in ISO 8601 format */
|
|
6873
|
+
expiresAt: string
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6841
6876
|
/**
|
|
6842
6877
|
* Emitted when the listener reconnects and successfully resumes from
|
|
6843
6878
|
* its previous position.
|
package/dist/stega.browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createClient as createClient$1, requester as requester$1, ObservableSanityClient, SanityClient } from "@sanity/client";
|
|
2
2
|
export * from "@sanity/client";
|
|
3
3
|
import { encodeIntoResult, stegaEncodeSourceMap } from "./_chunks-es/stegaEncodeSourceMap.js";
|
|
4
4
|
import { stegaClean, vercelStegaCleanAll } from "./_chunks-es/stegaClean.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stega.browser.js","sources":["../src/stega/index.ts"],"sourcesContent":["export * from '@sanity/client'\nimport {\n createClient as originalCreateClient,\n ObservableSanityClient,\n requester as originalRequester,\n SanityClient,\n} from '@sanity/client'\n\nexport {encodeIntoResult} from './encodeIntoResult'\nexport {stegaClean, vercelStegaCleanAll} from './stegaClean'\nexport {stegaEncodeSourceMap} from './stegaEncodeSourceMap'\nexport * from './types'\n\n/**\n * @deprecated -- Use `import {SanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class SanityStegaClient extends SanityClient {}\n\n/**\n * @deprecated -- Use `import {ObservableSanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class ObservableSanityStegaClient extends ObservableSanityClient {}\n\n/**\n * @deprecated -- Use `import {requester} from '@sanity/client'` instead\n * @public\n */\nexport const requester = originalRequester\n\n/**\n * @deprecated -- Use `import {createClient} from '@sanity/client'` instead\n * @public\n */\nexport const createClient = originalCreateClient\n"],"names":["originalRequester","originalCreateClient"],"mappings":";;;;AAiBO,MAAM,0BAA0B,aAAa;AAAC;AAM9C,MAAM,oCAAoC,uBAAuB;AAAC;
|
|
1
|
+
{"version":3,"file":"stega.browser.js","sources":["../src/stega/index.ts"],"sourcesContent":["export * from '@sanity/client'\nimport {\n createClient as originalCreateClient,\n ObservableSanityClient,\n requester as originalRequester,\n SanityClient,\n} from '@sanity/client'\n\nexport {encodeIntoResult} from './encodeIntoResult'\nexport {stegaClean, vercelStegaCleanAll} from './stegaClean'\nexport {stegaEncodeSourceMap} from './stegaEncodeSourceMap'\nexport * from './types'\n\n/**\n * @deprecated -- Use `import {SanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class SanityStegaClient extends SanityClient {}\n\n/**\n * @deprecated -- Use `import {ObservableSanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class ObservableSanityStegaClient extends ObservableSanityClient {}\n\n/**\n * @deprecated -- Use `import {requester} from '@sanity/client'` instead\n * @public\n */\nexport const requester = originalRequester\n\n/**\n * @deprecated -- Use `import {createClient} from '@sanity/client'` instead\n * @public\n */\nexport const createClient = originalCreateClient\n"],"names":["originalRequester","originalCreateClient"],"mappings":";;;;AAiBO,MAAM,0BAA0B,aAAa;AAAC;AAM9C,MAAM,oCAAoC,uBAAuB;AAAC;AAMlE,MAAM,YAAYA,aAMZ,eAAeC;"}
|
package/dist/stega.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stega.cjs","sources":["../src/stega/index.ts"],"sourcesContent":["export * from '@sanity/client'\nimport {\n createClient as originalCreateClient,\n ObservableSanityClient,\n requester as originalRequester,\n SanityClient,\n} from '@sanity/client'\n\nexport {encodeIntoResult} from './encodeIntoResult'\nexport {stegaClean, vercelStegaCleanAll} from './stegaClean'\nexport {stegaEncodeSourceMap} from './stegaEncodeSourceMap'\nexport * from './types'\n\n/**\n * @deprecated -- Use `import {SanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class SanityStegaClient extends SanityClient {}\n\n/**\n * @deprecated -- Use `import {ObservableSanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class ObservableSanityStegaClient extends ObservableSanityClient {}\n\n/**\n * @deprecated -- Use `import {requester} from '@sanity/client'` instead\n * @public\n */\nexport const requester = originalRequester\n\n/**\n * @deprecated -- Use `import {createClient} from '@sanity/client'` instead\n * @public\n */\nexport const createClient = originalCreateClient\n"],"names":["SanityClient","ObservableSanityClient","originalRequester","originalCreateClient"],"mappings":";;;AAiBO,MAAM,0BAA0BA,OAAAA,aAAa;AAAC;AAM9C,MAAM,oCAAoCC,OAAAA,uBAAuB;AAAC;
|
|
1
|
+
{"version":3,"file":"stega.cjs","sources":["../src/stega/index.ts"],"sourcesContent":["export * from '@sanity/client'\nimport {\n createClient as originalCreateClient,\n ObservableSanityClient,\n requester as originalRequester,\n SanityClient,\n} from '@sanity/client'\n\nexport {encodeIntoResult} from './encodeIntoResult'\nexport {stegaClean, vercelStegaCleanAll} from './stegaClean'\nexport {stegaEncodeSourceMap} from './stegaEncodeSourceMap'\nexport * from './types'\n\n/**\n * @deprecated -- Use `import {SanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class SanityStegaClient extends SanityClient {}\n\n/**\n * @deprecated -- Use `import {ObservableSanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class ObservableSanityStegaClient extends ObservableSanityClient {}\n\n/**\n * @deprecated -- Use `import {requester} from '@sanity/client'` instead\n * @public\n */\nexport const requester = originalRequester\n\n/**\n * @deprecated -- Use `import {createClient} from '@sanity/client'` instead\n * @public\n */\nexport const createClient = originalCreateClient\n"],"names":["SanityClient","ObservableSanityClient","originalRequester","originalCreateClient"],"mappings":";;;AAiBO,MAAM,0BAA0BA,OAAAA,aAAa;AAAC;AAM9C,MAAM,oCAAoCC,OAAAA,uBAAuB;AAAC;AAMlE,MAAM,YAAYC,OAAAA,WAMZ,eAAeC,OAAAA;;;;;;;;;;;;;;;;;"}
|
package/dist/stega.d.cts
CHANGED
|
@@ -2863,11 +2863,17 @@ export declare class ObservableProjectsClient {
|
|
|
2863
2863
|
* @param options - Options for the list request
|
|
2864
2864
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
2865
2865
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
2866
|
+
* - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
|
|
2866
2867
|
*/
|
|
2867
|
-
list(options?: {
|
|
2868
|
+
list(options?: {
|
|
2869
|
+
includeMembers?: true
|
|
2870
|
+
organizationId?: string
|
|
2871
|
+
onlyExplicitMembership?: boolean
|
|
2872
|
+
}): Observable<SanityProject[]>
|
|
2868
2873
|
list(options?: {
|
|
2869
2874
|
includeMembers?: false
|
|
2870
2875
|
organizationId?: string
|
|
2876
|
+
onlyExplicitMembership?: boolean
|
|
2871
2877
|
}): Observable<Omit<SanityProject, 'members'>[]>
|
|
2872
2878
|
/**
|
|
2873
2879
|
* Fetch a project by project ID
|
|
@@ -4246,11 +4252,17 @@ export declare class ProjectsClient {
|
|
|
4246
4252
|
* @param options - Options for the list request
|
|
4247
4253
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
4248
4254
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
4255
|
+
* - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
|
|
4249
4256
|
*/
|
|
4250
|
-
list(options?: {
|
|
4257
|
+
list(options?: {
|
|
4258
|
+
includeMembers?: true
|
|
4259
|
+
organizationId?: string
|
|
4260
|
+
onlyExplicitMembership?: boolean
|
|
4261
|
+
}): Promise<SanityProject[]>
|
|
4251
4262
|
list(options?: {
|
|
4252
4263
|
includeMembers?: false
|
|
4253
4264
|
organizationId?: string
|
|
4265
|
+
onlyExplicitMembership?: boolean
|
|
4254
4266
|
}): Promise<Omit<SanityProject, 'members'>[]>
|
|
4255
4267
|
/**
|
|
4256
4268
|
* Fetch a project by project ID
|
|
@@ -6799,6 +6811,9 @@ export declare type VersionAction =
|
|
|
6799
6811
|
/** @public */
|
|
6800
6812
|
export declare interface VideoPlaybackInfo<
|
|
6801
6813
|
T extends VideoPlaybackInfoItem = VideoPlaybackInfoItem,
|
|
6814
|
+
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
6815
|
+
? VideoRenditionInfoSigned
|
|
6816
|
+
: VideoRenditionInfo,
|
|
6802
6817
|
> {
|
|
6803
6818
|
id: string
|
|
6804
6819
|
thumbnail: T
|
|
@@ -6807,6 +6822,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6807
6822
|
stream: T
|
|
6808
6823
|
duration: number
|
|
6809
6824
|
aspectRatio: number
|
|
6825
|
+
renditions?: R[]
|
|
6810
6826
|
}
|
|
6811
6827
|
|
|
6812
6828
|
/** @public */
|
|
@@ -6838,6 +6854,25 @@ export declare interface VideoPlaybackTokens {
|
|
|
6838
6854
|
animated?: string
|
|
6839
6855
|
}
|
|
6840
6856
|
|
|
6857
|
+
/** @public */
|
|
6858
|
+
export declare type VideoRenditionInfo = VideoRenditionInfoPublic | VideoRenditionInfoSigned
|
|
6859
|
+
|
|
6860
|
+
/** @public */
|
|
6861
|
+
export declare interface VideoRenditionInfoPublic {
|
|
6862
|
+
/** URL to the MP4 rendition (redirects to CDN) */
|
|
6863
|
+
url: string
|
|
6864
|
+
/** Resolution identifier, e.g. "1080p", "480p", "270p" */
|
|
6865
|
+
resolution: '1080p' | '480p' | '270p' | (string & {})
|
|
6866
|
+
}
|
|
6867
|
+
|
|
6868
|
+
/** @public */
|
|
6869
|
+
export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPublic {
|
|
6870
|
+
/** Authentication token for signed playback */
|
|
6871
|
+
token: string
|
|
6872
|
+
/** Token expiration time in ISO 8601 format */
|
|
6873
|
+
expiresAt: string
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6841
6876
|
/**
|
|
6842
6877
|
* Emitted when the listener reconnects and successfully resumes from
|
|
6843
6878
|
* its previous position.
|
package/dist/stega.d.ts
CHANGED
|
@@ -2863,11 +2863,17 @@ export declare class ObservableProjectsClient {
|
|
|
2863
2863
|
* @param options - Options for the list request
|
|
2864
2864
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
2865
2865
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
2866
|
+
* - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
|
|
2866
2867
|
*/
|
|
2867
|
-
list(options?: {
|
|
2868
|
+
list(options?: {
|
|
2869
|
+
includeMembers?: true
|
|
2870
|
+
organizationId?: string
|
|
2871
|
+
onlyExplicitMembership?: boolean
|
|
2872
|
+
}): Observable<SanityProject[]>
|
|
2868
2873
|
list(options?: {
|
|
2869
2874
|
includeMembers?: false
|
|
2870
2875
|
organizationId?: string
|
|
2876
|
+
onlyExplicitMembership?: boolean
|
|
2871
2877
|
}): Observable<Omit<SanityProject, 'members'>[]>
|
|
2872
2878
|
/**
|
|
2873
2879
|
* Fetch a project by project ID
|
|
@@ -4246,11 +4252,17 @@ export declare class ProjectsClient {
|
|
|
4246
4252
|
* @param options - Options for the list request
|
|
4247
4253
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
4248
4254
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
4255
|
+
* - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
|
|
4249
4256
|
*/
|
|
4250
|
-
list(options?: {
|
|
4257
|
+
list(options?: {
|
|
4258
|
+
includeMembers?: true
|
|
4259
|
+
organizationId?: string
|
|
4260
|
+
onlyExplicitMembership?: boolean
|
|
4261
|
+
}): Promise<SanityProject[]>
|
|
4251
4262
|
list(options?: {
|
|
4252
4263
|
includeMembers?: false
|
|
4253
4264
|
organizationId?: string
|
|
4265
|
+
onlyExplicitMembership?: boolean
|
|
4254
4266
|
}): Promise<Omit<SanityProject, 'members'>[]>
|
|
4255
4267
|
/**
|
|
4256
4268
|
* Fetch a project by project ID
|
|
@@ -6799,6 +6811,9 @@ export declare type VersionAction =
|
|
|
6799
6811
|
/** @public */
|
|
6800
6812
|
export declare interface VideoPlaybackInfo<
|
|
6801
6813
|
T extends VideoPlaybackInfoItem = VideoPlaybackInfoItem,
|
|
6814
|
+
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
6815
|
+
? VideoRenditionInfoSigned
|
|
6816
|
+
: VideoRenditionInfo,
|
|
6802
6817
|
> {
|
|
6803
6818
|
id: string
|
|
6804
6819
|
thumbnail: T
|
|
@@ -6807,6 +6822,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6807
6822
|
stream: T
|
|
6808
6823
|
duration: number
|
|
6809
6824
|
aspectRatio: number
|
|
6825
|
+
renditions?: R[]
|
|
6810
6826
|
}
|
|
6811
6827
|
|
|
6812
6828
|
/** @public */
|
|
@@ -6838,6 +6854,25 @@ export declare interface VideoPlaybackTokens {
|
|
|
6838
6854
|
animated?: string
|
|
6839
6855
|
}
|
|
6840
6856
|
|
|
6857
|
+
/** @public */
|
|
6858
|
+
export declare type VideoRenditionInfo = VideoRenditionInfoPublic | VideoRenditionInfoSigned
|
|
6859
|
+
|
|
6860
|
+
/** @public */
|
|
6861
|
+
export declare interface VideoRenditionInfoPublic {
|
|
6862
|
+
/** URL to the MP4 rendition (redirects to CDN) */
|
|
6863
|
+
url: string
|
|
6864
|
+
/** Resolution identifier, e.g. "1080p", "480p", "270p" */
|
|
6865
|
+
resolution: '1080p' | '480p' | '270p' | (string & {})
|
|
6866
|
+
}
|
|
6867
|
+
|
|
6868
|
+
/** @public */
|
|
6869
|
+
export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPublic {
|
|
6870
|
+
/** Authentication token for signed playback */
|
|
6871
|
+
token: string
|
|
6872
|
+
/** Token expiration time in ISO 8601 format */
|
|
6873
|
+
expiresAt: string
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6841
6876
|
/**
|
|
6842
6877
|
* Emitted when the listener reconnects and successfully resumes from
|
|
6843
6878
|
* its previous position.
|
package/dist/stega.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createClient as createClient$1, requester as requester$1, ObservableSanityClient, SanityClient } from "@sanity/client";
|
|
2
2
|
export * from "@sanity/client";
|
|
3
3
|
import { encodeIntoResult, stegaEncodeSourceMap } from "./_chunks-es/stegaEncodeSourceMap.js";
|
|
4
4
|
import { stegaClean, vercelStegaCleanAll } from "./_chunks-es/stegaClean.js";
|
package/dist/stega.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stega.js","sources":["../src/stega/index.ts"],"sourcesContent":["export * from '@sanity/client'\nimport {\n createClient as originalCreateClient,\n ObservableSanityClient,\n requester as originalRequester,\n SanityClient,\n} from '@sanity/client'\n\nexport {encodeIntoResult} from './encodeIntoResult'\nexport {stegaClean, vercelStegaCleanAll} from './stegaClean'\nexport {stegaEncodeSourceMap} from './stegaEncodeSourceMap'\nexport * from './types'\n\n/**\n * @deprecated -- Use `import {SanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class SanityStegaClient extends SanityClient {}\n\n/**\n * @deprecated -- Use `import {ObservableSanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class ObservableSanityStegaClient extends ObservableSanityClient {}\n\n/**\n * @deprecated -- Use `import {requester} from '@sanity/client'` instead\n * @public\n */\nexport const requester = originalRequester\n\n/**\n * @deprecated -- Use `import {createClient} from '@sanity/client'` instead\n * @public\n */\nexport const createClient = originalCreateClient\n"],"names":["originalRequester","originalCreateClient"],"mappings":";;;;AAiBO,MAAM,0BAA0B,aAAa;AAAC;AAM9C,MAAM,oCAAoC,uBAAuB;AAAC;
|
|
1
|
+
{"version":3,"file":"stega.js","sources":["../src/stega/index.ts"],"sourcesContent":["export * from '@sanity/client'\nimport {\n createClient as originalCreateClient,\n ObservableSanityClient,\n requester as originalRequester,\n SanityClient,\n} from '@sanity/client'\n\nexport {encodeIntoResult} from './encodeIntoResult'\nexport {stegaClean, vercelStegaCleanAll} from './stegaClean'\nexport {stegaEncodeSourceMap} from './stegaEncodeSourceMap'\nexport * from './types'\n\n/**\n * @deprecated -- Use `import {SanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class SanityStegaClient extends SanityClient {}\n\n/**\n * @deprecated -- Use `import {ObservableSanityClient} from '@sanity/client'` instead\n * @public\n */\nexport class ObservableSanityStegaClient extends ObservableSanityClient {}\n\n/**\n * @deprecated -- Use `import {requester} from '@sanity/client'` instead\n * @public\n */\nexport const requester = originalRequester\n\n/**\n * @deprecated -- Use `import {createClient} from '@sanity/client'` instead\n * @public\n */\nexport const createClient = originalCreateClient\n"],"names":["originalRequester","originalCreateClient"],"mappings":";;;;AAiBO,MAAM,0BAA0B,aAAa;AAAC;AAM9C,MAAM,oCAAoC,uBAAuB;AAAC;AAMlE,MAAM,YAAYA,aAMZ,eAAeC;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/client",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.18.0",
|
|
4
4
|
"description": "Client for retrieving, creating and patching data from Sanity.io",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"@types/node": "^22.9.0",
|
|
148
148
|
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
|
149
149
|
"@typescript-eslint/parser": "^8.29.1",
|
|
150
|
-
"@vercel/stega": "
|
|
150
|
+
"@vercel/stega": "1.1.0",
|
|
151
151
|
"@vitest/coverage-v8": "3.1.1",
|
|
152
152
|
"eslint": "^9.24.0",
|
|
153
153
|
"eslint-config-prettier": "^10.1.1",
|
package/src/media-library.ts
CHANGED
|
@@ -19,15 +19,22 @@ export class ObservableProjectsClient {
|
|
|
19
19
|
* @param options - Options for the list request
|
|
20
20
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
21
21
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
22
|
+
* - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
|
|
22
23
|
*/
|
|
23
|
-
list(options?: {
|
|
24
|
+
list(options?: {
|
|
25
|
+
includeMembers?: true
|
|
26
|
+
organizationId?: string
|
|
27
|
+
onlyExplicitMembership?: boolean
|
|
28
|
+
}): Observable<SanityProject[]>
|
|
24
29
|
list(options?: {
|
|
25
30
|
includeMembers?: false
|
|
26
31
|
organizationId?: string
|
|
32
|
+
onlyExplicitMembership?: boolean
|
|
27
33
|
}): Observable<Omit<SanityProject, 'members'>[]>
|
|
28
34
|
list(options?: {
|
|
29
35
|
includeMembers?: boolean
|
|
30
36
|
organizationId?: string
|
|
37
|
+
onlyExplicitMembership?: boolean
|
|
31
38
|
}): Observable<SanityProject[] | Omit<SanityProject, 'members'>[]> {
|
|
32
39
|
const query: Record<string, string> = {}
|
|
33
40
|
const uri = '/projects'
|
|
@@ -37,6 +44,9 @@ export class ObservableProjectsClient {
|
|
|
37
44
|
if (options?.organizationId) {
|
|
38
45
|
query.organizationId = options.organizationId
|
|
39
46
|
}
|
|
47
|
+
if (options?.onlyExplicitMembership === true) {
|
|
48
|
+
query.onlyExplicitMembership = 'true'
|
|
49
|
+
}
|
|
40
50
|
|
|
41
51
|
return _request<SanityProject[]>(this.#client, this.#httpRequest, {uri, query})
|
|
42
52
|
}
|
|
@@ -66,15 +76,22 @@ export class ProjectsClient {
|
|
|
66
76
|
* @param options - Options for the list request
|
|
67
77
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
68
78
|
* - `organizationId` - ID of the organization to fetch projects for
|
|
79
|
+
* - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
|
|
69
80
|
*/
|
|
70
|
-
list(options?: {
|
|
81
|
+
list(options?: {
|
|
82
|
+
includeMembers?: true
|
|
83
|
+
organizationId?: string
|
|
84
|
+
onlyExplicitMembership?: boolean
|
|
85
|
+
}): Promise<SanityProject[]>
|
|
71
86
|
list(options?: {
|
|
72
87
|
includeMembers?: false
|
|
73
88
|
organizationId?: string
|
|
89
|
+
onlyExplicitMembership?: boolean
|
|
74
90
|
}): Promise<Omit<SanityProject, 'members'>[]>
|
|
75
91
|
list(options?: {
|
|
76
92
|
includeMembers?: boolean
|
|
77
93
|
organizationId?: string
|
|
94
|
+
onlyExplicitMembership?: boolean
|
|
78
95
|
}): Promise<SanityProject[] | Omit<SanityProject, 'members'>[]> {
|
|
79
96
|
const query: Record<string, string> = {}
|
|
80
97
|
const uri = '/projects'
|
|
@@ -84,6 +101,9 @@ export class ProjectsClient {
|
|
|
84
101
|
if (options?.organizationId) {
|
|
85
102
|
query.organizationId = options.organizationId
|
|
86
103
|
}
|
|
104
|
+
if (options?.onlyExplicitMembership === true) {
|
|
105
|
+
query.onlyExplicitMembership = 'true'
|
|
106
|
+
}
|
|
87
107
|
return lastValueFrom(_request<SanityProject[]>(this.#client, this.#httpRequest, {uri, query}))
|
|
88
108
|
}
|
|
89
109
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import {vercelStegaCombine} from '@vercel/stega'
|
|
2
|
+
|
|
1
3
|
import {createEditUrl} from '../csm/createEditUrl'
|
|
2
4
|
import {jsonPathToStudioPath} from '../csm/jsonPath'
|
|
3
5
|
import {resolveStudioBaseRoute} from '../csm/resolveEditInfo'
|
|
4
6
|
import {reKeySegment, toString as studioPathToString} from '../csm/studioPath'
|
|
5
7
|
import {encodeIntoResult} from './encodeIntoResult'
|
|
6
8
|
import {filterDefault} from './filterDefault'
|
|
7
|
-
import {stegaCombine} from './stega'
|
|
8
9
|
import {
|
|
9
10
|
type ContentSourceMap,
|
|
10
11
|
type ContentSourceMapParsedPath,
|
|
@@ -89,7 +90,7 @@ export function stegaEncodeSourceMap<Result = unknown>(
|
|
|
89
90
|
if (!baseUrl) return value
|
|
90
91
|
const {_id: id, _type: type, _projectId: projectId, _dataset: dataset} = sourceDocument
|
|
91
92
|
|
|
92
|
-
return
|
|
93
|
+
return vercelStegaCombine(
|
|
93
94
|
value,
|
|
94
95
|
{
|
|
95
96
|
origin: 'sanity.io',
|
|
@@ -104,7 +105,7 @@ export function stegaEncodeSourceMap<Result = unknown>(
|
|
|
104
105
|
}),
|
|
105
106
|
},
|
|
106
107
|
// We use custom logic to determine if we should skip encoding
|
|
107
|
-
|
|
108
|
+
false,
|
|
108
109
|
)
|
|
109
110
|
},
|
|
110
111
|
)
|