@miradorlabs/web-grpc 3.19.0 → 3.20.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/package.json +1 -1
- package/proto/gateway/web/v1/admin_gateway.ts +949 -98
- package/proto/gateway/web/v1/admin_gateway_grpc_pb.js +138 -0
- package/proto/gateway/web/v1/admin_gateway_pb.js +1728 -0
- package/proto/gateway/web/v1/reference_gateway.ts +1993 -82
- package/proto/gateway/web/v1/reference_gateway_grpc_pb.js +145 -0
- package/proto/gateway/web/v1/reference_gateway_pb.js +3777 -43
|
@@ -10,7 +10,7 @@ import type { Metadata } from "@grpc/grpc-js";
|
|
|
10
10
|
import { Timestamp } from "../../../../google/protobuf/timestamp";
|
|
11
11
|
import { ResponseStatus } from "../../common/v1/status";
|
|
12
12
|
import { InviteCodeState, inviteCodeStateFromJSON, inviteCodeStateToJSON } from "./beta_gateway";
|
|
13
|
-
import { AIReferenceName } from "./reference_gateway";
|
|
13
|
+
import { AIReferenceGroupFilter, AIReferenceName } from "./reference_gateway";
|
|
14
14
|
|
|
15
15
|
export const protobufPackage = "gateway.web.v1";
|
|
16
16
|
|
|
@@ -98,6 +98,78 @@ export interface UpdateAIBillerResponse {
|
|
|
98
98
|
biller: AIReferenceName | undefined;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
export interface ConfirmAIProvidersRequest {
|
|
102
|
+
/** As on ListAIProviderGroups: the caller's organizations of this product; any other id fails the request. */
|
|
103
|
+
organizationIds: string[];
|
|
104
|
+
/**
|
|
105
|
+
* The groups to confirm, as the list filters them; unset confirms every unreviewed name in the table. The list's
|
|
106
|
+
* counts.unreviewed_name_count under the same filter previews the count.
|
|
107
|
+
*/
|
|
108
|
+
filter: AIReferenceGroupFilter | undefined;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface ConfirmAIProvidersResponse {
|
|
112
|
+
status:
|
|
113
|
+
| ResponseStatus
|
|
114
|
+
| undefined;
|
|
115
|
+
/** The names written; 0 when the filter kept nothing to confirm. */
|
|
116
|
+
confirmedNameCount: number;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface ConfirmAIModelsRequest {
|
|
120
|
+
/** As on ListAIModelGroups: the caller's organizations of this product; any other id fails the request. */
|
|
121
|
+
organizationIds: string[];
|
|
122
|
+
/**
|
|
123
|
+
* The groups to confirm, as the list filters them; unset confirms every unreviewed name in the table. The list's
|
|
124
|
+
* counts.unreviewed_name_count under the same filter previews the count.
|
|
125
|
+
*/
|
|
126
|
+
filter: AIReferenceGroupFilter | undefined;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface ConfirmAIModelsResponse {
|
|
130
|
+
status:
|
|
131
|
+
| ResponseStatus
|
|
132
|
+
| undefined;
|
|
133
|
+
/** The names written; 0 when the filter kept nothing to confirm. */
|
|
134
|
+
confirmedNameCount: number;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface ConfirmAIEffortsRequest {
|
|
138
|
+
/** As on ListAIEffortGroups: the caller's organizations of this product; any other id fails the request. */
|
|
139
|
+
organizationIds: string[];
|
|
140
|
+
/**
|
|
141
|
+
* The groups to confirm, as the list filters them; unset confirms every unreviewed name in the table. The list's
|
|
142
|
+
* counts.unreviewed_name_count under the same filter previews the count.
|
|
143
|
+
*/
|
|
144
|
+
filter: AIReferenceGroupFilter | undefined;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface ConfirmAIEffortsResponse {
|
|
148
|
+
status:
|
|
149
|
+
| ResponseStatus
|
|
150
|
+
| undefined;
|
|
151
|
+
/** The names written; 0 when the filter kept nothing to confirm. */
|
|
152
|
+
confirmedNameCount: number;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface ConfirmAIBillersRequest {
|
|
156
|
+
/** As on ListAIBillerGroups: the caller's organizations of this product; any other id fails the request. */
|
|
157
|
+
organizationIds: string[];
|
|
158
|
+
/**
|
|
159
|
+
* The groups to confirm, as the list filters them; unset confirms every unreviewed name in the table. The list's
|
|
160
|
+
* counts.unreviewed_name_count under the same filter previews the count.
|
|
161
|
+
*/
|
|
162
|
+
filter: AIReferenceGroupFilter | undefined;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface ConfirmAIBillersResponse {
|
|
166
|
+
status:
|
|
167
|
+
| ResponseStatus
|
|
168
|
+
| undefined;
|
|
169
|
+
/** The names written; 0 when the filter kept nothing to confirm. */
|
|
170
|
+
confirmedNameCount: number;
|
|
171
|
+
}
|
|
172
|
+
|
|
101
173
|
function createBaseGetAdminStatusRequest(): GetAdminStatusRequest {
|
|
102
174
|
return {};
|
|
103
175
|
}
|
|
@@ -1507,121 +1579,900 @@ export const UpdateAIBillerResponse: MessageFns<UpdateAIBillerResponse> = {
|
|
|
1507
1579
|
},
|
|
1508
1580
|
};
|
|
1509
1581
|
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
* Mirador staff (a verified mirador.org primary email) may use. The gateway's admin gate admits every RPC
|
|
1513
|
-
* here except GetAdminStatus, which tells the frontend whether to show the admin tools at all.
|
|
1514
|
-
*/
|
|
1515
|
-
export interface AdminGatewayService {
|
|
1516
|
-
/** GetAdminStatus reports whether the authenticated caller may use the admin tools. */
|
|
1517
|
-
GetAdminStatus(request: GetAdminStatusRequest, metadata?: Metadata): Promise<GetAdminStatusResponse>;
|
|
1518
|
-
/** Beta invite codes for this gateway's product. */
|
|
1519
|
-
GenerateInviteCodes(request: GenerateInviteCodesRequest, metadata?: Metadata): Promise<GenerateInviteCodesResponse>;
|
|
1520
|
-
ListInviteCodes(request: ListInviteCodesRequest, metadata?: Metadata): Promise<ListInviteCodesResponse>;
|
|
1521
|
-
/**
|
|
1522
|
-
* Staff set a global AI name's display name for every organization. An update makes the name MANUAL; the
|
|
1523
|
-
* model processor never overwrites it. The tables are read through ReferenceGatewayService.
|
|
1524
|
-
*/
|
|
1525
|
-
UpdateAIProvider(request: UpdateAIProviderRequest, metadata?: Metadata): Promise<UpdateAIProviderResponse>;
|
|
1526
|
-
UpdateAIModel(request: UpdateAIModelRequest, metadata?: Metadata): Promise<UpdateAIModelResponse>;
|
|
1527
|
-
UpdateAIEffort(request: UpdateAIEffortRequest, metadata?: Metadata): Promise<UpdateAIEffortResponse>;
|
|
1528
|
-
UpdateAIBiller(request: UpdateAIBillerRequest, metadata?: Metadata): Promise<UpdateAIBillerResponse>;
|
|
1582
|
+
function createBaseConfirmAIProvidersRequest(): ConfirmAIProvidersRequest {
|
|
1583
|
+
return { organizationIds: [], filter: undefined };
|
|
1529
1584
|
}
|
|
1530
1585
|
|
|
1531
|
-
export const
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
this.UpdateAIProvider = this.UpdateAIProvider.bind(this);
|
|
1542
|
-
this.UpdateAIModel = this.UpdateAIModel.bind(this);
|
|
1543
|
-
this.UpdateAIEffort = this.UpdateAIEffort.bind(this);
|
|
1544
|
-
this.UpdateAIBiller = this.UpdateAIBiller.bind(this);
|
|
1545
|
-
}
|
|
1546
|
-
GetAdminStatus(request: GetAdminStatusRequest, metadata?: Metadata): Promise<GetAdminStatusResponse> {
|
|
1547
|
-
const data = GetAdminStatusRequest.encode(request).finish();
|
|
1548
|
-
const promise = this.rpc.request(this.service, "GetAdminStatus", data, metadata);
|
|
1549
|
-
return promise.then((data) => GetAdminStatusResponse.decode(new BinaryReader(data)));
|
|
1550
|
-
}
|
|
1586
|
+
export const ConfirmAIProvidersRequest: MessageFns<ConfirmAIProvidersRequest> = {
|
|
1587
|
+
encode(message: ConfirmAIProvidersRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1588
|
+
for (const v of message.organizationIds) {
|
|
1589
|
+
writer.uint32(10).string(v!);
|
|
1590
|
+
}
|
|
1591
|
+
if (message.filter !== undefined) {
|
|
1592
|
+
AIReferenceGroupFilter.encode(message.filter, writer.uint32(18).fork()).join();
|
|
1593
|
+
}
|
|
1594
|
+
return writer;
|
|
1595
|
+
},
|
|
1551
1596
|
|
|
1552
|
-
|
|
1553
|
-
const
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1556
|
-
|
|
1597
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ConfirmAIProvidersRequest {
|
|
1598
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1599
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1600
|
+
if (previousRecursionDepth >= 100) {
|
|
1601
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1602
|
+
}
|
|
1603
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1604
|
+
try {
|
|
1605
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1606
|
+
const message = createBaseConfirmAIProvidersRequest();
|
|
1607
|
+
while (reader.pos < end) {
|
|
1608
|
+
const tag = reader.uint32();
|
|
1609
|
+
switch (tag >>> 3) {
|
|
1610
|
+
case 1: {
|
|
1611
|
+
if (tag !== 10) {
|
|
1612
|
+
break;
|
|
1613
|
+
}
|
|
1557
1614
|
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1615
|
+
message.organizationIds.push(reader.string());
|
|
1616
|
+
continue;
|
|
1617
|
+
}
|
|
1618
|
+
case 2: {
|
|
1619
|
+
if (tag !== 18) {
|
|
1620
|
+
break;
|
|
1621
|
+
}
|
|
1563
1622
|
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1623
|
+
message.filter = AIReferenceGroupFilter.decode(reader, reader.uint32());
|
|
1624
|
+
continue;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1628
|
+
break;
|
|
1629
|
+
}
|
|
1630
|
+
reader.skip(tag & 7);
|
|
1631
|
+
}
|
|
1632
|
+
return message;
|
|
1633
|
+
} finally {
|
|
1634
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1635
|
+
}
|
|
1636
|
+
},
|
|
1569
1637
|
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1638
|
+
fromJSON(object: any): ConfirmAIProvidersRequest {
|
|
1639
|
+
return {
|
|
1640
|
+
organizationIds: globalThis.Array.isArray(object?.organizationIds)
|
|
1641
|
+
? object.organizationIds.map((e: any) => globalThis.String(e))
|
|
1642
|
+
: globalThis.Array.isArray(object?.organization_ids)
|
|
1643
|
+
? object.organization_ids.map((e: any) => globalThis.String(e))
|
|
1644
|
+
: [],
|
|
1645
|
+
filter: isSet(object.filter) ? AIReferenceGroupFilter.fromJSON(object.filter) : undefined,
|
|
1646
|
+
};
|
|
1647
|
+
},
|
|
1575
1648
|
|
|
1576
|
-
|
|
1577
|
-
const
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1649
|
+
toJSON(message: ConfirmAIProvidersRequest): unknown {
|
|
1650
|
+
const obj: any = {};
|
|
1651
|
+
if (message.organizationIds?.length) {
|
|
1652
|
+
obj.organizationIds = message.organizationIds;
|
|
1653
|
+
}
|
|
1654
|
+
if (message.filter !== undefined) {
|
|
1655
|
+
obj.filter = AIReferenceGroupFilter.toJSON(message.filter);
|
|
1656
|
+
}
|
|
1657
|
+
return obj;
|
|
1658
|
+
},
|
|
1581
1659
|
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1660
|
+
create<I extends Exact<DeepPartial<ConfirmAIProvidersRequest>, I>>(base?: I): ConfirmAIProvidersRequest {
|
|
1661
|
+
return ConfirmAIProvidersRequest.fromPartial(base ?? ({} as any));
|
|
1662
|
+
},
|
|
1663
|
+
fromPartial<I extends Exact<DeepPartial<ConfirmAIProvidersRequest>, I>>(object: I): ConfirmAIProvidersRequest {
|
|
1664
|
+
const message = createBaseConfirmAIProvidersRequest();
|
|
1665
|
+
message.organizationIds = object.organizationIds?.map((e) => e) || [];
|
|
1666
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
1667
|
+
? AIReferenceGroupFilter.fromPartial(object.filter)
|
|
1668
|
+
: undefined;
|
|
1669
|
+
return message;
|
|
1670
|
+
},
|
|
1671
|
+
};
|
|
1588
1672
|
|
|
1589
|
-
|
|
1590
|
-
|
|
1673
|
+
function createBaseConfirmAIProvidersResponse(): ConfirmAIProvidersResponse {
|
|
1674
|
+
return { status: undefined, confirmedNameCount: 0 };
|
|
1591
1675
|
}
|
|
1592
1676
|
|
|
1593
|
-
|
|
1677
|
+
export const ConfirmAIProvidersResponse: MessageFns<ConfirmAIProvidersResponse> = {
|
|
1678
|
+
encode(message: ConfirmAIProvidersResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1679
|
+
if (message.status !== undefined) {
|
|
1680
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1681
|
+
}
|
|
1682
|
+
if (message.confirmedNameCount !== 0) {
|
|
1683
|
+
writer.uint32(16).int64(message.confirmedNameCount);
|
|
1684
|
+
}
|
|
1685
|
+
return writer;
|
|
1686
|
+
},
|
|
1594
1687
|
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1688
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ConfirmAIProvidersResponse {
|
|
1689
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1690
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1691
|
+
if (previousRecursionDepth >= 100) {
|
|
1692
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1693
|
+
}
|
|
1694
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1695
|
+
try {
|
|
1696
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1697
|
+
const message = createBaseConfirmAIProvidersResponse();
|
|
1698
|
+
while (reader.pos < end) {
|
|
1699
|
+
const tag = reader.uint32();
|
|
1700
|
+
switch (tag >>> 3) {
|
|
1701
|
+
case 1: {
|
|
1702
|
+
if (tag !== 10) {
|
|
1703
|
+
break;
|
|
1704
|
+
}
|
|
1600
1705
|
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1706
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1707
|
+
continue;
|
|
1708
|
+
}
|
|
1709
|
+
case 2: {
|
|
1710
|
+
if (tag !== 16) {
|
|
1711
|
+
break;
|
|
1712
|
+
}
|
|
1604
1713
|
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1714
|
+
message.confirmedNameCount = longToNumber(reader.int64());
|
|
1715
|
+
continue;
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1719
|
+
break;
|
|
1720
|
+
}
|
|
1721
|
+
reader.skip(tag & 7);
|
|
1722
|
+
}
|
|
1723
|
+
return message;
|
|
1724
|
+
} finally {
|
|
1725
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1726
|
+
}
|
|
1727
|
+
},
|
|
1610
1728
|
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1729
|
+
fromJSON(object: any): ConfirmAIProvidersResponse {
|
|
1730
|
+
return {
|
|
1731
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1732
|
+
confirmedNameCount: isSet(object.confirmedNameCount)
|
|
1733
|
+
? globalThis.Number(object.confirmedNameCount)
|
|
1734
|
+
: isSet(object.confirmed_name_count)
|
|
1735
|
+
? globalThis.Number(object.confirmed_name_count)
|
|
1736
|
+
: 0,
|
|
1737
|
+
};
|
|
1738
|
+
},
|
|
1739
|
+
|
|
1740
|
+
toJSON(message: ConfirmAIProvidersResponse): unknown {
|
|
1741
|
+
const obj: any = {};
|
|
1742
|
+
if (message.status !== undefined) {
|
|
1743
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1744
|
+
}
|
|
1745
|
+
if (message.confirmedNameCount !== 0) {
|
|
1746
|
+
obj.confirmedNameCount = Math.round(message.confirmedNameCount);
|
|
1747
|
+
}
|
|
1748
|
+
return obj;
|
|
1749
|
+
},
|
|
1750
|
+
|
|
1751
|
+
create<I extends Exact<DeepPartial<ConfirmAIProvidersResponse>, I>>(base?: I): ConfirmAIProvidersResponse {
|
|
1752
|
+
return ConfirmAIProvidersResponse.fromPartial(base ?? ({} as any));
|
|
1753
|
+
},
|
|
1754
|
+
fromPartial<I extends Exact<DeepPartial<ConfirmAIProvidersResponse>, I>>(object: I): ConfirmAIProvidersResponse {
|
|
1755
|
+
const message = createBaseConfirmAIProvidersResponse();
|
|
1756
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1757
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1758
|
+
: undefined;
|
|
1759
|
+
message.confirmedNameCount = object.confirmedNameCount ?? 0;
|
|
1760
|
+
return message;
|
|
1761
|
+
},
|
|
1762
|
+
};
|
|
1763
|
+
|
|
1764
|
+
function createBaseConfirmAIModelsRequest(): ConfirmAIModelsRequest {
|
|
1765
|
+
return { organizationIds: [], filter: undefined };
|
|
1615
1766
|
}
|
|
1616
1767
|
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1768
|
+
export const ConfirmAIModelsRequest: MessageFns<ConfirmAIModelsRequest> = {
|
|
1769
|
+
encode(message: ConfirmAIModelsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1770
|
+
for (const v of message.organizationIds) {
|
|
1771
|
+
writer.uint32(10).string(v!);
|
|
1772
|
+
}
|
|
1773
|
+
if (message.filter !== undefined) {
|
|
1774
|
+
AIReferenceGroupFilter.encode(message.filter, writer.uint32(18).fork()).join();
|
|
1775
|
+
}
|
|
1776
|
+
return writer;
|
|
1777
|
+
},
|
|
1778
|
+
|
|
1779
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ConfirmAIModelsRequest {
|
|
1780
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1781
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1782
|
+
if (previousRecursionDepth >= 100) {
|
|
1783
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1784
|
+
}
|
|
1785
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1786
|
+
try {
|
|
1787
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1788
|
+
const message = createBaseConfirmAIModelsRequest();
|
|
1789
|
+
while (reader.pos < end) {
|
|
1790
|
+
const tag = reader.uint32();
|
|
1791
|
+
switch (tag >>> 3) {
|
|
1792
|
+
case 1: {
|
|
1793
|
+
if (tag !== 10) {
|
|
1794
|
+
break;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
message.organizationIds.push(reader.string());
|
|
1798
|
+
continue;
|
|
1799
|
+
}
|
|
1800
|
+
case 2: {
|
|
1801
|
+
if (tag !== 18) {
|
|
1802
|
+
break;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
message.filter = AIReferenceGroupFilter.decode(reader, reader.uint32());
|
|
1806
|
+
continue;
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1810
|
+
break;
|
|
1811
|
+
}
|
|
1812
|
+
reader.skip(tag & 7);
|
|
1813
|
+
}
|
|
1814
|
+
return message;
|
|
1815
|
+
} finally {
|
|
1816
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1817
|
+
}
|
|
1818
|
+
},
|
|
1819
|
+
|
|
1820
|
+
fromJSON(object: any): ConfirmAIModelsRequest {
|
|
1821
|
+
return {
|
|
1822
|
+
organizationIds: globalThis.Array.isArray(object?.organizationIds)
|
|
1823
|
+
? object.organizationIds.map((e: any) => globalThis.String(e))
|
|
1824
|
+
: globalThis.Array.isArray(object?.organization_ids)
|
|
1825
|
+
? object.organization_ids.map((e: any) => globalThis.String(e))
|
|
1826
|
+
: [],
|
|
1827
|
+
filter: isSet(object.filter) ? AIReferenceGroupFilter.fromJSON(object.filter) : undefined,
|
|
1828
|
+
};
|
|
1829
|
+
},
|
|
1830
|
+
|
|
1831
|
+
toJSON(message: ConfirmAIModelsRequest): unknown {
|
|
1832
|
+
const obj: any = {};
|
|
1833
|
+
if (message.organizationIds?.length) {
|
|
1834
|
+
obj.organizationIds = message.organizationIds;
|
|
1835
|
+
}
|
|
1836
|
+
if (message.filter !== undefined) {
|
|
1837
|
+
obj.filter = AIReferenceGroupFilter.toJSON(message.filter);
|
|
1838
|
+
}
|
|
1839
|
+
return obj;
|
|
1840
|
+
},
|
|
1841
|
+
|
|
1842
|
+
create<I extends Exact<DeepPartial<ConfirmAIModelsRequest>, I>>(base?: I): ConfirmAIModelsRequest {
|
|
1843
|
+
return ConfirmAIModelsRequest.fromPartial(base ?? ({} as any));
|
|
1844
|
+
},
|
|
1845
|
+
fromPartial<I extends Exact<DeepPartial<ConfirmAIModelsRequest>, I>>(object: I): ConfirmAIModelsRequest {
|
|
1846
|
+
const message = createBaseConfirmAIModelsRequest();
|
|
1847
|
+
message.organizationIds = object.organizationIds?.map((e) => e) || [];
|
|
1848
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
1849
|
+
? AIReferenceGroupFilter.fromPartial(object.filter)
|
|
1850
|
+
: undefined;
|
|
1851
|
+
return message;
|
|
1852
|
+
},
|
|
1853
|
+
};
|
|
1854
|
+
|
|
1855
|
+
function createBaseConfirmAIModelsResponse(): ConfirmAIModelsResponse {
|
|
1856
|
+
return { status: undefined, confirmedNameCount: 0 };
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
export const ConfirmAIModelsResponse: MessageFns<ConfirmAIModelsResponse> = {
|
|
1860
|
+
encode(message: ConfirmAIModelsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1861
|
+
if (message.status !== undefined) {
|
|
1862
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1863
|
+
}
|
|
1864
|
+
if (message.confirmedNameCount !== 0) {
|
|
1865
|
+
writer.uint32(16).int64(message.confirmedNameCount);
|
|
1866
|
+
}
|
|
1867
|
+
return writer;
|
|
1868
|
+
},
|
|
1869
|
+
|
|
1870
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ConfirmAIModelsResponse {
|
|
1871
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1872
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1873
|
+
if (previousRecursionDepth >= 100) {
|
|
1874
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1875
|
+
}
|
|
1876
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1877
|
+
try {
|
|
1878
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1879
|
+
const message = createBaseConfirmAIModelsResponse();
|
|
1880
|
+
while (reader.pos < end) {
|
|
1881
|
+
const tag = reader.uint32();
|
|
1882
|
+
switch (tag >>> 3) {
|
|
1883
|
+
case 1: {
|
|
1884
|
+
if (tag !== 10) {
|
|
1885
|
+
break;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1889
|
+
continue;
|
|
1890
|
+
}
|
|
1891
|
+
case 2: {
|
|
1892
|
+
if (tag !== 16) {
|
|
1893
|
+
break;
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
message.confirmedNameCount = longToNumber(reader.int64());
|
|
1897
|
+
continue;
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1901
|
+
break;
|
|
1902
|
+
}
|
|
1903
|
+
reader.skip(tag & 7);
|
|
1904
|
+
}
|
|
1905
|
+
return message;
|
|
1906
|
+
} finally {
|
|
1907
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1908
|
+
}
|
|
1909
|
+
},
|
|
1910
|
+
|
|
1911
|
+
fromJSON(object: any): ConfirmAIModelsResponse {
|
|
1912
|
+
return {
|
|
1913
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1914
|
+
confirmedNameCount: isSet(object.confirmedNameCount)
|
|
1915
|
+
? globalThis.Number(object.confirmedNameCount)
|
|
1916
|
+
: isSet(object.confirmed_name_count)
|
|
1917
|
+
? globalThis.Number(object.confirmed_name_count)
|
|
1918
|
+
: 0,
|
|
1919
|
+
};
|
|
1920
|
+
},
|
|
1921
|
+
|
|
1922
|
+
toJSON(message: ConfirmAIModelsResponse): unknown {
|
|
1923
|
+
const obj: any = {};
|
|
1924
|
+
if (message.status !== undefined) {
|
|
1925
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1926
|
+
}
|
|
1927
|
+
if (message.confirmedNameCount !== 0) {
|
|
1928
|
+
obj.confirmedNameCount = Math.round(message.confirmedNameCount);
|
|
1929
|
+
}
|
|
1930
|
+
return obj;
|
|
1931
|
+
},
|
|
1932
|
+
|
|
1933
|
+
create<I extends Exact<DeepPartial<ConfirmAIModelsResponse>, I>>(base?: I): ConfirmAIModelsResponse {
|
|
1934
|
+
return ConfirmAIModelsResponse.fromPartial(base ?? ({} as any));
|
|
1935
|
+
},
|
|
1936
|
+
fromPartial<I extends Exact<DeepPartial<ConfirmAIModelsResponse>, I>>(object: I): ConfirmAIModelsResponse {
|
|
1937
|
+
const message = createBaseConfirmAIModelsResponse();
|
|
1938
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1939
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1940
|
+
: undefined;
|
|
1941
|
+
message.confirmedNameCount = object.confirmedNameCount ?? 0;
|
|
1942
|
+
return message;
|
|
1943
|
+
},
|
|
1944
|
+
};
|
|
1945
|
+
|
|
1946
|
+
function createBaseConfirmAIEffortsRequest(): ConfirmAIEffortsRequest {
|
|
1947
|
+
return { organizationIds: [], filter: undefined };
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
export const ConfirmAIEffortsRequest: MessageFns<ConfirmAIEffortsRequest> = {
|
|
1951
|
+
encode(message: ConfirmAIEffortsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1952
|
+
for (const v of message.organizationIds) {
|
|
1953
|
+
writer.uint32(10).string(v!);
|
|
1954
|
+
}
|
|
1955
|
+
if (message.filter !== undefined) {
|
|
1956
|
+
AIReferenceGroupFilter.encode(message.filter, writer.uint32(18).fork()).join();
|
|
1957
|
+
}
|
|
1958
|
+
return writer;
|
|
1959
|
+
},
|
|
1960
|
+
|
|
1961
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ConfirmAIEffortsRequest {
|
|
1962
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1963
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1964
|
+
if (previousRecursionDepth >= 100) {
|
|
1965
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1966
|
+
}
|
|
1967
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1968
|
+
try {
|
|
1969
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1970
|
+
const message = createBaseConfirmAIEffortsRequest();
|
|
1971
|
+
while (reader.pos < end) {
|
|
1972
|
+
const tag = reader.uint32();
|
|
1973
|
+
switch (tag >>> 3) {
|
|
1974
|
+
case 1: {
|
|
1975
|
+
if (tag !== 10) {
|
|
1976
|
+
break;
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
message.organizationIds.push(reader.string());
|
|
1980
|
+
continue;
|
|
1981
|
+
}
|
|
1982
|
+
case 2: {
|
|
1983
|
+
if (tag !== 18) {
|
|
1984
|
+
break;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
message.filter = AIReferenceGroupFilter.decode(reader, reader.uint32());
|
|
1988
|
+
continue;
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1992
|
+
break;
|
|
1993
|
+
}
|
|
1994
|
+
reader.skip(tag & 7);
|
|
1995
|
+
}
|
|
1996
|
+
return message;
|
|
1997
|
+
} finally {
|
|
1998
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1999
|
+
}
|
|
2000
|
+
},
|
|
2001
|
+
|
|
2002
|
+
fromJSON(object: any): ConfirmAIEffortsRequest {
|
|
2003
|
+
return {
|
|
2004
|
+
organizationIds: globalThis.Array.isArray(object?.organizationIds)
|
|
2005
|
+
? object.organizationIds.map((e: any) => globalThis.String(e))
|
|
2006
|
+
: globalThis.Array.isArray(object?.organization_ids)
|
|
2007
|
+
? object.organization_ids.map((e: any) => globalThis.String(e))
|
|
2008
|
+
: [],
|
|
2009
|
+
filter: isSet(object.filter) ? AIReferenceGroupFilter.fromJSON(object.filter) : undefined,
|
|
2010
|
+
};
|
|
2011
|
+
},
|
|
2012
|
+
|
|
2013
|
+
toJSON(message: ConfirmAIEffortsRequest): unknown {
|
|
2014
|
+
const obj: any = {};
|
|
2015
|
+
if (message.organizationIds?.length) {
|
|
2016
|
+
obj.organizationIds = message.organizationIds;
|
|
2017
|
+
}
|
|
2018
|
+
if (message.filter !== undefined) {
|
|
2019
|
+
obj.filter = AIReferenceGroupFilter.toJSON(message.filter);
|
|
2020
|
+
}
|
|
2021
|
+
return obj;
|
|
2022
|
+
},
|
|
2023
|
+
|
|
2024
|
+
create<I extends Exact<DeepPartial<ConfirmAIEffortsRequest>, I>>(base?: I): ConfirmAIEffortsRequest {
|
|
2025
|
+
return ConfirmAIEffortsRequest.fromPartial(base ?? ({} as any));
|
|
2026
|
+
},
|
|
2027
|
+
fromPartial<I extends Exact<DeepPartial<ConfirmAIEffortsRequest>, I>>(object: I): ConfirmAIEffortsRequest {
|
|
2028
|
+
const message = createBaseConfirmAIEffortsRequest();
|
|
2029
|
+
message.organizationIds = object.organizationIds?.map((e) => e) || [];
|
|
2030
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
2031
|
+
? AIReferenceGroupFilter.fromPartial(object.filter)
|
|
2032
|
+
: undefined;
|
|
2033
|
+
return message;
|
|
2034
|
+
},
|
|
2035
|
+
};
|
|
2036
|
+
|
|
2037
|
+
function createBaseConfirmAIEffortsResponse(): ConfirmAIEffortsResponse {
|
|
2038
|
+
return { status: undefined, confirmedNameCount: 0 };
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
export const ConfirmAIEffortsResponse: MessageFns<ConfirmAIEffortsResponse> = {
|
|
2042
|
+
encode(message: ConfirmAIEffortsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2043
|
+
if (message.status !== undefined) {
|
|
2044
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
2045
|
+
}
|
|
2046
|
+
if (message.confirmedNameCount !== 0) {
|
|
2047
|
+
writer.uint32(16).int64(message.confirmedNameCount);
|
|
2048
|
+
}
|
|
2049
|
+
return writer;
|
|
2050
|
+
},
|
|
2051
|
+
|
|
2052
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ConfirmAIEffortsResponse {
|
|
2053
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2054
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2055
|
+
if (previousRecursionDepth >= 100) {
|
|
2056
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2057
|
+
}
|
|
2058
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2059
|
+
try {
|
|
2060
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2061
|
+
const message = createBaseConfirmAIEffortsResponse();
|
|
2062
|
+
while (reader.pos < end) {
|
|
2063
|
+
const tag = reader.uint32();
|
|
2064
|
+
switch (tag >>> 3) {
|
|
2065
|
+
case 1: {
|
|
2066
|
+
if (tag !== 10) {
|
|
2067
|
+
break;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
2071
|
+
continue;
|
|
2072
|
+
}
|
|
2073
|
+
case 2: {
|
|
2074
|
+
if (tag !== 16) {
|
|
2075
|
+
break;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
message.confirmedNameCount = longToNumber(reader.int64());
|
|
2079
|
+
continue;
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2083
|
+
break;
|
|
2084
|
+
}
|
|
2085
|
+
reader.skip(tag & 7);
|
|
2086
|
+
}
|
|
2087
|
+
return message;
|
|
2088
|
+
} finally {
|
|
2089
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2090
|
+
}
|
|
2091
|
+
},
|
|
2092
|
+
|
|
2093
|
+
fromJSON(object: any): ConfirmAIEffortsResponse {
|
|
2094
|
+
return {
|
|
2095
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
2096
|
+
confirmedNameCount: isSet(object.confirmedNameCount)
|
|
2097
|
+
? globalThis.Number(object.confirmedNameCount)
|
|
2098
|
+
: isSet(object.confirmed_name_count)
|
|
2099
|
+
? globalThis.Number(object.confirmed_name_count)
|
|
2100
|
+
: 0,
|
|
2101
|
+
};
|
|
2102
|
+
},
|
|
2103
|
+
|
|
2104
|
+
toJSON(message: ConfirmAIEffortsResponse): unknown {
|
|
2105
|
+
const obj: any = {};
|
|
2106
|
+
if (message.status !== undefined) {
|
|
2107
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
2108
|
+
}
|
|
2109
|
+
if (message.confirmedNameCount !== 0) {
|
|
2110
|
+
obj.confirmedNameCount = Math.round(message.confirmedNameCount);
|
|
2111
|
+
}
|
|
2112
|
+
return obj;
|
|
2113
|
+
},
|
|
2114
|
+
|
|
2115
|
+
create<I extends Exact<DeepPartial<ConfirmAIEffortsResponse>, I>>(base?: I): ConfirmAIEffortsResponse {
|
|
2116
|
+
return ConfirmAIEffortsResponse.fromPartial(base ?? ({} as any));
|
|
2117
|
+
},
|
|
2118
|
+
fromPartial<I extends Exact<DeepPartial<ConfirmAIEffortsResponse>, I>>(object: I): ConfirmAIEffortsResponse {
|
|
2119
|
+
const message = createBaseConfirmAIEffortsResponse();
|
|
2120
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
2121
|
+
? ResponseStatus.fromPartial(object.status)
|
|
2122
|
+
: undefined;
|
|
2123
|
+
message.confirmedNameCount = object.confirmedNameCount ?? 0;
|
|
2124
|
+
return message;
|
|
2125
|
+
},
|
|
2126
|
+
};
|
|
2127
|
+
|
|
2128
|
+
function createBaseConfirmAIBillersRequest(): ConfirmAIBillersRequest {
|
|
2129
|
+
return { organizationIds: [], filter: undefined };
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
export const ConfirmAIBillersRequest: MessageFns<ConfirmAIBillersRequest> = {
|
|
2133
|
+
encode(message: ConfirmAIBillersRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2134
|
+
for (const v of message.organizationIds) {
|
|
2135
|
+
writer.uint32(10).string(v!);
|
|
2136
|
+
}
|
|
2137
|
+
if (message.filter !== undefined) {
|
|
2138
|
+
AIReferenceGroupFilter.encode(message.filter, writer.uint32(18).fork()).join();
|
|
2139
|
+
}
|
|
2140
|
+
return writer;
|
|
2141
|
+
},
|
|
2142
|
+
|
|
2143
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ConfirmAIBillersRequest {
|
|
2144
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2145
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2146
|
+
if (previousRecursionDepth >= 100) {
|
|
2147
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2148
|
+
}
|
|
2149
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2150
|
+
try {
|
|
2151
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2152
|
+
const message = createBaseConfirmAIBillersRequest();
|
|
2153
|
+
while (reader.pos < end) {
|
|
2154
|
+
const tag = reader.uint32();
|
|
2155
|
+
switch (tag >>> 3) {
|
|
2156
|
+
case 1: {
|
|
2157
|
+
if (tag !== 10) {
|
|
2158
|
+
break;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
message.organizationIds.push(reader.string());
|
|
2162
|
+
continue;
|
|
2163
|
+
}
|
|
2164
|
+
case 2: {
|
|
2165
|
+
if (tag !== 18) {
|
|
2166
|
+
break;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
message.filter = AIReferenceGroupFilter.decode(reader, reader.uint32());
|
|
2170
|
+
continue;
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2174
|
+
break;
|
|
2175
|
+
}
|
|
2176
|
+
reader.skip(tag & 7);
|
|
2177
|
+
}
|
|
2178
|
+
return message;
|
|
2179
|
+
} finally {
|
|
2180
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2183
|
+
|
|
2184
|
+
fromJSON(object: any): ConfirmAIBillersRequest {
|
|
2185
|
+
return {
|
|
2186
|
+
organizationIds: globalThis.Array.isArray(object?.organizationIds)
|
|
2187
|
+
? object.organizationIds.map((e: any) => globalThis.String(e))
|
|
2188
|
+
: globalThis.Array.isArray(object?.organization_ids)
|
|
2189
|
+
? object.organization_ids.map((e: any) => globalThis.String(e))
|
|
2190
|
+
: [],
|
|
2191
|
+
filter: isSet(object.filter) ? AIReferenceGroupFilter.fromJSON(object.filter) : undefined,
|
|
2192
|
+
};
|
|
2193
|
+
},
|
|
2194
|
+
|
|
2195
|
+
toJSON(message: ConfirmAIBillersRequest): unknown {
|
|
2196
|
+
const obj: any = {};
|
|
2197
|
+
if (message.organizationIds?.length) {
|
|
2198
|
+
obj.organizationIds = message.organizationIds;
|
|
2199
|
+
}
|
|
2200
|
+
if (message.filter !== undefined) {
|
|
2201
|
+
obj.filter = AIReferenceGroupFilter.toJSON(message.filter);
|
|
2202
|
+
}
|
|
2203
|
+
return obj;
|
|
2204
|
+
},
|
|
2205
|
+
|
|
2206
|
+
create<I extends Exact<DeepPartial<ConfirmAIBillersRequest>, I>>(base?: I): ConfirmAIBillersRequest {
|
|
2207
|
+
return ConfirmAIBillersRequest.fromPartial(base ?? ({} as any));
|
|
2208
|
+
},
|
|
2209
|
+
fromPartial<I extends Exact<DeepPartial<ConfirmAIBillersRequest>, I>>(object: I): ConfirmAIBillersRequest {
|
|
2210
|
+
const message = createBaseConfirmAIBillersRequest();
|
|
2211
|
+
message.organizationIds = object.organizationIds?.map((e) => e) || [];
|
|
2212
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
2213
|
+
? AIReferenceGroupFilter.fromPartial(object.filter)
|
|
2214
|
+
: undefined;
|
|
2215
|
+
return message;
|
|
2216
|
+
},
|
|
2217
|
+
};
|
|
2218
|
+
|
|
2219
|
+
function createBaseConfirmAIBillersResponse(): ConfirmAIBillersResponse {
|
|
2220
|
+
return { status: undefined, confirmedNameCount: 0 };
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
export const ConfirmAIBillersResponse: MessageFns<ConfirmAIBillersResponse> = {
|
|
2224
|
+
encode(message: ConfirmAIBillersResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2225
|
+
if (message.status !== undefined) {
|
|
2226
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
2227
|
+
}
|
|
2228
|
+
if (message.confirmedNameCount !== 0) {
|
|
2229
|
+
writer.uint32(16).int64(message.confirmedNameCount);
|
|
2230
|
+
}
|
|
2231
|
+
return writer;
|
|
2232
|
+
},
|
|
2233
|
+
|
|
2234
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ConfirmAIBillersResponse {
|
|
2235
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2236
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2237
|
+
if (previousRecursionDepth >= 100) {
|
|
2238
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2239
|
+
}
|
|
2240
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2241
|
+
try {
|
|
2242
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2243
|
+
const message = createBaseConfirmAIBillersResponse();
|
|
2244
|
+
while (reader.pos < end) {
|
|
2245
|
+
const tag = reader.uint32();
|
|
2246
|
+
switch (tag >>> 3) {
|
|
2247
|
+
case 1: {
|
|
2248
|
+
if (tag !== 10) {
|
|
2249
|
+
break;
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
2253
|
+
continue;
|
|
2254
|
+
}
|
|
2255
|
+
case 2: {
|
|
2256
|
+
if (tag !== 16) {
|
|
2257
|
+
break;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
message.confirmedNameCount = longToNumber(reader.int64());
|
|
2261
|
+
continue;
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2265
|
+
break;
|
|
2266
|
+
}
|
|
2267
|
+
reader.skip(tag & 7);
|
|
2268
|
+
}
|
|
2269
|
+
return message;
|
|
2270
|
+
} finally {
|
|
2271
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2272
|
+
}
|
|
2273
|
+
},
|
|
2274
|
+
|
|
2275
|
+
fromJSON(object: any): ConfirmAIBillersResponse {
|
|
2276
|
+
return {
|
|
2277
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
2278
|
+
confirmedNameCount: isSet(object.confirmedNameCount)
|
|
2279
|
+
? globalThis.Number(object.confirmedNameCount)
|
|
2280
|
+
: isSet(object.confirmed_name_count)
|
|
2281
|
+
? globalThis.Number(object.confirmed_name_count)
|
|
2282
|
+
: 0,
|
|
2283
|
+
};
|
|
2284
|
+
},
|
|
2285
|
+
|
|
2286
|
+
toJSON(message: ConfirmAIBillersResponse): unknown {
|
|
2287
|
+
const obj: any = {};
|
|
2288
|
+
if (message.status !== undefined) {
|
|
2289
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
2290
|
+
}
|
|
2291
|
+
if (message.confirmedNameCount !== 0) {
|
|
2292
|
+
obj.confirmedNameCount = Math.round(message.confirmedNameCount);
|
|
2293
|
+
}
|
|
2294
|
+
return obj;
|
|
2295
|
+
},
|
|
2296
|
+
|
|
2297
|
+
create<I extends Exact<DeepPartial<ConfirmAIBillersResponse>, I>>(base?: I): ConfirmAIBillersResponse {
|
|
2298
|
+
return ConfirmAIBillersResponse.fromPartial(base ?? ({} as any));
|
|
2299
|
+
},
|
|
2300
|
+
fromPartial<I extends Exact<DeepPartial<ConfirmAIBillersResponse>, I>>(object: I): ConfirmAIBillersResponse {
|
|
2301
|
+
const message = createBaseConfirmAIBillersResponse();
|
|
2302
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
2303
|
+
? ResponseStatus.fromPartial(object.status)
|
|
2304
|
+
: undefined;
|
|
2305
|
+
message.confirmedNameCount = object.confirmedNameCount ?? 0;
|
|
2306
|
+
return message;
|
|
2307
|
+
},
|
|
2308
|
+
};
|
|
2309
|
+
|
|
2310
|
+
/**
|
|
2311
|
+
* AdminGatewayService is the browser-facing surface of the admin tools, across every domain, which only
|
|
2312
|
+
* Mirador staff (a verified mirador.org primary email) may use. The gateway's admin gate admits every RPC
|
|
2313
|
+
* here except GetAdminStatus, which tells the frontend whether to show the admin tools at all.
|
|
2314
|
+
*/
|
|
2315
|
+
export interface AdminGatewayService {
|
|
2316
|
+
/** GetAdminStatus reports whether the authenticated caller may use the admin tools. */
|
|
2317
|
+
GetAdminStatus(request: GetAdminStatusRequest, metadata?: Metadata): Promise<GetAdminStatusResponse>;
|
|
2318
|
+
/** Beta invite codes for this gateway's product. */
|
|
2319
|
+
GenerateInviteCodes(request: GenerateInviteCodesRequest, metadata?: Metadata): Promise<GenerateInviteCodesResponse>;
|
|
2320
|
+
ListInviteCodes(request: ListInviteCodesRequest, metadata?: Metadata): Promise<ListInviteCodesResponse>;
|
|
2321
|
+
/**
|
|
2322
|
+
* Staff set a global AI name's display name for every organization. An update makes the name MANUAL; the
|
|
2323
|
+
* model processor never overwrites it. The tables are read through ReferenceGatewayService.
|
|
2324
|
+
*/
|
|
2325
|
+
UpdateAIProvider(request: UpdateAIProviderRequest, metadata?: Metadata): Promise<UpdateAIProviderResponse>;
|
|
2326
|
+
UpdateAIModel(request: UpdateAIModelRequest, metadata?: Metadata): Promise<UpdateAIModelResponse>;
|
|
2327
|
+
UpdateAIEffort(request: UpdateAIEffortRequest, metadata?: Metadata): Promise<UpdateAIEffortResponse>;
|
|
2328
|
+
UpdateAIBiller(request: UpdateAIBillerRequest, metadata?: Metadata): Promise<UpdateAIBillerResponse>;
|
|
2329
|
+
/**
|
|
2330
|
+
* Each Confirm<X> confirms every unreviewed name in the groups a List<X>Groups filter keeps (on every page),
|
|
2331
|
+
* as one Update<X> per name would; it proxies telemetry.api.v1.TelemetryAdminService's Confirm<X>. It
|
|
2332
|
+
* confirms what matches when it runs: compare confirmed_name_count with the count shown. Names are global: an
|
|
2333
|
+
* unset observation also confirms groups none of the organizations reported. Observation OBSERVED keeps only
|
|
2334
|
+
* the groups they reported, and still confirms every unreviewed name in them, including a spelling in the same
|
|
2335
|
+
* group none of them reported.
|
|
2336
|
+
*/
|
|
2337
|
+
ConfirmAIProviders(request: ConfirmAIProvidersRequest, metadata?: Metadata): Promise<ConfirmAIProvidersResponse>;
|
|
2338
|
+
ConfirmAIModels(request: ConfirmAIModelsRequest, metadata?: Metadata): Promise<ConfirmAIModelsResponse>;
|
|
2339
|
+
ConfirmAIEfforts(request: ConfirmAIEffortsRequest, metadata?: Metadata): Promise<ConfirmAIEffortsResponse>;
|
|
2340
|
+
ConfirmAIBillers(request: ConfirmAIBillersRequest, metadata?: Metadata): Promise<ConfirmAIBillersResponse>;
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
export const AdminGatewayServiceServiceName = "gateway.web.v1.AdminGatewayService";
|
|
2344
|
+
export class AdminGatewayServiceClientImpl implements AdminGatewayService {
|
|
2345
|
+
private readonly rpc: Rpc;
|
|
2346
|
+
private readonly service: string;
|
|
2347
|
+
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
2348
|
+
this.service = opts?.service || AdminGatewayServiceServiceName;
|
|
2349
|
+
this.rpc = rpc;
|
|
2350
|
+
this.GetAdminStatus = this.GetAdminStatus.bind(this);
|
|
2351
|
+
this.GenerateInviteCodes = this.GenerateInviteCodes.bind(this);
|
|
2352
|
+
this.ListInviteCodes = this.ListInviteCodes.bind(this);
|
|
2353
|
+
this.UpdateAIProvider = this.UpdateAIProvider.bind(this);
|
|
2354
|
+
this.UpdateAIModel = this.UpdateAIModel.bind(this);
|
|
2355
|
+
this.UpdateAIEffort = this.UpdateAIEffort.bind(this);
|
|
2356
|
+
this.UpdateAIBiller = this.UpdateAIBiller.bind(this);
|
|
2357
|
+
this.ConfirmAIProviders = this.ConfirmAIProviders.bind(this);
|
|
2358
|
+
this.ConfirmAIModels = this.ConfirmAIModels.bind(this);
|
|
2359
|
+
this.ConfirmAIEfforts = this.ConfirmAIEfforts.bind(this);
|
|
2360
|
+
this.ConfirmAIBillers = this.ConfirmAIBillers.bind(this);
|
|
2361
|
+
}
|
|
2362
|
+
GetAdminStatus(request: GetAdminStatusRequest, metadata?: Metadata): Promise<GetAdminStatusResponse> {
|
|
2363
|
+
const data = GetAdminStatusRequest.encode(request).finish();
|
|
2364
|
+
const promise = this.rpc.request(this.service, "GetAdminStatus", data, metadata);
|
|
2365
|
+
return promise.then((data) => GetAdminStatusResponse.decode(new BinaryReader(data)));
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
GenerateInviteCodes(request: GenerateInviteCodesRequest, metadata?: Metadata): Promise<GenerateInviteCodesResponse> {
|
|
2369
|
+
const data = GenerateInviteCodesRequest.encode(request).finish();
|
|
2370
|
+
const promise = this.rpc.request(this.service, "GenerateInviteCodes", data, metadata);
|
|
2371
|
+
return promise.then((data) => GenerateInviteCodesResponse.decode(new BinaryReader(data)));
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
ListInviteCodes(request: ListInviteCodesRequest, metadata?: Metadata): Promise<ListInviteCodesResponse> {
|
|
2375
|
+
const data = ListInviteCodesRequest.encode(request).finish();
|
|
2376
|
+
const promise = this.rpc.request(this.service, "ListInviteCodes", data, metadata);
|
|
2377
|
+
return promise.then((data) => ListInviteCodesResponse.decode(new BinaryReader(data)));
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
UpdateAIProvider(request: UpdateAIProviderRequest, metadata?: Metadata): Promise<UpdateAIProviderResponse> {
|
|
2381
|
+
const data = UpdateAIProviderRequest.encode(request).finish();
|
|
2382
|
+
const promise = this.rpc.request(this.service, "UpdateAIProvider", data, metadata);
|
|
2383
|
+
return promise.then((data) => UpdateAIProviderResponse.decode(new BinaryReader(data)));
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
UpdateAIModel(request: UpdateAIModelRequest, metadata?: Metadata): Promise<UpdateAIModelResponse> {
|
|
2387
|
+
const data = UpdateAIModelRequest.encode(request).finish();
|
|
2388
|
+
const promise = this.rpc.request(this.service, "UpdateAIModel", data, metadata);
|
|
2389
|
+
return promise.then((data) => UpdateAIModelResponse.decode(new BinaryReader(data)));
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
UpdateAIEffort(request: UpdateAIEffortRequest, metadata?: Metadata): Promise<UpdateAIEffortResponse> {
|
|
2393
|
+
const data = UpdateAIEffortRequest.encode(request).finish();
|
|
2394
|
+
const promise = this.rpc.request(this.service, "UpdateAIEffort", data, metadata);
|
|
2395
|
+
return promise.then((data) => UpdateAIEffortResponse.decode(new BinaryReader(data)));
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
UpdateAIBiller(request: UpdateAIBillerRequest, metadata?: Metadata): Promise<UpdateAIBillerResponse> {
|
|
2399
|
+
const data = UpdateAIBillerRequest.encode(request).finish();
|
|
2400
|
+
const promise = this.rpc.request(this.service, "UpdateAIBiller", data, metadata);
|
|
2401
|
+
return promise.then((data) => UpdateAIBillerResponse.decode(new BinaryReader(data)));
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
ConfirmAIProviders(request: ConfirmAIProvidersRequest, metadata?: Metadata): Promise<ConfirmAIProvidersResponse> {
|
|
2405
|
+
const data = ConfirmAIProvidersRequest.encode(request).finish();
|
|
2406
|
+
const promise = this.rpc.request(this.service, "ConfirmAIProviders", data, metadata);
|
|
2407
|
+
return promise.then((data) => ConfirmAIProvidersResponse.decode(new BinaryReader(data)));
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
ConfirmAIModels(request: ConfirmAIModelsRequest, metadata?: Metadata): Promise<ConfirmAIModelsResponse> {
|
|
2411
|
+
const data = ConfirmAIModelsRequest.encode(request).finish();
|
|
2412
|
+
const promise = this.rpc.request(this.service, "ConfirmAIModels", data, metadata);
|
|
2413
|
+
return promise.then((data) => ConfirmAIModelsResponse.decode(new BinaryReader(data)));
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2416
|
+
ConfirmAIEfforts(request: ConfirmAIEffortsRequest, metadata?: Metadata): Promise<ConfirmAIEffortsResponse> {
|
|
2417
|
+
const data = ConfirmAIEffortsRequest.encode(request).finish();
|
|
2418
|
+
const promise = this.rpc.request(this.service, "ConfirmAIEfforts", data, metadata);
|
|
2419
|
+
return promise.then((data) => ConfirmAIEffortsResponse.decode(new BinaryReader(data)));
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2422
|
+
ConfirmAIBillers(request: ConfirmAIBillersRequest, metadata?: Metadata): Promise<ConfirmAIBillersResponse> {
|
|
2423
|
+
const data = ConfirmAIBillersRequest.encode(request).finish();
|
|
2424
|
+
const promise = this.rpc.request(this.service, "ConfirmAIBillers", data, metadata);
|
|
2425
|
+
return promise.then((data) => ConfirmAIBillersResponse.decode(new BinaryReader(data)));
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
interface Rpc {
|
|
2430
|
+
request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
|
|
2431
|
+
}
|
|
2432
|
+
|
|
2433
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
2434
|
+
|
|
2435
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
2436
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
2437
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
2438
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
2439
|
+
: Partial<T>;
|
|
2440
|
+
|
|
2441
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
2442
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
2443
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
2444
|
+
|
|
2445
|
+
function toTimestamp(date: Date): Timestamp {
|
|
2446
|
+
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
2447
|
+
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
2448
|
+
return { seconds, nanos };
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
function fromTimestamp(t: Timestamp): Date {
|
|
2452
|
+
let millis = (t.seconds || 0) * 1_000;
|
|
2453
|
+
millis += (t.nanos || 0) / 1_000_000;
|
|
2454
|
+
return new globalThis.Date(millis);
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
function fromJsonTimestamp(o: any): Date {
|
|
2458
|
+
if (o instanceof globalThis.Date) {
|
|
2459
|
+
return o;
|
|
2460
|
+
} else if (typeof o === "string") {
|
|
2461
|
+
return new globalThis.Date(o);
|
|
2462
|
+
} else {
|
|
2463
|
+
return fromTimestamp(Timestamp.fromJSON(o));
|
|
2464
|
+
}
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
function longToNumber(int64: { toString(): string }): number {
|
|
2468
|
+
const num = globalThis.Number(int64.toString());
|
|
2469
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
2470
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
2471
|
+
}
|
|
2472
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
2473
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1624
2474
|
}
|
|
2475
|
+
return num;
|
|
1625
2476
|
}
|
|
1626
2477
|
|
|
1627
2478
|
function isSet(value: any): boolean {
|