Add iOS node push-token registration foundation
This commit is contained in:
@@ -144,6 +144,7 @@ describe('configSchema — server', () => {
|
||||
expect(result.server.nodes.allowed_roles).toEqual(['companion']);
|
||||
expect(result.server.nodes.feature_gates).toEqual({});
|
||||
expect(result.server.nodes.location.enabled).toBe(false);
|
||||
expect(result.server.nodes.push.enabled).toBe(false);
|
||||
});
|
||||
|
||||
it('accepts custom node policy settings', () => {
|
||||
@@ -160,6 +161,9 @@ describe('configSchema — server', () => {
|
||||
location: {
|
||||
enabled: true,
|
||||
},
|
||||
push: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -168,6 +172,7 @@ describe('configSchema — server', () => {
|
||||
expect(result.server.nodes.feature_gates['ui.canvas']).toBe(true);
|
||||
expect(result.server.nodes.feature_gates['fs.sync']).toBe(false);
|
||||
expect(result.server.nodes.location.enabled).toBe(true);
|
||||
expect(result.server.nodes.push.enabled).toBe(true);
|
||||
});
|
||||
|
||||
it('accepts custom discovery settings', () => {
|
||||
|
||||
@@ -91,6 +91,11 @@ const serverNodePolicySchema = z.object({
|
||||
/** Enable node.location.set/get and system.location visibility. */
|
||||
enabled: z.boolean().default(false),
|
||||
}).default({}),
|
||||
/** Node push registration controls (e.g. APNs for iOS companion). */
|
||||
push: z.object({
|
||||
/** Enable node.push_token.set and push summary visibility in system.nodes. */
|
||||
enabled: z.boolean().default(false),
|
||||
}).default({}),
|
||||
}).default({});
|
||||
|
||||
const serverSchema = z.object({
|
||||
|
||||
Reference in New Issue
Block a user