@karmaniverous/entity-manager-demo
    Preparing search index...

    Function searchUsers

    • Search for User records in the database.

      Parameters

      Returns Promise<
          QueryResult<
              CapturedConfigMapFrom<
                  {
                      entities: {
                          email: {
                              shardBumps: { charBits: number; chars: number; timestamp: number }[];
                              timestampProperty: string;
                              uniqueProperty: string;
                          };
                          user: {
                              shardBumps: { charBits: number; chars: number; timestamp: number }[];
                              timestampProperty: string;
                              uniqueProperty: string;
                          };
                      };
                      entitiesSchema: {
                          email: ZodObject<
                              { created: ZodNumber; email: ZodString; userId: ZodString },
                              $strip,
                          >;
                          user: ZodObject<
                              {
                                  beneficiaryId: ZodOptional<ZodNullable<ZodString>>;
                                  created: ZodNumber;
                                  firstName: ZodOptional<ZodNullable<ZodString>>;
                                  firstNameCanonical: ZodOptional<ZodNullable<ZodString>>;
                                  lastName: ZodOptional<ZodNullable<ZodString>>;
                                  lastNameCanonical: ZodOptional<ZodNullable<ZodString>>;
                                  phone: ZodOptional<ZodNullable<ZodString>>;
                                  updated: ZodNumber;
                                  userId: ZodString;
                              },
                              $strip,
                          >;
                      };
                      generatedProperties: {
                          sharded: {
                              beneficiaryHashKey: readonly ["beneficiaryId"];
                              userHashKey: readonly ["userId"];
                          };
                          unsharded: {
                              firstNameRangeKey: readonly [
                                  "firstNameCanonical",
                                  "lastNameCanonical",
                                  "created",
                              ];
                              lastNameRangeKey: readonly [
                                  "lastNameCanonical",
                                  "firstNameCanonical",
                                  "created",
                              ];
                          };
                      };
                      hashKey: "hashKey";
                      indexes: {
                          created: {
                              hashKey: "hashKey";
                              projections: [];
                              rangeKey: "created";
                          };
                          firstName: {
                              hashKey: "hashKey";
                              projections: [];
                              rangeKey: "firstNameRangeKey";
                          };
                          lastName: {
                              hashKey: "hashKey";
                              projections: [];
                              rangeKey: "lastNameRangeKey";
                          };
                          phone: { hashKey: "hashKey"; projections: []; rangeKey: "phone" };
                          updated: { hashKey: "hashKey"; projections: []; rangeKey: "updated" };
                          userBeneficiaryCreated: {
                              hashKey: "beneficiaryHashKey";
                              projections: [];
                              rangeKey: "created";
                          };
                          userBeneficiaryFirstName: {
                              hashKey: "beneficiaryHashKey";
                              projections: [];
                              rangeKey: "firstNameRangeKey";
                          };
                          userBeneficiaryLastName: {
                              hashKey: "beneficiaryHashKey";
                              projections: [];
                              rangeKey: "lastNameRangeKey";
                          };
                          userBeneficiaryPhone: {
                              hashKey: "beneficiaryHashKey";
                              projections: [];
                              rangeKey: "phone";
                          };
                          userBeneficiaryUpdated: {
                              hashKey: "beneficiaryHashKey";
                              projections: [];
                              rangeKey: "updated";
                          };
                          userCreated: {
                              hashKey: "userHashKey";
                              projections: [];
                              rangeKey: "created";
                          };
                      };
                      propertyTranscodes: {
                          beneficiaryId: string;
                          created: string;
                          email: string;
                          firstNameCanonical: string;
                          lastNameCanonical: string;
                          phone: string;
                          updated: string;
                          userId: string;
                      };
                      rangeKey: "rangeKey";
                      transcodes: Transcodes<DefaultTranscodeRegistry>;
                  },
                  {
                      email: { created: number; email: string; userId: string };
                      user: {
                          beneficiaryId?: string | null;
                          created: number;
                          firstName?: string | null;
                          firstNameCanonical?: string | null;
                          lastName?: string | null;
                          lastNameCanonical?: string | null;
                          phone?: string | null;
                          updated: number;
                          userId: string;
                      };
                  } & EntityMap,
              >,
              "user",
              | "created"
              | "firstName"
              | "lastName"
              | "phone"
              | "updated"
              | "userBeneficiaryCreated"
              | "userBeneficiaryFirstName"
              | "userBeneficiaryLastName"
              | "userBeneficiaryPhone"
              | "userBeneficiaryUpdated"
              | "userCreated",
              unknown,
          >,
      >