diff --git a/common/types/directus-schema.d.ts b/common/types/directus-schema.d.ts index 087b69a..d1c78c1 100644 --- a/common/types/directus-schema.d.ts +++ b/common/types/directus-schema.d.ts @@ -1292,66 +1292,6 @@ export interface paths { patch: operations["updateSingleItemsInstructionGroups"]; trace?: never; }; - "/items/instructions": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * List Items - * @description List the instructions items. - */ - get: operations["readItemsInstructions"]; - put?: never; - /** - * Create an Item - * @description Create a new instructions item. - */ - post: operations["createItemsInstructions"]; - /** - * Delete Multiple Items - * @description Delete multiple existing instructions items. - */ - delete: operations["deleteItemsInstructions"]; - options?: never; - head?: never; - /** - * Update Multiple Items - * @description Update multiple instructions items at the same time. - */ - patch: operations["updateItemsInstructions"]; - trace?: never; - }; - "/items/instructions/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Retrieve an Item - * @description Retrieve a single instructions item by unique identifier. - */ - get: operations["readSingleItemsInstructions"]; - put?: never; - post?: never; - /** - * Delete an Item - * @description Delete an existing instructions item. - */ - delete: operations["deleteSingleItemsInstructions"]; - options?: never; - head?: never; - /** - * Update an Item - * @description Update an existing instructions item. - */ - patch: operations["updateSingleItemsInstructions"]; - trace?: never; - }; "/items/home_page": { parameters: { query?: never; @@ -1532,66 +1472,6 @@ export interface paths { patch: operations["updateSingleItemsIngredientUnitForms"]; trace?: never; }; - "/items/ingredients": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * List Items - * @description List the ingredients items. - */ - get: operations["readItemsIngredients"]; - put?: never; - /** - * Create an Item - * @description Create a new ingredients item. - */ - post: operations["createItemsIngredients"]; - /** - * Delete Multiple Items - * @description Delete multiple existing ingredients items. - */ - delete: operations["deleteItemsIngredients"]; - options?: never; - head?: never; - /** - * Update Multiple Items - * @description Update multiple ingredients items at the same time. - */ - patch: operations["updateItemsIngredients"]; - trace?: never; - }; - "/items/ingredients/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Retrieve an Item - * @description Retrieve a single ingredients item by unique identifier. - */ - get: operations["readSingleItemsIngredients"]; - put?: never; - post?: never; - /** - * Delete an Item - * @description Delete an existing ingredients item. - */ - delete: operations["deleteSingleItemsIngredients"]; - options?: never; - head?: never; - /** - * Update an Item - * @description Update an existing ingredients item. - */ - patch: operations["updateSingleItemsIngredients"]; - trace?: never; - }; "/webhooks": { parameters: { query?: never; @@ -2148,6 +2028,126 @@ export interface paths { patch: operations["updateSingleItemsRecipes"]; trace?: never; }; + "/items/instructions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Items + * @description List the instructions items. + */ + get: operations["readItemsInstructions"]; + put?: never; + /** + * Create an Item + * @description Create a new instructions item. + */ + post: operations["createItemsInstructions"]; + /** + * Delete Multiple Items + * @description Delete multiple existing instructions items. + */ + delete: operations["deleteItemsInstructions"]; + options?: never; + head?: never; + /** + * Update Multiple Items + * @description Update multiple instructions items at the same time. + */ + patch: operations["updateItemsInstructions"]; + trace?: never; + }; + "/items/instructions/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve an Item + * @description Retrieve a single instructions item by unique identifier. + */ + get: operations["readSingleItemsInstructions"]; + put?: never; + post?: never; + /** + * Delete an Item + * @description Delete an existing instructions item. + */ + delete: operations["deleteSingleItemsInstructions"]; + options?: never; + head?: never; + /** + * Update an Item + * @description Update an existing instructions item. + */ + patch: operations["updateSingleItemsInstructions"]; + trace?: never; + }; + "/items/ingredients": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Items + * @description List the ingredients items. + */ + get: operations["readItemsIngredients"]; + put?: never; + /** + * Create an Item + * @description Create a new ingredients item. + */ + post: operations["createItemsIngredients"]; + /** + * Delete Multiple Items + * @description Delete multiple existing ingredients items. + */ + delete: operations["deleteItemsIngredients"]; + options?: never; + head?: never; + /** + * Update Multiple Items + * @description Update multiple ingredients items at the same time. + */ + patch: operations["updateItemsIngredients"]; + trace?: never; + }; + "/items/ingredients/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Retrieve an Item + * @description Retrieve a single ingredients item by unique identifier. + */ + get: operations["readSingleItemsIngredients"]; + put?: never; + post?: never; + /** + * Delete an Item + * @description Delete an existing ingredients item. + */ + delete: operations["deleteSingleItemsIngredients"]; + options?: never; + head?: never; + /** + * Update an Item + * @description Update an existing ingredients item. + */ + patch: operations["updateSingleItemsIngredients"]; + trace?: never; + }; } export type webhooks = Record; export interface components { @@ -2728,14 +2728,6 @@ export interface components { sort?: number | null; instructions?: (number | components["schemas"]["ItemsInstructions"])[] | null; }; - ItemsInstructions: { - id?: number; - instructionGroup_id?: (number | components["schemas"]["ItemsInstructionGroups"]) | null; - image?: (string | components["schemas"]["Files"]) | null; - text?: unknown; - sort?: number | null; - inline_ingredients?: (string | components["schemas"]["ItemsInlineIngredients"])[] | null; - }; ItemsHomePage: { id?: number; title?: string | null; @@ -2753,23 +2745,11 @@ export interface components { singular_form?: string | null; plural_form?: string | null; }; - ItemsIngredients: { - id?: number; - ingredientGroup_id?: (number | components["schemas"]["ItemsIngredientGroups"]) | null; - /** Format: float */ - amount?: number | null; - unit?: string | null; - note?: string | null; - sort?: number | null; - name_singular?: unknown; - name_plural?: unknown; - inline_only?: boolean; - }; - Webhooks: { - /** - * @description The index of the webhook. - * @example 1 - */ + Webhooks: { + /** + * @description The index of the webhook. + * @example 1 + */ id?: number; /** * @description The name of the webhook. @@ -3215,9 +3195,31 @@ export interface components { favourite?: boolean; description_snippet: string; method?: string | null; + /** Format: timestamp */ + date_published?: string | null; ingredientGroups?: (number | components["schemas"]["ItemsIngredientGroups"])[] | null; instructionGroups?: (number | components["schemas"]["ItemsInstructionGroups"])[] | null; }; + ItemsInstructions: { + id?: number; + instructionGroup_id?: (number | components["schemas"]["ItemsInstructionGroups"]) | null; + image?: (string | components["schemas"]["Files"]) | null; + text: unknown; + sort?: number | null; + inline_ingredients?: (string | components["schemas"]["ItemsInlineIngredients"])[] | null; + }; + ItemsIngredients: { + id?: number; + ingredientGroup_id?: (number | components["schemas"]["ItemsIngredientGroups"]) | null; + /** Format: float */ + amount?: number | null; + unit?: string | null; + note?: string | null; + sort?: number | null; + name_singular: unknown; + name_plural: unknown; + inline_only?: boolean; + }; }; responses: { /** @description Error: Not found. */ @@ -6934,7 +6936,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - readItemsInstructions: { + readItemsHomePage: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -6966,7 +6968,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsInstructions"][]; + data?: components["schemas"]["ItemsHomePage"][]; meta?: components["schemas"]["x-metadata"]; }; }; @@ -6974,7 +6976,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - createItemsInstructions: { + createItemsHomePage: { parameters: { query?: { /** @description What metadata to return in the response. */ @@ -6986,7 +6988,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsInstructions"][] | components["schemas"]["ItemsInstructions"]; + "application/json": components["schemas"]["ItemsHomePage"][] | components["schemas"]["ItemsHomePage"]; }; }; responses: { @@ -7004,7 +7006,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - deleteItemsInstructions: { + deleteItemsHomePage: { parameters: { query?: never; header?: never; @@ -7023,7 +7025,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - updateItemsInstructions: { + updateItemsHomePage: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7048,7 +7050,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsInstructions"][] | components["schemas"]["ItemsInstructions"]; + "application/json": components["schemas"]["ItemsHomePage"][] | components["schemas"]["ItemsHomePage"]; }; }; responses: { @@ -7065,7 +7067,7 @@ export interface operations { }; }; }; - readSingleItemsInstructions: { + readSingleItemsHomePage: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7092,7 +7094,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsInstructions"]; + data?: components["schemas"]["ItemsHomePage"]; }; }; }; @@ -7100,7 +7102,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - deleteSingleItemsInstructions: { + deleteSingleItemsHomePage: { parameters: { query?: never; header?: never; @@ -7123,7 +7125,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - updateSingleItemsInstructions: { + updateSingleItemsHomePage: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7140,7 +7142,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsInstructions"]; + "application/json": components["schemas"]["ItemsHomePage"]; }; }; responses: { @@ -7151,7 +7153,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsInstructions"]; + data?: components["schemas"]["ItemsHomePage"]; }; }; }; @@ -7159,7 +7161,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - readItemsHomePage: { + readItemsRecipesPage: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7191,7 +7193,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsHomePage"][]; + data?: components["schemas"]["ItemsRecipesPage"][]; meta?: components["schemas"]["x-metadata"]; }; }; @@ -7199,7 +7201,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - createItemsHomePage: { + createItemsRecipesPage: { parameters: { query?: { /** @description What metadata to return in the response. */ @@ -7211,7 +7213,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsHomePage"][] | components["schemas"]["ItemsHomePage"]; + "application/json": components["schemas"]["ItemsRecipesPage"][] | components["schemas"]["ItemsRecipesPage"]; }; }; responses: { @@ -7229,7 +7231,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - deleteItemsHomePage: { + deleteItemsRecipesPage: { parameters: { query?: never; header?: never; @@ -7248,7 +7250,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - updateItemsHomePage: { + updateItemsRecipesPage: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7273,7 +7275,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsHomePage"][] | components["schemas"]["ItemsHomePage"]; + "application/json": components["schemas"]["ItemsRecipesPage"][] | components["schemas"]["ItemsRecipesPage"]; }; }; responses: { @@ -7290,7 +7292,7 @@ export interface operations { }; }; }; - readSingleItemsHomePage: { + readSingleItemsRecipesPage: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7317,7 +7319,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsHomePage"]; + data?: components["schemas"]["ItemsRecipesPage"]; }; }; }; @@ -7325,7 +7327,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - deleteSingleItemsHomePage: { + deleteSingleItemsRecipesPage: { parameters: { query?: never; header?: never; @@ -7348,7 +7350,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - updateSingleItemsHomePage: { + updateSingleItemsRecipesPage: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7365,7 +7367,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsHomePage"]; + "application/json": components["schemas"]["ItemsRecipesPage"]; }; }; responses: { @@ -7376,7 +7378,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsHomePage"]; + data?: components["schemas"]["ItemsRecipesPage"]; }; }; }; @@ -7384,7 +7386,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - readItemsRecipesPage: { + readItemsIngredientUnitForms: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7416,7 +7418,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsRecipesPage"][]; + data?: components["schemas"]["ItemsIngredientUnitForms"][]; meta?: components["schemas"]["x-metadata"]; }; }; @@ -7424,7 +7426,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - createItemsRecipesPage: { + createItemsIngredientUnitForms: { parameters: { query?: { /** @description What metadata to return in the response. */ @@ -7436,7 +7438,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsRecipesPage"][] | components["schemas"]["ItemsRecipesPage"]; + "application/json": components["schemas"]["ItemsIngredientUnitForms"][] | components["schemas"]["ItemsIngredientUnitForms"]; }; }; responses: { @@ -7454,7 +7456,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - deleteItemsRecipesPage: { + deleteItemsIngredientUnitForms: { parameters: { query?: never; header?: never; @@ -7473,7 +7475,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - updateItemsRecipesPage: { + updateItemsIngredientUnitForms: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7498,7 +7500,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsRecipesPage"][] | components["schemas"]["ItemsRecipesPage"]; + "application/json": components["schemas"]["ItemsIngredientUnitForms"][] | components["schemas"]["ItemsIngredientUnitForms"]; }; }; responses: { @@ -7515,7 +7517,7 @@ export interface operations { }; }; }; - readSingleItemsRecipesPage: { + readSingleItemsIngredientUnitForms: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7542,7 +7544,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsRecipesPage"]; + data?: components["schemas"]["ItemsIngredientUnitForms"]; }; }; }; @@ -7550,7 +7552,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - deleteSingleItemsRecipesPage: { + deleteSingleItemsIngredientUnitForms: { parameters: { query?: never; header?: never; @@ -7573,7 +7575,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - updateSingleItemsRecipesPage: { + updateSingleItemsIngredientUnitForms: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7590,7 +7592,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsRecipesPage"]; + "application/json": components["schemas"]["ItemsIngredientUnitForms"]; }; }; responses: { @@ -7601,7 +7603,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsRecipesPage"]; + data?: components["schemas"]["ItemsIngredientUnitForms"]; }; }; }; @@ -7609,25 +7611,9 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - readItemsIngredientUnitForms: { + getWebhooks: { parameters: { - query?: { - /** @description Control what fields are being returned in the object. */ - fields?: components["parameters"]["Fields"]; - /** @description A limit on the number of objects that are returned. */ - limit?: components["parameters"]["Limit"]; - /** @description What metadata to return in the response. */ - meta?: components["parameters"]["Meta"]; - /** @description How many items to skip when fetching data. */ - offset?: components["parameters"]["Offset"]; - /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. - * */ - sort?: components["parameters"]["Sort"]; - /** @description Select items in collection by given conditions. */ - filter?: components["parameters"]["Filter"]; - /** @description Filter by items that contain the given search query in one of their fields. */ - search?: components["parameters"]["Search"]; - }; + query?: never; header?: never; path?: never; cookie?: never; @@ -7641,17 +7627,19 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsIngredientUnitForms"][]; - meta?: components["schemas"]["x-metadata"]; + data?: components["schemas"]["Webhooks"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; }; }; - createItemsIngredientUnitForms: { + createWebhook: { parameters: { query?: { + /** @description Control what fields are being returned in the object. */ + fields?: components["parameters"]["Fields"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; }; @@ -7661,7 +7649,43 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsIngredientUnitForms"][] | components["schemas"]["ItemsIngredientUnitForms"]; + "application/json": { + /** + * @description The name of the webhook. + * @example create articles + */ + name?: string; + /** + * @description Method used in the webhook. + * @example POST + */ + method?: string; + /** + * @description The url of the webhook. + * @example null + */ + url?: string; + /** + * @description The status of the webhook. + * @example active + */ + status?: string; + /** + * @description If yes, send the content of what was done + * @example true + */ + data?: boolean; + /** + * @description The actions that triggers this webhook. + * @example null + */ + actions?: unknown; + /** + * @description The collections that triggers this webhook. + * @example null + */ + "system-collections"?: unknown; + }; }; }; responses: { @@ -7672,14 +7696,15 @@ export interface operations { }; content: { "application/json": { - data?: unknown; + data?: components["schemas"]["Roles"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; }; }; - deleteItemsIngredientUnitForms: { + deleteWebhooks: { parameters: { query?: never; header?: never; @@ -7698,7 +7723,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - updateItemsIngredientUnitForms: { + updateWebhooks: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7723,7 +7748,46 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsIngredientUnitForms"][] | components["schemas"]["ItemsIngredientUnitForms"]; + "application/json": { + data?: { + /** + * @description The name of the webhook. + * @example create articles + */ + name?: string; + /** + * @description Method used in the webhook. + * @example POST + */ + method?: string; + /** + * @description The url of the webhook. + * @example null + */ + url?: string; + /** + * @description The status of the webhook. + * @example active + */ + status?: string; + /** + * @description If yes, send the content of what was done + * @example true + */ + data?: boolean; + /** + * @description The actions that triggers this webhook. + * @example null + */ + actions?: unknown; + /** + * @description The collections that triggers this webhook. + * @example null + */ + "system-collections"?: unknown; + }; + keys?: string[]; + }; }; }; responses: { @@ -7734,27 +7798,21 @@ export interface operations { }; content: { "application/json": { - data?: unknown; + data?: components["schemas"]["Webhooks"][]; + meta?: components["schemas"]["x-metadata"]; }; }; }; + 401: components["responses"]["UnauthorizedError"]; }; }; - readSingleItemsIngredientUnitForms: { + getWebhook: { parameters: { - query?: { - /** @description Control what fields are being returned in the object. */ - fields?: components["parameters"]["Fields"]; - /** @description What metadata to return in the response. */ - meta?: components["parameters"]["Meta"]; - /** @description Retrieve an item's state from a specific Content Version. The value corresponds to the "key" of the Content Version. - * */ - version?: components["parameters"]["Version"]; - }; + query?: never; header?: never; path: { - /** @description Index of the item. */ - id: number | string; + /** @description Unique identifier for the object. */ + id: components["parameters"]["UUId"]; }; cookie?: never; }; @@ -7767,7 +7825,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsIngredientUnitForms"]; + data?: components["schemas"]["Webhooks"]; }; }; }; @@ -7775,13 +7833,13 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - deleteSingleItemsIngredientUnitForms: { + deleteWebhook: { parameters: { query?: never; header?: never; path: { - /** @description Index of the item. */ - id: number | string; + /** @description Unique identifier for the object. */ + id: components["parameters"]["UUId"]; }; cookie?: never; }; @@ -7798,7 +7856,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - updateSingleItemsIngredientUnitForms: { + updateWebhook: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -7808,14 +7866,50 @@ export interface operations { }; header?: never; path: { - /** @description Index of the item. */ - id: number | string; + /** @description Unique identifier for the object. */ + id: components["parameters"]["UUId"]; }; cookie?: never; }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsIngredientUnitForms"]; + "application/json": { + /** + * @description The name of the webhook. + * @example create articles + */ + name?: string; + /** + * @description Method used in the webhook. + * @example POST + */ + method?: string; + /** + * @description The url of the webhook. + * @example null + */ + url?: string; + /** + * @description The status of the webhook. + * @example active + */ + status?: string; + /** + * @description If yes, send the content of what was done + * @example true + */ + data?: boolean; + /** + * @description The actions that triggers this webhook. + * @example null + */ + actions?: unknown; + /** + * @description The collections that triggers this webhook. + * @example null + */ + "system-collections"?: unknown; + }; }; }; responses: { @@ -7826,7 +7920,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsIngredientUnitForms"]; + data?: components["schemas"]["Roles"]; }; }; }; @@ -7834,24 +7928,17 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - readItemsIngredients: { + getSettings: { parameters: { query?: { - /** @description Control what fields are being returned in the object. */ - fields?: components["parameters"]["Fields"]; /** @description A limit on the number of objects that are returned. */ limit?: components["parameters"]["Limit"]; - /** @description What metadata to return in the response. */ - meta?: components["parameters"]["Meta"]; /** @description How many items to skip when fetching data. */ offset?: components["parameters"]["Offset"]; - /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. - * */ - sort?: components["parameters"]["Sort"]; - /** @description Select items in collection by given conditions. */ - filter?: components["parameters"]["Filter"]; - /** @description Filter by items that contain the given search query in one of their fields. */ - search?: components["parameters"]["Search"]; + /** @description What metadata to return in the response. */ + meta?: components["parameters"]["Meta"]; + /** @description Cursor for use in pagination. Often used in combination with limit. */ + page?: components["parameters"]["Page"]; }; header?: never; path?: never; @@ -7866,27 +7953,24 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsIngredients"][]; - meta?: components["schemas"]["x-metadata"]; + data?: components["schemas"]["Settings"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; }; }; - createItemsIngredients: { + updateSetting: { parameters: { - query?: { - /** @description What metadata to return in the response. */ - meta?: components["parameters"]["Meta"]; - }; + query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsIngredients"][] | components["schemas"]["ItemsIngredients"]; + "application/json": Record; }; }; responses: { @@ -7897,43 +7981,25 @@ export interface operations { }; content: { "application/json": { - data?: unknown; + data?: components["schemas"]["Settings"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; }; }; - deleteItemsIngredients: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful request */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["UnauthorizedError"]; - }; - }; - updateItemsIngredients: { + getPermissions: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ fields?: components["parameters"]["Fields"]; /** @description A limit on the number of objects that are returned. */ limit?: components["parameters"]["Limit"]; - /** @description What metadata to return in the response. */ - meta?: components["parameters"]["Meta"]; /** @description How many items to skip when fetching data. */ offset?: components["parameters"]["Offset"]; + /** @description What metadata to return in the response. */ + meta?: components["parameters"]["Meta"]; /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. * */ sort?: components["parameters"]["Sort"]; @@ -7941,48 +8007,13 @@ export interface operations { filter?: components["parameters"]["Filter"]; /** @description Filter by items that contain the given search query in one of their fields. */ search?: components["parameters"]["Search"]; + /** @description Cursor for use in pagination. Often used in combination with limit. */ + page?: components["parameters"]["Page"]; }; header?: never; path?: never; cookie?: never; }; - requestBody?: { - content: { - "application/json": components["schemas"]["ItemsIngredients"][] | components["schemas"]["ItemsIngredients"]; - }; - }; - responses: { - /** @description Successful request */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - data?: unknown; - }; - }; - }; - }; - }; - readSingleItemsIngredients: { - parameters: { - query?: { - /** @description Control what fields are being returned in the object. */ - fields?: components["parameters"]["Fields"]; - /** @description What metadata to return in the response. */ - meta?: components["parameters"]["Meta"]; - /** @description Retrieve an item's state from a specific Content Version. The value corresponds to the "key" of the Content Version. - * */ - version?: components["parameters"]["Version"]; - }; - header?: never; - path: { - /** @description Index of the item. */ - id: number | string; - }; - cookie?: never; - }; requestBody?: never; responses: { /** @description Successful request */ @@ -7992,7 +8023,8 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsIngredients"]; + data?: components["schemas"]["Permissions"][]; + meta?: components["schemas"]["x-metadata"]; }; }; }; @@ -8000,47 +8032,73 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - deleteSingleItemsIngredients: { - parameters: { - query?: never; - header?: never; - path: { - /** @description Index of the item. */ - id: number | string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful request */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; - }; - }; - updateSingleItemsIngredients: { + createPermission: { parameters: { query?: { - /** @description Control what fields are being returned in the object. */ - fields?: components["parameters"]["Fields"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; }; header?: never; - path: { - /** @description Index of the item. */ - id: number | string; - }; + path?: never; cookie?: never; }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsIngredients"]; + "application/json": { + /** + * @description What collection this permission applies to. + * @example customers + */ + collection?: string; + /** + * @description If the user can post comments. + * @enum {string} + */ + comment?: "none" | "create" | "update" | "full"; + /** + * @description If the user can create items. + * @enum {string} + */ + create?: "none" | "full"; + /** + * @description If the user can update items. + * @enum {string} + */ + delete?: "none" | "mine" | "role" | "full"; + /** + * @description If the user is required to leave a comment explaining what was changed. + * @enum {string} + */ + explain?: "none" | "create" | "update" | "always"; + /** + * @description If the user can read items. + * @enum {string} + */ + read?: "none" | "mine" | "role" | "full"; + /** + * @description Unique identifier of the role this permission applies to. + * @example 3 + */ + role?: number; + /** + * @description Explicitly denies read access for specific fields. + * @example [ + * "featured_image" + * ] + */ + read_field_blacklist?: string[]; + /** @description What status this permission applies to. */ + status?: string; + /** @description Explicitly denies specific statuses to be used. */ + status_blacklist?: string[]; + /** + * @description If the user can update items. + * @enum {string} + */ + update?: "none" | "mine" | "role" | "full"; + /** @description Explicitly denies write access for specific fields. */ + write_field_blacklist?: string[]; + }; }; }; responses: { @@ -8051,7 +8109,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsIngredients"]; + data?: components["schemas"]["Permissions"]; }; }; }; @@ -8059,7 +8117,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - getWebhooks: { + deletePermissions: { parameters: { query?: never; header?: never; @@ -8073,23 +8131,29 @@ export interface operations { headers: { [name: string]: unknown; }; - content: { - "application/json": { - data?: components["schemas"]["Webhooks"]; - }; - }; + content?: never; }; 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; }; }; - createWebhook: { + updatePermissions: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ fields?: components["parameters"]["Fields"]; + /** @description A limit on the number of objects that are returned. */ + limit?: components["parameters"]["Limit"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; + /** @description How many items to skip when fetching data. */ + offset?: components["parameters"]["Offset"]; + /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. + * */ + sort?: components["parameters"]["Sort"]; + /** @description Select items in collection by given conditions. */ + filter?: components["parameters"]["Filter"]; + /** @description Filter by items that contain the given search query in one of their fields. */ + search?: components["parameters"]["Search"]; }; header?: never; path?: never; @@ -8098,41 +8162,62 @@ export interface operations { requestBody?: { content: { "application/json": { - /** - * @description The name of the webhook. - * @example create articles - */ - name?: string; - /** - * @description Method used in the webhook. - * @example POST - */ - method?: string; - /** - * @description The url of the webhook. - * @example null - */ - url?: string; - /** - * @description The status of the webhook. - * @example active - */ - status?: string; - /** - * @description If yes, send the content of what was done - * @example true - */ - data?: boolean; - /** - * @description The actions that triggers this webhook. - * @example null - */ - actions?: unknown; - /** - * @description The collections that triggers this webhook. - * @example null - */ - "system-collections"?: unknown; + keys?: string[]; + data?: { + /** + * @description What collection this permission applies to. + * @example customers + */ + collection?: string; + /** + * @description If the user can post comments. + * @enum {string} + */ + comment?: "none" | "create" | "update" | "full"; + /** + * @description If the user can create items. + * @enum {string} + */ + create?: "none" | "full"; + /** + * @description If the user can update items. + * @enum {string} + */ + delete?: "none" | "mine" | "role" | "full"; + /** + * @description If the user is required to leave a comment explaining what was changed. + * @enum {string} + */ + explain?: "none" | "create" | "update" | "always"; + /** + * @description If the user can read items. + * @enum {string} + */ + read?: "none" | "mine" | "role" | "full"; + /** + * @description Unique identifier of the role this permission applies to. + * @example 3 + */ + role?: number; + /** + * @description Explicitly denies read access for specific fields. + * @example [ + * "featured_image" + * ] + */ + read_field_blacklist?: string[]; + /** @description What status this permission applies to. */ + status?: string; + /** @description Explicitly denies specific statuses to be used. */ + status_blacklist?: string[]; + /** + * @description If the user can update items. + * @enum {string} + */ + update?: "none" | "mine" | "role" | "full"; + /** @description Explicitly denies write access for specific fields. */ + write_field_blacklist?: string[]; + }; }; }; }; @@ -8144,15 +8229,15 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Roles"]; + data?: components["schemas"]["Permissions"][]; + meta?: components["schemas"]["x-metadata"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; }; }; - deleteWebhooks: { + getMyPermissions: { parameters: { query?: never; header?: never; @@ -8166,101 +8251,28 @@ export interface operations { headers: { [name: string]: unknown; }; - content?: never; + content: { + "application/json": { + data?: components["schemas"]["Permissions"][]; + }; + }; }; 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; }; }; - updateWebhooks: { + getPermission: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ fields?: components["parameters"]["Fields"]; - /** @description A limit on the number of objects that are returned. */ - limit?: components["parameters"]["Limit"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; - /** @description How many items to skip when fetching data. */ - offset?: components["parameters"]["Offset"]; - /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. - * */ - sort?: components["parameters"]["Sort"]; - /** @description Select items in collection by given conditions. */ - filter?: components["parameters"]["Filter"]; - /** @description Filter by items that contain the given search query in one of their fields. */ - search?: components["parameters"]["Search"]; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": { - data?: { - /** - * @description The name of the webhook. - * @example create articles - */ - name?: string; - /** - * @description Method used in the webhook. - * @example POST - */ - method?: string; - /** - * @description The url of the webhook. - * @example null - */ - url?: string; - /** - * @description The status of the webhook. - * @example active - */ - status?: string; - /** - * @description If yes, send the content of what was done - * @example true - */ - data?: boolean; - /** - * @description The actions that triggers this webhook. - * @example null - */ - actions?: unknown; - /** - * @description The collections that triggers this webhook. - * @example null - */ - "system-collections"?: unknown; - }; - keys?: string[]; - }; - }; - }; - responses: { - /** @description Successful request */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - data?: components["schemas"]["Webhooks"][]; - meta?: components["schemas"]["x-metadata"]; - }; - }; }; - 401: components["responses"]["UnauthorizedError"]; - }; - }; - getWebhook: { - parameters: { - query?: never; header?: never; path: { - /** @description Unique identifier for the object. */ - id: components["parameters"]["UUId"]; + /** @description Index */ + id: components["parameters"]["Id"]; }; cookie?: never; }; @@ -8273,7 +8285,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Webhooks"]; + data?: components["schemas"]["Permissions"]; }; }; }; @@ -8281,13 +8293,13 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - deleteWebhook: { + deletePermission: { parameters: { query?: never; header?: never; path: { - /** @description Unique identifier for the object. */ - id: components["parameters"]["UUId"]; + /** @description Index */ + id: components["parameters"]["Id"]; }; cookie?: never; }; @@ -8304,59 +8316,64 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - updateWebhook: { + updatePermission: { parameters: { query?: { - /** @description Control what fields are being returned in the object. */ - fields?: components["parameters"]["Fields"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; }; header?: never; path: { - /** @description Unique identifier for the object. */ - id: components["parameters"]["UUId"]; + /** @description Index */ + id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: { content: { "application/json": { + /** @description What collection this permission applies to. */ + collection?: Record; /** - * @description The name of the webhook. - * @example create articles - */ - name?: string; - /** - * @description Method used in the webhook. - * @example POST + * @description If the user can post comments. `full`. + * @enum {string} */ - method?: string; + comment?: "none" | "create" | "update"; /** - * @description The url of the webhook. - * @example null + * @description If the user can create items. + * @enum {string} */ - url?: string; + create?: "none" | "full"; /** - * @description The status of the webhook. - * @example active + * @description If the user can update items. + * @enum {string} */ - status?: string; + delete?: "none" | "mine" | "role" | "full"; /** - * @description If yes, send the content of what was done - * @example true + * @description If the user is required to leave a comment explaining what was changed. + * @enum {string} */ - data?: boolean; + explain?: "none" | "create" | "update" | "always"; /** - * @description The actions that triggers this webhook. - * @example null + * @description If the user can read items. + * @enum {string} */ - actions?: unknown; + read?: "none" | "mine" | "role" | "full"; + /** @description Explicitly denies read access for specific fields. */ + read_field_blacklist?: Record; + /** @description Unique identifier of the role this permission applies to. */ + role?: Record; + /** @description What status this permission applies to. */ + status?: Record; + /** @description Explicitly denies specific statuses to be used. */ + status_blacklist?: Record; /** - * @description The collections that triggers this webhook. - * @example null + * @description If the user can update items. + * @enum {string} */ - "system-collections"?: unknown; + update?: "none" | "mine" | "role" | "full"; + /** @description Explicitly denies write access for specific fields. */ + write_field_blacklist?: Record; }; }; }; @@ -8368,7 +8385,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Roles"]; + data?: components["schemas"]["Permissions"]; }; }; }; @@ -8376,17 +8393,13 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - getSettings: { + getCollections: { parameters: { query?: { - /** @description A limit on the number of objects that are returned. */ - limit?: components["parameters"]["Limit"]; /** @description How many items to skip when fetching data. */ offset?: components["parameters"]["Offset"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; - /** @description Cursor for use in pagination. Often used in combination with limit. */ - page?: components["parameters"]["Page"]; }; header?: never; path?: never; @@ -8401,7 +8414,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Settings"]; + data?: components["schemas"]["Collections"][]; }; }; }; @@ -8409,16 +8422,87 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - updateSetting: { + createCollection: { parameters: { - query?: never; + query?: { + /** @description What metadata to return in the response. */ + meta?: components["parameters"]["Meta"]; + }; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { - "application/json": Record; + "application/json": { + /** + * @description Unique name of the collection. + * @example my_collection + */ + collection: string; + /** @description The fields contained in this collection. See the fields reference for more information. Each individual field requires field, type, and interface to be provided. */ + fields: Record[]; + /** + * @description Name of a Google Material Design Icon that's assigned to this collection. + * @example people + */ + icon?: string | null; + /** + * @description A note describing the collection. + * @example null + */ + note?: string | null; + /** + * @description Text representation of how items from this collection are shown across the system. + * @example null + */ + display_template?: string | null; + /** + * @description Whether or not the collection is hidden from the navigation in the admin app. + * @example false + */ + hidden?: boolean; + /** + * @description Whether or not the collection is treated as a single object. + * @example false + */ + singleton?: boolean; + /** + * @description Key value pairs of how to show this collection's name in different languages in the admin app. + * @example null + */ + translation?: string | null; + /** + * @description Whether or not Content Versioning is enabled for this collection. + * @example false + */ + versioning?: boolean; + /** + * @description What field holds the archive value. + * @example null + */ + archive_field?: string | null; + /** + * @description What value to use for "archived" items. + * @example null + */ + archive_app_filter?: string | null; + /** + * @description What value to use to "unarchive" items. + * @example null + */ + archive_value?: string | null; + /** + * @description Whether or not to show the "archived" filter. + * @example null + */ + unarchive_value?: string | null; + /** + * @description The sort field in the collection. + * @example null + */ + sort_field?: string | null; + }; }; }; responses: { @@ -8429,7 +8513,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Settings"]; + data?: components["schemas"]["Collections"]; }; }; }; @@ -8437,28 +8521,166 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - getPermissions: { + getCollection: { parameters: { query?: { - /** @description Control what fields are being returned in the object. */ - fields?: components["parameters"]["Fields"]; - /** @description A limit on the number of objects that are returned. */ - limit?: components["parameters"]["Limit"]; - /** @description How many items to skip when fetching data. */ - offset?: components["parameters"]["Offset"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; - /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. - * */ - sort?: components["parameters"]["Sort"]; - /** @description Select items in collection by given conditions. */ - filter?: components["parameters"]["Filter"]; - /** @description Filter by items that contain the given search query in one of their fields. */ - search?: components["parameters"]["Search"]; - /** @description Cursor for use in pagination. Often used in combination with limit. */ - page?: components["parameters"]["Page"]; }; header?: never; + path: { + /** @description Unique identifier of the collection. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful request */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data?: components["schemas"]["Collections"]; + }; + }; + }; + 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; + }; + }; + deleteCollection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier of the collection. */ + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful request */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; + }; + }; + updateCollection: { + parameters: { + query?: { + /** @description What metadata to return in the response. */ + meta?: components["parameters"]["Meta"]; + }; + header?: never; + path: { + /** @description Unique identifier of the collection. */ + id: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** @description Metadata of the collection. */ + meta?: { + /** + * @description Name of a Google Material Design Icon that's assigned to this collection. + * @example people + */ + icon?: string | null; + /** + * @description Choose the color for the icon assigned to this collection. + * @example #6644ff + */ + color?: string | null; + /** + * @description A note describing the collection. + * @example null + */ + note?: string | null; + /** + * @description Text representation of how items from this collection are shown across the system. + * @example null + */ + display_template?: string | null; + /** + * @description Whether or not the collection is hidden from the navigation in the admin app. + * @example false + */ + hidden?: boolean; + /** + * @description Whether or not the collection is treated as a single object. + * @example false + */ + singleton?: boolean; + /** + * @description Key value pairs of how to show this collection's name in different languages in the admin app. + * @example null + */ + translation?: string | null; + /** + * @description Whether or not Content Versioning is enabled for this collection. + * @example false + */ + versioning?: boolean; + /** + * @description What field holds the archive value. + * @example null + */ + archive_field?: string | null; + /** + * @description What value to use for "archived" items. + * @example null + */ + archive_app_filter?: string | null; + /** + * @description What value to use to "unarchive" items. + * @example null + */ + archive_value?: string | null; + /** + * @description Whether or not to show the "archived" filter. + * @example null + */ + unarchive_value?: string | null; + /** + * @description The sort field in the collection. + * @example null + */ + sort_field?: string | null; + }; + }; + }; + }; + responses: { + /** @description Successful request */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data?: components["schemas"]["Collections"]; + }; + }; + }; + 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; + }; + }; + getFlows: { + parameters: { + query?: never; + header?: never; path?: never; cookie?: never; }; @@ -8471,7 +8693,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Permissions"][]; + data?: components["schemas"]["Flows"][]; meta?: components["schemas"]["x-metadata"]; }; }; @@ -8480,9 +8702,11 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - createPermission: { + createFlow: { parameters: { query?: { + /** @description Control what fields are being returned in the object. */ + fields?: components["parameters"]["Fields"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; }; @@ -8492,61 +8716,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": { - /** - * @description What collection this permission applies to. - * @example customers - */ - collection?: string; - /** - * @description If the user can post comments. - * @enum {string} - */ - comment?: "none" | "create" | "update" | "full"; - /** - * @description If the user can create items. - * @enum {string} - */ - create?: "none" | "full"; - /** - * @description If the user can update items. - * @enum {string} - */ - delete?: "none" | "mine" | "role" | "full"; - /** - * @description If the user is required to leave a comment explaining what was changed. - * @enum {string} - */ - explain?: "none" | "create" | "update" | "always"; - /** - * @description If the user can read items. - * @enum {string} - */ - read?: "none" | "mine" | "role" | "full"; - /** - * @description Unique identifier of the role this permission applies to. - * @example 3 - */ - role?: number; - /** - * @description Explicitly denies read access for specific fields. - * @example [ - * "featured_image" - * ] - */ - read_field_blacklist?: string[]; - /** @description What status this permission applies to. */ - status?: string; - /** @description Explicitly denies specific statuses to be used. */ - status_blacklist?: string[]; - /** - * @description If the user can update items. - * @enum {string} - */ - update?: "none" | "mine" | "role" | "full"; - /** @description Explicitly denies write access for specific fields. */ - write_field_blacklist?: string[]; - }; + "application/json": components["schemas"]["Flows"]; }; }; responses: { @@ -8557,7 +8727,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Permissions"]; + data?: components["schemas"]["Flows"]; }; }; }; @@ -8565,7 +8735,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - deletePermissions: { + deleteFlows: { parameters: { query?: never; header?: never; @@ -8584,7 +8754,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - updatePermissions: { + updateFlows: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -8610,62 +8780,8 @@ export interface operations { requestBody?: { content: { "application/json": { + data?: components["schemas"]["Flows"]; keys?: string[]; - data?: { - /** - * @description What collection this permission applies to. - * @example customers - */ - collection?: string; - /** - * @description If the user can post comments. - * @enum {string} - */ - comment?: "none" | "create" | "update" | "full"; - /** - * @description If the user can create items. - * @enum {string} - */ - create?: "none" | "full"; - /** - * @description If the user can update items. - * @enum {string} - */ - delete?: "none" | "mine" | "role" | "full"; - /** - * @description If the user is required to leave a comment explaining what was changed. - * @enum {string} - */ - explain?: "none" | "create" | "update" | "always"; - /** - * @description If the user can read items. - * @enum {string} - */ - read?: "none" | "mine" | "role" | "full"; - /** - * @description Unique identifier of the role this permission applies to. - * @example 3 - */ - role?: number; - /** - * @description Explicitly denies read access for specific fields. - * @example [ - * "featured_image" - * ] - */ - read_field_blacklist?: string[]; - /** @description What status this permission applies to. */ - status?: string; - /** @description Explicitly denies specific statuses to be used. */ - status_blacklist?: string[]; - /** - * @description If the user can update items. - * @enum {string} - */ - update?: "none" | "mine" | "role" | "full"; - /** @description Explicitly denies write access for specific fields. */ - write_field_blacklist?: string[]; - }; }; }; }; @@ -8677,7 +8793,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Permissions"][]; + data?: components["schemas"]["Flows"][]; meta?: components["schemas"]["x-metadata"]; }; }; @@ -8685,11 +8801,14 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - getMyPermissions: { + getFlow: { parameters: { query?: never; header?: never; - path?: never; + path: { + /** @description Unique identifier for the object. */ + id: components["parameters"]["UUId"]; + }; cookie?: never; }; requestBody?: never; @@ -8701,7 +8820,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Permissions"][]; + data?: components["schemas"]["Flows"]; }; }; }; @@ -8709,7 +8828,30 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - getPermission: { + deleteFlow: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Unique identifier for the object. */ + id: components["parameters"]["UUId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful request */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; + }; + }; + updateFlow: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -8719,9 +8861,55 @@ export interface operations { }; header?: never; path: { - /** @description Index */ - id: components["parameters"]["Id"]; + /** @description Unique identifier for the object. */ + id: components["parameters"]["UUId"]; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["Flows"]; + }; + }; + responses: { + /** @description Successful request */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data?: components["schemas"]["Flows"]; + }; + }; }; + 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; + }; + }; + getPresets: { + parameters: { + query?: { + /** @description Control what fields are being returned in the object. */ + fields?: components["parameters"]["Fields"]; + /** @description A limit on the number of objects that are returned. */ + limit?: components["parameters"]["Limit"]; + /** @description How many items to skip when fetching data. */ + offset?: components["parameters"]["Offset"]; + /** @description Cursor for use in pagination. Often used in combination with limit. */ + page?: components["parameters"]["Page"]; + /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. + * */ + sort?: components["parameters"]["Sort"]; + /** @description Select items in collection by given conditions. */ + filter?: components["parameters"]["Filter"]; + /** @description Filter by items that contain the given search query in one of their fields. */ + search?: components["parameters"]["Search"]; + /** @description What metadata to return in the response. */ + meta?: components["parameters"]["Meta"]; + }; + header?: never; + path?: never; cookie?: never; }; requestBody?: never; @@ -8733,95 +8921,62 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Permissions"]; + data?: components["schemas"]["Presets"][]; + meta?: components["schemas"]["x-metadata"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; - }; - }; - deletePermission: { - parameters: { - query?: never; - header?: never; - path: { - /** @description Index */ - id: components["parameters"]["Id"]; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful request */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; }; }; - updatePermission: { + createPreset: { parameters: { query?: { + /** @description Control what fields are being returned in the object. */ + fields?: components["parameters"]["Fields"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; }; header?: never; - path: { - /** @description Index */ - id: components["parameters"]["Id"]; - }; + path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { - /** @description What collection this permission applies to. */ - collection?: Record; - /** - * @description If the user can post comments. `full`. - * @enum {string} - */ - comment?: "none" | "create" | "update"; - /** - * @description If the user can create items. - * @enum {string} - */ - create?: "none" | "full"; /** - * @description If the user can update items. - * @enum {string} - */ - delete?: "none" | "mine" | "role" | "full"; - /** - * @description If the user is required to leave a comment explaining what was changed. - * @enum {string} + * @description What collection this collection preset is used for. + * @example articles */ - explain?: "none" | "create" | "update" | "always"; + collection: string; /** - * @description If the user can read items. - * @enum {string} + * @description Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark. + * @example Highly rated articles */ - read?: "none" | "mine" | "role" | "full"; - /** @description Explicitly denies read access for specific fields. */ - read_field_blacklist?: Record; - /** @description Unique identifier of the role this permission applies to. */ - role?: Record; - /** @description What status this permission applies to. */ - status?: Record; - /** @description Explicitly denies specific statuses to be used. */ - status_blacklist?: Record; + title?: string; /** - * @description If the user can update items. - * @enum {string} + * @description The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role. + * @example null */ - update?: "none" | "mine" | "role" | "full"; - /** @description Explicitly denies write access for specific fields. */ - write_field_blacklist?: Record; + role?: string; + /** @description What the user searched for in search/filter in the header bar. */ + search?: string; + filters?: { + /** @example aHKLAakdVghzD */ + key?: string; + /** @example rating */ + field?: string; + /** @example gte */ + operator?: string; + /** @example 4.5 */ + value?: number; + }[]; + /** @description Name of the view type that is used. */ + layout?: string; + /** @description Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters. */ + layout_query?: string; + /** @description Options of the views. The properties in here are controlled by the layout. */ + layout_options?: string; }; }; }; @@ -8833,22 +8988,16 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Permissions"]; + data?: components["schemas"]["Presets"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; }; }; - getCollections: { + deletePresets: { parameters: { - query?: { - /** @description How many items to skip when fetching data. */ - offset?: components["parameters"]["Offset"]; - /** @description What metadata to return in the response. */ - meta?: components["parameters"]["Meta"]; - }; + query?: never; header?: never; path?: never; cookie?: never; @@ -8860,21 +9009,29 @@ export interface operations { headers: { [name: string]: unknown; }; - content: { - "application/json": { - data?: components["schemas"]["Collections"][]; - }; - }; + content?: never; }; 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; }; }; - createCollection: { + updatePresets: { parameters: { query?: { + /** @description Control what fields are being returned in the object. */ + fields?: components["parameters"]["Fields"]; + /** @description A limit on the number of objects that are returned. */ + limit?: components["parameters"]["Limit"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; + /** @description How many items to skip when fetching data. */ + offset?: components["parameters"]["Offset"]; + /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. + * */ + sort?: components["parameters"]["Sort"]; + /** @description Select items in collection by given conditions. */ + filter?: components["parameters"]["Filter"]; + /** @description Filter by items that contain the given search query in one of their fields. */ + search?: components["parameters"]["Search"]; }; header?: never; path?: never; @@ -8883,73 +9040,42 @@ export interface operations { requestBody?: { content: { "application/json": { - /** - * @description Unique name of the collection. - * @example my_collection - */ - collection: string; - /** @description The fields contained in this collection. See the fields reference for more information. Each individual field requires field, type, and interface to be provided. */ - fields: Record[]; - /** - * @description Name of a Google Material Design Icon that's assigned to this collection. - * @example people - */ - icon?: string | null; - /** - * @description A note describing the collection. - * @example null - */ - note?: string | null; - /** - * @description Text representation of how items from this collection are shown across the system. - * @example null - */ - display_template?: string | null; - /** - * @description Whether or not the collection is hidden from the navigation in the admin app. - * @example false - */ - hidden?: boolean; - /** - * @description Whether or not the collection is treated as a single object. - * @example false - */ - singleton?: boolean; - /** - * @description Key value pairs of how to show this collection's name in different languages in the admin app. - * @example null - */ - translation?: string | null; - /** - * @description Whether or not Content Versioning is enabled for this collection. - * @example false - */ - versioning?: boolean; - /** - * @description What field holds the archive value. - * @example null - */ - archive_field?: string | null; - /** - * @description What value to use for "archived" items. - * @example null - */ - archive_app_filter?: string | null; - /** - * @description What value to use to "unarchive" items. - * @example null - */ - archive_value?: string | null; - /** - * @description Whether or not to show the "archived" filter. - * @example null - */ - unarchive_value?: string | null; - /** - * @description The sort field in the collection. - * @example null - */ - sort_field?: string | null; + keys?: string[]; + data?: { + /** + * @description What collection this collection preset is used for. + * @example articles + */ + collection: string; + /** + * @description Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark. + * @example Highly rated articles + */ + title?: string; + /** + * @description The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role. + * @example null + */ + role?: string; + /** @description What the user searched for in search/filter in the header bar. */ + search?: string; + filters?: { + /** @example aHKLAakdVghzD */ + key?: string; + /** @example rating */ + field?: string; + /** @example gte */ + operator?: string; + /** @example 4.5 */ + value?: number; + }[]; + /** @description Name of the view type that is used. */ + layout?: string; + /** @description Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters. */ + layout_query?: string; + /** @description Options of the views. The properties in here are controlled by the layout. */ + layout_options?: string; + }; }; }; }; @@ -8961,24 +9087,26 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Collections"]; + data?: components["schemas"]["Presets"][]; + meta?: components["schemas"]["x-metadata"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; }; }; - getCollection: { + getPreset: { parameters: { query?: { + /** @description Control what fields are being returned in the object. */ + fields?: components["parameters"]["Fields"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; }; header?: never; path: { - /** @description Unique identifier of the collection. */ - id: string; + /** @description Index */ + id: components["parameters"]["Id"]; }; cookie?: never; }; @@ -8991,21 +9119,20 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Collections"]; + data?: components["schemas"]["Presets"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; }; }; - deleteCollection: { + deletePreset: { parameters: { query?: never; header?: never; - path: { - /** @description Unique identifier of the collection. */ - id: string; + path: { + /** @description Index */ + id: components["parameters"]["Id"]; }; cookie?: never; }; @@ -9019,93 +9146,56 @@ export interface operations { content?: never; }; 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; }; }; - updateCollection: { + updatePreset: { parameters: { query?: { + /** @description Control what fields are being returned in the object. */ + fields?: components["parameters"]["Fields"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; }; header?: never; path: { - /** @description Unique identifier of the collection. */ - id: string; + /** @description Index */ + id: components["parameters"]["Id"]; }; cookie?: never; }; requestBody?: { content: { "application/json": { - /** @description Metadata of the collection. */ - meta?: { - /** - * @description Name of a Google Material Design Icon that's assigned to this collection. - * @example people - */ - icon?: string | null; - /** - * @description Choose the color for the icon assigned to this collection. - * @example #6644ff - */ - color?: string | null; - /** - * @description A note describing the collection. - * @example null - */ - note?: string | null; - /** - * @description Text representation of how items from this collection are shown across the system. - * @example null - */ - display_template?: string | null; - /** - * @description Whether or not the collection is hidden from the navigation in the admin app. - * @example false - */ - hidden?: boolean; - /** - * @description Whether or not the collection is treated as a single object. - * @example false - */ - singleton?: boolean; - /** - * @description Key value pairs of how to show this collection's name in different languages in the admin app. - * @example null - */ - translation?: string | null; - /** - * @description Whether or not Content Versioning is enabled for this collection. - * @example false - */ - versioning?: boolean; - /** - * @description What field holds the archive value. - * @example null - */ - archive_field?: string | null; - /** - * @description What value to use for "archived" items. - * @example null - */ - archive_app_filter?: string | null; - /** - * @description What value to use to "unarchive" items. - * @example null - */ - archive_value?: string | null; - /** - * @description Whether or not to show the "archived" filter. - * @example null - */ - unarchive_value?: string | null; - /** - * @description The sort field in the collection. - * @example null - */ - sort_field?: string | null; - }; + /** + * @description What collection this collection preset is used for. + * @example articles + */ + collection: string; + /** + * @description Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark. + * @example Highly rated articles + */ + title?: string; + /** @description The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role. */ + role?: number; + /** @description What the user searched for in search/filter in the header bar. */ + search_query?: string; + filters?: { + /** @example rating */ + field?: string; + /** @example gte */ + operator?: string; + /** @example 4.5 */ + value?: number; + }[]; + /** @description Name of the view type that is used. Defaults to tabular. */ + view_type?: string; + /** @description View query that's saved per view type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters. */ + view_query?: string; + /** @description Options of the views. The properties in here are controlled by the layout. */ + view_options?: string; + /** @description Key value pair of language-translation. Can be used to translate the bookmark title in multiple languages. */ + translation?: Record; }; }; }; @@ -9117,17 +9207,34 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Collections"]; + data?: components["schemas"]["Presets"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; }; }; - getFlows: { + getRoles: { parameters: { - query?: never; + query?: { + /** @description Control what fields are being returned in the object. */ + fields?: components["parameters"]["Fields"]; + /** @description A limit on the number of objects that are returned. */ + limit?: components["parameters"]["Limit"]; + /** @description How many items to skip when fetching data. */ + offset?: components["parameters"]["Offset"]; + /** @description What metadata to return in the response. */ + meta?: components["parameters"]["Meta"]; + /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. + * */ + sort?: components["parameters"]["Sort"]; + /** @description Select items in collection by given conditions. */ + filter?: components["parameters"]["Filter"]; + /** @description Filter by items that contain the given search query in one of their fields. */ + search?: components["parameters"]["Search"]; + /** @description Cursor for use in pagination. Often used in combination with limit. */ + page?: components["parameters"]["Page"]; + }; header?: never; path?: never; cookie?: never; @@ -9141,7 +9248,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Flows"][]; + data?: components["schemas"]["Roles"][]; meta?: components["schemas"]["x-metadata"]; }; }; @@ -9150,7 +9257,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - createFlow: { + createRole: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -9164,7 +9271,23 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["Flows"]; + "application/json": { + /** @description Description of the role. */ + description?: string; + /** @description Whether or not this role enforces the use of 2FA. */ + enforce_tfa?: boolean; + /** @description ID used with external services in SCIM. */ + external_id?: string; + /** @description Array of IP addresses that are allowed to connect to the API as a user of this role. */ + ip_access?: string[]; + /** @description Custom override for the admin app module bar navigation. */ + module_listing?: string; + /** + * @description Name of the role. + * @example Interns + */ + name?: string; + }; }; }; responses: { @@ -9175,7 +9298,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Flows"]; + data?: components["schemas"]["Roles"]; }; }; }; @@ -9183,7 +9306,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - deleteFlows: { + deleteRoles: { parameters: { query?: never; header?: never; @@ -9202,7 +9325,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - updateFlows: { + updateRoles: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -9228,8 +9351,24 @@ export interface operations { requestBody?: { content: { "application/json": { - data?: components["schemas"]["Flows"]; keys?: string[]; + data?: { + /** @description Description of the role. */ + description?: string; + /** @description Whether or not this role enforces the use of 2FA. */ + enforce_tfa?: boolean; + /** @description ID used with external services in SCIM. */ + external_id?: string; + /** @description Array of IP addresses that are allowed to connect to the API as a user of this role. */ + ip_access?: string[]; + /** @description Custom override for the admin app module bar navigation. */ + module_listing?: string; + /** + * @description Name of the role. + * @example Interns + */ + name?: string; + }; }; }; }; @@ -9241,7 +9380,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Flows"][]; + data?: components["schemas"]["Roles"][]; meta?: components["schemas"]["x-metadata"]; }; }; @@ -9249,9 +9388,14 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - getFlow: { + getRole: { parameters: { - query?: never; + query?: { + /** @description Control what fields are being returned in the object. */ + fields?: components["parameters"]["Fields"]; + /** @description What metadata to return in the response. */ + meta?: components["parameters"]["Meta"]; + }; header?: never; path: { /** @description Unique identifier for the object. */ @@ -9268,7 +9412,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Flows"]; + data?: components["schemas"]["Roles"]; }; }; }; @@ -9276,7 +9420,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - deleteFlow: { + deleteRole: { parameters: { query?: never; header?: never; @@ -9299,7 +9443,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - updateFlow: { + updateRole: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -9316,7 +9460,20 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["Flows"]; + "application/json": { + /** @description Description of the role. */ + description?: string; + /** @description Whether or not this role enforces the use of 2FA. */ + enforce_tfa?: boolean; + /** @description ID used with external services in SCIM. */ + external_id?: string; + /** @description Array of IP addresses that are allowed to connect to the API as a user of this role. */ + ip_access?: string[]; + /** @description Custom override for the admin app module bar navigation. */ + module_listing?: string; + /** @description Name of the role. */ + name?: string; + }; }; }; responses: { @@ -9327,7 +9484,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Flows"]; + data?: components["schemas"]["Roles"]; }; }; }; @@ -9335,7 +9492,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - getPresets: { + getComments: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -9369,7 +9526,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Presets"][]; + data?: components["schemas"]["Comments"][]; meta?: components["schemas"]["x-metadata"]; }; }; @@ -9377,7 +9534,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - createPreset: { + createComment: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -9390,41 +9547,17 @@ export interface operations { cookie?: never; }; requestBody?: { - content: { - "application/json": { - /** - * @description What collection this collection preset is used for. - * @example articles - */ - collection: string; - /** - * @description Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark. - * @example Highly rated articles - */ - title?: string; - /** - * @description The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role. - * @example null - */ - role?: string; - /** @description What the user searched for in search/filter in the header bar. */ - search?: string; - filters?: { - /** @example aHKLAakdVghzD */ - key?: string; - /** @example rating */ - field?: string; - /** @example gte */ - operator?: string; - /** @example 4.5 */ - value?: number; - }[]; - /** @description Name of the view type that is used. */ - layout?: string; - /** @description Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters. */ - layout_query?: string; - /** @description Options of the views. The properties in here are controlled by the layout. */ - layout_options?: string; + content: { + "application/json": { + /** + * @description Which collection this collection comment is for. + * @example projects + */ + collection: string; + /** @example 81dfa7e0-56d2-471f-b96a-1cf8a62bdf28 */ + item: string; + /** @example A new comment */ + comment: string; }; }; }; @@ -9436,14 +9569,14 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Presets"]; + data?: components["schemas"]["Comments"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; }; }; - deletePresets: { + deleteComments: { parameters: { query?: never; header?: never; @@ -9462,7 +9595,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - updatePresets: { + updateComments: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -9491,38 +9624,14 @@ export interface operations { keys?: string[]; data?: { /** - * @description What collection this collection preset is used for. - * @example articles + * @description Which collection this collection comment is for. + * @example projects */ collection: string; - /** - * @description Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark. - * @example Highly rated articles - */ - title?: string; - /** - * @description The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role. - * @example null - */ - role?: string; - /** @description What the user searched for in search/filter in the header bar. */ - search?: string; - filters?: { - /** @example aHKLAakdVghzD */ - key?: string; - /** @example rating */ - field?: string; - /** @example gte */ - operator?: string; - /** @example 4.5 */ - value?: number; - }[]; - /** @description Name of the view type that is used. */ - layout?: string; - /** @description Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters. */ - layout_query?: string; - /** @description Options of the views. The properties in here are controlled by the layout. */ - layout_options?: string; + /** @example 81dfa7e0-56d2-471f-b96a-1cf8a62bdf28 */ + item?: string; + /** @example A new comment */ + comment?: string; }; }; }; @@ -9535,7 +9644,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Presets"][]; + data?: components["schemas"]["Comments"][]; meta?: components["schemas"]["x-metadata"]; }; }; @@ -9543,7 +9652,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - getPreset: { + getComment: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -9552,10 +9661,7 @@ export interface operations { meta?: components["parameters"]["Meta"]; }; header?: never; - path: { - /** @description Index */ - id: components["parameters"]["Id"]; - }; + path?: never; cookie?: never; }; requestBody?: never; @@ -9567,21 +9673,18 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Presets"]; + data?: components["schemas"]["Comments"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; }; }; - deletePreset: { + deleteComment: { parameters: { query?: never; header?: never; - path: { - /** @description Index */ - id: components["parameters"]["Id"]; - }; + path?: never; cookie?: never; }; requestBody?: never; @@ -9596,7 +9699,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - updatePreset: { + updateComment: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -9605,45 +9708,21 @@ export interface operations { meta?: components["parameters"]["Meta"]; }; header?: never; - path: { - /** @description Index */ - id: components["parameters"]["Id"]; - }; + path?: never; cookie?: never; }; requestBody?: { content: { "application/json": { /** - * @description What collection this collection preset is used for. - * @example articles + * @description Which collection this comment is for. + * @example projects */ collection: string; - /** - * @description Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark. - * @example Highly rated articles - */ - title?: string; - /** @description The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role. */ - role?: number; - /** @description What the user searched for in search/filter in the header bar. */ - search_query?: string; - filters?: { - /** @example rating */ - field?: string; - /** @example gte */ - operator?: string; - /** @example 4.5 */ - value?: number; - }[]; - /** @description Name of the view type that is used. Defaults to tabular. */ - view_type?: string; - /** @description View query that's saved per view type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters. */ - view_query?: string; - /** @description Options of the views. The properties in here are controlled by the layout. */ - view_options?: string; - /** @description Key value pair of language-translation. Can be used to translate the bookmark title in multiple languages. */ - translation?: Record; + /** @example 81dfa7e0-56d2-471f-b96a-1cf8a62bdf28 */ + item?: string; + /** @example An updated comment */ + comment?: string; }; }; }; @@ -9655,24 +9734,25 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Presets"]; + data?: components["schemas"]["Comments"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; }; }; - getRoles: { + getActivities: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ fields?: components["parameters"]["Fields"]; /** @description A limit on the number of objects that are returned. */ limit?: components["parameters"]["Limit"]; - /** @description How many items to skip when fetching data. */ - offset?: components["parameters"]["Offset"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; + /** @description How many items to skip when fetching data. */ + offset?: components["parameters"]["Offset"]; /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. * */ sort?: components["parameters"]["Sort"]; @@ -9680,8 +9760,6 @@ export interface operations { filter?: components["parameters"]["Filter"]; /** @description Filter by items that contain the given search query in one of their fields. */ search?: components["parameters"]["Search"]; - /** @description Cursor for use in pagination. Often used in combination with limit. */ - page?: components["parameters"]["Page"]; }; header?: never; path?: never; @@ -9696,7 +9774,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Roles"][]; + data?: components["schemas"]["Activity"][]; meta?: components["schemas"]["x-metadata"]; }; }; @@ -9705,7 +9783,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - createRole: { + getActivity: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -9714,30 +9792,13 @@ export interface operations { meta?: components["parameters"]["Meta"]; }; header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": { - /** @description Description of the role. */ - description?: string; - /** @description Whether or not this role enforces the use of 2FA. */ - enforce_tfa?: boolean; - /** @description ID used with external services in SCIM. */ - external_id?: string; - /** @description Array of IP addresses that are allowed to connect to the API as a user of this role. */ - ip_access?: string[]; - /** @description Custom override for the admin app module bar navigation. */ - module_listing?: string; - /** - * @description Name of the role. - * @example Interns - */ - name?: string; - }; + path: { + /** @description Index */ + id: components["parameters"]["Id"]; }; + cookie?: never; }; + requestBody?: never; responses: { /** @description Successful request */ 200: { @@ -9746,7 +9807,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Roles"]; + data?: components["schemas"]["Activity"]; }; }; }; @@ -9754,9 +9815,25 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - deleteRoles: { + readItemsRecipes: { parameters: { - query?: never; + query?: { + /** @description Control what fields are being returned in the object. */ + fields?: components["parameters"]["Fields"]; + /** @description A limit on the number of objects that are returned. */ + limit?: components["parameters"]["Limit"]; + /** @description What metadata to return in the response. */ + meta?: components["parameters"]["Meta"]; + /** @description How many items to skip when fetching data. */ + offset?: components["parameters"]["Offset"]; + /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. + * */ + sort?: components["parameters"]["Sort"]; + /** @description Select items in collection by given conditions. */ + filter?: components["parameters"]["Filter"]; + /** @description Filter by items that contain the given search query in one of their fields. */ + search?: components["parameters"]["Search"]; + }; header?: never; path?: never; cookie?: never; @@ -9768,29 +9845,21 @@ export interface operations { headers: { [name: string]: unknown; }; - content?: never; + content: { + "application/json": { + data?: components["schemas"]["ItemsRecipes"][]; + meta?: components["schemas"]["x-metadata"]; + }; + }; }; 401: components["responses"]["UnauthorizedError"]; }; }; - updateRoles: { + createItemsRecipes: { parameters: { query?: { - /** @description Control what fields are being returned in the object. */ - fields?: components["parameters"]["Fields"]; - /** @description A limit on the number of objects that are returned. */ - limit?: components["parameters"]["Limit"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; - /** @description How many items to skip when fetching data. */ - offset?: components["parameters"]["Offset"]; - /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. - * */ - sort?: components["parameters"]["Sort"]; - /** @description Select items in collection by given conditions. */ - filter?: components["parameters"]["Filter"]; - /** @description Filter by items that contain the given search query in one of their fields. */ - search?: components["parameters"]["Search"]; }; header?: never; path?: never; @@ -9798,27 +9867,70 @@ export interface operations { }; requestBody?: { content: { - "application/json": { - keys?: string[]; - data?: { - /** @description Description of the role. */ - description?: string; - /** @description Whether or not this role enforces the use of 2FA. */ - enforce_tfa?: boolean; - /** @description ID used with external services in SCIM. */ - external_id?: string; - /** @description Array of IP addresses that are allowed to connect to the API as a user of this role. */ - ip_access?: string[]; - /** @description Custom override for the admin app module bar navigation. */ - module_listing?: string; - /** - * @description Name of the role. - * @example Interns - */ - name?: string; + "application/json": components["schemas"]["ItemsRecipes"][] | components["schemas"]["ItemsRecipes"]; + }; + }; + responses: { + /** @description Successful request */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data?: unknown; }; }; }; + 401: components["responses"]["UnauthorizedError"]; + }; + }; + deleteItemsRecipes: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful request */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + 401: components["responses"]["UnauthorizedError"]; + }; + }; + updateItemsRecipes: { + parameters: { + query?: { + /** @description Control what fields are being returned in the object. */ + fields?: components["parameters"]["Fields"]; + /** @description A limit on the number of objects that are returned. */ + limit?: components["parameters"]["Limit"]; + /** @description What metadata to return in the response. */ + meta?: components["parameters"]["Meta"]; + /** @description How many items to skip when fetching data. */ + offset?: components["parameters"]["Offset"]; + /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. + * */ + sort?: components["parameters"]["Sort"]; + /** @description Select items in collection by given conditions. */ + filter?: components["parameters"]["Filter"]; + /** @description Filter by items that contain the given search query in one of their fields. */ + search?: components["parameters"]["Search"]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ItemsRecipes"][] | components["schemas"]["ItemsRecipes"]; + }; }; responses: { /** @description Successful request */ @@ -9828,26 +9940,27 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Roles"][]; - meta?: components["schemas"]["x-metadata"]; + data?: unknown; }; }; }; - 401: components["responses"]["UnauthorizedError"]; }; }; - getRole: { + readSingleItemsRecipes: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ fields?: components["parameters"]["Fields"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; + /** @description Retrieve an item's state from a specific Content Version. The value corresponds to the "key" of the Content Version. + * */ + version?: components["parameters"]["Version"]; }; header?: never; path: { - /** @description Unique identifier for the object. */ - id: components["parameters"]["UUId"]; + /** @description Index of the item. */ + id: number | string; }; cookie?: never; }; @@ -9860,7 +9973,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Roles"]; + data?: components["schemas"]["ItemsRecipes"]; }; }; }; @@ -9868,13 +9981,13 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - deleteRole: { + deleteSingleItemsRecipes: { parameters: { query?: never; header?: never; path: { - /** @description Unique identifier for the object. */ - id: components["parameters"]["UUId"]; + /** @description Index of the item. */ + id: number | string; }; cookie?: never; }; @@ -9891,7 +10004,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - updateRole: { + updateSingleItemsRecipes: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -9901,27 +10014,14 @@ export interface operations { }; header?: never; path: { - /** @description Unique identifier for the object. */ - id: components["parameters"]["UUId"]; + /** @description Index of the item. */ + id: number | string; }; cookie?: never; }; requestBody?: { content: { - "application/json": { - /** @description Description of the role. */ - description?: string; - /** @description Whether or not this role enforces the use of 2FA. */ - enforce_tfa?: boolean; - /** @description ID used with external services in SCIM. */ - external_id?: string; - /** @description Array of IP addresses that are allowed to connect to the API as a user of this role. */ - ip_access?: string[]; - /** @description Custom override for the admin app module bar navigation. */ - module_listing?: string; - /** @description Name of the role. */ - name?: string; - }; + "application/json": components["schemas"]["ItemsRecipes"]; }; }; responses: { @@ -9932,7 +10032,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Roles"]; + data?: components["schemas"]["ItemsRecipes"]; }; }; }; @@ -9940,17 +10040,17 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - getComments: { + readItemsInstructions: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ fields?: components["parameters"]["Fields"]; /** @description A limit on the number of objects that are returned. */ limit?: components["parameters"]["Limit"]; + /** @description What metadata to return in the response. */ + meta?: components["parameters"]["Meta"]; /** @description How many items to skip when fetching data. */ offset?: components["parameters"]["Offset"]; - /** @description Cursor for use in pagination. Often used in combination with limit. */ - page?: components["parameters"]["Page"]; /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. * */ sort?: components["parameters"]["Sort"]; @@ -9958,8 +10058,6 @@ export interface operations { filter?: components["parameters"]["Filter"]; /** @description Filter by items that contain the given search query in one of their fields. */ search?: components["parameters"]["Search"]; - /** @description What metadata to return in the response. */ - meta?: components["parameters"]["Meta"]; }; header?: never; path?: never; @@ -9974,7 +10072,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Comments"][]; + data?: components["schemas"]["ItemsInstructions"][]; meta?: components["schemas"]["x-metadata"]; }; }; @@ -9982,11 +10080,9 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - createComment: { + createItemsInstructions: { parameters: { query?: { - /** @description Control what fields are being returned in the object. */ - fields?: components["parameters"]["Fields"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; }; @@ -9996,17 +10092,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": { - /** - * @description Which collection this collection comment is for. - * @example projects - */ - collection: string; - /** @example 81dfa7e0-56d2-471f-b96a-1cf8a62bdf28 */ - item: string; - /** @example A new comment */ - comment: string; - }; + "application/json": components["schemas"]["ItemsInstructions"][] | components["schemas"]["ItemsInstructions"]; }; }; responses: { @@ -10017,14 +10103,14 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Comments"]; + data?: unknown; }; }; }; 401: components["responses"]["UnauthorizedError"]; }; }; - deleteComments: { + deleteItemsInstructions: { parameters: { query?: never; header?: never; @@ -10043,7 +10129,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - updateComments: { + updateItemsInstructions: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -10068,20 +10154,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": { - keys?: string[]; - data?: { - /** - * @description Which collection this collection comment is for. - * @example projects - */ - collection: string; - /** @example 81dfa7e0-56d2-471f-b96a-1cf8a62bdf28 */ - item?: string; - /** @example A new comment */ - comment?: string; - }; - }; + "application/json": components["schemas"]["ItemsInstructions"][] | components["schemas"]["ItemsInstructions"]; }; }; responses: { @@ -10092,24 +10165,28 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Comments"][]; - meta?: components["schemas"]["x-metadata"]; + data?: unknown; }; }; }; - 401: components["responses"]["UnauthorizedError"]; }; }; - getComment: { + readSingleItemsInstructions: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ fields?: components["parameters"]["Fields"]; /** @description What metadata to return in the response. */ meta?: components["parameters"]["Meta"]; + /** @description Retrieve an item's state from a specific Content Version. The value corresponds to the "key" of the Content Version. + * */ + version?: components["parameters"]["Version"]; }; header?: never; - path?: never; + path: { + /** @description Index of the item. */ + id: number | string; + }; cookie?: never; }; requestBody?: never; @@ -10121,18 +10198,22 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Comments"]; + data?: components["schemas"]["ItemsInstructions"]; }; }; }; 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; }; }; - deleteComment: { + deleteSingleItemsInstructions: { parameters: { query?: never; header?: never; - path?: never; + path: { + /** @description Index of the item. */ + id: number | string; + }; cookie?: never; }; requestBody?: never; @@ -10145,9 +10226,10 @@ export interface operations { content?: never; }; 401: components["responses"]["UnauthorizedError"]; + 404: components["responses"]["NotFoundError"]; }; }; - updateComment: { + updateSingleItemsInstructions: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -10156,97 +10238,17 @@ export interface operations { meta?: components["parameters"]["Meta"]; }; header?: never; - path?: never; + path: { + /** @description Index of the item. */ + id: number | string; + }; cookie?: never; }; requestBody?: { content: { - "application/json": { - /** - * @description Which collection this comment is for. - * @example projects - */ - collection: string; - /** @example 81dfa7e0-56d2-471f-b96a-1cf8a62bdf28 */ - item?: string; - /** @example An updated comment */ - comment?: string; - }; - }; - }; - responses: { - /** @description Successful request */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - data?: components["schemas"]["Comments"]; - }; - }; - }; - 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; - }; - }; - getActivities: { - parameters: { - query?: { - /** @description Control what fields are being returned in the object. */ - fields?: components["parameters"]["Fields"]; - /** @description A limit on the number of objects that are returned. */ - limit?: components["parameters"]["Limit"]; - /** @description What metadata to return in the response. */ - meta?: components["parameters"]["Meta"]; - /** @description How many items to skip when fetching data. */ - offset?: components["parameters"]["Offset"]; - /** @description How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV. You can also use a ` ? ` to sort randomly. - * */ - sort?: components["parameters"]["Sort"]; - /** @description Select items in collection by given conditions. */ - filter?: components["parameters"]["Filter"]; - /** @description Filter by items that contain the given search query in one of their fields. */ - search?: components["parameters"]["Search"]; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful request */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - data?: components["schemas"]["Activity"][]; - meta?: components["schemas"]["x-metadata"]; - }; - }; - }; - 401: components["responses"]["UnauthorizedError"]; - 404: components["responses"]["NotFoundError"]; - }; - }; - getActivity: { - parameters: { - query?: { - /** @description Control what fields are being returned in the object. */ - fields?: components["parameters"]["Fields"]; - /** @description What metadata to return in the response. */ - meta?: components["parameters"]["Meta"]; - }; - header?: never; - path: { - /** @description Index */ - id: components["parameters"]["Id"]; + "application/json": components["schemas"]["ItemsInstructions"]; }; - cookie?: never; }; - requestBody?: never; responses: { /** @description Successful request */ 200: { @@ -10255,7 +10257,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["Activity"]; + data?: components["schemas"]["ItemsInstructions"]; }; }; }; @@ -10263,7 +10265,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - readItemsRecipes: { + readItemsIngredients: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -10295,7 +10297,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsRecipes"][]; + data?: components["schemas"]["ItemsIngredients"][]; meta?: components["schemas"]["x-metadata"]; }; }; @@ -10303,7 +10305,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - createItemsRecipes: { + createItemsIngredients: { parameters: { query?: { /** @description What metadata to return in the response. */ @@ -10315,7 +10317,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsRecipes"][] | components["schemas"]["ItemsRecipes"]; + "application/json": components["schemas"]["ItemsIngredients"][] | components["schemas"]["ItemsIngredients"]; }; }; responses: { @@ -10333,7 +10335,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - deleteItemsRecipes: { + deleteItemsIngredients: { parameters: { query?: never; header?: never; @@ -10352,7 +10354,7 @@ export interface operations { 401: components["responses"]["UnauthorizedError"]; }; }; - updateItemsRecipes: { + updateItemsIngredients: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -10377,7 +10379,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsRecipes"][] | components["schemas"]["ItemsRecipes"]; + "application/json": components["schemas"]["ItemsIngredients"][] | components["schemas"]["ItemsIngredients"]; }; }; responses: { @@ -10394,7 +10396,7 @@ export interface operations { }; }; }; - readSingleItemsRecipes: { + readSingleItemsIngredients: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -10421,7 +10423,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsRecipes"]; + data?: components["schemas"]["ItemsIngredients"]; }; }; }; @@ -10429,7 +10431,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - deleteSingleItemsRecipes: { + deleteSingleItemsIngredients: { parameters: { query?: never; header?: never; @@ -10452,7 +10454,7 @@ export interface operations { 404: components["responses"]["NotFoundError"]; }; }; - updateSingleItemsRecipes: { + updateSingleItemsIngredients: { parameters: { query?: { /** @description Control what fields are being returned in the object. */ @@ -10469,7 +10471,7 @@ export interface operations { }; requestBody?: { content: { - "application/json": components["schemas"]["ItemsRecipes"]; + "application/json": components["schemas"]["ItemsIngredients"]; }; }; responses: { @@ -10480,7 +10482,7 @@ export interface operations { }; content: { "application/json": { - data?: components["schemas"]["ItemsRecipes"]; + data?: components["schemas"]["ItemsIngredients"]; }; }; }; diff --git a/openapi/directus.json b/openapi/directus.json index a3bdf42..031fe10 100644 --- a/openapi/directus.json +++ b/openapi/directus.json @@ -5461,15 +5461,15 @@ ] } }, - "/items/instructions": { + "/items/home_page": { "post": { "summary": "Create an Item", - "description": "Create a new instructions item.", + "description": "Create a new home_page item.", "tags": [ "Items", - "ItemsInstructions" + "ItemsHomePage" ], - "operationId": "createItemsInstructions", + "operationId": "createItemsHomePage", "parameters": [ { "$ref": "#/components/parameters/Meta" @@ -5483,11 +5483,11 @@ { "type": "array", "items": { - "$ref": "#/components/schemas/ItemsInstructions" + "$ref": "#/components/schemas/ItemsHomePage" } }, { - "$ref": "#/components/schemas/ItemsInstructions" + "$ref": "#/components/schemas/ItemsHomePage" } ] } @@ -5504,7 +5504,7 @@ "properties": { "data": { "items": { - "$ref": "#/components/schemas/ItemsInstructions" + "$ref": "#/components/schemas/ItemsHomePage" } } } @@ -5519,12 +5519,12 @@ }, "get": { "summary": "List Items", - "description": "List the instructions items.", + "description": "List the home_page items.", "tags": [ "Items", - "ItemsInstructions" + "ItemsHomePage" ], - "operationId": "readItemsInstructions", + "operationId": "readItemsHomePage", "security": [ { "Auth": [] @@ -5565,7 +5565,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/components/schemas/ItemsInstructions" + "$ref": "#/components/schemas/ItemsHomePage" } }, "meta": { @@ -5583,12 +5583,12 @@ }, "patch": { "summary": "Update Multiple Items", - "description": "Update multiple instructions items at the same time.", + "description": "Update multiple home_page items at the same time.", "tags": [ "Items", - "ItemsInstructions" + "ItemsHomePage" ], - "operationId": "updateItemsInstructions", + "operationId": "updateItemsHomePage", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -5620,11 +5620,11 @@ { "type": "array", "items": { - "$ref": "#/components/schemas/ItemsInstructions" + "$ref": "#/components/schemas/ItemsHomePage" } }, { - "$ref": "#/components/schemas/ItemsInstructions" + "$ref": "#/components/schemas/ItemsHomePage" } ] } @@ -5640,7 +5640,7 @@ "properties": { "data": { "items": { - "$ref": "#/components/schemas/ItemsInstructions" + "$ref": "#/components/schemas/ItemsHomePage" } } } @@ -5652,12 +5652,12 @@ }, "delete": { "summary": "Delete Multiple Items", - "description": "Delete multiple existing instructions items.", + "description": "Delete multiple existing home_page items.", "tags": [ "Items", - "ItemsInstructions" + "ItemsHomePage" ], - "operationId": "deleteItemsInstructions", + "operationId": "deleteItemsHomePage", "responses": { "200": { "description": "Successful request" @@ -5669,15 +5669,15 @@ "parameters": [] } }, - "/items/instructions/{id}": { + "/items/home_page/{id}": { "get": { "summary": "Retrieve an Item", - "description": "Retrieve a single instructions item by unique identifier.", + "description": "Retrieve a single home_page item by unique identifier.", "tags": [ "Items", - "ItemsInstructions" + "ItemsHomePage" ], - "operationId": "readSingleItemsInstructions", + "operationId": "readSingleItemsHomePage", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -5719,7 +5719,7 @@ "properties": { "data": { "type": "object", - "$ref": "#/components/schemas/ItemsInstructions" + "$ref": "#/components/schemas/ItemsHomePage" } } } @@ -5736,12 +5736,12 @@ }, "patch": { "summary": "Update an Item", - "description": "Update an existing instructions item.", + "description": "Update an existing home_page item.", "tags": [ "Items", - "ItemsInstructions" + "ItemsHomePage" ], - "operationId": "updateSingleItemsInstructions", + "operationId": "updateSingleItemsHomePage", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -5775,7 +5775,7 @@ "application/json": { "schema": { "type": "object", - "$ref": "#/components/schemas/ItemsInstructions" + "$ref": "#/components/schemas/ItemsHomePage" } } } @@ -5790,7 +5790,7 @@ "properties": { "data": { "type": "object", - "$ref": "#/components/schemas/ItemsInstructions" + "$ref": "#/components/schemas/ItemsHomePage" } } } @@ -5807,12 +5807,12 @@ }, "delete": { "summary": "Delete an Item", - "description": "Delete an existing instructions item.", + "description": "Delete an existing home_page item.", "tags": [ "Items", - "ItemsInstructions" + "ItemsHomePage" ], - "operationId": "deleteSingleItemsInstructions", + "operationId": "deleteSingleItemsHomePage", "responses": { "200": { "description": "Successful request" @@ -5848,15 +5848,15 @@ ] } }, - "/items/home_page": { + "/items/recipes_page": { "post": { "summary": "Create an Item", - "description": "Create a new home_page item.", + "description": "Create a new recipes_page item.", "tags": [ "Items", - "ItemsHomePage" + "ItemsRecipesPage" ], - "operationId": "createItemsHomePage", + "operationId": "createItemsRecipesPage", "parameters": [ { "$ref": "#/components/parameters/Meta" @@ -5870,11 +5870,11 @@ { "type": "array", "items": { - "$ref": "#/components/schemas/ItemsHomePage" + "$ref": "#/components/schemas/ItemsRecipesPage" } }, { - "$ref": "#/components/schemas/ItemsHomePage" + "$ref": "#/components/schemas/ItemsRecipesPage" } ] } @@ -5891,7 +5891,7 @@ "properties": { "data": { "items": { - "$ref": "#/components/schemas/ItemsHomePage" + "$ref": "#/components/schemas/ItemsRecipesPage" } } } @@ -5906,12 +5906,12 @@ }, "get": { "summary": "List Items", - "description": "List the home_page items.", + "description": "List the recipes_page items.", "tags": [ "Items", - "ItemsHomePage" + "ItemsRecipesPage" ], - "operationId": "readItemsHomePage", + "operationId": "readItemsRecipesPage", "security": [ { "Auth": [] @@ -5952,7 +5952,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/components/schemas/ItemsHomePage" + "$ref": "#/components/schemas/ItemsRecipesPage" } }, "meta": { @@ -5970,12 +5970,12 @@ }, "patch": { "summary": "Update Multiple Items", - "description": "Update multiple home_page items at the same time.", + "description": "Update multiple recipes_page items at the same time.", "tags": [ "Items", - "ItemsHomePage" + "ItemsRecipesPage" ], - "operationId": "updateItemsHomePage", + "operationId": "updateItemsRecipesPage", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -6007,11 +6007,11 @@ { "type": "array", "items": { - "$ref": "#/components/schemas/ItemsHomePage" + "$ref": "#/components/schemas/ItemsRecipesPage" } }, { - "$ref": "#/components/schemas/ItemsHomePage" + "$ref": "#/components/schemas/ItemsRecipesPage" } ] } @@ -6027,7 +6027,7 @@ "properties": { "data": { "items": { - "$ref": "#/components/schemas/ItemsHomePage" + "$ref": "#/components/schemas/ItemsRecipesPage" } } } @@ -6039,12 +6039,12 @@ }, "delete": { "summary": "Delete Multiple Items", - "description": "Delete multiple existing home_page items.", + "description": "Delete multiple existing recipes_page items.", "tags": [ "Items", - "ItemsHomePage" + "ItemsRecipesPage" ], - "operationId": "deleteItemsHomePage", + "operationId": "deleteItemsRecipesPage", "responses": { "200": { "description": "Successful request" @@ -6056,15 +6056,15 @@ "parameters": [] } }, - "/items/home_page/{id}": { + "/items/recipes_page/{id}": { "get": { "summary": "Retrieve an Item", - "description": "Retrieve a single home_page item by unique identifier.", + "description": "Retrieve a single recipes_page item by unique identifier.", "tags": [ "Items", - "ItemsHomePage" + "ItemsRecipesPage" ], - "operationId": "readSingleItemsHomePage", + "operationId": "readSingleItemsRecipesPage", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -6106,7 +6106,7 @@ "properties": { "data": { "type": "object", - "$ref": "#/components/schemas/ItemsHomePage" + "$ref": "#/components/schemas/ItemsRecipesPage" } } } @@ -6123,12 +6123,12 @@ }, "patch": { "summary": "Update an Item", - "description": "Update an existing home_page item.", + "description": "Update an existing recipes_page item.", "tags": [ "Items", - "ItemsHomePage" + "ItemsRecipesPage" ], - "operationId": "updateSingleItemsHomePage", + "operationId": "updateSingleItemsRecipesPage", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -6162,7 +6162,7 @@ "application/json": { "schema": { "type": "object", - "$ref": "#/components/schemas/ItemsHomePage" + "$ref": "#/components/schemas/ItemsRecipesPage" } } } @@ -6177,7 +6177,7 @@ "properties": { "data": { "type": "object", - "$ref": "#/components/schemas/ItemsHomePage" + "$ref": "#/components/schemas/ItemsRecipesPage" } } } @@ -6194,12 +6194,12 @@ }, "delete": { "summary": "Delete an Item", - "description": "Delete an existing home_page item.", + "description": "Delete an existing recipes_page item.", "tags": [ "Items", - "ItemsHomePage" + "ItemsRecipesPage" ], - "operationId": "deleteSingleItemsHomePage", + "operationId": "deleteSingleItemsRecipesPage", "responses": { "200": { "description": "Successful request" @@ -6235,15 +6235,15 @@ ] } }, - "/items/recipes_page": { + "/items/ingredient_unit_forms": { "post": { "summary": "Create an Item", - "description": "Create a new recipes_page item.", + "description": "Create a new ingredient_unit_forms item.", "tags": [ "Items", - "ItemsRecipesPage" + "ItemsIngredientUnitForms" ], - "operationId": "createItemsRecipesPage", + "operationId": "createItemsIngredientUnitForms", "parameters": [ { "$ref": "#/components/parameters/Meta" @@ -6257,11 +6257,11 @@ { "type": "array", "items": { - "$ref": "#/components/schemas/ItemsRecipesPage" + "$ref": "#/components/schemas/ItemsIngredientUnitForms" } }, { - "$ref": "#/components/schemas/ItemsRecipesPage" + "$ref": "#/components/schemas/ItemsIngredientUnitForms" } ] } @@ -6278,7 +6278,7 @@ "properties": { "data": { "items": { - "$ref": "#/components/schemas/ItemsRecipesPage" + "$ref": "#/components/schemas/ItemsIngredientUnitForms" } } } @@ -6293,12 +6293,12 @@ }, "get": { "summary": "List Items", - "description": "List the recipes_page items.", + "description": "List the ingredient_unit_forms items.", "tags": [ "Items", - "ItemsRecipesPage" + "ItemsIngredientUnitForms" ], - "operationId": "readItemsRecipesPage", + "operationId": "readItemsIngredientUnitForms", "security": [ { "Auth": [] @@ -6339,7 +6339,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/components/schemas/ItemsRecipesPage" + "$ref": "#/components/schemas/ItemsIngredientUnitForms" } }, "meta": { @@ -6357,12 +6357,12 @@ }, "patch": { "summary": "Update Multiple Items", - "description": "Update multiple recipes_page items at the same time.", + "description": "Update multiple ingredient_unit_forms items at the same time.", "tags": [ "Items", - "ItemsRecipesPage" + "ItemsIngredientUnitForms" ], - "operationId": "updateItemsRecipesPage", + "operationId": "updateItemsIngredientUnitForms", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -6394,11 +6394,11 @@ { "type": "array", "items": { - "$ref": "#/components/schemas/ItemsRecipesPage" + "$ref": "#/components/schemas/ItemsIngredientUnitForms" } }, { - "$ref": "#/components/schemas/ItemsRecipesPage" + "$ref": "#/components/schemas/ItemsIngredientUnitForms" } ] } @@ -6414,7 +6414,7 @@ "properties": { "data": { "items": { - "$ref": "#/components/schemas/ItemsRecipesPage" + "$ref": "#/components/schemas/ItemsIngredientUnitForms" } } } @@ -6426,12 +6426,12 @@ }, "delete": { "summary": "Delete Multiple Items", - "description": "Delete multiple existing recipes_page items.", + "description": "Delete multiple existing ingredient_unit_forms items.", "tags": [ "Items", - "ItemsRecipesPage" + "ItemsIngredientUnitForms" ], - "operationId": "deleteItemsRecipesPage", + "operationId": "deleteItemsIngredientUnitForms", "responses": { "200": { "description": "Successful request" @@ -6443,15 +6443,15 @@ "parameters": [] } }, - "/items/recipes_page/{id}": { + "/items/ingredient_unit_forms/{id}": { "get": { "summary": "Retrieve an Item", - "description": "Retrieve a single recipes_page item by unique identifier.", + "description": "Retrieve a single ingredient_unit_forms item by unique identifier.", "tags": [ "Items", - "ItemsRecipesPage" + "ItemsIngredientUnitForms" ], - "operationId": "readSingleItemsRecipesPage", + "operationId": "readSingleItemsIngredientUnitForms", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -6493,7 +6493,7 @@ "properties": { "data": { "type": "object", - "$ref": "#/components/schemas/ItemsRecipesPage" + "$ref": "#/components/schemas/ItemsIngredientUnitForms" } } } @@ -6510,12 +6510,12 @@ }, "patch": { "summary": "Update an Item", - "description": "Update an existing recipes_page item.", + "description": "Update an existing ingredient_unit_forms item.", "tags": [ "Items", - "ItemsRecipesPage" + "ItemsIngredientUnitForms" ], - "operationId": "updateSingleItemsRecipesPage", + "operationId": "updateSingleItemsIngredientUnitForms", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -6549,7 +6549,7 @@ "application/json": { "schema": { "type": "object", - "$ref": "#/components/schemas/ItemsRecipesPage" + "$ref": "#/components/schemas/ItemsIngredientUnitForms" } } } @@ -6564,7 +6564,7 @@ "properties": { "data": { "type": "object", - "$ref": "#/components/schemas/ItemsRecipesPage" + "$ref": "#/components/schemas/ItemsIngredientUnitForms" } } } @@ -6581,12 +6581,12 @@ }, "delete": { "summary": "Delete an Item", - "description": "Delete an existing recipes_page item.", + "description": "Delete an existing ingredient_unit_forms item.", "tags": [ "Items", - "ItemsRecipesPage" + "ItemsIngredientUnitForms" ], - "operationId": "deleteSingleItemsRecipesPage", + "operationId": "deleteSingleItemsIngredientUnitForms", "responses": { "200": { "description": "Successful request" @@ -6622,39 +6622,11 @@ ] } }, - "/items/ingredient_unit_forms": { - "post": { - "summary": "Create an Item", - "description": "Create a new ingredient_unit_forms item.", - "tags": [ - "Items", - "ItemsIngredientUnitForms" - ], - "operationId": "createItemsIngredientUnitForms", - "parameters": [ - { - "$ref": "#/components/parameters/Meta" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ItemsIngredientUnitForms" - } - }, - { - "$ref": "#/components/schemas/ItemsIngredientUnitForms" - } - ] - } - } - } - }, + "/webhooks": { + "get": { + "summary": "List Webhooks", + "description": "Get all webhooks.", + "operationId": "getWebhooks", "responses": { "200": { "description": "Successful request", @@ -6664,9 +6636,7 @@ "type": "object", "properties": { "data": { - "items": { - "$ref": "#/components/schemas/ItemsIngredientUnitForms" - } + "$ref": "#/components/schemas/Webhooks" } } } @@ -6675,45 +6645,71 @@ }, "401": { "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" } - } - }, - "get": { - "summary": "List Items", - "description": "List the ingredient_unit_forms items.", + }, "tags": [ - "Items", - "ItemsIngredientUnitForms" - ], - "operationId": "readItemsIngredientUnitForms", - "security": [ - { - "Auth": [] - } - ], + "Webhooks" + ] + }, + "post": { + "summary": "Create a Webhook", + "description": "Create a new webhook.", + "operationId": "createWebhook", "parameters": [ { "$ref": "#/components/parameters/Fields" }, - { - "$ref": "#/components/parameters/Limit" - }, { "$ref": "#/components/parameters/Meta" - }, - { - "$ref": "#/components/parameters/Offset" - }, - { - "$ref": "#/components/parameters/Sort" - }, - { - "$ref": "#/components/parameters/Filter" - }, - { - "$ref": "#/components/parameters/Search" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "The name of the webhook.", + "type": "string", + "example": "create articles" + }, + "method": { + "description": "Method used in the webhook.", + "type": "string", + "example": "POST" + }, + "url": { + "description": "The url of the webhook.", + "type": "string", + "example": null + }, + "status": { + "description": "The status of the webhook.", + "type": "string", + "example": "active" + }, + "data": { + "description": "If yes, send the content of what was done", + "type": "boolean", + "example": true + }, + "actions": { + "description": "The actions that triggers this webhook.", + "example": null + }, + "system-collections": { + "description": "The collections that triggers this webhook.", + "example": null + } + }, + "type": "object" + } + } + } + }, "responses": { "200": { "description": "Successful request", @@ -6723,14 +6719,7 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/components/schemas/ItemsIngredientUnitForms" - } - }, - "meta": { - "$ref": "#/components/schemas/x-metadata" + "$ref": "#/components/schemas/Roles" } } } @@ -6739,17 +6728,22 @@ }, "401": { "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" } - } + }, + "tags": [ + "Webhooks" + ] }, "patch": { - "summary": "Update Multiple Items", - "description": "Update multiple ingredient_unit_forms items at the same time.", + "summary": "Update Multiple Webhooks", + "description": "Update multiple webhooks at the same time.", "tags": [ - "Items", - "ItemsIngredientUnitForms" + "Webhooks" ], - "operationId": "updateItemsIngredientUnitForms", + "operationId": "updateWebhooks", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -6777,17 +6771,53 @@ "content": { "application/json": { "schema": { - "oneOf": [ - { + "properties": { + "data": { + "properties": { + "name": { + "description": "The name of the webhook.", + "type": "string", + "example": "create articles" + }, + "method": { + "description": "Method used in the webhook.", + "type": "string", + "example": "POST" + }, + "url": { + "description": "The url of the webhook.", + "type": "string", + "example": null + }, + "status": { + "description": "The status of the webhook.", + "type": "string", + "example": "active" + }, + "data": { + "description": "If yes, send the content of what was done", + "type": "boolean", + "example": true + }, + "actions": { + "description": "The actions that triggers this webhook.", + "example": null + }, + "system-collections": { + "description": "The collections that triggers this webhook.", + "example": null + } + }, + "type": "object" + }, + "keys": { "type": "array", "items": { - "$ref": "#/components/schemas/ItemsIngredientUnitForms" + "type": "string" } - }, - { - "$ref": "#/components/schemas/ItemsIngredientUnitForms" } - ] + }, + "type": "object" } } } @@ -6798,27 +6828,34 @@ "content": { "application/json": { "schema": { + "type": "object", "properties": { "data": { + "type": "array", "items": { - "$ref": "#/components/schemas/ItemsIngredientUnitForms" + "$ref": "#/components/schemas/Webhooks" } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" } } } } } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" } } }, "delete": { - "summary": "Delete Multiple Items", - "description": "Delete multiple existing ingredient_unit_forms items.", + "summary": "Delete Multiple Webhooks", + "description": "Delete multiple existing webhooks.", "tags": [ - "Items", - "ItemsIngredientUnitForms" + "Webhooks" ], - "operationId": "deleteItemsIngredientUnitForms", + "operationId": "deleteWebhooks", "responses": { "200": { "description": "Successful request" @@ -6826,50 +6863,14 @@ "401": { "$ref": "#/components/responses/UnauthorizedError" } - }, - "parameters": [] + } } }, - "/items/ingredient_unit_forms/{id}": { + "/webhooks/{id}": { "get": { - "summary": "Retrieve an Item", - "description": "Retrieve a single ingredient_unit_forms item by unique identifier.", - "tags": [ - "Items", - "ItemsIngredientUnitForms" - ], - "operationId": "readSingleItemsIngredientUnitForms", - "parameters": [ - { - "$ref": "#/components/parameters/Fields" - }, - { - "$ref": "#/components/parameters/Meta" - }, - { - "$ref": "#/components/parameters/Version" - }, - { - "name": "id", - "description": "Index of the item.", - "in": "path", - "required": true, - "schema": { - "oneOf": [ - { - "type": "integer", - "description": "Incremental index of the item.", - "example": 1 - }, - { - "type": "string", - "description": "Unique identifier of the item.", - "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" - } - ] - } - } - ], + "summary": "Retrieve a Webhook", + "description": "Retrieve a single webhook by unique identifier.", + "operationId": "getWebhook", "responses": { "200": { "description": "Successful request", @@ -6879,8 +6880,7 @@ "type": "object", "properties": { "data": { - "type": "object", - "$ref": "#/components/schemas/ItemsIngredientUnitForms" + "$ref": "#/components/schemas/Webhooks" } } } @@ -6893,50 +6893,71 @@ "404": { "$ref": "#/components/responses/NotFoundError" } - } - }, - "patch": { - "summary": "Update an Item", - "description": "Update an existing ingredient_unit_forms item.", + }, "tags": [ - "Items", - "ItemsIngredientUnitForms" + "Webhooks" ], - "operationId": "updateSingleItemsIngredientUnitForms", "parameters": [ { - "$ref": "#/components/parameters/Fields" + "$ref": "#/components/parameters/UUId" + } + ] + }, + "patch": { + "summary": "Update a Webhook", + "description": "Update an existing webhook", + "operationId": "updateWebhook", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" }, { - "$ref": "#/components/parameters/Meta" + "$ref": "#/components/parameters/Fields" }, { - "name": "id", - "description": "Index of the item.", - "in": "path", - "required": true, - "schema": { - "oneOf": [ - { - "type": "integer", - "description": "Incremental index of the item.", - "example": 1 - }, - { - "type": "string", - "description": "Unique identifier of the item.", - "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" - } - ] - } + "$ref": "#/components/parameters/Meta" } ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "$ref": "#/components/schemas/ItemsIngredientUnitForms" + "properties": { + "name": { + "description": "The name of the webhook.", + "type": "string", + "example": "create articles" + }, + "method": { + "description": "Method used in the webhook.", + "type": "string", + "example": "POST" + }, + "url": { + "description": "The url of the webhook.", + "type": "string", + "example": null + }, + "status": { + "description": "The status of the webhook.", + "type": "string", + "example": "active" + }, + "data": { + "description": "If yes, send the content of what was done", + "type": "boolean", + "example": true + }, + "actions": { + "description": "The actions that triggers this webhook.", + "example": null + }, + "system-collections": { + "description": "The collections that triggers this webhook.", + "example": null + } + }, + "type": "object" } } } @@ -6950,8 +6971,7 @@ "type": "object", "properties": { "data": { - "type": "object", - "$ref": "#/components/schemas/ItemsIngredientUnitForms" + "$ref": "#/components/schemas/Roles" } } } @@ -6964,16 +6984,15 @@ "404": { "$ref": "#/components/responses/NotFoundError" } - } + }, + "tags": [ + "Webhooks" + ] }, "delete": { - "summary": "Delete an Item", - "description": "Delete an existing ingredient_unit_forms item.", - "tags": [ - "Items", - "ItemsIngredientUnitForms" - ], - "operationId": "deleteSingleItemsIngredientUnitForms", + "summary": "Delete a Webhook", + "description": "Delete an existing webhook", + "operationId": "deleteWebhook", "responses": { "200": { "description": "Successful request" @@ -6985,59 +7004,71 @@ "$ref": "#/components/responses/NotFoundError" } }, + "tags": [ + "Webhooks" + ], "parameters": [ { - "name": "id", - "description": "Index of the item.", - "in": "path", - "required": true, - "schema": { - "oneOf": [ - { - "type": "integer", - "description": "Incremental index of the item.", - "example": 1 - }, - { - "type": "string", - "description": "Unique identifier of the item.", - "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" - } - ] - } + "$ref": "#/components/parameters/UUId" } ] } }, - "/items/ingredients": { - "post": { - "summary": "Create an Item", - "description": "Create a new ingredients item.", - "tags": [ - "Items", - "ItemsIngredients" - ], - "operationId": "createItemsIngredients", + "/settings": { + "get": { + "summary": "Retrieve Settings", + "description": "List the settings.", + "operationId": "getSettings", "parameters": [ + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, { "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Page" } ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Settings" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Settings" + ] + }, + "patch": { + "summary": "Update Settings", + "description": "Update the settings", + "operationId": "updateSetting", "requestBody": { "content": { "application/json": { "schema": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ItemsIngredients" - } - }, - { - "$ref": "#/components/schemas/ItemsIngredients" - } - ] + "type": "object" } } } @@ -7051,9 +7082,7 @@ "type": "object", "properties": { "data": { - "items": { - "$ref": "#/components/schemas/ItemsIngredients" - } + "$ref": "#/components/schemas/Settings" } } } @@ -7062,22 +7091,21 @@ }, "401": { "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" } - } - }, - "get": { - "summary": "List Items", - "description": "List the ingredients items.", + }, "tags": [ - "Items", - "ItemsIngredients" - ], - "operationId": "readItemsIngredients", - "security": [ - { - "Auth": [] - } - ], + "Settings" + ] + } + }, + "/permissions": { + "get": { + "summary": "List Permissions", + "description": "List all permissions.", + "operationId": "getPermissions", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -7086,10 +7114,10 @@ "$ref": "#/components/parameters/Limit" }, { - "$ref": "#/components/parameters/Meta" + "$ref": "#/components/parameters/Offset" }, { - "$ref": "#/components/parameters/Offset" + "$ref": "#/components/parameters/Meta" }, { "$ref": "#/components/parameters/Sort" @@ -7099,6 +7127,9 @@ }, { "$ref": "#/components/parameters/Search" + }, + { + "$ref": "#/components/parameters/Page" } ], "responses": { @@ -7112,8 +7143,7 @@ "data": { "type": "array", "items": { - "type": "object", - "$ref": "#/components/schemas/ItemsIngredients" + "$ref": "#/components/schemas/Permissions" } }, "meta": { @@ -7126,357 +7156,124 @@ }, "401": { "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" } - } - }, - "patch": { - "summary": "Update Multiple Items", - "description": "Update multiple ingredients items at the same time.", + }, "tags": [ - "Items", - "ItemsIngredients" - ], - "operationId": "updateItemsIngredients", + "Permissions" + ] + }, + "post": { + "summary": "Create a Permission", + "description": "Create a new permission.", + "operationId": "createPermission", "parameters": [ - { - "$ref": "#/components/parameters/Fields" - }, - { - "$ref": "#/components/parameters/Limit" - }, { "$ref": "#/components/parameters/Meta" - }, - { - "$ref": "#/components/parameters/Offset" - }, - { - "$ref": "#/components/parameters/Sort" - }, - { - "$ref": "#/components/parameters/Filter" - }, - { - "$ref": "#/components/parameters/Search" } ], "requestBody": { "content": { "application/json": { "schema": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ItemsIngredients" - } + "properties": { + "collection": { + "description": "What collection this permission applies to.", + "type": "string", + "example": "customers" }, - { - "$ref": "#/components/schemas/ItemsIngredients" - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "Successful request", - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/ItemsIngredients" - } - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete Multiple Items", - "description": "Delete multiple existing ingredients items.", - "tags": [ - "Items", - "ItemsIngredients" - ], - "operationId": "deleteItemsIngredients", - "responses": { - "200": { - "description": "Successful request" - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - } - }, - "parameters": [] - } - }, - "/items/ingredients/{id}": { - "get": { - "summary": "Retrieve an Item", - "description": "Retrieve a single ingredients item by unique identifier.", - "tags": [ - "Items", - "ItemsIngredients" - ], - "operationId": "readSingleItemsIngredients", - "parameters": [ - { - "$ref": "#/components/parameters/Fields" - }, - { - "$ref": "#/components/parameters/Meta" - }, - { - "$ref": "#/components/parameters/Version" - }, - { - "name": "id", - "description": "Index of the item.", - "in": "path", - "required": true, - "schema": { - "oneOf": [ - { - "type": "integer", - "description": "Incremental index of the item.", - "example": 1 - }, - { - "type": "string", - "description": "Unique identifier of the item.", - "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" - } - ] - } - } - ], - "responses": { - "200": { - "description": "Successful request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "$ref": "#/components/schemas/ItemsIngredients" - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" - } - } - }, - "patch": { - "summary": "Update an Item", - "description": "Update an existing ingredients item.", - "tags": [ - "Items", - "ItemsIngredients" - ], - "operationId": "updateSingleItemsIngredients", - "parameters": [ - { - "$ref": "#/components/parameters/Fields" - }, - { - "$ref": "#/components/parameters/Meta" - }, - { - "name": "id", - "description": "Index of the item.", - "in": "path", - "required": true, - "schema": { - "oneOf": [ - { - "type": "integer", - "description": "Incremental index of the item.", - "example": 1 - }, - { - "type": "string", - "description": "Unique identifier of the item.", - "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" - } - ] - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "$ref": "#/components/schemas/ItemsIngredients" - } - } - } - }, - "responses": { - "200": { - "description": "Successful request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "$ref": "#/components/schemas/ItemsIngredients" - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" - } - } - }, - "delete": { - "summary": "Delete an Item", - "description": "Delete an existing ingredients item.", - "tags": [ - "Items", - "ItemsIngredients" - ], - "operationId": "deleteSingleItemsIngredients", - "responses": { - "200": { - "description": "Successful request" - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" - } - }, - "parameters": [ - { - "name": "id", - "description": "Index of the item.", - "in": "path", - "required": true, - "schema": { - "oneOf": [ - { - "type": "integer", - "description": "Incremental index of the item.", - "example": 1 - }, - { - "type": "string", - "description": "Unique identifier of the item.", - "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" - } - ] - } - } - ] - } - }, - "/webhooks": { - "get": { - "summary": "List Webhooks", - "description": "Get all webhooks.", - "operationId": "getWebhooks", - "responses": { - "200": { - "description": "Successful request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/Webhooks" - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" - } - }, - "tags": [ - "Webhooks" - ] - }, - "post": { - "summary": "Create a Webhook", - "description": "Create a new webhook.", - "operationId": "createWebhook", - "parameters": [ - { - "$ref": "#/components/parameters/Fields" - }, - { - "$ref": "#/components/parameters/Meta" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "description": "The name of the webhook.", + "comment": { + "description": "If the user can post comments.", "type": "string", - "example": "create articles" + "enum": [ + "none", + "create", + "update", + "full" + ] }, - "method": { - "description": "Method used in the webhook.", + "create": { + "description": "If the user can create items.", "type": "string", - "example": "POST" + "enum": [ + "none", + "full" + ] }, - "url": { - "description": "The url of the webhook.", + "delete": { + "description": "If the user can update items.", "type": "string", - "example": null + "enum": [ + "none", + "mine", + "role", + "full" + ] }, - "status": { - "description": "The status of the webhook.", + "explain": { + "description": "If the user is required to leave a comment explaining what was changed.", "type": "string", - "example": "active" + "enum": [ + "none", + "create", + "update", + "always" + ] }, - "data": { - "description": "If yes, send the content of what was done", - "type": "boolean", - "example": true + "read": { + "description": "If the user can read items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] }, - "actions": { - "description": "The actions that triggers this webhook.", - "example": null + "role": { + "description": "Unique identifier of the role this permission applies to.", + "type": "integer", + "example": 3 }, - "system-collections": { - "description": "The collections that triggers this webhook.", - "example": null + "read_field_blacklist": { + "description": "Explicitly denies read access for specific fields.", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "featured_image" + ] + }, + "status": { + "description": "What status this permission applies to.", + "type": "string" + }, + "status_blacklist": { + "description": "Explicitly denies specific statuses to be used.", + "type": "array", + "items": { + "type": "string" + } + }, + "update": { + "description": "If the user can update items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "write_field_blacklist": { + "description": "Explicitly denies write access for specific fields.", + "type": "array", + "items": { + "type": "string" + } } }, "type": "object" @@ -7493,7 +7290,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Roles" + "$ref": "#/components/schemas/Permissions" } } } @@ -7508,16 +7305,16 @@ } }, "tags": [ - "Webhooks" + "Permissions" ] }, "patch": { - "summary": "Update Multiple Webhooks", - "description": "Update multiple webhooks at the same time.", + "summary": "Update Multiple Permissions", + "description": "Update multiple permissions at the same time.", "tags": [ - "Webhooks" + "Permissions" ], - "operationId": "updateWebhooks", + "operationId": "updatePermissions", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -7545,53 +7342,116 @@ "content": { "application/json": { "schema": { + "type": "object", "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, "data": { "properties": { - "name": { - "description": "The name of the webhook.", + "collection": { + "description": "What collection this permission applies to.", "type": "string", - "example": "create articles" + "example": "customers" }, - "method": { - "description": "Method used in the webhook.", + "comment": { + "description": "If the user can post comments.", "type": "string", - "example": "POST" + "enum": [ + "none", + "create", + "update", + "full" + ] }, - "url": { - "description": "The url of the webhook.", + "create": { + "description": "If the user can create items.", "type": "string", - "example": null + "enum": [ + "none", + "full" + ] }, - "status": { - "description": "The status of the webhook.", + "delete": { + "description": "If the user can update items.", "type": "string", - "example": "active" + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "explain": { + "description": "If the user is required to leave a comment explaining what was changed.", + "type": "string", + "enum": [ + "none", + "create", + "update", + "always" + ] + }, + "read": { + "description": "If the user can read items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "role": { + "description": "Unique identifier of the role this permission applies to.", + "type": "integer", + "example": 3 + }, + "read_field_blacklist": { + "description": "Explicitly denies read access for specific fields.", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "featured_image" + ] + }, + "status": { + "description": "What status this permission applies to.", + "type": "string" }, - "data": { - "description": "If yes, send the content of what was done", - "type": "boolean", - "example": true + "status_blacklist": { + "description": "Explicitly denies specific statuses to be used.", + "type": "array", + "items": { + "type": "string" + } }, - "actions": { - "description": "The actions that triggers this webhook.", - "example": null + "update": { + "description": "If the user can update items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] }, - "system-collections": { - "description": "The collections that triggers this webhook.", - "example": null + "write_field_blacklist": { + "description": "Explicitly denies write access for specific fields.", + "type": "array", + "items": { + "type": "string" + } } }, "type": "object" - }, - "keys": { - "type": "array", - "items": { - "type": "string" - } } - }, - "type": "object" + } } } } @@ -7607,7 +7467,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Webhooks" + "$ref": "#/components/schemas/Permissions" } }, "meta": { @@ -7624,12 +7484,12 @@ } }, "delete": { - "summary": "Delete Multiple Webhooks", - "description": "Delete multiple existing webhooks.", + "summary": "Delete Multiple Permissions", + "description": "Delete multiple existing permissions.", "tags": [ - "Webhooks" + "Permissions" ], - "operationId": "deleteWebhooks", + "operationId": "deletePermissions", "responses": { "200": { "description": "Successful request" @@ -7640,11 +7500,11 @@ } } }, - "/webhooks/{id}": { + "/permissions/me": { "get": { - "summary": "Retrieve a Webhook", - "description": "Retrieve a single webhook by unique identifier.", - "operationId": "getWebhook", + "summary": "List My Permissions", + "description": "List the permissions that apply to the current user.", + "operationId": "getMyPermissions", "responses": { "200": { "description": "Successful request", @@ -7654,7 +7514,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Webhooks" + "type": "array", + "items": { + "$ref": "#/components/schemas/Permissions" + } } } } @@ -7669,21 +7532,18 @@ } }, "tags": [ - "Webhooks" - ], - "parameters": [ - { - "$ref": "#/components/parameters/UUId" - } + "Permissions" ] - }, - "patch": { - "summary": "Update a Webhook", - "description": "Update an existing webhook", - "operationId": "updateWebhook", + } + }, + "/permissions/{id}": { + "get": { + "summary": "Retrieve a Permission", + "description": "Retrieve a single permissions object by unique identifier.", + "operationId": "getPermission", "parameters": [ { - "$ref": "#/components/parameters/UUId" + "$ref": "#/components/parameters/Id" }, { "$ref": "#/components/parameters/Fields" @@ -7692,50 +7552,6 @@ "$ref": "#/components/parameters/Meta" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "description": "The name of the webhook.", - "type": "string", - "example": "create articles" - }, - "method": { - "description": "Method used in the webhook.", - "type": "string", - "example": "POST" - }, - "url": { - "description": "The url of the webhook.", - "type": "string", - "example": null - }, - "status": { - "description": "The status of the webhook.", - "type": "string", - "example": "active" - }, - "data": { - "description": "If yes, send the content of what was done", - "type": "boolean", - "example": true - }, - "actions": { - "description": "The actions that triggers this webhook.", - "example": null - }, - "system-collections": { - "description": "The collections that triggers this webhook.", - "example": null - } - }, - "type": "object" - } - } - } - }, "responses": { "200": { "description": "Successful request", @@ -7745,7 +7561,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Roles" + "$ref": "#/components/schemas/Permissions" } } } @@ -7760,53 +7576,113 @@ } }, "tags": [ - "Webhooks" + "Permissions" ] }, - "delete": { - "summary": "Delete a Webhook", - "description": "Delete an existing webhook", - "operationId": "deleteWebhook", - "responses": { - "200": { - "description": "Successful request" - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" - } - }, - "tags": [ - "Webhooks" - ], - "parameters": [ - { - "$ref": "#/components/parameters/UUId" - } - ] - } - }, - "/settings": { - "get": { - "summary": "Retrieve Settings", - "description": "List the settings.", - "operationId": "getSettings", + "patch": { + "summary": "Update a Permission", + "description": "Update an existing permission", + "operationId": "updatePermission", "parameters": [ { - "$ref": "#/components/parameters/Limit" - }, - { - "$ref": "#/components/parameters/Offset" + "$ref": "#/components/parameters/Id" }, { "$ref": "#/components/parameters/Meta" - }, - { - "$ref": "#/components/parameters/Page" } - ], + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "collection": { + "description": "What collection this permission applies to.", + "type": "object" + }, + "comment": { + "description": "If the user can post comments. `full`.", + "type": "string", + "enum": [ + "none", + "create", + "update" + ] + }, + "create": { + "description": "If the user can create items.", + "type": "string", + "enum": [ + "none", + "full" + ] + }, + "delete": { + "description": "If the user can update items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "explain": { + "description": "If the user is required to leave a comment explaining what was changed.", + "type": "string", + "enum": [ + "none", + "create", + "update", + "always" + ] + }, + "read": { + "description": "If the user can read items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "read_field_blacklist": { + "description": "Explicitly denies read access for specific fields.", + "type": "object" + }, + "role": { + "description": "Unique identifier of the role this permission applies to.", + "type": "object" + }, + "status": { + "description": "What status this permission applies to.", + "type": "object" + }, + "status_blacklist": { + "description": "Explicitly denies specific statuses to be used.", + "type": "object" + }, + "update": { + "description": "If the user can update items.", + "type": "string", + "enum": [ + "none", + "mine", + "role", + "full" + ] + }, + "write_field_blacklist": { + "description": "Explicitly denies write access for specific fields.", + "type": "object" + } + }, + "type": "object" + } + } + } + }, "responses": { "200": { "description": "Successful request", @@ -7816,7 +7692,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Settings" + "$ref": "#/components/schemas/Permissions" } } } @@ -7831,37 +7707,16 @@ } }, "tags": [ - "Settings" + "Permissions" ] }, - "patch": { - "summary": "Update Settings", - "description": "Update the settings", - "operationId": "updateSetting", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - }, + "delete": { + "summary": "Delete a Permission", + "description": "Delete an existing permission", + "operationId": "deletePermission", "responses": { "200": { - "description": "Successful request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/Settings" - } - } - } - } - } + "description": "Successful request" }, "401": { "$ref": "#/components/responses/UnauthorizedError" @@ -7871,39 +7726,26 @@ } }, "tags": [ - "Settings" + "Permissions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/Id" + } ] } }, - "/permissions": { + "/collections": { "get": { - "summary": "List Permissions", - "description": "List all permissions.", - "operationId": "getPermissions", + "summary": "List Collections", + "description": "Returns a list of the collections available in the project.", + "operationId": "getCollections", "parameters": [ - { - "$ref": "#/components/parameters/Fields" - }, - { - "$ref": "#/components/parameters/Limit" - }, { "$ref": "#/components/parameters/Offset" }, { "$ref": "#/components/parameters/Meta" - }, - { - "$ref": "#/components/parameters/Sort" - }, - { - "$ref": "#/components/parameters/Filter" - }, - { - "$ref": "#/components/parameters/Search" - }, - { - "$ref": "#/components/parameters/Page" } ], "responses": { @@ -7917,11 +7759,8 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Permissions" + "$ref": "#/components/schemas/Collections" } - }, - "meta": { - "$ref": "#/components/schemas/x-metadata" } } } @@ -7936,13 +7775,13 @@ } }, "tags": [ - "Permissions" + "Collections" ] }, "post": { - "summary": "Create a Permission", - "description": "Create a new permission.", - "operationId": "createPermission", + "summary": "Create a Collection", + "description": "Create a new collection in Directus.", + "operationId": "createCollection", "parameters": [ { "$ref": "#/components/parameters/Meta" @@ -7952,124 +7791,160 @@ "content": { "application/json": { "schema": { + "type": "object", + "required": [ + "collection", + "fields" + ], "properties": { "collection": { - "description": "What collection this permission applies to.", "type": "string", - "example": "customers" + "description": "Unique name of the collection.", + "example": "my_collection" }, - "comment": { - "description": "If the user can post comments.", - "type": "string", - "enum": [ - "none", - "create", - "update", - "full" - ] + "fields": { + "type": "array", + "description": "The fields contained in this collection. See the fields reference for more information. Each individual field requires field, type, and interface to be provided.", + "items": { + "type": "object" + } }, - "create": { - "description": "If the user can create items.", + "icon": { + "description": "Name of a Google Material Design Icon that's assigned to this collection.", "type": "string", - "enum": [ - "none", - "full" - ] + "example": "people", + "nullable": true }, - "delete": { - "description": "If the user can update items.", + "note": { + "description": "A note describing the collection.", "type": "string", - "enum": [ - "none", - "mine", - "role", - "full" - ] + "example": null, + "nullable": true }, - "explain": { - "description": "If the user is required to leave a comment explaining what was changed.", + "display_template": { + "description": "Text representation of how items from this collection are shown across the system.", "type": "string", - "enum": [ - "none", - "create", - "update", - "always" - ] + "example": null, + "nullable": true }, - "read": { - "description": "If the user can read items.", + "hidden": { + "description": "Whether or not the collection is hidden from the navigation in the admin app.", + "type": "boolean", + "example": false + }, + "singleton": { + "description": "Whether or not the collection is treated as a single object.", + "type": "boolean", + "example": false + }, + "translation": { + "description": "Key value pairs of how to show this collection's name in different languages in the admin app.", "type": "string", - "enum": [ - "none", - "mine", - "role", - "full" - ] + "example": null, + "nullable": true }, - "role": { - "description": "Unique identifier of the role this permission applies to.", - "type": "integer", - "example": 3 + "versioning": { + "description": "Whether or not Content Versioning is enabled for this collection.", + "type": "boolean", + "example": false }, - "read_field_blacklist": { - "description": "Explicitly denies read access for specific fields.", - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "featured_image" - ] + "archive_field": { + "description": "What field holds the archive value.", + "type": "string", + "example": null, + "nullable": true }, - "status": { - "description": "What status this permission applies to.", - "type": "string" + "archive_app_filter": { + "description": "What value to use for \"archived\" items.", + "type": "string", + "example": null, + "nullable": true }, - "status_blacklist": { - "description": "Explicitly denies specific statuses to be used.", - "type": "array", - "items": { - "type": "string" - } + "archive_value": { + "description": "What value to use to \"unarchive\" items.", + "type": "string", + "example": null, + "nullable": true }, - "update": { - "description": "If the user can update items.", + "unarchive_value": { + "description": "Whether or not to show the \"archived\" filter.", "type": "string", - "enum": [ - "none", - "mine", - "role", - "full" - ] + "example": null, + "nullable": true }, - "write_field_blacklist": { - "description": "Explicitly denies write access for specific fields.", - "type": "array", - "items": { - "type": "string" - } + "sort_field": { + "description": "The sort field in the collection.", + "type": "string", + "example": null, + "nullable": true } - }, - "type": "object" + } } } } }, "responses": { "200": { - "description": "Successful request", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Permissions" + "$ref": "#/components/schemas/Collections" + } + } + } + } + }, + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Collections" + ] + } + }, + "/collections/{id}": { + "get": { + "summary": "Retrieve a Collection", + "description": "Retrieves the details of a single collection.", + "operationId": "getCollection", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Unique identifier of the collection.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Collections" } } } } - } + }, + "description": "Successful request" }, "401": { "$ref": "#/components/responses/UnauthorizedError" @@ -8079,37 +7954,25 @@ } }, "tags": [ - "Permissions" + "Collections" ] }, "patch": { - "summary": "Update Multiple Permissions", - "description": "Update multiple permissions at the same time.", - "tags": [ - "Permissions" - ], - "operationId": "updatePermissions", + "summary": "Update a Collection", + "description": "Update an existing collection.", + "operationId": "updateCollection", "parameters": [ { - "$ref": "#/components/parameters/Fields" - }, - { - "$ref": "#/components/parameters/Limit" + "name": "id", + "in": "path", + "required": true, + "description": "Unique identifier of the collection.", + "schema": { + "type": "string" + } }, { "$ref": "#/components/parameters/Meta" - }, - { - "$ref": "#/components/parameters/Offset" - }, - { - "$ref": "#/components/parameters/Sort" - }, - { - "$ref": "#/components/parameters/Filter" - }, - { - "$ref": "#/components/parameters/Search" } ], "requestBody": { @@ -8118,112 +7981,86 @@ "schema": { "type": "object", "properties": { - "keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "data": { + "meta": { + "description": "Metadata of the collection.", + "type": "object", "properties": { - "collection": { - "description": "What collection this permission applies to.", + "icon": { + "description": "Name of a Google Material Design Icon that's assigned to this collection.", "type": "string", - "example": "customers" + "example": "people", + "nullable": true }, - "comment": { - "description": "If the user can post comments.", + "color": { + "description": "Choose the color for the icon assigned to this collection.", "type": "string", - "enum": [ - "none", - "create", - "update", - "full" - ] + "example": "#6644ff", + "nullable": true }, - "create": { - "description": "If the user can create items.", + "note": { + "description": "A note describing the collection.", "type": "string", - "enum": [ - "none", - "full" - ] + "example": null, + "nullable": true }, - "delete": { - "description": "If the user can update items.", + "display_template": { + "description": "Text representation of how items from this collection are shown across the system.", "type": "string", - "enum": [ - "none", - "mine", - "role", - "full" - ] + "example": null, + "nullable": true }, - "explain": { - "description": "If the user is required to leave a comment explaining what was changed.", - "type": "string", - "enum": [ - "none", - "create", - "update", - "always" - ] + "hidden": { + "description": "Whether or not the collection is hidden from the navigation in the admin app.", + "type": "boolean", + "example": false }, - "read": { - "description": "If the user can read items.", + "singleton": { + "description": "Whether or not the collection is treated as a single object.", + "type": "boolean", + "example": false + }, + "translation": { + "description": "Key value pairs of how to show this collection's name in different languages in the admin app.", "type": "string", - "enum": [ - "none", - "mine", - "role", - "full" - ] + "example": null, + "nullable": true }, - "role": { - "description": "Unique identifier of the role this permission applies to.", - "type": "integer", - "example": 3 + "versioning": { + "description": "Whether or not Content Versioning is enabled for this collection.", + "type": "boolean", + "example": false }, - "read_field_blacklist": { - "description": "Explicitly denies read access for specific fields.", - "type": "array", - "items": { - "type": "string" - }, - "example": [ - "featured_image" - ] + "archive_field": { + "description": "What field holds the archive value.", + "type": "string", + "example": null, + "nullable": true }, - "status": { - "description": "What status this permission applies to.", - "type": "string" + "archive_app_filter": { + "description": "What value to use for \"archived\" items.", + "type": "string", + "example": null, + "nullable": true }, - "status_blacklist": { - "description": "Explicitly denies specific statuses to be used.", - "type": "array", - "items": { - "type": "string" - } + "archive_value": { + "description": "What value to use to \"unarchive\" items.", + "type": "string", + "example": null, + "nullable": true }, - "update": { - "description": "If the user can update items.", + "unarchive_value": { + "description": "Whether or not to show the \"archived\" filter.", "type": "string", - "enum": [ - "none", - "mine", - "role", - "full" - ] + "example": null, + "nullable": true }, - "write_field_blacklist": { - "description": "Explicitly denies write access for specific fields.", - "type": "array", - "items": { - "type": "string" - } + "sort_field": { + "description": "The sort field in the collection.", + "type": "string", + "example": null, + "nullable": true } - }, - "type": "object" + } } } } @@ -8232,53 +8069,67 @@ }, "responses": { "200": { - "description": "Successful request", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Permissions" - } - }, - "meta": { - "$ref": "#/components/schemas/x-metadata" + "$ref": "#/components/schemas/Collections" } } } } - } + }, + "description": "Successful request" }, "401": { "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" } - } + }, + "tags": [ + "Collections" + ] }, "delete": { - "summary": "Delete Multiple Permissions", - "description": "Delete multiple existing permissions.", - "tags": [ - "Permissions" - ], - "operationId": "deletePermissions", + "summary": "Delete a Collection", + "description": "Delete an existing collection. Warning: This will delete the whole collection, including the items within. Proceed with caution.", + "operationId": "deleteCollection", "responses": { "200": { "description": "Successful request" }, "401": { "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Collections" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Unique identifier of the collection.", + "schema": { + "type": "string" + } } - } + ] } }, - "/permissions/me": { + "/flows": { "get": { - "summary": "List My Permissions", - "description": "List the permissions that apply to the current user.", - "operationId": "getMyPermissions", + "summary": "List Flows", + "description": "Get all flows.", + "operationId": "getFlows", "responses": { "200": { "description": "Successful request", @@ -8290,8 +8141,11 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Permissions" + "$ref": "#/components/schemas/Flows" } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" } } } @@ -8306,19 +8160,14 @@ } }, "tags": [ - "Permissions" + "Flows" ] - } - }, - "/permissions/{id}": { - "get": { - "summary": "Retrieve a Permission", - "description": "Retrieve a single permissions object by unique identifier.", - "operationId": "getPermission", + }, + "post": { + "summary": "Create a Flow", + "description": "Create a new flow.", + "operationId": "createFlow", "parameters": [ - { - "$ref": "#/components/parameters/Id" - }, { "$ref": "#/components/parameters/Fields" }, @@ -8326,6 +8175,19 @@ "$ref": "#/components/parameters/Meta" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Flows" + } + ] + } + } + } + }, "responses": { "200": { "description": "Successful request", @@ -8335,7 +8197,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Permissions" + "$ref": "#/components/schemas/Flows" } } } @@ -8350,109 +8212,168 @@ } }, "tags": [ - "Permissions" + "Flows" ] }, "patch": { - "summary": "Update a Permission", - "description": "Update an existing permission", - "operationId": "updatePermission", + "summary": "Update Multiple Flows", + "description": "Update multiple flows at the same time.", + "tags": [ + "Flows" + ], + "operationId": "updateFlows", "parameters": [ { - "$ref": "#/components/parameters/Id" + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" } ], "requestBody": { "content": { "application/json": { "schema": { + "type": "object", "properties": { - "collection": { - "description": "What collection this permission applies to.", - "type": "object" - }, - "comment": { - "description": "If the user can post comments. `full`.", - "type": "string", - "enum": [ - "none", - "create", - "update" - ] - }, - "create": { - "description": "If the user can create items.", - "type": "string", - "enum": [ - "none", - "full" - ] - }, - "delete": { - "description": "If the user can update items.", - "type": "string", - "enum": [ - "none", - "mine", - "role", - "full" - ] - }, - "explain": { - "description": "If the user is required to leave a comment explaining what was changed.", - "type": "string", - "enum": [ - "none", - "create", - "update", - "always" - ] - }, - "read": { - "description": "If the user can read items.", - "type": "string", - "enum": [ - "none", - "mine", - "role", - "full" - ] - }, - "read_field_blacklist": { - "description": "Explicitly denies read access for specific fields.", - "type": "object" - }, - "role": { - "description": "Unique identifier of the role this permission applies to.", - "type": "object" - }, - "status": { - "description": "What status this permission applies to.", - "type": "object" - }, - "status_blacklist": { - "description": "Explicitly denies specific statuses to be used.", - "type": "object" - }, - "update": { - "description": "If the user can update items.", - "type": "string", - "enum": [ - "none", - "mine", - "role", - "full" + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/Flows" + } ] }, - "write_field_blacklist": { - "description": "Explicitly denies write access for specific fields.", - "type": "object" + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Flows" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete Multiple Flows", + "description": "Delete multiple existing flows.", + "tags": [ + "Flows" + ], + "operationId": "deleteFlows", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/flows/{id}": { + "get": { + "summary": "Retrieve a Flow", + "description": "Retrieve a single flow by unique identifier.", + "operationId": "getFlow", + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Flows" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Flows" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + } + ] + }, + "patch": { + "summary": "Update a Flow", + "description": "Update an existing flow", + "operationId": "updateFlow", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Flows" } - }, - "type": "object" + ] } } } @@ -8466,7 +8387,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Permissions" + "$ref": "#/components/schemas/Flows" } } } @@ -8481,13 +8402,13 @@ } }, "tags": [ - "Permissions" + "Flows" ] }, "delete": { - "summary": "Delete a Permission", - "description": "Delete an existing permission", - "operationId": "deletePermission", + "summary": "Delete a Flow", + "description": "Delete an existing flow", + "operationId": "deleteFlow", "responses": { "200": { "description": "Successful request" @@ -8500,24 +8421,50 @@ } }, "tags": [ - "Permissions" + "Flows" ], "parameters": [ { - "$ref": "#/components/parameters/Id" + "$ref": "#/components/parameters/UUId" } ] } }, - "/collections": { + "/presets": { "get": { - "summary": "List Collections", - "description": "Returns a list of the collections available in the project.", - "operationId": "getCollections", + "tags": [ + "Presets" + ], + "operationId": "getPresets", + "summary": "List Presets", + "description": "List the presets.", + "security": [ + { + "Auth": [] + } + ], "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, { "$ref": "#/components/parameters/Offset" }, + { + "$ref": "#/components/parameters/Page" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + }, { "$ref": "#/components/parameters/Meta" } @@ -8533,8 +8480,11 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Collections" + "$ref": "#/components/schemas/Presets" } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" } } } @@ -8543,20 +8493,20 @@ }, "401": { "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" } - }, - "tags": [ - "Collections" - ] + } }, "post": { - "summary": "Create a Collection", - "description": "Create a new collection in Directus.", - "operationId": "createCollection", + "tags": [ + "Presets" + ], + "operationId": "createPreset", + "summary": "Create a Preset", + "description": "Create a new preset.", "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, { "$ref": "#/components/parameters/Meta" } @@ -8567,186 +8517,118 @@ "schema": { "type": "object", "required": [ - "collection", - "fields" + "collection" ], "properties": { "collection": { "type": "string", - "description": "Unique name of the collection.", - "example": "my_collection" - }, - "fields": { - "type": "array", - "description": "The fields contained in this collection. See the fields reference for more information. Each individual field requires field, type, and interface to be provided.", - "items": { - "type": "object" - } - }, - "icon": { - "description": "Name of a Google Material Design Icon that's assigned to this collection.", - "type": "string", - "example": "people", - "nullable": true - }, - "note": { - "description": "A note describing the collection.", - "type": "string", - "example": null, - "nullable": true + "description": "What collection this collection preset is used for.", + "example": "articles" }, - "display_template": { - "description": "Text representation of how items from this collection are shown across the system.", + "title": { "type": "string", - "example": null, - "nullable": true - }, - "hidden": { - "description": "Whether or not the collection is hidden from the navigation in the admin app.", - "type": "boolean", - "example": false - }, - "singleton": { - "description": "Whether or not the collection is treated as a single object.", - "type": "boolean", - "example": false + "description": "Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark.", + "example": "Highly rated articles" }, - "translation": { - "description": "Key value pairs of how to show this collection's name in different languages in the admin app.", + "role": { "type": "string", - "example": null, - "nullable": true - }, - "versioning": { - "description": "Whether or not Content Versioning is enabled for this collection.", - "type": "boolean", - "example": false + "description": "The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role.", + "example": null }, - "archive_field": { - "description": "What field holds the archive value.", + "search": { "type": "string", - "example": null, - "nullable": true + "description": "What the user searched for in search/filter in the header bar." }, - "archive_app_filter": { - "description": "What value to use for \"archived\" items.", - "type": "string", - "example": null, - "nullable": true + "filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "aHKLAakdVghzD" + }, + "field": { + "type": "string", + "example": "rating" + }, + "operator": { + "type": "string", + "example": "gte" + }, + "value": { + "type": "integer", + "example": 4.5 + } + } + } }, - "archive_value": { - "description": "What value to use to \"unarchive\" items.", + "layout": { "type": "string", - "example": null, - "nullable": true + "description": "Name of the view type that is used." }, - "unarchive_value": { - "description": "Whether or not to show the \"archived\" filter.", + "layout_query": { "type": "string", - "example": null, - "nullable": true + "description": "Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters." }, - "sort_field": { - "description": "The sort field in the collection.", - "type": "string", - "example": null, - "nullable": true - } - } - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/Collections" - } - } - } - } - }, - "description": "Successful request" - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" - } - }, - "tags": [ - "Collections" - ] - } - }, - "/collections/{id}": { - "get": { - "summary": "Retrieve a Collection", - "description": "Retrieves the details of a single collection.", - "operationId": "getCollection", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "description": "Unique identifier of the collection.", - "schema": { - "type": "string" + "layout_options": { + "type": "string", + "description": "Options of the views. The properties in here are controlled by the layout." + } + } + } } - }, - { - "$ref": "#/components/parameters/Meta" } - ], + }, "responses": { "200": { + "description": "Successful request", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Collections" + "$ref": "#/components/schemas/Presets" } } } } - }, - "description": "Successful request" + } }, "401": { "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" } - }, - "tags": [ - "Collections" - ] + } }, "patch": { - "summary": "Update a Collection", - "description": "Update an existing collection.", - "operationId": "updateCollection", + "summary": "Update Multiple Presets", + "description": "Update multiple presets at the same time.", + "tags": [ + "Presets" + ], + "operationId": "updatePresets", "parameters": [ { - "name": "id", - "in": "path", - "required": true, - "description": "Unique identifier of the collection.", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" } ], "requestBody": { @@ -8755,86 +8637,249 @@ "schema": { "type": "object", "properties": { - "meta": { - "description": "Metadata of the collection.", + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "data": { "type": "object", + "required": [ + "collection" + ], "properties": { - "icon": { - "description": "Name of a Google Material Design Icon that's assigned to this collection.", - "type": "string", - "example": "people", - "nullable": true - }, - "color": { - "description": "Choose the color for the icon assigned to this collection.", - "type": "string", - "example": "#6644ff", - "nullable": true - }, - "note": { - "description": "A note describing the collection.", + "collection": { "type": "string", - "example": null, - "nullable": true + "description": "What collection this collection preset is used for.", + "example": "articles" }, - "display_template": { - "description": "Text representation of how items from this collection are shown across the system.", + "title": { "type": "string", - "example": null, - "nullable": true - }, - "hidden": { - "description": "Whether or not the collection is hidden from the navigation in the admin app.", - "type": "boolean", - "example": false - }, - "singleton": { - "description": "Whether or not the collection is treated as a single object.", - "type": "boolean", - "example": false + "description": "Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark.", + "example": "Highly rated articles" }, - "translation": { - "description": "Key value pairs of how to show this collection's name in different languages in the admin app.", + "role": { "type": "string", - "example": null, - "nullable": true - }, - "versioning": { - "description": "Whether or not Content Versioning is enabled for this collection.", - "type": "boolean", - "example": false + "description": "The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role.", + "example": null }, - "archive_field": { - "description": "What field holds the archive value.", + "search": { "type": "string", - "example": null, - "nullable": true + "description": "What the user searched for in search/filter in the header bar." }, - "archive_app_filter": { - "description": "What value to use for \"archived\" items.", - "type": "string", - "example": null, - "nullable": true + "filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "aHKLAakdVghzD" + }, + "field": { + "type": "string", + "example": "rating" + }, + "operator": { + "type": "string", + "example": "gte" + }, + "value": { + "type": "integer", + "example": 4.5 + } + } + } }, - "archive_value": { - "description": "What value to use to \"unarchive\" items.", + "layout": { "type": "string", - "example": null, - "nullable": true + "description": "Name of the view type that is used." }, - "unarchive_value": { - "description": "Whether or not to show the \"archived\" filter.", + "layout_query": { "type": "string", - "example": null, - "nullable": true + "description": "Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters." }, - "sort_field": { - "description": "The sort field in the collection.", + "layout_options": { "type": "string", - "example": null, - "nullable": true + "description": "Options of the views. The properties in here are controlled by the layout." + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Presets" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "delete": { + "summary": "Delete Multiple Presets", + "description": "Delete multiple existing presets.", + "tags": [ + "Presets" + ], + "operationId": "deletePresets", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/presets/{id}": { + "get": { + "tags": [ + "Presets" + ], + "operationId": "getPreset", + "summary": "Retrieve a Preset", + "description": "Retrieve a single preset by unique identifier.", + "security": [ + { + "Auth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/Id" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Presets" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "patch": { + "tags": [ + "Presets" + ], + "operationId": "updatePreset", + "summary": "Update a Preset", + "description": "Update an existing preset.", + "parameters": [ + { + "$ref": "#/components/parameters/Id" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string", + "description": "What collection this collection preset is used for.", + "example": "articles" + }, + "title": { + "type": "string", + "description": "Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark.", + "example": "Highly rated articles" + }, + "role": { + "type": "integer", + "description": "The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role." + }, + "search_query": { + "type": "string", + "description": "What the user searched for in search/filter in the header bar." + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string", + "example": "rating" + }, + "operator": { + "type": "string", + "example": "gte" + }, + "value": { + "type": "integer", + "example": 4.5 + } } } + }, + "view_type": { + "type": "string", + "description": "Name of the view type that is used. Defaults to tabular." + }, + "view_query": { + "type": "string", + "description": "View query that's saved per view type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters." + }, + "view_options": { + "type": "string", + "description": "Options of the views. The properties in here are controlled by the layout." + }, + "translation": { + "type": "object", + "description": "Key value pair of language-translation. Can be used to translate the bookmark title in multiple languages." } } } @@ -8843,67 +8888,83 @@ }, "responses": { "200": { + "description": "Successful request", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Collections" + "$ref": "#/components/schemas/Presets" } } } } - }, - "description": "Successful request" + } }, "401": { "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" } - }, - "tags": [ - "Collections" - ] + } }, "delete": { - "summary": "Delete a Collection", - "description": "Delete an existing collection. Warning: This will delete the whole collection, including the items within. Proceed with caution.", - "operationId": "deleteCollection", + "tags": [ + "Presets" + ], + "operationId": "deletePreset", + "summary": "Delete a Preset", + "description": "Delete an existing preset.", + "security": [ + { + "Auth": [] + } + ], "responses": { "200": { "description": "Successful request" }, "401": { "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" } }, - "tags": [ - "Collections" - ], "parameters": [ { - "name": "id", - "in": "path", - "required": true, - "description": "Unique identifier of the collection.", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/Id" } ] } }, - "/flows": { + "/roles": { "get": { - "summary": "List Flows", - "description": "Get all flows.", - "operationId": "getFlows", + "summary": "List Roles", + "description": "List the roles.", + "operationId": "getRoles", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + }, + { + "$ref": "#/components/parameters/Page" + } + ], "responses": { "200": { "description": "Successful request", @@ -8915,7 +8976,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Flows" + "$ref": "#/components/schemas/Roles" } }, "meta": { @@ -8934,13 +8995,13 @@ } }, "tags": [ - "Flows" + "Roles" ] }, "post": { - "summary": "Create a Flow", - "description": "Create a new flow.", - "operationId": "createFlow", + "summary": "Create a Role", + "description": "Create a new role.", + "operationId": "createRole", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -8953,11 +9014,37 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Flows" + "properties": { + "description": { + "description": "Description of the role.", + "type": "string" + }, + "enforce_tfa": { + "description": "Whether or not this role enforces the use of 2FA.", + "type": "boolean" + }, + "external_id": { + "description": "ID used with external services in SCIM.", + "type": "string" + }, + "ip_access": { + "description": "Array of IP addresses that are allowed to connect to the API as a user of this role.", + "type": "array", + "items": { + "type": "string" + } + }, + "module_listing": { + "description": "Custom override for the admin app module bar navigation.", + "type": "string" + }, + "name": { + "description": "Name of the role.", + "type": "string", + "example": "Interns" } - ] + }, + "type": "object" } } } @@ -8971,7 +9058,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Flows" + "$ref": "#/components/schemas/Roles" } } } @@ -8986,16 +9073,16 @@ } }, "tags": [ - "Flows" + "Roles" ] }, "patch": { - "summary": "Update Multiple Flows", - "description": "Update multiple flows at the same time.", + "summary": "Update Multiple Roles", + "description": "Update multiple roles at the same time.", "tags": [ - "Flows" + "Roles" ], - "operationId": "updateFlows", + "operationId": "updateRoles", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -9023,22 +9110,48 @@ "content": { "application/json": { "schema": { - "type": "object", "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/Flows" + "type": "object", + "properties": { + "description": { + "description": "Description of the role.", + "type": "string" + }, + "enforce_tfa": { + "description": "Whether or not this role enforces the use of 2FA.", + "type": "boolean" + }, + "external_id": { + "description": "ID used with external services in SCIM.", + "type": "string" + }, + "ip_access": { + "description": "Array of IP addresses that are allowed to connect to the API as a user of this role.", + "type": "array", + "items": { + "type": "string" + } + }, + "module_listing": { + "description": "Custom override for the admin app module bar navigation.", + "type": "string" + }, + "name": { + "description": "Name of the role.", + "type": "string", + "example": "Interns" } - ] - }, - "keys": { - "type": "array", - "items": { - "type": "string" } } - } + }, + "type": "object" } } } @@ -9054,7 +9167,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Flows" + "$ref": "#/components/schemas/Roles" } }, "meta": { @@ -9071,12 +9184,12 @@ } }, "delete": { - "summary": "Delete Multiple Flows", - "description": "Delete multiple existing flows.", + "summary": "Delete Multiple Roles", + "description": "Delete multiple existing roles.", "tags": [ - "Flows" + "Roles" ], - "operationId": "deleteFlows", + "operationId": "deleteRoles", "responses": { "200": { "description": "Successful request" @@ -9087,11 +9200,22 @@ } } }, - "/flows/{id}": { + "/roles/{id}": { "get": { - "summary": "Retrieve a Flow", - "description": "Retrieve a single flow by unique identifier.", - "operationId": "getFlow", + "summary": "Retrieve a Role", + "description": "Retrieve a single role by unique identifier.", + "operationId": "getRole", + "parameters": [ + { + "$ref": "#/components/parameters/UUId" + }, + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + } + ], "responses": { "200": { "description": "Successful request", @@ -9101,7 +9225,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Flows" + "$ref": "#/components/schemas/Roles" } } } @@ -9116,18 +9240,13 @@ } }, "tags": [ - "Flows" - ], - "parameters": [ - { - "$ref": "#/components/parameters/UUId" - } + "Roles" ] }, "patch": { - "summary": "Update a Flow", - "description": "Update an existing flow", - "operationId": "updateFlow", + "summary": "Update a Role", + "description": "Update an existing role", + "operationId": "updateRole", "parameters": [ { "$ref": "#/components/parameters/UUId" @@ -9143,11 +9262,36 @@ "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/Flows" + "properties": { + "description": { + "description": "Description of the role.", + "type": "string" + }, + "enforce_tfa": { + "description": "Whether or not this role enforces the use of 2FA.", + "type": "boolean" + }, + "external_id": { + "description": "ID used with external services in SCIM.", + "type": "string" + }, + "ip_access": { + "description": "Array of IP addresses that are allowed to connect to the API as a user of this role.", + "type": "array", + "items": { + "type": "string" + } + }, + "module_listing": { + "description": "Custom override for the admin app module bar navigation.", + "type": "string" + }, + "name": { + "description": "Name of the role.", + "type": "string" } - ] + }, + "type": "object" } } } @@ -9161,7 +9305,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Flows" + "$ref": "#/components/schemas/Roles" } } } @@ -9176,13 +9320,13 @@ } }, "tags": [ - "Flows" + "Roles" ] }, "delete": { - "summary": "Delete a Flow", - "description": "Delete an existing flow", - "operationId": "deleteFlow", + "summary": "Delete a Role", + "description": "Delete an existing role", + "operationId": "deleteRole", "responses": { "200": { "description": "Successful request" @@ -9195,7 +9339,7 @@ } }, "tags": [ - "Flows" + "Roles" ], "parameters": [ { @@ -9204,14 +9348,14 @@ ] } }, - "/presets": { + "/comments": { "get": { "tags": [ - "Presets" + "Comments" ], - "operationId": "getPresets", - "summary": "List Presets", - "description": "List the presets.", + "operationId": "getComments", + "summary": "List Comments", + "description": "List the comments.", "security": [ { "Auth": [] @@ -9254,7 +9398,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Presets" + "$ref": "#/components/schemas/Comments" } }, "meta": { @@ -9272,11 +9416,11 @@ }, "post": { "tags": [ - "Presets" + "Comments" ], - "operationId": "createPreset", - "summary": "Create a Preset", - "description": "Create a new preset.", + "operationId": "createComment", + "summary": "Create a Comment", + "description": "Create a new comment.", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -9291,63 +9435,23 @@ "schema": { "type": "object", "required": [ - "collection" + "collection", + "item", + "comment" ], "properties": { "collection": { "type": "string", - "description": "What collection this collection preset is used for.", - "example": "articles" - }, - "title": { - "type": "string", - "description": "Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark.", - "example": "Highly rated articles" - }, - "role": { - "type": "string", - "description": "The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role.", - "example": null - }, - "search": { - "type": "string", - "description": "What the user searched for in search/filter in the header bar." - }, - "filters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "example": "aHKLAakdVghzD" - }, - "field": { - "type": "string", - "example": "rating" - }, - "operator": { - "type": "string", - "example": "gte" - }, - "value": { - "type": "integer", - "example": 4.5 - } - } - } - }, - "layout": { - "type": "string", - "description": "Name of the view type that is used." + "description": "Which collection this collection comment is for.", + "example": "projects" }, - "layout_query": { + "item": { "type": "string", - "description": "Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters." + "example": "81dfa7e0-56d2-471f-b96a-1cf8a62bdf28" }, - "layout_options": { + "comment": { "type": "string", - "description": "Options of the views. The properties in here are controlled by the layout." + "example": "A new comment" } } } @@ -9363,7 +9467,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Presets" + "$ref": "#/components/schemas/Comments" } } } @@ -9376,12 +9480,12 @@ } }, "patch": { - "summary": "Update Multiple Presets", - "description": "Update multiple presets at the same time.", + "summary": "Update Multiple Comments", + "description": "Update multiple comments at the same time.", "tags": [ - "Presets" + "Comments" ], - "operationId": "updatePresets", + "operationId": "updateComments", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -9399,84 +9503,42 @@ "$ref": "#/components/parameters/Sort" }, { - "$ref": "#/components/parameters/Filter" - }, - { - "$ref": "#/components/parameters/Search" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "data": { - "type": "object", - "required": [ - "collection" - ], - "properties": { - "collection": { - "type": "string", - "description": "What collection this collection preset is used for.", - "example": "articles" - }, - "title": { - "type": "string", - "description": "Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark.", - "example": "Highly rated articles" - }, - "role": { - "type": "string", - "description": "The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role.", - "example": null - }, - "search": { - "type": "string", - "description": "What the user searched for in search/filter in the header bar." - }, - "filters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "example": "aHKLAakdVghzD" - }, - "field": { - "type": "string", - "example": "rating" - }, - "operator": { - "type": "string", - "example": "gte" - }, - "value": { - "type": "integer", - "example": 4.5 - } - } - } - }, - "layout": { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "data": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { "type": "string", - "description": "Name of the view type that is used." + "description": "Which collection this collection comment is for.", + "example": "projects" }, - "layout_query": { + "item": { "type": "string", - "description": "Layout query that's saved per layout type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters." + "example": "81dfa7e0-56d2-471f-b96a-1cf8a62bdf28" }, - "layout_options": { + "comment": { "type": "string", - "description": "Options of the views. The properties in here are controlled by the layout." + "example": "A new comment" } } } @@ -9496,7 +9558,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Presets" + "$ref": "#/components/schemas/Comments" } }, "meta": { @@ -9513,12 +9575,12 @@ } }, "delete": { - "summary": "Delete Multiple Presets", - "description": "Delete multiple existing presets.", + "summary": "Delete Multiple Comments", + "description": "Delete multiple existing comments.", "tags": [ - "Presets" + "Comments" ], - "operationId": "deletePresets", + "operationId": "deleteComments", "responses": { "200": { "description": "Successful request" @@ -9529,23 +9591,20 @@ } } }, - "/presets/{id}": { + "/comments/{id}": { "get": { "tags": [ - "Presets" + "Comments" ], - "operationId": "getPreset", - "summary": "Retrieve a Preset", - "description": "Retrieve a single preset by unique identifier.", + "operationId": "getComment", + "summary": "Retrieve a Comment", + "description": "Retrieve a single comment by unique identifier.", "security": [ { "Auth": [] } ], "parameters": [ - { - "$ref": "#/components/parameters/Id" - }, { "$ref": "#/components/parameters/Fields" }, @@ -9562,7 +9621,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Presets" + "$ref": "#/components/schemas/Comments" } } } @@ -9576,15 +9635,12 @@ }, "patch": { "tags": [ - "Presets" + "Comments" ], - "operationId": "updatePreset", - "summary": "Update a Preset", - "description": "Update an existing preset.", + "operationId": "updateComment", + "summary": "Update a Comment", + "description": "Update an existing comment.", "parameters": [ - { - "$ref": "#/components/parameters/Id" - }, { "$ref": "#/components/parameters/Fields" }, @@ -9603,57 +9659,16 @@ "properties": { "collection": { "type": "string", - "description": "What collection this collection preset is used for.", - "example": "articles" - }, - "title": { - "type": "string", - "description": "Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark.", - "example": "Highly rated articles" - }, - "role": { - "type": "integer", - "description": "The unique identifier of a role in the platform. If user is null, this will be used to apply the collection preset or bookmark for all users in the role." - }, - "search_query": { - "type": "string", - "description": "What the user searched for in search/filter in the header bar." - }, - "filters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string", - "example": "rating" - }, - "operator": { - "type": "string", - "example": "gte" - }, - "value": { - "type": "integer", - "example": 4.5 - } - } - } - }, - "view_type": { - "type": "string", - "description": "Name of the view type that is used. Defaults to tabular." + "description": "Which collection this comment is for.", + "example": "projects" }, - "view_query": { + "item": { "type": "string", - "description": "View query that's saved per view type. Controls what data is fetched on load. These follow the same format as the JS SDK parameters." + "example": "81dfa7e0-56d2-471f-b96a-1cf8a62bdf28" }, - "view_options": { + "comment": { "type": "string", - "description": "Options of the views. The properties in here are controlled by the layout." - }, - "translation": { - "type": "object", - "description": "Key value pair of language-translation. Can be used to translate the bookmark title in multiple languages." + "example": "An updated comment" } } } @@ -9669,7 +9684,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Presets" + "$ref": "#/components/schemas/Comments" } } } @@ -9678,16 +9693,19 @@ }, "401": { "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" } } }, "delete": { "tags": [ - "Presets" + "Comments" ], - "operationId": "deletePreset", - "summary": "Delete a Preset", - "description": "Delete an existing preset.", + "operationId": "deleteComment", + "summary": "Delete a Comment", + "description": "Delete an existing comment.", "security": [ { "Auth": [] @@ -9700,19 +9718,14 @@ "401": { "$ref": "#/components/responses/UnauthorizedError" } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Id" - } - ] + } } }, - "/roles": { + "/activity": { "get": { - "summary": "List Roles", - "description": "List the roles.", - "operationId": "getRoles", + "operationId": "getActivities", + "summary": "List Activity Actions", + "description": "Returns a list of activity actions.", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -9721,10 +9734,10 @@ "$ref": "#/components/parameters/Limit" }, { - "$ref": "#/components/parameters/Offset" + "$ref": "#/components/parameters/Meta" }, { - "$ref": "#/components/parameters/Meta" + "$ref": "#/components/parameters/Offset" }, { "$ref": "#/components/parameters/Sort" @@ -9734,14 +9747,10 @@ }, { "$ref": "#/components/parameters/Search" - }, - { - "$ref": "#/components/parameters/Page" } ], "responses": { "200": { - "description": "Successful request", "content": { "application/json": { "schema": { @@ -9750,7 +9759,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Roles" + "$ref": "#/components/schemas/Activity" } }, "meta": { @@ -9759,7 +9768,8 @@ } } } - } + }, + "description": "Successful request" }, "401": { "$ref": "#/components/responses/UnauthorizedError" @@ -9769,14 +9779,19 @@ } }, "tags": [ - "Roles" + "Activity" ] - }, - "post": { - "summary": "Create a Role", - "description": "Create a new role.", - "operationId": "createRole", + } + }, + "/activity/{id}": { + "get": { + "summary": "Retrieve an Activity Action", + "description": "Retrieves the details of an existing activity action. Provide the primary key of the activity action and Directus will return the corresponding information.", + "operationId": "getActivity", "parameters": [ + { + "$ref": "#/components/parameters/Id" + }, { "$ref": "#/components/parameters/Fields" }, @@ -9784,41 +9799,63 @@ "$ref": "#/components/parameters/Meta" } ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Activity" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "tags": [ + "Activity" + ] + } + }, + "/items/recipes": { + "post": { + "summary": "Create an Item", + "description": "Create a new recipes item.", + "tags": [ + "Items", + "ItemsRecipes" + ], + "operationId": "createItemsRecipes", + "parameters": [ + { + "$ref": "#/components/parameters/Meta" + } + ], "requestBody": { "content": { "application/json": { "schema": { - "properties": { - "description": { - "description": "Description of the role.", - "type": "string" - }, - "enforce_tfa": { - "description": "Whether or not this role enforces the use of 2FA.", - "type": "boolean" - }, - "external_id": { - "description": "ID used with external services in SCIM.", - "type": "string" - }, - "ip_access": { - "description": "Array of IP addresses that are allowed to connect to the API as a user of this role.", + "oneOf": [ + { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ItemsRecipes" } }, - "module_listing": { - "description": "Custom override for the admin app module bar navigation.", - "type": "string" - }, - "name": { - "description": "Name of the role.", - "type": "string", - "example": "Interns" + { + "$ref": "#/components/schemas/ItemsRecipes" } - }, - "type": "object" + ] } } } @@ -9832,7 +9869,9 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Roles" + "items": { + "$ref": "#/components/schemas/ItemsRecipes" + } } } } @@ -9841,22 +9880,22 @@ }, "401": { "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" } - }, - "tags": [ - "Roles" - ] + } }, - "patch": { - "summary": "Update Multiple Roles", - "description": "Update multiple roles at the same time.", + "get": { + "summary": "List Items", + "description": "List the recipes items.", "tags": [ - "Roles" + "Items", + "ItemsRecipes" + ], + "operationId": "readItemsRecipes", + "security": [ + { + "Auth": [] + } ], - "operationId": "updateRoles", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -9880,56 +9919,6 @@ "$ref": "#/components/parameters/Search" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "keys": { - "type": "array", - "items": { - "type": "string" - } - }, - "data": { - "type": "object", - "properties": { - "description": { - "description": "Description of the role.", - "type": "string" - }, - "enforce_tfa": { - "description": "Whether or not this role enforces the use of 2FA.", - "type": "boolean" - }, - "external_id": { - "description": "ID used with external services in SCIM.", - "type": "string" - }, - "ip_access": { - "description": "Array of IP addresses that are allowed to connect to the API as a user of this role.", - "type": "array", - "items": { - "type": "string" - } - }, - "module_listing": { - "description": "Custom override for the admin app module bar navigation.", - "type": "string" - }, - "name": { - "description": "Name of the role.", - "type": "string", - "example": "Interns" - } - } - } - }, - "type": "object" - } - } - } - }, "responses": { "200": { "description": "Successful request", @@ -9941,7 +9930,8 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Roles" + "type": "object", + "$ref": "#/components/schemas/ItemsRecipes" } }, "meta": { @@ -9957,115 +9947,52 @@ } } }, - "delete": { - "summary": "Delete Multiple Roles", - "description": "Delete multiple existing roles.", + "patch": { + "summary": "Update Multiple Items", + "description": "Update multiple recipes items at the same time.", "tags": [ - "Roles" + "Items", + "ItemsRecipes" ], - "operationId": "deleteRoles", - "responses": { - "200": { - "description": "Successful request" - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - } - } - } - }, - "/roles/{id}": { - "get": { - "summary": "Retrieve a Role", - "description": "Retrieve a single role by unique identifier.", - "operationId": "getRole", + "operationId": "updateItemsRecipes", "parameters": [ { - "$ref": "#/components/parameters/UUId" + "$ref": "#/components/parameters/Fields" }, { - "$ref": "#/components/parameters/Fields" + "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Meta" - } - ], - "responses": { - "200": { - "description": "Successful request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/Roles" - } - } - } - } - } }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" + { + "$ref": "#/components/parameters/Offset" }, - "404": { - "$ref": "#/components/responses/NotFoundError" - } - }, - "tags": [ - "Roles" - ] - }, - "patch": { - "summary": "Update a Role", - "description": "Update an existing role", - "operationId": "updateRole", - "parameters": [ { - "$ref": "#/components/parameters/UUId" + "$ref": "#/components/parameters/Sort" }, { - "$ref": "#/components/parameters/Fields" + "$ref": "#/components/parameters/Filter" }, { - "$ref": "#/components/parameters/Meta" + "$ref": "#/components/parameters/Search" } ], "requestBody": { "content": { "application/json": { "schema": { - "properties": { - "description": { - "description": "Description of the role.", - "type": "string" - }, - "enforce_tfa": { - "description": "Whether or not this role enforces the use of 2FA.", - "type": "boolean" - }, - "external_id": { - "description": "ID used with external services in SCIM.", - "type": "string" - }, - "ip_access": { - "description": "Array of IP addresses that are allowed to connect to the API as a user of this role.", + "oneOf": [ + { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ItemsRecipes" } }, - "module_listing": { - "description": "Custom override for the admin app module bar navigation.", - "type": "string" - }, - "name": { - "description": "Name of the role.", - "type": "string" + { + "$ref": "#/components/schemas/ItemsRecipes" } - }, - "type": "object" + ] } } } @@ -10076,89 +10003,76 @@ "content": { "application/json": { "schema": { - "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Roles" + "items": { + "$ref": "#/components/schemas/ItemsRecipes" + } } } } } } - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" } - }, - "tags": [ - "Roles" - ] + } }, "delete": { - "summary": "Delete a Role", - "description": "Delete an existing role", - "operationId": "deleteRole", + "summary": "Delete Multiple Items", + "description": "Delete multiple existing recipes items.", + "tags": [ + "Items", + "ItemsRecipes" + ], + "operationId": "deleteItemsRecipes", "responses": { "200": { "description": "Successful request" }, "401": { "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" } }, - "tags": [ - "Roles" - ], - "parameters": [ - { - "$ref": "#/components/parameters/UUId" - } - ] + "parameters": [] } }, - "/comments": { + "/items/recipes/{id}": { "get": { + "summary": "Retrieve an Item", + "description": "Retrieve a single recipes item by unique identifier.", "tags": [ - "Comments" - ], - "operationId": "getComments", - "summary": "List Comments", - "description": "List the comments.", - "security": [ - { - "Auth": [] - } + "Items", + "ItemsRecipes" ], + "operationId": "readSingleItemsRecipes", "parameters": [ { "$ref": "#/components/parameters/Fields" }, { - "$ref": "#/components/parameters/Limit" - }, - { - "$ref": "#/components/parameters/Offset" - }, - { - "$ref": "#/components/parameters/Page" - }, - { - "$ref": "#/components/parameters/Sort" - }, - { - "$ref": "#/components/parameters/Filter" + "$ref": "#/components/parameters/Meta" }, { - "$ref": "#/components/parameters/Search" + "$ref": "#/components/parameters/Version" }, { - "$ref": "#/components/parameters/Meta" + "name": "id", + "description": "Index of the item.", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "integer", + "description": "Incremental index of the item.", + "example": 1 + }, + { + "type": "string", + "description": "Unique identifier of the item.", + "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" + } + ] + } } ], "responses": { @@ -10170,13 +10084,8 @@ "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Comments" - } - }, - "meta": { - "$ref": "#/components/schemas/x-metadata" + "type": "object", + "$ref": "#/components/schemas/ItemsRecipes" } } } @@ -10185,22 +10094,46 @@ }, "401": { "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" } } }, - "post": { + "patch": { + "summary": "Update an Item", + "description": "Update an existing recipes item.", "tags": [ - "Comments" + "Items", + "ItemsRecipes" ], - "operationId": "createComment", - "summary": "Create a Comment", - "description": "Create a new comment.", + "operationId": "updateSingleItemsRecipes", "parameters": [ { "$ref": "#/components/parameters/Fields" }, { "$ref": "#/components/parameters/Meta" + }, + { + "name": "id", + "description": "Index of the item.", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "integer", + "description": "Incremental index of the item.", + "example": 1 + }, + { + "type": "string", + "description": "Unique identifier of the item.", + "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" + } + ] + } } ], "requestBody": { @@ -10208,26 +10141,7 @@ "application/json": { "schema": { "type": "object", - "required": [ - "collection", - "item", - "comment" - ], - "properties": { - "collection": { - "type": "string", - "description": "Which collection this collection comment is for.", - "example": "projects" - }, - "item": { - "type": "string", - "example": "81dfa7e0-56d2-471f-b96a-1cf8a62bdf28" - }, - "comment": { - "type": "string", - "example": "A new comment" - } - } + "$ref": "#/components/schemas/ItemsRecipes" } } } @@ -10241,7 +10155,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Comments" + "type": "object", + "$ref": "#/components/schemas/ItemsRecipes" } } } @@ -10250,73 +10165,84 @@ }, "401": { "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" } } }, - "patch": { - "summary": "Update Multiple Comments", - "description": "Update multiple comments at the same time.", + "delete": { + "summary": "Delete an Item", + "description": "Delete an existing recipes item.", "tags": [ - "Comments" + "Items", + "ItemsRecipes" ], - "operationId": "updateComments", - "parameters": [ - { - "$ref": "#/components/parameters/Fields" - }, - { - "$ref": "#/components/parameters/Limit" - }, - { - "$ref": "#/components/parameters/Meta" - }, - { - "$ref": "#/components/parameters/Offset" + "operationId": "deleteSingleItemsRecipes", + "responses": { + "200": { + "description": "Successful request" }, - { - "$ref": "#/components/parameters/Sort" + "401": { + "$ref": "#/components/responses/UnauthorizedError" }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "parameters": [ { - "$ref": "#/components/parameters/Filter" - }, + "name": "id", + "description": "Index of the item.", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "integer", + "description": "Incremental index of the item.", + "example": 1 + }, + { + "type": "string", + "description": "Unique identifier of the item.", + "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" + } + ] + } + } + ] + } + }, + "/items/instructions": { + "post": { + "summary": "Create an Item", + "description": "Create a new instructions item.", + "tags": [ + "Items", + "ItemsInstructions" + ], + "operationId": "createItemsInstructions", + "parameters": [ { - "$ref": "#/components/parameters/Search" + "$ref": "#/components/parameters/Meta" } ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "keys": { + "oneOf": [ + { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ItemsInstructions" } }, - "data": { - "type": "object", - "required": [ - "collection" - ], - "properties": { - "collection": { - "type": "string", - "description": "Which collection this collection comment is for.", - "example": "projects" - }, - "item": { - "type": "string", - "example": "81dfa7e0-56d2-471f-b96a-1cf8a62bdf28" - }, - "comment": { - "type": "string", - "example": "A new comment" - } - } + { + "$ref": "#/components/schemas/ItemsInstructions" } - } + ] } } } @@ -10330,13 +10256,9 @@ "type": "object", "properties": { "data": { - "type": "array", "items": { - "$ref": "#/components/schemas/Comments" + "$ref": "#/components/schemas/ItemsInstructions" } - }, - "meta": { - "$ref": "#/components/schemas/x-metadata" } } } @@ -10348,31 +10270,14 @@ } } }, - "delete": { - "summary": "Delete Multiple Comments", - "description": "Delete multiple existing comments.", - "tags": [ - "Comments" - ], - "operationId": "deleteComments", - "responses": { - "200": { - "description": "Successful request" - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - } - } - } - }, - "/comments/{id}": { "get": { + "summary": "List Items", + "description": "List the instructions items.", "tags": [ - "Comments" + "Items", + "ItemsInstructions" ], - "operationId": "getComment", - "summary": "Retrieve a Comment", - "description": "Retrieve a single comment by unique identifier.", + "operationId": "readItemsInstructions", "security": [ { "Auth": [] @@ -10382,8 +10287,23 @@ { "$ref": "#/components/parameters/Fields" }, + { + "$ref": "#/components/parameters/Limit" + }, { "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" } ], "responses": { @@ -10395,7 +10315,14 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Comments" + "type": "array", + "items": { + "type": "object", + "$ref": "#/components/schemas/ItemsInstructions" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" } } } @@ -10408,43 +10335,51 @@ } }, "patch": { + "summary": "Update Multiple Items", + "description": "Update multiple instructions items at the same time.", "tags": [ - "Comments" + "Items", + "ItemsInstructions" ], - "operationId": "updateComment", - "summary": "Update a Comment", - "description": "Update an existing comment.", + "operationId": "updateItemsInstructions", "parameters": [ { "$ref": "#/components/parameters/Fields" }, + { + "$ref": "#/components/parameters/Limit" + }, { "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" } ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "collection" - ], - "properties": { - "collection": { - "type": "string", - "description": "Which collection this comment is for.", - "example": "projects" - }, - "item": { - "type": "string", - "example": "81dfa7e0-56d2-471f-b96a-1cf8a62bdf28" + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemsInstructions" + } }, - "comment": { - "type": "string", - "example": "An updated comment" + { + "$ref": "#/components/schemas/ItemsInstructions" } - } + ] } } } @@ -10455,36 +10390,27 @@ "content": { "application/json": { "schema": { - "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Comments" + "items": { + "$ref": "#/components/schemas/ItemsInstructions" + } } } } } } - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" } } }, "delete": { + "summary": "Delete Multiple Items", + "description": "Delete multiple existing instructions items.", "tags": [ - "Comments" - ], - "operationId": "deleteComment", - "summary": "Delete a Comment", - "description": "Delete an existing comment.", - "security": [ - { - "Auth": [] - } + "Items", + "ItemsInstructions" ], + "operationId": "deleteItemsInstructions", "responses": { "200": { "description": "Successful request" @@ -10492,58 +10418,66 @@ "401": { "$ref": "#/components/responses/UnauthorizedError" } - } + }, + "parameters": [] } }, - "/activity": { + "/items/instructions/{id}": { "get": { - "operationId": "getActivities", - "summary": "List Activity Actions", - "description": "Returns a list of activity actions.", + "summary": "Retrieve an Item", + "description": "Retrieve a single instructions item by unique identifier.", + "tags": [ + "Items", + "ItemsInstructions" + ], + "operationId": "readSingleItemsInstructions", "parameters": [ { "$ref": "#/components/parameters/Fields" }, - { - "$ref": "#/components/parameters/Limit" - }, { "$ref": "#/components/parameters/Meta" }, { - "$ref": "#/components/parameters/Offset" - }, - { - "$ref": "#/components/parameters/Sort" - }, - { - "$ref": "#/components/parameters/Filter" + "$ref": "#/components/parameters/Version" }, { - "$ref": "#/components/parameters/Search" + "name": "id", + "description": "Index of the item.", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "integer", + "description": "Incremental index of the item.", + "example": 1 + }, + { + "type": "string", + "description": "Unique identifier of the item.", + "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" + } + ] + } } ], "responses": { "200": { + "description": "Successful request", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Activity" - } - }, - "meta": { - "$ref": "#/components/schemas/x-metadata" + "type": "object", + "$ref": "#/components/schemas/ItemsInstructions" } } } } - }, - "description": "Successful request" + } }, "401": { "$ref": "#/components/responses/UnauthorizedError" @@ -10551,28 +10485,54 @@ "404": { "$ref": "#/components/responses/NotFoundError" } - }, + } + }, + "patch": { + "summary": "Update an Item", + "description": "Update an existing instructions item.", "tags": [ - "Activity" - ] - } - }, - "/activity/{id}": { - "get": { - "summary": "Retrieve an Activity Action", - "description": "Retrieves the details of an existing activity action. Provide the primary key of the activity action and Directus will return the corresponding information.", - "operationId": "getActivity", + "Items", + "ItemsInstructions" + ], + "operationId": "updateSingleItemsInstructions", "parameters": [ - { - "$ref": "#/components/parameters/Id" - }, { "$ref": "#/components/parameters/Fields" }, { "$ref": "#/components/parameters/Meta" + }, + { + "name": "id", + "description": "Index of the item.", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "integer", + "description": "Incremental index of the item.", + "example": 1 + }, + { + "type": "string", + "description": "Unique identifier of the item.", + "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" + } + ] + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ItemsInstructions" + } + } + } + }, "responses": { "200": { "description": "Successful request", @@ -10582,7 +10542,8 @@ "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/Activity" + "type": "object", + "$ref": "#/components/schemas/ItemsInstructions" } } } @@ -10595,21 +10556,60 @@ "404": { "$ref": "#/components/responses/NotFoundError" } - }, + } + }, + "delete": { + "summary": "Delete an Item", + "description": "Delete an existing instructions item.", "tags": [ - "Activity" + "Items", + "ItemsInstructions" + ], + "operationId": "deleteSingleItemsInstructions", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "parameters": [ + { + "name": "id", + "description": "Index of the item.", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "integer", + "description": "Incremental index of the item.", + "example": 1 + }, + { + "type": "string", + "description": "Unique identifier of the item.", + "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" + } + ] + } + } ] } }, - "/items/recipes": { + "/items/ingredients": { "post": { "summary": "Create an Item", - "description": "Create a new recipes item.", + "description": "Create a new ingredients item.", "tags": [ "Items", - "ItemsRecipes" + "ItemsIngredients" ], - "operationId": "createItemsRecipes", + "operationId": "createItemsIngredients", "parameters": [ { "$ref": "#/components/parameters/Meta" @@ -10623,11 +10623,11 @@ { "type": "array", "items": { - "$ref": "#/components/schemas/ItemsRecipes" + "$ref": "#/components/schemas/ItemsIngredients" } }, { - "$ref": "#/components/schemas/ItemsRecipes" + "$ref": "#/components/schemas/ItemsIngredients" } ] } @@ -10644,7 +10644,7 @@ "properties": { "data": { "items": { - "$ref": "#/components/schemas/ItemsRecipes" + "$ref": "#/components/schemas/ItemsIngredients" } } } @@ -10659,12 +10659,12 @@ }, "get": { "summary": "List Items", - "description": "List the recipes items.", + "description": "List the ingredients items.", "tags": [ "Items", - "ItemsRecipes" + "ItemsIngredients" ], - "operationId": "readItemsRecipes", + "operationId": "readItemsIngredients", "security": [ { "Auth": [] @@ -10705,7 +10705,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/components/schemas/ItemsRecipes" + "$ref": "#/components/schemas/ItemsIngredients" } }, "meta": { @@ -10723,12 +10723,12 @@ }, "patch": { "summary": "Update Multiple Items", - "description": "Update multiple recipes items at the same time.", + "description": "Update multiple ingredients items at the same time.", "tags": [ "Items", - "ItemsRecipes" + "ItemsIngredients" ], - "operationId": "updateItemsRecipes", + "operationId": "updateItemsIngredients", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -10760,11 +10760,11 @@ { "type": "array", "items": { - "$ref": "#/components/schemas/ItemsRecipes" + "$ref": "#/components/schemas/ItemsIngredients" } }, { - "$ref": "#/components/schemas/ItemsRecipes" + "$ref": "#/components/schemas/ItemsIngredients" } ] } @@ -10780,7 +10780,7 @@ "properties": { "data": { "items": { - "$ref": "#/components/schemas/ItemsRecipes" + "$ref": "#/components/schemas/ItemsIngredients" } } } @@ -10792,12 +10792,12 @@ }, "delete": { "summary": "Delete Multiple Items", - "description": "Delete multiple existing recipes items.", + "description": "Delete multiple existing ingredients items.", "tags": [ "Items", - "ItemsRecipes" + "ItemsIngredients" ], - "operationId": "deleteItemsRecipes", + "operationId": "deleteItemsIngredients", "responses": { "200": { "description": "Successful request" @@ -10809,15 +10809,15 @@ "parameters": [] } }, - "/items/recipes/{id}": { + "/items/ingredients/{id}": { "get": { "summary": "Retrieve an Item", - "description": "Retrieve a single recipes item by unique identifier.", + "description": "Retrieve a single ingredients item by unique identifier.", "tags": [ "Items", - "ItemsRecipes" + "ItemsIngredients" ], - "operationId": "readSingleItemsRecipes", + "operationId": "readSingleItemsIngredients", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -10859,7 +10859,7 @@ "properties": { "data": { "type": "object", - "$ref": "#/components/schemas/ItemsRecipes" + "$ref": "#/components/schemas/ItemsIngredients" } } } @@ -10876,12 +10876,12 @@ }, "patch": { "summary": "Update an Item", - "description": "Update an existing recipes item.", + "description": "Update an existing ingredients item.", "tags": [ "Items", - "ItemsRecipes" + "ItemsIngredients" ], - "operationId": "updateSingleItemsRecipes", + "operationId": "updateSingleItemsIngredients", "parameters": [ { "$ref": "#/components/parameters/Fields" @@ -10915,7 +10915,7 @@ "application/json": { "schema": { "type": "object", - "$ref": "#/components/schemas/ItemsRecipes" + "$ref": "#/components/schemas/ItemsIngredients" } } } @@ -10930,7 +10930,7 @@ "properties": { "data": { "type": "object", - "$ref": "#/components/schemas/ItemsRecipes" + "$ref": "#/components/schemas/ItemsIngredients" } } } @@ -10947,12 +10947,12 @@ }, "delete": { "summary": "Delete an Item", - "description": "Delete an existing recipes item.", + "description": "Delete an existing ingredients item.", "tags": [ "Items", - "ItemsRecipes" + "ItemsIngredients" ], - "operationId": "deleteSingleItemsRecipes", + "operationId": "deleteSingleItemsIngredients", "responses": { "200": { "description": "Successful request" @@ -11079,10 +11079,6 @@ "name": "ItemsInstructionGroups", "x-collection": "instructionGroups" }, - { - "name": "ItemsInstructions", - "x-collection": "instructions" - }, { "name": "ItemsHomePage", "x-collection": "home_page" @@ -11095,10 +11091,6 @@ "name": "ItemsIngredientUnitForms", "x-collection": "ingredient_unit_forms" }, - { - "name": "ItemsIngredients", - "x-collection": "ingredients" - }, { "name": "Webhooks", "description": "Webhooks.", @@ -11147,6 +11139,14 @@ { "name": "ItemsRecipes", "x-collection": "recipes" + }, + { + "name": "ItemsInstructions", + "x-collection": "instructions" + }, + { + "name": "ItemsIngredients", + "x-collection": "ingredients" } ], "components": { @@ -12313,61 +12313,6 @@ }, "x-collection": "instructionGroups" }, - "ItemsInstructions": { - "type": "object", - "properties": { - "id": { - "nullable": false, - "type": "integer" - }, - "instructionGroup_id": { - "nullable": true, - "oneOf": [ - { - "type": "integer" - }, - { - "$ref": "#/components/schemas/ItemsInstructionGroups" - } - ] - }, - "image": { - "nullable": true, - "oneOf": [ - { - "type": "string", - "format": "uuid" - }, - { - "$ref": "#/components/schemas/Files" - } - ] - }, - "text": { - "nullable": true - }, - "sort": { - "nullable": true, - "type": "integer" - }, - "inline_ingredients": { - "nullable": true, - "type": "array", - "items": { - "oneOf": [ - { - "type": "string", - "format": "uuid" - }, - { - "$ref": "#/components/schemas/ItemsInlineIngredients" - } - ] - } - } - }, - "x-collection": "instructions" - }, "ItemsHomePage": { "type": "object", "properties": { @@ -12430,54 +12375,6 @@ }, "x-collection": "ingredient_unit_forms" }, - "ItemsIngredients": { - "type": "object", - "properties": { - "id": { - "nullable": false, - "type": "integer" - }, - "ingredientGroup_id": { - "nullable": true, - "oneOf": [ - { - "type": "integer" - }, - { - "$ref": "#/components/schemas/ItemsIngredientGroups" - } - ] - }, - "amount": { - "nullable": true, - "type": "number", - "format": "float" - }, - "unit": { - "nullable": true, - "type": "string" - }, - "note": { - "nullable": true, - "type": "string" - }, - "sort": { - "nullable": true, - "type": "integer" - }, - "name_singular": { - "nullable": true - }, - "name_plural": { - "nullable": true - }, - "inline_only": { - "nullable": false, - "type": "boolean" - } - }, - "x-collection": "ingredients" - }, "Webhooks": { "type": "object", "properties": { @@ -13422,6 +13319,11 @@ "nullable": true, "type": "string" }, + "date_published": { + "nullable": true, + "type": "string", + "format": "timestamp" + }, "ingredientGroups": { "nullable": true, "type": "array", @@ -13458,6 +13360,116 @@ "description", "description_snippet" ] + }, + "ItemsInstructions": { + "type": "object", + "properties": { + "id": { + "nullable": false, + "type": "integer" + }, + "instructionGroup_id": { + "nullable": true, + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "#/components/schemas/ItemsInstructionGroups" + } + ] + }, + "image": { + "nullable": true, + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/Files" + } + ] + }, + "text": { + "nullable": false + }, + "sort": { + "nullable": true, + "type": "integer" + }, + "inline_ingredients": { + "nullable": true, + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/ItemsInlineIngredients" + } + ] + } + } + }, + "x-collection": "instructions", + "required": [ + "text" + ] + }, + "ItemsIngredients": { + "type": "object", + "properties": { + "id": { + "nullable": false, + "type": "integer" + }, + "ingredientGroup_id": { + "nullable": true, + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "#/components/schemas/ItemsIngredientGroups" + } + ] + }, + "amount": { + "nullable": true, + "type": "number", + "format": "float" + }, + "unit": { + "nullable": true, + "type": "string" + }, + "note": { + "nullable": true, + "type": "string" + }, + "sort": { + "nullable": true, + "type": "integer" + }, + "name_singular": { + "nullable": false + }, + "name_plural": { + "nullable": false + }, + "inline_only": { + "nullable": false, + "type": "boolean" + } + }, + "x-collection": "ingredients", + "required": [ + "name_singular", + "name_plural" + ] } }, "parameters": { diff --git a/website/clients/useDirectusApi.ts b/website/clients/useDirectusApi.ts index 366d06d..149eb35 100644 --- a/website/clients/useDirectusApi.ts +++ b/website/clients/useDirectusApi.ts @@ -52,7 +52,7 @@ export const useDirectusApi = () => { query: { fields: searchFields, filter: `{"status":{"_eq":"published"}}`, - sort: ["-date_created"], + sort: ["-date_published"], }, }, querySerializer: { @@ -66,7 +66,14 @@ export const useDirectusApi = () => { } const mapper = useMapper(); - return { data: data.data?.map((r) => mapper.toRecipePreview(r)) }; + const now = new Date(); + + return { + data: data.data + ?.map((r) => mapper.toRecipePreview(r)) + // A missing date_published value means the recipe is brand new and the publish date has not been set in the record yet, so use the current time. + .sort((a, b) => (b.date_published ?? now).getTime() - (a.date_published ?? now).getTime()), + }; }, getRecipe: async (slug: string) => { const { data, error } = await client.GET("/items/recipes", { diff --git a/website/composables/useMapper.ts b/website/composables/useMapper.ts index 04fa00a..e33fdb9 100644 --- a/website/composables/useMapper.ts +++ b/website/composables/useMapper.ts @@ -141,7 +141,7 @@ function toRecipePreview(serverRecipe: ServerRecipe): RecipePreview { descriptionSnippet: serverRecipe.description_snippet, course: serverRecipe.course ?? undefined, cuisine: serverRecipe.cuisine ?? undefined, - date_created: serverRecipe.date_created!, + date_published: serverRecipe.date_published ? new Date(serverRecipe.date_published) : undefined, favourite: serverRecipe.favourite ?? undefined, featuredTag: getRandomTag(tags, serverRecipe.id!), preparationDuration: serverRecipe.preparationDuration ?? undefined, diff --git a/website/package.json b/website/package.json index 823ef27..4e67e3f 100644 --- a/website/package.json +++ b/website/package.json @@ -60,7 +60,7 @@ "typescript": "5.6.3", "unplugin-icons": "^0.19.3", "vue-tsc": "^2.2.4", - "wrangler": "3.19.0" + "wrangler": "3.111.0" }, "packageManager": "pnpm@8.9.0" } \ No newline at end of file diff --git a/website/pnpm-lock.yaml b/website/pnpm-lock.yaml index 02765b7..9c3efa1 100644 --- a/website/pnpm-lock.yaml +++ b/website/pnpm-lock.yaml @@ -146,8 +146,8 @@ devDependencies: specifier: ^2.2.4 version: 2.2.4(typescript@5.6.3) wrangler: - specifier: 3.19.0 - version: 3.19.0 + specifier: 3.111.0 + version: 3.111.0(@cloudflare/workers-types@4.20250224.0) packages: @@ -520,12 +520,6 @@ packages: sisteransi: 1.0.5 dev: true - /@cloudflare/kv-asset-handler@0.2.0: - resolution: {integrity: sha512-MVbXLbTcAotOPUj0pAMhVtJ+3/kFkwJqc5qNOleOZTv6QkZZABDMS21dSrSlVswEHwrpWC03e4fWytjqKvuE2A==} - dependencies: - mime: 3.0.0 - dev: true - /@cloudflare/kv-asset-handler@0.3.4: resolution: {integrity: sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q==} engines: {node: '>=16.13'} @@ -533,8 +527,8 @@ packages: mime: 3.0.0 dev: true - /@cloudflare/workerd-darwin-64@1.20231030.0: - resolution: {integrity: sha512-J4PQ9utPxLya9yHdMMx3AZeC5M/6FxcoYw6jo9jbDDFTy+a4Gslqf4Im9We3aeOEdPXa3tgQHVQOSelJSZLhIw==} + /@cloudflare/workerd-darwin-64@1.20250214.0: + resolution: {integrity: sha512-cDvvedWDc5zrgDnuXe2qYcz/TwBvzmweO55C7XpPuAWJ9Oqxv81PkdekYxD8mH989aQ/GI5YD0Fe6fDYlM+T3Q==} engines: {node: '>=16'} cpu: [x64] os: [darwin] @@ -542,8 +536,8 @@ packages: dev: true optional: true - /@cloudflare/workerd-darwin-arm64@1.20231030.0: - resolution: {integrity: sha512-WSJJjm11Del4hSneiNB7wTXGtBXI4QMCH9l5qf4iT5PAW8cESGcCmdHtWDWDtGAAGcvmLT04KNvmum92vRKKQQ==} + /@cloudflare/workerd-darwin-arm64@1.20250214.0: + resolution: {integrity: sha512-NytCvRveVzu0mRKo+tvZo3d/gCUway3B2ZVqSi/TS6NXDGBYIJo7g6s3BnTLS74kgyzeDOjhu9j/RBJBS809qw==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] @@ -551,8 +545,8 @@ packages: dev: true optional: true - /@cloudflare/workerd-linux-64@1.20231030.0: - resolution: {integrity: sha512-2HUeRTvoCC17fxE0qdBeR7J9dO8j4A8ZbdcvY8pZxdk+zERU6+N03RTbk/dQMU488PwiDvcC3zZqS4gwLfVT8g==} + /@cloudflare/workerd-linux-64@1.20250214.0: + resolution: {integrity: sha512-pQ7+aHNHj8SiYEs4d/6cNoimE5xGeCMfgU1yfDFtA9YGN9Aj2BITZgOWPec+HW7ZkOy9oWlNrO6EvVjGgB4tbQ==} engines: {node: '>=16'} cpu: [x64] os: [linux] @@ -560,8 +554,8 @@ packages: dev: true optional: true - /@cloudflare/workerd-linux-arm64@1.20231030.0: - resolution: {integrity: sha512-4/GK5zHh+9JbUI6Z5xTCM0ZmpKKHk7vu9thmHjUxtz+o8Ne9DoD7DlDvXQWgMF6XGaTubDWyp3ttn+Qv8jDFuQ==} + /@cloudflare/workerd-linux-arm64@1.20250214.0: + resolution: {integrity: sha512-Vhlfah6Yd9ny1npNQjNgElLIjR6OFdEbuR3LCfbLDCwzWEBFhIf7yC+Tpp/a0Hq7kLz3sLdktaP7xl3PJhyOjA==} engines: {node: '>=16'} cpu: [arm64] os: [linux] @@ -569,8 +563,8 @@ packages: dev: true optional: true - /@cloudflare/workerd-windows-64@1.20231030.0: - resolution: {integrity: sha512-fb/Jgj8Yqy3PO1jLhk7mTrHMkR8jklpbQFud6rL/aMAn5d6MQbaSrYOCjzkKGp0Zng8D2LIzSl+Fc0C9Sggxjg==} + /@cloudflare/workerd-windows-64@1.20250214.0: + resolution: {integrity: sha512-GMwMyFbkjBKjYJoKDhGX8nuL4Gqe3IbVnVWf2Q6086CValyIknupk5J6uQWGw2EBU3RGO3x4trDXT5WphQJZDQ==} engines: {node: '>=16'} cpu: [x64] os: [win32] @@ -582,11 +576,26 @@ packages: resolution: {integrity: sha512-j6ZwQ5G2moQRaEtGI2u5TBQhVXv/XwOS5jfBAheZHcpCM07zm8j0i8jZHHLq/6VA8e6VRjKohOyj5j6tZ1KHLQ==} dev: true + /@cspotcode/source-map-support@0.8.1: + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + dev: true + /@directus/sdk@18.0.3: resolution: {integrity: sha512-PnEDRDqr2x/DG3HZ3qxU7nFp2nW6zqJqswjii57NhriXgTz4TBUI8NmSdzQvnyHuTL9J0nedYfQGfW4v8odS1A==} engines: {node: '>=18.0.0'} dev: true + /@emnapi/runtime@1.3.1: + resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} + requiresBuild: true + dependencies: + tslib: 2.8.1 + dev: true + optional: true + /@es-joy/jsdoccomment@0.49.0: resolution: {integrity: sha512-xjZTSFgECpb9Ohuk5yMX5RhUEbfeQcuOp8IF60e+wyzWEF0M5xeSgqsfLtvPEX8BIyOX9saZqzuGPmZ8oWc+5Q==} engines: {node: '>=16'} @@ -1647,6 +1656,186 @@ packages: - supports-color dev: true + /@img/sharp-darwin-arm64@0.33.5: + resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [darwin] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.0.4 + dev: true + optional: true + + /@img/sharp-darwin-x64@0.33.5: + resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [darwin] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.0.4 + dev: true + optional: true + + /@img/sharp-libvips-darwin-arm64@1.0.4: + resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@img/sharp-libvips-darwin-x64@1.0.4: + resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@img/sharp-libvips-linux-arm64@1.0.4: + resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@img/sharp-libvips-linux-arm@1.0.5: + resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@img/sharp-libvips-linux-s390x@1.0.4: + resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@img/sharp-libvips-linux-x64@1.0.4: + resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@img/sharp-libvips-linuxmusl-arm64@1.0.4: + resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@img/sharp-libvips-linuxmusl-x64@1.0.4: + resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@img/sharp-linux-arm64@0.33.5: + resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.0.4 + dev: true + optional: true + + /@img/sharp-linux-arm@0.33.5: + resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm] + os: [linux] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.0.5 + dev: true + optional: true + + /@img/sharp-linux-s390x@0.33.5: + resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [s390x] + os: [linux] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.0.4 + dev: true + optional: true + + /@img/sharp-linux-x64@0.33.5: + resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.0.4 + dev: true + optional: true + + /@img/sharp-linuxmusl-arm64@0.33.5: + resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + dev: true + optional: true + + /@img/sharp-linuxmusl-x64@0.33.5: + resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + requiresBuild: true + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + dev: true + optional: true + + /@img/sharp-wasm32@0.33.5: + resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [wasm32] + requiresBuild: true + dependencies: + '@emnapi/runtime': 1.3.1 + dev: true + optional: true + + /@img/sharp-win32-ia32@0.33.5: + resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@img/sharp-win32-x64@0.33.5: + resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@ioredis/commands@1.2.0: resolution: {integrity: sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==} dev: true @@ -1707,6 +1896,13 @@ packages: '@jridgewell/sourcemap-codec': 1.5.0 dev: true + /@jridgewell/trace-mapping@0.3.9: + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + dev: true + /@jsdevtools/ono@7.1.3: resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} dev: true @@ -2999,12 +3195,6 @@ packages: resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==} dev: true - /@types/node-forge@1.3.11: - resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} - dependencies: - '@types/node': 18.19.76 - dev: true - /@types/node@18.19.76: resolution: {integrity: sha512-yvR7Q9LdPz2vGpmpJX5LolrgRdWvB67MJKDPSgIIzpFbaf9a1j/f5DnLp5VDyHGMR0QZHlTr1afsD87QCXFHKw==} dependencies: @@ -3483,11 +3673,9 @@ packages: acorn: 8.14.0 dev: true - /acorn-walk@8.3.4: - resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} + /acorn-walk@8.3.2: + resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} - dependencies: - acorn: 8.14.0 dev: true /acorn@8.14.0: @@ -3826,15 +4014,6 @@ packages: resolution: {integrity: sha512-faRs/AW3jA9nTwmJBSO1PQ6L/EOgsB5HMQQq4iCu5zhPgVVgO/pZRHlmatwijZKetFw8/Pr4q6dEN8sJuq8qTw==} dev: true - /capnp-ts@0.7.0: - resolution: {integrity: sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==} - dependencies: - debug: 4.4.0(supports-color@9.4.0) - tslib: 2.8.1 - transitivePeerDependencies: - - supports-color - dev: true - /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -3941,6 +4120,25 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true + /color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + requiresBuild: true + dependencies: + color-name: 1.1.4 + simple-swizzle: 0.2.2 + dev: true + optional: true + + /color@4.2.3: + resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} + engines: {node: '>=12.5.0'} + requiresBuild: true + dependencies: + color-convert: 2.0.1 + color-string: 1.9.1 + dev: true + optional: true + /colord@2.9.3: resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} dev: true @@ -4008,8 +4206,8 @@ packages: resolution: {integrity: sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==} dev: true - /cookie@0.7.2: - resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + /cookie@0.5.0: + resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} engines: {node: '>= 0.6'} dev: true @@ -5514,6 +5712,12 @@ packages: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true + /is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + requiresBuild: true + dev: true + optional: true + /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -6020,26 +6224,24 @@ packages: engines: {node: '>=4'} dev: true - /miniflare@3.20231030.3: - resolution: {integrity: sha512-lquHSh0XiO8uoWDujOLHtDS9mkUTJTc5C5amiQ6A++5y0f+DWiMqbDBvvwjlYf4Dvqk6ChFya9dztk7fg2ZVxA==} + /miniflare@3.20250214.1: + resolution: {integrity: sha512-NE66QV+2n9ZndaP5jgPlcVref3Arvizb+l2QqhgeXtKM5Orhi8UU2mijoiN3mHEUexKaBES2S1VubT4LDPqkxQ==} engines: {node: '>=16.13'} hasBin: true dependencies: + '@cspotcode/source-map-support': 0.8.1 acorn: 8.14.0 - acorn-walk: 8.3.4 - capnp-ts: 0.7.0 + acorn-walk: 8.3.2 exit-hook: 2.2.1 glob-to-regexp: 0.4.1 - source-map-support: 0.5.21 stoppable: 1.1.0 undici: 5.28.5 - workerd: 1.20231030.0 - ws: 8.18.1 - youch: 3.3.4 - zod: 3.24.2 + workerd: 1.20250214.0 + ws: 8.18.0 + youch: 3.2.3 + zod: 3.22.3 transitivePeerDependencies: - bufferutil - - supports-color - utf-8-validate dev: true @@ -7532,11 +7734,6 @@ packages: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} dev: true - /resolve.exports@2.0.3: - resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} - engines: {node: '>=10'} - dev: true - /resolve@1.22.10: resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} engines: {node: '>= 0.4'} @@ -7693,14 +7890,6 @@ packages: resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==} dev: true - /selfsigned@2.4.1: - resolution: {integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==} - engines: {node: '>=10'} - dependencies: - '@types/node-forge': 1.3.11 - node-forge: 1.3.1 - dev: true - /semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true @@ -7766,6 +7955,37 @@ packages: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} dev: true + /sharp@0.33.5: + resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + requiresBuild: true + dependencies: + color: 4.2.3 + detect-libc: 2.0.3 + semver: 7.7.1 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.33.5 + '@img/sharp-darwin-x64': 0.33.5 + '@img/sharp-libvips-darwin-arm64': 1.0.4 + '@img/sharp-libvips-darwin-x64': 1.0.4 + '@img/sharp-libvips-linux-arm': 1.0.5 + '@img/sharp-libvips-linux-arm64': 1.0.4 + '@img/sharp-libvips-linux-s390x': 1.0.4 + '@img/sharp-libvips-linux-x64': 1.0.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + '@img/sharp-linux-arm': 0.33.5 + '@img/sharp-linux-arm64': 0.33.5 + '@img/sharp-linux-s390x': 0.33.5 + '@img/sharp-linux-x64': 0.33.5 + '@img/sharp-linuxmusl-arm64': 0.33.5 + '@img/sharp-linuxmusl-x64': 0.33.5 + '@img/sharp-wasm32': 0.33.5 + '@img/sharp-win32-ia32': 0.33.5 + '@img/sharp-win32-x64': 0.33.5 + dev: true + optional: true + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -7802,6 +8022,14 @@ packages: - supports-color dev: true + /simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + requiresBuild: true + dependencies: + is-arrayish: 0.3.2 + dev: true + optional: true + /sirv@2.0.4: resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} engines: {node: '>= 10'} @@ -8296,6 +8524,16 @@ packages: pathe: 1.1.2 dev: true + /unenv@2.0.0-rc.1: + resolution: {integrity: sha512-PU5fb40H8X149s117aB4ytbORcCvlASdtF97tfls4BPIyj4PeVxvpSuy1jAptqYHqB0vb2w2sHvzM0XWcp2OKg==} + dependencies: + defu: 6.1.4 + mlly: 1.7.4 + ohash: 1.1.4 + pathe: 1.1.2 + ufo: 1.5.4 + dev: true + /unhead@1.11.20: resolution: {integrity: sha512-3AsNQC0pjwlLqEYHLjtichGWankK8yqmocReITecmpB1H0aOabeESueyy+8X1gyJx4ftZVwo9hqQ4O3fPWffCA==} dependencies: @@ -8940,43 +9178,44 @@ packages: engines: {node: '>=0.10.0'} dev: true - /workerd@1.20231030.0: - resolution: {integrity: sha512-+FSW+d31f8RrjHanFf/R9A+Z0csf3OtsvzdPmAKuwuZm/5HrBv83cvG9fFeTxl7/nI6irUUXIRF9xcj/NomQzQ==} + /workerd@1.20250214.0: + resolution: {integrity: sha512-QWcqXZLiMpV12wiaVnb3nLmfs/g4ZsFQq2mX85z546r3AX4CTIkXl0VP50W3CwqLADej3PGYiRDOTelDOwVG1g==} engines: {node: '>=16'} hasBin: true requiresBuild: true optionalDependencies: - '@cloudflare/workerd-darwin-64': 1.20231030.0 - '@cloudflare/workerd-darwin-arm64': 1.20231030.0 - '@cloudflare/workerd-linux-64': 1.20231030.0 - '@cloudflare/workerd-linux-arm64': 1.20231030.0 - '@cloudflare/workerd-windows-64': 1.20231030.0 + '@cloudflare/workerd-darwin-64': 1.20250214.0 + '@cloudflare/workerd-darwin-arm64': 1.20250214.0 + '@cloudflare/workerd-linux-64': 1.20250214.0 + '@cloudflare/workerd-linux-arm64': 1.20250214.0 + '@cloudflare/workerd-windows-64': 1.20250214.0 dev: true - /wrangler@3.19.0: - resolution: {integrity: sha512-pY7xWqkQn6DJ+1vz9YHz2pCftEmK+JCTj9sqnucp0NZnlUiILDmBWegsjjCLZycgfiA62J213N7NvjLPr2LB8w==} + /wrangler@3.111.0(@cloudflare/workers-types@4.20250224.0): + resolution: {integrity: sha512-3j/Wq5aj/sCQRSmkjBLxbkIH7LCx0h2UnaxmhOplDjJmZty10lGRs/jGgaG/M/GEsDg5TJ7UHvBh3hSldgjfKg==} engines: {node: '>=16.17.0'} hasBin: true + peerDependencies: + '@cloudflare/workers-types': ^4.20250214.0 + peerDependenciesMeta: + '@cloudflare/workers-types': + optional: true dependencies: - '@cloudflare/kv-asset-handler': 0.2.0 + '@cloudflare/kv-asset-handler': 0.3.4 + '@cloudflare/workers-types': 4.20250224.0 '@esbuild-plugins/node-globals-polyfill': 0.2.3(esbuild@0.17.19) '@esbuild-plugins/node-modules-polyfill': 0.2.2(esbuild@0.17.19) blake3-wasm: 2.1.5 - chokidar: 3.6.0 esbuild: 0.17.19 - miniflare: 3.20231030.3 - nanoid: 3.3.8 + miniflare: 3.20250214.1 path-to-regexp: 6.3.0 - resolve.exports: 2.0.3 - selfsigned: 2.4.1 - source-map: 0.6.1 - source-map-support: 0.5.21 - xxhash-wasm: 1.1.0 + unenv: 2.0.0-rc.1 + workerd: 1.20250214.0 optionalDependencies: fsevents: 2.3.3 + sharp: 0.33.5 transitivePeerDependencies: - bufferutil - - supports-color - utf-8-validate dev: true @@ -9002,6 +9241,19 @@ packages: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true + /ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + /ws@8.18.1: resolution: {integrity: sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==} engines: {node: '>=10.0.0'} @@ -9020,10 +9272,6 @@ packages: engines: {node: '>=12'} dev: true - /xxhash-wasm@1.1.0: - resolution: {integrity: sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA==} - dev: true - /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -9080,10 +9328,10 @@ packages: engines: {node: '>=12.20'} dev: true - /youch@3.3.4: - resolution: {integrity: sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==} + /youch@3.2.3: + resolution: {integrity: sha512-ZBcWz/uzZaQVdCvfV4uk616Bbpf2ee+F/AvuKDR5EwX/Y4v06xWdtMluqTD7+KlZdM93lLm9gMZYo0sKBS0pgw==} dependencies: - cookie: 0.7.2 + cookie: 0.5.0 mustache: 4.2.0 stacktracey: 2.1.8 dev: true @@ -9109,6 +9357,6 @@ packages: readable-stream: 4.7.0 dev: true - /zod@3.24.2: - resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==} + /zod@3.22.3: + resolution: {integrity: sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug==} dev: true diff --git a/website/server/api/featured-recipes.ts b/website/server/api/featured-recipes.ts index b931004..6b96967 100644 --- a/website/server/api/featured-recipes.ts +++ b/website/server/api/featured-recipes.ts @@ -17,8 +17,11 @@ export default defineEventHandler(async () => { // Track the recipes that have already been picked so far so that duplicates are not displayed const alreadyShownRecipes = new Set(); + const now = new Date(); + const latestRecipes = recipes - .sort((a, b) => new Date(b.date_created).getTime() - new Date(a.date_created).getTime()) + // A missing date_published value means the recipe is brand new and the publish date has not been set in the record yet, so use the current time. + .sort((a, b) => (b.date_published ?? now).getTime() - (a.date_published ?? now).getTime()) .slice(0, 3); latestRecipes.forEach((r) => alreadyShownRecipes.add(r.slug)); diff --git a/website/types/recipe.ts b/website/types/recipe.ts index 211e1cd..2782a6a 100644 --- a/website/types/recipe.ts +++ b/website/types/recipe.ts @@ -33,7 +33,7 @@ export type RecipePreview = { customDuration?: number; totalDuration?: string; slug: string; - date_created: string; + date_published?: Date; favourite?: boolean; };