ETASCOM CRM V3 - Documentation API
    Preparing search index...
    • Parameters

      • request: NextRequest

      Returns Promise<
          | NextResponse<{ error: string }>
          | NextResponse<
              {
                  opportunities: (
                      {
                          _count: {
                              actions: number;
                              forecasts: number;
                              salesOffers: number;
                              salesOrders: number;
                          };
                          actions: {
                              actionDate: Date;
                              description: string
                              | null;
                              id: string;
                              isPricingRelated: boolean;
                              isTechnical: boolean;
                              isTimeSensitive: boolean;
                              nextAction: string | null;
                              user: { email: string; id: string; name: (...) | (...) };
                          }[];
                          adv: { email: string; id: string; name: string | null }
                          | null;
                          client: { email: string | null; id: string; name: string } | null;
                          company: { id: string; name: string } | null;
                          createdBy: { email: string; id: string; name: string | null } | null;
                          files: {
                              createdAt: Date;
                              filename: string;
                              id: string;
                              key: string;
                              mimetype: string;
                              size: number;
                              url: string;
                          }[];
                          keyAccountManager: | { email: string; id: string; name: string
                          | null }
                          | null;
                          lead: { email: string | null; id: string; name: string } | null;
                          salesOffers: {
                              createdAt: Date;
                              id: string;
                              number: string;
                              status: SalesOfferStatus;
                          }[];
                          technician: { email: string; id: string; name: string | null }
                          | null;
                      } & {}
                  )[];
                  pagination: { page: number; limit: number; total: number; pages: number };
                  stats: {
                      totalOpportunities: number;
                      openOpportunities: number;
                      totalRevenue: number;
                      conversionRate: number;
                  };
              },
          >,
      >