@brunyee-studio/onus-cli 2.30.1 → 2.31.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/README.md +20 -1
- package/dist/bin.js +568 -9
- package/dist/{chunk-NQJIFUZV.js → chunk-35HNSEP2.js} +423 -0
- package/dist/{client-CBLKSKYG.js → client-R7T5S6RN.js} +1 -1
- package/dist/index.d.ts +1748 -3
- package/dist/index.js +1349 -0
- package/package.json +1 -1
- package/skills/onus-cli/SKILL.md +25 -2
package/dist/index.js
CHANGED
|
@@ -4422,6 +4422,970 @@ function IssuesPostRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4422
4422
|
};
|
|
4423
4423
|
}
|
|
4424
4424
|
|
|
4425
|
+
// src/generated/models/KbDocsGet200ResponseDataInnerStaleness.ts
|
|
4426
|
+
function instanceOfKbDocsGet200ResponseDataInnerStaleness(value) {
|
|
4427
|
+
if (!("stale" in value) || value["stale"] === void 0) return false;
|
|
4428
|
+
if (!("confidence" in value) || value["confidence"] === void 0) return false;
|
|
4429
|
+
if (!("reason" in value) || value["reason"] === void 0) return false;
|
|
4430
|
+
return true;
|
|
4431
|
+
}
|
|
4432
|
+
function KbDocsGet200ResponseDataInnerStalenessFromJSON(json) {
|
|
4433
|
+
return KbDocsGet200ResponseDataInnerStalenessFromJSONTyped(json, false);
|
|
4434
|
+
}
|
|
4435
|
+
function KbDocsGet200ResponseDataInnerStalenessFromJSONTyped(json, ignoreDiscriminator) {
|
|
4436
|
+
if (json == null) {
|
|
4437
|
+
return json;
|
|
4438
|
+
}
|
|
4439
|
+
return {
|
|
4440
|
+
"stale": json["stale"],
|
|
4441
|
+
"confidence": json["confidence"],
|
|
4442
|
+
"reason": json["reason"]
|
|
4443
|
+
};
|
|
4444
|
+
}
|
|
4445
|
+
function KbDocsGet200ResponseDataInnerStalenessToJSON(json) {
|
|
4446
|
+
return KbDocsGet200ResponseDataInnerStalenessToJSONTyped(json, false);
|
|
4447
|
+
}
|
|
4448
|
+
function KbDocsGet200ResponseDataInnerStalenessToJSONTyped(value, ignoreDiscriminator = false) {
|
|
4449
|
+
if (value == null) {
|
|
4450
|
+
return value;
|
|
4451
|
+
}
|
|
4452
|
+
return {
|
|
4453
|
+
"stale": value["stale"],
|
|
4454
|
+
"confidence": value["confidence"],
|
|
4455
|
+
"reason": value["reason"]
|
|
4456
|
+
};
|
|
4457
|
+
}
|
|
4458
|
+
|
|
4459
|
+
// src/generated/models/KbDocDetail.ts
|
|
4460
|
+
var KbDocDetailKindEnum = {
|
|
4461
|
+
INDEX: "index",
|
|
4462
|
+
AREA: "area",
|
|
4463
|
+
PROCESS: "process",
|
|
4464
|
+
INCIDENT: "incident"
|
|
4465
|
+
};
|
|
4466
|
+
var KbDocDetailOwnerTypeEnum = {
|
|
4467
|
+
REPO: "repo",
|
|
4468
|
+
TEAM: "team",
|
|
4469
|
+
PROJECT: "project"
|
|
4470
|
+
};
|
|
4471
|
+
var KbDocDetailSourceTypeEnum = {
|
|
4472
|
+
GENERATED: "generated",
|
|
4473
|
+
HUMAN: "human"
|
|
4474
|
+
};
|
|
4475
|
+
function instanceOfKbDocDetail(value) {
|
|
4476
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
4477
|
+
if (!("slug" in value) || value["slug"] === void 0) return false;
|
|
4478
|
+
if (!("title" in value) || value["title"] === void 0) return false;
|
|
4479
|
+
if (!("summary" in value) || value["summary"] === void 0) return false;
|
|
4480
|
+
if (!("content" in value) || value["content"] === void 0) return false;
|
|
4481
|
+
if (!("kind" in value) || value["kind"] === void 0) return false;
|
|
4482
|
+
if (!("ownerType" in value) || value["ownerType"] === void 0) return false;
|
|
4483
|
+
if (!("ownerId" in value) || value["ownerId"] === void 0) return false;
|
|
4484
|
+
if (!("tags" in value) || value["tags"] === void 0) return false;
|
|
4485
|
+
if (!("pathsGoverned" in value) || value["pathsGoverned"] === void 0) return false;
|
|
4486
|
+
if (!("sourceType" in value) || value["sourceType"] === void 0) return false;
|
|
4487
|
+
if (!("sourceCommit" in value) || value["sourceCommit"] === void 0) return false;
|
|
4488
|
+
if (!("generatedAt" in value) || value["generatedAt"] === void 0) return false;
|
|
4489
|
+
if (!("humanEditedAt" in value) || value["humanEditedAt"] === void 0) return false;
|
|
4490
|
+
if (!("status" in value) || value["status"] === void 0) return false;
|
|
4491
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
4492
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
4493
|
+
if (!("staleness" in value) || value["staleness"] === void 0) return false;
|
|
4494
|
+
return true;
|
|
4495
|
+
}
|
|
4496
|
+
function KbDocDetailFromJSON(json) {
|
|
4497
|
+
return KbDocDetailFromJSONTyped(json, false);
|
|
4498
|
+
}
|
|
4499
|
+
function KbDocDetailFromJSONTyped(json, ignoreDiscriminator) {
|
|
4500
|
+
if (json == null) {
|
|
4501
|
+
return json;
|
|
4502
|
+
}
|
|
4503
|
+
return {
|
|
4504
|
+
"id": json["id"],
|
|
4505
|
+
"slug": json["slug"],
|
|
4506
|
+
"title": json["title"],
|
|
4507
|
+
"summary": json["summary"],
|
|
4508
|
+
"content": json["content"],
|
|
4509
|
+
"kind": json["kind"],
|
|
4510
|
+
"ownerType": json["ownerType"],
|
|
4511
|
+
"ownerId": json["ownerId"],
|
|
4512
|
+
"tags": json["tags"],
|
|
4513
|
+
"pathsGoverned": json["pathsGoverned"],
|
|
4514
|
+
"sourceType": json["sourceType"],
|
|
4515
|
+
"sourceCommit": json["sourceCommit"],
|
|
4516
|
+
"generatedAt": json["generatedAt"],
|
|
4517
|
+
"humanEditedAt": json["humanEditedAt"],
|
|
4518
|
+
"status": json["status"],
|
|
4519
|
+
"createdAt": json["createdAt"],
|
|
4520
|
+
"updatedAt": json["updatedAt"],
|
|
4521
|
+
"staleness": KbDocsGet200ResponseDataInnerStalenessFromJSON(json["staleness"])
|
|
4522
|
+
};
|
|
4523
|
+
}
|
|
4524
|
+
function KbDocDetailToJSON(json) {
|
|
4525
|
+
return KbDocDetailToJSONTyped(json, false);
|
|
4526
|
+
}
|
|
4527
|
+
function KbDocDetailToJSONTyped(value, ignoreDiscriminator = false) {
|
|
4528
|
+
if (value == null) {
|
|
4529
|
+
return value;
|
|
4530
|
+
}
|
|
4531
|
+
return {
|
|
4532
|
+
"id": value["id"],
|
|
4533
|
+
"slug": value["slug"],
|
|
4534
|
+
"title": value["title"],
|
|
4535
|
+
"summary": value["summary"],
|
|
4536
|
+
"content": value["content"],
|
|
4537
|
+
"kind": value["kind"],
|
|
4538
|
+
"ownerType": value["ownerType"],
|
|
4539
|
+
"ownerId": value["ownerId"],
|
|
4540
|
+
"tags": value["tags"],
|
|
4541
|
+
"pathsGoverned": value["pathsGoverned"],
|
|
4542
|
+
"sourceType": value["sourceType"],
|
|
4543
|
+
"sourceCommit": value["sourceCommit"],
|
|
4544
|
+
"generatedAt": value["generatedAt"],
|
|
4545
|
+
"humanEditedAt": value["humanEditedAt"],
|
|
4546
|
+
"status": value["status"],
|
|
4547
|
+
"createdAt": value["createdAt"],
|
|
4548
|
+
"updatedAt": value["updatedAt"],
|
|
4549
|
+
"staleness": KbDocsGet200ResponseDataInnerStalenessToJSON(value["staleness"])
|
|
4550
|
+
};
|
|
4551
|
+
}
|
|
4552
|
+
|
|
4553
|
+
// src/generated/models/KbDocKind.ts
|
|
4554
|
+
var KbDocKind = {
|
|
4555
|
+
INDEX: "index",
|
|
4556
|
+
AREA: "area",
|
|
4557
|
+
PROCESS: "process",
|
|
4558
|
+
INCIDENT: "incident"
|
|
4559
|
+
};
|
|
4560
|
+
function instanceOfKbDocKind(value) {
|
|
4561
|
+
for (const key in KbDocKind) {
|
|
4562
|
+
if (Object.prototype.hasOwnProperty.call(KbDocKind, key)) {
|
|
4563
|
+
if (KbDocKind[key] === value) {
|
|
4564
|
+
return true;
|
|
4565
|
+
}
|
|
4566
|
+
}
|
|
4567
|
+
}
|
|
4568
|
+
return false;
|
|
4569
|
+
}
|
|
4570
|
+
function KbDocKindFromJSON(json) {
|
|
4571
|
+
return KbDocKindFromJSONTyped(json, false);
|
|
4572
|
+
}
|
|
4573
|
+
function KbDocKindFromJSONTyped(json, ignoreDiscriminator) {
|
|
4574
|
+
return json;
|
|
4575
|
+
}
|
|
4576
|
+
function KbDocKindToJSON(value) {
|
|
4577
|
+
return value;
|
|
4578
|
+
}
|
|
4579
|
+
function KbDocKindToJSONTyped(value, ignoreDiscriminator) {
|
|
4580
|
+
return value;
|
|
4581
|
+
}
|
|
4582
|
+
|
|
4583
|
+
// src/generated/models/KbDocListItem.ts
|
|
4584
|
+
var KbDocListItemKindEnum = {
|
|
4585
|
+
INDEX: "index",
|
|
4586
|
+
AREA: "area",
|
|
4587
|
+
PROCESS: "process",
|
|
4588
|
+
INCIDENT: "incident"
|
|
4589
|
+
};
|
|
4590
|
+
var KbDocListItemOwnerTypeEnum = {
|
|
4591
|
+
REPO: "repo",
|
|
4592
|
+
TEAM: "team",
|
|
4593
|
+
PROJECT: "project"
|
|
4594
|
+
};
|
|
4595
|
+
var KbDocListItemSourceTypeEnum = {
|
|
4596
|
+
GENERATED: "generated",
|
|
4597
|
+
HUMAN: "human"
|
|
4598
|
+
};
|
|
4599
|
+
function instanceOfKbDocListItem(value) {
|
|
4600
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
4601
|
+
if (!("slug" in value) || value["slug"] === void 0) return false;
|
|
4602
|
+
if (!("title" in value) || value["title"] === void 0) return false;
|
|
4603
|
+
if (!("summary" in value) || value["summary"] === void 0) return false;
|
|
4604
|
+
if (!("kind" in value) || value["kind"] === void 0) return false;
|
|
4605
|
+
if (!("ownerType" in value) || value["ownerType"] === void 0) return false;
|
|
4606
|
+
if (!("ownerId" in value) || value["ownerId"] === void 0) return false;
|
|
4607
|
+
if (!("tags" in value) || value["tags"] === void 0) return false;
|
|
4608
|
+
if (!("pathsGoverned" in value) || value["pathsGoverned"] === void 0) return false;
|
|
4609
|
+
if (!("sourceType" in value) || value["sourceType"] === void 0) return false;
|
|
4610
|
+
if (!("status" in value) || value["status"] === void 0) return false;
|
|
4611
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
4612
|
+
if (!("staleness" in value) || value["staleness"] === void 0) return false;
|
|
4613
|
+
return true;
|
|
4614
|
+
}
|
|
4615
|
+
function KbDocListItemFromJSON(json) {
|
|
4616
|
+
return KbDocListItemFromJSONTyped(json, false);
|
|
4617
|
+
}
|
|
4618
|
+
function KbDocListItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
4619
|
+
if (json == null) {
|
|
4620
|
+
return json;
|
|
4621
|
+
}
|
|
4622
|
+
return {
|
|
4623
|
+
"id": json["id"],
|
|
4624
|
+
"slug": json["slug"],
|
|
4625
|
+
"title": json["title"],
|
|
4626
|
+
"summary": json["summary"],
|
|
4627
|
+
"kind": json["kind"],
|
|
4628
|
+
"ownerType": json["ownerType"],
|
|
4629
|
+
"ownerId": json["ownerId"],
|
|
4630
|
+
"tags": json["tags"],
|
|
4631
|
+
"pathsGoverned": json["pathsGoverned"],
|
|
4632
|
+
"sourceType": json["sourceType"],
|
|
4633
|
+
"status": json["status"],
|
|
4634
|
+
"updatedAt": json["updatedAt"],
|
|
4635
|
+
"staleness": KbDocsGet200ResponseDataInnerStalenessFromJSON(json["staleness"])
|
|
4636
|
+
};
|
|
4637
|
+
}
|
|
4638
|
+
function KbDocListItemToJSON(json) {
|
|
4639
|
+
return KbDocListItemToJSONTyped(json, false);
|
|
4640
|
+
}
|
|
4641
|
+
function KbDocListItemToJSONTyped(value, ignoreDiscriminator = false) {
|
|
4642
|
+
if (value == null) {
|
|
4643
|
+
return value;
|
|
4644
|
+
}
|
|
4645
|
+
return {
|
|
4646
|
+
"id": value["id"],
|
|
4647
|
+
"slug": value["slug"],
|
|
4648
|
+
"title": value["title"],
|
|
4649
|
+
"summary": value["summary"],
|
|
4650
|
+
"kind": value["kind"],
|
|
4651
|
+
"ownerType": value["ownerType"],
|
|
4652
|
+
"ownerId": value["ownerId"],
|
|
4653
|
+
"tags": value["tags"],
|
|
4654
|
+
"pathsGoverned": value["pathsGoverned"],
|
|
4655
|
+
"sourceType": value["sourceType"],
|
|
4656
|
+
"status": value["status"],
|
|
4657
|
+
"updatedAt": value["updatedAt"],
|
|
4658
|
+
"staleness": KbDocsGet200ResponseDataInnerStalenessToJSON(value["staleness"])
|
|
4659
|
+
};
|
|
4660
|
+
}
|
|
4661
|
+
|
|
4662
|
+
// src/generated/models/KbDocsGet200ResponseDataInner.ts
|
|
4663
|
+
var KbDocsGet200ResponseDataInnerKindEnum = {
|
|
4664
|
+
INDEX: "index",
|
|
4665
|
+
AREA: "area",
|
|
4666
|
+
PROCESS: "process",
|
|
4667
|
+
INCIDENT: "incident"
|
|
4668
|
+
};
|
|
4669
|
+
var KbDocsGet200ResponseDataInnerOwnerTypeEnum = {
|
|
4670
|
+
REPO: "repo",
|
|
4671
|
+
TEAM: "team",
|
|
4672
|
+
PROJECT: "project"
|
|
4673
|
+
};
|
|
4674
|
+
var KbDocsGet200ResponseDataInnerSourceTypeEnum = {
|
|
4675
|
+
GENERATED: "generated",
|
|
4676
|
+
HUMAN: "human"
|
|
4677
|
+
};
|
|
4678
|
+
function instanceOfKbDocsGet200ResponseDataInner(value) {
|
|
4679
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
4680
|
+
if (!("slug" in value) || value["slug"] === void 0) return false;
|
|
4681
|
+
if (!("title" in value) || value["title"] === void 0) return false;
|
|
4682
|
+
if (!("summary" in value) || value["summary"] === void 0) return false;
|
|
4683
|
+
if (!("kind" in value) || value["kind"] === void 0) return false;
|
|
4684
|
+
if (!("ownerType" in value) || value["ownerType"] === void 0) return false;
|
|
4685
|
+
if (!("ownerId" in value) || value["ownerId"] === void 0) return false;
|
|
4686
|
+
if (!("tags" in value) || value["tags"] === void 0) return false;
|
|
4687
|
+
if (!("pathsGoverned" in value) || value["pathsGoverned"] === void 0) return false;
|
|
4688
|
+
if (!("sourceType" in value) || value["sourceType"] === void 0) return false;
|
|
4689
|
+
if (!("status" in value) || value["status"] === void 0) return false;
|
|
4690
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
4691
|
+
if (!("staleness" in value) || value["staleness"] === void 0) return false;
|
|
4692
|
+
return true;
|
|
4693
|
+
}
|
|
4694
|
+
function KbDocsGet200ResponseDataInnerFromJSON(json) {
|
|
4695
|
+
return KbDocsGet200ResponseDataInnerFromJSONTyped(json, false);
|
|
4696
|
+
}
|
|
4697
|
+
function KbDocsGet200ResponseDataInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
4698
|
+
if (json == null) {
|
|
4699
|
+
return json;
|
|
4700
|
+
}
|
|
4701
|
+
return {
|
|
4702
|
+
"id": json["id"],
|
|
4703
|
+
"slug": json["slug"],
|
|
4704
|
+
"title": json["title"],
|
|
4705
|
+
"summary": json["summary"],
|
|
4706
|
+
"kind": json["kind"],
|
|
4707
|
+
"ownerType": json["ownerType"],
|
|
4708
|
+
"ownerId": json["ownerId"],
|
|
4709
|
+
"tags": json["tags"],
|
|
4710
|
+
"pathsGoverned": json["pathsGoverned"],
|
|
4711
|
+
"sourceType": json["sourceType"],
|
|
4712
|
+
"status": json["status"],
|
|
4713
|
+
"updatedAt": json["updatedAt"],
|
|
4714
|
+
"staleness": KbDocsGet200ResponseDataInnerStalenessFromJSON(json["staleness"])
|
|
4715
|
+
};
|
|
4716
|
+
}
|
|
4717
|
+
function KbDocsGet200ResponseDataInnerToJSON(json) {
|
|
4718
|
+
return KbDocsGet200ResponseDataInnerToJSONTyped(json, false);
|
|
4719
|
+
}
|
|
4720
|
+
function KbDocsGet200ResponseDataInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
4721
|
+
if (value == null) {
|
|
4722
|
+
return value;
|
|
4723
|
+
}
|
|
4724
|
+
return {
|
|
4725
|
+
"id": value["id"],
|
|
4726
|
+
"slug": value["slug"],
|
|
4727
|
+
"title": value["title"],
|
|
4728
|
+
"summary": value["summary"],
|
|
4729
|
+
"kind": value["kind"],
|
|
4730
|
+
"ownerType": value["ownerType"],
|
|
4731
|
+
"ownerId": value["ownerId"],
|
|
4732
|
+
"tags": value["tags"],
|
|
4733
|
+
"pathsGoverned": value["pathsGoverned"],
|
|
4734
|
+
"sourceType": value["sourceType"],
|
|
4735
|
+
"status": value["status"],
|
|
4736
|
+
"updatedAt": value["updatedAt"],
|
|
4737
|
+
"staleness": KbDocsGet200ResponseDataInnerStalenessToJSON(value["staleness"])
|
|
4738
|
+
};
|
|
4739
|
+
}
|
|
4740
|
+
|
|
4741
|
+
// src/generated/models/KbDocsGet200Response.ts
|
|
4742
|
+
function instanceOfKbDocsGet200Response(value) {
|
|
4743
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
4744
|
+
if (!("next_cursor" in value) || value["next_cursor"] === void 0) return false;
|
|
4745
|
+
return true;
|
|
4746
|
+
}
|
|
4747
|
+
function KbDocsGet200ResponseFromJSON(json) {
|
|
4748
|
+
return KbDocsGet200ResponseFromJSONTyped(json, false);
|
|
4749
|
+
}
|
|
4750
|
+
function KbDocsGet200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
4751
|
+
if (json == null) {
|
|
4752
|
+
return json;
|
|
4753
|
+
}
|
|
4754
|
+
return {
|
|
4755
|
+
"data": json["data"].map(KbDocsGet200ResponseDataInnerFromJSON),
|
|
4756
|
+
"next_cursor": json["next_cursor"]
|
|
4757
|
+
};
|
|
4758
|
+
}
|
|
4759
|
+
function KbDocsGet200ResponseToJSON(json) {
|
|
4760
|
+
return KbDocsGet200ResponseToJSONTyped(json, false);
|
|
4761
|
+
}
|
|
4762
|
+
function KbDocsGet200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
4763
|
+
if (value == null) {
|
|
4764
|
+
return value;
|
|
4765
|
+
}
|
|
4766
|
+
return {
|
|
4767
|
+
"data": value["data"].map(KbDocsGet200ResponseDataInnerToJSON),
|
|
4768
|
+
"next_cursor": value["next_cursor"]
|
|
4769
|
+
};
|
|
4770
|
+
}
|
|
4771
|
+
|
|
4772
|
+
// src/generated/models/KbDocsIdGet200Response.ts
|
|
4773
|
+
var KbDocsIdGet200ResponseKindEnum = {
|
|
4774
|
+
INDEX: "index",
|
|
4775
|
+
AREA: "area",
|
|
4776
|
+
PROCESS: "process",
|
|
4777
|
+
INCIDENT: "incident"
|
|
4778
|
+
};
|
|
4779
|
+
var KbDocsIdGet200ResponseOwnerTypeEnum = {
|
|
4780
|
+
REPO: "repo",
|
|
4781
|
+
TEAM: "team",
|
|
4782
|
+
PROJECT: "project"
|
|
4783
|
+
};
|
|
4784
|
+
var KbDocsIdGet200ResponseSourceTypeEnum = {
|
|
4785
|
+
GENERATED: "generated",
|
|
4786
|
+
HUMAN: "human"
|
|
4787
|
+
};
|
|
4788
|
+
function instanceOfKbDocsIdGet200Response(value) {
|
|
4789
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
4790
|
+
if (!("slug" in value) || value["slug"] === void 0) return false;
|
|
4791
|
+
if (!("title" in value) || value["title"] === void 0) return false;
|
|
4792
|
+
if (!("summary" in value) || value["summary"] === void 0) return false;
|
|
4793
|
+
if (!("content" in value) || value["content"] === void 0) return false;
|
|
4794
|
+
if (!("kind" in value) || value["kind"] === void 0) return false;
|
|
4795
|
+
if (!("ownerType" in value) || value["ownerType"] === void 0) return false;
|
|
4796
|
+
if (!("ownerId" in value) || value["ownerId"] === void 0) return false;
|
|
4797
|
+
if (!("tags" in value) || value["tags"] === void 0) return false;
|
|
4798
|
+
if (!("pathsGoverned" in value) || value["pathsGoverned"] === void 0) return false;
|
|
4799
|
+
if (!("sourceType" in value) || value["sourceType"] === void 0) return false;
|
|
4800
|
+
if (!("sourceCommit" in value) || value["sourceCommit"] === void 0) return false;
|
|
4801
|
+
if (!("generatedAt" in value) || value["generatedAt"] === void 0) return false;
|
|
4802
|
+
if (!("humanEditedAt" in value) || value["humanEditedAt"] === void 0) return false;
|
|
4803
|
+
if (!("status" in value) || value["status"] === void 0) return false;
|
|
4804
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
4805
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
4806
|
+
if (!("staleness" in value) || value["staleness"] === void 0) return false;
|
|
4807
|
+
return true;
|
|
4808
|
+
}
|
|
4809
|
+
function KbDocsIdGet200ResponseFromJSON(json) {
|
|
4810
|
+
return KbDocsIdGet200ResponseFromJSONTyped(json, false);
|
|
4811
|
+
}
|
|
4812
|
+
function KbDocsIdGet200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
4813
|
+
if (json == null) {
|
|
4814
|
+
return json;
|
|
4815
|
+
}
|
|
4816
|
+
return {
|
|
4817
|
+
"id": json["id"],
|
|
4818
|
+
"slug": json["slug"],
|
|
4819
|
+
"title": json["title"],
|
|
4820
|
+
"summary": json["summary"],
|
|
4821
|
+
"content": json["content"],
|
|
4822
|
+
"kind": json["kind"],
|
|
4823
|
+
"ownerType": json["ownerType"],
|
|
4824
|
+
"ownerId": json["ownerId"],
|
|
4825
|
+
"tags": json["tags"],
|
|
4826
|
+
"pathsGoverned": json["pathsGoverned"],
|
|
4827
|
+
"sourceType": json["sourceType"],
|
|
4828
|
+
"sourceCommit": json["sourceCommit"],
|
|
4829
|
+
"generatedAt": json["generatedAt"],
|
|
4830
|
+
"humanEditedAt": json["humanEditedAt"],
|
|
4831
|
+
"status": json["status"],
|
|
4832
|
+
"createdAt": json["createdAt"],
|
|
4833
|
+
"updatedAt": json["updatedAt"],
|
|
4834
|
+
"staleness": KbDocsGet200ResponseDataInnerStalenessFromJSON(json["staleness"])
|
|
4835
|
+
};
|
|
4836
|
+
}
|
|
4837
|
+
function KbDocsIdGet200ResponseToJSON(json) {
|
|
4838
|
+
return KbDocsIdGet200ResponseToJSONTyped(json, false);
|
|
4839
|
+
}
|
|
4840
|
+
function KbDocsIdGet200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
4841
|
+
if (value == null) {
|
|
4842
|
+
return value;
|
|
4843
|
+
}
|
|
4844
|
+
return {
|
|
4845
|
+
"id": value["id"],
|
|
4846
|
+
"slug": value["slug"],
|
|
4847
|
+
"title": value["title"],
|
|
4848
|
+
"summary": value["summary"],
|
|
4849
|
+
"content": value["content"],
|
|
4850
|
+
"kind": value["kind"],
|
|
4851
|
+
"ownerType": value["ownerType"],
|
|
4852
|
+
"ownerId": value["ownerId"],
|
|
4853
|
+
"tags": value["tags"],
|
|
4854
|
+
"pathsGoverned": value["pathsGoverned"],
|
|
4855
|
+
"sourceType": value["sourceType"],
|
|
4856
|
+
"sourceCommit": value["sourceCommit"],
|
|
4857
|
+
"generatedAt": value["generatedAt"],
|
|
4858
|
+
"humanEditedAt": value["humanEditedAt"],
|
|
4859
|
+
"status": value["status"],
|
|
4860
|
+
"createdAt": value["createdAt"],
|
|
4861
|
+
"updatedAt": value["updatedAt"],
|
|
4862
|
+
"staleness": KbDocsGet200ResponseDataInnerStalenessToJSON(value["staleness"])
|
|
4863
|
+
};
|
|
4864
|
+
}
|
|
4865
|
+
|
|
4866
|
+
// src/generated/models/KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInner.ts
|
|
4867
|
+
function instanceOfKbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInner(value) {
|
|
4868
|
+
if (!("chunkIndex" in value) || value["chunkIndex"] === void 0) return false;
|
|
4869
|
+
if (!("snippet" in value) || value["snippet"] === void 0) return false;
|
|
4870
|
+
if (!("score" in value) || value["score"] === void 0) return false;
|
|
4871
|
+
return true;
|
|
4872
|
+
}
|
|
4873
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerFromJSON(json) {
|
|
4874
|
+
return KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerFromJSONTyped(json, false);
|
|
4875
|
+
}
|
|
4876
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
4877
|
+
if (json == null) {
|
|
4878
|
+
return json;
|
|
4879
|
+
}
|
|
4880
|
+
return {
|
|
4881
|
+
"chunkIndex": json["chunkIndex"],
|
|
4882
|
+
"snippet": json["snippet"],
|
|
4883
|
+
"score": json["score"]
|
|
4884
|
+
};
|
|
4885
|
+
}
|
|
4886
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerToJSON(json) {
|
|
4887
|
+
return KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerToJSONTyped(json, false);
|
|
4888
|
+
}
|
|
4889
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
4890
|
+
if (value == null) {
|
|
4891
|
+
return value;
|
|
4892
|
+
}
|
|
4893
|
+
return {
|
|
4894
|
+
"chunkIndex": value["chunkIndex"],
|
|
4895
|
+
"snippet": value["snippet"],
|
|
4896
|
+
"score": value["score"]
|
|
4897
|
+
};
|
|
4898
|
+
}
|
|
4899
|
+
|
|
4900
|
+
// src/generated/models/KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanks.ts
|
|
4901
|
+
function instanceOfKbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanks(value) {
|
|
4902
|
+
return true;
|
|
4903
|
+
}
|
|
4904
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksFromJSON(json) {
|
|
4905
|
+
return KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksFromJSONTyped(json, false);
|
|
4906
|
+
}
|
|
4907
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksFromJSONTyped(json, ignoreDiscriminator) {
|
|
4908
|
+
if (json == null) {
|
|
4909
|
+
return json;
|
|
4910
|
+
}
|
|
4911
|
+
return {
|
|
4912
|
+
"string": json["string"] == null ? void 0 : json["string"],
|
|
4913
|
+
"semantic": json["semantic"] == null ? void 0 : json["semantic"]
|
|
4914
|
+
};
|
|
4915
|
+
}
|
|
4916
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksToJSON(json) {
|
|
4917
|
+
return KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksToJSONTyped(json, false);
|
|
4918
|
+
}
|
|
4919
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksToJSONTyped(value, ignoreDiscriminator = false) {
|
|
4920
|
+
if (value == null) {
|
|
4921
|
+
return value;
|
|
4922
|
+
}
|
|
4923
|
+
return {
|
|
4924
|
+
"string": value["string"],
|
|
4925
|
+
"semantic": value["semantic"]
|
|
4926
|
+
};
|
|
4927
|
+
}
|
|
4928
|
+
|
|
4929
|
+
// src/generated/models/KbDocsIdRelatedGet200ResponseResultsInnerProvenance.ts
|
|
4930
|
+
var KbDocsIdRelatedGet200ResponseResultsInnerProvenanceSourceTypeEnum = {
|
|
4931
|
+
GENERATED: "generated",
|
|
4932
|
+
HUMAN: "human"
|
|
4933
|
+
};
|
|
4934
|
+
var KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRoutedByEnum = {
|
|
4935
|
+
CLASSIFIER: "classifier",
|
|
4936
|
+
SEMANTIC_FALLBACK: "semantic-fallback"
|
|
4937
|
+
};
|
|
4938
|
+
function instanceOfKbDocsIdRelatedGet200ResponseResultsInnerProvenance(value) {
|
|
4939
|
+
if (!("sourceType" in value) || value["sourceType"] === void 0) return false;
|
|
4940
|
+
if (!("sourceCommit" in value) || value["sourceCommit"] === void 0) return false;
|
|
4941
|
+
if (!("generatedAt" in value) || value["generatedAt"] === void 0) return false;
|
|
4942
|
+
if (!("humanEditedAt" in value) || value["humanEditedAt"] === void 0) return false;
|
|
4943
|
+
return true;
|
|
4944
|
+
}
|
|
4945
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerProvenanceFromJSON(json) {
|
|
4946
|
+
return KbDocsIdRelatedGet200ResponseResultsInnerProvenanceFromJSONTyped(json, false);
|
|
4947
|
+
}
|
|
4948
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerProvenanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
4949
|
+
if (json == null) {
|
|
4950
|
+
return json;
|
|
4951
|
+
}
|
|
4952
|
+
return {
|
|
4953
|
+
"sourceType": json["sourceType"],
|
|
4954
|
+
"sourceCommit": json["sourceCommit"],
|
|
4955
|
+
"generatedAt": json["generatedAt"],
|
|
4956
|
+
"humanEditedAt": json["humanEditedAt"],
|
|
4957
|
+
"ranks": json["ranks"] == null ? void 0 : KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksFromJSON(json["ranks"]),
|
|
4958
|
+
"hopDistance": json["hopDistance"] == null ? void 0 : json["hopDistance"],
|
|
4959
|
+
"relationTypes": json["relationTypes"] == null ? void 0 : json["relationTypes"],
|
|
4960
|
+
"overlapPaths": json["overlapPaths"] == null ? void 0 : json["overlapPaths"],
|
|
4961
|
+
"routedBy": json["routedBy"] == null ? void 0 : json["routedBy"],
|
|
4962
|
+
"confidence": json["confidence"] == null ? void 0 : json["confidence"]
|
|
4963
|
+
};
|
|
4964
|
+
}
|
|
4965
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerProvenanceToJSON(json) {
|
|
4966
|
+
return KbDocsIdRelatedGet200ResponseResultsInnerProvenanceToJSONTyped(json, false);
|
|
4967
|
+
}
|
|
4968
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerProvenanceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
4969
|
+
if (value == null) {
|
|
4970
|
+
return value;
|
|
4971
|
+
}
|
|
4972
|
+
return {
|
|
4973
|
+
"sourceType": value["sourceType"],
|
|
4974
|
+
"sourceCommit": value["sourceCommit"],
|
|
4975
|
+
"generatedAt": value["generatedAt"],
|
|
4976
|
+
"humanEditedAt": value["humanEditedAt"],
|
|
4977
|
+
"ranks": KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksToJSON(value["ranks"]),
|
|
4978
|
+
"hopDistance": value["hopDistance"],
|
|
4979
|
+
"relationTypes": value["relationTypes"],
|
|
4980
|
+
"overlapPaths": value["overlapPaths"],
|
|
4981
|
+
"routedBy": value["routedBy"],
|
|
4982
|
+
"confidence": value["confidence"]
|
|
4983
|
+
};
|
|
4984
|
+
}
|
|
4985
|
+
|
|
4986
|
+
// src/generated/models/KbDocsIdRelatedGet200ResponseResultsInner.ts
|
|
4987
|
+
var KbDocsIdRelatedGet200ResponseResultsInnerKindEnum = {
|
|
4988
|
+
INDEX: "index",
|
|
4989
|
+
AREA: "area",
|
|
4990
|
+
PROCESS: "process",
|
|
4991
|
+
INCIDENT: "incident"
|
|
4992
|
+
};
|
|
4993
|
+
var KbDocsIdRelatedGet200ResponseResultsInnerOwnerTypeEnum = {
|
|
4994
|
+
REPO: "repo",
|
|
4995
|
+
TEAM: "team",
|
|
4996
|
+
PROJECT: "project"
|
|
4997
|
+
};
|
|
4998
|
+
var KbDocsIdRelatedGet200ResponseResultsInnerMatchTypeEnum = {
|
|
4999
|
+
FTS: "fts",
|
|
5000
|
+
TRIGRAM: "trigram",
|
|
5001
|
+
GRAPH: "graph",
|
|
5002
|
+
PATH_OVERLAP: "path_overlap"
|
|
5003
|
+
};
|
|
5004
|
+
function instanceOfKbDocsIdRelatedGet200ResponseResultsInner(value) {
|
|
5005
|
+
if (!("docId" in value) || value["docId"] === void 0) return false;
|
|
5006
|
+
if (!("slug" in value) || value["slug"] === void 0) return false;
|
|
5007
|
+
if (!("title" in value) || value["title"] === void 0) return false;
|
|
5008
|
+
if (!("summary" in value) || value["summary"] === void 0) return false;
|
|
5009
|
+
if (!("kind" in value) || value["kind"] === void 0) return false;
|
|
5010
|
+
if (!("ownerType" in value) || value["ownerType"] === void 0) return false;
|
|
5011
|
+
if (!("ownerId" in value) || value["ownerId"] === void 0) return false;
|
|
5012
|
+
if (!("tags" in value) || value["tags"] === void 0) return false;
|
|
5013
|
+
if (!("pathsGoverned" in value) || value["pathsGoverned"] === void 0) return false;
|
|
5014
|
+
if (!("score" in value) || value["score"] === void 0) return false;
|
|
5015
|
+
if (!("provenance" in value) || value["provenance"] === void 0) return false;
|
|
5016
|
+
if (!("stale" in value) || value["stale"] === void 0) return false;
|
|
5017
|
+
if (!("confidence" in value) || value["confidence"] === void 0) return false;
|
|
5018
|
+
return true;
|
|
5019
|
+
}
|
|
5020
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerFromJSON(json) {
|
|
5021
|
+
return KbDocsIdRelatedGet200ResponseResultsInnerFromJSONTyped(json, false);
|
|
5022
|
+
}
|
|
5023
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
5024
|
+
if (json == null) {
|
|
5025
|
+
return json;
|
|
5026
|
+
}
|
|
5027
|
+
return {
|
|
5028
|
+
"docId": json["docId"],
|
|
5029
|
+
"slug": json["slug"],
|
|
5030
|
+
"title": json["title"],
|
|
5031
|
+
"summary": json["summary"],
|
|
5032
|
+
"kind": json["kind"],
|
|
5033
|
+
"ownerType": json["ownerType"],
|
|
5034
|
+
"ownerId": json["ownerId"],
|
|
5035
|
+
"tags": json["tags"],
|
|
5036
|
+
"pathsGoverned": json["pathsGoverned"],
|
|
5037
|
+
"score": json["score"],
|
|
5038
|
+
"provenance": KbDocsIdRelatedGet200ResponseResultsInnerProvenanceFromJSON(json["provenance"]),
|
|
5039
|
+
"matchType": json["matchType"] == null ? void 0 : json["matchType"],
|
|
5040
|
+
"matchedChunks": json["matchedChunks"] == null ? void 0 : json["matchedChunks"].map(KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerFromJSON),
|
|
5041
|
+
"stale": json["stale"],
|
|
5042
|
+
"confidence": json["confidence"]
|
|
5043
|
+
};
|
|
5044
|
+
}
|
|
5045
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerToJSON(json) {
|
|
5046
|
+
return KbDocsIdRelatedGet200ResponseResultsInnerToJSONTyped(json, false);
|
|
5047
|
+
}
|
|
5048
|
+
function KbDocsIdRelatedGet200ResponseResultsInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
5049
|
+
if (value == null) {
|
|
5050
|
+
return value;
|
|
5051
|
+
}
|
|
5052
|
+
return {
|
|
5053
|
+
"docId": value["docId"],
|
|
5054
|
+
"slug": value["slug"],
|
|
5055
|
+
"title": value["title"],
|
|
5056
|
+
"summary": value["summary"],
|
|
5057
|
+
"kind": value["kind"],
|
|
5058
|
+
"ownerType": value["ownerType"],
|
|
5059
|
+
"ownerId": value["ownerId"],
|
|
5060
|
+
"tags": value["tags"],
|
|
5061
|
+
"pathsGoverned": value["pathsGoverned"],
|
|
5062
|
+
"score": value["score"],
|
|
5063
|
+
"provenance": KbDocsIdRelatedGet200ResponseResultsInnerProvenanceToJSON(value["provenance"]),
|
|
5064
|
+
"matchType": value["matchType"],
|
|
5065
|
+
"matchedChunks": value["matchedChunks"] == null ? void 0 : value["matchedChunks"].map(KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerToJSON),
|
|
5066
|
+
"stale": value["stale"],
|
|
5067
|
+
"confidence": value["confidence"]
|
|
5068
|
+
};
|
|
5069
|
+
}
|
|
5070
|
+
|
|
5071
|
+
// src/generated/models/KbDocsIdRelatedGet200Response.ts
|
|
5072
|
+
var KbDocsIdRelatedGet200ResponseModeEnum = {
|
|
5073
|
+
STRING: "string",
|
|
5074
|
+
SEMANTIC: "semantic",
|
|
5075
|
+
HYBRID: "hybrid",
|
|
5076
|
+
RELATED: "related",
|
|
5077
|
+
LOCATE: "locate"
|
|
5078
|
+
};
|
|
5079
|
+
function instanceOfKbDocsIdRelatedGet200Response(value) {
|
|
5080
|
+
if (!("mode" in value) || value["mode"] === void 0) return false;
|
|
5081
|
+
if (!("query" in value) || value["query"] === void 0) return false;
|
|
5082
|
+
if (!("results" in value) || value["results"] === void 0) return false;
|
|
5083
|
+
return true;
|
|
5084
|
+
}
|
|
5085
|
+
function KbDocsIdRelatedGet200ResponseFromJSON(json) {
|
|
5086
|
+
return KbDocsIdRelatedGet200ResponseFromJSONTyped(json, false);
|
|
5087
|
+
}
|
|
5088
|
+
function KbDocsIdRelatedGet200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
5089
|
+
if (json == null) {
|
|
5090
|
+
return json;
|
|
5091
|
+
}
|
|
5092
|
+
return {
|
|
5093
|
+
"mode": json["mode"],
|
|
5094
|
+
"query": json["query"],
|
|
5095
|
+
"results": json["results"].map(KbDocsIdRelatedGet200ResponseResultsInnerFromJSON)
|
|
5096
|
+
};
|
|
5097
|
+
}
|
|
5098
|
+
function KbDocsIdRelatedGet200ResponseToJSON(json) {
|
|
5099
|
+
return KbDocsIdRelatedGet200ResponseToJSONTyped(json, false);
|
|
5100
|
+
}
|
|
5101
|
+
function KbDocsIdRelatedGet200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
5102
|
+
if (value == null) {
|
|
5103
|
+
return value;
|
|
5104
|
+
}
|
|
5105
|
+
return {
|
|
5106
|
+
"mode": value["mode"],
|
|
5107
|
+
"query": value["query"],
|
|
5108
|
+
"results": value["results"].map(KbDocsIdRelatedGet200ResponseResultsInnerToJSON)
|
|
5109
|
+
};
|
|
5110
|
+
}
|
|
5111
|
+
|
|
5112
|
+
// src/generated/models/KbDocsListResponse.ts
|
|
5113
|
+
function instanceOfKbDocsListResponse(value) {
|
|
5114
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
5115
|
+
if (!("next_cursor" in value) || value["next_cursor"] === void 0) return false;
|
|
5116
|
+
return true;
|
|
5117
|
+
}
|
|
5118
|
+
function KbDocsListResponseFromJSON(json) {
|
|
5119
|
+
return KbDocsListResponseFromJSONTyped(json, false);
|
|
5120
|
+
}
|
|
5121
|
+
function KbDocsListResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
5122
|
+
if (json == null) {
|
|
5123
|
+
return json;
|
|
5124
|
+
}
|
|
5125
|
+
return {
|
|
5126
|
+
"data": json["data"].map(KbDocsGet200ResponseDataInnerFromJSON),
|
|
5127
|
+
"next_cursor": json["next_cursor"]
|
|
5128
|
+
};
|
|
5129
|
+
}
|
|
5130
|
+
function KbDocsListResponseToJSON(json) {
|
|
5131
|
+
return KbDocsListResponseToJSONTyped(json, false);
|
|
5132
|
+
}
|
|
5133
|
+
function KbDocsListResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
5134
|
+
if (value == null) {
|
|
5135
|
+
return value;
|
|
5136
|
+
}
|
|
5137
|
+
return {
|
|
5138
|
+
"data": value["data"].map(KbDocsGet200ResponseDataInnerToJSON),
|
|
5139
|
+
"next_cursor": value["next_cursor"]
|
|
5140
|
+
};
|
|
5141
|
+
}
|
|
5142
|
+
|
|
5143
|
+
// src/generated/models/KbOwnerType.ts
|
|
5144
|
+
var KbOwnerType = {
|
|
5145
|
+
REPO: "repo",
|
|
5146
|
+
TEAM: "team",
|
|
5147
|
+
PROJECT: "project"
|
|
5148
|
+
};
|
|
5149
|
+
function instanceOfKbOwnerType(value) {
|
|
5150
|
+
for (const key in KbOwnerType) {
|
|
5151
|
+
if (Object.prototype.hasOwnProperty.call(KbOwnerType, key)) {
|
|
5152
|
+
if (KbOwnerType[key] === value) {
|
|
5153
|
+
return true;
|
|
5154
|
+
}
|
|
5155
|
+
}
|
|
5156
|
+
}
|
|
5157
|
+
return false;
|
|
5158
|
+
}
|
|
5159
|
+
function KbOwnerTypeFromJSON(json) {
|
|
5160
|
+
return KbOwnerTypeFromJSONTyped(json, false);
|
|
5161
|
+
}
|
|
5162
|
+
function KbOwnerTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
5163
|
+
return json;
|
|
5164
|
+
}
|
|
5165
|
+
function KbOwnerTypeToJSON(value) {
|
|
5166
|
+
return value;
|
|
5167
|
+
}
|
|
5168
|
+
function KbOwnerTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
5169
|
+
return value;
|
|
5170
|
+
}
|
|
5171
|
+
|
|
5172
|
+
// src/generated/models/KbProvenance.ts
|
|
5173
|
+
var KbProvenanceSourceTypeEnum = {
|
|
5174
|
+
GENERATED: "generated",
|
|
5175
|
+
HUMAN: "human"
|
|
5176
|
+
};
|
|
5177
|
+
var KbProvenanceRoutedByEnum = {
|
|
5178
|
+
CLASSIFIER: "classifier",
|
|
5179
|
+
SEMANTIC_FALLBACK: "semantic-fallback"
|
|
5180
|
+
};
|
|
5181
|
+
function instanceOfKbProvenance(value) {
|
|
5182
|
+
if (!("sourceType" in value) || value["sourceType"] === void 0) return false;
|
|
5183
|
+
if (!("sourceCommit" in value) || value["sourceCommit"] === void 0) return false;
|
|
5184
|
+
if (!("generatedAt" in value) || value["generatedAt"] === void 0) return false;
|
|
5185
|
+
if (!("humanEditedAt" in value) || value["humanEditedAt"] === void 0) return false;
|
|
5186
|
+
return true;
|
|
5187
|
+
}
|
|
5188
|
+
function KbProvenanceFromJSON(json) {
|
|
5189
|
+
return KbProvenanceFromJSONTyped(json, false);
|
|
5190
|
+
}
|
|
5191
|
+
function KbProvenanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
5192
|
+
if (json == null) {
|
|
5193
|
+
return json;
|
|
5194
|
+
}
|
|
5195
|
+
return {
|
|
5196
|
+
"sourceType": json["sourceType"],
|
|
5197
|
+
"sourceCommit": json["sourceCommit"],
|
|
5198
|
+
"generatedAt": json["generatedAt"],
|
|
5199
|
+
"humanEditedAt": json["humanEditedAt"],
|
|
5200
|
+
"ranks": json["ranks"] == null ? void 0 : KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksFromJSON(json["ranks"]),
|
|
5201
|
+
"hopDistance": json["hopDistance"] == null ? void 0 : json["hopDistance"],
|
|
5202
|
+
"relationTypes": json["relationTypes"] == null ? void 0 : json["relationTypes"],
|
|
5203
|
+
"overlapPaths": json["overlapPaths"] == null ? void 0 : json["overlapPaths"],
|
|
5204
|
+
"routedBy": json["routedBy"] == null ? void 0 : json["routedBy"],
|
|
5205
|
+
"confidence": json["confidence"] == null ? void 0 : json["confidence"]
|
|
5206
|
+
};
|
|
5207
|
+
}
|
|
5208
|
+
function KbProvenanceToJSON(json) {
|
|
5209
|
+
return KbProvenanceToJSONTyped(json, false);
|
|
5210
|
+
}
|
|
5211
|
+
function KbProvenanceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
5212
|
+
if (value == null) {
|
|
5213
|
+
return value;
|
|
5214
|
+
}
|
|
5215
|
+
return {
|
|
5216
|
+
"sourceType": value["sourceType"],
|
|
5217
|
+
"sourceCommit": value["sourceCommit"],
|
|
5218
|
+
"generatedAt": value["generatedAt"],
|
|
5219
|
+
"humanEditedAt": value["humanEditedAt"],
|
|
5220
|
+
"ranks": KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksToJSON(value["ranks"]),
|
|
5221
|
+
"hopDistance": value["hopDistance"],
|
|
5222
|
+
"relationTypes": value["relationTypes"],
|
|
5223
|
+
"overlapPaths": value["overlapPaths"],
|
|
5224
|
+
"routedBy": value["routedBy"],
|
|
5225
|
+
"confidence": value["confidence"]
|
|
5226
|
+
};
|
|
5227
|
+
}
|
|
5228
|
+
|
|
5229
|
+
// src/generated/models/KbSearchResponse.ts
|
|
5230
|
+
var KbSearchResponseModeEnum = {
|
|
5231
|
+
STRING: "string",
|
|
5232
|
+
SEMANTIC: "semantic",
|
|
5233
|
+
HYBRID: "hybrid",
|
|
5234
|
+
RELATED: "related",
|
|
5235
|
+
LOCATE: "locate"
|
|
5236
|
+
};
|
|
5237
|
+
function instanceOfKbSearchResponse(value) {
|
|
5238
|
+
if (!("mode" in value) || value["mode"] === void 0) return false;
|
|
5239
|
+
if (!("query" in value) || value["query"] === void 0) return false;
|
|
5240
|
+
if (!("results" in value) || value["results"] === void 0) return false;
|
|
5241
|
+
return true;
|
|
5242
|
+
}
|
|
5243
|
+
function KbSearchResponseFromJSON(json) {
|
|
5244
|
+
return KbSearchResponseFromJSONTyped(json, false);
|
|
5245
|
+
}
|
|
5246
|
+
function KbSearchResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
5247
|
+
if (json == null) {
|
|
5248
|
+
return json;
|
|
5249
|
+
}
|
|
5250
|
+
return {
|
|
5251
|
+
"mode": json["mode"],
|
|
5252
|
+
"query": json["query"],
|
|
5253
|
+
"results": json["results"].map(KbDocsIdRelatedGet200ResponseResultsInnerFromJSON)
|
|
5254
|
+
};
|
|
5255
|
+
}
|
|
5256
|
+
function KbSearchResponseToJSON(json) {
|
|
5257
|
+
return KbSearchResponseToJSONTyped(json, false);
|
|
5258
|
+
}
|
|
5259
|
+
function KbSearchResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
5260
|
+
if (value == null) {
|
|
5261
|
+
return value;
|
|
5262
|
+
}
|
|
5263
|
+
return {
|
|
5264
|
+
"mode": value["mode"],
|
|
5265
|
+
"query": value["query"],
|
|
5266
|
+
"results": value["results"].map(KbDocsIdRelatedGet200ResponseResultsInnerToJSON)
|
|
5267
|
+
};
|
|
5268
|
+
}
|
|
5269
|
+
|
|
5270
|
+
// src/generated/models/KbSearchResultDoc.ts
|
|
5271
|
+
var KbSearchResultDocKindEnum = {
|
|
5272
|
+
INDEX: "index",
|
|
5273
|
+
AREA: "area",
|
|
5274
|
+
PROCESS: "process",
|
|
5275
|
+
INCIDENT: "incident"
|
|
5276
|
+
};
|
|
5277
|
+
var KbSearchResultDocOwnerTypeEnum = {
|
|
5278
|
+
REPO: "repo",
|
|
5279
|
+
TEAM: "team",
|
|
5280
|
+
PROJECT: "project"
|
|
5281
|
+
};
|
|
5282
|
+
var KbSearchResultDocMatchTypeEnum = {
|
|
5283
|
+
FTS: "fts",
|
|
5284
|
+
TRIGRAM: "trigram",
|
|
5285
|
+
GRAPH: "graph",
|
|
5286
|
+
PATH_OVERLAP: "path_overlap"
|
|
5287
|
+
};
|
|
5288
|
+
function instanceOfKbSearchResultDoc(value) {
|
|
5289
|
+
if (!("docId" in value) || value["docId"] === void 0) return false;
|
|
5290
|
+
if (!("slug" in value) || value["slug"] === void 0) return false;
|
|
5291
|
+
if (!("title" in value) || value["title"] === void 0) return false;
|
|
5292
|
+
if (!("summary" in value) || value["summary"] === void 0) return false;
|
|
5293
|
+
if (!("kind" in value) || value["kind"] === void 0) return false;
|
|
5294
|
+
if (!("ownerType" in value) || value["ownerType"] === void 0) return false;
|
|
5295
|
+
if (!("ownerId" in value) || value["ownerId"] === void 0) return false;
|
|
5296
|
+
if (!("tags" in value) || value["tags"] === void 0) return false;
|
|
5297
|
+
if (!("pathsGoverned" in value) || value["pathsGoverned"] === void 0) return false;
|
|
5298
|
+
if (!("score" in value) || value["score"] === void 0) return false;
|
|
5299
|
+
if (!("provenance" in value) || value["provenance"] === void 0) return false;
|
|
5300
|
+
if (!("stale" in value) || value["stale"] === void 0) return false;
|
|
5301
|
+
if (!("confidence" in value) || value["confidence"] === void 0) return false;
|
|
5302
|
+
return true;
|
|
5303
|
+
}
|
|
5304
|
+
function KbSearchResultDocFromJSON(json) {
|
|
5305
|
+
return KbSearchResultDocFromJSONTyped(json, false);
|
|
5306
|
+
}
|
|
5307
|
+
function KbSearchResultDocFromJSONTyped(json, ignoreDiscriminator) {
|
|
5308
|
+
if (json == null) {
|
|
5309
|
+
return json;
|
|
5310
|
+
}
|
|
5311
|
+
return {
|
|
5312
|
+
"docId": json["docId"],
|
|
5313
|
+
"slug": json["slug"],
|
|
5314
|
+
"title": json["title"],
|
|
5315
|
+
"summary": json["summary"],
|
|
5316
|
+
"kind": json["kind"],
|
|
5317
|
+
"ownerType": json["ownerType"],
|
|
5318
|
+
"ownerId": json["ownerId"],
|
|
5319
|
+
"tags": json["tags"],
|
|
5320
|
+
"pathsGoverned": json["pathsGoverned"],
|
|
5321
|
+
"score": json["score"],
|
|
5322
|
+
"provenance": KbDocsIdRelatedGet200ResponseResultsInnerProvenanceFromJSON(json["provenance"]),
|
|
5323
|
+
"matchType": json["matchType"] == null ? void 0 : json["matchType"],
|
|
5324
|
+
"matchedChunks": json["matchedChunks"] == null ? void 0 : json["matchedChunks"].map(KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerFromJSON),
|
|
5325
|
+
"stale": json["stale"],
|
|
5326
|
+
"confidence": json["confidence"]
|
|
5327
|
+
};
|
|
5328
|
+
}
|
|
5329
|
+
function KbSearchResultDocToJSON(json) {
|
|
5330
|
+
return KbSearchResultDocToJSONTyped(json, false);
|
|
5331
|
+
}
|
|
5332
|
+
function KbSearchResultDocToJSONTyped(value, ignoreDiscriminator = false) {
|
|
5333
|
+
if (value == null) {
|
|
5334
|
+
return value;
|
|
5335
|
+
}
|
|
5336
|
+
return {
|
|
5337
|
+
"docId": value["docId"],
|
|
5338
|
+
"slug": value["slug"],
|
|
5339
|
+
"title": value["title"],
|
|
5340
|
+
"summary": value["summary"],
|
|
5341
|
+
"kind": value["kind"],
|
|
5342
|
+
"ownerType": value["ownerType"],
|
|
5343
|
+
"ownerId": value["ownerId"],
|
|
5344
|
+
"tags": value["tags"],
|
|
5345
|
+
"pathsGoverned": value["pathsGoverned"],
|
|
5346
|
+
"score": value["score"],
|
|
5347
|
+
"provenance": KbDocsIdRelatedGet200ResponseResultsInnerProvenanceToJSON(value["provenance"]),
|
|
5348
|
+
"matchType": value["matchType"],
|
|
5349
|
+
"matchedChunks": value["matchedChunks"] == null ? void 0 : value["matchedChunks"].map(KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerToJSON),
|
|
5350
|
+
"stale": value["stale"],
|
|
5351
|
+
"confidence": value["confidence"]
|
|
5352
|
+
};
|
|
5353
|
+
}
|
|
5354
|
+
|
|
5355
|
+
// src/generated/models/KbStaleness.ts
|
|
5356
|
+
function instanceOfKbStaleness(value) {
|
|
5357
|
+
if (!("stale" in value) || value["stale"] === void 0) return false;
|
|
5358
|
+
if (!("confidence" in value) || value["confidence"] === void 0) return false;
|
|
5359
|
+
if (!("reason" in value) || value["reason"] === void 0) return false;
|
|
5360
|
+
return true;
|
|
5361
|
+
}
|
|
5362
|
+
function KbStalenessFromJSON(json) {
|
|
5363
|
+
return KbStalenessFromJSONTyped(json, false);
|
|
5364
|
+
}
|
|
5365
|
+
function KbStalenessFromJSONTyped(json, ignoreDiscriminator) {
|
|
5366
|
+
if (json == null) {
|
|
5367
|
+
return json;
|
|
5368
|
+
}
|
|
5369
|
+
return {
|
|
5370
|
+
"stale": json["stale"],
|
|
5371
|
+
"confidence": json["confidence"],
|
|
5372
|
+
"reason": json["reason"]
|
|
5373
|
+
};
|
|
5374
|
+
}
|
|
5375
|
+
function KbStalenessToJSON(json) {
|
|
5376
|
+
return KbStalenessToJSONTyped(json, false);
|
|
5377
|
+
}
|
|
5378
|
+
function KbStalenessToJSONTyped(value, ignoreDiscriminator = false) {
|
|
5379
|
+
if (value == null) {
|
|
5380
|
+
return value;
|
|
5381
|
+
}
|
|
5382
|
+
return {
|
|
5383
|
+
"stale": value["stale"],
|
|
5384
|
+
"confidence": value["confidence"],
|
|
5385
|
+
"reason": value["reason"]
|
|
5386
|
+
};
|
|
5387
|
+
}
|
|
5388
|
+
|
|
4425
5389
|
// src/generated/models/Label.ts
|
|
4426
5390
|
function instanceOfLabel(value) {
|
|
4427
5391
|
if (!("id" in value) || value["id"] === void 0) return false;
|
|
@@ -6086,6 +7050,9 @@ var DefaultApi = class extends BaseAPI {
|
|
|
6086
7050
|
if (requestParameters["status"] != null) {
|
|
6087
7051
|
queryParameters["status"] = requestParameters["status"];
|
|
6088
7052
|
}
|
|
7053
|
+
if (requestParameters["priority"] != null) {
|
|
7054
|
+
queryParameters["priority"] = requestParameters["priority"];
|
|
7055
|
+
}
|
|
6089
7056
|
if (requestParameters["teamId"] != null) {
|
|
6090
7057
|
queryParameters["team_id"] = requestParameters["teamId"];
|
|
6091
7058
|
}
|
|
@@ -6755,6 +7722,231 @@ var DefaultApi = class extends BaseAPI {
|
|
|
6755
7722
|
const response = await this.issuesPostRaw(requestParameters, initOverrides);
|
|
6756
7723
|
return await response.value();
|
|
6757
7724
|
}
|
|
7725
|
+
/**
|
|
7726
|
+
* List knowledge-base docs (read-only): owner/kind/tag filters, keyset pagination via next_cursor. With q, pages flow through string search and are not paginated (cursor+q → 400). Staleness rides every row. ```bash curl -H \"Authorization: Bearer $ONUS_TOKEN\" \'https://onus.example/v1/kb/docs?kind=area&tag=auth&limit=50\' ``` ```bash onus kb list --kind area --tag auth ```
|
|
7727
|
+
* List knowledge-base docs
|
|
7728
|
+
*/
|
|
7729
|
+
async kbDocsGetRaw(requestParameters, initOverrides) {
|
|
7730
|
+
const queryParameters = {};
|
|
7731
|
+
if (requestParameters["ownerType"] != null) {
|
|
7732
|
+
queryParameters["owner_type"] = requestParameters["ownerType"];
|
|
7733
|
+
}
|
|
7734
|
+
if (requestParameters["ownerId"] != null) {
|
|
7735
|
+
queryParameters["owner_id"] = requestParameters["ownerId"];
|
|
7736
|
+
}
|
|
7737
|
+
if (requestParameters["kind"] != null) {
|
|
7738
|
+
queryParameters["kind"] = requestParameters["kind"];
|
|
7739
|
+
}
|
|
7740
|
+
if (requestParameters["tag"] != null) {
|
|
7741
|
+
queryParameters["tag"] = requestParameters["tag"];
|
|
7742
|
+
}
|
|
7743
|
+
if (requestParameters["slug"] != null) {
|
|
7744
|
+
queryParameters["slug"] = requestParameters["slug"];
|
|
7745
|
+
}
|
|
7746
|
+
if (requestParameters["q"] != null) {
|
|
7747
|
+
queryParameters["q"] = requestParameters["q"];
|
|
7748
|
+
}
|
|
7749
|
+
if (requestParameters["limit"] != null) {
|
|
7750
|
+
queryParameters["limit"] = requestParameters["limit"];
|
|
7751
|
+
}
|
|
7752
|
+
if (requestParameters["cursor"] != null) {
|
|
7753
|
+
queryParameters["cursor"] = requestParameters["cursor"];
|
|
7754
|
+
}
|
|
7755
|
+
const headerParameters = {};
|
|
7756
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
7757
|
+
const token = this.configuration.accessToken;
|
|
7758
|
+
const tokenString = await token("bearerAuth", []);
|
|
7759
|
+
if (tokenString) {
|
|
7760
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7761
|
+
}
|
|
7762
|
+
}
|
|
7763
|
+
const response = await this.request({
|
|
7764
|
+
path: `/kb/docs`,
|
|
7765
|
+
method: "GET",
|
|
7766
|
+
headers: headerParameters,
|
|
7767
|
+
query: queryParameters
|
|
7768
|
+
}, initOverrides);
|
|
7769
|
+
return new JSONApiResponse(response, (jsonValue) => KbDocsGet200ResponseFromJSON(jsonValue));
|
|
7770
|
+
}
|
|
7771
|
+
/**
|
|
7772
|
+
* List knowledge-base docs (read-only): owner/kind/tag filters, keyset pagination via next_cursor. With q, pages flow through string search and are not paginated (cursor+q → 400). Staleness rides every row. ```bash curl -H \"Authorization: Bearer $ONUS_TOKEN\" \'https://onus.example/v1/kb/docs?kind=area&tag=auth&limit=50\' ``` ```bash onus kb list --kind area --tag auth ```
|
|
7773
|
+
* List knowledge-base docs
|
|
7774
|
+
*/
|
|
7775
|
+
async kbDocsGet(requestParameters = {}, initOverrides) {
|
|
7776
|
+
const response = await this.kbDocsGetRaw(requestParameters, initOverrides);
|
|
7777
|
+
return await response.value();
|
|
7778
|
+
}
|
|
7779
|
+
/**
|
|
7780
|
+
* Full doc detail: markdown content, metadata, provenance timestamps and the staleness verdict. Read-only — docs regenerate on merge; there is no write surface. ```bash curl -H \"Authorization: Bearer $ONUS_TOKEN\" https://onus.example/v1/kb/docs/$DOC_ID ``` ```bash onus kb get $DOC_ID ```
|
|
7781
|
+
* Get a knowledge-base doc (content, metadata, staleness)
|
|
7782
|
+
*/
|
|
7783
|
+
async kbDocsIdGetRaw(requestParameters, initOverrides) {
|
|
7784
|
+
if (requestParameters["id"] == null) {
|
|
7785
|
+
throw new RequiredError(
|
|
7786
|
+
"id",
|
|
7787
|
+
'Required parameter "id" was null or undefined when calling kbDocsIdGet().'
|
|
7788
|
+
);
|
|
7789
|
+
}
|
|
7790
|
+
const queryParameters = {};
|
|
7791
|
+
const headerParameters = {};
|
|
7792
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
7793
|
+
const token = this.configuration.accessToken;
|
|
7794
|
+
const tokenString = await token("bearerAuth", []);
|
|
7795
|
+
if (tokenString) {
|
|
7796
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7797
|
+
}
|
|
7798
|
+
}
|
|
7799
|
+
const response = await this.request({
|
|
7800
|
+
path: `/kb/docs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
|
|
7801
|
+
method: "GET",
|
|
7802
|
+
headers: headerParameters,
|
|
7803
|
+
query: queryParameters
|
|
7804
|
+
}, initOverrides);
|
|
7805
|
+
return new JSONApiResponse(response, (jsonValue) => KbDocsIdGet200ResponseFromJSON(jsonValue));
|
|
7806
|
+
}
|
|
7807
|
+
/**
|
|
7808
|
+
* Full doc detail: markdown content, metadata, provenance timestamps and the staleness verdict. Read-only — docs regenerate on merge; there is no write surface. ```bash curl -H \"Authorization: Bearer $ONUS_TOKEN\" https://onus.example/v1/kb/docs/$DOC_ID ``` ```bash onus kb get $DOC_ID ```
|
|
7809
|
+
* Get a knowledge-base doc (content, metadata, staleness)
|
|
7810
|
+
*/
|
|
7811
|
+
async kbDocsIdGet(requestParameters, initOverrides) {
|
|
7812
|
+
const response = await this.kbDocsIdGetRaw(requestParameters, initOverrides);
|
|
7813
|
+
return await response.value();
|
|
7814
|
+
}
|
|
7815
|
+
/**
|
|
7816
|
+
* Expand related docs from a seed doc: kb_doc_links traversal (depth ≤ 3, cycle-safe) plus paths_governed overlap. An invisible/unknown seed yields an empty result. ```bash curl -H \"Authorization: Bearer $ONUS_TOKEN\" \'https://onus.example/v1/kb/docs/$DOC_ID/related?depth=3\' ``` ```bash onus kb related $DOC_ID ```
|
|
7817
|
+
* Expand related docs from a seed doc
|
|
7818
|
+
*/
|
|
7819
|
+
async kbDocsIdRelatedGetRaw(requestParameters, initOverrides) {
|
|
7820
|
+
if (requestParameters["id"] == null) {
|
|
7821
|
+
throw new RequiredError(
|
|
7822
|
+
"id",
|
|
7823
|
+
'Required parameter "id" was null or undefined when calling kbDocsIdRelatedGet().'
|
|
7824
|
+
);
|
|
7825
|
+
}
|
|
7826
|
+
const queryParameters = {};
|
|
7827
|
+
if (requestParameters["depth"] != null) {
|
|
7828
|
+
queryParameters["depth"] = requestParameters["depth"];
|
|
7829
|
+
}
|
|
7830
|
+
const headerParameters = {};
|
|
7831
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
7832
|
+
const token = this.configuration.accessToken;
|
|
7833
|
+
const tokenString = await token("bearerAuth", []);
|
|
7834
|
+
if (tokenString) {
|
|
7835
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7836
|
+
}
|
|
7837
|
+
}
|
|
7838
|
+
const response = await this.request({
|
|
7839
|
+
path: `/kb/docs/{id}/related`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
|
|
7840
|
+
method: "GET",
|
|
7841
|
+
headers: headerParameters,
|
|
7842
|
+
query: queryParameters
|
|
7843
|
+
}, initOverrides);
|
|
7844
|
+
return new JSONApiResponse(response, (jsonValue) => KbDocsIdRelatedGet200ResponseFromJSON(jsonValue));
|
|
7845
|
+
}
|
|
7846
|
+
/**
|
|
7847
|
+
* Expand related docs from a seed doc: kb_doc_links traversal (depth ≤ 3, cycle-safe) plus paths_governed overlap. An invisible/unknown seed yields an empty result. ```bash curl -H \"Authorization: Bearer $ONUS_TOKEN\" \'https://onus.example/v1/kb/docs/$DOC_ID/related?depth=3\' ``` ```bash onus kb related $DOC_ID ```
|
|
7848
|
+
* Expand related docs from a seed doc
|
|
7849
|
+
*/
|
|
7850
|
+
async kbDocsIdRelatedGet(requestParameters, initOverrides) {
|
|
7851
|
+
const response = await this.kbDocsIdRelatedGetRaw(requestParameters, initOverrides);
|
|
7852
|
+
return await response.value();
|
|
7853
|
+
}
|
|
7854
|
+
/**
|
|
7855
|
+
* Agent routing: classify an issue (or raw query) into relevant docs with calibrated confidence; low confidence falls back to semantic search. Accepts exactly one of issue / q. Locate first, then read the returned docs. ```bash curl -H \"Authorization: Bearer $ONUS_TOKEN\" \'https://onus.example/v1/kb/locate?issue=$ISSUE_ID\' ``` ```bash onus kb locate --issue $ISSUE_ID ```
|
|
7856
|
+
* Locate docs for an issue or query (agent routing)
|
|
7857
|
+
*/
|
|
7858
|
+
async kbLocateGetRaw(requestParameters, initOverrides) {
|
|
7859
|
+
const queryParameters = {};
|
|
7860
|
+
if (requestParameters["issue"] != null) {
|
|
7861
|
+
queryParameters["issue"] = requestParameters["issue"];
|
|
7862
|
+
}
|
|
7863
|
+
if (requestParameters["q"] != null) {
|
|
7864
|
+
queryParameters["q"] = requestParameters["q"];
|
|
7865
|
+
}
|
|
7866
|
+
const headerParameters = {};
|
|
7867
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
7868
|
+
const token = this.configuration.accessToken;
|
|
7869
|
+
const tokenString = await token("bearerAuth", []);
|
|
7870
|
+
if (tokenString) {
|
|
7871
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7872
|
+
}
|
|
7873
|
+
}
|
|
7874
|
+
const response = await this.request({
|
|
7875
|
+
path: `/kb/locate`,
|
|
7876
|
+
method: "GET",
|
|
7877
|
+
headers: headerParameters,
|
|
7878
|
+
query: queryParameters
|
|
7879
|
+
}, initOverrides);
|
|
7880
|
+
return new JSONApiResponse(response, (jsonValue) => KbDocsIdRelatedGet200ResponseFromJSON(jsonValue));
|
|
7881
|
+
}
|
|
7882
|
+
/**
|
|
7883
|
+
* Agent routing: classify an issue (or raw query) into relevant docs with calibrated confidence; low confidence falls back to semantic search. Accepts exactly one of issue / q. Locate first, then read the returned docs. ```bash curl -H \"Authorization: Bearer $ONUS_TOKEN\" \'https://onus.example/v1/kb/locate?issue=$ISSUE_ID\' ``` ```bash onus kb locate --issue $ISSUE_ID ```
|
|
7884
|
+
* Locate docs for an issue or query (agent routing)
|
|
7885
|
+
*/
|
|
7886
|
+
async kbLocateGet(requestParameters = {}, initOverrides) {
|
|
7887
|
+
const response = await this.kbLocateGetRaw(requestParameters, initOverrides);
|
|
7888
|
+
return await response.value();
|
|
7889
|
+
}
|
|
7890
|
+
/**
|
|
7891
|
+
* Search docs across modes: string (default), semantic, hybrid, related. mode=related requires doc_id (seed doc). Returns scored results with snippets, match provenance and staleness. ```bash curl -H \"Authorization: Bearer $ONUS_TOKEN\" \'https://onus.example/v1/kb/search?q=auth+flow&mode=hybrid&limit=10\' ``` ```bash onus kb search \"auth flow\" --mode hybrid ```
|
|
7892
|
+
* Search knowledge-base docs (scored results + snippets)
|
|
7893
|
+
*/
|
|
7894
|
+
async kbSearchGetRaw(requestParameters, initOverrides) {
|
|
7895
|
+
if (requestParameters["q"] == null) {
|
|
7896
|
+
throw new RequiredError(
|
|
7897
|
+
"q",
|
|
7898
|
+
'Required parameter "q" was null or undefined when calling kbSearchGet().'
|
|
7899
|
+
);
|
|
7900
|
+
}
|
|
7901
|
+
const queryParameters = {};
|
|
7902
|
+
if (requestParameters["q"] != null) {
|
|
7903
|
+
queryParameters["q"] = requestParameters["q"];
|
|
7904
|
+
}
|
|
7905
|
+
if (requestParameters["mode"] != null) {
|
|
7906
|
+
queryParameters["mode"] = requestParameters["mode"];
|
|
7907
|
+
}
|
|
7908
|
+
if (requestParameters["docId"] != null) {
|
|
7909
|
+
queryParameters["doc_id"] = requestParameters["docId"];
|
|
7910
|
+
}
|
|
7911
|
+
if (requestParameters["ownerType"] != null) {
|
|
7912
|
+
queryParameters["owner_type"] = requestParameters["ownerType"];
|
|
7913
|
+
}
|
|
7914
|
+
if (requestParameters["ownerId"] != null) {
|
|
7915
|
+
queryParameters["owner_id"] = requestParameters["ownerId"];
|
|
7916
|
+
}
|
|
7917
|
+
if (requestParameters["kind"] != null) {
|
|
7918
|
+
queryParameters["kind"] = requestParameters["kind"];
|
|
7919
|
+
}
|
|
7920
|
+
if (requestParameters["tag"] != null) {
|
|
7921
|
+
queryParameters["tag"] = requestParameters["tag"];
|
|
7922
|
+
}
|
|
7923
|
+
if (requestParameters["limit"] != null) {
|
|
7924
|
+
queryParameters["limit"] = requestParameters["limit"];
|
|
7925
|
+
}
|
|
7926
|
+
const headerParameters = {};
|
|
7927
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
7928
|
+
const token = this.configuration.accessToken;
|
|
7929
|
+
const tokenString = await token("bearerAuth", []);
|
|
7930
|
+
if (tokenString) {
|
|
7931
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7932
|
+
}
|
|
7933
|
+
}
|
|
7934
|
+
const response = await this.request({
|
|
7935
|
+
path: `/kb/search`,
|
|
7936
|
+
method: "GET",
|
|
7937
|
+
headers: headerParameters,
|
|
7938
|
+
query: queryParameters
|
|
7939
|
+
}, initOverrides);
|
|
7940
|
+
return new JSONApiResponse(response, (jsonValue) => KbDocsIdRelatedGet200ResponseFromJSON(jsonValue));
|
|
7941
|
+
}
|
|
7942
|
+
/**
|
|
7943
|
+
* Search docs across modes: string (default), semantic, hybrid, related. mode=related requires doc_id (seed doc). Returns scored results with snippets, match provenance and staleness. ```bash curl -H \"Authorization: Bearer $ONUS_TOKEN\" \'https://onus.example/v1/kb/search?q=auth+flow&mode=hybrid&limit=10\' ``` ```bash onus kb search \"auth flow\" --mode hybrid ```
|
|
7944
|
+
* Search knowledge-base docs (scored results + snippets)
|
|
7945
|
+
*/
|
|
7946
|
+
async kbSearchGet(requestParameters, initOverrides) {
|
|
7947
|
+
const response = await this.kbSearchGetRaw(requestParameters, initOverrides);
|
|
7948
|
+
return await response.value();
|
|
7949
|
+
}
|
|
6758
7950
|
/**
|
|
6759
7951
|
* List labels across visible teams. ```bash curl -H \"Authorization: Bearer $ONUS_TOKEN\" https://onus.example/v1/labels ``` ```bash onus label list ```
|
|
6760
7952
|
* List labels
|
|
@@ -7324,6 +8516,41 @@ var DefaultApi = class extends BaseAPI {
|
|
|
7324
8516
|
return await response.value();
|
|
7325
8517
|
}
|
|
7326
8518
|
};
|
|
8519
|
+
var IssuesGetPriorityEnum = {
|
|
8520
|
+
NONE: "none",
|
|
8521
|
+
URGENT: "urgent",
|
|
8522
|
+
HIGH: "high",
|
|
8523
|
+
MEDIUM: "medium",
|
|
8524
|
+
LOW: "low"
|
|
8525
|
+
};
|
|
8526
|
+
var KbDocsGetOwnerTypeEnum = {
|
|
8527
|
+
REPO: "repo",
|
|
8528
|
+
TEAM: "team",
|
|
8529
|
+
PROJECT: "project"
|
|
8530
|
+
};
|
|
8531
|
+
var KbDocsGetKindEnum = {
|
|
8532
|
+
INDEX: "index",
|
|
8533
|
+
AREA: "area",
|
|
8534
|
+
PROCESS: "process",
|
|
8535
|
+
INCIDENT: "incident"
|
|
8536
|
+
};
|
|
8537
|
+
var KbSearchGetModeEnum = {
|
|
8538
|
+
STRING: "string",
|
|
8539
|
+
SEMANTIC: "semantic",
|
|
8540
|
+
HYBRID: "hybrid",
|
|
8541
|
+
RELATED: "related"
|
|
8542
|
+
};
|
|
8543
|
+
var KbSearchGetOwnerTypeEnum = {
|
|
8544
|
+
REPO: "repo",
|
|
8545
|
+
TEAM: "team",
|
|
8546
|
+
PROJECT: "project"
|
|
8547
|
+
};
|
|
8548
|
+
var KbSearchGetKindEnum = {
|
|
8549
|
+
INDEX: "index",
|
|
8550
|
+
AREA: "area",
|
|
8551
|
+
PROCESS: "process",
|
|
8552
|
+
INCIDENT: "incident"
|
|
8553
|
+
};
|
|
7327
8554
|
|
|
7328
8555
|
// src/config.ts
|
|
7329
8556
|
import fs from "fs";
|
|
@@ -7951,6 +9178,7 @@ export {
|
|
|
7951
9178
|
IssuesGet200ResponseFromJSONTyped,
|
|
7952
9179
|
IssuesGet200ResponseToJSON,
|
|
7953
9180
|
IssuesGet200ResponseToJSONTyped,
|
|
9181
|
+
IssuesGetPriorityEnum,
|
|
7954
9182
|
IssuesIdAttachmentsPost200ResponseFromJSON,
|
|
7955
9183
|
IssuesIdAttachmentsPost200ResponseFromJSONTyped,
|
|
7956
9184
|
IssuesIdAttachmentsPost200ResponseToJSON,
|
|
@@ -8026,6 +9254,109 @@ export {
|
|
|
8026
9254
|
IssuesPostRequestToJSON,
|
|
8027
9255
|
IssuesPostRequestToJSONTyped,
|
|
8028
9256
|
JSONApiResponse,
|
|
9257
|
+
KbDocDetailFromJSON,
|
|
9258
|
+
KbDocDetailFromJSONTyped,
|
|
9259
|
+
KbDocDetailKindEnum,
|
|
9260
|
+
KbDocDetailOwnerTypeEnum,
|
|
9261
|
+
KbDocDetailSourceTypeEnum,
|
|
9262
|
+
KbDocDetailToJSON,
|
|
9263
|
+
KbDocDetailToJSONTyped,
|
|
9264
|
+
KbDocKind,
|
|
9265
|
+
KbDocKindFromJSON,
|
|
9266
|
+
KbDocKindFromJSONTyped,
|
|
9267
|
+
KbDocKindToJSON,
|
|
9268
|
+
KbDocKindToJSONTyped,
|
|
9269
|
+
KbDocListItemFromJSON,
|
|
9270
|
+
KbDocListItemFromJSONTyped,
|
|
9271
|
+
KbDocListItemKindEnum,
|
|
9272
|
+
KbDocListItemOwnerTypeEnum,
|
|
9273
|
+
KbDocListItemSourceTypeEnum,
|
|
9274
|
+
KbDocListItemToJSON,
|
|
9275
|
+
KbDocListItemToJSONTyped,
|
|
9276
|
+
KbDocsGet200ResponseDataInnerFromJSON,
|
|
9277
|
+
KbDocsGet200ResponseDataInnerFromJSONTyped,
|
|
9278
|
+
KbDocsGet200ResponseDataInnerKindEnum,
|
|
9279
|
+
KbDocsGet200ResponseDataInnerOwnerTypeEnum,
|
|
9280
|
+
KbDocsGet200ResponseDataInnerSourceTypeEnum,
|
|
9281
|
+
KbDocsGet200ResponseDataInnerStalenessFromJSON,
|
|
9282
|
+
KbDocsGet200ResponseDataInnerStalenessFromJSONTyped,
|
|
9283
|
+
KbDocsGet200ResponseDataInnerStalenessToJSON,
|
|
9284
|
+
KbDocsGet200ResponseDataInnerStalenessToJSONTyped,
|
|
9285
|
+
KbDocsGet200ResponseDataInnerToJSON,
|
|
9286
|
+
KbDocsGet200ResponseDataInnerToJSONTyped,
|
|
9287
|
+
KbDocsGet200ResponseFromJSON,
|
|
9288
|
+
KbDocsGet200ResponseFromJSONTyped,
|
|
9289
|
+
KbDocsGet200ResponseToJSON,
|
|
9290
|
+
KbDocsGet200ResponseToJSONTyped,
|
|
9291
|
+
KbDocsGetKindEnum,
|
|
9292
|
+
KbDocsGetOwnerTypeEnum,
|
|
9293
|
+
KbDocsIdGet200ResponseFromJSON,
|
|
9294
|
+
KbDocsIdGet200ResponseFromJSONTyped,
|
|
9295
|
+
KbDocsIdGet200ResponseKindEnum,
|
|
9296
|
+
KbDocsIdGet200ResponseOwnerTypeEnum,
|
|
9297
|
+
KbDocsIdGet200ResponseSourceTypeEnum,
|
|
9298
|
+
KbDocsIdGet200ResponseToJSON,
|
|
9299
|
+
KbDocsIdGet200ResponseToJSONTyped,
|
|
9300
|
+
KbDocsIdRelatedGet200ResponseFromJSON,
|
|
9301
|
+
KbDocsIdRelatedGet200ResponseFromJSONTyped,
|
|
9302
|
+
KbDocsIdRelatedGet200ResponseModeEnum,
|
|
9303
|
+
KbDocsIdRelatedGet200ResponseResultsInnerFromJSON,
|
|
9304
|
+
KbDocsIdRelatedGet200ResponseResultsInnerFromJSONTyped,
|
|
9305
|
+
KbDocsIdRelatedGet200ResponseResultsInnerKindEnum,
|
|
9306
|
+
KbDocsIdRelatedGet200ResponseResultsInnerMatchTypeEnum,
|
|
9307
|
+
KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerFromJSON,
|
|
9308
|
+
KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerFromJSONTyped,
|
|
9309
|
+
KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerToJSON,
|
|
9310
|
+
KbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInnerToJSONTyped,
|
|
9311
|
+
KbDocsIdRelatedGet200ResponseResultsInnerOwnerTypeEnum,
|
|
9312
|
+
KbDocsIdRelatedGet200ResponseResultsInnerProvenanceFromJSON,
|
|
9313
|
+
KbDocsIdRelatedGet200ResponseResultsInnerProvenanceFromJSONTyped,
|
|
9314
|
+
KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksFromJSON,
|
|
9315
|
+
KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksFromJSONTyped,
|
|
9316
|
+
KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksToJSON,
|
|
9317
|
+
KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanksToJSONTyped,
|
|
9318
|
+
KbDocsIdRelatedGet200ResponseResultsInnerProvenanceRoutedByEnum,
|
|
9319
|
+
KbDocsIdRelatedGet200ResponseResultsInnerProvenanceSourceTypeEnum,
|
|
9320
|
+
KbDocsIdRelatedGet200ResponseResultsInnerProvenanceToJSON,
|
|
9321
|
+
KbDocsIdRelatedGet200ResponseResultsInnerProvenanceToJSONTyped,
|
|
9322
|
+
KbDocsIdRelatedGet200ResponseResultsInnerToJSON,
|
|
9323
|
+
KbDocsIdRelatedGet200ResponseResultsInnerToJSONTyped,
|
|
9324
|
+
KbDocsIdRelatedGet200ResponseToJSON,
|
|
9325
|
+
KbDocsIdRelatedGet200ResponseToJSONTyped,
|
|
9326
|
+
KbDocsListResponseFromJSON,
|
|
9327
|
+
KbDocsListResponseFromJSONTyped,
|
|
9328
|
+
KbDocsListResponseToJSON,
|
|
9329
|
+
KbDocsListResponseToJSONTyped,
|
|
9330
|
+
KbOwnerType,
|
|
9331
|
+
KbOwnerTypeFromJSON,
|
|
9332
|
+
KbOwnerTypeFromJSONTyped,
|
|
9333
|
+
KbOwnerTypeToJSON,
|
|
9334
|
+
KbOwnerTypeToJSONTyped,
|
|
9335
|
+
KbProvenanceFromJSON,
|
|
9336
|
+
KbProvenanceFromJSONTyped,
|
|
9337
|
+
KbProvenanceRoutedByEnum,
|
|
9338
|
+
KbProvenanceSourceTypeEnum,
|
|
9339
|
+
KbProvenanceToJSON,
|
|
9340
|
+
KbProvenanceToJSONTyped,
|
|
9341
|
+
KbSearchGetKindEnum,
|
|
9342
|
+
KbSearchGetModeEnum,
|
|
9343
|
+
KbSearchGetOwnerTypeEnum,
|
|
9344
|
+
KbSearchResponseFromJSON,
|
|
9345
|
+
KbSearchResponseFromJSONTyped,
|
|
9346
|
+
KbSearchResponseModeEnum,
|
|
9347
|
+
KbSearchResponseToJSON,
|
|
9348
|
+
KbSearchResponseToJSONTyped,
|
|
9349
|
+
KbSearchResultDocFromJSON,
|
|
9350
|
+
KbSearchResultDocFromJSONTyped,
|
|
9351
|
+
KbSearchResultDocKindEnum,
|
|
9352
|
+
KbSearchResultDocMatchTypeEnum,
|
|
9353
|
+
KbSearchResultDocOwnerTypeEnum,
|
|
9354
|
+
KbSearchResultDocToJSON,
|
|
9355
|
+
KbSearchResultDocToJSONTyped,
|
|
9356
|
+
KbStalenessFromJSON,
|
|
9357
|
+
KbStalenessFromJSONTyped,
|
|
9358
|
+
KbStalenessToJSON,
|
|
9359
|
+
KbStalenessToJSONTyped,
|
|
8029
9360
|
LabelCreateFromJSON,
|
|
8030
9361
|
LabelCreateFromJSONTyped,
|
|
8031
9362
|
LabelCreateToJSON,
|
|
@@ -8264,6 +9595,24 @@ export {
|
|
|
8264
9595
|
instanceOfIssuesPost200ResponsePullRequestsInner,
|
|
8265
9596
|
instanceOfIssuesPost200ResponseRelationsInner,
|
|
8266
9597
|
instanceOfIssuesPostRequest,
|
|
9598
|
+
instanceOfKbDocDetail,
|
|
9599
|
+
instanceOfKbDocKind,
|
|
9600
|
+
instanceOfKbDocListItem,
|
|
9601
|
+
instanceOfKbDocsGet200Response,
|
|
9602
|
+
instanceOfKbDocsGet200ResponseDataInner,
|
|
9603
|
+
instanceOfKbDocsGet200ResponseDataInnerStaleness,
|
|
9604
|
+
instanceOfKbDocsIdGet200Response,
|
|
9605
|
+
instanceOfKbDocsIdRelatedGet200Response,
|
|
9606
|
+
instanceOfKbDocsIdRelatedGet200ResponseResultsInner,
|
|
9607
|
+
instanceOfKbDocsIdRelatedGet200ResponseResultsInnerMatchedChunksInner,
|
|
9608
|
+
instanceOfKbDocsIdRelatedGet200ResponseResultsInnerProvenance,
|
|
9609
|
+
instanceOfKbDocsIdRelatedGet200ResponseResultsInnerProvenanceRanks,
|
|
9610
|
+
instanceOfKbDocsListResponse,
|
|
9611
|
+
instanceOfKbOwnerType,
|
|
9612
|
+
instanceOfKbProvenance,
|
|
9613
|
+
instanceOfKbSearchResponse,
|
|
9614
|
+
instanceOfKbSearchResultDoc,
|
|
9615
|
+
instanceOfKbStaleness,
|
|
8267
9616
|
instanceOfLabel,
|
|
8268
9617
|
instanceOfLabelCreate,
|
|
8269
9618
|
instanceOfLabelsPostRequest,
|