devowl-wp
    Preparing search index...

    Class AbstractCategory<Collection, Meta, Data, UnionProperties>Abstract

    Type Parameters

    • Collection = object
    • Meta = object
    • Data = object
    • UnionProperties = CategoryProperties & Data & { meta: Meta }

    Hierarchy (View Summary)

    • ClientModel<
          {
              collection: Collection;
              delete: {
                  parameters: { force: true; id?: number };
                  response: UnionProperties | { deleted: true; previous: UnionProperties };
              };
              key: number;
              patch: { parameters: { id?: number } };
              properties: UnionProperties;
          },
      >
      • AbstractCategory
    Index

    Constructors

    Properties

    annotated?: AnnotateDefinition
    busy: boolean = false
    collection: Collection
    data: UnionProperties = {}
    delete: (
        params?: { force: true; id?: number },
        settings?: Pick<
            Parameters<typeof commonRequest>[0],
            "allowBatchRequest" | "settings",
        >,
    ) => CancellablePromise<
        UnionProperties
        | { deleted: true; previous: UnionProperties },
    > = ...

    Type declaration

      • (
            params?: { force: true; id?: number },
            settings?: Pick<
                Parameters<typeof commonRequest>[0],
                "allowBatchRequest" | "settings",
            >,
        ): CancellablePromise<
            UnionProperties
            | { deleted: true; previous: UnionProperties },
        >
      • Parameters

        • Optionalparams: { force: true; id?: number }
        • Optionalsettings: Pick<Parameters<typeof commonRequest>[0], "allowBatchRequest" | "settings">

          When you pass allowBatchRequest, the afterDelete is not called due to performance reasons. Please call afterDelete and this.collection.entries.delete manually!

        Returns CancellablePromise<
            UnionProperties
            | { deleted: true; previous: UnionProperties },
        >

    patch: (params?: { id?: number }) => CancellablePromise<void> = ...
    persist: (
        params?: unknown,
        settings?: Pick<
            Parameters<typeof commonRequest>[0],
            "allowBatchRequest" | "settings",
        >,
    ) => CancellablePromise<void> = ...

    Type declaration

      • (
            params?: unknown,
            settings?: Pick<
                Parameters<typeof commonRequest>[0],
                "allowBatchRequest" | "settings",
            >,
        ): CancellablePromise<void>
      • Parameters

        • Optionalparams: unknown
        • Optionalsettings: Pick<Parameters<typeof commonRequest>[0], "allowBatchRequest" | "settings">

          When you pass allowBatchRequest, the afterPersist is not called due to performance reasons. Please call afterPersist and this.collection.entries.set manually!

        Returns CancellablePromise<void>

    Accessors

    • get key(): T["key"]

      Returns T["key"]

    Methods

    • Returns void

    • Returns void

    • Returns void

    • Create your conditionals here and return only changed values.

      Returns any

    • Transform the class-hold data to POSTable data. This can be useful if e. g. one property differs from the response property schema.

      Returns any

    • Type Parameters

      • T extends new (...args: any[]) => any

      Parameters

      • annotate: AnnotateDefinition

      Returns (
          constructor: T,
      ) => { prototype: __type<any, any>; new (...args: any[]): __type<T, T> } & T