mftsccs-node 0.0.17 → 0.0.20

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.
@@ -1,3 +1,3 @@
1
1
  import { Returner } from "../../DataStructures/Returner";
2
2
  import { TheCharacter } from "../../DataStructures/TheCharacter";
3
- export declare function CreateTheCharacter(characterData: TheCharacter): Promise<string | Returner>;
3
+ export declare function CreateTheCharacter(characterData: TheCharacter): Promise<Returner>;
@@ -1,2 +1,2 @@
1
1
  import { TheTexts } from "../../DataStructures/TheTexts";
2
- export declare function CreateTextData(textData: TheTexts): Promise<{}>;
2
+ export declare function CreateTextData(textData: TheTexts): Promise<TheTexts>;
@@ -1 +1 @@
1
- export declare function TrashTheConcept(id: number, token: string): Promise<string | undefined>;
1
+ export declare function TrashTheConcept(id: number, token: string): Promise<void>;
@@ -1 +1 @@
1
- export declare function GetAiData(): Promise<string | undefined>;
1
+ export declare function GetAiData(): Promise<void>;
@@ -1 +1 @@
1
- export declare function GetAllPrefetchConnections(userId: number, inpage: number): Promise<string | undefined>;
1
+ export declare function GetAllPrefetchConnections(userId: number, inpage: number): Promise<void>;
@@ -1,2 +1,2 @@
1
1
  import { TheCharacter } from "../DataStructures/TheCharacter";
2
- export declare function GetCharacterByCharacter(characterValue: string): Promise<string | TheCharacter>;
2
+ export declare function GetCharacterByCharacter(characterValue: string): Promise<TheCharacter>;
@@ -1 +1 @@
1
- export declare function GetReservedConnectionIds(): Promise<string | undefined>;
1
+ export declare function GetReservedConnectionIds(): Promise<void>;
@@ -1 +1 @@
1
- export declare function GetReservedIds(): Promise<string | undefined>;
1
+ export declare function GetReservedIds(): Promise<void>;
@@ -1 +1 @@
1
- export declare function MakeTheNameInBackend(newConceptId: number, referent: string, typeId: number, typeUserId: number): Promise<string | undefined>;
1
+ export declare function MakeTheNameInBackend(newConceptId: number, referent: string, typeId: number, typeUserId: number): Promise<void>;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * This is a class that is used to standardize the Response that is sent by FreeSchema.
3
+ * This is done so that we do not have to send a HttpResponse codes.
4
+ */
5
+ export declare class FreeSchemaResponse {
6
+ private message;
7
+ private status;
8
+ private data;
9
+ private ok;
10
+ private url;
11
+ /**
12
+ *
13
+ * @param message this is the message for the response
14
+ * @param ok this is the status can be true or false boolean in case that request succeds or fails
15
+ * @param status this is the standard http codes 200 for ok, 500 for internal error etc.
16
+ * @param data this is the standard data that can be anything.
17
+ */
18
+ constructor(message: string, ok: boolean, status: number, data: any);
19
+ /**
20
+ * This function gets the message of the error
21
+ * @returns
22
+ */
23
+ getMessage(): string;
24
+ /**
25
+ *
26
+ * @param message This allows you to set a message variable in the FreeSchemaResponse
27
+ * @returns
28
+ */
29
+ setMessage(message: string): FreeSchemaResponse;
30
+ /**
31
+ *
32
+ * @returns status code of the FreeSchemaResponse
33
+ */
34
+ getStatus(): number;
35
+ /**
36
+ *
37
+ * @param status standard http error codes (200 ok , 401 unauthorized, 500 internal server error etc.)
38
+ * @returns
39
+ */
40
+ setStatus(status: number): FreeSchemaResponse;
41
+ /**
42
+ *
43
+ * @returns returns the data for the request
44
+ */
45
+ getData(): any;
46
+ /**
47
+ *
48
+ * @param data any type of data can be given here
49
+ * @returns FreeSchemaReponse
50
+ */
51
+ setData(data: any): FreeSchemaResponse;
52
+ /**
53
+ *
54
+ * @returns the status of the FreeSchemaReponse (either true or false)
55
+ */
56
+ getOk(): boolean;
57
+ /**
58
+ *
59
+ * @param status if the status is true then the response was successful else the success was not achieved.
60
+ * @returns returns the FreeSchemaResponse
61
+ */
62
+ setOk(ok: boolean): FreeSchemaResponse;
63
+ /**
64
+ *
65
+ * @returns the url that caused the error
66
+ */
67
+ getUrl(): string;
68
+ /**
69
+ *
70
+ * @param url the url from which the error or response originates
71
+ * @returns FreeSchemaResponse
72
+ */
73
+ setUrl(url: string): FreeSchemaResponse;
74
+ }
@@ -0,0 +1 @@
1
+ export declare function HandleHttpError(response: Response): void;
@@ -53,6 +53,7 @@ export { GetCompositionFromConnectionsWithDataIdInObject } from './Services/GetC
53
53
  export { ViewInternalData } from './Services/View/ViewInternalData';
54
54
  export { convertFromLConceptToConcept } from './Services/Conversion/ConvertConcepts';
55
55
  export { SearchLinkInternal } from './Services/Search/SearchLinkInternal';
56
+ export { HandleHttpError } from './Services/Common/ErrorPosting';
56
57
  export { SyncData } from './DataStructures/SyncData';
57
58
  export { Concept } from './DataStructures/Concept';
58
59
  export { LConcept } from './DataStructures/Local/LConcept';
@@ -73,6 +74,7 @@ export { CompositionNode } from './DataStructures/Composition/CompositionNode';
73
74
  export { UserBinaryTree } from './DataStructures/User/UserBinaryTree';
74
75
  export { FilterSearch } from './DataStructures/FilterSearch';
75
76
  export { SearchStructure } from './DataStructures/Search/SearchStructure';
77
+ export { FreeSchemaResponse } from './DataStructures/Responses/ErrorResponse';
76
78
  export { BaseUrl } from './DataStructures/BaseUrl';
77
79
  declare function updateAccessToken(accessToken?: string): void;
78
80
  declare function init(url?: string, aiurl?: string, accessToken?: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mftsccs-node",
3
- "version": "0.0.17",
3
+ "version": "0.0.20",
4
4
  "environment": "production",
5
5
  "description": "Full Pack of concept and connection system",
6
6
  "main": "dist/bundle.js",