Skip to content

Commit d619f7f

Browse files
fix default exports and update examples (#9)
1 parent 822733f commit d619f7f

File tree

3 files changed

+68
-1
lines changed

3 files changed

+68
-1
lines changed

examples/javascript/index.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,38 @@ const client = weaviate.client({
55
host: 'localhost:8080',
66
});
77

8+
console.log(
9+
JSON.stringify(
10+
new weaviate.AuthAccessTokenCredentials({
11+
accessToken: 'token123',
12+
expiresIn: 123,
13+
})
14+
)
15+
);
16+
17+
console.log(
18+
JSON.stringify(
19+
new weaviate.AuthUserPasswordCredentials({
20+
username: 'user123',
21+
password: 'password',
22+
})
23+
)
24+
);
25+
26+
console.log(
27+
JSON.stringify(
28+
new weaviate.AuthClientCredentials({
29+
clientSecret: 'secret123',
30+
})
31+
)
32+
);
33+
34+
console.log(weaviate.backup.Backend.GCS);
35+
console.log(weaviate.batch.DeleteOutput.MINIMAL);
36+
console.log(weaviate.cluster.NodeStatus.HEALTHY);
37+
console.log(weaviate.filters.Operator.AND);
38+
console.log(weaviate.replication.ConsistencyLevel.QUORUM);
39+
840
client.misc
941
.metaGetter()
1042
.do()

examples/typescript/index.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,38 @@ const client = weaviate.client({
55
host: 'localhost:8080',
66
});
77

8+
console.log(
9+
JSON.stringify(
10+
new weaviate.AuthAccessTokenCredentials({
11+
accessToken: 'token123',
12+
expiresIn: 123,
13+
})
14+
)
15+
);
16+
17+
console.log(
18+
JSON.stringify(
19+
new weaviate.AuthUserPasswordCredentials({
20+
username: 'user123',
21+
password: 'password',
22+
})
23+
)
24+
);
25+
26+
console.log(
27+
JSON.stringify(
28+
new weaviate.AuthClientCredentials({
29+
clientSecret: 'secret123',
30+
})
31+
)
32+
);
33+
34+
console.log(weaviate.backup.Backend.GCS);
35+
console.log(weaviate.batch.DeleteOutput.MINIMAL);
36+
console.log(weaviate.cluster.NodeStatus.HEALTHY);
37+
console.log(weaviate.filters.Operator.AND);
38+
console.log(weaviate.replication.ConsistencyLevel.QUORUM);
39+
840
client.misc
941
.metaGetter()
1042
.do()

src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ const app = {
7878
filters: filtersConsts,
7979
cluster: clusterConsts,
8080
replication: replicationConsts,
81+
82+
AuthUserPasswordCredentials,
83+
AuthAccessTokenCredentials,
84+
AuthClientCredentials,
8185
};
8286

8387
function initDbVersionProvider(conn: Connection) {
@@ -97,4 +101,3 @@ function initDbVersionProvider(conn: Connection) {
97101

98102
module.exports = app;
99103
export default app;
100-
export { AuthUserPasswordCredentials, AuthAccessTokenCredentials, Operator };

0 commit comments

Comments
 (0)