Skip to content

Variable: RolePayloadSchema

ts
const RolePayloadSchema: ZodObject<{
  defaultActors: ZodOptional<ZodArray<ZodObject<{
     anID: ZodOptional<ZodBoolean>;
     areference: ZodOptional<ZodBoolean>;
     entityId: ZodOptional<ZodString>;
     entityType: ZodOptional<ZodString>;
     id: ZodOptional<ZodString>;
     type: ZodOptional<ZodCustom<"id" | "ref" | string & object, "id" | "ref" | string & object>>;
  }, $loose>>>;
  description: ZodOptional<ZodString>;
  name: ZodOptional<ZodString>;
  onConflict: ZodOptional<ZodCustom<string & object | "FAIL" | "USE" | "NEW", string & object | "FAIL" | "USE" | "NEW">>;
  pcri: ZodOptional<ZodObject<{
     anID: ZodOptional<ZodBoolean>;
     areference: ZodOptional<ZodBoolean>;
     entityId: ZodOptional<ZodString>;
     entityType: ZodOptional<ZodString>;
     id: ZodOptional<ZodString>;
     type: ZodOptional<ZodCustom<"id" | "ref" | string & object, "id" | "ref" | string & object>>;
  }, $loose>>;
  type: ZodOptional<ZodCustom<
     | string & object
     | "HIDDEN"
     | "VIEWABLE"
     | "AI_AGENT"
     | "EDITABLE"
     | "GUEST", 
     | string & object
     | "HIDDEN"
     | "VIEWABLE"
     | "AI_AGENT"
     | "EDITABLE"
    | "GUEST">>;
}, $loose>;

Defined in: src/cloud/models/rolePayload.ts:9

The payload used to create a project role. It is optional for CMP projects, as a default role actor will be provided. TMP will add new role actors to the table.