mftsccs-node 0.0.73 → 0.0.75

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.
@@ -8,6 +8,16 @@
8
8
  * @see https://documentation.freeschema.com for concept structure and API reference
9
9
  */
10
10
  import { Concept } from "../../DataStructures/Concept";
11
+ export type CreateConceptPayload = {
12
+ id: number;
13
+ userId: number;
14
+ characterValue: string;
15
+ typeId: number;
16
+ categoryId: number;
17
+ accessId?: number;
18
+ referentId?: number;
19
+ sessionInformationId?: number;
20
+ };
11
21
  /**
12
22
  * Creates a new concept in the Concept Connection System database.
13
23
  * This function sends a POST request to the CCS API to persist a new concept.
@@ -49,4 +59,4 @@ import { Concept } from "../../DataStructures/Concept";
49
59
  * @see HandleHttpError for error handling
50
60
  * @see https://documentation.freeschema.com for concept data model
51
61
  */
52
- export declare function CreateTheConceptApi(conceptData: any): Promise<Concept>;
62
+ export declare function CreateTheConceptApi(conceptData: Concept | Concept[] | CreateConceptPayload | CreateConceptPayload[]): Promise<Concept>;
@@ -8,6 +8,18 @@
8
8
  * @see https://documentation.freeschema.com for connection structure and relationship types
9
9
  */
10
10
  import { Connection } from "../../DataStructures/Connection";
11
+ export type CreateConnectionPayload = {
12
+ id: number;
13
+ ofTheConceptId: number;
14
+ toTheConceptId: number;
15
+ ofTheConceptUserId: number;
16
+ toTheConceptUserId: number;
17
+ typeId: number;
18
+ userId: number;
19
+ orderId?: number;
20
+ accessId?: number;
21
+ sessionInformationId?: number;
22
+ };
11
23
  /**
12
24
  * Creates one or more connections between concepts in the Concept Connection System.
13
25
  * This function sends a batch of connection data to the CCS API to establish
@@ -45,4 +57,4 @@ import { Connection } from "../../DataStructures/Connection";
45
57
  * @see HandleHttpError for error handling
46
58
  * @see https://documentation.freeschema.com for connection types and semantics
47
59
  */
48
- export declare function CreateTheConnectionApi(connectionData: Connection[]): Promise<Connection>;
60
+ export declare function CreateTheConnectionApi(connectionData: Connection[] | CreateConnectionPayload[]): Promise<Connection>;
@@ -8,7 +8,11 @@
8
8
  * @module CreateTheConnection
9
9
  */
10
10
  import { Connection } from "../DataStructures/Connection";
11
- export declare function validateConnectionConceptIds(ofTheConceptId: number, toTheConceptId: number): void;
11
+ type ConnectionConceptIds = {
12
+ ofTheConceptId: number;
13
+ toTheConceptId: number;
14
+ };
15
+ export declare function validateConnectionConceptIds(ofTheConceptId: number | string, toTheConceptId: number | string): ConnectionConceptIds;
12
16
  /**
13
17
  * Creates a temporary connection between two concepts with default settings.
14
18
  *
@@ -58,4 +62,5 @@ export declare function validateConnectionConceptIds(ofTheConceptId: number, toT
58
62
  * @see {@link Connection} for the connection data structure
59
63
  * @see {@link SyncData.AddConnection} for how connections are queued for sync
60
64
  */
61
- export declare function createTheConnection(ofTheConceptId: number, ofTheConceptUserId: number, toTheConceptId: number, toTheConceptUserId: number, typeId: number, sessionInformationId: number, sessionInformationUserId: number): Connection;
65
+ export declare function createTheConnection(ofTheConceptId: number | string, ofTheConceptUserId: number, toTheConceptId: number | string, toTheConceptUserId: number, typeId: number, sessionInformationId: number, sessionInformationUserId: number): Connection;
66
+ export {};
@@ -69,7 +69,7 @@ import type { InnerActions } from "../DataStructures/Transaction/Transaction";
69
69
  * @see {@link CreateConnection} for a simplified high-level connection API
70
70
  * @see {@link ReservedConnectionIds.getId} for ID reservation mechanism
71
71
  */
72
- export declare function CreateTheConnectionGeneral(ofTheConceptId: number, ofTheConceptUserId: number, toTheConceptId: number, toTheConceptUserId: number, typeId: number, sessionInformationId: number, sessionInformationUserId: number, orderId?: number, accessId?: number, passedUserId?: number, actions?: InnerActions): Promise<Connection>;
72
+ export declare function CreateTheConnectionGeneral(ofTheConceptId: number | string, ofTheConceptUserId: number, toTheConceptId: number | string, toTheConceptUserId: number, typeId: number, sessionInformationId: number, sessionInformationUserId: number, orderId?: number, accessId?: number, passedUserId?: number, actions?: InnerActions): Promise<Connection>;
73
73
  /**
74
74
  * Creates a connection between two concepts using a type string identifier.
75
75
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mftsccs-node",
3
- "version": "0.0.73",
3
+ "version": "0.0.75",
4
4
  "environment": "production",
5
5
  "description": "Full Pack of concept and connection system",
6
6
  "main": "dist/bundle.js",