Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove selfHostedServer from deviceInfo.deviceType rpc #807

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading