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

    Class CustomerSlackBotChannelAdminService

    Index
    db: B2bDatabase
    instance: (...args: []) => CustomerSlackBotChannelAdminService = ...

    The process service: the shared database and the internal bus.

    • Parameters

      • args: {
            channelId: string;
            customerSlackBotInstallationId: string;
            tx?: PgAsyncTransaction<NodePgQueryResultHKT, EmptyRelations>;
        }

      Returns Promise<{ ok: true; value: CustomerSlackBotChannel | null }>

    • Parameters

      • args: { id: string; tx?: PgAsyncTransaction<NodePgQueryResultHKT, EmptyRelations> }

      Returns Promise<
          {
              ok: true;
              value: | Omit<
                  {
                      channelId: string;
                      config: unknown;
                      createdAt: Date;
                      customerSlackBotInstallationExternalId: string;
                      customerSlackBotInstallationId: number;
                      externalId: string;
                      id: number;
                      updatedAt: Date;
                  },
                  | "id"
                  | "externalId"
                  | "customerSlackBotInstallationId"
                  | "customerSlackBotInstallationExternalId",
              > & { customerSlackBotInstallationId: string; id: string } & {
                  botToken: string | null;
                  isHidden: boolean;
              }
              | null;
          },
      >

    • Search slack channels by customer or channel id

      Parameters

      • __namedParameters: {
            channelIds?: string[];
            createdAt?: DbTimestampCriteria;
            customerIds?: string[];
            customerSlackBotInstallationIds?: string[];
            page?: number;
            pageSize?: number;
            tx?: PgAsyncTransaction<NodePgQueryResultHKT, EmptyRelations>;
            updatedAt?: DbTimestampCriteria;
        }

      Returns Promise<
          {
              ok: true;
              value: {
                  hasNext: boolean;
                  items: (
                      Omit<
                          {
                              channelId: string;
                              config: unknown;
                              createdAt: Date;
                              customerSlackBotInstallationExternalId: string;
                              customerSlackBotInstallationId: number;
                              externalId: string;
                              id: number;
                              updatedAt: Date;
                          },
                          | "id"
                          | "externalId"
                          | "customerSlackBotInstallationId"
                          | "customerSlackBotInstallationExternalId",
                      > & { customerSlackBotInstallationId: string; id: string } & {
                          botToken: string | null;
                          isHidden: boolean;
                      }
                  )[];
                  total: number;
              };
          },
      >