Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support getting metadata and contents for a Media reference property #1040

Merged
merged 20 commits into from
Jan 21, 2025

Conversation

mnayan
Copy link
Contributor

@mnayan mnayan commented Dec 6, 2024

Adds support to get contents and metadata for a media reference property.

Introduces Media type with getMetadata() and getContent() methods and necessary conversion methods from wire2SDK and tests.

@mnayan mnayan changed the title Support to get metadata and contents for a Media reference property Support getting metadata and contents for a Media reference property Dec 6, 2024
@mnayan mnayan marked this pull request as ready for review December 6, 2024 16:23
Copy link
Contributor

@ssanjay1 ssanjay1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good so far on quick skim, can we also add an E2E test hitting an actual stack to make sure things are working?

@@ -19,14 +19,8 @@ import type {
TimeSeriesProperty,
TimeSeriesQuery,
} from "@osdk/api";
import { TimeseriesDurationMapping } from "@osdk/api";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just deleting unused stuff here right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup.

Meghan Nayan added 2 commits December 9, 2024 09:02
@mnayan mnayan requested a review from ssanjay1 December 11, 2024 18:50
await this.#client.ontologyRid,
...this.#triplet,
{
preview: true, // TODO: Can turn this back off when backend is no longer in beta.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ssanjay1 - setting preview=true by default here instead of passing this on to the user (not sure it makes sense for user to know about this). Let me know if that makes sense.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup makes sense

@ssanjay1
Copy link
Contributor

This can maybe be a FLUP, but do we want to expose any of this information that comes over the wire?
{"mimeType":"application/pdf","reference":{"type":"mediaSetViewItem","mediaSetViewItem":{"mediaSetRid":"ri.mio.main.media-set.4153d42f-ca4b-4e42-8ca5-8e6aa7edb642","mediaSetViewRid":"ri.mio.main.view.82a798ad-d637-4595-acc6-987bcf16629b","mediaItemRid":"ri.mio.main.media-item.001ec98b-1620-4814-9e17-8e9c4e536225"}}}

Like for actions that accept a media reference, I'd imagine they'd need some combination of these rids right?

@mnayan
Copy link
Contributor Author

mnayan commented Jan 17, 2025

This can maybe be a FLUP, but do we want to expose any of this information that comes over the wire? {"mimeType":"application/pdf","reference":{"type":"mediaSetViewItem","mediaSetViewItem":{"mediaSetRid":"ri.mio.main.media-set.4153d42f-ca4b-4e42-8ca5-8e6aa7edb642","mediaSetViewRid":"ri.mio.main.view.82a798ad-d637-4595-acc6-987bcf16629b","mediaItemRid":"ri.mio.main.media-item.001ec98b-1620-4814-9e17-8e9c4e536225"}}}

Like for actions that accept a media reference, I'd imagine they'd need some combination of these rids right?

Yup, planning to do this in the follow-up PR that handles the upload workflow.

@leonz
Copy link

leonz commented Jan 17, 2025

Like for actions that accept a media reference, I'd imagine they'd need some combination of these rids right?

In fact, actions should accept that entire json blob (a media reference) as is.

@mnayan mnayan requested a review from ssanjay1 January 17, 2025 22:03
@mnayan mnayan merged commit 62c1d63 into main Jan 21, 2025
8 checks passed
@mnayan mnayan deleted the mnayan/feat/media-read-support branch January 21, 2025 19:17
@nihalbhatnagar
Copy link
Contributor

nihalbhatnagar commented Jan 21, 2025

Late approval on my end as well- excited to see the upload pr! Glad we were able to have an external contribution 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants