@iblai/iblai-api 4.126.0-ai → 4.126.1-ai

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,8 +16,6 @@ import type { RetrieverRequestSearchDocument } from '../models/RetrieverRequestS
16
16
  import type { RetrieverResponseSearch } from '../models/RetrieverResponseSearch';
17
17
  import type { ScanWebhookRequest } from '../models/ScanWebhookRequest';
18
18
  import type { ScanWebhookResponse } from '../models/ScanWebhookResponse';
19
- import type { TrainChatSessionDocumentView } from '../models/TrainChatSessionDocumentView';
20
- import type { TrainChatSessionDocumentViewRequest } from '../models/TrainChatSessionDocumentViewRequest';
21
19
  import type { TrainDocumentViewRequest } from '../models/TrainDocumentViewRequest';
22
20
  import type { TrainDocumentViewResponse } from '../models/TrainDocumentViewResponse';
23
21
  import type { CancelablePromise } from '../core/CancelablePromise';
@@ -517,194 +515,130 @@ export class AiIndexService {
517
515
  });
518
516
  }
519
517
  /**
520
- * Description:
521
- * Submit a document file in a chat session. Checks file type, size, and ensures the session exists, then processes the file.
522
- * Process document for use in a specific chat session.
523
- * which will be processed and made available for the AI to reference
524
- * when responding to queries in that session.
518
+ * Retrieve detailed information about a specific scraped resource.
525
519
  *
526
- * Methods:
527
- * - POST: Submits a document or media file for training within a specified chat session.
520
+ * This endpoint returns the complete scraped data for a specific resource
521
+ * identified by its ID.
528
522
  *
529
- * Parameters:
530
- * - org (str):
531
- * - session_id (str): UUID of the chat session for which the document is being submitted.
532
- * - *args, **kwargs: Additional arguments.
533
- * - file (file): Multipart file input.
523
+ * Args:
524
+ * request: The HTTP request.
525
+ * org: Organization key identifier.
526
+ * user_id: The username of the user associated with the resource.
527
+ * resource_id: The ID of the resource to retrieve.
534
528
  *
535
529
  * Returns:
536
- * - POST: Returns a JSON message with the result of the upload process. Response code 200 on success.
537
- * {
538
- * "message": "File processed."
539
- * }
540
- *
541
- * Error Responses:
542
- * - 400 Bad Request:
543
- * - "File field is required" if the 'file' parameter is missing.
544
- * - "invalid file object" if the file object is not valid.
545
- * - Specific error message if an exception occurs while saving to Redis.
546
- * - 404 Not Found:
547
- * - "Session not found" if the provided session_id does not match any existing session.
548
- * - 413 Request Entity Too Large:
549
- * - "file is too large" including specific limits for document and media files if the file exceeds size limits.
550
- *
551
- * Access Control:
552
- * Requires authentication with a Bearer token in the Authorization header. The user associated with the session must exist and be authorized for the request.
553
- * @returns TrainChatSessionDocumentView
554
- * @throws ApiError
555
- */
556
- public static aiIndexOrgsUsersDocumentsTrainSessionsCreate({
557
- org,
558
- sessionId,
559
- userId,
560
- formData,
561
- }: {
562
- org: string,
563
- sessionId: string,
564
- userId: string,
565
- formData: TrainChatSessionDocumentViewRequest,
566
- }): CancelablePromise<TrainChatSessionDocumentView> {
567
- return __request(OpenAPI, {
568
- method: 'POST',
569
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/sessions/{session_id}/',
570
- path: {
571
- 'org': org,
572
- 'session_id': sessionId,
573
- 'user_id': userId,
574
- },
575
- formData: formData,
576
- mediaType: 'multipart/form-data',
577
- errors: {
578
- 400: `Invalid file or processing error`,
579
- 413: `File too large`,
580
- },
581
- });
582
- }
583
- /**
584
- * Retrieve detailed information about a specific scraped resource.
585
- *
586
- * This endpoint returns the complete scraped data for a specific resource
587
- * identified by its ID.
588
- *
589
- * Args:
590
- * request: The HTTP request.
591
- * org: Organization key identifier.
592
- * user_id: The username of the user associated with the resource.
593
- * resource_id: The ID of the resource to retrieve.
594
- *
595
- * Returns:
596
- * Response: The complete scraped data for the specified resource.
597
- *
598
- * Raises:
599
- * NotFound: If the specified resource data does not exist.
600
- * @returns ResourceScrappedData
601
- * @throws ApiError
602
- */
603
- public static aiIndexOrgsUsersResourceDataScrappedRetrieve({
604
- org,
605
- resourceId,
606
- userId,
607
- }: {
608
- org: string,
609
- resourceId: string,
610
- userId: string,
611
- }): CancelablePromise<ResourceScrappedData> {
612
- return __request(OpenAPI, {
613
- method: 'GET',
614
- url: '/api/ai-index/orgs/{org}/users/{user_id}/resource/{resource_id}/data/scrapped/',
615
- path: {
616
- 'org': org,
617
- 'resource_id': resourceId,
618
- 'user_id': userId,
619
- },
620
- errors: {
621
- 404: `Resource data not found`,
622
- },
623
- });
624
- }
625
- /**
626
- * Retrieve and filter scraped data from resources.
627
- *
628
- * This endpoint returns a list of scraped data from resources associated
629
- * with the specified user, with optional filtering based on query parameters.
630
- *
631
- * Args:
632
- * request: The HTTP request containing filter query parameters.
633
- * org: Organization key identifier.
634
- * user_id: The username of the user whose resources to retrieve.
635
- *
636
- * Returns:
637
- * Response: A list of scraped resource data matching the filter criteria.
638
- *
639
- * Raises:
640
- * BadRequest: If the username is invalid or query parameters are incorrect.
641
- * @returns ResourceScrappedData
642
- * @throws ApiError
643
- */
644
- public static aiIndexOrgsUsersResourceDataScrappedList({
645
- org,
646
- userId,
647
- isArchive,
648
- isLike,
649
- isVideo,
650
- searchKey,
651
- }: {
652
- org: string,
653
- userId: string,
654
- isArchive?: boolean | null,
655
- isLike?: boolean | null,
656
- isVideo?: boolean | null,
657
- searchKey?: string,
658
- }): CancelablePromise<Array<ResourceScrappedData>> {
659
- return __request(OpenAPI, {
660
- method: 'GET',
661
- url: '/api/ai-index/orgs/{org}/users/{user_id}/resource/data/scrapped/',
662
- path: {
663
- 'org': org,
664
- 'user_id': userId,
665
- },
666
- query: {
667
- 'is_archive': isArchive,
668
- 'is_like': isLike,
669
- 'is_video': isVideo,
670
- 'search_key': searchKey,
671
- },
672
- errors: {
673
- 400: `Invalid username or query parameters`,
674
- },
675
- });
676
- }
677
- /**
678
- * Receive and process file scan status from external security scanning services.
679
- *
680
- * This webhook endpoint receives scan results for files that have been submitted
681
- * for security scanning. It processes the results asynchronously and determines
682
- * if the files are safe for further processing.
683
- *
684
- * Args:
685
- * request: The HTTP request containing scan result data.
686
- *
687
- * Returns:
688
- * Response: A confirmation that the scan result was received and is being processed.
689
- *
690
- * Raises:
691
- * BadRequest: If the provided scan result data is invalid.
692
- * @returns ScanWebhookResponse
693
- * @throws ApiError
694
- */
695
- public static aiIndexWebhookScanCreate({
696
- requestBody,
697
- }: {
698
- requestBody: ScanWebhookRequest,
699
- }): CancelablePromise<ScanWebhookResponse> {
700
- return __request(OpenAPI, {
701
- method: 'POST',
702
- url: '/api/ai-index/webhook/scan/',
703
- body: requestBody,
704
- mediaType: 'application/json',
705
- errors: {
706
- 400: `Invalid request data`,
707
- },
708
- });
709
- }
530
+ * Response: The complete scraped data for the specified resource.
531
+ *
532
+ * Raises:
533
+ * NotFound: If the specified resource data does not exist.
534
+ * @returns ResourceScrappedData
535
+ * @throws ApiError
536
+ */
537
+ public static aiIndexOrgsUsersResourceDataScrappedRetrieve({
538
+ org,
539
+ resourceId,
540
+ userId,
541
+ }: {
542
+ org: string,
543
+ resourceId: string,
544
+ userId: string,
545
+ }): CancelablePromise<ResourceScrappedData> {
546
+ return __request(OpenAPI, {
547
+ method: 'GET',
548
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/resource/{resource_id}/data/scrapped/',
549
+ path: {
550
+ 'org': org,
551
+ 'resource_id': resourceId,
552
+ 'user_id': userId,
553
+ },
554
+ errors: {
555
+ 404: `Resource data not found`,
556
+ },
557
+ });
558
+ }
559
+ /**
560
+ * Retrieve and filter scraped data from resources.
561
+ *
562
+ * This endpoint returns a list of scraped data from resources associated
563
+ * with the specified user, with optional filtering based on query parameters.
564
+ *
565
+ * Args:
566
+ * request: The HTTP request containing filter query parameters.
567
+ * org: Organization key identifier.
568
+ * user_id: The username of the user whose resources to retrieve.
569
+ *
570
+ * Returns:
571
+ * Response: A list of scraped resource data matching the filter criteria.
572
+ *
573
+ * Raises:
574
+ * BadRequest: If the username is invalid or query parameters are incorrect.
575
+ * @returns ResourceScrappedData
576
+ * @throws ApiError
577
+ */
578
+ public static aiIndexOrgsUsersResourceDataScrappedList({
579
+ org,
580
+ userId,
581
+ isArchive,
582
+ isLike,
583
+ isVideo,
584
+ searchKey,
585
+ }: {
586
+ org: string,
587
+ userId: string,
588
+ isArchive?: boolean | null,
589
+ isLike?: boolean | null,
590
+ isVideo?: boolean | null,
591
+ searchKey?: string,
592
+ }): CancelablePromise<Array<ResourceScrappedData>> {
593
+ return __request(OpenAPI, {
594
+ method: 'GET',
595
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/resource/data/scrapped/',
596
+ path: {
597
+ 'org': org,
598
+ 'user_id': userId,
599
+ },
600
+ query: {
601
+ 'is_archive': isArchive,
602
+ 'is_like': isLike,
603
+ 'is_video': isVideo,
604
+ 'search_key': searchKey,
605
+ },
606
+ errors: {
607
+ 400: `Invalid username or query parameters`,
608
+ },
609
+ });
610
+ }
611
+ /**
612
+ * Receive and process file scan status from external security scanning services.
613
+ *
614
+ * This webhook endpoint receives scan results for files that have been submitted
615
+ * for security scanning. It processes the results asynchronously and determines
616
+ * if the files are safe for further processing.
617
+ *
618
+ * Args:
619
+ * request: The HTTP request containing scan result data.
620
+ *
621
+ * Returns:
622
+ * Response: A confirmation that the scan result was received and is being processed.
623
+ *
624
+ * Raises:
625
+ * BadRequest: If the provided scan result data is invalid.
626
+ * @returns ScanWebhookResponse
627
+ * @throws ApiError
628
+ */
629
+ public static aiIndexWebhookScanCreate({
630
+ requestBody,
631
+ }: {
632
+ requestBody: ScanWebhookRequest,
633
+ }): CancelablePromise<ScanWebhookResponse> {
634
+ return __request(OpenAPI, {
635
+ method: 'POST',
636
+ url: '/api/ai-index/webhook/scan/',
637
+ body: requestBody,
638
+ mediaType: 'application/json',
639
+ errors: {
640
+ 400: `Invalid request data`,
641
+ },
642
+ });
710
643
  }
644
+ }
@@ -1,6 +0,0 @@
1
- export type TrainChatSessionDocumentView = {
2
- /**
3
- * Message of the training
4
- */
5
- message: string;
6
- };
@@ -1,6 +0,0 @@
1
- export type TrainChatSessionDocumentViewRequest = {
2
- /**
3
- * File to be trained
4
- */
5
- file: Blob;
6
- };
@@ -1,11 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- export type TrainChatSessionDocumentView = {
6
- /**
7
- * Message of the training
8
- */
9
- message: string;
10
- };
11
-
@@ -1,11 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- export type TrainChatSessionDocumentViewRequest = {
6
- /**
7
- * File to be trained
8
- */
9
- file: Blob;
10
- };
11
-