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

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Methods

    • Parameters

      • args: {
            id: string;
            tx?: PgAsyncTransaction<
                PostgresJsQueryResultHKT,
                __module,
                EmptyRelations,
                ExtractTablesWithRelations<__module>,
            >;
        }

      Returns Promise<
          {
              ok: true;
              value: | Omit<
                  {
                      createdAt: Date;
                      customerId: number;
                      deletedAt: Date
                      | null;
                      externalId: string;
                      id: number;
                      status: "CREATED" | "SUBMITTED" | "PROCESSING" | "DELETED";
                      type: "SWIFT" | "FEDWIRE";
                      updatedAt: Date;
                      wireFileId: number | null;
                  },
                  "id"
                  | "externalId"
                  | "customerId"
                  | "wireFileId",
              > & {
                  customerId: string;
                  id: string;
                  recordCount: number;
                  totalAmount: BigNumber;
                  wireFileId: string | null;
              } & { customerName: string }
              | null;
          },
      >

    • Parameters

      • __namedParameters: {
            createdAt?: DbTimestampCriteria;
            customerId?: string[];
            id?: string[];
            orderBy?: DbOrderByCriterion<
                Omit<
                    PgTableWithColumns<
                        {
                            columns: {
                                bucket: PgBuildColumn<
                                    "wire_file",
                                    SetNotNull<PgTextBuilder<(...)>>,
                                    {
                                        data: string;
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "wire_file";
                                    },
                                >;
                                createdAt: PgBuildColumn<
                                    "wire_file",
                                    SetHasDefault<SetNotNull<(...)>>,
                                    {
                                        data: Date;
                                        dataType: "object date";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "wire_file";
                                    },
                                >;
                                externalId: PgBuildColumn<
                                    "wire_file",
                                    SetHasRuntimeDefault<SetNotNull<(...)>>,
                                    {
                                        data: string;
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "wire_file";
                                    },
                                >;
                                id: PgBuildColumn<
                                    "wire_file",
                                    HasIdentity<SetIsPrimaryKey<(...)>, "byDefault">,
                                    {
                                        data: number;
                                        dataType: "number int32";
                                        driverParam: (...) | (...);
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: "byDefault";
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "wire_file";
                                    },
                                >;
                                metadata: PgBuildColumn<
                                    "wire_file",
                                    Set$Type<
                                        SetHasDefault<(...)>,
                                        { parts?: ...; wireBatchIds?: ...; withdrawalIds?: ... },
                                    >,
                                    {
                                        data: { parts?: ...; wireBatchIds?: ...; withdrawalIds?: ... };
                                        dataType: "object json";
                                        driverParam: unknown;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "wire_file";
                                    },
                                >;
                                status: PgBuildColumn<
                                    "wire_file",
                                    Set$Type<SetHasDefault<(...)>, (...) | (...) | (...)>,
                                    {
                                        data: (...) | (...) | (...);
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "wire_file";
                                    },
                                >;
                                type: PgBuildColumn<
                                    "wire_file",
                                    Set$Type<SetNotNull<(...)>, (...) | (...)>,
                                    {
                                        data: (...) | (...);
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "wire_file";
                                    },
                                >;
                                updatedAt: PgBuildColumn<
                                    "wire_file",
                                    SetHasDefault<SetHasDefault<(...)>>,
                                    {
                                        data: Date;
                                        dataType: "object date";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "wire_file";
                                    },
                                >;
                            };
                            dialect: "pg";
                            name: "wire_file";
                            schema: "b2b";
                        },
                    >,
                    "enableRLS",
                >,
                "createdAt"
                | "updatedAt",
            >[];
            page?: number;
            pageSize?: number;
            status?: ("CREATED" | "SUBMITTED" | "PROCESSING" | "DELETED")[];
            tx?: PgAsyncTransaction<
                PostgresJsQueryResultHKT,
                __module,
                EmptyRelations,
                ExtractTablesWithRelations<__module>,
            >;
            type?: ("SWIFT" | "FEDWIRE")[];
            updatedAt?: DbTimestampCriteria;
            wireFileId?: string[] | null;
        }
        • OptionalcreatedAt?: DbTimestampCriteria
        • OptionalcustomerId?: string[]
        • Optionalid?: string[]
        • OptionalorderBy?: DbOrderByCriterion<
              Omit<
                  PgTableWithColumns<
                      {
                          columns: {
                              bucket: PgBuildColumn<
                                  "wire_file",
                                  SetNotNull<PgTextBuilder<(...)>>,
                                  {
                                      data: string;
                                      dataType: "string";
                                      driverParam: string;
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: false;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: true;
                                      tableName: "wire_file";
                                  },
                              >;
                              createdAt: PgBuildColumn<
                                  "wire_file",
                                  SetHasDefault<SetNotNull<(...)>>,
                                  {
                                      data: Date;
                                      dataType: "object date";
                                      driverParam: string;
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: true;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: true;
                                      tableName: "wire_file";
                                  },
                              >;
                              externalId: PgBuildColumn<
                                  "wire_file",
                                  SetHasRuntimeDefault<SetNotNull<(...)>>,
                                  {
                                      data: string;
                                      dataType: "string";
                                      driverParam: string;
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: true;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: true;
                                      tableName: "wire_file";
                                  },
                              >;
                              id: PgBuildColumn<
                                  "wire_file",
                                  HasIdentity<SetIsPrimaryKey<(...)>, "byDefault">,
                                  {
                                      data: number;
                                      dataType: "number int32";
                                      driverParam: (...) | (...);
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: true;
                                      hasRuntimeDefault: false;
                                      identity: "byDefault";
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: true;
                                      tableName: "wire_file";
                                  },
                              >;
                              metadata: PgBuildColumn<
                                  "wire_file",
                                  Set$Type<
                                      SetHasDefault<(...)>,
                                      { parts?: ...; wireBatchIds?: ...; withdrawalIds?: ... },
                                  >,
                                  {
                                      data: { parts?: ...; wireBatchIds?: ...; withdrawalIds?: ... };
                                      dataType: "object json";
                                      driverParam: unknown;
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: true;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: true;
                                      tableName: "wire_file";
                                  },
                              >;
                              status: PgBuildColumn<
                                  "wire_file",
                                  Set$Type<SetHasDefault<(...)>, (...) | (...) | (...)>,
                                  {
                                      data: (...) | (...) | (...);
                                      dataType: "string";
                                      driverParam: string;
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: true;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: true;
                                      tableName: "wire_file";
                                  },
                              >;
                              type: PgBuildColumn<
                                  "wire_file",
                                  Set$Type<SetNotNull<(...)>, (...) | (...)>,
                                  {
                                      data: (...) | (...);
                                      dataType: "string";
                                      driverParam: string;
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: false;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: true;
                                      tableName: "wire_file";
                                  },
                              >;
                              updatedAt: PgBuildColumn<
                                  "wire_file",
                                  SetHasDefault<SetHasDefault<(...)>>,
                                  {
                                      data: Date;
                                      dataType: "object date";
                                      driverParam: string;
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: true;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: true;
                                      tableName: "wire_file";
                                  },
                              >;
                          };
                          dialect: "pg";
                          name: "wire_file";
                          schema: "b2b";
                      },
                  >,
                  "enableRLS",
              >,
              "createdAt"
              | "updatedAt",
          >[]
        • Optionalpage?: number

          Defaults to 1

        • OptionalpageSize?: number

          Defaults to 10

        • Optionalstatus?: ("CREATED" | "SUBMITTED" | "PROCESSING" | "DELETED")[]
        • Optionaltx?: PgAsyncTransaction<
              PostgresJsQueryResultHKT,
              __module,
              EmptyRelations,
              ExtractTablesWithRelations<__module>,
          >
        • Optionaltype?: ("SWIFT" | "FEDWIRE")[]
        • OptionalupdatedAt?: DbTimestampCriteria
        • OptionalwireFileId?: string[] | null

      Returns Promise<
          {
              ok: true;
              value: (
                  Omit<
                      {
                          createdAt: Date;
                          customerId: number;
                          deletedAt: Date
                          | null;
                          externalId: string;
                          id: number;
                          status: "CREATED" | "SUBMITTED" | "PROCESSING" | "DELETED";
                          type: "SWIFT" | "FEDWIRE";
                          updatedAt: Date;
                          wireFileId: number | null;
                      },
                      "id"
                      | "externalId"
                      | "customerId"
                      | "wireFileId",
                  > & {
                      customerId: string;
                      id: string;
                      recordCount: number;
                      totalAmount: BigNumber;
                      wireFileId: string | null;
                  } & { customerName: string }
              )[];
          },
      >

    • Parameters

      • args: {
            data: Partial<Pick<WireBatch, "status" | "wireFileId">>;
            id: string[];
            tx?: PgAsyncTransaction<
                PostgresJsQueryResultHKT,
                __module,
                EmptyRelations,
                ExtractTablesWithRelations<__module>,
            >;
        }

      Returns Promise<{ ok: true; value: WireBatch[] }>