Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3377872
D12857.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D12857.diff
View Options
diff --git a/lib/types/tunnelbroker/message-receive-confirmation-types.js b/lib/types/tunnelbroker/message-receive-confirmation-types.js
--- a/lib/types/tunnelbroker/message-receive-confirmation-types.js
+++ b/lib/types/tunnelbroker/message-receive-confirmation-types.js
@@ -1,17 +1,6 @@
// @flow
-import type { TInterface } from 'tcomb';
-import t from 'tcomb';
-
-import { tShape, tString } from '../../utils/validation-utils.js';
-
export type MessageReceiveConfirmation = {
+type: 'MessageReceiveConfirmation',
+messageIDs: $ReadOnlyArray<string>,
};
-
-export const messageReceiveConfirmationValidator: TInterface<MessageReceiveConfirmation> =
- tShape<MessageReceiveConfirmation>({
- type: tString('MessageReceiveConfirmation'),
- messageIDs: t.list(t.String),
- });
diff --git a/lib/types/tunnelbroker/message-to-device-request-types.js b/lib/types/tunnelbroker/message-to-device-request-types.js
--- a/lib/types/tunnelbroker/message-to-device-request-types.js
+++ b/lib/types/tunnelbroker/message-to-device-request-types.js
@@ -1,21 +1,8 @@
// @flow
-import type { TInterface } from 'tcomb';
-import t from 'tcomb';
-
-import { tShape, tString } from '../../utils/validation-utils.js';
-
export type MessageToDeviceRequest = {
+type: 'MessageToDeviceRequest',
+clientMessageID: string,
+deviceID: string,
+payload: string,
};
-
-export const messageToDeviceRequestValidator: TInterface<MessageToDeviceRequest> =
- tShape<MessageToDeviceRequest>({
- type: tString('MessageToDeviceRequest'),
- clientMessageID: t.String,
- deviceID: t.String,
- payload: t.String,
- });
diff --git a/lib/types/tunnelbroker/message-to-tunnelbroker-request-types.js b/lib/types/tunnelbroker/message-to-tunnelbroker-request-types.js
--- a/lib/types/tunnelbroker/message-to-tunnelbroker-request-types.js
+++ b/lib/types/tunnelbroker/message-to-tunnelbroker-request-types.js
@@ -1,19 +1,7 @@
// @flow
-import type { TInterface } from 'tcomb';
-import t from 'tcomb';
-
-import { tShape, tString } from '../../utils/validation-utils.js';
-
export type MessageToTunnelbrokerRequest = {
+type: 'MessageToTunnelbrokerRequest',
+clientMessageID: string,
+payload: string,
};
-
-export const messageToTunnelbrokerRequestValidator: TInterface<MessageToTunnelbrokerRequest> =
- tShape<MessageToTunnelbrokerRequest>({
- type: tString('MessageToTunnelbrokerRequest'),
- clientMessageID: t.String,
- payload: t.String,
- });
diff --git a/lib/types/tunnelbroker/session-types.js b/lib/types/tunnelbroker/session-types.js
--- a/lib/types/tunnelbroker/session-types.js
+++ b/lib/types/tunnelbroker/session-types.js
@@ -1,10 +1,5 @@
// @flow
-import type { TInterface } from 'tcomb';
-import t from 'tcomb';
-
-import { tShape, tString, tUserID } from '../../utils/validation-utils.js';
-
export type TunnelbrokerDeviceTypes = 'mobile' | 'web' | 'keyserver';
export type ConnectionInitializationMessage = {
@@ -29,24 +24,3 @@
export type TunnelbrokerInitializationMessage =
| ConnectionInitializationMessage
| AnonymousInitializationMessage;
-
-export const connectionInitializationMessageValidator: TInterface<ConnectionInitializationMessage> =
- tShape<ConnectionInitializationMessage>({
- type: tString('ConnectionInitializationMessage'),
- deviceID: t.String,
- accessToken: t.String,
- userID: tUserID,
- notifyToken: t.maybe(t.String),
- deviceType: t.enums.of(['mobile', 'web', 'keyserver']),
- deviceAppVersion: t.maybe(t.String),
- deviceOS: t.maybe(t.String),
- });
-
-export const anonymousInitializationMessageValidator: TInterface<AnonymousInitializationMessage> =
- tShape<AnonymousInitializationMessage>({
- type: tString('AnonymousInitializationMessage'),
- deviceID: t.String,
- deviceType: t.enums.of(['mobile', 'web', 'keyserver']),
- deviceAppVersion: t.maybe(t.String),
- deviceOS: t.maybe(t.String),
- });
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 7:55 AM (20 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2593307
Default Alt Text
D12857.diff (3 KB)
Attached To
Mode
D12857: [lib] remove unused Tunnelbroker message validators
Attached
Detach File
Event Timeline
Log In to Comment