kustomer-client
    Preparing search index...

    Function getAllDraftsByCustomer

    • Get all drafts for customer Retrieves all outbound drafts to a customer based on the unique customer ID.

      Any one of the following roles is required for this endpoint:

      Legacy Role Equivalent Permission Set Role
      org.user.draft.read org.permission.draft.read

      Type Parameters

      • ThrowOnError extends boolean = true

      Returns RequestResult<
          {
              data: {
                  attributes: {
                      body: string;
                      channel: string;
                      createdAt: string;
                      modifiedAt: string;
                      payload?: {
                          draftJs: {
                              blocks: {
                                  data: { [key: ...]: ... };
                                  depth: number;
                                  entityRanges: (...)[];
                                  inlineStyleRanges: (...)[];
                                  key: string;
                                  text: string;
                                  type: string;
                              }[];
                              entityMap: { [key: string]: unknown };
                          };
                      };
                      status: string;
                      updatedAt: string;
                  };
                  id: string;
                  relationships: {
                      conversation?: {
                          data: { id: string; type: string };
                          links: { self: string };
                      };
                      createdBy: {
                          data: { id: string; type: string };
                          links: { self: string };
                      };
                      customer: {
                          data: { id: string; type: string };
                          links: { self: string };
                      };
                      modifiedBy: {
                          data: { id: string; type: string };
                          links: { self: string };
                      };
                      org: { data: { id: string; type: string }; links: { self: string } };
                  };
                  type: string;
              }[];
              included: unknown[];
              links: {
                  first: string;
                  next: null
                  | string;
                  prev: null | string;
                  self: string;
              };
              meta: { page: number; pageSize: number };
          },
          unknown,
          ThrowOnError,
      >