Skip to content

Commit

Permalink
fix(notes): fixing notes typescript 5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
bassrock committed Jan 2, 2025
1 parent 7076995 commit 2d5e4d9
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 0 deletions.
102 changes: 102 additions & 0 deletions servers/braze-content-proxy/src/generated/graphql/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,39 @@ export type CreateNoteFromQuoteInput = {
title?: InputMaybe<Scalars['String']['input']>;
};

/**
* Input to create a new Note seeded with copied content from a page.
* The entire content becomes editable and is not able to be "reattached"
* like a traditional highlight.
*/
export type CreateNoteFromQuoteMarkdownInput = {
/**
* When this note was created. If not provided, defaults to server time upon
* receiving request.
*/
createdAt?: InputMaybe<Scalars['ISOString']['input']>;
/**
* Client-provided UUID for the new Note.
* If not provided, will be generated on the server.
*/
id?: InputMaybe<Scalars['ID']['input']>;
/**
* Commonmark Markdown document, which contains the formatted
* snipped text. This is used to seed the initial Note
* document state, and will become editable.
*/
quote: Scalars['Markdown']['input'];
/**
* The Web Resource where the quote is taken from.
* This should always be sent by the client where possible,
* but in some cases (e.g. copying from mobile apps) there may
* not be an accessible source url.
*/
source?: InputMaybe<Scalars['ValidUrl']['input']>;
/** Optional title for this Note */
title?: InputMaybe<Scalars['String']['input']>;
};

/** Input to create a new Note */
export type CreateNoteInput = {
/**
Expand All @@ -685,6 +718,29 @@ export type CreateNoteInput = {
title?: InputMaybe<Scalars['String']['input']>;
};

/**
* Input to create a new Note with markdown-formatted
* content string.
*/
export type CreateNoteMarkdownInput = {
/**
* When this note was created. If not provided, defaults to server time upon
* receiving request.
*/
createdAt?: InputMaybe<Scalars['ISOString']['input']>;
/** The document content in Commonmark Markdown. */
docMarkdown: Scalars['Markdown']['input'];
/**
* Client-provided UUID for the new Note.
* If not provided, will be generated on the server.
*/
id?: InputMaybe<Scalars['ID']['input']>;
/** Optional URL to link this Note to. */
source?: InputMaybe<Scalars['ValidUrl']['input']>;
/** Optional title for this Note */
title?: InputMaybe<Scalars['String']['input']>;
};

/** Input data for creating a Shareable List. */
export type CreateShareableListInput = {
description?: InputMaybe<Scalars['String']['input']>;
Expand Down Expand Up @@ -786,6 +842,19 @@ export type EditNoteContentInput = {
updatedAt?: InputMaybe<Scalars['ISOString']['input']>;
};

/**
* Input for editing the content of a Note (user-generated),
* providing the content as a Markdown-formatted string.
*/
export type EditNoteContentMarkdownInput = {
/** Commonmark Markdown string representing the document content. */
docMarkdown: Scalars['Markdown']['input'];
/** The ID of the note to edit */
noteId: Scalars['ID']['input'];
/** The time this update was made (defaults to server time) */
updatedAt?: InputMaybe<Scalars['ISOString']['input']>;
};

export type EditNoteTitleInput = {
/** The ID of the note to edit */
id: Scalars['ID']['input'];
Expand Down Expand Up @@ -1309,6 +1378,13 @@ export type Mutation = {
* selected by a user.
*/
createNoteFromQuote: Note;
/**
* Create a new note, with a pre-populated block that contains the quoted and cited text
* selected by a user.
*/
createNoteFromQuoteMarkdown: Note;
/** Create a new note, optionally with title and markdown content */
createNoteMarkdown: Note;
/** Create new highlight note. Returns the data for the created Highlight note. */
createSavedItemHighlightNote?: Maybe<HighlightNote>;
/** Create new highlight annotation(s). Returns the data for the created Highlight object(s). */
Expand Down Expand Up @@ -1380,6 +1456,14 @@ export type Mutation = {
* errors array.
*/
editNoteContent?: Maybe<Note>;
/**
* Edit the content of a Note, providing a markdown document instead
* of a Prosemirror JSON.
* If the Note does not exist or is inaccessible for the current user,
* response will be null and a NOT_FOUND error will be included in the
* errors array.
*/
editNoteContentMarkdown?: Maybe<Note>;
/**
* Edit the title of a Note.
* If the Note does not exist or is inaccessible for the current user,
Expand Down Expand Up @@ -1646,6 +1730,18 @@ export type MutationCreateNoteFromQuoteArgs = {
};


/** Default Mutation Type */
export type MutationCreateNoteFromQuoteMarkdownArgs = {
input: CreateNoteFromQuoteMarkdownInput;
};


/** Default Mutation Type */
export type MutationCreateNoteMarkdownArgs = {
input: CreateNoteMarkdownInput;
};


/** Default Mutation Type */
export type MutationCreateSavedItemHighlightNoteArgs = {
id: Scalars['ID']['input'];
Expand Down Expand Up @@ -1754,6 +1850,12 @@ export type MutationEditNoteContentArgs = {
};


/** Default Mutation Type */
export type MutationEditNoteContentMarkdownArgs = {
input: EditNoteContentMarkdownInput;
};


/** Default Mutation Type */
export type MutationEditNoteTitleArgs = {
input: EditNoteTitleInput;
Expand Down
1 change: 1 addition & 0 deletions servers/notes-api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"sourceRoot": "",
"strict": true,
"resolveJsonModule": true,
"strictBuiltinIteratorReturn": false,
"lib": [
"es2019",
"es2020.bigint",
Expand Down
102 changes: 102 additions & 0 deletions servers/v3-proxy-api/src/generated/graphql/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,39 @@ export type CreateNoteFromQuoteInput = {
title?: InputMaybe<Scalars['String']['input']>;
};

/**
* Input to create a new Note seeded with copied content from a page.
* The entire content becomes editable and is not able to be "reattached"
* like a traditional highlight.
*/
export type CreateNoteFromQuoteMarkdownInput = {
/**
* When this note was created. If not provided, defaults to server time upon
* receiving request.
*/
createdAt?: InputMaybe<Scalars['ISOString']['input']>;
/**
* Client-provided UUID for the new Note.
* If not provided, will be generated on the server.
*/
id?: InputMaybe<Scalars['ID']['input']>;
/**
* Commonmark Markdown document, which contains the formatted
* snipped text. This is used to seed the initial Note
* document state, and will become editable.
*/
quote: Scalars['Markdown']['input'];
/**
* The Web Resource where the quote is taken from.
* This should always be sent by the client where possible,
* but in some cases (e.g. copying from mobile apps) there may
* not be an accessible source url.
*/
source?: InputMaybe<Scalars['ValidUrl']['input']>;
/** Optional title for this Note */
title?: InputMaybe<Scalars['String']['input']>;
};

/** Input to create a new Note */
export type CreateNoteInput = {
/**
Expand All @@ -685,6 +718,29 @@ export type CreateNoteInput = {
title?: InputMaybe<Scalars['String']['input']>;
};

/**
* Input to create a new Note with markdown-formatted
* content string.
*/
export type CreateNoteMarkdownInput = {
/**
* When this note was created. If not provided, defaults to server time upon
* receiving request.
*/
createdAt?: InputMaybe<Scalars['ISOString']['input']>;
/** The document content in Commonmark Markdown. */
docMarkdown: Scalars['Markdown']['input'];
/**
* Client-provided UUID for the new Note.
* If not provided, will be generated on the server.
*/
id?: InputMaybe<Scalars['ID']['input']>;
/** Optional URL to link this Note to. */
source?: InputMaybe<Scalars['ValidUrl']['input']>;
/** Optional title for this Note */
title?: InputMaybe<Scalars['String']['input']>;
};

/** Input data for creating a Shareable List. */
export type CreateShareableListInput = {
description?: InputMaybe<Scalars['String']['input']>;
Expand Down Expand Up @@ -786,6 +842,19 @@ export type EditNoteContentInput = {
updatedAt?: InputMaybe<Scalars['ISOString']['input']>;
};

/**
* Input for editing the content of a Note (user-generated),
* providing the content as a Markdown-formatted string.
*/
export type EditNoteContentMarkdownInput = {
/** Commonmark Markdown string representing the document content. */
docMarkdown: Scalars['Markdown']['input'];
/** The ID of the note to edit */
noteId: Scalars['ID']['input'];
/** The time this update was made (defaults to server time) */
updatedAt?: InputMaybe<Scalars['ISOString']['input']>;
};

export type EditNoteTitleInput = {
/** The ID of the note to edit */
id: Scalars['ID']['input'];
Expand Down Expand Up @@ -1309,6 +1378,13 @@ export type Mutation = {
* selected by a user.
*/
createNoteFromQuote: Note;
/**
* Create a new note, with a pre-populated block that contains the quoted and cited text
* selected by a user.
*/
createNoteFromQuoteMarkdown: Note;
/** Create a new note, optionally with title and markdown content */
createNoteMarkdown: Note;
/** Create new highlight note. Returns the data for the created Highlight note. */
createSavedItemHighlightNote?: Maybe<HighlightNote>;
/** Create new highlight annotation(s). Returns the data for the created Highlight object(s). */
Expand Down Expand Up @@ -1380,6 +1456,14 @@ export type Mutation = {
* errors array.
*/
editNoteContent?: Maybe<Note>;
/**
* Edit the content of a Note, providing a markdown document instead
* of a Prosemirror JSON.
* If the Note does not exist or is inaccessible for the current user,
* response will be null and a NOT_FOUND error will be included in the
* errors array.
*/
editNoteContentMarkdown?: Maybe<Note>;
/**
* Edit the title of a Note.
* If the Note does not exist or is inaccessible for the current user,
Expand Down Expand Up @@ -1646,6 +1730,18 @@ export type MutationCreateNoteFromQuoteArgs = {
};


/** Default Mutation Type */
export type MutationCreateNoteFromQuoteMarkdownArgs = {
input: CreateNoteFromQuoteMarkdownInput;
};


/** Default Mutation Type */
export type MutationCreateNoteMarkdownArgs = {
input: CreateNoteMarkdownInput;
};


/** Default Mutation Type */
export type MutationCreateSavedItemHighlightNoteArgs = {
id: Scalars['ID']['input'];
Expand Down Expand Up @@ -1754,6 +1850,12 @@ export type MutationEditNoteContentArgs = {
};


/** Default Mutation Type */
export type MutationEditNoteContentMarkdownArgs = {
input: EditNoteContentMarkdownInput;
};


/** Default Mutation Type */
export type MutationEditNoteTitleArgs = {
input: EditNoteTitleInput;
Expand Down

0 comments on commit 2d5e4d9

Please sign in to comment.