@miradorlabs/web-grpc 2.71.0 → 2.72.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.
|
@@ -414,6 +414,27 @@ export interface CreateProjectRequest {
|
|
|
414
414
|
export interface CreateProjectResponse {
|
|
415
415
|
status: ResponseStatus | undefined;
|
|
416
416
|
project: Project | undefined;
|
|
417
|
+
ingestionKey: ServerApiKeySecret | undefined;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export interface ServerApiKeySecret {
|
|
421
|
+
serverApiKey:
|
|
422
|
+
| ServerApiKey
|
|
423
|
+
| undefined;
|
|
424
|
+
/** Sensitive: returned only to authorized project members. */
|
|
425
|
+
key: string;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export interface RevealServerApiKeyRequest {
|
|
429
|
+
organizationId: string;
|
|
430
|
+
projectId: string;
|
|
431
|
+
id: string;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/** Reveals an existing key without changing its permissions or status. */
|
|
435
|
+
export interface RevealServerApiKeyResponse {
|
|
436
|
+
status: ResponseStatus | undefined;
|
|
437
|
+
serverKey: ServerApiKeySecret | undefined;
|
|
417
438
|
}
|
|
418
439
|
|
|
419
440
|
export interface ListProjectsRequest {
|
|
@@ -560,6 +581,8 @@ export interface CreateServerApiKeyRequest {
|
|
|
560
581
|
projectId: string;
|
|
561
582
|
name: string;
|
|
562
583
|
description: string;
|
|
584
|
+
/** Absent preserves legacy full access; present replaces all toggles. */
|
|
585
|
+
permissions: ServerApiKeyPermissions | undefined;
|
|
563
586
|
}
|
|
564
587
|
|
|
565
588
|
export interface CreateServerApiKeyResponse {
|
|
@@ -606,7 +629,11 @@ export interface UpdateServerApiKeyRequest {
|
|
|
606
629
|
}
|
|
607
630
|
|
|
608
631
|
export interface UpdateServerApiKeyRequest_ServerApiKeyUpdates {
|
|
609
|
-
name?:
|
|
632
|
+
name?:
|
|
633
|
+
| string
|
|
634
|
+
| undefined;
|
|
635
|
+
/** Absent leaves permissions unchanged; present replaces all toggles. */
|
|
636
|
+
permissions: ServerApiKeyPermissions | undefined;
|
|
610
637
|
}
|
|
611
638
|
|
|
612
639
|
export interface UpdateServerApiKeyResponse {
|
|
@@ -627,6 +654,12 @@ export interface DeleteServerApiKeyResponse {
|
|
|
627
654
|
status: ResponseStatus | undefined;
|
|
628
655
|
}
|
|
629
656
|
|
|
657
|
+
export interface ServerApiKeyPermissions {
|
|
658
|
+
read: boolean;
|
|
659
|
+
write: boolean;
|
|
660
|
+
ingest: boolean;
|
|
661
|
+
}
|
|
662
|
+
|
|
630
663
|
export interface ServerApiKey {
|
|
631
664
|
/** UUID */
|
|
632
665
|
id: string;
|
|
@@ -640,6 +673,7 @@ export interface ServerApiKey {
|
|
|
640
673
|
updatedAt: Date | undefined;
|
|
641
674
|
createdBy: string;
|
|
642
675
|
lastUsedAt?: Date | undefined;
|
|
676
|
+
permissions: ServerApiKeyPermissions | undefined;
|
|
643
677
|
}
|
|
644
678
|
|
|
645
679
|
export interface InviteUserRequest {
|
|
@@ -1619,7 +1653,7 @@ export const CreateProjectRequest: MessageFns<CreateProjectRequest> = {
|
|
|
1619
1653
|
};
|
|
1620
1654
|
|
|
1621
1655
|
function createBaseCreateProjectResponse(): CreateProjectResponse {
|
|
1622
|
-
return { status: undefined, project: undefined };
|
|
1656
|
+
return { status: undefined, project: undefined, ingestionKey: undefined };
|
|
1623
1657
|
}
|
|
1624
1658
|
|
|
1625
1659
|
export const CreateProjectResponse: MessageFns<CreateProjectResponse> = {
|
|
@@ -1630,6 +1664,9 @@ export const CreateProjectResponse: MessageFns<CreateProjectResponse> = {
|
|
|
1630
1664
|
if (message.project !== undefined) {
|
|
1631
1665
|
Project.encode(message.project, writer.uint32(18).fork()).join();
|
|
1632
1666
|
}
|
|
1667
|
+
if (message.ingestionKey !== undefined) {
|
|
1668
|
+
ServerApiKeySecret.encode(message.ingestionKey, writer.uint32(26).fork()).join();
|
|
1669
|
+
}
|
|
1633
1670
|
return writer;
|
|
1634
1671
|
},
|
|
1635
1672
|
|
|
@@ -1662,6 +1699,14 @@ export const CreateProjectResponse: MessageFns<CreateProjectResponse> = {
|
|
|
1662
1699
|
message.project = Project.decode(reader, reader.uint32());
|
|
1663
1700
|
continue;
|
|
1664
1701
|
}
|
|
1702
|
+
case 3: {
|
|
1703
|
+
if (tag !== 26) {
|
|
1704
|
+
break;
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
message.ingestionKey = ServerApiKeySecret.decode(reader, reader.uint32());
|
|
1708
|
+
continue;
|
|
1709
|
+
}
|
|
1665
1710
|
}
|
|
1666
1711
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1667
1712
|
break;
|
|
@@ -1678,6 +1723,11 @@ export const CreateProjectResponse: MessageFns<CreateProjectResponse> = {
|
|
|
1678
1723
|
return {
|
|
1679
1724
|
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1680
1725
|
project: isSet(object.project) ? Project.fromJSON(object.project) : undefined,
|
|
1726
|
+
ingestionKey: isSet(object.ingestionKey)
|
|
1727
|
+
? ServerApiKeySecret.fromJSON(object.ingestionKey)
|
|
1728
|
+
: isSet(object.ingestion_key)
|
|
1729
|
+
? ServerApiKeySecret.fromJSON(object.ingestion_key)
|
|
1730
|
+
: undefined,
|
|
1681
1731
|
};
|
|
1682
1732
|
},
|
|
1683
1733
|
|
|
@@ -1689,6 +1739,9 @@ export const CreateProjectResponse: MessageFns<CreateProjectResponse> = {
|
|
|
1689
1739
|
if (message.project !== undefined) {
|
|
1690
1740
|
obj.project = Project.toJSON(message.project);
|
|
1691
1741
|
}
|
|
1742
|
+
if (message.ingestionKey !== undefined) {
|
|
1743
|
+
obj.ingestionKey = ServerApiKeySecret.toJSON(message.ingestionKey);
|
|
1744
|
+
}
|
|
1692
1745
|
return obj;
|
|
1693
1746
|
},
|
|
1694
1747
|
|
|
@@ -1703,6 +1756,302 @@ export const CreateProjectResponse: MessageFns<CreateProjectResponse> = {
|
|
|
1703
1756
|
message.project = (object.project !== undefined && object.project !== null)
|
|
1704
1757
|
? Project.fromPartial(object.project)
|
|
1705
1758
|
: undefined;
|
|
1759
|
+
message.ingestionKey = (object.ingestionKey !== undefined && object.ingestionKey !== null)
|
|
1760
|
+
? ServerApiKeySecret.fromPartial(object.ingestionKey)
|
|
1761
|
+
: undefined;
|
|
1762
|
+
return message;
|
|
1763
|
+
},
|
|
1764
|
+
};
|
|
1765
|
+
|
|
1766
|
+
function createBaseServerApiKeySecret(): ServerApiKeySecret {
|
|
1767
|
+
return { serverApiKey: undefined, key: "" };
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
export const ServerApiKeySecret: MessageFns<ServerApiKeySecret> = {
|
|
1771
|
+
encode(message: ServerApiKeySecret, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1772
|
+
if (message.serverApiKey !== undefined) {
|
|
1773
|
+
ServerApiKey.encode(message.serverApiKey, writer.uint32(10).fork()).join();
|
|
1774
|
+
}
|
|
1775
|
+
if (message.key !== "") {
|
|
1776
|
+
writer.uint32(18).string(message.key);
|
|
1777
|
+
}
|
|
1778
|
+
return writer;
|
|
1779
|
+
},
|
|
1780
|
+
|
|
1781
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ServerApiKeySecret {
|
|
1782
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1783
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1784
|
+
if (previousRecursionDepth >= 100) {
|
|
1785
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1786
|
+
}
|
|
1787
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1788
|
+
try {
|
|
1789
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1790
|
+
const message = createBaseServerApiKeySecret();
|
|
1791
|
+
while (reader.pos < end) {
|
|
1792
|
+
const tag = reader.uint32();
|
|
1793
|
+
switch (tag >>> 3) {
|
|
1794
|
+
case 1: {
|
|
1795
|
+
if (tag !== 10) {
|
|
1796
|
+
break;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
message.serverApiKey = ServerApiKey.decode(reader, reader.uint32());
|
|
1800
|
+
continue;
|
|
1801
|
+
}
|
|
1802
|
+
case 2: {
|
|
1803
|
+
if (tag !== 18) {
|
|
1804
|
+
break;
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
message.key = reader.string();
|
|
1808
|
+
continue;
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1812
|
+
break;
|
|
1813
|
+
}
|
|
1814
|
+
reader.skip(tag & 7);
|
|
1815
|
+
}
|
|
1816
|
+
return message;
|
|
1817
|
+
} finally {
|
|
1818
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1819
|
+
}
|
|
1820
|
+
},
|
|
1821
|
+
|
|
1822
|
+
fromJSON(object: any): ServerApiKeySecret {
|
|
1823
|
+
return {
|
|
1824
|
+
serverApiKey: isSet(object.serverApiKey)
|
|
1825
|
+
? ServerApiKey.fromJSON(object.serverApiKey)
|
|
1826
|
+
: isSet(object.server_api_key)
|
|
1827
|
+
? ServerApiKey.fromJSON(object.server_api_key)
|
|
1828
|
+
: undefined,
|
|
1829
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1830
|
+
};
|
|
1831
|
+
},
|
|
1832
|
+
|
|
1833
|
+
toJSON(message: ServerApiKeySecret): unknown {
|
|
1834
|
+
const obj: any = {};
|
|
1835
|
+
if (message.serverApiKey !== undefined) {
|
|
1836
|
+
obj.serverApiKey = ServerApiKey.toJSON(message.serverApiKey);
|
|
1837
|
+
}
|
|
1838
|
+
if (message.key !== "") {
|
|
1839
|
+
obj.key = message.key;
|
|
1840
|
+
}
|
|
1841
|
+
return obj;
|
|
1842
|
+
},
|
|
1843
|
+
|
|
1844
|
+
create<I extends Exact<DeepPartial<ServerApiKeySecret>, I>>(base?: I): ServerApiKeySecret {
|
|
1845
|
+
return ServerApiKeySecret.fromPartial(base ?? ({} as any));
|
|
1846
|
+
},
|
|
1847
|
+
fromPartial<I extends Exact<DeepPartial<ServerApiKeySecret>, I>>(object: I): ServerApiKeySecret {
|
|
1848
|
+
const message = createBaseServerApiKeySecret();
|
|
1849
|
+
message.serverApiKey = (object.serverApiKey !== undefined && object.serverApiKey !== null)
|
|
1850
|
+
? ServerApiKey.fromPartial(object.serverApiKey)
|
|
1851
|
+
: undefined;
|
|
1852
|
+
message.key = object.key ?? "";
|
|
1853
|
+
return message;
|
|
1854
|
+
},
|
|
1855
|
+
};
|
|
1856
|
+
|
|
1857
|
+
function createBaseRevealServerApiKeyRequest(): RevealServerApiKeyRequest {
|
|
1858
|
+
return { organizationId: "", projectId: "", id: "" };
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
export const RevealServerApiKeyRequest: MessageFns<RevealServerApiKeyRequest> = {
|
|
1862
|
+
encode(message: RevealServerApiKeyRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1863
|
+
if (message.organizationId !== "") {
|
|
1864
|
+
writer.uint32(10).string(message.organizationId);
|
|
1865
|
+
}
|
|
1866
|
+
if (message.projectId !== "") {
|
|
1867
|
+
writer.uint32(18).string(message.projectId);
|
|
1868
|
+
}
|
|
1869
|
+
if (message.id !== "") {
|
|
1870
|
+
writer.uint32(26).string(message.id);
|
|
1871
|
+
}
|
|
1872
|
+
return writer;
|
|
1873
|
+
},
|
|
1874
|
+
|
|
1875
|
+
decode(input: BinaryReader | Uint8Array, length?: number): RevealServerApiKeyRequest {
|
|
1876
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1877
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1878
|
+
if (previousRecursionDepth >= 100) {
|
|
1879
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1880
|
+
}
|
|
1881
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1882
|
+
try {
|
|
1883
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1884
|
+
const message = createBaseRevealServerApiKeyRequest();
|
|
1885
|
+
while (reader.pos < end) {
|
|
1886
|
+
const tag = reader.uint32();
|
|
1887
|
+
switch (tag >>> 3) {
|
|
1888
|
+
case 1: {
|
|
1889
|
+
if (tag !== 10) {
|
|
1890
|
+
break;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
message.organizationId = reader.string();
|
|
1894
|
+
continue;
|
|
1895
|
+
}
|
|
1896
|
+
case 2: {
|
|
1897
|
+
if (tag !== 18) {
|
|
1898
|
+
break;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
message.projectId = reader.string();
|
|
1902
|
+
continue;
|
|
1903
|
+
}
|
|
1904
|
+
case 3: {
|
|
1905
|
+
if (tag !== 26) {
|
|
1906
|
+
break;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
message.id = reader.string();
|
|
1910
|
+
continue;
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1914
|
+
break;
|
|
1915
|
+
}
|
|
1916
|
+
reader.skip(tag & 7);
|
|
1917
|
+
}
|
|
1918
|
+
return message;
|
|
1919
|
+
} finally {
|
|
1920
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1921
|
+
}
|
|
1922
|
+
},
|
|
1923
|
+
|
|
1924
|
+
fromJSON(object: any): RevealServerApiKeyRequest {
|
|
1925
|
+
return {
|
|
1926
|
+
organizationId: isSet(object.organizationId)
|
|
1927
|
+
? globalThis.String(object.organizationId)
|
|
1928
|
+
: isSet(object.organization_id)
|
|
1929
|
+
? globalThis.String(object.organization_id)
|
|
1930
|
+
: "",
|
|
1931
|
+
projectId: isSet(object.projectId)
|
|
1932
|
+
? globalThis.String(object.projectId)
|
|
1933
|
+
: isSet(object.project_id)
|
|
1934
|
+
? globalThis.String(object.project_id)
|
|
1935
|
+
: "",
|
|
1936
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
1937
|
+
};
|
|
1938
|
+
},
|
|
1939
|
+
|
|
1940
|
+
toJSON(message: RevealServerApiKeyRequest): unknown {
|
|
1941
|
+
const obj: any = {};
|
|
1942
|
+
if (message.organizationId !== "") {
|
|
1943
|
+
obj.organizationId = message.organizationId;
|
|
1944
|
+
}
|
|
1945
|
+
if (message.projectId !== "") {
|
|
1946
|
+
obj.projectId = message.projectId;
|
|
1947
|
+
}
|
|
1948
|
+
if (message.id !== "") {
|
|
1949
|
+
obj.id = message.id;
|
|
1950
|
+
}
|
|
1951
|
+
return obj;
|
|
1952
|
+
},
|
|
1953
|
+
|
|
1954
|
+
create<I extends Exact<DeepPartial<RevealServerApiKeyRequest>, I>>(base?: I): RevealServerApiKeyRequest {
|
|
1955
|
+
return RevealServerApiKeyRequest.fromPartial(base ?? ({} as any));
|
|
1956
|
+
},
|
|
1957
|
+
fromPartial<I extends Exact<DeepPartial<RevealServerApiKeyRequest>, I>>(object: I): RevealServerApiKeyRequest {
|
|
1958
|
+
const message = createBaseRevealServerApiKeyRequest();
|
|
1959
|
+
message.organizationId = object.organizationId ?? "";
|
|
1960
|
+
message.projectId = object.projectId ?? "";
|
|
1961
|
+
message.id = object.id ?? "";
|
|
1962
|
+
return message;
|
|
1963
|
+
},
|
|
1964
|
+
};
|
|
1965
|
+
|
|
1966
|
+
function createBaseRevealServerApiKeyResponse(): RevealServerApiKeyResponse {
|
|
1967
|
+
return { status: undefined, serverKey: undefined };
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
export const RevealServerApiKeyResponse: MessageFns<RevealServerApiKeyResponse> = {
|
|
1971
|
+
encode(message: RevealServerApiKeyResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1972
|
+
if (message.status !== undefined) {
|
|
1973
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1974
|
+
}
|
|
1975
|
+
if (message.serverKey !== undefined) {
|
|
1976
|
+
ServerApiKeySecret.encode(message.serverKey, writer.uint32(18).fork()).join();
|
|
1977
|
+
}
|
|
1978
|
+
return writer;
|
|
1979
|
+
},
|
|
1980
|
+
|
|
1981
|
+
decode(input: BinaryReader | Uint8Array, length?: number): RevealServerApiKeyResponse {
|
|
1982
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1983
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1984
|
+
if (previousRecursionDepth >= 100) {
|
|
1985
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1986
|
+
}
|
|
1987
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1988
|
+
try {
|
|
1989
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1990
|
+
const message = createBaseRevealServerApiKeyResponse();
|
|
1991
|
+
while (reader.pos < end) {
|
|
1992
|
+
const tag = reader.uint32();
|
|
1993
|
+
switch (tag >>> 3) {
|
|
1994
|
+
case 1: {
|
|
1995
|
+
if (tag !== 10) {
|
|
1996
|
+
break;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
2000
|
+
continue;
|
|
2001
|
+
}
|
|
2002
|
+
case 2: {
|
|
2003
|
+
if (tag !== 18) {
|
|
2004
|
+
break;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
message.serverKey = ServerApiKeySecret.decode(reader, reader.uint32());
|
|
2008
|
+
continue;
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2012
|
+
break;
|
|
2013
|
+
}
|
|
2014
|
+
reader.skip(tag & 7);
|
|
2015
|
+
}
|
|
2016
|
+
return message;
|
|
2017
|
+
} finally {
|
|
2018
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2019
|
+
}
|
|
2020
|
+
},
|
|
2021
|
+
|
|
2022
|
+
fromJSON(object: any): RevealServerApiKeyResponse {
|
|
2023
|
+
return {
|
|
2024
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
2025
|
+
serverKey: isSet(object.serverKey)
|
|
2026
|
+
? ServerApiKeySecret.fromJSON(object.serverKey)
|
|
2027
|
+
: isSet(object.server_key)
|
|
2028
|
+
? ServerApiKeySecret.fromJSON(object.server_key)
|
|
2029
|
+
: undefined,
|
|
2030
|
+
};
|
|
2031
|
+
},
|
|
2032
|
+
|
|
2033
|
+
toJSON(message: RevealServerApiKeyResponse): unknown {
|
|
2034
|
+
const obj: any = {};
|
|
2035
|
+
if (message.status !== undefined) {
|
|
2036
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
2037
|
+
}
|
|
2038
|
+
if (message.serverKey !== undefined) {
|
|
2039
|
+
obj.serverKey = ServerApiKeySecret.toJSON(message.serverKey);
|
|
2040
|
+
}
|
|
2041
|
+
return obj;
|
|
2042
|
+
},
|
|
2043
|
+
|
|
2044
|
+
create<I extends Exact<DeepPartial<RevealServerApiKeyResponse>, I>>(base?: I): RevealServerApiKeyResponse {
|
|
2045
|
+
return RevealServerApiKeyResponse.fromPartial(base ?? ({} as any));
|
|
2046
|
+
},
|
|
2047
|
+
fromPartial<I extends Exact<DeepPartial<RevealServerApiKeyResponse>, I>>(object: I): RevealServerApiKeyResponse {
|
|
2048
|
+
const message = createBaseRevealServerApiKeyResponse();
|
|
2049
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
2050
|
+
? ResponseStatus.fromPartial(object.status)
|
|
2051
|
+
: undefined;
|
|
2052
|
+
message.serverKey = (object.serverKey !== undefined && object.serverKey !== null)
|
|
2053
|
+
? ServerApiKeySecret.fromPartial(object.serverKey)
|
|
2054
|
+
: undefined;
|
|
1706
2055
|
return message;
|
|
1707
2056
|
},
|
|
1708
2057
|
};
|
|
@@ -3822,7 +4171,7 @@ export const WebApiKey: MessageFns<WebApiKey> = {
|
|
|
3822
4171
|
};
|
|
3823
4172
|
|
|
3824
4173
|
function createBaseCreateServerApiKeyRequest(): CreateServerApiKeyRequest {
|
|
3825
|
-
return { organizationId: "", projectId: "", name: "", description: "" };
|
|
4174
|
+
return { organizationId: "", projectId: "", name: "", description: "", permissions: undefined };
|
|
3826
4175
|
}
|
|
3827
4176
|
|
|
3828
4177
|
export const CreateServerApiKeyRequest: MessageFns<CreateServerApiKeyRequest> = {
|
|
@@ -3839,6 +4188,9 @@ export const CreateServerApiKeyRequest: MessageFns<CreateServerApiKeyRequest> =
|
|
|
3839
4188
|
if (message.description !== "") {
|
|
3840
4189
|
writer.uint32(34).string(message.description);
|
|
3841
4190
|
}
|
|
4191
|
+
if (message.permissions !== undefined) {
|
|
4192
|
+
ServerApiKeyPermissions.encode(message.permissions, writer.uint32(42).fork()).join();
|
|
4193
|
+
}
|
|
3842
4194
|
return writer;
|
|
3843
4195
|
},
|
|
3844
4196
|
|
|
@@ -3887,6 +4239,14 @@ export const CreateServerApiKeyRequest: MessageFns<CreateServerApiKeyRequest> =
|
|
|
3887
4239
|
message.description = reader.string();
|
|
3888
4240
|
continue;
|
|
3889
4241
|
}
|
|
4242
|
+
case 5: {
|
|
4243
|
+
if (tag !== 42) {
|
|
4244
|
+
break;
|
|
4245
|
+
}
|
|
4246
|
+
|
|
4247
|
+
message.permissions = ServerApiKeyPermissions.decode(reader, reader.uint32());
|
|
4248
|
+
continue;
|
|
4249
|
+
}
|
|
3890
4250
|
}
|
|
3891
4251
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3892
4252
|
break;
|
|
@@ -3913,6 +4273,7 @@ export const CreateServerApiKeyRequest: MessageFns<CreateServerApiKeyRequest> =
|
|
|
3913
4273
|
: "",
|
|
3914
4274
|
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
3915
4275
|
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
4276
|
+
permissions: isSet(object.permissions) ? ServerApiKeyPermissions.fromJSON(object.permissions) : undefined,
|
|
3916
4277
|
};
|
|
3917
4278
|
},
|
|
3918
4279
|
|
|
@@ -3930,6 +4291,9 @@ export const CreateServerApiKeyRequest: MessageFns<CreateServerApiKeyRequest> =
|
|
|
3930
4291
|
if (message.description !== "") {
|
|
3931
4292
|
obj.description = message.description;
|
|
3932
4293
|
}
|
|
4294
|
+
if (message.permissions !== undefined) {
|
|
4295
|
+
obj.permissions = ServerApiKeyPermissions.toJSON(message.permissions);
|
|
4296
|
+
}
|
|
3933
4297
|
return obj;
|
|
3934
4298
|
},
|
|
3935
4299
|
|
|
@@ -3942,6 +4306,9 @@ export const CreateServerApiKeyRequest: MessageFns<CreateServerApiKeyRequest> =
|
|
|
3942
4306
|
message.projectId = object.projectId ?? "";
|
|
3943
4307
|
message.name = object.name ?? "";
|
|
3944
4308
|
message.description = object.description ?? "";
|
|
4309
|
+
message.permissions = (object.permissions !== undefined && object.permissions !== null)
|
|
4310
|
+
? ServerApiKeyPermissions.fromPartial(object.permissions)
|
|
4311
|
+
: undefined;
|
|
3945
4312
|
return message;
|
|
3946
4313
|
},
|
|
3947
4314
|
};
|
|
@@ -4593,7 +4960,7 @@ export const UpdateServerApiKeyRequest: MessageFns<UpdateServerApiKeyRequest> =
|
|
|
4593
4960
|
};
|
|
4594
4961
|
|
|
4595
4962
|
function createBaseUpdateServerApiKeyRequest_ServerApiKeyUpdates(): UpdateServerApiKeyRequest_ServerApiKeyUpdates {
|
|
4596
|
-
return { name: undefined };
|
|
4963
|
+
return { name: undefined, permissions: undefined };
|
|
4597
4964
|
}
|
|
4598
4965
|
|
|
4599
4966
|
export const UpdateServerApiKeyRequest_ServerApiKeyUpdates: MessageFns<UpdateServerApiKeyRequest_ServerApiKeyUpdates> =
|
|
@@ -4605,6 +4972,9 @@ export const UpdateServerApiKeyRequest_ServerApiKeyUpdates: MessageFns<UpdateSer
|
|
|
4605
4972
|
if (message.name !== undefined) {
|
|
4606
4973
|
writer.uint32(10).string(message.name);
|
|
4607
4974
|
}
|
|
4975
|
+
if (message.permissions !== undefined) {
|
|
4976
|
+
ServerApiKeyPermissions.encode(message.permissions, writer.uint32(18).fork()).join();
|
|
4977
|
+
}
|
|
4608
4978
|
return writer;
|
|
4609
4979
|
},
|
|
4610
4980
|
|
|
@@ -4629,6 +4999,14 @@ export const UpdateServerApiKeyRequest_ServerApiKeyUpdates: MessageFns<UpdateSer
|
|
|
4629
4999
|
message.name = reader.string();
|
|
4630
5000
|
continue;
|
|
4631
5001
|
}
|
|
5002
|
+
case 2: {
|
|
5003
|
+
if (tag !== 18) {
|
|
5004
|
+
break;
|
|
5005
|
+
}
|
|
5006
|
+
|
|
5007
|
+
message.permissions = ServerApiKeyPermissions.decode(reader, reader.uint32());
|
|
5008
|
+
continue;
|
|
5009
|
+
}
|
|
4632
5010
|
}
|
|
4633
5011
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4634
5012
|
break;
|
|
@@ -4642,7 +5020,10 @@ export const UpdateServerApiKeyRequest_ServerApiKeyUpdates: MessageFns<UpdateSer
|
|
|
4642
5020
|
},
|
|
4643
5021
|
|
|
4644
5022
|
fromJSON(object: any): UpdateServerApiKeyRequest_ServerApiKeyUpdates {
|
|
4645
|
-
return {
|
|
5023
|
+
return {
|
|
5024
|
+
name: isSet(object.name) ? globalThis.String(object.name) : undefined,
|
|
5025
|
+
permissions: isSet(object.permissions) ? ServerApiKeyPermissions.fromJSON(object.permissions) : undefined,
|
|
5026
|
+
};
|
|
4646
5027
|
},
|
|
4647
5028
|
|
|
4648
5029
|
toJSON(message: UpdateServerApiKeyRequest_ServerApiKeyUpdates): unknown {
|
|
@@ -4650,6 +5031,9 @@ export const UpdateServerApiKeyRequest_ServerApiKeyUpdates: MessageFns<UpdateSer
|
|
|
4650
5031
|
if (message.name !== undefined) {
|
|
4651
5032
|
obj.name = message.name;
|
|
4652
5033
|
}
|
|
5034
|
+
if (message.permissions !== undefined) {
|
|
5035
|
+
obj.permissions = ServerApiKeyPermissions.toJSON(message.permissions);
|
|
5036
|
+
}
|
|
4653
5037
|
return obj;
|
|
4654
5038
|
},
|
|
4655
5039
|
|
|
@@ -4663,6 +5047,9 @@ export const UpdateServerApiKeyRequest_ServerApiKeyUpdates: MessageFns<UpdateSer
|
|
|
4663
5047
|
): UpdateServerApiKeyRequest_ServerApiKeyUpdates {
|
|
4664
5048
|
const message = createBaseUpdateServerApiKeyRequest_ServerApiKeyUpdates();
|
|
4665
5049
|
message.name = object.name ?? undefined;
|
|
5050
|
+
message.permissions = (object.permissions !== undefined && object.permissions !== null)
|
|
5051
|
+
? ServerApiKeyPermissions.fromPartial(object.permissions)
|
|
5052
|
+
: undefined;
|
|
4666
5053
|
return message;
|
|
4667
5054
|
},
|
|
4668
5055
|
};
|
|
@@ -4938,6 +5325,107 @@ export const DeleteServerApiKeyResponse: MessageFns<DeleteServerApiKeyResponse>
|
|
|
4938
5325
|
},
|
|
4939
5326
|
};
|
|
4940
5327
|
|
|
5328
|
+
function createBaseServerApiKeyPermissions(): ServerApiKeyPermissions {
|
|
5329
|
+
return { read: false, write: false, ingest: false };
|
|
5330
|
+
}
|
|
5331
|
+
|
|
5332
|
+
export const ServerApiKeyPermissions: MessageFns<ServerApiKeyPermissions> = {
|
|
5333
|
+
encode(message: ServerApiKeyPermissions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
5334
|
+
if (message.read !== false) {
|
|
5335
|
+
writer.uint32(8).bool(message.read);
|
|
5336
|
+
}
|
|
5337
|
+
if (message.write !== false) {
|
|
5338
|
+
writer.uint32(16).bool(message.write);
|
|
5339
|
+
}
|
|
5340
|
+
if (message.ingest !== false) {
|
|
5341
|
+
writer.uint32(24).bool(message.ingest);
|
|
5342
|
+
}
|
|
5343
|
+
return writer;
|
|
5344
|
+
},
|
|
5345
|
+
|
|
5346
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ServerApiKeyPermissions {
|
|
5347
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5348
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
5349
|
+
if (previousRecursionDepth >= 100) {
|
|
5350
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
5351
|
+
}
|
|
5352
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
5353
|
+
try {
|
|
5354
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5355
|
+
const message = createBaseServerApiKeyPermissions();
|
|
5356
|
+
while (reader.pos < end) {
|
|
5357
|
+
const tag = reader.uint32();
|
|
5358
|
+
switch (tag >>> 3) {
|
|
5359
|
+
case 1: {
|
|
5360
|
+
if (tag !== 8) {
|
|
5361
|
+
break;
|
|
5362
|
+
}
|
|
5363
|
+
|
|
5364
|
+
message.read = reader.bool();
|
|
5365
|
+
continue;
|
|
5366
|
+
}
|
|
5367
|
+
case 2: {
|
|
5368
|
+
if (tag !== 16) {
|
|
5369
|
+
break;
|
|
5370
|
+
}
|
|
5371
|
+
|
|
5372
|
+
message.write = reader.bool();
|
|
5373
|
+
continue;
|
|
5374
|
+
}
|
|
5375
|
+
case 3: {
|
|
5376
|
+
if (tag !== 24) {
|
|
5377
|
+
break;
|
|
5378
|
+
}
|
|
5379
|
+
|
|
5380
|
+
message.ingest = reader.bool();
|
|
5381
|
+
continue;
|
|
5382
|
+
}
|
|
5383
|
+
}
|
|
5384
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5385
|
+
break;
|
|
5386
|
+
}
|
|
5387
|
+
reader.skip(tag & 7);
|
|
5388
|
+
}
|
|
5389
|
+
return message;
|
|
5390
|
+
} finally {
|
|
5391
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
5392
|
+
}
|
|
5393
|
+
},
|
|
5394
|
+
|
|
5395
|
+
fromJSON(object: any): ServerApiKeyPermissions {
|
|
5396
|
+
return {
|
|
5397
|
+
read: isSet(object.read) ? globalThis.Boolean(object.read) : false,
|
|
5398
|
+
write: isSet(object.write) ? globalThis.Boolean(object.write) : false,
|
|
5399
|
+
ingest: isSet(object.ingest) ? globalThis.Boolean(object.ingest) : false,
|
|
5400
|
+
};
|
|
5401
|
+
},
|
|
5402
|
+
|
|
5403
|
+
toJSON(message: ServerApiKeyPermissions): unknown {
|
|
5404
|
+
const obj: any = {};
|
|
5405
|
+
if (message.read !== false) {
|
|
5406
|
+
obj.read = message.read;
|
|
5407
|
+
}
|
|
5408
|
+
if (message.write !== false) {
|
|
5409
|
+
obj.write = message.write;
|
|
5410
|
+
}
|
|
5411
|
+
if (message.ingest !== false) {
|
|
5412
|
+
obj.ingest = message.ingest;
|
|
5413
|
+
}
|
|
5414
|
+
return obj;
|
|
5415
|
+
},
|
|
5416
|
+
|
|
5417
|
+
create<I extends Exact<DeepPartial<ServerApiKeyPermissions>, I>>(base?: I): ServerApiKeyPermissions {
|
|
5418
|
+
return ServerApiKeyPermissions.fromPartial(base ?? ({} as any));
|
|
5419
|
+
},
|
|
5420
|
+
fromPartial<I extends Exact<DeepPartial<ServerApiKeyPermissions>, I>>(object: I): ServerApiKeyPermissions {
|
|
5421
|
+
const message = createBaseServerApiKeyPermissions();
|
|
5422
|
+
message.read = object.read ?? false;
|
|
5423
|
+
message.write = object.write ?? false;
|
|
5424
|
+
message.ingest = object.ingest ?? false;
|
|
5425
|
+
return message;
|
|
5426
|
+
},
|
|
5427
|
+
};
|
|
5428
|
+
|
|
4941
5429
|
function createBaseServerApiKey(): ServerApiKey {
|
|
4942
5430
|
return {
|
|
4943
5431
|
id: "",
|
|
@@ -4950,6 +5438,7 @@ function createBaseServerApiKey(): ServerApiKey {
|
|
|
4950
5438
|
updatedAt: undefined,
|
|
4951
5439
|
createdBy: "",
|
|
4952
5440
|
lastUsedAt: undefined,
|
|
5441
|
+
permissions: undefined,
|
|
4953
5442
|
};
|
|
4954
5443
|
}
|
|
4955
5444
|
|
|
@@ -4985,6 +5474,9 @@ export const ServerApiKey: MessageFns<ServerApiKey> = {
|
|
|
4985
5474
|
if (message.lastUsedAt !== undefined) {
|
|
4986
5475
|
Timestamp.encode(toTimestamp(message.lastUsedAt), writer.uint32(82).fork()).join();
|
|
4987
5476
|
}
|
|
5477
|
+
if (message.permissions !== undefined) {
|
|
5478
|
+
ServerApiKeyPermissions.encode(message.permissions, writer.uint32(90).fork()).join();
|
|
5479
|
+
}
|
|
4988
5480
|
return writer;
|
|
4989
5481
|
},
|
|
4990
5482
|
|
|
@@ -5081,6 +5573,14 @@ export const ServerApiKey: MessageFns<ServerApiKey> = {
|
|
|
5081
5573
|
message.lastUsedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
5082
5574
|
continue;
|
|
5083
5575
|
}
|
|
5576
|
+
case 11: {
|
|
5577
|
+
if (tag !== 90) {
|
|
5578
|
+
break;
|
|
5579
|
+
}
|
|
5580
|
+
|
|
5581
|
+
message.permissions = ServerApiKeyPermissions.decode(reader, reader.uint32());
|
|
5582
|
+
continue;
|
|
5583
|
+
}
|
|
5084
5584
|
}
|
|
5085
5585
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5086
5586
|
break;
|
|
@@ -5129,6 +5629,7 @@ export const ServerApiKey: MessageFns<ServerApiKey> = {
|
|
|
5129
5629
|
: isSet(object.last_used_at)
|
|
5130
5630
|
? fromJsonTimestamp(object.last_used_at)
|
|
5131
5631
|
: undefined,
|
|
5632
|
+
permissions: isSet(object.permissions) ? ServerApiKeyPermissions.fromJSON(object.permissions) : undefined,
|
|
5132
5633
|
};
|
|
5133
5634
|
},
|
|
5134
5635
|
|
|
@@ -5164,6 +5665,9 @@ export const ServerApiKey: MessageFns<ServerApiKey> = {
|
|
|
5164
5665
|
if (message.lastUsedAt !== undefined) {
|
|
5165
5666
|
obj.lastUsedAt = message.lastUsedAt.toISOString();
|
|
5166
5667
|
}
|
|
5668
|
+
if (message.permissions !== undefined) {
|
|
5669
|
+
obj.permissions = ServerApiKeyPermissions.toJSON(message.permissions);
|
|
5670
|
+
}
|
|
5167
5671
|
return obj;
|
|
5168
5672
|
},
|
|
5169
5673
|
|
|
@@ -5182,6 +5686,9 @@ export const ServerApiKey: MessageFns<ServerApiKey> = {
|
|
|
5182
5686
|
message.updatedAt = object.updatedAt ?? undefined;
|
|
5183
5687
|
message.createdBy = object.createdBy ?? "";
|
|
5184
5688
|
message.lastUsedAt = object.lastUsedAt ?? undefined;
|
|
5689
|
+
message.permissions = (object.permissions !== undefined && object.permissions !== null)
|
|
5690
|
+
? ServerApiKeyPermissions.fromPartial(object.permissions)
|
|
5691
|
+
: undefined;
|
|
5185
5692
|
return message;
|
|
5186
5693
|
},
|
|
5187
5694
|
};
|
|
@@ -8557,6 +9064,7 @@ export interface AccountGatewayService {
|
|
|
8557
9064
|
Logon(request: LogonRequest, metadata?: Metadata): Promise<LogonResponse>;
|
|
8558
9065
|
/** Project operations */
|
|
8559
9066
|
CreateProject(request: CreateProjectRequest, metadata?: Metadata): Promise<CreateProjectResponse>;
|
|
9067
|
+
RevealServerApiKey(request: RevealServerApiKeyRequest, metadata?: Metadata): Promise<RevealServerApiKeyResponse>;
|
|
8560
9068
|
ListProjects(request: ListProjectsRequest, metadata?: Metadata): Promise<ListProjectsResponse>;
|
|
8561
9069
|
UpdateProject(request: UpdateProjectRequest, metadata?: Metadata): Promise<UpdateProjectResponse>;
|
|
8562
9070
|
DeleteProject(request: DeleteProjectRequest, metadata?: Metadata): Promise<DeleteProjectResponse>;
|
|
@@ -8610,6 +9118,7 @@ export class AccountGatewayServiceClientImpl implements AccountGatewayService {
|
|
|
8610
9118
|
this.rpc = rpc;
|
|
8611
9119
|
this.Logon = this.Logon.bind(this);
|
|
8612
9120
|
this.CreateProject = this.CreateProject.bind(this);
|
|
9121
|
+
this.RevealServerApiKey = this.RevealServerApiKey.bind(this);
|
|
8613
9122
|
this.ListProjects = this.ListProjects.bind(this);
|
|
8614
9123
|
this.UpdateProject = this.UpdateProject.bind(this);
|
|
8615
9124
|
this.DeleteProject = this.DeleteProject.bind(this);
|
|
@@ -8651,6 +9160,12 @@ export class AccountGatewayServiceClientImpl implements AccountGatewayService {
|
|
|
8651
9160
|
return promise.then((data) => CreateProjectResponse.decode(new BinaryReader(data)));
|
|
8652
9161
|
}
|
|
8653
9162
|
|
|
9163
|
+
RevealServerApiKey(request: RevealServerApiKeyRequest, metadata?: Metadata): Promise<RevealServerApiKeyResponse> {
|
|
9164
|
+
const data = RevealServerApiKeyRequest.encode(request).finish();
|
|
9165
|
+
const promise = this.rpc.request(this.service, "RevealServerApiKey", data, metadata);
|
|
9166
|
+
return promise.then((data) => RevealServerApiKeyResponse.decode(new BinaryReader(data)));
|
|
9167
|
+
}
|
|
9168
|
+
|
|
8654
9169
|
ListProjects(request: ListProjectsRequest, metadata?: Metadata): Promise<ListProjectsResponse> {
|
|
8655
9170
|
const data = ListProjectsRequest.encode(request).finish();
|
|
8656
9171
|
const promise = this.rpc.request(this.service, "ListProjects", data, metadata);
|