@kubun/protocol 0.6.0 → 0.7.0
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/services/graph.d.ts +119 -0
- package/lib/services/graph.js +1 -1
- package/package.json +6 -6
package/lib/services/graph.d.ts
CHANGED
|
@@ -3566,6 +3566,9 @@ export declare const mutateGraphParams: {
|
|
|
3566
3566
|
readonly pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$";
|
|
3567
3567
|
};
|
|
3568
3568
|
};
|
|
3569
|
+
readonly transactionID: {
|
|
3570
|
+
readonly type: "string";
|
|
3571
|
+
};
|
|
3569
3572
|
readonly id: {
|
|
3570
3573
|
readonly type: "string";
|
|
3571
3574
|
};
|
|
@@ -3580,6 +3583,50 @@ export declare const mutateGraphParams: {
|
|
|
3580
3583
|
readonly additionalProperties: false;
|
|
3581
3584
|
};
|
|
3582
3585
|
export type MutateGraphParams = FromSchema<typeof mutateGraphParams>;
|
|
3586
|
+
export declare const beginTransactionParams: {
|
|
3587
|
+
readonly type: "object";
|
|
3588
|
+
readonly properties: {
|
|
3589
|
+
readonly id: {
|
|
3590
|
+
readonly type: "string";
|
|
3591
|
+
};
|
|
3592
|
+
};
|
|
3593
|
+
readonly required: readonly ["id"];
|
|
3594
|
+
readonly additionalProperties: false;
|
|
3595
|
+
};
|
|
3596
|
+
export type BeginTransactionParams = FromSchema<typeof beginTransactionParams>;
|
|
3597
|
+
export declare const beginTransactionResult: {
|
|
3598
|
+
readonly type: "object";
|
|
3599
|
+
readonly properties: {
|
|
3600
|
+
readonly transactionID: {
|
|
3601
|
+
readonly type: "string";
|
|
3602
|
+
};
|
|
3603
|
+
};
|
|
3604
|
+
readonly required: readonly ["transactionID"];
|
|
3605
|
+
readonly additionalProperties: false;
|
|
3606
|
+
};
|
|
3607
|
+
export type BeginTransactionResult = FromSchema<typeof beginTransactionResult>;
|
|
3608
|
+
export declare const transactionParams: {
|
|
3609
|
+
readonly type: "object";
|
|
3610
|
+
readonly properties: {
|
|
3611
|
+
readonly transactionID: {
|
|
3612
|
+
readonly type: "string";
|
|
3613
|
+
};
|
|
3614
|
+
};
|
|
3615
|
+
readonly required: readonly ["transactionID"];
|
|
3616
|
+
readonly additionalProperties: false;
|
|
3617
|
+
};
|
|
3618
|
+
export type TransactionParams = FromSchema<typeof transactionParams>;
|
|
3619
|
+
export declare const transactionResult: {
|
|
3620
|
+
readonly type: "object";
|
|
3621
|
+
readonly properties: {
|
|
3622
|
+
readonly success: {
|
|
3623
|
+
readonly type: "boolean";
|
|
3624
|
+
};
|
|
3625
|
+
};
|
|
3626
|
+
readonly required: readonly ["success"];
|
|
3627
|
+
readonly additionalProperties: false;
|
|
3628
|
+
};
|
|
3629
|
+
export type TransactionResult = FromSchema<typeof transactionResult>;
|
|
3583
3630
|
export declare const graphProtocol: {
|
|
3584
3631
|
readonly 'graph/deploy': {
|
|
3585
3632
|
readonly type: "request";
|
|
@@ -7016,6 +7063,9 @@ export declare const graphProtocol: {
|
|
|
7016
7063
|
readonly pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$";
|
|
7017
7064
|
};
|
|
7018
7065
|
};
|
|
7066
|
+
readonly transactionID: {
|
|
7067
|
+
readonly type: "string";
|
|
7068
|
+
};
|
|
7019
7069
|
readonly id: {
|
|
7020
7070
|
readonly type: "string";
|
|
7021
7071
|
};
|
|
@@ -7288,5 +7338,74 @@ export declare const graphProtocol: {
|
|
|
7288
7338
|
}];
|
|
7289
7339
|
};
|
|
7290
7340
|
};
|
|
7341
|
+
readonly 'graph/beginTransaction': {
|
|
7342
|
+
readonly type: "request";
|
|
7343
|
+
readonly param: {
|
|
7344
|
+
readonly type: "object";
|
|
7345
|
+
readonly properties: {
|
|
7346
|
+
readonly id: {
|
|
7347
|
+
readonly type: "string";
|
|
7348
|
+
};
|
|
7349
|
+
};
|
|
7350
|
+
readonly required: readonly ["id"];
|
|
7351
|
+
readonly additionalProperties: false;
|
|
7352
|
+
};
|
|
7353
|
+
readonly result: {
|
|
7354
|
+
readonly type: "object";
|
|
7355
|
+
readonly properties: {
|
|
7356
|
+
readonly transactionID: {
|
|
7357
|
+
readonly type: "string";
|
|
7358
|
+
};
|
|
7359
|
+
};
|
|
7360
|
+
readonly required: readonly ["transactionID"];
|
|
7361
|
+
readonly additionalProperties: false;
|
|
7362
|
+
};
|
|
7363
|
+
};
|
|
7364
|
+
readonly 'graph/commitTransaction': {
|
|
7365
|
+
readonly type: "request";
|
|
7366
|
+
readonly param: {
|
|
7367
|
+
readonly type: "object";
|
|
7368
|
+
readonly properties: {
|
|
7369
|
+
readonly transactionID: {
|
|
7370
|
+
readonly type: "string";
|
|
7371
|
+
};
|
|
7372
|
+
};
|
|
7373
|
+
readonly required: readonly ["transactionID"];
|
|
7374
|
+
readonly additionalProperties: false;
|
|
7375
|
+
};
|
|
7376
|
+
readonly result: {
|
|
7377
|
+
readonly type: "object";
|
|
7378
|
+
readonly properties: {
|
|
7379
|
+
readonly success: {
|
|
7380
|
+
readonly type: "boolean";
|
|
7381
|
+
};
|
|
7382
|
+
};
|
|
7383
|
+
readonly required: readonly ["success"];
|
|
7384
|
+
readonly additionalProperties: false;
|
|
7385
|
+
};
|
|
7386
|
+
};
|
|
7387
|
+
readonly 'graph/rollbackTransaction': {
|
|
7388
|
+
readonly type: "request";
|
|
7389
|
+
readonly param: {
|
|
7390
|
+
readonly type: "object";
|
|
7391
|
+
readonly properties: {
|
|
7392
|
+
readonly transactionID: {
|
|
7393
|
+
readonly type: "string";
|
|
7394
|
+
};
|
|
7395
|
+
};
|
|
7396
|
+
readonly required: readonly ["transactionID"];
|
|
7397
|
+
readonly additionalProperties: false;
|
|
7398
|
+
};
|
|
7399
|
+
readonly result: {
|
|
7400
|
+
readonly type: "object";
|
|
7401
|
+
readonly properties: {
|
|
7402
|
+
readonly success: {
|
|
7403
|
+
readonly type: "boolean";
|
|
7404
|
+
};
|
|
7405
|
+
};
|
|
7406
|
+
readonly required: readonly ["success"];
|
|
7407
|
+
readonly additionalProperties: false;
|
|
7408
|
+
};
|
|
7409
|
+
};
|
|
7291
7410
|
};
|
|
7292
7411
|
export type GraphProtocol = typeof graphProtocol;
|
package/lib/services/graph.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{clusterModel as e}from"../models/cluster.js";import{documentModelsRecord as t}from"../models/document.js";import{binaryStringValue as r,signedJWTStringValue as a}from"../models/value.js";export const searchModelConfig={type:"object",properties:{fields:{type:"array",items:{type:"string"}}},additionalProperties:!1};export const searchConfig={type:"object",additionalProperties:searchModelConfig};export const deployGraphParams={type:"object",properties:{clusters:{type:"array",items:e},id:{type:"string"},name:{type:"string"},search:searchConfig},required:["clusters"],additionalProperties:!1};export const deployGraphResult={type:"object",properties:{id:{type:"string"},record:t,aliases:{type:"object",additionalProperties:{type:"string"}},search:searchConfig},required:["id","record","aliases"],additionalProperties:!1};export const listGraphResult={type:"object",properties:{graphs:{type:"array",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"}},required:["id","name"],additionalProperties:!1}}},required:["graphs"],additionalProperties:!1};export const loadGraphParams={type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1};export const loadGraphResult={type:"object",properties:{record:t,aliases:{type:"object",additionalProperties:{type:"string"}}},required:["record","aliases"],additionalProperties:!1};export const executeGraphParams={type:"object",properties:{id:{type:"string"},text:{type:"string"},variables:{type:"object"}},required:["id","text"],additionalProperties:!1};export const executeGraphError={type:"object",properties:{message:{type:"string"},locations:{type:"array",items:{type:"object",properties:{line:{type:"integer"},column:{type:"integer"}},required:["line","column"],additionalProperties:!1}},path:{type:"array",items:{type:"string"}},extensions:{type:"object"}},required:["message"],additionalProperties:!1};export const executeGraphResult={type:"object",properties:{data:{anyOf:[{type:"object"},{type:"null"}]},errors:{type:"array",items:executeGraphError},extensions:{type:"object"}},additionalProperties:!1};export const mutateGraphParams={type:"object",properties:{...executeGraphParams.properties,mutations:{anyOf:[{type:"object",additionalProperties:a},{type:"null"}]},attachments:{type:"object",additionalProperties:r}},required:[...executeGraphParams.required,"mutations"],additionalProperties:!1};export const graphProtocol={"graph/deploy":{type:"request",param:deployGraphParams,result:deployGraphResult},"graph/list":{type:"request",result:listGraphResult},"graph/load":{type:"request",param:loadGraphParams,result:loadGraphResult},"graph/mutate":{type:"request",param:mutateGraphParams,result:executeGraphResult},"graph/query":{type:"request",param:executeGraphParams,result:executeGraphResult},"graph/subscribe":{type:"stream",param:executeGraphParams,receive:executeGraphResult,result:{anyOf:[executeGraphResult,{type:"null"}]}}};
|
|
1
|
+
import{clusterModel as e}from"../models/cluster.js";import{documentModelsRecord as t}from"../models/document.js";import{binaryStringValue as r,signedJWTStringValue as a}from"../models/value.js";export const searchModelConfig={type:"object",properties:{fields:{type:"array",items:{type:"string"}}},additionalProperties:!1};export const searchConfig={type:"object",additionalProperties:searchModelConfig};export const deployGraphParams={type:"object",properties:{clusters:{type:"array",items:e},id:{type:"string"},name:{type:"string"},search:searchConfig},required:["clusters"],additionalProperties:!1};export const deployGraphResult={type:"object",properties:{id:{type:"string"},record:t,aliases:{type:"object",additionalProperties:{type:"string"}},search:searchConfig},required:["id","record","aliases"],additionalProperties:!1};export const listGraphResult={type:"object",properties:{graphs:{type:"array",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"}},required:["id","name"],additionalProperties:!1}}},required:["graphs"],additionalProperties:!1};export const loadGraphParams={type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1};export const loadGraphResult={type:"object",properties:{record:t,aliases:{type:"object",additionalProperties:{type:"string"}}},required:["record","aliases"],additionalProperties:!1};export const executeGraphParams={type:"object",properties:{id:{type:"string"},text:{type:"string"},variables:{type:"object"}},required:["id","text"],additionalProperties:!1};export const executeGraphError={type:"object",properties:{message:{type:"string"},locations:{type:"array",items:{type:"object",properties:{line:{type:"integer"},column:{type:"integer"}},required:["line","column"],additionalProperties:!1}},path:{type:"array",items:{type:"string"}},extensions:{type:"object"}},required:["message"],additionalProperties:!1};export const executeGraphResult={type:"object",properties:{data:{anyOf:[{type:"object"},{type:"null"}]},errors:{type:"array",items:executeGraphError},extensions:{type:"object"}},additionalProperties:!1};export const mutateGraphParams={type:"object",properties:{...executeGraphParams.properties,mutations:{anyOf:[{type:"object",additionalProperties:a},{type:"null"}]},attachments:{type:"object",additionalProperties:r},transactionID:{type:"string"}},required:[...executeGraphParams.required,"mutations"],additionalProperties:!1};export const beginTransactionParams={type:"object",properties:{id:{type:"string"}},required:["id"],additionalProperties:!1};export const beginTransactionResult={type:"object",properties:{transactionID:{type:"string"}},required:["transactionID"],additionalProperties:!1};export const transactionParams={type:"object",properties:{transactionID:{type:"string"}},required:["transactionID"],additionalProperties:!1};export const transactionResult={type:"object",properties:{success:{type:"boolean"}},required:["success"],additionalProperties:!1};export const graphProtocol={"graph/deploy":{type:"request",param:deployGraphParams,result:deployGraphResult},"graph/list":{type:"request",result:listGraphResult},"graph/load":{type:"request",param:loadGraphParams,result:loadGraphResult},"graph/mutate":{type:"request",param:mutateGraphParams,result:executeGraphResult},"graph/query":{type:"request",param:executeGraphParams,result:executeGraphResult},"graph/subscribe":{type:"stream",param:executeGraphParams,receive:executeGraphResult,result:{anyOf:[executeGraphResult,{type:"null"}]}},"graph/beginTransaction":{type:"request",param:beginTransactionParams,result:beginTransactionResult},"graph/commitTransaction":{type:"request",param:transactionParams,result:transactionResult},"graph/rollbackTransaction":{type:"request",param:transactionParams,result:transactionResult}};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubun/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "see LICENSE.md",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"type": "module",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
],
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@enkaku/codec": "^0.
|
|
19
|
-
"@enkaku/protocol": "^0.
|
|
20
|
-
"@enkaku/schema": "^0.
|
|
18
|
+
"@enkaku/codec": "^0.14.0",
|
|
19
|
+
"@enkaku/protocol": "^0.14.0",
|
|
20
|
+
"@enkaku/schema": "^0.14.0",
|
|
21
21
|
"change-case": "^5.4.4",
|
|
22
|
-
"@kubun/id": "^0.
|
|
23
|
-
"@kubun/logger": "^0.
|
|
22
|
+
"@kubun/id": "^0.7.0",
|
|
23
|
+
"@kubun/logger": "^0.7.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"json-schema-typed": "^8.0.2"
|