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

    A customer's dashboard activity feed: what its members did, and what was recorded about them.

    Index
    instance: (...args: []) => CustomerDashboardUserActivityService = ...

    The process service, on the shared database.

    • Records every event, and each one's children linked to it, in one INSERT … SELECT on the caller's transaction if given. A child shares its parent's actor, customer, visibility and request metadata. Throws, inserting nothing, for a user or customer with no row, or an admin user who may not enter the workspace (DISABLED, no user-shadow:r).

      Parameters

      • __namedParameters: {
            events: (
                CustomerActivityEvent & {
                    children?: CustomerDashboardUserActivityChild[];
                }
            )[];
            tx?: PgAsyncTransaction<NodePgQueryResultHKT, EmptyRelations>;
        }

      Returns Promise<{ ok: true; value: void }>

    • An INTERNAL row, keyed on the user, in every workspace the login's user is an ACTIVE member of. Before sign-in there is no session or workspace to name, so a login with no dashboard user or membership records nothing.

      Parameters

      • __namedParameters: SecondFactorRejection & {
            geoLocation?: {
                city?: string;
                country?: string;
                countryRegion?: string;
                flag?: string;
                latitude?: string;
                longitude?: string;
                postalCode?: string;
                region?: string;
            };
            ipAddress?: string;
            userAgent?: {
                browser: { name?: string; version?: string };
                cpu: { architecture?: string };
                device: { model?: string; type?: string; vendor?: string };
                engine: { name?: string; version?: string };
                isBot: boolean;
                os: { name?: string; version?: string };
                ua: string;
            };
        }
        • OptionalgeoLocation?: {
              city?: string;
              country?: string;
              countryRegion?: string;
              flag?: string;
              latitude?: string;
              longitude?: string;
              postalCode?: string;
              region?: string;
          }

          Geolocation information from the request

          • Optionalcity?: string

            The city that the request originated from.

          • Optionalcountry?: string

            The country that the request originated from (ISO 3166-1 alpha-2).

          • OptionalcountryRegion?: string

            The ISO 3166-2 region code of the client (CloudFront-Viewer-Country-Region).

          • Optionalflag?: string

            The flag emoji for the country — derived from country at render time.

          • Optionallatitude?: string

            The latitude of the client.

          • Optionallongitude?: string

            The longitude of the client.

          • OptionalpostalCode?: string

            The postal code of the client

          • Optionalregion?: string

            Legacy Vercel edge region; unpopulated under CloudFront.

        • OptionalipAddress?: string

          IP address of the request

        • OptionaluserAgent?: {
              browser: { name?: string; version?: string };
              cpu: { architecture?: string };
              device: { model?: string; type?: string; vendor?: string };
              engine: { name?: string; version?: string };
              isBot: boolean;
              os: { name?: string; version?: string };
              ua: string;
          }

          User agent information from the request

      Returns Promise<{ ok: true; value: void }>

    • Parameters

      • __namedParameters: {
            adminUserIds?: string[];
            createdAt?: DbTimestampCriteria;
            customerId: string;
            objectIds?: string[];
            orderBy?: DbOrderByCriterion<
                Omit<
                    PgTableWithColumns<
                        {
                            columns: {
                                adminUserExternalId: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    PgTextBuilder<[(...), ...(...)[]]>,
                                    {
                                        data: string;
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "customer_dashboard_user_activity";
                                    },
                                >;
                                adminUserId: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    PgIntegerBuilder,
                                    {
                                        data: number;
                                        dataType: "number int32";
                                        driverParam: (...)
                                        | (...);
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "customer_dashboard_user_activity";
                                    },
                                >;
                                createdAt: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    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: "customer_dashboard_user_activity";
                                    },
                                >;
                                data: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    SetNotNull<PgJsonbBuilder>,
                                    {
                                        data: unknown;
                                        dataType: "object json";
                                        driverParam: unknown;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "customer_dashboard_user_activity";
                                    },
                                >;
                                id: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    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: "customer_dashboard_user_activity";
                                    },
                                >;
                                metadata: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    Set$Type<
                                        SetNotNull<(...)>,
                                        { geoLocation?: ...; ipAddress?: ...; userAgent?: ... },
                                    >,
                                    {
                                        data: { geoLocation?: ...; ipAddress?: ...; userAgent?: ... };
                                        dataType: "object json";
                                        driverParam: unknown;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "customer_dashboard_user_activity";
                                    },
                                >;
                                objectId: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    PgTextBuilder<[(...), ...(...)[]]>,
                                    {
                                        data: string;
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "customer_dashboard_user_activity";
                                    },
                                >;
                                parentId: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    PgIntegerBuilder,
                                    {
                                        data: number;
                                        dataType: "number int32";
                                        driverParam: (...)
                                        | (...);
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "customer_dashboard_user_activity";
                                    },
                                >;
                                type: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    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: "customer_dashboard_user_activity";
                                    },
                                >;
                                userExternalId: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    PgTextBuilder<[(...), ...(...)[]]>,
                                    {
                                        data: string;
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "customer_dashboard_user_activity";
                                    },
                                >;
                                userId: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    PgIntegerBuilder,
                                    {
                                        data: number;
                                        dataType: "number int32";
                                        driverParam: (...)
                                        | (...);
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "customer_dashboard_user_activity";
                                    },
                                >;
                                visibility: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    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: "customer_dashboard_user_activity";
                                    },
                                >;
                                workspaceExternalId: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    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: "customer_dashboard_user_activity";
                                    },
                                >;
                                workspaceId: PgBuildColumn<
                                    "customer_dashboard_user_activity",
                                    SetNotNull<PgIntegerBuilder>,
                                    {
                                        data: number;
                                        dataType: "number int32";
                                        driverParam: (...) | (...);
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "customer_dashboard_user_activity";
                                    },
                                >;
                            };
                            dialect: "pg";
                            isAlias: false;
                            name: "customer_dashboard_user_activity";
                            schema: "b2b";
                        },
                    >,
                    "enableRLS",
                >,
                "createdAt",
            >[];
            page?: number;
            pageSize?: number;
            parentIds?: number[];
            topLevelOnly?: boolean;
            types?: (
                | "account.created"
                | "account.updated"
                | "apiKey.created"
                | "apiKey.deleted"
                | "card.physical.activated"
                | "card.physical.blocked"
                | "card.physical.created"
                | "card.physical.frozen"
                | "card.physical.unfrozen"
                | "card.physical.revealedSensitiveInfo"
                | "card.virtual.blocked"
                | "card.virtual.created"
                | "card.virtual.frozen"
                | "card.virtual.unfrozen"
                | "card.virtual.revealedSensitiveInfo"
                | "customer.emailNotificationPreferences.updated"
                | "customer.internalEmailSubscription.updated"
                | "customer.logo.updated"
                | "customer.slackNotificationPreferences.updated"
                | "customer.smsNotificationPreferences.updated"
                | "customer.terms.accept"
                | "customer.workspaceName.updated"
                | "deposit.memo.created"
                | "identity.created"
                | "identity.updated"
                | "integration.slack.created"
                | "integration.slack.channelAdded"
                | "integration.slack.channelRemoved"
                | "integration.slack.deleted"
                | "organization.created"
                | "organization.updated"
                | "relatedPerson.created"
                | "relatedPerson.updated"
                | "relatedPerson.deleted"
                | "relatedPersonDocument.uploaded"
                | "relatedPersonDocument.deleted"
                | "deposit.achDebit.accepted"
                | "linkedAccount.connected"
                | "linkedAccount.removed"
                | "origin.added"
                | "origin.updated"
                | "origin.removed"
                | "payment.usInstant.created"
                | "payment.ach.created"
                | "payment.swiftWire.created"
                | "payment.usWire.created"
                | "recipient.ach.created"
                | "payment.externalWallet.created"
                | "recipient.ach.updated"
                | "recipient.networkWallet.created"
                | "recipient.networkWallet.updated"
                | "recipient.externalWallet.created"
                | "recipient.externalWallet.updated"
                | "recipient.swiftWire.created"
                | "recipient.swiftWire.updated"
                | "recipient.usWire.created"
                | "recipient.usWire.updated"
                | "recipient.usInstant.created"
                | "recipient.usInstant.updated"
                | "transaction.metadata.created"
                | "transaction.metadataFile.created"
                | "transaction.metadataFile.deleted"
                | "transactionApproval.requested"
                | "transactionApproval.approved"
                | "transactionApproval.declined"
                | "transactionApproval.cancelled"
                | "transactionApproval.executed"
                | "transactionApproval.failed"
                | "transactionApprovalRule.upserted"
                | "transactionApprovalRule.disabled"
                | "transfer.created"
                | "networkTransfer.created"
                | "user.addedToWorkspace"
                | "user.created"
                | "user.deleted"
                | "user.disabled"
                | "user.enabled"
                | "user.invited"
                | "user.inviteRevoked"
                | "user.locked"
                | "user.loggedIn"
                | "user.loggedOut"
                | "user.removedFromWorkspace"
                | "user.updated"
                | "user.workspaceRoleChanged"
                | "user.workspaceStatusChanged"
                | "user.emailPreferences.updated"
                | "user.passwordChanged"
                | "user.mfaReplaced"
                | "user.passkeyAdded"
                | "user.passkeyRemoved"
                | "user.signedOutEverywhere"
                | "virtualAccount.created"
                | SecondFactorRejectionType
            )[];
            userIds?: string[];
            visibilities?: ("ALL" | "INTERNAL")[];
        }
        • OptionaladminUserIds?: string[]

          CFX staff actors; their rows are INTERNAL, so pass visibilities too.

        • OptionalcreatedAt?: DbTimestampCriteria
        • customerId: string
        • OptionalobjectIds?: string[]

          Return only activities that where user acted upon these given IDs

        • OptionalorderBy?: DbOrderByCriterion<
              Omit<
                  PgTableWithColumns<
                      {
                          columns: {
                              adminUserExternalId: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  PgTextBuilder<[(...), ...(...)[]]>,
                                  {
                                      data: string;
                                      dataType: "string";
                                      driverParam: string;
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: false;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: false;
                                      tableName: "customer_dashboard_user_activity";
                                  },
                              >;
                              adminUserId: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  PgIntegerBuilder,
                                  {
                                      data: number;
                                      dataType: "number int32";
                                      driverParam: (...)
                                      | (...);
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: false;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: false;
                                      tableName: "customer_dashboard_user_activity";
                                  },
                              >;
                              createdAt: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  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: "customer_dashboard_user_activity";
                                  },
                              >;
                              data: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  SetNotNull<PgJsonbBuilder>,
                                  {
                                      data: unknown;
                                      dataType: "object json";
                                      driverParam: unknown;
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: false;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: true;
                                      tableName: "customer_dashboard_user_activity";
                                  },
                              >;
                              id: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  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: "customer_dashboard_user_activity";
                                  },
                              >;
                              metadata: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  Set$Type<
                                      SetNotNull<(...)>,
                                      { geoLocation?: ...; ipAddress?: ...; userAgent?: ... },
                                  >,
                                  {
                                      data: { geoLocation?: ...; ipAddress?: ...; userAgent?: ... };
                                      dataType: "object json";
                                      driverParam: unknown;
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: false;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: true;
                                      tableName: "customer_dashboard_user_activity";
                                  },
                              >;
                              objectId: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  PgTextBuilder<[(...), ...(...)[]]>,
                                  {
                                      data: string;
                                      dataType: "string";
                                      driverParam: string;
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: false;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: false;
                                      tableName: "customer_dashboard_user_activity";
                                  },
                              >;
                              parentId: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  PgIntegerBuilder,
                                  {
                                      data: number;
                                      dataType: "number int32";
                                      driverParam: (...)
                                      | (...);
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: false;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: false;
                                      tableName: "customer_dashboard_user_activity";
                                  },
                              >;
                              type: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  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: "customer_dashboard_user_activity";
                                  },
                              >;
                              userExternalId: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  PgTextBuilder<[(...), ...(...)[]]>,
                                  {
                                      data: string;
                                      dataType: "string";
                                      driverParam: string;
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: false;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: false;
                                      tableName: "customer_dashboard_user_activity";
                                  },
                              >;
                              userId: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  PgIntegerBuilder,
                                  {
                                      data: number;
                                      dataType: "number int32";
                                      driverParam: (...)
                                      | (...);
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: false;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: false;
                                      tableName: "customer_dashboard_user_activity";
                                  },
                              >;
                              visibility: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  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: "customer_dashboard_user_activity";
                                  },
                              >;
                              workspaceExternalId: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  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: "customer_dashboard_user_activity";
                                  },
                              >;
                              workspaceId: PgBuildColumn<
                                  "customer_dashboard_user_activity",
                                  SetNotNull<PgIntegerBuilder>,
                                  {
                                      data: number;
                                      dataType: "number int32";
                                      driverParam: (...) | (...);
                                      enumValues: undefined;
                                      generated: undefined;
                                      hasDefault: false;
                                      hasRuntimeDefault: false;
                                      identity: undefined;
                                      isAutoincrement: false;
                                      isPrimaryKey: false;
                                      name: string;
                                      notNull: true;
                                      tableName: "customer_dashboard_user_activity";
                                  },
                              >;
                          };
                          dialect: "pg";
                          isAlias: false;
                          name: "customer_dashboard_user_activity";
                          schema: "b2b";
                      },
                  >,
                  "enableRLS",
              >,
              "createdAt",
          >[]
        • Optionalpage?: number

          Defaults to 1

        • OptionalpageSize?: number

          Defaults to 10

        • OptionalparentIds?: number[]

          Only the children of these rows: a feed page's parents' items.

        • OptionaltopLevelOnly?: boolean

          Only rows not shown under a parent, so a feed pages and counts one row per action: no parent, or a parent types / objectIds leave out.

        • Optionaltypes?: (
              | "account.created"
              | "account.updated"
              | "apiKey.created"
              | "apiKey.deleted"
              | "card.physical.activated"
              | "card.physical.blocked"
              | "card.physical.created"
              | "card.physical.frozen"
              | "card.physical.unfrozen"
              | "card.physical.revealedSensitiveInfo"
              | "card.virtual.blocked"
              | "card.virtual.created"
              | "card.virtual.frozen"
              | "card.virtual.unfrozen"
              | "card.virtual.revealedSensitiveInfo"
              | "customer.emailNotificationPreferences.updated"
              | "customer.internalEmailSubscription.updated"
              | "customer.logo.updated"
              | "customer.slackNotificationPreferences.updated"
              | "customer.smsNotificationPreferences.updated"
              | "customer.terms.accept"
              | "customer.workspaceName.updated"
              | "deposit.memo.created"
              | "identity.created"
              | "identity.updated"
              | "integration.slack.created"
              | "integration.slack.channelAdded"
              | "integration.slack.channelRemoved"
              | "integration.slack.deleted"
              | "organization.created"
              | "organization.updated"
              | "relatedPerson.created"
              | "relatedPerson.updated"
              | "relatedPerson.deleted"
              | "relatedPersonDocument.uploaded"
              | "relatedPersonDocument.deleted"
              | "deposit.achDebit.accepted"
              | "linkedAccount.connected"
              | "linkedAccount.removed"
              | "origin.added"
              | "origin.updated"
              | "origin.removed"
              | "payment.usInstant.created"
              | "payment.ach.created"
              | "payment.swiftWire.created"
              | "payment.usWire.created"
              | "recipient.ach.created"
              | "payment.externalWallet.created"
              | "recipient.ach.updated"
              | "recipient.networkWallet.created"
              | "recipient.networkWallet.updated"
              | "recipient.externalWallet.created"
              | "recipient.externalWallet.updated"
              | "recipient.swiftWire.created"
              | "recipient.swiftWire.updated"
              | "recipient.usWire.created"
              | "recipient.usWire.updated"
              | "recipient.usInstant.created"
              | "recipient.usInstant.updated"
              | "transaction.metadata.created"
              | "transaction.metadataFile.created"
              | "transaction.metadataFile.deleted"
              | "transactionApproval.requested"
              | "transactionApproval.approved"
              | "transactionApproval.declined"
              | "transactionApproval.cancelled"
              | "transactionApproval.executed"
              | "transactionApproval.failed"
              | "transactionApprovalRule.upserted"
              | "transactionApprovalRule.disabled"
              | "transfer.created"
              | "networkTransfer.created"
              | "user.addedToWorkspace"
              | "user.created"
              | "user.deleted"
              | "user.disabled"
              | "user.enabled"
              | "user.invited"
              | "user.inviteRevoked"
              | "user.locked"
              | "user.loggedIn"
              | "user.loggedOut"
              | "user.removedFromWorkspace"
              | "user.updated"
              | "user.workspaceRoleChanged"
              | "user.workspaceStatusChanged"
              | "user.emailPreferences.updated"
              | "user.passwordChanged"
              | "user.mfaReplaced"
              | "user.passkeyAdded"
              | "user.passkeyRemoved"
              | "user.signedOutEverywhere"
              | "virtualAccount.created"
              | SecondFactorRejectionType
          )[]
        • OptionaluserIds?: string[]
        • Optionalvisibilities?: ("ALL" | "INTERNAL")[]

          Defaults to ["ALL"]; the caller decides who may see INTERNAL.

      Returns Promise<
          {
              ok: true;
              value: {
                  hasNext: boolean;
                  items: (
                      CustomerDashboardUserActivity & (
                          ActivityActorRead & { id: number; userName: string; userEmail: string; userIsMember: boolean; typeDescription: string; visibilityDescription: string; parent: { id: number; type: "account.created" | "account.updated" | "apiKey.created" | "apiKey.deleted" | "card.physical.activated" | "card.physical.blocked" | "card.physical.created" | "card.physical.frozen" | "card.physical.unfrozen" | "card.physical.revealedSensitiveInfo" | "card.virtual.blocked" | "card.virtual.created" | "card.virtual.frozen" | "card.virtual.unfrozen" | "card.virtual.revealedSensitiveInfo" | "customer.emailNotificationPreferences.updated" | "customer.internalEmailSubscription.updated" | "customer.logo.updated" | "customer.slackNotificationPreferences.updated" | "customer.smsNotificationPreferences.updated" | "customer.terms.accept" | "customer.workspaceName.updated" | "deposit.memo.created" | "identity.created" | "identity.updated" | "integration.slack.created" | "integration.slack.channelAdded" | "integration.slack.channelRemoved" | "integration.slack.deleted" | "organization.created" | "organization.updated" | "relatedPerson.created" | "relatedPerson.updated" | "relatedPerson.deleted" | "relatedPersonDocument.uploaded" | "relatedPersonDocument.deleted" | "deposit.achDebit.accepted" | "linkedAccount.connected" | "linkedAccount.removed" | "origin.added" | "origin.updated" | "origin.removed" | "payment.usInstant.created" | "payment.ach.created" | "payment.swiftWire.created" | "payment.usWire.created" | "recipient.ach.created" | "payment.externalWallet.created" | "recipient.ach.updated" | "recipient.networkWallet.created" | "recipient.networkWallet.updated" | "recipient.externalWallet.created" | "recipient.externalWallet.updated" | "recipient.swiftWire.created" | "recipient.swiftWire.updated" | "recipient.usWire.created" | "recipient.usWire.updated" | "recipient.usInstant.created" | "recipient.usInstant.updated" | "transaction.metadata.created" | "transaction.metadataFile.created" | "transaction.metadataFile.deleted" | "transactionApproval.requested" | "transactionApproval.approved" | "transactionApproval.declined" | "transactionApproval.cancelled" | "transactionApproval.executed" | "transactionApproval.failed" | "transactionApprovalRule.upserted" | "transactionApprovalRule.disabled" | "transfer.created" | "networkTransfer.created" | "user.addedToWorkspace" | "user.created" | "user.deleted" | "user.disabled" | "user.enabled" | "user.invited" | "user.inviteRevoked" | "user.locked" | "user.loggedIn" | "user.loggedOut" | "user.removedFromWorkspace" | "user.updated" | "user.workspaceRoleChanged" | "user.workspaceStatusChanged" | "user.emailPreferences.updated" | "user.passwordChanged" | "user.mfaReplaced" | "user.passkeyAdded" | "user.passkeyRemoved" | "user.signedOutEverywhere" | "virtualAccount.created" | SecondFactorRejectionType; typeDescription: string; objectId: string | null; } | null; }
                      )
                  )[];
                  total: number;
              };
          },
      >