Skip to content

Commit

Permalink
feat(operations): add the schema_changes operation option
Browse files Browse the repository at this point in the history
  • Loading branch information
tharropoulos committed Feb 3, 2025
1 parent d46a706 commit a283ffc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Typesense/Operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ export default class Operations {
constructor(private apiCall: ApiCall) {}

async perform(
// eslint-disable-next-line @typescript-eslint/ban-types -- Can't use `object` here, it needs to intersect with `{}`
operationName: "vote" | "snapshot" | "cache/clear" | (string & {}),
operationName:
| "vote"
| "snapshot"
| "cache/clear"
| "schema_changes"
// eslint-disable-next-line @typescript-eslint/ban-types -- Can't use `object` here, it needs to intersect with `{}`
| (string & {}),
queryParameters: Record<string, any> = {},
): Promise<any> {
return this.apiCall.post(
`${RESOURCEPATH}/${operationName}`,
{},
queryParameters
queryParameters,
);
}
}

0 comments on commit a283ffc

Please sign in to comment.