Skip to content

Commit

Permalink
fix: remove selfHostedServer from deviceInfo.deviceType rpc (#807)
Browse files Browse the repository at this point in the history
remove `selfHostedServer` from `deviceInfo.deviceType` rpc

Co-authored-by: Tomás Ciccola <[email protected]>
  • Loading branch information
tomasciccola and Tomás Ciccola authored Sep 2, 2024
1 parent f1fc61f commit e9e427a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
1 change: 0 additions & 1 deletion proto/rpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ message DeviceInfo {
mobile = 1;
tablet = 2;
desktop = 3;
selfHostedServer = 4;
}
string name = 1;
optional DeviceType deviceType = 2;
Expand Down
1 change: 0 additions & 1 deletion src/generated/rpc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export declare const DeviceInfo_DeviceType: {
readonly mobile: "mobile";
readonly tablet: "tablet";
readonly desktop: "desktop";
readonly selfHostedServer: "selfHostedServer";
readonly UNRECOGNIZED: "UNRECOGNIZED";
};
export type DeviceInfo_DeviceType = typeof DeviceInfo_DeviceType[keyof typeof DeviceInfo_DeviceType];
Expand Down
6 changes: 0 additions & 6 deletions src/generated/rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export var DeviceInfo_DeviceType = {
mobile: "mobile",
tablet: "tablet",
desktop: "desktop",
selfHostedServer: "selfHostedServer",
UNRECOGNIZED: "UNRECOGNIZED",
};
export function deviceInfo_DeviceTypeFromJSON(object) {
Expand All @@ -65,9 +64,6 @@ export function deviceInfo_DeviceTypeFromJSON(object) {
case 3:
case "desktop":
return DeviceInfo_DeviceType.desktop;
case 4:
case "selfHostedServer":
return DeviceInfo_DeviceType.selfHostedServer;
case -1:
case "UNRECOGNIZED":
default:
Expand All @@ -84,8 +80,6 @@ export function deviceInfo_DeviceTypeToNumber(object) {
return 2;
case DeviceInfo_DeviceType.desktop:
return 3;
case DeviceInfo_DeviceType.selfHostedServer:
return 4;
case DeviceInfo_DeviceType.UNRECOGNIZED:
default:
return -1;
Expand Down
6 changes: 0 additions & 6 deletions src/generated/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export const DeviceInfo_DeviceType = {
mobile: "mobile",
tablet: "tablet",
desktop: "desktop",
selfHostedServer: "selfHostedServer",
UNRECOGNIZED: "UNRECOGNIZED",
} as const;

Expand All @@ -103,9 +102,6 @@ export function deviceInfo_DeviceTypeFromJSON(object: any): DeviceInfo_DeviceTyp
case 3:
case "desktop":
return DeviceInfo_DeviceType.desktop;
case 4:
case "selfHostedServer":
return DeviceInfo_DeviceType.selfHostedServer;
case -1:
case "UNRECOGNIZED":
default:
Expand All @@ -123,8 +119,6 @@ export function deviceInfo_DeviceTypeToNumber(object: DeviceInfo_DeviceType): nu
return 2;
case DeviceInfo_DeviceType.desktop:
return 3;
case DeviceInfo_DeviceType.selfHostedServer:
return 4;
case DeviceInfo_DeviceType.UNRECOGNIZED:
default:
return -1;
Expand Down
9 changes: 8 additions & 1 deletion src/mapeo-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,14 @@ export class MapeoManager extends TypedEmitter {
}

/**
* @template {import('type-fest').Exact<import('./schema/client.js').DeviceInfoParam, T>} T
* @typedef {Exclude<
* import('./schema/client.js').DeviceInfoParam['deviceType'],
* 'selfHostedServer'>} RPCDeviceType
*/

/**
* @template {import('type-fest').Exact<
* import('./schema/client.js').DeviceInfoParam & {deviceType?: RPCDeviceType}, T>} T
* @param {T} deviceInfo
*/
async setDeviceInfo(deviceInfo) {
Expand Down

0 comments on commit e9e427a

Please sign in to comment.