@cfxlabsinc/b2b-services
    Preparing search index...

    Interact with entities, in contexts, where no distinction between identity vs organization is required.

    Most services in each product domain should be using this.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Parameters

      • __namedParameters: { customerId: string; id: string }

      Returns Promise<{ ok: true; value: (Entity & { customerId: string; }) | null }>

    • Parameters

      • args: {
            createdAt?: DbTimestampCriteria;
            customerId: string;
            ids?: string[];
            orderBy?: DbOrderByCriterion<
                | Omit<
                    PgTableWithColumns<
                        {
                            columns: {
                                countryOfResidence: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                createdAt: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                customerId: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                data: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    { $type: ... },
                                >;
                                deletedAt: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                email: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                externalId: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                id: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                name: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    { $type: ... },
                                >;
                                phone: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                referenceId: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                status: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    { $type: ... },
                                >;
                                updatedAt: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                uuid: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                verification: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    { $type: ... },
                                >;
                            };
                            dialect: "pg";
                            name: "identity";
                            schema: "b2b";
                        },
                    >,
                    "enableRLS",
                >
                | Omit<
                    PgTableWithColumns<
                        {
                            columns: {
                                countryOfIncorporation: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                createdAt: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                customerId: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                data: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    { $type: ... },
                                >;
                                description: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                entityType: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                externalId: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                id: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                name: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                referenceId: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                status: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    { $type: ... },
                                >;
                                taxId: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                updatedAt: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                                uuid: PgColumn<
                                    {
                                        baseColumn: ...;
                                        columnType: ...;
                                        data: ...;
                                        dataType: ...;
                                        driverParam: ...;
                                        enumValues: ...;
                                        generated: ...;
                                        hasDefault: ...;
                                        hasRuntimeDefault: ...;
                                        identity: ...;
                                        isAutoincrement: ...;
                                        isPrimaryKey: ...;
                                        name: ...;
                                        notNull: ...;
                                        tableName: ...;
                                    },
                                    {},
                                    {},
                                >;
                            };
                            dialect: "pg";
                            name: "organization";
                            schema: "b2b";
                        },
                    >,
                    "enableRLS",
                >,
                "createdAt"
                | "updatedAt",
            >[];
            page?: number;
            pageSize?: number;
            updatedAt?: DbTimestampCriteria;
        }
        • OptionalcreatedAt?: DbTimestampCriteria
        • customerId: string
        • Optionalids?: string[]

          Fetch multiple ids

        • OptionalorderBy?: DbOrderByCriterion<
              | Omit<
                  PgTableWithColumns<
                      {
                          columns: {
                              countryOfResidence: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              createdAt: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              customerId: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              data: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  { $type: ... },
                              >;
                              deletedAt: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              email: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              externalId: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              id: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              name: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  { $type: ... },
                              >;
                              phone: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              referenceId: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              status: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  { $type: ... },
                              >;
                              updatedAt: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              uuid: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              verification: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  { $type: ... },
                              >;
                          };
                          dialect: "pg";
                          name: "identity";
                          schema: "b2b";
                      },
                  >,
                  "enableRLS",
              >
              | Omit<
                  PgTableWithColumns<
                      {
                          columns: {
                              countryOfIncorporation: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              createdAt: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              customerId: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              data: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  { $type: ... },
                              >;
                              description: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              entityType: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              externalId: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              id: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              name: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              referenceId: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              status: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  { $type: ... },
                              >;
                              taxId: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              updatedAt: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                              uuid: PgColumn<
                                  {
                                      baseColumn: ...;
                                      columnType: ...;
                                      data: ...;
                                      dataType: ...;
                                      driverParam: ...;
                                      enumValues: ...;
                                      generated: ...;
                                      hasDefault: ...;
                                      hasRuntimeDefault: ...;
                                      identity: ...;
                                      isAutoincrement: ...;
                                      isPrimaryKey: ...;
                                      name: ...;
                                      notNull: ...;
                                      tableName: ...;
                                  },
                                  {},
                                  {},
                              >;
                          };
                          dialect: "pg";
                          name: "organization";
                          schema: "b2b";
                      },
                  >,
                  "enableRLS",
              >,
              "createdAt"
              | "updatedAt",
          >[]
        • Optionalpage?: number

          Defaults to 1

        • OptionalpageSize?: number

          Defaults to 50

        • OptionalupdatedAt?: DbTimestampCriteria

      Returns Promise<
          {
              ok: true;
              value: {
                  hasNext: boolean;
                  items: (
                      | { type: "IDENTITY" } & {
                          amlVerification?: {
                              id: string;
                              status: "PENDING" | "REVIEW" | "APPROVED" | "DECLINED";
                          };
                          capabilities: (
                              | "TRANSACT"
                              | "MANAGE_PAYMENT_INSTRUMENT"
                              | "MANAGE_LEDGER_ACCOUNT"
                              | "MANAGE_DEPOSIT_MEMO"
                          )[];
                          countryOfResidence: string;
                          createdAt: Date;
                          customerVerification?: { id: string };
                          dateOfBirth?: string;
                          deletedAt?: Date;
                          email: string;
                          id: string;
                          identityDocumentVerification?: {
                              id: string;
                              status: "PENDING" | "REVIEW" | "APPROVED" | "DECLINED";
                          };
                          name?: { firstName: string; lastName: string; middleName?: string };
                          phone: string;
                          referenceId?: string;
                          status:
                              | "ACTIVE"
                              | "DISABLED"
                              | "PENDING_VERIFICATION"
                              | "REVIEW"
                              | "BLOCKED"
                              | "DELETED";
                          updatedAt: Date;
                          uuid: string;
                          verificationProfileId?: string;
                      }
                      | { type: "ORGANIZATION" } & {
                          address?: {
                              city: string;
                              countryCode: string;
                              line1: string;
                              line2?: string;
                              postalCode: string;
                              regionCode?: string;
                          };
                          capabilities: (
                              | "TRANSACT"
                              | "MANAGE_PAYMENT_INSTRUMENT"
                              | "MANAGE_LEDGER_ACCOUNT"
                              | "MANAGE_DEPOSIT_MEMO"
                          )[];
                          countryOfIncorporation: string;
                          createdAt: Date;
                          description?: string;
                          email?: string;
                          id: string;
                          legalEntityType: string;
                          name: string;
                          phone?: E164Phone;
                          referenceId?: string;
                          status: "ACTIVE"
                          | "DISABLED"
                          | "PENDING_VERIFICATION";
                          taxId: string;
                          updatedAt: Date;
                          uuid: string;
                          verificationData?: {
                              status: "PENDING" | "REVIEW" | "APPROVED" | "DECLINED";
                              verificationSessionId: string;
                              verificationTemplateId: string;
                          };
                          verificationProfileId?: string;
                          websiteUrl?: string;
                      }
                  )[];
              };
          },
      >