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

feat(js): upload and update examples multipart in JS #1216

Merged
merged 26 commits into from
Dec 11, 2024

Conversation

isahers1
Copy link
Contributor

No description provided.

@isahers1 isahers1 changed the title upset examples multipart in JS upsert examples multipart in JS Nov 14, 2024
Copy link
Contributor

@agola11 agola11 left a comment

Choose a reason for hiding this comment

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

some minor comments. approving to unblock

js/src/client.ts Outdated Show resolved Hide resolved
js/src/tests/client.test.ts Outdated Show resolved Hide resolved
@isahers1 isahers1 changed the title upsert examples multipart in JS upload examples multipart in JS Dec 9, 2024
@isahers1 isahers1 changed the title upload examples multipart in JS upload and update examples multipart in JS Dec 10, 2024
js/src/client.ts Outdated
example.attachments = attachmentsArray.reduce(
(acc, { key, value }) => {
if (value.reader != null) {
acc[key.startsWith("attachment.") ? key.slice(11) : key] = {
Copy link
Contributor

Choose a reason for hiding this comment

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

don't use 11 here. Use len("attachment.") or remove the prefix

js/src/client.ts Outdated Show resolved Hide resolved
js/src/client.ts Outdated Show resolved Hide resolved
js/src/client.ts Outdated Show resolved Hide resolved
js/src/client.ts Outdated Show resolved Hide resolved
* @param updates List of ExampleUpdateWithAttachments objects to upsert
* @returns Promise with the update response
*/
public async updateExamplesMultipart(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we really naming a public API this?

Why not just updateExamples?

js/src/client.ts Show resolved Hide resolved
* @param uploads List of ExampleUploadWithAttachments objects to upload
* @returns Promise with the upload response
*/
public async uploadExamplesMultipart(
Copy link
Collaborator

Choose a reason for hiding this comment

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

See above

@jacoblee93 jacoblee93 changed the title upload and update examples multipart in JS feat(js): upload and update examples multipart in JS Dec 11, 2024
@isahers1 isahers1 merged commit 8c8afaf into main Dec 11, 2024
12 checks passed
@isahers1 isahers1 deleted the isaac/upsertexamplesmultipartjs branch December 11, 2024 15:25
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.

3 participants