@osdk/api 2.55.0 → 2.55.1-main-cec01e57a04a4058ea12c83f98ab14fff4e769a1
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/CHANGELOG.md +6 -0
- package/build/browser/object/Media.js.map +1 -1
- package/build/cjs/{ObjectSet-CinZcKIL.d.cts → ObjectSet-DP3FUIj4.d.cts} +11 -4
- package/build/cjs/{QueryDefinition-CfQ5fevq.d.cts → QueryDefinition-BRRv_fNp.d.cts} +1 -1
- package/build/cjs/index.d.cts +4 -4
- package/build/cjs/public/shapes-internal.d.cts +2 -2
- package/build/cjs/public/unstable.d.cts +5 -5
- package/build/cjs/{shapes-internal-C13DbYcV.d.cts → shapes-internal-BWbZ-YqJ.d.cts} +1 -1
- package/build/esm/object/Media.js.map +1 -1
- package/build/types/object/Media.d.ts +11 -4
- package/build/types/object/Media.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @osdk/api
|
|
2
2
|
|
|
3
|
+
## 2.55.1-main-cec01e57a04a4058ea12c83f98ab14fff4e769a1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 342c492: Graduate `Media.fetchFullMetadata` out of beta. It stays optional so existing external implementations of `Media` keep compiling.
|
|
8
|
+
|
|
3
9
|
## 2.55.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Media.js","names":[],"sources":["Media.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface Media {\n /**\n * Fetches metadata for media reference property\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const mediaMetadata = await equipment.trainingMaterial?.fetchMetadata();\n * console.log(mediaMetadata?.mediaType, mediaMetadata?.sizeBytes, mediaMetadata?.path);\n * ```\n * @returns the media metadata, including media type, size, and (when available) path\n */\n fetchMetadata(): Promise<MediaMetadata>;\n /**\n * Fetches type-specific metadata for this media item, i.e. page count for documents,\n * dimensions for imagery, duration for audio/video, etc.\n *\n * Returns a `MediaFullMetadata` that can be narrowed on `result.itemMetadata.type`\n * to access variant-specific fields.\n *\n * @beta\n */\n fetchFullMetadata?(): Promise<MediaFullMetadata>;\n /**\n * Fetches content of a media reference property\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const mediaContent = await equipment.trainingMaterial?.fetchContents();\n * if (mediaContent?.ok) {\n * const data = await mediaContent.blob();\n * }\n * ```\n * @returns a `Response` whose body contains the media item's binary contents\n */\n fetchContents(): Promise<Response>;\n /**\n * Returns the media reference\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const mediaReference = equipment.trainingMaterial?.getMediaReference();\n * ```\n * @returns the underlying `MediaReference` identifying this media item in Foundry\n */\n getMediaReference(): MediaReference;\n getMediaSourceLocation?(): MediaPropertyLocation;\n}\n\n/**\n * Location of a media property on an object.\n */\nexport interface MediaPropertyLocation {\n objectType: string;\n primaryKey: string | number;\n propertyName: string;\n}\n\n/**\n * Unique identifier of a media item in Foundry.\n */\nexport interface MediaReference {\n mimeType: string;\n reference: {\n type: \"mediaSetViewItem\";\n mediaSetViewItem: {\n mediaItemRid: string;\n mediaSetRid: string;\n mediaSetViewRid: string;\n token?: string;\n /** @deprecated Use `token` instead */\n readToken?: string;\n };\n };\n}\n\n/**\n * Object for uploading Media\n */\nexport interface MediaUpload {\n readonly fileName: string;\n readonly data: Blob;\n}\n\n/**\n * Metadata of a media item\n */\nexport interface MediaMetadata {\n path?: string;\n sizeBytes: number;\n mediaType: string;\n}\n\n/**\n * Metadata for a media item, returned by `Media.fetchFullMetadata`.\n */\nexport interface MediaFullMetadata {\n /**\n * Type-specific metadata. Narrow on `itemMetadata.type` to access variant-specific fields.\n *\n * If the platform returns a `type` value not modeled by this SDK version, `itemMetadata`\n * will be an `UnknownMediaItemMetadata` instead, with the raw wire payload preserved on\n * `raw` for inspection.\n */\n itemMetadata: MediaItemMetadata | UnknownMediaItemMetadata;\n}\n\n/**\n * Type-specific metadata for a media item, discriminated by `type`. Narrow on\n * `result.itemMetadata.type` to access variant-specific fields with full IntelliSense.\n *\n * Note: mio currently supports a `streamingVideo` variant internally, but it is not yet exposed\n * on the platform API and is therefore absent here. When the platform API adds it, the variant\n * will be appended here as a non-breaking change.\n */\nexport type MediaItemMetadata =\n | ({ type: \"document\" } & DocumentMediaItemMetadata)\n | ({ type: \"imagery\" } & ImageryMediaItemMetadata)\n | ({ type: \"audio\" } & AudioMediaItemMetadata)\n | ({ type: \"video\" } & VideoMediaItemMetadata)\n | ({ type: \"dicom\" } & DicomMediaItemMetadata)\n | ({ type: \"email\" } & EmailMediaItemMetadata)\n | ({ type: \"model3d\" } & Model3dMediaItemMetadata)\n | ({ type: \"spreadsheet\" } & SpreadsheetMediaItemMetadata)\n | ({ type: \"untyped\" } & UntypedMediaItemMetadata);\n\n/**\n * Fallback variant emitted by the SDK when the platform returns a `MediaItemMetadata.type`\n * value not modeled by this version of `@osdk/foundry.mediasets`. The raw wire payload is\n * preserved on `raw` so callers can inspect it. Bump `@osdk/client` to promote the new\n * variant into `MediaItemMetadata` proper.\n *\n * Distinct from the `untyped` variant of `MediaItemMetadata`, which is a real platform schema\n * type for multimodal media.\n */\nexport interface UnknownMediaItemMetadata {\n type: \"unknown\";\n raw: { type: string; [key: string]: unknown };\n}\n\n// ─── Variant interfaces ──────────────────────────────────────────────────────\n\nexport interface DocumentMediaItemMetadata {\n format: DocumentDecodeFormat;\n pages?: number;\n sizeBytes: number;\n title?: string;\n author?: string;\n}\n\nexport interface ImageryMediaItemMetadata {\n format: ImageryDecodeFormat;\n dimensions?: Dimensions;\n bands: Array<BandInfo>;\n attributes: Record<ImageAttributeDomain, Record<ImageAttributeKey, string>>;\n iccProfile?: string;\n geo?: GeoMetadata;\n pages?: number;\n orientation?: Orientation;\n sizeBytes: number;\n}\n\nexport interface AudioMediaItemMetadata {\n format: AudioDecodeFormat;\n specification: AudioSpecification;\n sizeBytes: number;\n}\n\nexport interface VideoMediaItemMetadata {\n format: VideoDecodeFormat;\n specification: VideoSpecification;\n sizeBytes: number;\n}\n\nexport interface DicomMediaItemMetadata {\n metaInformation: DicomMetaInformation;\n mediaType: DicomMediaType;\n commonDataElements: CommonDicomDataElements;\n otherDataElements: Record<DicomDataElementKey, any>;\n sizeBytes: number;\n}\n\nexport interface EmailMediaItemMetadata {\n format: EmailDecodeFormat;\n sizeBytes: number;\n sender: Array<Mailbox>;\n date: string;\n attachmentCount: number;\n to: Array<MailboxOrGroup>;\n cc: Array<MailboxOrGroup>;\n subject?: string;\n attachments: Array<EmailAttachment>;\n}\n\nexport interface Model3dMediaItemMetadata {\n format: Model3dDecodeFormat;\n modelType: Model3dType;\n sizeBytes: number;\n}\n\nexport interface SpreadsheetMediaItemMetadata {\n format: SpreadsheetDecodeFormat;\n sheetNames: Array<string>;\n sizeBytes: number;\n title?: string;\n author?: string;\n}\n\nexport interface UntypedMediaItemMetadata {\n sizeBytes: number;\n}\n\n// ─── Format enums ────────────────────────────────────────────────────────────\n\nexport type AudioDecodeFormat =\n | \"FLAC\"\n | \"MP2\"\n | \"MP3\"\n | \"MP4\"\n | \"NIST_SPHERE\"\n | \"OGG\"\n | \"WAV\"\n | \"WEBM\";\n\nexport type VideoDecodeFormat = \"MP4\" | \"MKV\" | \"MOV\" | \"TS\";\n\nexport type DocumentDecodeFormat =\n | \"PDF\"\n | \"DOC\"\n | \"DOCX\"\n | \"TXT\"\n | \"PPTX\"\n | \"RTF\";\n\nexport type SpreadsheetDecodeFormat = \"XLSX\";\n\nexport type ImageryDecodeFormat =\n | \"BMP\"\n | \"TIFF\"\n | \"NITF\"\n | \"JP2K\"\n | \"JPG\"\n | \"PNG\"\n | \"WEBP\";\n\nexport type EmailDecodeFormat = \"EML\";\n\nexport type DicomMediaType =\n | \"IMAGE\"\n | \"MULTI_FRAME_IMAGE\"\n | \"VIDEO\"\n | \"STRUCTURED_REPORT\";\n\nexport type Model3dDecodeFormat = \"LAS\" | \"PLY\" | \"OBJ\";\n\nexport type Model3dType = \"POINT_CLOUD\" | \"MESH\";\n\n// ─── Audio / video specification ─────────────────────────────────────────────\n\nexport interface AudioSpecification {\n bitRate: number;\n durationSeconds: number;\n numberOfChannels?: number;\n}\n\nexport interface VideoSpecification {\n bitRate: number;\n durationSeconds: number;\n}\n\n// ─── Imagery support types ───────────────────────────────────────────────────\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n\nexport interface BandInfo {\n dataType?: DataType;\n colorInterpretation?: ColorInterpretation;\n paletteInterpretation?: PaletteInterpretation;\n unitInterpretation?: UnitInterpretation;\n}\n\nexport type DataType =\n | \"UNDEFINED\"\n | \"BYTE\"\n | \"UINT16\"\n | \"INT16\"\n | \"UINT32\"\n | \"INT32\"\n | \"FLOAT32\"\n | \"FLOAT64\"\n | \"COMPLEX_INT16\"\n | \"COMPLEX_INT32\"\n | \"COMPLEX_FLOAT32\"\n | \"COMPLEX_FLOAT64\"\n | \"UINT64\"\n | \"INT64\"\n | \"INT8\";\n\nexport type ColorInterpretation =\n | \"UNDEFINED\"\n | \"GRAY\"\n | \"PALETTE_INDEX\"\n | \"RED\"\n | \"GREEN\"\n | \"BLUE\"\n | \"ALPHA\"\n | \"HUE\"\n | \"SATURATION\"\n | \"LIGHTNESS\"\n | \"CYAN\"\n | \"MAGENTA\"\n | \"YELLOW\"\n | \"BLACK\"\n | \"Y_CB_CR_SPACE_Y\"\n | \"Y_CB_CR_SPACE_CB\"\n | \"Y_CB_CR_SPACE_CR\";\n\nexport type PaletteInterpretation = \"GRAY\" | \"RGB\" | \"RGBA\" | \"CMYK\" | \"HLS\";\n\nexport interface UnitInterpretation {\n unit?: string;\n scale?: number;\n offset?: number;\n}\n\nexport type ImageAttributeDomain = string;\nexport type ImageAttributeKey = string;\n\nexport interface GeoMetadata {\n crs?: CoordinateReferenceSystem;\n geotransform?: AffineTransform;\n gcpInfo?: GcpList;\n gpsData?: GpsMetadata;\n}\n\nexport interface CoordinateReferenceSystem {\n wkt?: string;\n}\n\nexport interface AffineTransform {\n xTranslate?: number;\n xScale?: number;\n xShear?: number;\n yTranslate?: number;\n yShear?: number;\n yScale?: number;\n}\n\nexport interface GcpList {\n gcps: Array<GroundControlPoint>;\n}\n\nexport interface GroundControlPoint {\n pixX?: number;\n pixY?: number;\n projX?: number;\n projY?: number;\n projZ?: number;\n}\n\nexport interface GpsMetadata {\n latitude?: number;\n longitude?: number;\n altitude?: number;\n}\n\nexport interface Orientation {\n rotationAngle?: RotationAngle;\n flipAxis?: FlipAxis;\n}\n\nexport type RotationAngle =\n | \"DEGREE_90\"\n | \"DEGREE_180\"\n | \"DEGREE_270\"\n | \"UNKNOWN\";\n\nexport type FlipAxis = \"HORIZONTAL\" | \"VERTICAL\" | \"UNKNOWN\";\n\n// ─── DICOM support types ─────────────────────────────────────────────────────\n\nexport type DicomMetaInformation = { type: \"v1\" } & DicomMetaInformationV1;\n\nexport interface DicomMetaInformationV1 {\n mediaStorageSop: string;\n mediaStorageSopInstance: string;\n transferSyntax: string;\n}\n\nexport interface CommonDicomDataElements {\n numberFrames?: number;\n modality?: Modality;\n patientId?: string;\n studyId?: string;\n studyUid?: string;\n seriesUid?: string;\n studyTime?: string;\n seriesTime?: string;\n}\n\nexport type DicomDataElementKey = string;\n\nexport type Modality =\n | \"AR\"\n | \"ASMT\"\n | \"AU\"\n | \"BDUS\"\n | \"BI\"\n | \"BMD\"\n | \"CR\"\n | \"CT\"\n | \"CTPROTOCOL\"\n | \"DG\"\n | \"DOC\"\n | \"DX\"\n | \"ECG\"\n | \"EPS\"\n | \"ES\"\n | \"FID\"\n | \"GM\"\n | \"HC\"\n | \"HD\"\n | \"IO\"\n | \"IOL\"\n | \"IVOCT\"\n | \"IVUS\"\n | \"KER\"\n | \"KO\"\n | \"LEN\"\n | \"LS\"\n | \"MG\"\n | \"MR\"\n | \"M3D\"\n | \"NM\"\n | \"OAM\"\n | \"OCT\"\n | \"OP\"\n | \"OPM\"\n | \"OPT\"\n | \"OPTBSV\"\n | \"OPTENF\"\n | \"OPV\"\n | \"OSS\"\n | \"OT\"\n | \"PLAN\"\n | \"PR\"\n | \"PT\"\n | \"PX\"\n | \"REG\"\n | \"RESP\"\n | \"RF\"\n | \"RG\"\n | \"RTDOSE\"\n | \"RTIMAGE\"\n | \"RTINTENT\"\n | \"RTPLAN\"\n | \"RTRAD\"\n | \"RTRECORD\"\n | \"RTSEGANN\"\n | \"RTSTRUCT\"\n | \"RWV\"\n | \"SEG\"\n | \"SM\"\n | \"SMR\"\n | \"SR\"\n | \"SRF\"\n | \"STAIN\"\n | \"TEXTUREMAP\"\n | \"TG\"\n | \"US\"\n | \"VA\"\n | \"XA\"\n | \"XC\"\n | \"AS\"\n | \"CD\"\n | \"CF\"\n | \"CP\"\n | \"CS\"\n | \"DD\"\n | \"DF\"\n | \"DM\"\n | \"DS\"\n | \"EC\"\n | \"FA\"\n | \"FS\"\n | \"LP\"\n | \"MA\"\n | \"MS\"\n | \"OPR\"\n | \"ST\"\n | \"VF\";\n\n// ─── Email support types ─────────────────────────────────────────────────────\n\nexport interface Mailbox {\n displayName?: string;\n emailAddress: string;\n}\n\nexport interface MailboxWrapper {\n mailbox: Mailbox;\n}\n\nexport interface Group {\n groupName: string;\n mailboxes: Array<Mailbox>;\n}\n\nexport interface GroupWrapper {\n group: Group;\n}\n\nexport type MailboxOrGroup =\n | ({ type: \"mailbox\" } & MailboxWrapper)\n | ({ type: \"group\" } & GroupWrapper);\n\nexport interface EmailAttachment {\n attachmentIndex: number;\n fileName?: string;\n mimeType: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Media.js","names":[],"sources":["Media.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface Media {\n /**\n * Fetches metadata for media reference property\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const mediaMetadata = await equipment.trainingMaterial?.fetchMetadata();\n * console.log(mediaMetadata?.mediaType, mediaMetadata?.sizeBytes, mediaMetadata?.path);\n * ```\n * @returns the media metadata, including media type, size, and (when available) path\n */\n fetchMetadata(): Promise<MediaMetadata>;\n /**\n * Fetches type-specific metadata for this media item, i.e. page count for documents,\n * dimensions for imagery, duration for audio/video, etc.\n *\n * Every `Media` returned by this SDK implements this method.\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const fullMetadata = await equipment.trainingMaterial?.fetchFullMetadata?.();\n * if (fullMetadata?.itemMetadata.type === \"document\") {\n * const pageCount = fullMetadata.itemMetadata.pages;\n * }\n * ```\n * @returns a `MediaFullMetadata` whose `itemMetadata` narrows on `itemMetadata.type` to expose\n * schema-specific fields\n */\n fetchFullMetadata?(): Promise<MediaFullMetadata>;\n /**\n * Fetches content of a media reference property\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const mediaContent = await equipment.trainingMaterial?.fetchContents();\n * if (mediaContent?.ok) {\n * const data = await mediaContent.blob();\n * }\n * ```\n * @returns a `Response` whose body contains the media item's binary contents\n */\n fetchContents(): Promise<Response>;\n /**\n * Returns the media reference\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const mediaReference = equipment.trainingMaterial?.getMediaReference();\n * ```\n * @returns the underlying `MediaReference` identifying this media item in Foundry\n */\n getMediaReference(): MediaReference;\n getMediaSourceLocation?(): MediaPropertyLocation;\n}\n\n/**\n * Location of a media property on an object.\n */\nexport interface MediaPropertyLocation {\n objectType: string;\n primaryKey: string | number;\n propertyName: string;\n}\n\n/**\n * Unique identifier of a media item in Foundry.\n */\nexport interface MediaReference {\n mimeType: string;\n reference: {\n type: \"mediaSetViewItem\";\n mediaSetViewItem: {\n mediaItemRid: string;\n mediaSetRid: string;\n mediaSetViewRid: string;\n token?: string;\n /** @deprecated Use `token` instead */\n readToken?: string;\n };\n };\n}\n\n/**\n * Object for uploading Media\n */\nexport interface MediaUpload {\n readonly fileName: string;\n readonly data: Blob;\n}\n\n/**\n * Metadata of a media item\n */\nexport interface MediaMetadata {\n path?: string;\n sizeBytes: number;\n mediaType: string;\n}\n\n/**\n * Metadata for a media item, returned by `Media.fetchFullMetadata`.\n */\nexport interface MediaFullMetadata {\n /**\n * Type-specific metadata. Narrow on `itemMetadata.type` to access variant-specific fields.\n *\n * If the platform returns a `type` value not modeled by this SDK version, `itemMetadata`\n * will be an `UnknownMediaItemMetadata` instead, with the raw wire payload preserved on\n * `raw` for inspection.\n */\n itemMetadata: MediaItemMetadata | UnknownMediaItemMetadata;\n}\n\n/**\n * Type-specific metadata for a media item, discriminated by `type`. Narrow on\n * `result.itemMetadata.type` to access variant-specific fields with full IntelliSense.\n *\n * Note: mio currently supports a `streamingVideo` variant internally, but it is not yet exposed\n * on the platform API and is therefore absent here. When the platform API adds it, the variant\n * will be appended here as a non-breaking change.\n */\nexport type MediaItemMetadata =\n | ({ type: \"document\" } & DocumentMediaItemMetadata)\n | ({ type: \"imagery\" } & ImageryMediaItemMetadata)\n | ({ type: \"audio\" } & AudioMediaItemMetadata)\n | ({ type: \"video\" } & VideoMediaItemMetadata)\n | ({ type: \"dicom\" } & DicomMediaItemMetadata)\n | ({ type: \"email\" } & EmailMediaItemMetadata)\n | ({ type: \"model3d\" } & Model3dMediaItemMetadata)\n | ({ type: \"spreadsheet\" } & SpreadsheetMediaItemMetadata)\n | ({ type: \"untyped\" } & UntypedMediaItemMetadata);\n\n/**\n * Fallback variant emitted by the SDK when the platform returns a `MediaItemMetadata.type`\n * value not modeled by this version of `@osdk/foundry.mediasets`. The raw wire payload is\n * preserved on `raw` so callers can inspect it. Bump `@osdk/client` to promote the new\n * variant into `MediaItemMetadata` proper.\n *\n * Distinct from the `untyped` variant of `MediaItemMetadata`, which is a real platform schema\n * type for multimodal media.\n */\nexport interface UnknownMediaItemMetadata {\n type: \"unknown\";\n raw: { type: string; [key: string]: unknown };\n}\n\n// ─── Variant interfaces ──────────────────────────────────────────────────────\n\nexport interface DocumentMediaItemMetadata {\n format: DocumentDecodeFormat;\n pages?: number;\n sizeBytes: number;\n title?: string;\n author?: string;\n}\n\nexport interface ImageryMediaItemMetadata {\n format: ImageryDecodeFormat;\n dimensions?: Dimensions;\n bands: Array<BandInfo>;\n attributes: Record<ImageAttributeDomain, Record<ImageAttributeKey, string>>;\n iccProfile?: string;\n geo?: GeoMetadata;\n pages?: number;\n orientation?: Orientation;\n sizeBytes: number;\n}\n\nexport interface AudioMediaItemMetadata {\n format: AudioDecodeFormat;\n specification: AudioSpecification;\n sizeBytes: number;\n}\n\nexport interface VideoMediaItemMetadata {\n format: VideoDecodeFormat;\n specification: VideoSpecification;\n sizeBytes: number;\n}\n\nexport interface DicomMediaItemMetadata {\n metaInformation: DicomMetaInformation;\n mediaType: DicomMediaType;\n commonDataElements: CommonDicomDataElements;\n otherDataElements: Record<DicomDataElementKey, any>;\n sizeBytes: number;\n}\n\nexport interface EmailMediaItemMetadata {\n format: EmailDecodeFormat;\n sizeBytes: number;\n sender: Array<Mailbox>;\n date: string;\n attachmentCount: number;\n to: Array<MailboxOrGroup>;\n cc: Array<MailboxOrGroup>;\n subject?: string;\n attachments: Array<EmailAttachment>;\n}\n\nexport interface Model3dMediaItemMetadata {\n format: Model3dDecodeFormat;\n modelType: Model3dType;\n sizeBytes: number;\n}\n\nexport interface SpreadsheetMediaItemMetadata {\n format: SpreadsheetDecodeFormat;\n sheetNames: Array<string>;\n sizeBytes: number;\n title?: string;\n author?: string;\n}\n\nexport interface UntypedMediaItemMetadata {\n sizeBytes: number;\n}\n\n// ─── Format enums ────────────────────────────────────────────────────────────\n\nexport type AudioDecodeFormat =\n | \"FLAC\"\n | \"MP2\"\n | \"MP3\"\n | \"MP4\"\n | \"NIST_SPHERE\"\n | \"OGG\"\n | \"WAV\"\n | \"WEBM\";\n\nexport type VideoDecodeFormat = \"MP4\" | \"MKV\" | \"MOV\" | \"TS\";\n\nexport type DocumentDecodeFormat =\n | \"PDF\"\n | \"DOC\"\n | \"DOCX\"\n | \"TXT\"\n | \"PPTX\"\n | \"RTF\";\n\nexport type SpreadsheetDecodeFormat = \"XLSX\";\n\nexport type ImageryDecodeFormat =\n | \"BMP\"\n | \"TIFF\"\n | \"NITF\"\n | \"JP2K\"\n | \"JPG\"\n | \"PNG\"\n | \"WEBP\";\n\nexport type EmailDecodeFormat = \"EML\";\n\nexport type DicomMediaType =\n | \"IMAGE\"\n | \"MULTI_FRAME_IMAGE\"\n | \"VIDEO\"\n | \"STRUCTURED_REPORT\";\n\nexport type Model3dDecodeFormat = \"LAS\" | \"PLY\" | \"OBJ\";\n\nexport type Model3dType = \"POINT_CLOUD\" | \"MESH\";\n\n// ─── Audio / video specification ─────────────────────────────────────────────\n\nexport interface AudioSpecification {\n bitRate: number;\n durationSeconds: number;\n numberOfChannels?: number;\n}\n\nexport interface VideoSpecification {\n bitRate: number;\n durationSeconds: number;\n}\n\n// ─── Imagery support types ───────────────────────────────────────────────────\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n\nexport interface BandInfo {\n dataType?: DataType;\n colorInterpretation?: ColorInterpretation;\n paletteInterpretation?: PaletteInterpretation;\n unitInterpretation?: UnitInterpretation;\n}\n\nexport type DataType =\n | \"UNDEFINED\"\n | \"BYTE\"\n | \"UINT16\"\n | \"INT16\"\n | \"UINT32\"\n | \"INT32\"\n | \"FLOAT32\"\n | \"FLOAT64\"\n | \"COMPLEX_INT16\"\n | \"COMPLEX_INT32\"\n | \"COMPLEX_FLOAT32\"\n | \"COMPLEX_FLOAT64\"\n | \"UINT64\"\n | \"INT64\"\n | \"INT8\";\n\nexport type ColorInterpretation =\n | \"UNDEFINED\"\n | \"GRAY\"\n | \"PALETTE_INDEX\"\n | \"RED\"\n | \"GREEN\"\n | \"BLUE\"\n | \"ALPHA\"\n | \"HUE\"\n | \"SATURATION\"\n | \"LIGHTNESS\"\n | \"CYAN\"\n | \"MAGENTA\"\n | \"YELLOW\"\n | \"BLACK\"\n | \"Y_CB_CR_SPACE_Y\"\n | \"Y_CB_CR_SPACE_CB\"\n | \"Y_CB_CR_SPACE_CR\";\n\nexport type PaletteInterpretation = \"GRAY\" | \"RGB\" | \"RGBA\" | \"CMYK\" | \"HLS\";\n\nexport interface UnitInterpretation {\n unit?: string;\n scale?: number;\n offset?: number;\n}\n\nexport type ImageAttributeDomain = string;\nexport type ImageAttributeKey = string;\n\nexport interface GeoMetadata {\n crs?: CoordinateReferenceSystem;\n geotransform?: AffineTransform;\n gcpInfo?: GcpList;\n gpsData?: GpsMetadata;\n}\n\nexport interface CoordinateReferenceSystem {\n wkt?: string;\n}\n\nexport interface AffineTransform {\n xTranslate?: number;\n xScale?: number;\n xShear?: number;\n yTranslate?: number;\n yShear?: number;\n yScale?: number;\n}\n\nexport interface GcpList {\n gcps: Array<GroundControlPoint>;\n}\n\nexport interface GroundControlPoint {\n pixX?: number;\n pixY?: number;\n projX?: number;\n projY?: number;\n projZ?: number;\n}\n\nexport interface GpsMetadata {\n latitude?: number;\n longitude?: number;\n altitude?: number;\n}\n\nexport interface Orientation {\n rotationAngle?: RotationAngle;\n flipAxis?: FlipAxis;\n}\n\nexport type RotationAngle =\n | \"DEGREE_90\"\n | \"DEGREE_180\"\n | \"DEGREE_270\"\n | \"UNKNOWN\";\n\nexport type FlipAxis = \"HORIZONTAL\" | \"VERTICAL\" | \"UNKNOWN\";\n\n// ─── DICOM support types ─────────────────────────────────────────────────────\n\nexport type DicomMetaInformation = { type: \"v1\" } & DicomMetaInformationV1;\n\nexport interface DicomMetaInformationV1 {\n mediaStorageSop: string;\n mediaStorageSopInstance: string;\n transferSyntax: string;\n}\n\nexport interface CommonDicomDataElements {\n numberFrames?: number;\n modality?: Modality;\n patientId?: string;\n studyId?: string;\n studyUid?: string;\n seriesUid?: string;\n studyTime?: string;\n seriesTime?: string;\n}\n\nexport type DicomDataElementKey = string;\n\nexport type Modality =\n | \"AR\"\n | \"ASMT\"\n | \"AU\"\n | \"BDUS\"\n | \"BI\"\n | \"BMD\"\n | \"CR\"\n | \"CT\"\n | \"CTPROTOCOL\"\n | \"DG\"\n | \"DOC\"\n | \"DX\"\n | \"ECG\"\n | \"EPS\"\n | \"ES\"\n | \"FID\"\n | \"GM\"\n | \"HC\"\n | \"HD\"\n | \"IO\"\n | \"IOL\"\n | \"IVOCT\"\n | \"IVUS\"\n | \"KER\"\n | \"KO\"\n | \"LEN\"\n | \"LS\"\n | \"MG\"\n | \"MR\"\n | \"M3D\"\n | \"NM\"\n | \"OAM\"\n | \"OCT\"\n | \"OP\"\n | \"OPM\"\n | \"OPT\"\n | \"OPTBSV\"\n | \"OPTENF\"\n | \"OPV\"\n | \"OSS\"\n | \"OT\"\n | \"PLAN\"\n | \"PR\"\n | \"PT\"\n | \"PX\"\n | \"REG\"\n | \"RESP\"\n | \"RF\"\n | \"RG\"\n | \"RTDOSE\"\n | \"RTIMAGE\"\n | \"RTINTENT\"\n | \"RTPLAN\"\n | \"RTRAD\"\n | \"RTRECORD\"\n | \"RTSEGANN\"\n | \"RTSTRUCT\"\n | \"RWV\"\n | \"SEG\"\n | \"SM\"\n | \"SMR\"\n | \"SR\"\n | \"SRF\"\n | \"STAIN\"\n | \"TEXTUREMAP\"\n | \"TG\"\n | \"US\"\n | \"VA\"\n | \"XA\"\n | \"XC\"\n | \"AS\"\n | \"CD\"\n | \"CF\"\n | \"CP\"\n | \"CS\"\n | \"DD\"\n | \"DF\"\n | \"DM\"\n | \"DS\"\n | \"EC\"\n | \"FA\"\n | \"FS\"\n | \"LP\"\n | \"MA\"\n | \"MS\"\n | \"OPR\"\n | \"ST\"\n | \"VF\";\n\n// ─── Email support types ─────────────────────────────────────────────────────\n\nexport interface Mailbox {\n displayName?: string;\n emailAddress: string;\n}\n\nexport interface MailboxWrapper {\n mailbox: Mailbox;\n}\n\nexport interface Group {\n groupName: string;\n mailboxes: Array<Mailbox>;\n}\n\nexport interface GroupWrapper {\n group: Group;\n}\n\nexport type MailboxOrGroup =\n | ({ type: \"mailbox\" } & MailboxWrapper)\n | ({ type: \"group\" } & GroupWrapper);\n\nexport interface EmailAttachment {\n attachmentIndex: number;\n fileName?: string;\n mimeType: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -56,10 +56,17 @@ interface Media {
|
|
|
56
56
|
* Fetches type-specific metadata for this media item, i.e. page count for documents,
|
|
57
57
|
* dimensions for imagery, duration for audio/video, etc.
|
|
58
58
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
59
|
+
* Every `Media` returned by this SDK implements this method.
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const equipment = await client(Equipment).fetchOne(12345);
|
|
63
|
+
* const fullMetadata = await equipment.trainingMaterial?.fetchFullMetadata?.();
|
|
64
|
+
* if (fullMetadata?.itemMetadata.type === "document") {
|
|
65
|
+
* const pageCount = fullMetadata.itemMetadata.pages;
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
* @returns a `MediaFullMetadata` whose `itemMetadata` narrows on `itemMetadata.type` to expose
|
|
69
|
+
* schema-specific fields
|
|
63
70
|
*/
|
|
64
71
|
fetchFullMetadata?(): Promise<MediaFullMetadata>;
|
|
65
72
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as ObjectOrInterfaceDefinition, a as OsdkMetadata, b as ObjectTypeDefinition } from './ObjectSet-
|
|
1
|
+
import { O as ObjectOrInterfaceDefinition, a as OsdkMetadata, b as ObjectTypeDefinition } from './ObjectSet-DP3FUIj4.cjs';
|
|
2
2
|
|
|
3
3
|
interface QueryMetadata {
|
|
4
4
|
type: "query";
|
package/build/cjs/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as AttachmentUpload, M as MediaReference, c as MediaUpload, d as Media, e as Attachment, b as ObjectTypeDefinition, f as ObjectIdentifiers, g as OsdkObjectPrimaryKeyType, h as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, a as OsdkMetadata, R as ReleaseStatus, P as PropertyValueWireToClient, i as PrimaryKeyTypes, O as ObjectOrInterfaceDefinition, j as OsdkBase } from './ObjectSet-
|
|
2
|
-
export { k as AffineTransform, l as Affix, m as AggregateOpts, n as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, o as AggregationClause, p as AggregationResultsWithGroups, q as AggregationResultsWithoutGroups, r as AggregationsResults, s as AllGroupByValues, t as AndWhereClause, u as AsyncIterArgs, v as AttachmentMetadata, w as AudioDecodeFormat, x as AudioMediaItemMetadata, y as AudioSpecification, z as Augment, B as Augments, D as BandInfo, E as BaseObjectSet, F as BaseWirePropertyTypes, G as CipherText, H as ColorInterpretation, J as CommonDicomDataElements, K as ConvertProps, L as CoordinateReferenceSystem, N as DataType, Q as DatetimeFormat, S as DatetimeLocalizedFormat, T as DatetimeLocalizedFormatType, U as DatetimeStringFormat, V as DatetimeTimezone, W as DatetimeTimezoneStatic, X as DatetimeTimezoneUser, Y as DerivedProperty, Z as DicomDataElementKey, _ as DicomMediaItemMetadata, $ as DicomMediaType, a0 as DicomMetaInformation, a1 as DicomMetaInformationV1, a2 as Dimensions, a3 as DistanceUnitMapping, a4 as DocumentDecodeFormat, a5 as DocumentMediaItemMetadata, a6 as DurationBaseValue, a7 as DurationFormatStyle, a8 as DurationMapping, a9 as DurationPrecision, aa as EmailAttachment, ab as EmailDecodeFormat, ac as EmailMediaItemMetadata, ad as FetchLinksPageResult, ae as FetchPageArgs, af as FetchPageResult, ag as FlipAxis, ah as GcpList, ai as GeoFilterOptions, aj as GeoFilter_Intersects, ak as GeoFilter_Within, al as GeoMetadata, am as GeotimeSeriesProperty, an as GpsMetadata, ao as GroundControlPoint, ap as Group, aq as GroupByClause, ar as GroupByRange, as as GroupWrapper, at as HumanReadableFormat, au as ImageAttributeDomain, av as ImageAttributeKey, aw as ImageryDecodeFormat, ax as ImageryMediaItemMetadata, ay as InterfaceMetadata, az as IntervalRule, aA as KnownType, aB as LinkNames, aC as LinkTypeApiNamesFor, aD as LinkedType, aE as Mailbox, aF as MailboxOrGroup, aG as MailboxWrapper, aH as MaybeScore, aI as MediaFullMetadata, aJ as MediaItemMetadata, aK as MediaMetadata, aL as MediaPropertyLocation, aM as MinimalDirectedObjectLinkInstance, aN as Modality, aO as Model3dDecodeFormat, aP as Model3dMediaItemMetadata, aQ as Model3dType, aR as NotWhereClause, aS as NullabilityAdherence, aT as NumberFormatAffix, aU as NumberFormatCurrency, aV as NumberFormatCurrencyStyle, aW as NumberFormatCustomUnit, aX as NumberFormatDuration, aY as NumberFormatFixedValues, aZ as NumberFormatNotation, a_ as NumberFormatOptions, a$ as NumberFormatRatio, b0 as NumberFormatScale, b1 as NumberFormatStandard, b2 as NumberFormatStandardUnit, b3 as NumberRatioType, b4 as NumberRoundingMode, b5 as NumberScaleType, b6 as ObjectMetadata, b7 as ObjectSetArgs, b8 as ObjectSetSubscription, b9 as ObjectSpecifier, ba as OrWhereClause, bb as Orientation, bc as Osdk, bd as OsdkObjectCreatePropertyType, be as OsdkObjectLinksObject, bf as OsdkObjectPropertyType, bg as PageResult, bh as PaletteInterpretation, bi as PossibleWhereClauseFilters, bj as PrimaryKeyType, bk as PropertyBooleanFormattingRule, bl as PropertyDateFormattingRule, bm as PropertyDef, bn as PropertyKeys, bo as PropertyKnownTypeFormattingRule, bp as PropertyMarkings, bq as PropertyNumberFormattingRule, br as PropertyNumberFormattingRuleType, bs as PropertySecurity, bt as PropertyTimestampFormattingRule, bu as PropertyTypeReference, bv as PropertyTypeReferenceOrStringConstant, bw as PropertyValueFormattingRule, bx as Result, by as RotationAngle, bz as SelectArg, bA as SelectArgToKeys, bB as SimplePropertyDef, bC as SingleLinkAccessor, bD as SingleOsdkResult, bE as SpreadsheetDecodeFormat, bF as SpreadsheetMediaItemMetadata, bG as StringConstant, bH as TimeCodeFormat, bI as TimeSeriesPoint, bJ as TimeSeriesProperty, bK as TimeSeriesQuery, bL as TimeseriesDurationMapping, bM as UnitInterpretation, bN as UnknownMediaItemMetadata, bO as UntypedMediaItemMetadata, bP as ValidAggregationKeys, bQ as VersionBound, bR as VideoDecodeFormat, bS as VideoMediaItemMetadata, bT as VideoSpecification, bU as WhereClause, bV as WirePropertyTypes, bW as isOk } from './ObjectSet-
|
|
3
|
-
import { A as AggregationKeyTypes, a as AggregationRangeKeyTypes, b as AggregationValueTypes } from './QueryDefinition-
|
|
4
|
-
export { I as InterfaceQueryDataType, O as ObjectQueryDataType, c as ObjectSetQueryDataType, Q as QueryDataTypeDefinition, d as QueryDefinition, e as QueryMetadata, f as QueryParameterDefinition, T as ThreeDimensionalQueryAggregationDefinition, g as TwoDimensionalQueryAggregationDefinition } from './QueryDefinition-
|
|
1
|
+
import { A as AttachmentUpload, M as MediaReference, c as MediaUpload, d as Media, e as Attachment, b as ObjectTypeDefinition, f as ObjectIdentifiers, g as OsdkObjectPrimaryKeyType, h as ObjectSet, I as InterfaceDefinition, C as CompileTimeMetadata, a as OsdkMetadata, R as ReleaseStatus, P as PropertyValueWireToClient, i as PrimaryKeyTypes, O as ObjectOrInterfaceDefinition, j as OsdkBase } from './ObjectSet-DP3FUIj4.cjs';
|
|
2
|
+
export { k as AffineTransform, l as Affix, m as AggregateOpts, n as AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy, o as AggregationClause, p as AggregationResultsWithGroups, q as AggregationResultsWithoutGroups, r as AggregationsResults, s as AllGroupByValues, t as AndWhereClause, u as AsyncIterArgs, v as AttachmentMetadata, w as AudioDecodeFormat, x as AudioMediaItemMetadata, y as AudioSpecification, z as Augment, B as Augments, D as BandInfo, E as BaseObjectSet, F as BaseWirePropertyTypes, G as CipherText, H as ColorInterpretation, J as CommonDicomDataElements, K as ConvertProps, L as CoordinateReferenceSystem, N as DataType, Q as DatetimeFormat, S as DatetimeLocalizedFormat, T as DatetimeLocalizedFormatType, U as DatetimeStringFormat, V as DatetimeTimezone, W as DatetimeTimezoneStatic, X as DatetimeTimezoneUser, Y as DerivedProperty, Z as DicomDataElementKey, _ as DicomMediaItemMetadata, $ as DicomMediaType, a0 as DicomMetaInformation, a1 as DicomMetaInformationV1, a2 as Dimensions, a3 as DistanceUnitMapping, a4 as DocumentDecodeFormat, a5 as DocumentMediaItemMetadata, a6 as DurationBaseValue, a7 as DurationFormatStyle, a8 as DurationMapping, a9 as DurationPrecision, aa as EmailAttachment, ab as EmailDecodeFormat, ac as EmailMediaItemMetadata, ad as FetchLinksPageResult, ae as FetchPageArgs, af as FetchPageResult, ag as FlipAxis, ah as GcpList, ai as GeoFilterOptions, aj as GeoFilter_Intersects, ak as GeoFilter_Within, al as GeoMetadata, am as GeotimeSeriesProperty, an as GpsMetadata, ao as GroundControlPoint, ap as Group, aq as GroupByClause, ar as GroupByRange, as as GroupWrapper, at as HumanReadableFormat, au as ImageAttributeDomain, av as ImageAttributeKey, aw as ImageryDecodeFormat, ax as ImageryMediaItemMetadata, ay as InterfaceMetadata, az as IntervalRule, aA as KnownType, aB as LinkNames, aC as LinkTypeApiNamesFor, aD as LinkedType, aE as Mailbox, aF as MailboxOrGroup, aG as MailboxWrapper, aH as MaybeScore, aI as MediaFullMetadata, aJ as MediaItemMetadata, aK as MediaMetadata, aL as MediaPropertyLocation, aM as MinimalDirectedObjectLinkInstance, aN as Modality, aO as Model3dDecodeFormat, aP as Model3dMediaItemMetadata, aQ as Model3dType, aR as NotWhereClause, aS as NullabilityAdherence, aT as NumberFormatAffix, aU as NumberFormatCurrency, aV as NumberFormatCurrencyStyle, aW as NumberFormatCustomUnit, aX as NumberFormatDuration, aY as NumberFormatFixedValues, aZ as NumberFormatNotation, a_ as NumberFormatOptions, a$ as NumberFormatRatio, b0 as NumberFormatScale, b1 as NumberFormatStandard, b2 as NumberFormatStandardUnit, b3 as NumberRatioType, b4 as NumberRoundingMode, b5 as NumberScaleType, b6 as ObjectMetadata, b7 as ObjectSetArgs, b8 as ObjectSetSubscription, b9 as ObjectSpecifier, ba as OrWhereClause, bb as Orientation, bc as Osdk, bd as OsdkObjectCreatePropertyType, be as OsdkObjectLinksObject, bf as OsdkObjectPropertyType, bg as PageResult, bh as PaletteInterpretation, bi as PossibleWhereClauseFilters, bj as PrimaryKeyType, bk as PropertyBooleanFormattingRule, bl as PropertyDateFormattingRule, bm as PropertyDef, bn as PropertyKeys, bo as PropertyKnownTypeFormattingRule, bp as PropertyMarkings, bq as PropertyNumberFormattingRule, br as PropertyNumberFormattingRuleType, bs as PropertySecurity, bt as PropertyTimestampFormattingRule, bu as PropertyTypeReference, bv as PropertyTypeReferenceOrStringConstant, bw as PropertyValueFormattingRule, bx as Result, by as RotationAngle, bz as SelectArg, bA as SelectArgToKeys, bB as SimplePropertyDef, bC as SingleLinkAccessor, bD as SingleOsdkResult, bE as SpreadsheetDecodeFormat, bF as SpreadsheetMediaItemMetadata, bG as StringConstant, bH as TimeCodeFormat, bI as TimeSeriesPoint, bJ as TimeSeriesProperty, bK as TimeSeriesQuery, bL as TimeseriesDurationMapping, bM as UnitInterpretation, bN as UnknownMediaItemMetadata, bO as UntypedMediaItemMetadata, bP as ValidAggregationKeys, bQ as VersionBound, bR as VideoDecodeFormat, bS as VideoMediaItemMetadata, bT as VideoSpecification, bU as WhereClause, bV as WirePropertyTypes, bW as isOk } from './ObjectSet-DP3FUIj4.cjs';
|
|
3
|
+
import { A as AggregationKeyTypes, a as AggregationRangeKeyTypes, b as AggregationValueTypes } from './QueryDefinition-BRRv_fNp.cjs';
|
|
4
|
+
export { I as InterfaceQueryDataType, O as ObjectQueryDataType, c as ObjectSetQueryDataType, Q as QueryDataTypeDefinition, d as QueryDefinition, e as QueryMetadata, f as QueryParameterDefinition, T as ThreeDimensionalQueryAggregationDefinition, g as TwoDimensionalQueryAggregationDefinition } from './QueryDefinition-BRRv_fNp.cjs';
|
|
5
5
|
import 'type-fest';
|
|
6
6
|
import 'geojson';
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { D as DerivedLinkConfig, k as NullabilityOp, l as ShapeDerivedLinkDef, m as ShapeLinkObjectSetDef, n as ShapeLinkOrderBy, o as ShapeLinkSegment, p as ShapeLinkSetOperation, q as ShapePropertyConfig } from '../shapes-internal-
|
|
2
|
-
import '../ObjectSet-
|
|
1
|
+
export { D as DerivedLinkConfig, k as NullabilityOp, l as ShapeDerivedLinkDef, m as ShapeLinkObjectSetDef, n as ShapeLinkOrderBy, o as ShapeLinkSegment, p as ShapeLinkSetOperation, q as ShapePropertyConfig } from '../shapes-internal-BWbZ-YqJ.cjs';
|
|
2
|
+
import '../ObjectSet-DP3FUIj4.cjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import 'geojson';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as CompileTimeMetadata, O as ObjectOrInterfaceDefinition, bn as PropertyKeys, aS as NullabilityAdherence, bz as SelectArg, bc as Osdk, bX as ExtractOptions, ae as FetchPageArgs, af as FetchPageResult, j as OsdkBase, bY as Just, b8 as ObjectSetSubscription, d as Media } from '../ObjectSet-
|
|
2
|
-
export { bZ as MinimalObjectSet } from '../ObjectSet-
|
|
3
|
-
import { d as QueryDefinition } from '../QueryDefinition-
|
|
4
|
-
import { P as PropertyType, S as ShapeLinkBuilder, a as ShapeDefinition, R as RequiredProperty, b as ShapeBuilder } from '../shapes-internal-
|
|
5
|
-
export { L as LinkLoadConfig, c as LinkStatus, N as NullabilityViolation, d as ShapeBaseType, e as ShapeDerivedLinks, f as ShapeInstance, g as ShapeLinkResult, h as ShapeNullabilityError, i as SourcePrimaryKeySymbol, j as isSourcePkSymbol } from '../shapes-internal-
|
|
1
|
+
import { C as CompileTimeMetadata, O as ObjectOrInterfaceDefinition, bn as PropertyKeys, aS as NullabilityAdherence, bz as SelectArg, bc as Osdk, bX as ExtractOptions, ae as FetchPageArgs, af as FetchPageResult, j as OsdkBase, bY as Just, b8 as ObjectSetSubscription, d as Media } from '../ObjectSet-DP3FUIj4.cjs';
|
|
2
|
+
export { bZ as MinimalObjectSet } from '../ObjectSet-DP3FUIj4.cjs';
|
|
3
|
+
import { d as QueryDefinition } from '../QueryDefinition-BRRv_fNp.cjs';
|
|
4
|
+
import { P as PropertyType, S as ShapeLinkBuilder, a as ShapeDefinition, R as RequiredProperty, b as ShapeBuilder } from '../shapes-internal-BWbZ-YqJ.cjs';
|
|
5
|
+
export { L as LinkLoadConfig, c as LinkStatus, N as NullabilityViolation, d as ShapeBaseType, e as ShapeDerivedLinks, f as ShapeInstance, g as ShapeLinkResult, h as ShapeNullabilityError, i as SourcePrimaryKeySymbol, j as isSourcePkSymbol } from '../shapes-internal-BWbZ-YqJ.cjs';
|
|
6
6
|
import 'type-fest';
|
|
7
7
|
import 'geojson';
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as ObjectOrInterfaceDefinition, bU as WhereClause, bn as PropertyKeys, C as CompileTimeMetadata, aB as LinkNames, aD as LinkedType, j as OsdkBase } from './ObjectSet-
|
|
1
|
+
import { O as ObjectOrInterfaceDefinition, bU as WhereClause, bn as PropertyKeys, C as CompileTimeMetadata, aB as LinkNames, aD as LinkedType, j as OsdkBase } from './ObjectSet-DP3FUIj4.cjs';
|
|
2
2
|
|
|
3
3
|
declare const SourcePrimaryKeySymbol: unique symbol;
|
|
4
4
|
declare function isSourcePkSymbol(value: unknown): value is symbol;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Media.js","names":[],"sources":["Media.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface Media {\n /**\n * Fetches metadata for media reference property\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const mediaMetadata = await equipment.trainingMaterial?.fetchMetadata();\n * console.log(mediaMetadata?.mediaType, mediaMetadata?.sizeBytes, mediaMetadata?.path);\n * ```\n * @returns the media metadata, including media type, size, and (when available) path\n */\n fetchMetadata(): Promise<MediaMetadata>;\n /**\n * Fetches type-specific metadata for this media item, i.e. page count for documents,\n * dimensions for imagery, duration for audio/video, etc.\n *\n * Returns a `MediaFullMetadata` that can be narrowed on `result.itemMetadata.type`\n * to access variant-specific fields.\n *\n * @beta\n */\n fetchFullMetadata?(): Promise<MediaFullMetadata>;\n /**\n * Fetches content of a media reference property\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const mediaContent = await equipment.trainingMaterial?.fetchContents();\n * if (mediaContent?.ok) {\n * const data = await mediaContent.blob();\n * }\n * ```\n * @returns a `Response` whose body contains the media item's binary contents\n */\n fetchContents(): Promise<Response>;\n /**\n * Returns the media reference\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const mediaReference = equipment.trainingMaterial?.getMediaReference();\n * ```\n * @returns the underlying `MediaReference` identifying this media item in Foundry\n */\n getMediaReference(): MediaReference;\n getMediaSourceLocation?(): MediaPropertyLocation;\n}\n\n/**\n * Location of a media property on an object.\n */\nexport interface MediaPropertyLocation {\n objectType: string;\n primaryKey: string | number;\n propertyName: string;\n}\n\n/**\n * Unique identifier of a media item in Foundry.\n */\nexport interface MediaReference {\n mimeType: string;\n reference: {\n type: \"mediaSetViewItem\";\n mediaSetViewItem: {\n mediaItemRid: string;\n mediaSetRid: string;\n mediaSetViewRid: string;\n token?: string;\n /** @deprecated Use `token` instead */\n readToken?: string;\n };\n };\n}\n\n/**\n * Object for uploading Media\n */\nexport interface MediaUpload {\n readonly fileName: string;\n readonly data: Blob;\n}\n\n/**\n * Metadata of a media item\n */\nexport interface MediaMetadata {\n path?: string;\n sizeBytes: number;\n mediaType: string;\n}\n\n/**\n * Metadata for a media item, returned by `Media.fetchFullMetadata`.\n */\nexport interface MediaFullMetadata {\n /**\n * Type-specific metadata. Narrow on `itemMetadata.type` to access variant-specific fields.\n *\n * If the platform returns a `type` value not modeled by this SDK version, `itemMetadata`\n * will be an `UnknownMediaItemMetadata` instead, with the raw wire payload preserved on\n * `raw` for inspection.\n */\n itemMetadata: MediaItemMetadata | UnknownMediaItemMetadata;\n}\n\n/**\n * Type-specific metadata for a media item, discriminated by `type`. Narrow on\n * `result.itemMetadata.type` to access variant-specific fields with full IntelliSense.\n *\n * Note: mio currently supports a `streamingVideo` variant internally, but it is not yet exposed\n * on the platform API and is therefore absent here. When the platform API adds it, the variant\n * will be appended here as a non-breaking change.\n */\nexport type MediaItemMetadata =\n | ({ type: \"document\" } & DocumentMediaItemMetadata)\n | ({ type: \"imagery\" } & ImageryMediaItemMetadata)\n | ({ type: \"audio\" } & AudioMediaItemMetadata)\n | ({ type: \"video\" } & VideoMediaItemMetadata)\n | ({ type: \"dicom\" } & DicomMediaItemMetadata)\n | ({ type: \"email\" } & EmailMediaItemMetadata)\n | ({ type: \"model3d\" } & Model3dMediaItemMetadata)\n | ({ type: \"spreadsheet\" } & SpreadsheetMediaItemMetadata)\n | ({ type: \"untyped\" } & UntypedMediaItemMetadata);\n\n/**\n * Fallback variant emitted by the SDK when the platform returns a `MediaItemMetadata.type`\n * value not modeled by this version of `@osdk/foundry.mediasets`. The raw wire payload is\n * preserved on `raw` so callers can inspect it. Bump `@osdk/client` to promote the new\n * variant into `MediaItemMetadata` proper.\n *\n * Distinct from the `untyped` variant of `MediaItemMetadata`, which is a real platform schema\n * type for multimodal media.\n */\nexport interface UnknownMediaItemMetadata {\n type: \"unknown\";\n raw: { type: string; [key: string]: unknown };\n}\n\n// ─── Variant interfaces ──────────────────────────────────────────────────────\n\nexport interface DocumentMediaItemMetadata {\n format: DocumentDecodeFormat;\n pages?: number;\n sizeBytes: number;\n title?: string;\n author?: string;\n}\n\nexport interface ImageryMediaItemMetadata {\n format: ImageryDecodeFormat;\n dimensions?: Dimensions;\n bands: Array<BandInfo>;\n attributes: Record<ImageAttributeDomain, Record<ImageAttributeKey, string>>;\n iccProfile?: string;\n geo?: GeoMetadata;\n pages?: number;\n orientation?: Orientation;\n sizeBytes: number;\n}\n\nexport interface AudioMediaItemMetadata {\n format: AudioDecodeFormat;\n specification: AudioSpecification;\n sizeBytes: number;\n}\n\nexport interface VideoMediaItemMetadata {\n format: VideoDecodeFormat;\n specification: VideoSpecification;\n sizeBytes: number;\n}\n\nexport interface DicomMediaItemMetadata {\n metaInformation: DicomMetaInformation;\n mediaType: DicomMediaType;\n commonDataElements: CommonDicomDataElements;\n otherDataElements: Record<DicomDataElementKey, any>;\n sizeBytes: number;\n}\n\nexport interface EmailMediaItemMetadata {\n format: EmailDecodeFormat;\n sizeBytes: number;\n sender: Array<Mailbox>;\n date: string;\n attachmentCount: number;\n to: Array<MailboxOrGroup>;\n cc: Array<MailboxOrGroup>;\n subject?: string;\n attachments: Array<EmailAttachment>;\n}\n\nexport interface Model3dMediaItemMetadata {\n format: Model3dDecodeFormat;\n modelType: Model3dType;\n sizeBytes: number;\n}\n\nexport interface SpreadsheetMediaItemMetadata {\n format: SpreadsheetDecodeFormat;\n sheetNames: Array<string>;\n sizeBytes: number;\n title?: string;\n author?: string;\n}\n\nexport interface UntypedMediaItemMetadata {\n sizeBytes: number;\n}\n\n// ─── Format enums ────────────────────────────────────────────────────────────\n\nexport type AudioDecodeFormat =\n | \"FLAC\"\n | \"MP2\"\n | \"MP3\"\n | \"MP4\"\n | \"NIST_SPHERE\"\n | \"OGG\"\n | \"WAV\"\n | \"WEBM\";\n\nexport type VideoDecodeFormat = \"MP4\" | \"MKV\" | \"MOV\" | \"TS\";\n\nexport type DocumentDecodeFormat =\n | \"PDF\"\n | \"DOC\"\n | \"DOCX\"\n | \"TXT\"\n | \"PPTX\"\n | \"RTF\";\n\nexport type SpreadsheetDecodeFormat = \"XLSX\";\n\nexport type ImageryDecodeFormat =\n | \"BMP\"\n | \"TIFF\"\n | \"NITF\"\n | \"JP2K\"\n | \"JPG\"\n | \"PNG\"\n | \"WEBP\";\n\nexport type EmailDecodeFormat = \"EML\";\n\nexport type DicomMediaType =\n | \"IMAGE\"\n | \"MULTI_FRAME_IMAGE\"\n | \"VIDEO\"\n | \"STRUCTURED_REPORT\";\n\nexport type Model3dDecodeFormat = \"LAS\" | \"PLY\" | \"OBJ\";\n\nexport type Model3dType = \"POINT_CLOUD\" | \"MESH\";\n\n// ─── Audio / video specification ─────────────────────────────────────────────\n\nexport interface AudioSpecification {\n bitRate: number;\n durationSeconds: number;\n numberOfChannels?: number;\n}\n\nexport interface VideoSpecification {\n bitRate: number;\n durationSeconds: number;\n}\n\n// ─── Imagery support types ───────────────────────────────────────────────────\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n\nexport interface BandInfo {\n dataType?: DataType;\n colorInterpretation?: ColorInterpretation;\n paletteInterpretation?: PaletteInterpretation;\n unitInterpretation?: UnitInterpretation;\n}\n\nexport type DataType =\n | \"UNDEFINED\"\n | \"BYTE\"\n | \"UINT16\"\n | \"INT16\"\n | \"UINT32\"\n | \"INT32\"\n | \"FLOAT32\"\n | \"FLOAT64\"\n | \"COMPLEX_INT16\"\n | \"COMPLEX_INT32\"\n | \"COMPLEX_FLOAT32\"\n | \"COMPLEX_FLOAT64\"\n | \"UINT64\"\n | \"INT64\"\n | \"INT8\";\n\nexport type ColorInterpretation =\n | \"UNDEFINED\"\n | \"GRAY\"\n | \"PALETTE_INDEX\"\n | \"RED\"\n | \"GREEN\"\n | \"BLUE\"\n | \"ALPHA\"\n | \"HUE\"\n | \"SATURATION\"\n | \"LIGHTNESS\"\n | \"CYAN\"\n | \"MAGENTA\"\n | \"YELLOW\"\n | \"BLACK\"\n | \"Y_CB_CR_SPACE_Y\"\n | \"Y_CB_CR_SPACE_CB\"\n | \"Y_CB_CR_SPACE_CR\";\n\nexport type PaletteInterpretation = \"GRAY\" | \"RGB\" | \"RGBA\" | \"CMYK\" | \"HLS\";\n\nexport interface UnitInterpretation {\n unit?: string;\n scale?: number;\n offset?: number;\n}\n\nexport type ImageAttributeDomain = string;\nexport type ImageAttributeKey = string;\n\nexport interface GeoMetadata {\n crs?: CoordinateReferenceSystem;\n geotransform?: AffineTransform;\n gcpInfo?: GcpList;\n gpsData?: GpsMetadata;\n}\n\nexport interface CoordinateReferenceSystem {\n wkt?: string;\n}\n\nexport interface AffineTransform {\n xTranslate?: number;\n xScale?: number;\n xShear?: number;\n yTranslate?: number;\n yShear?: number;\n yScale?: number;\n}\n\nexport interface GcpList {\n gcps: Array<GroundControlPoint>;\n}\n\nexport interface GroundControlPoint {\n pixX?: number;\n pixY?: number;\n projX?: number;\n projY?: number;\n projZ?: number;\n}\n\nexport interface GpsMetadata {\n latitude?: number;\n longitude?: number;\n altitude?: number;\n}\n\nexport interface Orientation {\n rotationAngle?: RotationAngle;\n flipAxis?: FlipAxis;\n}\n\nexport type RotationAngle =\n | \"DEGREE_90\"\n | \"DEGREE_180\"\n | \"DEGREE_270\"\n | \"UNKNOWN\";\n\nexport type FlipAxis = \"HORIZONTAL\" | \"VERTICAL\" | \"UNKNOWN\";\n\n// ─── DICOM support types ─────────────────────────────────────────────────────\n\nexport type DicomMetaInformation = { type: \"v1\" } & DicomMetaInformationV1;\n\nexport interface DicomMetaInformationV1 {\n mediaStorageSop: string;\n mediaStorageSopInstance: string;\n transferSyntax: string;\n}\n\nexport interface CommonDicomDataElements {\n numberFrames?: number;\n modality?: Modality;\n patientId?: string;\n studyId?: string;\n studyUid?: string;\n seriesUid?: string;\n studyTime?: string;\n seriesTime?: string;\n}\n\nexport type DicomDataElementKey = string;\n\nexport type Modality =\n | \"AR\"\n | \"ASMT\"\n | \"AU\"\n | \"BDUS\"\n | \"BI\"\n | \"BMD\"\n | \"CR\"\n | \"CT\"\n | \"CTPROTOCOL\"\n | \"DG\"\n | \"DOC\"\n | \"DX\"\n | \"ECG\"\n | \"EPS\"\n | \"ES\"\n | \"FID\"\n | \"GM\"\n | \"HC\"\n | \"HD\"\n | \"IO\"\n | \"IOL\"\n | \"IVOCT\"\n | \"IVUS\"\n | \"KER\"\n | \"KO\"\n | \"LEN\"\n | \"LS\"\n | \"MG\"\n | \"MR\"\n | \"M3D\"\n | \"NM\"\n | \"OAM\"\n | \"OCT\"\n | \"OP\"\n | \"OPM\"\n | \"OPT\"\n | \"OPTBSV\"\n | \"OPTENF\"\n | \"OPV\"\n | \"OSS\"\n | \"OT\"\n | \"PLAN\"\n | \"PR\"\n | \"PT\"\n | \"PX\"\n | \"REG\"\n | \"RESP\"\n | \"RF\"\n | \"RG\"\n | \"RTDOSE\"\n | \"RTIMAGE\"\n | \"RTINTENT\"\n | \"RTPLAN\"\n | \"RTRAD\"\n | \"RTRECORD\"\n | \"RTSEGANN\"\n | \"RTSTRUCT\"\n | \"RWV\"\n | \"SEG\"\n | \"SM\"\n | \"SMR\"\n | \"SR\"\n | \"SRF\"\n | \"STAIN\"\n | \"TEXTUREMAP\"\n | \"TG\"\n | \"US\"\n | \"VA\"\n | \"XA\"\n | \"XC\"\n | \"AS\"\n | \"CD\"\n | \"CF\"\n | \"CP\"\n | \"CS\"\n | \"DD\"\n | \"DF\"\n | \"DM\"\n | \"DS\"\n | \"EC\"\n | \"FA\"\n | \"FS\"\n | \"LP\"\n | \"MA\"\n | \"MS\"\n | \"OPR\"\n | \"ST\"\n | \"VF\";\n\n// ─── Email support types ─────────────────────────────────────────────────────\n\nexport interface Mailbox {\n displayName?: string;\n emailAddress: string;\n}\n\nexport interface MailboxWrapper {\n mailbox: Mailbox;\n}\n\nexport interface Group {\n groupName: string;\n mailboxes: Array<Mailbox>;\n}\n\nexport interface GroupWrapper {\n group: Group;\n}\n\nexport type MailboxOrGroup =\n | ({ type: \"mailbox\" } & MailboxWrapper)\n | ({ type: \"group\" } & GroupWrapper);\n\nexport interface EmailAttachment {\n attachmentIndex: number;\n fileName?: string;\n mimeType: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Media.js","names":[],"sources":["Media.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface Media {\n /**\n * Fetches metadata for media reference property\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const mediaMetadata = await equipment.trainingMaterial?.fetchMetadata();\n * console.log(mediaMetadata?.mediaType, mediaMetadata?.sizeBytes, mediaMetadata?.path);\n * ```\n * @returns the media metadata, including media type, size, and (when available) path\n */\n fetchMetadata(): Promise<MediaMetadata>;\n /**\n * Fetches type-specific metadata for this media item, i.e. page count for documents,\n * dimensions for imagery, duration for audio/video, etc.\n *\n * Every `Media` returned by this SDK implements this method.\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const fullMetadata = await equipment.trainingMaterial?.fetchFullMetadata?.();\n * if (fullMetadata?.itemMetadata.type === \"document\") {\n * const pageCount = fullMetadata.itemMetadata.pages;\n * }\n * ```\n * @returns a `MediaFullMetadata` whose `itemMetadata` narrows on `itemMetadata.type` to expose\n * schema-specific fields\n */\n fetchFullMetadata?(): Promise<MediaFullMetadata>;\n /**\n * Fetches content of a media reference property\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const mediaContent = await equipment.trainingMaterial?.fetchContents();\n * if (mediaContent?.ok) {\n * const data = await mediaContent.blob();\n * }\n * ```\n * @returns a `Response` whose body contains the media item's binary contents\n */\n fetchContents(): Promise<Response>;\n /**\n * Returns the media reference\n * @example\n * ```ts\n * const equipment = await client(Equipment).fetchOne(12345);\n * const mediaReference = equipment.trainingMaterial?.getMediaReference();\n * ```\n * @returns the underlying `MediaReference` identifying this media item in Foundry\n */\n getMediaReference(): MediaReference;\n getMediaSourceLocation?(): MediaPropertyLocation;\n}\n\n/**\n * Location of a media property on an object.\n */\nexport interface MediaPropertyLocation {\n objectType: string;\n primaryKey: string | number;\n propertyName: string;\n}\n\n/**\n * Unique identifier of a media item in Foundry.\n */\nexport interface MediaReference {\n mimeType: string;\n reference: {\n type: \"mediaSetViewItem\";\n mediaSetViewItem: {\n mediaItemRid: string;\n mediaSetRid: string;\n mediaSetViewRid: string;\n token?: string;\n /** @deprecated Use `token` instead */\n readToken?: string;\n };\n };\n}\n\n/**\n * Object for uploading Media\n */\nexport interface MediaUpload {\n readonly fileName: string;\n readonly data: Blob;\n}\n\n/**\n * Metadata of a media item\n */\nexport interface MediaMetadata {\n path?: string;\n sizeBytes: number;\n mediaType: string;\n}\n\n/**\n * Metadata for a media item, returned by `Media.fetchFullMetadata`.\n */\nexport interface MediaFullMetadata {\n /**\n * Type-specific metadata. Narrow on `itemMetadata.type` to access variant-specific fields.\n *\n * If the platform returns a `type` value not modeled by this SDK version, `itemMetadata`\n * will be an `UnknownMediaItemMetadata` instead, with the raw wire payload preserved on\n * `raw` for inspection.\n */\n itemMetadata: MediaItemMetadata | UnknownMediaItemMetadata;\n}\n\n/**\n * Type-specific metadata for a media item, discriminated by `type`. Narrow on\n * `result.itemMetadata.type` to access variant-specific fields with full IntelliSense.\n *\n * Note: mio currently supports a `streamingVideo` variant internally, but it is not yet exposed\n * on the platform API and is therefore absent here. When the platform API adds it, the variant\n * will be appended here as a non-breaking change.\n */\nexport type MediaItemMetadata =\n | ({ type: \"document\" } & DocumentMediaItemMetadata)\n | ({ type: \"imagery\" } & ImageryMediaItemMetadata)\n | ({ type: \"audio\" } & AudioMediaItemMetadata)\n | ({ type: \"video\" } & VideoMediaItemMetadata)\n | ({ type: \"dicom\" } & DicomMediaItemMetadata)\n | ({ type: \"email\" } & EmailMediaItemMetadata)\n | ({ type: \"model3d\" } & Model3dMediaItemMetadata)\n | ({ type: \"spreadsheet\" } & SpreadsheetMediaItemMetadata)\n | ({ type: \"untyped\" } & UntypedMediaItemMetadata);\n\n/**\n * Fallback variant emitted by the SDK when the platform returns a `MediaItemMetadata.type`\n * value not modeled by this version of `@osdk/foundry.mediasets`. The raw wire payload is\n * preserved on `raw` so callers can inspect it. Bump `@osdk/client` to promote the new\n * variant into `MediaItemMetadata` proper.\n *\n * Distinct from the `untyped` variant of `MediaItemMetadata`, which is a real platform schema\n * type for multimodal media.\n */\nexport interface UnknownMediaItemMetadata {\n type: \"unknown\";\n raw: { type: string; [key: string]: unknown };\n}\n\n// ─── Variant interfaces ──────────────────────────────────────────────────────\n\nexport interface DocumentMediaItemMetadata {\n format: DocumentDecodeFormat;\n pages?: number;\n sizeBytes: number;\n title?: string;\n author?: string;\n}\n\nexport interface ImageryMediaItemMetadata {\n format: ImageryDecodeFormat;\n dimensions?: Dimensions;\n bands: Array<BandInfo>;\n attributes: Record<ImageAttributeDomain, Record<ImageAttributeKey, string>>;\n iccProfile?: string;\n geo?: GeoMetadata;\n pages?: number;\n orientation?: Orientation;\n sizeBytes: number;\n}\n\nexport interface AudioMediaItemMetadata {\n format: AudioDecodeFormat;\n specification: AudioSpecification;\n sizeBytes: number;\n}\n\nexport interface VideoMediaItemMetadata {\n format: VideoDecodeFormat;\n specification: VideoSpecification;\n sizeBytes: number;\n}\n\nexport interface DicomMediaItemMetadata {\n metaInformation: DicomMetaInformation;\n mediaType: DicomMediaType;\n commonDataElements: CommonDicomDataElements;\n otherDataElements: Record<DicomDataElementKey, any>;\n sizeBytes: number;\n}\n\nexport interface EmailMediaItemMetadata {\n format: EmailDecodeFormat;\n sizeBytes: number;\n sender: Array<Mailbox>;\n date: string;\n attachmentCount: number;\n to: Array<MailboxOrGroup>;\n cc: Array<MailboxOrGroup>;\n subject?: string;\n attachments: Array<EmailAttachment>;\n}\n\nexport interface Model3dMediaItemMetadata {\n format: Model3dDecodeFormat;\n modelType: Model3dType;\n sizeBytes: number;\n}\n\nexport interface SpreadsheetMediaItemMetadata {\n format: SpreadsheetDecodeFormat;\n sheetNames: Array<string>;\n sizeBytes: number;\n title?: string;\n author?: string;\n}\n\nexport interface UntypedMediaItemMetadata {\n sizeBytes: number;\n}\n\n// ─── Format enums ────────────────────────────────────────────────────────────\n\nexport type AudioDecodeFormat =\n | \"FLAC\"\n | \"MP2\"\n | \"MP3\"\n | \"MP4\"\n | \"NIST_SPHERE\"\n | \"OGG\"\n | \"WAV\"\n | \"WEBM\";\n\nexport type VideoDecodeFormat = \"MP4\" | \"MKV\" | \"MOV\" | \"TS\";\n\nexport type DocumentDecodeFormat =\n | \"PDF\"\n | \"DOC\"\n | \"DOCX\"\n | \"TXT\"\n | \"PPTX\"\n | \"RTF\";\n\nexport type SpreadsheetDecodeFormat = \"XLSX\";\n\nexport type ImageryDecodeFormat =\n | \"BMP\"\n | \"TIFF\"\n | \"NITF\"\n | \"JP2K\"\n | \"JPG\"\n | \"PNG\"\n | \"WEBP\";\n\nexport type EmailDecodeFormat = \"EML\";\n\nexport type DicomMediaType =\n | \"IMAGE\"\n | \"MULTI_FRAME_IMAGE\"\n | \"VIDEO\"\n | \"STRUCTURED_REPORT\";\n\nexport type Model3dDecodeFormat = \"LAS\" | \"PLY\" | \"OBJ\";\n\nexport type Model3dType = \"POINT_CLOUD\" | \"MESH\";\n\n// ─── Audio / video specification ─────────────────────────────────────────────\n\nexport interface AudioSpecification {\n bitRate: number;\n durationSeconds: number;\n numberOfChannels?: number;\n}\n\nexport interface VideoSpecification {\n bitRate: number;\n durationSeconds: number;\n}\n\n// ─── Imagery support types ───────────────────────────────────────────────────\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n\nexport interface BandInfo {\n dataType?: DataType;\n colorInterpretation?: ColorInterpretation;\n paletteInterpretation?: PaletteInterpretation;\n unitInterpretation?: UnitInterpretation;\n}\n\nexport type DataType =\n | \"UNDEFINED\"\n | \"BYTE\"\n | \"UINT16\"\n | \"INT16\"\n | \"UINT32\"\n | \"INT32\"\n | \"FLOAT32\"\n | \"FLOAT64\"\n | \"COMPLEX_INT16\"\n | \"COMPLEX_INT32\"\n | \"COMPLEX_FLOAT32\"\n | \"COMPLEX_FLOAT64\"\n | \"UINT64\"\n | \"INT64\"\n | \"INT8\";\n\nexport type ColorInterpretation =\n | \"UNDEFINED\"\n | \"GRAY\"\n | \"PALETTE_INDEX\"\n | \"RED\"\n | \"GREEN\"\n | \"BLUE\"\n | \"ALPHA\"\n | \"HUE\"\n | \"SATURATION\"\n | \"LIGHTNESS\"\n | \"CYAN\"\n | \"MAGENTA\"\n | \"YELLOW\"\n | \"BLACK\"\n | \"Y_CB_CR_SPACE_Y\"\n | \"Y_CB_CR_SPACE_CB\"\n | \"Y_CB_CR_SPACE_CR\";\n\nexport type PaletteInterpretation = \"GRAY\" | \"RGB\" | \"RGBA\" | \"CMYK\" | \"HLS\";\n\nexport interface UnitInterpretation {\n unit?: string;\n scale?: number;\n offset?: number;\n}\n\nexport type ImageAttributeDomain = string;\nexport type ImageAttributeKey = string;\n\nexport interface GeoMetadata {\n crs?: CoordinateReferenceSystem;\n geotransform?: AffineTransform;\n gcpInfo?: GcpList;\n gpsData?: GpsMetadata;\n}\n\nexport interface CoordinateReferenceSystem {\n wkt?: string;\n}\n\nexport interface AffineTransform {\n xTranslate?: number;\n xScale?: number;\n xShear?: number;\n yTranslate?: number;\n yShear?: number;\n yScale?: number;\n}\n\nexport interface GcpList {\n gcps: Array<GroundControlPoint>;\n}\n\nexport interface GroundControlPoint {\n pixX?: number;\n pixY?: number;\n projX?: number;\n projY?: number;\n projZ?: number;\n}\n\nexport interface GpsMetadata {\n latitude?: number;\n longitude?: number;\n altitude?: number;\n}\n\nexport interface Orientation {\n rotationAngle?: RotationAngle;\n flipAxis?: FlipAxis;\n}\n\nexport type RotationAngle =\n | \"DEGREE_90\"\n | \"DEGREE_180\"\n | \"DEGREE_270\"\n | \"UNKNOWN\";\n\nexport type FlipAxis = \"HORIZONTAL\" | \"VERTICAL\" | \"UNKNOWN\";\n\n// ─── DICOM support types ─────────────────────────────────────────────────────\n\nexport type DicomMetaInformation = { type: \"v1\" } & DicomMetaInformationV1;\n\nexport interface DicomMetaInformationV1 {\n mediaStorageSop: string;\n mediaStorageSopInstance: string;\n transferSyntax: string;\n}\n\nexport interface CommonDicomDataElements {\n numberFrames?: number;\n modality?: Modality;\n patientId?: string;\n studyId?: string;\n studyUid?: string;\n seriesUid?: string;\n studyTime?: string;\n seriesTime?: string;\n}\n\nexport type DicomDataElementKey = string;\n\nexport type Modality =\n | \"AR\"\n | \"ASMT\"\n | \"AU\"\n | \"BDUS\"\n | \"BI\"\n | \"BMD\"\n | \"CR\"\n | \"CT\"\n | \"CTPROTOCOL\"\n | \"DG\"\n | \"DOC\"\n | \"DX\"\n | \"ECG\"\n | \"EPS\"\n | \"ES\"\n | \"FID\"\n | \"GM\"\n | \"HC\"\n | \"HD\"\n | \"IO\"\n | \"IOL\"\n | \"IVOCT\"\n | \"IVUS\"\n | \"KER\"\n | \"KO\"\n | \"LEN\"\n | \"LS\"\n | \"MG\"\n | \"MR\"\n | \"M3D\"\n | \"NM\"\n | \"OAM\"\n | \"OCT\"\n | \"OP\"\n | \"OPM\"\n | \"OPT\"\n | \"OPTBSV\"\n | \"OPTENF\"\n | \"OPV\"\n | \"OSS\"\n | \"OT\"\n | \"PLAN\"\n | \"PR\"\n | \"PT\"\n | \"PX\"\n | \"REG\"\n | \"RESP\"\n | \"RF\"\n | \"RG\"\n | \"RTDOSE\"\n | \"RTIMAGE\"\n | \"RTINTENT\"\n | \"RTPLAN\"\n | \"RTRAD\"\n | \"RTRECORD\"\n | \"RTSEGANN\"\n | \"RTSTRUCT\"\n | \"RWV\"\n | \"SEG\"\n | \"SM\"\n | \"SMR\"\n | \"SR\"\n | \"SRF\"\n | \"STAIN\"\n | \"TEXTUREMAP\"\n | \"TG\"\n | \"US\"\n | \"VA\"\n | \"XA\"\n | \"XC\"\n | \"AS\"\n | \"CD\"\n | \"CF\"\n | \"CP\"\n | \"CS\"\n | \"DD\"\n | \"DF\"\n | \"DM\"\n | \"DS\"\n | \"EC\"\n | \"FA\"\n | \"FS\"\n | \"LP\"\n | \"MA\"\n | \"MS\"\n | \"OPR\"\n | \"ST\"\n | \"VF\";\n\n// ─── Email support types ─────────────────────────────────────────────────────\n\nexport interface Mailbox {\n displayName?: string;\n emailAddress: string;\n}\n\nexport interface MailboxWrapper {\n mailbox: Mailbox;\n}\n\nexport interface Group {\n groupName: string;\n mailboxes: Array<Mailbox>;\n}\n\nexport interface GroupWrapper {\n group: Group;\n}\n\nexport type MailboxOrGroup =\n | ({ type: \"mailbox\" } & MailboxWrapper)\n | ({ type: \"group\" } & GroupWrapper);\n\nexport interface EmailAttachment {\n attachmentIndex: number;\n fileName?: string;\n mimeType: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -14,10 +14,17 @@ export interface Media {
|
|
|
14
14
|
* Fetches type-specific metadata for this media item, i.e. page count for documents,
|
|
15
15
|
* dimensions for imagery, duration for audio/video, etc.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* Every `Media` returned by this SDK implements this method.
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const equipment = await client(Equipment).fetchOne(12345);
|
|
21
|
+
* const fullMetadata = await equipment.trainingMaterial?.fetchFullMetadata?.();
|
|
22
|
+
* if (fullMetadata?.itemMetadata.type === "document") {
|
|
23
|
+
* const pageCount = fullMetadata.itemMetadata.pages;
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
* @returns a `MediaFullMetadata` whose `itemMetadata` narrows on `itemMetadata.type` to expose
|
|
27
|
+
* schema-specific fields
|
|
21
28
|
*/
|
|
22
29
|
fetchFullMetadata?(): Promise<MediaFullMetadata>;
|
|
23
30
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,iBAAiB,MAAM;;;;;;;;;;;CAWrB,iBAAiB,QAAQ
|
|
1
|
+
{"mappings":"AAgBA,iBAAiB,MAAM;;;;;;;;;;;CAWrB,iBAAiB,QAAQ;;;;;;;;;;;;;;;;;CAiBzB,sBAAsB,QAAQ;;;;;;;;;;;;;CAa9B,iBAAiB,QAAQ;;;;;;;;;;CAUzB,qBAAqB;CACrB,2BAA2B;AAC5B;;;;AAKD,iBAAiB,sBAAsB;CACrC;CACA;CACA;AACD;;;;AAKD,iBAAiB,eAAe;CAC9B;CACA,WAAW;EACT,MAAM;EACN,kBAAkB;GAChB;GACA;GACA;GACA;;GAEA;EACD;CACF;AACF;;;;AAKD,iBAAiB,YAAY;UAClB;UACA,MAAM;AAChB;;;;AAKD,iBAAiB,cAAc;CAC7B;CACA;CACA;AACD;;;;AAKD,iBAAiB,kBAAkB;;;;;;;;CAQjC,cAAc,oBAAoB;AACnC;;;;;;;;;AAUD,YAAY,qBACP;CAAE,MAAM;AAAY,IAAG,8BACvB;CAAE,MAAM;AAAW,IAAG,6BACtB;CAAE,MAAM;AAAS,IAAG,2BACpB;CAAE,MAAM;AAAS,IAAG,2BACpB;CAAE,MAAM;AAAS,IAAG,2BACpB;CAAE,MAAM;AAAS,IAAG,2BACpB;CAAE,MAAM;AAAW,IAAG,6BACtB;CAAE,MAAM;AAAe,IAAG,iCAC1B;CAAE,MAAM;AAAW,IAAG;;;;;;;;;;AAW3B,iBAAiB,yBAAyB;CACxC,MAAM;CACN,KAAK;EAAE;;CAAsC;AAC9C;AAID,iBAAiB,0BAA0B;CACzC,QAAQ;CACR;CACA;CACA;CACA;AACD;AAED,iBAAiB,yBAAyB;CACxC,QAAQ;CACR,aAAa;CACb,OAAO,MAAM;CACb,YAAY,OAAO,sBAAsB,OAAO;CAChD;CACA,MAAM;CACN;CACA,cAAc;CACd;AACD;AAED,iBAAiB,uBAAuB;CACtC,QAAQ;CACR,eAAe;CACf;AACD;AAED,iBAAiB,uBAAuB;CACtC,QAAQ;CACR,eAAe;CACf;AACD;AAED,iBAAiB,uBAAuB;CACtC,iBAAiB;CACjB,WAAW;CACX,oBAAoB;CACpB,mBAAmB,OAAO;CAC1B;AACD;AAED,iBAAiB,uBAAuB;CACtC,QAAQ;CACR;CACA,QAAQ,MAAM;CACd;CACA;CACA,IAAI,MAAM;CACV,IAAI,MAAM;CACV;CACA,aAAa,MAAM;AACpB;AAED,iBAAiB,yBAAyB;CACxC,QAAQ;CACR,WAAW;CACX;AACD;AAED,iBAAiB,6BAA6B;CAC5C,QAAQ;CACR,YAAY;CACZ;CACA;CACA;AACD;AAED,iBAAiB,yBAAyB;CACxC;AACD;AAID,YAAY,oBACR,SACA,QACA,QACA,QACA,gBACA,QACA,QACA;AAEJ,YAAY,oBAAoB,QAAQ,QAAQ,QAAQ;AAExD,YAAY,uBACR,QACA,QACA,SACA,QACA,SACA;AAEJ,YAAY,0BAA0B;AAEtC,YAAY,sBACR,QACA,SACA,SACA,SACA,QACA,QACA;AAEJ,YAAY,oBAAoB;AAEhC,YAAY,iBACR,UACA,sBACA,UACA;AAEJ,YAAY,sBAAsB,QAAQ,QAAQ;AAElD,YAAY,cAAc,gBAAgB;AAI1C,iBAAiB,mBAAmB;CAClC;CACA;CACA;AACD;AAED,iBAAiB,mBAAmB;CAClC;CACA;AACD;AAID,iBAAiB,WAAW;CAC1B;CACA;AACD;AAED,iBAAiB,SAAS;CACxB,WAAW;CACX,sBAAsB;CACtB,wBAAwB;CACxB,qBAAqB;AACtB;AAED,YAAY,WACR,cACA,SACA,WACA,UACA,WACA,UACA,YACA,YACA,kBACA,kBACA,oBACA,oBACA,WACA,UACA;AAEJ,YAAY,sBACR,cACA,SACA,kBACA,QACA,UACA,SACA,UACA,QACA,eACA,cACA,SACA,YACA,WACA,UACA,oBACA,qBACA;AAEJ,YAAY,wBAAwB,SAAS,QAAQ,SAAS,SAAS;AAEvE,iBAAiB,mBAAmB;CAClC;CACA;CACA;AACD;AAED,YAAY;AACZ,YAAY;AAEZ,iBAAiB,YAAY;CAC3B,MAAM;CACN,eAAe;CACf,UAAU;CACV,UAAU;AACX;AAED,iBAAiB,0BAA0B;CACzC;AACD;AAED,iBAAiB,gBAAgB;CAC/B;CACA;CACA;CACA;CACA;CACA;AACD;AAED,iBAAiB,QAAQ;CACvB,MAAM,MAAM;AACb;AAED,iBAAiB,mBAAmB;CAClC;CACA;CACA;CACA;CACA;AACD;AAED,iBAAiB,YAAY;CAC3B;CACA;CACA;AACD;AAED,iBAAiB,YAAY;CAC3B,gBAAgB;CAChB,WAAW;AACZ;AAED,YAAY,gBACR,cACA,eACA,eACA;AAEJ,YAAY,WAAW,eAAe,aAAa;AAInD,YAAY,uBAAuB;CAAE,MAAM;AAAM,IAAG;AAEpD,iBAAiB,uBAAuB;CACtC;CACA;CACA;AACD;AAED,iBAAiB,wBAAwB;CACvC;CACA,WAAW;CACX;CACA;CACA;CACA;CACA;CACA;AACD;AAED,YAAY;AAEZ,YAAY,WACR,OACA,SACA,OACA,SACA,OACA,QACA,OACA,OACA,eACA,OACA,QACA,OACA,QACA,QACA,OACA,QACA,OACA,OACA,OACA,OACA,QACA,UACA,SACA,QACA,OACA,QACA,OACA,OACA,OACA,QACA,OACA,QACA,QACA,OACA,QACA,QACA,WACA,WACA,QACA,QACA,OACA,SACA,OACA,OACA,OACA,QACA,SACA,OACA,OACA,WACA,YACA,aACA,WACA,UACA,aACA,aACA,aACA,QACA,QACA,OACA,QACA,OACA,QACA,UACA,eACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QACA,OACA;AAIJ,iBAAiB,QAAQ;CACvB;CACA;AACD;AAED,iBAAiB,eAAe;CAC9B,SAAS;AACV;AAED,iBAAiB,MAAM;CACrB;CACA,WAAW,MAAM;AAClB;AAED,iBAAiB,aAAa;CAC5B,OAAO;AACR;AAED,YAAY,kBACP;CAAE,MAAM;AAAW,IAAG,mBACtB;CAAE,MAAM;AAAS,IAAG;AAEzB,iBAAiB,gBAAgB;CAC/B;CACA;CACA;AACD","names":[],"sources":["../../../src/object/Media.ts"],"version":3,"file":"Media.d.ts"}
|