graphlit-client 1.0.20250530001 → 1.0.20250531002
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/dist/client.d.ts
CHANGED
@@ -7,8 +7,9 @@ declare class Graphlit {
|
|
7
7
|
private organizationId;
|
8
8
|
private environmentId;
|
9
9
|
private ownerId;
|
10
|
+
private userId;
|
10
11
|
private jwtSecret;
|
11
|
-
constructor(organizationId?: string, environmentId?: string, jwtSecret?: string, ownerId?: string, apiUri?: string);
|
12
|
+
constructor(organizationId?: string, environmentId?: string, jwtSecret?: string, ownerId?: string, userId?: string, apiUri?: string);
|
12
13
|
refreshClient(): void;
|
13
14
|
private generateToken;
|
14
15
|
getProject(): Promise<Types.GetProjectQuery>;
|
package/dist/client.js
CHANGED
@@ -49,7 +49,7 @@ const Documents = __importStar(require("./generated/graphql-documents.js"));
|
|
49
49
|
const dotenv = __importStar(require("dotenv"));
|
50
50
|
// Define the Graphlit class
|
51
51
|
class Graphlit {
|
52
|
-
constructor(organizationId, environmentId, jwtSecret, ownerId, apiUri) {
|
52
|
+
constructor(organizationId, environmentId, jwtSecret, ownerId, userId, apiUri) {
|
53
53
|
this.apiUri = apiUri || "https://data-scus.graphlit.io/api/v1/graphql";
|
54
54
|
if (typeof process !== "undefined") {
|
55
55
|
dotenv.config();
|
@@ -59,6 +59,7 @@ class Graphlit {
|
|
59
59
|
this.jwtSecret = jwtSecret || process.env.GRAPHLIT_JWT_SECRET;
|
60
60
|
// optional: for multi-tenant support
|
61
61
|
this.ownerId = ownerId || process.env.GRAPHLIT_OWNER_ID;
|
62
|
+
this.userId = userId || process.env.GRAPHLIT_USER_ID;
|
62
63
|
}
|
63
64
|
else {
|
64
65
|
this.organizationId = organizationId;
|
@@ -66,6 +67,7 @@ class Graphlit {
|
|
66
67
|
this.jwtSecret = jwtSecret;
|
67
68
|
// optional: for multi-tenant support
|
68
69
|
this.ownerId = ownerId;
|
70
|
+
this.userId = userId;
|
69
71
|
}
|
70
72
|
if (!this.organizationId) {
|
71
73
|
throw new Error("Graphlit organization identifier is required.");
|
@@ -117,7 +119,7 @@ class Graphlit {
|
|
117
119
|
}
|
118
120
|
const expiration = Math.floor(Date.now() / 1000) + 24 * 60 * 60; // one day from now
|
119
121
|
const payload = {
|
120
|
-
"https://graphlit.io/jwt/claims": Object.assign(Object.assign({ "x-graphlit-organization-id": this.organizationId, "x-graphlit-environment-id": this.environmentId }, (this.ownerId && { "x-graphlit-owner-id": this.ownerId })), { "x-graphlit-role": "Owner" }),
|
122
|
+
"https://graphlit.io/jwt/claims": Object.assign(Object.assign(Object.assign({ "x-graphlit-organization-id": this.organizationId, "x-graphlit-environment-id": this.environmentId }, (this.ownerId && { "x-graphlit-owner-id": this.ownerId })), (this.userId && { "x-graphlit-user-id": this.userId })), { "x-graphlit-role": "Owner" }),
|
121
123
|
exp: expiration,
|
122
124
|
iss: "graphlit",
|
123
125
|
aud: "https://portal.graphlit.io",
|
@@ -281,6 +281,7 @@ export declare const DeleteUser: import("graphql").DocumentNode;
|
|
281
281
|
export declare const DisableUser: import("graphql").DocumentNode;
|
282
282
|
export declare const EnableUser: import("graphql").DocumentNode;
|
283
283
|
export declare const GetUser: import("graphql").DocumentNode;
|
284
|
+
export declare const GetUserByIdentifier: import("graphql").DocumentNode;
|
284
285
|
export declare const QueryUsers: import("graphql").DocumentNode;
|
285
286
|
export declare const UpdateUser: import("graphql").DocumentNode;
|
286
287
|
export declare const CountWorkflows: import("graphql").DocumentNode;
|
@@ -8,7 +8,7 @@ exports.QueryMicrosoftTeamsTeams = exports.QueryMicrosoftTeamsChannels = exports
|
|
8
8
|
exports.CreateMedicalDrugClass = exports.CountMedicalDrugClasses = exports.UpdateMedicalDrug = exports.QueryMedicalDrugs = exports.GetMedicalDrug = exports.DeleteMedicalDrugs = exports.DeleteMedicalDrug = exports.DeleteAllMedicalDrugs = exports.CreateMedicalDrug = exports.CountMedicalDrugs = exports.UpdateMedicalDevice = exports.QueryMedicalDevices = exports.GetMedicalDevice = exports.DeleteMedicalDevices = exports.DeleteMedicalDevice = exports.DeleteAllMedicalDevices = exports.CreateMedicalDevice = exports.CountMedicalDevices = exports.UpdateMedicalContraindication = exports.QueryMedicalContraindications = exports.GetMedicalContraindication = exports.DeleteMedicalContraindications = exports.DeleteMedicalContraindication = exports.DeleteAllMedicalContraindications = exports.CreateMedicalContraindication = exports.CountMedicalContraindications = exports.UpdateMedicalCondition = exports.QueryMedicalConditions = exports.GetMedicalCondition = exports.DeleteMedicalConditions = exports.DeleteMedicalCondition = exports.DeleteAllMedicalConditions = exports.CreateMedicalCondition = exports.CountMedicalConditions = exports.UpsertLabel = exports.UpdateLabel = exports.QueryLabels = exports.GetLabel = exports.DeleteLabels = exports.DeleteLabel = exports.DeleteAllLabels = exports.CreateLabel = exports.CountLabels = exports.UpdateFeed = exports.QuerySlackChannels = exports.QuerySharePointLibraries = exports.QuerySharePointFolders = exports.QueryOneDriveFolders = exports.QueryNotionPages = exports.QueryNotionDatabases = void 0;
|
9
9
|
exports.DeleteMedicalTherapies = exports.DeleteAllMedicalTherapies = exports.CreateMedicalTherapy = exports.CountMedicalTherapies = exports.UpdateMedicalTest = exports.QueryMedicalTests = exports.GetMedicalTest = exports.DeleteMedicalTests = exports.DeleteMedicalTest = exports.DeleteAllMedicalTests = exports.CreateMedicalTest = exports.CountMedicalTests = exports.UpdateMedicalStudy = exports.QueryMedicalStudies = exports.GetMedicalStudy = exports.DeleteMedicalStudy = exports.DeleteMedicalStudies = exports.DeleteAllMedicalStudies = exports.CreateMedicalStudy = exports.CountMedicalStudies = exports.UpdateMedicalProcedure = exports.QueryMedicalProcedures = exports.GetMedicalProcedure = exports.DeleteMedicalProcedures = exports.DeleteMedicalProcedure = exports.DeleteAllMedicalProcedures = exports.CreateMedicalProcedure = exports.CountMedicalProcedures = exports.UpdateMedicalIndication = exports.QueryMedicalIndications = exports.GetMedicalIndication = exports.DeleteMedicalIndications = exports.DeleteMedicalIndication = exports.DeleteAllMedicalIndications = exports.CreateMedicalIndication = exports.CountMedicalIndications = exports.UpdateMedicalGuideline = exports.QueryMedicalGuidelines = exports.GetMedicalGuideline = exports.DeleteMedicalGuidelines = exports.DeleteMedicalGuideline = exports.DeleteAllMedicalGuidelines = exports.CreateMedicalGuideline = exports.CountMedicalGuidelines = exports.UpdateMedicalDrugClass = exports.QueryMedicalDrugClasses = exports.GetMedicalDrugClass = exports.DeleteMedicalDrugClasses = exports.DeleteMedicalDrugClass = exports.DeleteAllMedicalDrugClasses = void 0;
|
10
10
|
exports.DeleteAllRepos = exports.CreateRepo = exports.CountRepos = exports.UpdateProject = exports.QueryUsage = exports.QueryTokens = exports.QueryCredits = exports.LookupUsage = exports.LookupCredits = exports.GetProject = exports.UpdateProduct = exports.QueryProducts = exports.GetProduct = exports.DeleteProducts = exports.DeleteProduct = exports.DeleteAllProducts = exports.CreateProduct = exports.CountProducts = exports.UpdatePlace = exports.QueryPlaces = exports.GetPlace = exports.DeletePlaces = exports.DeletePlace = exports.DeleteAllPlaces = exports.CreatePlace = exports.CountPlaces = exports.UpdatePerson = exports.QueryPersons = exports.GetPerson = exports.DeletePersons = exports.DeletePerson = exports.DeleteAllPersons = exports.CreatePerson = exports.CountPersons = exports.UpdateOrganization = exports.QueryOrganizations = exports.GetOrganization = exports.DeleteOrganizations = exports.DeleteOrganization = exports.DeleteAllOrganizations = exports.CreateOrganization = exports.CountOrganizations = exports.UpdateObservation = exports.DeleteObservation = exports.CreateObservation = exports.SendNotification = exports.UpdateMedicalTherapy = exports.QueryMedicalTherapies = exports.GetMedicalTherapy = exports.DeleteMedicalTherapy = void 0;
|
11
|
-
exports.WorkflowExists = exports.UpsertWorkflow = exports.UpdateWorkflow = exports.QueryWorkflows = exports.GetWorkflow = exports.DeleteWorkflows = exports.DeleteWorkflow = exports.DeleteAllWorkflows = exports.CreateWorkflow = exports.CountWorkflows = exports.UpdateUser = exports.QueryUsers = exports.GetUser = exports.EnableUser = exports.DisableUser = exports.DeleteUser = exports.CreateUser = exports.CountUsers = exports.UpsertSpecification = exports.UpdateSpecification = exports.SpecificationExists = exports.QuerySpecifications = exports.QueryModels = exports.PromptSpecifications = exports.GetSpecification = exports.DeleteSpecifications = exports.DeleteSpecification = exports.DeleteAllSpecifications = exports.CreateSpecification = exports.CountSpecifications = exports.UpdateSoftware = exports.QuerySoftwares = exports.GetSoftware = exports.DeleteSoftwares = exports.DeleteSoftware = exports.DeleteAllSoftwares = exports.CreateSoftware = exports.CountSoftwares = exports.SearchWeb = exports.MapWeb = exports.UpdateRepo = exports.QueryRepos = exports.GetRepo = exports.DeleteRepos = exports.DeleteRepo = void 0;
|
11
|
+
exports.WorkflowExists = exports.UpsertWorkflow = exports.UpdateWorkflow = exports.QueryWorkflows = exports.GetWorkflow = exports.DeleteWorkflows = exports.DeleteWorkflow = exports.DeleteAllWorkflows = exports.CreateWorkflow = exports.CountWorkflows = exports.UpdateUser = exports.QueryUsers = exports.GetUserByIdentifier = exports.GetUser = exports.EnableUser = exports.DisableUser = exports.DeleteUser = exports.CreateUser = exports.CountUsers = exports.UpsertSpecification = exports.UpdateSpecification = exports.SpecificationExists = exports.QuerySpecifications = exports.QueryModels = exports.PromptSpecifications = exports.GetSpecification = exports.DeleteSpecifications = exports.DeleteSpecification = exports.DeleteAllSpecifications = exports.CreateSpecification = exports.CountSpecifications = exports.UpdateSoftware = exports.QuerySoftwares = exports.GetSoftware = exports.DeleteSoftwares = exports.DeleteSoftware = exports.DeleteAllSoftwares = exports.CreateSoftware = exports.CountSoftwares = exports.SearchWeb = exports.MapWeb = exports.UpdateRepo = exports.QueryRepos = exports.GetRepo = exports.DeleteRepos = exports.DeleteRepo = void 0;
|
12
12
|
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
13
13
|
exports.CountAlerts = (0, graphql_tag_1.default) `
|
14
14
|
query CountAlerts($filter: AlertFilter, $correlationId: String) {
|
@@ -8469,6 +8469,7 @@ exports.CreateUser = (0, graphql_tag_1.default) `
|
|
8469
8469
|
name
|
8470
8470
|
state
|
8471
8471
|
type
|
8472
|
+
description
|
8472
8473
|
identifier
|
8473
8474
|
}
|
8474
8475
|
}
|
@@ -8510,6 +8511,61 @@ exports.GetUser = (0, graphql_tag_1.default) `
|
|
8510
8511
|
state
|
8511
8512
|
type
|
8512
8513
|
identifier
|
8514
|
+
description
|
8515
|
+
connectors {
|
8516
|
+
id
|
8517
|
+
name
|
8518
|
+
state
|
8519
|
+
type
|
8520
|
+
authentication {
|
8521
|
+
type
|
8522
|
+
microsoft {
|
8523
|
+
tenantId
|
8524
|
+
clientId
|
8525
|
+
clientSecret
|
8526
|
+
}
|
8527
|
+
google {
|
8528
|
+
clientId
|
8529
|
+
clientSecret
|
8530
|
+
}
|
8531
|
+
}
|
8532
|
+
integration {
|
8533
|
+
type
|
8534
|
+
uri
|
8535
|
+
slack {
|
8536
|
+
token
|
8537
|
+
channel
|
8538
|
+
}
|
8539
|
+
email {
|
8540
|
+
from
|
8541
|
+
subject
|
8542
|
+
to
|
8543
|
+
}
|
8544
|
+
twitter {
|
8545
|
+
consumerKey
|
8546
|
+
consumerSecret
|
8547
|
+
accessTokenKey
|
8548
|
+
accessTokenSecret
|
8549
|
+
}
|
8550
|
+
}
|
8551
|
+
}
|
8552
|
+
}
|
8553
|
+
}
|
8554
|
+
`;
|
8555
|
+
exports.GetUserByIdentifier = (0, graphql_tag_1.default) `
|
8556
|
+
query GetUserByIdentifier($identifier: String!) {
|
8557
|
+
userByIdentifier(identifier: $identifier) {
|
8558
|
+
id
|
8559
|
+
name
|
8560
|
+
creationDate
|
8561
|
+
relevance
|
8562
|
+
owner {
|
8563
|
+
id
|
8564
|
+
}
|
8565
|
+
state
|
8566
|
+
type
|
8567
|
+
identifier
|
8568
|
+
description
|
8513
8569
|
connectors {
|
8514
8570
|
id
|
8515
8571
|
name
|
@@ -8564,6 +8620,7 @@ exports.QueryUsers = (0, graphql_tag_1.default) `
|
|
8564
8620
|
state
|
8565
8621
|
type
|
8566
8622
|
identifier
|
8623
|
+
description
|
8567
8624
|
connectors {
|
8568
8625
|
id
|
8569
8626
|
name
|
@@ -8612,6 +8669,7 @@ exports.UpdateUser = (0, graphql_tag_1.default) `
|
|
8612
8669
|
name
|
8613
8670
|
state
|
8614
8671
|
type
|
8672
|
+
description
|
8615
8673
|
identifier
|
8616
8674
|
}
|
8617
8675
|
}
|
@@ -23761,6 +23761,7 @@ export type CreateUserMutation = {
|
|
23761
23761
|
name: string;
|
23762
23762
|
state: EntityState;
|
23763
23763
|
type?: UserTypes | null;
|
23764
|
+
description?: string | null;
|
23764
23765
|
identifier: string;
|
23765
23766
|
} | null;
|
23766
23767
|
};
|
@@ -23811,6 +23812,73 @@ export type GetUserQuery = {
|
|
23811
23812
|
state: EntityState;
|
23812
23813
|
type?: UserTypes | null;
|
23813
23814
|
identifier: string;
|
23815
|
+
description?: string | null;
|
23816
|
+
owner: {
|
23817
|
+
__typename?: 'Owner';
|
23818
|
+
id: string;
|
23819
|
+
};
|
23820
|
+
connectors?: Array<{
|
23821
|
+
__typename?: 'Connector';
|
23822
|
+
id: string;
|
23823
|
+
name: string;
|
23824
|
+
state: EntityState;
|
23825
|
+
type?: ConnectorTypes | null;
|
23826
|
+
authentication?: {
|
23827
|
+
__typename?: 'AuthenticationConnector';
|
23828
|
+
type: AuthenticationServiceTypes;
|
23829
|
+
microsoft?: {
|
23830
|
+
__typename?: 'MicrosoftAuthenticationProperties';
|
23831
|
+
tenantId: string;
|
23832
|
+
clientId: string;
|
23833
|
+
clientSecret: string;
|
23834
|
+
} | null;
|
23835
|
+
google?: {
|
23836
|
+
__typename?: 'GoogleAuthenticationProperties';
|
23837
|
+
clientId: string;
|
23838
|
+
clientSecret: string;
|
23839
|
+
} | null;
|
23840
|
+
} | null;
|
23841
|
+
integration?: {
|
23842
|
+
__typename?: 'IntegrationConnector';
|
23843
|
+
type: IntegrationServiceTypes;
|
23844
|
+
uri?: string | null;
|
23845
|
+
slack?: {
|
23846
|
+
__typename?: 'SlackIntegrationProperties';
|
23847
|
+
token: string;
|
23848
|
+
channel: string;
|
23849
|
+
} | null;
|
23850
|
+
email?: {
|
23851
|
+
__typename?: 'EmailIntegrationProperties';
|
23852
|
+
from: string;
|
23853
|
+
subject: string;
|
23854
|
+
to: Array<string>;
|
23855
|
+
} | null;
|
23856
|
+
twitter?: {
|
23857
|
+
__typename?: 'TwitterIntegrationProperties';
|
23858
|
+
consumerKey: string;
|
23859
|
+
consumerSecret: string;
|
23860
|
+
accessTokenKey: string;
|
23861
|
+
accessTokenSecret: string;
|
23862
|
+
} | null;
|
23863
|
+
} | null;
|
23864
|
+
} | null> | null;
|
23865
|
+
} | null;
|
23866
|
+
};
|
23867
|
+
export type GetUserByIdentifierQueryVariables = Exact<{
|
23868
|
+
identifier: Scalars['String']['input'];
|
23869
|
+
}>;
|
23870
|
+
export type GetUserByIdentifierQuery = {
|
23871
|
+
__typename?: 'Query';
|
23872
|
+
userByIdentifier?: {
|
23873
|
+
__typename?: 'User';
|
23874
|
+
id: string;
|
23875
|
+
name: string;
|
23876
|
+
creationDate: any;
|
23877
|
+
relevance?: number | null;
|
23878
|
+
state: EntityState;
|
23879
|
+
type?: UserTypes | null;
|
23880
|
+
identifier: string;
|
23881
|
+
description?: string | null;
|
23814
23882
|
owner: {
|
23815
23883
|
__typename?: 'Owner';
|
23816
23884
|
id: string;
|
@@ -23879,6 +23947,7 @@ export type QueryUsersQuery = {
|
|
23879
23947
|
state: EntityState;
|
23880
23948
|
type?: UserTypes | null;
|
23881
23949
|
identifier: string;
|
23950
|
+
description?: string | null;
|
23882
23951
|
owner: {
|
23883
23952
|
__typename?: 'Owner';
|
23884
23953
|
id: string;
|
@@ -23942,6 +24011,7 @@ export type UpdateUserMutation = {
|
|
23942
24011
|
name: string;
|
23943
24012
|
state: EntityState;
|
23944
24013
|
type?: UserTypes | null;
|
24014
|
+
description?: string | null;
|
23945
24015
|
identifier: string;
|
23946
24016
|
} | null;
|
23947
24017
|
};
|