Skip to content

TypeScript API / laikacms/json-api / AtomicOperationsRequestSchema

Variable: AtomicOperationsRequestSchema ​

ts
const AtomicOperationsRequestSchema: StandardSchemaV1<{
  atomic:operations: readonly (
     | {
     data: {
        attributes?: {
         [key: string]: any;
        };
        id?: string;
        relationships?: {
         [key: string]: any;
        };
        type: string;
     };
     op: "add";
   }
     | {
     data: {
        attributes?: {
         [key: string]: any;
        };
        id: string;
        relationships?: {
         [key: string]: any;
        };
        type: string;
     };
     op: "update";
   }
     | {
     op: "remove";
     ref: {
        id: string;
        type: string;
     };
  })[];
}, {
  atomic:operations: readonly (
     | {
     data: {
        attributes?: {
         [key: string]: any;
        };
        id?: string;
        relationships?: {
         [key: string]: any;
        };
        type: string;
     };
     op: "add";
   }
     | {
     data: {
        attributes?: {
         [key: string]: any;
        };
        id: string;
        relationships?: {
         [key: string]: any;
        };
        type: string;
     };
     op: "update";
   }
     | {
     op: "remove";
     ref: {
        id: string;
        type: string;
     };
  })[];
}> & Struct<{
  atomic:operations: $Array<StandardSchemaV1<
     | {
     data: {
        attributes?: {
         [key: ...]: ...;
        };
        id?: string;
        relationships?: {
         [key: ...]: ...;
        };
        type: string;
     };
     op: "add";
   }
     | {
     data: {
        attributes?: {
         [key: ...]: ...;
        };
        id: string;
        relationships?: {
         [key: ...]: ...;
        };
        type: string;
     };
     op: "update";
   }
     | {
     op: "remove";
     ref: {
        id: string;
        type: string;
     };
   }, 
     | {
     data: {
        attributes?: {
         [key: ...]: ...;
        };
        id?: string;
        relationships?: {
         [key: ...]: ...;
        };
        type: string;
     };
     op: "add";
   }
     | {
     data: {
        attributes?: {
         [key: ...]: ...;
        };
        id: string;
        relationships?: {
         [key: ...]: ...;
        };
        type: string;
     };
     op: "update";
   }
     | {
     op: "remove";
     ref: {
        id: string;
        type: string;
     };
   }> & Union<readonly [StandardSchemaV1<{
     data: {
        attributes?: ...;
        id?: ...;
        relationships?: ...;
        type: ...;
     };
     op: "add";
   }, {
     data: {
        attributes?: ...;
        id?: ...;
        relationships?: ...;
        type: ...;
     };
     op: "add";
   }> & Struct<{
     data: Struct<...>;
     op: Literal<...>;
   }>, StandardSchemaV1<{
     data: {
        attributes?: ...;
        id: ...;
        relationships?: ...;
        type: ...;
     };
     op: "update";
   }, {
     data: {
        attributes?: ...;
        id: ...;
        relationships?: ...;
        type: ...;
     };
     op: "update";
   }> & Struct<{
     data: Struct<...>;
     op: Literal<...>;
   }>, StandardSchemaV1<{
     op: "remove";
     ref: {
        id: ...;
        type: ...;
     };
   }, {
     op: "remove";
     ref: {
        id: ...;
        type: ...;
     };
   }> & Struct<{
     op: Literal<...>;
     ref: Struct<...>;
  }>]>>;
}>;

Released under the MIT License.