Skip to content

Commit

Permalink
Apply latest automatic api client updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Corepex authored and github-actions[bot] committed Dec 13, 2024
1 parent 6dd92a9 commit 9e81b47
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 41 deletions.
70 changes: 35 additions & 35 deletions assets/js/src/core/modules/data-object/data-object-api-slice.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ const injectedRtkApi = api
}),
invalidatesTags: ["Data Objects"],
}),
dataObjectGetSelectOptions: build.mutation<
DataObjectGetSelectOptionsApiResponse,
DataObjectGetSelectOptionsApiArg
>({
query: (queryArg) => ({
url: `/pimcore-studio/api/data-objects/select-options`,
method: "POST",
body: queryArg.body,
}),
invalidatesTags: ["Data Objects"],
}),
dataObjectGetTree: build.query<DataObjectGetTreeApiResponse, DataObjectGetTreeApiArg>({
query: (queryArg) => ({
url: `/pimcore-studio/api/data-objects/tree`,
Expand Down Expand Up @@ -198,6 +209,18 @@ export type DataObjectReplaceContentApiArg = {
/** TargetId of the data-object */
targetId: number;
};
export type DataObjectGetSelectOptionsApiResponse = /** status 200 List of dynamic select options */ {
totalItems: number;
items: SelectOption[];
};
export type DataObjectGetSelectOptionsApiArg = {
body: {
objectId: number;
fieldName: string;
changedData?: object;
context: object;
};
};
export type DataObjectGetTreeApiResponse =
/** status 200 Paginated data objects with total count as header param as JSON */ {
totalItems: number;
Expand All @@ -221,41 +244,7 @@ export type DataObjectGetTreeApiArg = {
/** Include all descendants in the result. */
pathIncludeDescendants?: boolean;
/** Filter by class. */
className?:
| "AccessoryPart"
| "asdf"
| "BodyStyle"
| "Car"
| "Category"
| "ComplexLayout"
| "Customer"
| "CustomerSegment"
| "CustomerSegmentGroup"
| "datatypetest"
| "datetest"
| "Event"
| "fieldtest"
| "FilterDefinition"
| "foo5"
| "LinkActivityDefinition"
| "Manufacturer"
| "mappingTest"
| "News"
| "OfferToolCustomProduct"
| "OfferToolOffer"
| "OfferToolOfferItem"
| "OnlineShopOrder"
| "OnlineShopOrderItem"
| "OnlineShopTaxClass"
| "OnlineShopVoucherSeries"
| "OnlineShopVoucherToken"
| "PortalUser"
| "PortalUserGroup"
| "simple"
| "StudioFieldTypeTest"
| "TermSegmentBuilderDefinition"
| "Test"
| "unittest";
className?: string;
};
export type Error = {
/** Message */
Expand Down Expand Up @@ -503,6 +492,16 @@ export type Layout = {
/** Border */
border: boolean;
};
export type SelectOption = {
/** AdditionalAttributes */
additionalAttributes?: {
[key: string]: string | number | boolean | object | any[];
};
/** Key */
key: string;
/** Value */
value: string;
};
export const {
useDataObjectAddMutation,
useDataObjectCloneMutation,
Expand All @@ -513,5 +512,6 @@ export const {
useDataObjectGetLayoutByIdQuery,
useDataObjectPatchByIdMutation,
useDataObjectReplaceContentMutation,
useDataObjectGetSelectOptionsMutation,
useDataObjectGetTreeQuery,
} = injectedRtkApi;
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ export type DevError = {
export type SubmitAction = {
/** type of the action */
actionType: string;
/** id of the element */
/** Id of the element */
elementId: number;
/** type of the element */
/** Type of the element */
elementType: string;
/** name of the workflow */
workflowName: string;
/** transition */
transition: string;
/** Id of the workflow */
workflowId?: string;
/** Id of the transition */
transitionId?: string;
/** workflowOptions */
workflowOptions: object;
};
Expand Down
26 changes: 26 additions & 0 deletions assets/js/src/core/modules/element/element-api-slice.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ const injectedRtkApi = api
}),
providesTags: ["Elements"],
}),
elementGetSubtype: build.query<ElementGetSubtypeApiResponse, ElementGetSubtypeApiArg>({
query: (queryArg) => ({
url: `/pimcore-studio/api/elements/${queryArg.elementType}/subtype/${queryArg.id}`,
}),
providesTags: ["Elements"],
}),
}),
overrideExisting: false,
});
Expand Down Expand Up @@ -74,6 +80,13 @@ export type ElementGetIdByPathApiArg = {
/** Filter elements by matching element path. */
elementPath: string;
};
export type ElementGetSubtypeApiResponse = /** status 200 Subtype of the element */ Subtype;
export type ElementGetSubtypeApiArg = {
/** Id of the element */
id: number;
/** Filter elements by matching element type. */
elementType: "asset" | "document" | "data-object";
};
export type Error = {
/** Message */
message: string;
Expand All @@ -98,9 +111,22 @@ export type FolderData = {
/** Folder Name */
folderName: string;
};
export type Subtype = {
/** AdditionalAttributes */
additionalAttributes?: {
[key: string]: string | number | boolean | object | any[];
};
/** Element Id */
elementId: number;
/** Element Type */
elementType: string;
/** Element Subtype */
elementSubtype: string;
};
export const {
useElementDeleteMutation,
useElementGetDeleteInfoQuery,
useElementFolderCreateMutation,
useElementGetIdByPathQuery,
useElementGetSubtypeQuery,
} = injectedRtkApi;

0 comments on commit 9e81b47

Please sign in to comment.