becomap 1.4.1 → 1.4.2
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.
- package/lib/becomap.js +1 -1
- package/lib/index.d.ts +61 -3
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -764,6 +764,52 @@ export interface BCHappenings {
|
|
|
764
764
|
*/
|
|
765
765
|
priority: number;
|
|
766
766
|
}
|
|
767
|
+
declare enum BCQuestionType {
|
|
768
|
+
/** Represents a multiple-choice question with a single answer. */
|
|
769
|
+
MCQ_SINGLE_ANSWER = "MCQ_SINGLE_ANSWER",
|
|
770
|
+
/** Represents an open-ended text response. */
|
|
771
|
+
TEXT = "TEXT",
|
|
772
|
+
/** Represents a numerical response. */
|
|
773
|
+
NUMBER = "NUMBER",
|
|
774
|
+
/** Represents a boolean (true/false) response. */
|
|
775
|
+
BOOLEAN = "BOOLEAN"
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* Interface representing a single survey question.
|
|
779
|
+
*/
|
|
780
|
+
export interface BCQuestion {
|
|
781
|
+
/**
|
|
782
|
+
* Unique identifier for the question.
|
|
783
|
+
*/
|
|
784
|
+
id: string;
|
|
785
|
+
/**
|
|
786
|
+
* The text of the question.
|
|
787
|
+
*/
|
|
788
|
+
question: string;
|
|
789
|
+
/**
|
|
790
|
+
* The type of the question, as defined in BCQuestionType.
|
|
791
|
+
*/
|
|
792
|
+
type: BCQuestionType;
|
|
793
|
+
/**
|
|
794
|
+
* The list of possible options for multiple-choice questions.
|
|
795
|
+
* Should be empty or undefined for non-MCQ question types.
|
|
796
|
+
*/
|
|
797
|
+
options?: string[];
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* Interface representing an answer to a survey question.
|
|
801
|
+
*/
|
|
802
|
+
export interface BCAnswer {
|
|
803
|
+
/**
|
|
804
|
+
* Unique identifier for the question being answered.
|
|
805
|
+
*/
|
|
806
|
+
questionId: string;
|
|
807
|
+
/**
|
|
808
|
+
* The answers provided by the user.
|
|
809
|
+
* This can be a list to accommodate multiple responses for certain question types.
|
|
810
|
+
*/
|
|
811
|
+
answers: string[];
|
|
812
|
+
}
|
|
767
813
|
/**
|
|
768
814
|
* Options for configuring the initial view of the map.
|
|
769
815
|
*
|
|
@@ -807,9 +853,6 @@ export declare class BCMapView {
|
|
|
807
853
|
readonly mapSite: BCMapSite;
|
|
808
854
|
readonly eventsHandler: BCEventEmitter<BCMapViewEvents>;
|
|
809
855
|
get currentFloor(): BCMapFloor;
|
|
810
|
-
private _camera;
|
|
811
|
-
private _scene;
|
|
812
|
-
private _renderer;
|
|
813
856
|
/**
|
|
814
857
|
* Constructs a new MapView instance.
|
|
815
858
|
*
|
|
@@ -923,6 +966,21 @@ export declare class BCMapView {
|
|
|
923
966
|
* @returns An array of `BCHappenings` objects.
|
|
924
967
|
*/
|
|
925
968
|
getHappenings(type: BCHappeningType): BCHappenings[];
|
|
969
|
+
/**
|
|
970
|
+
* Retrieves the session ID.
|
|
971
|
+
* @returns A promise that resolves to a string session ID.
|
|
972
|
+
*/
|
|
973
|
+
getSessionId(): Promise<string>;
|
|
974
|
+
/**
|
|
975
|
+
* Retrieves the suggestions based on user answers.
|
|
976
|
+
* @returns A promise that returns a list of event IDs.
|
|
977
|
+
*/
|
|
978
|
+
getEventSuggestions(sessionId: string, answers: BCAnswer[]): Promise<string[]>;
|
|
979
|
+
/**
|
|
980
|
+
* Retrieves all available questions.
|
|
981
|
+
* @returns An array of `BCQuestion` objects.
|
|
982
|
+
*/
|
|
983
|
+
getQuestions(): BCQuestion[];
|
|
926
984
|
/**
|
|
927
985
|
* Retrieves all available amenities.
|
|
928
986
|
* @returns An array of `BCSiteAmenity` objects representing all map amenities.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "becomap",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "we lib to display becomap",
|
|
5
5
|
"main": "lib/becomap.js",
|
|
6
6
|
"module": "lib/becomap.js",
|
|
@@ -66,4 +66,4 @@
|
|
|
66
66
|
"three": "^0.172.0",
|
|
67
67
|
"troika-three-text": "^0.52.3"
|
|
68
68
|
}
|
|
69
|
-
}
|
|
69
|
+
}
|