gtypee 1.0.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.
- package/LICENSE +15 -0
- package/README.md +1442 -0
- package/dist/bin/gtypee.d.ts +3 -0
- package/dist/bin/gtypee.d.ts.map +1 -0
- package/dist/bin/gtypee.js +18 -0
- package/dist/bin/gtypee.js.map +1 -0
- package/dist/src/authclient/authclient.d.ts +11 -0
- package/dist/src/authclient/authclient.d.ts.map +1 -0
- package/dist/src/authclient/authclient.js +26 -0
- package/dist/src/authclient/authclient.js.map +1 -0
- package/dist/src/cmd/agent/commands.d.ts +3 -0
- package/dist/src/cmd/agent/commands.d.ts.map +1 -0
- package/dist/src/cmd/agent/commands.js +16 -0
- package/dist/src/cmd/agent/commands.js.map +1 -0
- package/dist/src/cmd/appscript/commands.d.ts +24 -0
- package/dist/src/cmd/appscript/commands.d.ts.map +1 -0
- package/dist/src/cmd/appscript/commands.js +116 -0
- package/dist/src/cmd/appscript/commands.js.map +1 -0
- package/dist/src/cmd/appscript/runtime.d.ts +4 -0
- package/dist/src/cmd/appscript/runtime.d.ts.map +1 -0
- package/dist/src/cmd/appscript/runtime.js +64 -0
- package/dist/src/cmd/appscript/runtime.js.map +1 -0
- package/dist/src/cmd/auth/commands.d.ts +67 -0
- package/dist/src/cmd/auth/commands.d.ts.map +1 -0
- package/dist/src/cmd/auth/commands.js +184 -0
- package/dist/src/cmd/auth/commands.js.map +1 -0
- package/dist/src/cmd/auth/runtime.d.ts +20 -0
- package/dist/src/cmd/auth/runtime.d.ts.map +1 -0
- package/dist/src/cmd/auth/runtime.js +237 -0
- package/dist/src/cmd/auth/runtime.js.map +1 -0
- package/dist/src/cmd/calendar/commands.d.ts +58 -0
- package/dist/src/cmd/calendar/commands.d.ts.map +1 -0
- package/dist/src/cmd/calendar/commands.js +161 -0
- package/dist/src/cmd/calendar/commands.js.map +1 -0
- package/dist/src/cmd/calendar/runtime.d.ts +4 -0
- package/dist/src/cmd/calendar/runtime.d.ts.map +1 -0
- package/dist/src/cmd/calendar/runtime.js +164 -0
- package/dist/src/cmd/calendar/runtime.js.map +1 -0
- package/dist/src/cmd/chat/commands.d.ts +27 -0
- package/dist/src/cmd/chat/commands.d.ts.map +1 -0
- package/dist/src/cmd/chat/commands.js +113 -0
- package/dist/src/cmd/chat/commands.js.map +1 -0
- package/dist/src/cmd/chat/runtime.d.ts +4 -0
- package/dist/src/cmd/chat/runtime.d.ts.map +1 -0
- package/dist/src/cmd/chat/runtime.js +67 -0
- package/dist/src/cmd/chat/runtime.js.map +1 -0
- package/dist/src/cmd/classroom/commands.d.ts +22 -0
- package/dist/src/cmd/classroom/commands.d.ts.map +1 -0
- package/dist/src/cmd/classroom/commands.js +91 -0
- package/dist/src/cmd/classroom/commands.js.map +1 -0
- package/dist/src/cmd/classroom/runtime.d.ts +4 -0
- package/dist/src/cmd/classroom/runtime.d.ts.map +1 -0
- package/dist/src/cmd/classroom/runtime.js +67 -0
- package/dist/src/cmd/classroom/runtime.js.map +1 -0
- package/dist/src/cmd/command-registry.d.ts +8 -0
- package/dist/src/cmd/command-registry.d.ts.map +1 -0
- package/dist/src/cmd/command-registry.js +40 -0
- package/dist/src/cmd/command-registry.js.map +1 -0
- package/dist/src/cmd/completion/commands.d.ts +3 -0
- package/dist/src/cmd/completion/commands.d.ts.map +1 -0
- package/dist/src/cmd/completion/commands.js +29 -0
- package/dist/src/cmd/completion/commands.js.map +1 -0
- package/dist/src/cmd/config/commands.d.ts +10 -0
- package/dist/src/cmd/config/commands.d.ts.map +1 -0
- package/dist/src/cmd/config/commands.js +106 -0
- package/dist/src/cmd/config/commands.js.map +1 -0
- package/dist/src/cmd/contacts/commands.d.ts +18 -0
- package/dist/src/cmd/contacts/commands.d.ts.map +1 -0
- package/dist/src/cmd/contacts/commands.js +79 -0
- package/dist/src/cmd/contacts/commands.js.map +1 -0
- package/dist/src/cmd/contacts/runtime.d.ts +4 -0
- package/dist/src/cmd/contacts/runtime.d.ts.map +1 -0
- package/dist/src/cmd/contacts/runtime.js +67 -0
- package/dist/src/cmd/contacts/runtime.js.map +1 -0
- package/dist/src/cmd/docs/commands.d.ts +24 -0
- package/dist/src/cmd/docs/commands.d.ts.map +1 -0
- package/dist/src/cmd/docs/commands.js +82 -0
- package/dist/src/cmd/docs/commands.js.map +1 -0
- package/dist/src/cmd/docs/runtime.d.ts +4 -0
- package/dist/src/cmd/docs/runtime.d.ts.map +1 -0
- package/dist/src/cmd/docs/runtime.js +77 -0
- package/dist/src/cmd/docs/runtime.js.map +1 -0
- package/dist/src/cmd/drive/commands.d.ts +112 -0
- package/dist/src/cmd/drive/commands.d.ts.map +1 -0
- package/dist/src/cmd/drive/commands.js +431 -0
- package/dist/src/cmd/drive/commands.js.map +1 -0
- package/dist/src/cmd/drive/runtime.d.ts +4 -0
- package/dist/src/cmd/drive/runtime.d.ts.map +1 -0
- package/dist/src/cmd/drive/runtime.js +336 -0
- package/dist/src/cmd/drive/runtime.js.map +1 -0
- package/dist/src/cmd/execution-context.d.ts +33 -0
- package/dist/src/cmd/execution-context.d.ts.map +1 -0
- package/dist/src/cmd/execution-context.js +31 -0
- package/dist/src/cmd/execution-context.js.map +1 -0
- package/dist/src/cmd/exit-codes/commands.d.ts +5 -0
- package/dist/src/cmd/exit-codes/commands.d.ts.map +1 -0
- package/dist/src/cmd/exit-codes/commands.js +25 -0
- package/dist/src/cmd/exit-codes/commands.js.map +1 -0
- package/dist/src/cmd/exit-codes.d.ts +4 -0
- package/dist/src/cmd/exit-codes.d.ts.map +1 -0
- package/dist/src/cmd/exit-codes.js +4 -0
- package/dist/src/cmd/exit-codes.js.map +1 -0
- package/dist/src/cmd/exit.d.ts +7 -0
- package/dist/src/cmd/exit.d.ts.map +1 -0
- package/dist/src/cmd/exit.js +19 -0
- package/dist/src/cmd/exit.js.map +1 -0
- package/dist/src/cmd/forms/commands.d.ts +19 -0
- package/dist/src/cmd/forms/commands.d.ts.map +1 -0
- package/dist/src/cmd/forms/commands.js +73 -0
- package/dist/src/cmd/forms/commands.js.map +1 -0
- package/dist/src/cmd/forms/runtime.d.ts +4 -0
- package/dist/src/cmd/forms/runtime.d.ts.map +1 -0
- package/dist/src/cmd/forms/runtime.js +38 -0
- package/dist/src/cmd/forms/runtime.js.map +1 -0
- package/dist/src/cmd/gmail/commands.d.ts +187 -0
- package/dist/src/cmd/gmail/commands.d.ts.map +1 -0
- package/dist/src/cmd/gmail/commands.js +767 -0
- package/dist/src/cmd/gmail/commands.js.map +1 -0
- package/dist/src/cmd/gmail/runtime.d.ts +9 -0
- package/dist/src/cmd/gmail/runtime.d.ts.map +1 -0
- package/dist/src/cmd/gmail/runtime.js +644 -0
- package/dist/src/cmd/gmail/runtime.js.map +1 -0
- package/dist/src/cmd/groups/commands.d.ts +26 -0
- package/dist/src/cmd/groups/commands.d.ts.map +1 -0
- package/dist/src/cmd/groups/commands.js +105 -0
- package/dist/src/cmd/groups/commands.js.map +1 -0
- package/dist/src/cmd/groups/runtime.d.ts +4 -0
- package/dist/src/cmd/groups/runtime.d.ts.map +1 -0
- package/dist/src/cmd/groups/runtime.js +61 -0
- package/dist/src/cmd/groups/runtime.js.map +1 -0
- package/dist/src/cmd/keep/commands.d.ts +23 -0
- package/dist/src/cmd/keep/commands.d.ts.map +1 -0
- package/dist/src/cmd/keep/commands.js +111 -0
- package/dist/src/cmd/keep/commands.js.map +1 -0
- package/dist/src/cmd/keep/runtime.d.ts +4 -0
- package/dist/src/cmd/keep/runtime.d.ts.map +1 -0
- package/dist/src/cmd/keep/runtime.js +82 -0
- package/dist/src/cmd/keep/runtime.js.map +1 -0
- package/dist/src/cmd/people/commands.d.ts +22 -0
- package/dist/src/cmd/people/commands.d.ts.map +1 -0
- package/dist/src/cmd/people/commands.js +96 -0
- package/dist/src/cmd/people/commands.js.map +1 -0
- package/dist/src/cmd/people/runtime.d.ts +4 -0
- package/dist/src/cmd/people/runtime.d.ts.map +1 -0
- package/dist/src/cmd/people/runtime.js +65 -0
- package/dist/src/cmd/people/runtime.js.map +1 -0
- package/dist/src/cmd/rewrite-desire-path-args.d.ts +2 -0
- package/dist/src/cmd/rewrite-desire-path-args.d.ts.map +1 -0
- package/dist/src/cmd/rewrite-desire-path-args.js +75 -0
- package/dist/src/cmd/rewrite-desire-path-args.js.map +1 -0
- package/dist/src/cmd/root.d.ts +10 -0
- package/dist/src/cmd/root.d.ts.map +1 -0
- package/dist/src/cmd/root.js +341 -0
- package/dist/src/cmd/root.js.map +1 -0
- package/dist/src/cmd/schema/commands.d.ts +3 -0
- package/dist/src/cmd/schema/commands.d.ts.map +1 -0
- package/dist/src/cmd/schema/commands.js +21 -0
- package/dist/src/cmd/schema/commands.js.map +1 -0
- package/dist/src/cmd/script-path.d.ts +2 -0
- package/dist/src/cmd/script-path.d.ts.map +1 -0
- package/dist/src/cmd/script-path.js +4 -0
- package/dist/src/cmd/script-path.js.map +1 -0
- package/dist/src/cmd/sheets/commands.d.ts +20 -0
- package/dist/src/cmd/sheets/commands.d.ts.map +1 -0
- package/dist/src/cmd/sheets/commands.js +79 -0
- package/dist/src/cmd/sheets/commands.js.map +1 -0
- package/dist/src/cmd/sheets/runtime.d.ts +4 -0
- package/dist/src/cmd/sheets/runtime.d.ts.map +1 -0
- package/dist/src/cmd/sheets/runtime.js +37 -0
- package/dist/src/cmd/sheets/runtime.js.map +1 -0
- package/dist/src/cmd/slides/commands.d.ts +24 -0
- package/dist/src/cmd/slides/commands.d.ts.map +1 -0
- package/dist/src/cmd/slides/commands.js +90 -0
- package/dist/src/cmd/slides/commands.js.map +1 -0
- package/dist/src/cmd/slides/runtime.d.ts +4 -0
- package/dist/src/cmd/slides/runtime.d.ts.map +1 -0
- package/dist/src/cmd/slides/runtime.js +92 -0
- package/dist/src/cmd/slides/runtime.js.map +1 -0
- package/dist/src/cmd/tasks/commands.d.ts +28 -0
- package/dist/src/cmd/tasks/commands.d.ts.map +1 -0
- package/dist/src/cmd/tasks/commands.js +103 -0
- package/dist/src/cmd/tasks/commands.js.map +1 -0
- package/dist/src/cmd/tasks/runtime.d.ts +4 -0
- package/dist/src/cmd/tasks/runtime.d.ts.map +1 -0
- package/dist/src/cmd/tasks/runtime.js +56 -0
- package/dist/src/cmd/tasks/runtime.js.map +1 -0
- package/dist/src/cmd/time/commands.d.ts +17 -0
- package/dist/src/cmd/time/commands.d.ts.map +1 -0
- package/dist/src/cmd/time/commands.js +88 -0
- package/dist/src/cmd/time/commands.js.map +1 -0
- package/dist/src/cmd/version/commands.d.ts +3 -0
- package/dist/src/cmd/version/commands.d.ts.map +1 -0
- package/dist/src/cmd/version/commands.js +17 -0
- package/dist/src/cmd/version/commands.js.map +1 -0
- package/dist/src/cmd/workspace/commands.d.ts +222 -0
- package/dist/src/cmd/workspace/commands.d.ts.map +1 -0
- package/dist/src/cmd/workspace/commands.js +685 -0
- package/dist/src/cmd/workspace/commands.js.map +1 -0
- package/dist/src/cmd/workspace/runtime.d.ts +8 -0
- package/dist/src/cmd/workspace/runtime.d.ts.map +1 -0
- package/dist/src/cmd/workspace/runtime.js +852 -0
- package/dist/src/cmd/workspace/runtime.js.map +1 -0
- package/dist/src/config/clients.d.ts +8 -0
- package/dist/src/config/clients.d.ts.map +1 -0
- package/dist/src/config/clients.js +95 -0
- package/dist/src/config/clients.js.map +1 -0
- package/dist/src/config/config.d.ts +11 -0
- package/dist/src/config/config.d.ts.map +1 -0
- package/dist/src/config/config.js +54 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/credentials.d.ts +16 -0
- package/dist/src/config/credentials.d.ts.map +1 -0
- package/dist/src/config/credentials.js +97 -0
- package/dist/src/config/credentials.js.map +1 -0
- package/dist/src/config/migration.d.ts +13 -0
- package/dist/src/config/migration.d.ts.map +1 -0
- package/dist/src/config/migration.js +70 -0
- package/dist/src/config/migration.js.map +1 -0
- package/dist/src/config/paths.d.ts +11 -0
- package/dist/src/config/paths.d.ts.map +1 -0
- package/dist/src/config/paths.js +74 -0
- package/dist/src/config/paths.js.map +1 -0
- package/dist/src/googleapi/auth-factory.d.ts +46 -0
- package/dist/src/googleapi/auth-factory.d.ts.map +1 -0
- package/dist/src/googleapi/auth-factory.js +88 -0
- package/dist/src/googleapi/auth-factory.js.map +1 -0
- package/dist/src/googleapi/calendar.d.ts +3 -0
- package/dist/src/googleapi/calendar.d.ts.map +1 -0
- package/dist/src/googleapi/calendar.js +21 -0
- package/dist/src/googleapi/calendar.js.map +1 -0
- package/dist/src/googleapi/circuitbreaker.d.ts +19 -0
- package/dist/src/googleapi/circuitbreaker.d.ts.map +1 -0
- package/dist/src/googleapi/circuitbreaker.js +43 -0
- package/dist/src/googleapi/circuitbreaker.js.map +1 -0
- package/dist/src/googleapi/client.d.ts +17 -0
- package/dist/src/googleapi/client.d.ts.map +1 -0
- package/dist/src/googleapi/client.js +18 -0
- package/dist/src/googleapi/client.js.map +1 -0
- package/dist/src/googleapi/drive.d.ts +3 -0
- package/dist/src/googleapi/drive.d.ts.map +1 -0
- package/dist/src/googleapi/drive.js +11 -0
- package/dist/src/googleapi/drive.js.map +1 -0
- package/dist/src/googleapi/errors.d.ts +37 -0
- package/dist/src/googleapi/errors.d.ts.map +1 -0
- package/dist/src/googleapi/errors.js +93 -0
- package/dist/src/googleapi/errors.js.map +1 -0
- package/dist/src/googleapi/retry-constants.d.ts +5 -0
- package/dist/src/googleapi/retry-constants.d.ts.map +1 -0
- package/dist/src/googleapi/retry-constants.js +5 -0
- package/dist/src/googleapi/retry-constants.js.map +1 -0
- package/dist/src/googleapi/transport.d.ts +3 -0
- package/dist/src/googleapi/transport.d.ts.map +1 -0
- package/dist/src/googleapi/transport.js +39 -0
- package/dist/src/googleapi/transport.js.map +1 -0
- package/dist/src/googleauth/oauth-flow.d.ts +62 -0
- package/dist/src/googleauth/oauth-flow.d.ts.map +1 -0
- package/dist/src/googleauth/oauth-flow.js +262 -0
- package/dist/src/googleauth/oauth-flow.js.map +1 -0
- package/dist/src/googleauth/service.d.ts +28 -0
- package/dist/src/googleauth/service.d.ts.map +1 -0
- package/dist/src/googleauth/service.js +345 -0
- package/dist/src/googleauth/service.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/outfmt/outfmt.d.ts +8 -0
- package/dist/src/outfmt/outfmt.d.ts.map +1 -0
- package/dist/src/outfmt/outfmt.js +66 -0
- package/dist/src/outfmt/outfmt.js.map +1 -0
- package/dist/src/secrets/store.d.ts +61 -0
- package/dist/src/secrets/store.d.ts.map +1 -0
- package/dist/src/secrets/store.js +247 -0
- package/dist/src/secrets/store.js.map +1 -0
- package/dist/test/authclient/authclient.test.d.ts +2 -0
- package/dist/test/authclient/authclient.test.d.ts.map +1 -0
- package/dist/test/authclient/authclient.test.js +14 -0
- package/dist/test/authclient/authclient.test.js.map +1 -0
- package/dist/test/bin/gtypee-entrypoint.test.d.ts +2 -0
- package/dist/test/bin/gtypee-entrypoint.test.d.ts.map +1 -0
- package/dist/test/bin/gtypee-entrypoint.test.js +17 -0
- package/dist/test/bin/gtypee-entrypoint.test.js.map +1 -0
- package/dist/test/cmd/agent/commands.test.d.ts +2 -0
- package/dist/test/cmd/agent/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/agent/commands.test.js +12 -0
- package/dist/test/cmd/agent/commands.test.js.map +1 -0
- package/dist/test/cmd/appscript/commands.test.d.ts +2 -0
- package/dist/test/cmd/appscript/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/appscript/commands.test.js +104 -0
- package/dist/test/cmd/appscript/commands.test.js.map +1 -0
- package/dist/test/cmd/auth/commands.test.d.ts +2 -0
- package/dist/test/cmd/auth/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/auth/commands.test.js +142 -0
- package/dist/test/cmd/auth/commands.test.js.map +1 -0
- package/dist/test/cmd/auth/runtime.test.d.ts +2 -0
- package/dist/test/cmd/auth/runtime.test.d.ts.map +1 -0
- package/dist/test/cmd/auth/runtime.test.js +214 -0
- package/dist/test/cmd/auth/runtime.test.js.map +1 -0
- package/dist/test/cmd/calendar/commands.test.d.ts +2 -0
- package/dist/test/cmd/calendar/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/calendar/commands.test.js +121 -0
- package/dist/test/cmd/calendar/commands.test.js.map +1 -0
- package/dist/test/cmd/chat/commands.test.d.ts +2 -0
- package/dist/test/cmd/chat/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/chat/commands.test.js +57 -0
- package/dist/test/cmd/chat/commands.test.js.map +1 -0
- package/dist/test/cmd/classroom/commands.test.d.ts +2 -0
- package/dist/test/cmd/classroom/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/classroom/commands.test.js +61 -0
- package/dist/test/cmd/classroom/commands.test.js.map +1 -0
- package/dist/test/cmd/completion/commands.test.d.ts +2 -0
- package/dist/test/cmd/completion/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/completion/commands.test.js +30 -0
- package/dist/test/cmd/completion/commands.test.js.map +1 -0
- package/dist/test/cmd/config/commands.test.d.ts +2 -0
- package/dist/test/cmd/config/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/config/commands.test.js +21 -0
- package/dist/test/cmd/config/commands.test.js.map +1 -0
- package/dist/test/cmd/contacts/commands.test.d.ts +2 -0
- package/dist/test/cmd/contacts/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/contacts/commands.test.js +51 -0
- package/dist/test/cmd/contacts/commands.test.js.map +1 -0
- package/dist/test/cmd/docs/commands.test.d.ts +2 -0
- package/dist/test/cmd/docs/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/docs/commands.test.js +39 -0
- package/dist/test/cmd/docs/commands.test.js.map +1 -0
- package/dist/test/cmd/drive/commands.test.d.ts +2 -0
- package/dist/test/cmd/drive/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/drive/commands.test.js +409 -0
- package/dist/test/cmd/drive/commands.test.js.map +1 -0
- package/dist/test/cmd/execution-context.test.d.ts +2 -0
- package/dist/test/cmd/execution-context.test.d.ts.map +1 -0
- package/dist/test/cmd/execution-context.test.js +29 -0
- package/dist/test/cmd/execution-context.test.js.map +1 -0
- package/dist/test/cmd/exit-codes/commands.test.d.ts +2 -0
- package/dist/test/cmd/exit-codes/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/exit-codes/commands.test.js +19 -0
- package/dist/test/cmd/exit-codes/commands.test.js.map +1 -0
- package/dist/test/cmd/exit.test.d.ts +2 -0
- package/dist/test/cmd/exit.test.d.ts.map +1 -0
- package/dist/test/cmd/exit.test.js +14 -0
- package/dist/test/cmd/exit.test.js.map +1 -0
- package/dist/test/cmd/forms/commands.test.d.ts +2 -0
- package/dist/test/cmd/forms/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/forms/commands.test.js +42 -0
- package/dist/test/cmd/forms/commands.test.js.map +1 -0
- package/dist/test/cmd/gmail/commands.test.d.ts +2 -0
- package/dist/test/cmd/gmail/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/gmail/commands.test.js +315 -0
- package/dist/test/cmd/gmail/commands.test.js.map +1 -0
- package/dist/test/cmd/groups/commands.test.d.ts +2 -0
- package/dist/test/cmd/groups/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/groups/commands.test.js +79 -0
- package/dist/test/cmd/groups/commands.test.js.map +1 -0
- package/dist/test/cmd/keep/commands.test.d.ts +2 -0
- package/dist/test/cmd/keep/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/keep/commands.test.js +87 -0
- package/dist/test/cmd/keep/commands.test.js.map +1 -0
- package/dist/test/cmd/people/commands.test.d.ts +2 -0
- package/dist/test/cmd/people/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/people/commands.test.js +52 -0
- package/dist/test/cmd/people/commands.test.js.map +1 -0
- package/dist/test/cmd/rewrite-desire-path-args.test.d.ts +2 -0
- package/dist/test/cmd/rewrite-desire-path-args.test.d.ts.map +1 -0
- package/dist/test/cmd/rewrite-desire-path-args.test.js +21 -0
- package/dist/test/cmd/rewrite-desire-path-args.test.js.map +1 -0
- package/dist/test/cmd/root.test.d.ts +2 -0
- package/dist/test/cmd/root.test.d.ts.map +1 -0
- package/dist/test/cmd/root.test.js +323 -0
- package/dist/test/cmd/root.test.js.map +1 -0
- package/dist/test/cmd/runtime-scopes.test.d.ts +2 -0
- package/dist/test/cmd/runtime-scopes.test.d.ts.map +1 -0
- package/dist/test/cmd/runtime-scopes.test.js +133 -0
- package/dist/test/cmd/runtime-scopes.test.js.map +1 -0
- package/dist/test/cmd/schema/commands.test.d.ts +2 -0
- package/dist/test/cmd/schema/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/schema/commands.test.js +31 -0
- package/dist/test/cmd/schema/commands.test.js.map +1 -0
- package/dist/test/cmd/sheets/commands.test.d.ts +2 -0
- package/dist/test/cmd/sheets/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/sheets/commands.test.js +39 -0
- package/dist/test/cmd/sheets/commands.test.js.map +1 -0
- package/dist/test/cmd/slides/commands.test.d.ts +2 -0
- package/dist/test/cmd/slides/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/slides/commands.test.js +48 -0
- package/dist/test/cmd/slides/commands.test.js.map +1 -0
- package/dist/test/cmd/tasks/commands.test.d.ts +2 -0
- package/dist/test/cmd/tasks/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/tasks/commands.test.js +74 -0
- package/dist/test/cmd/tasks/commands.test.js.map +1 -0
- package/dist/test/cmd/time/commands.test.d.ts +2 -0
- package/dist/test/cmd/time/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/time/commands.test.js +52 -0
- package/dist/test/cmd/time/commands.test.js.map +1 -0
- package/dist/test/cmd/version/commands.test.d.ts +2 -0
- package/dist/test/cmd/version/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/version/commands.test.js +12 -0
- package/dist/test/cmd/version/commands.test.js.map +1 -0
- package/dist/test/cmd/workspace/commands.test.d.ts +2 -0
- package/dist/test/cmd/workspace/commands.test.d.ts.map +1 -0
- package/dist/test/cmd/workspace/commands.test.js +285 -0
- package/dist/test/cmd/workspace/commands.test.js.map +1 -0
- package/dist/test/config/clients.test.d.ts +2 -0
- package/dist/test/config/clients.test.d.ts.map +1 -0
- package/dist/test/config/clients.test.js +42 -0
- package/dist/test/config/clients.test.js.map +1 -0
- package/dist/test/config/config.test.d.ts +2 -0
- package/dist/test/config/config.test.d.ts.map +1 -0
- package/dist/test/config/config.test.js +80 -0
- package/dist/test/config/config.test.js.map +1 -0
- package/dist/test/config/credentials.test.d.ts +2 -0
- package/dist/test/config/credentials.test.d.ts.map +1 -0
- package/dist/test/config/credentials.test.js +78 -0
- package/dist/test/config/credentials.test.js.map +1 -0
- package/dist/test/config/migration.test.d.ts +2 -0
- package/dist/test/config/migration.test.d.ts.map +1 -0
- package/dist/test/config/migration.test.js +136 -0
- package/dist/test/config/migration.test.js.map +1 -0
- package/dist/test/config/paths.test.d.ts +2 -0
- package/dist/test/config/paths.test.d.ts.map +1 -0
- package/dist/test/config/paths.test.js +31 -0
- package/dist/test/config/paths.test.js.map +1 -0
- package/dist/test/googleapi/auth-factory.test.d.ts +2 -0
- package/dist/test/googleapi/auth-factory.test.d.ts.map +1 -0
- package/dist/test/googleapi/auth-factory.test.js +215 -0
- package/dist/test/googleapi/auth-factory.test.js.map +1 -0
- package/dist/test/googleapi/circuitbreaker.test.d.ts +2 -0
- package/dist/test/googleapi/circuitbreaker.test.d.ts.map +1 -0
- package/dist/test/googleapi/circuitbreaker.test.js +30 -0
- package/dist/test/googleapi/circuitbreaker.test.js.map +1 -0
- package/dist/test/googleapi/client.test.d.ts +2 -0
- package/dist/test/googleapi/client.test.d.ts.map +1 -0
- package/dist/test/googleapi/client.test.js +16 -0
- package/dist/test/googleapi/client.test.js.map +1 -0
- package/dist/test/googleapi/errors.test.d.ts +2 -0
- package/dist/test/googleapi/errors.test.d.ts.map +1 -0
- package/dist/test/googleapi/errors.test.js +21 -0
- package/dist/test/googleapi/errors.test.js.map +1 -0
- package/dist/test/googleapi/transport.test.d.ts +2 -0
- package/dist/test/googleapi/transport.test.d.ts.map +1 -0
- package/dist/test/googleapi/transport.test.js +25 -0
- package/dist/test/googleapi/transport.test.js.map +1 -0
- package/dist/test/googleauth/oauth-flow.test.d.ts +2 -0
- package/dist/test/googleauth/oauth-flow.test.d.ts.map +1 -0
- package/dist/test/googleauth/oauth-flow.test.js +85 -0
- package/dist/test/googleauth/oauth-flow.test.js.map +1 -0
- package/dist/test/googleauth/service.test.d.ts +2 -0
- package/dist/test/googleauth/service.test.d.ts.map +1 -0
- package/dist/test/googleauth/service.test.js +51 -0
- package/dist/test/googleauth/service.test.js.map +1 -0
- package/dist/test/outfmt/outfmt.test.d.ts +2 -0
- package/dist/test/outfmt/outfmt.test.d.ts.map +1 -0
- package/dist/test/outfmt/outfmt.test.js +41 -0
- package/dist/test/outfmt/outfmt.test.js.map +1 -0
- package/dist/test/secrets/store.test.d.ts +2 -0
- package/dist/test/secrets/store.test.d.ts.map +1 -0
- package/dist/test/secrets/store.test.js +164 -0
- package/dist/test/secrets/store.test.js.map +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/dist/vitest.config.js +11 -0
- package/dist/vitest.config.js.map +1 -0
- package/logo.svg +16 -0
- package/package.json +69 -0
|
@@ -0,0 +1,685 @@
|
|
|
1
|
+
import { buildExecutionContext } from "../execution-context.js";
|
|
2
|
+
const defaultUserDeps = {
|
|
3
|
+
listUsers: async (_orgUnitPath) => [],
|
|
4
|
+
createUser: async () => ({ userId: "", primaryEmail: "", password: "", applied: false }),
|
|
5
|
+
deleteUser: async () => ({ email: "", applied: false }),
|
|
6
|
+
suspendUser: async () => ({ email: "", suspended: false, applied: false }),
|
|
7
|
+
unsuspendUser: async () => ({ email: "", suspended: false, applied: false }),
|
|
8
|
+
setAdmin: async () => ({ email: "", isAdmin: false, applied: false }),
|
|
9
|
+
resetPassword: async () => ({ email: "", newPassword: "", applied: false }),
|
|
10
|
+
setOrgUnit: async () => ({ email: "", orgUnitPath: "", applied: false }),
|
|
11
|
+
listOrgUnits: async () => [],
|
|
12
|
+
addAlias: async () => ({ alias: "", applied: false }),
|
|
13
|
+
listAliases: async () => [],
|
|
14
|
+
deleteAlias: async () => ({ alias: "", applied: false }),
|
|
15
|
+
setPhoto: async () => ({ email: "", applied: false }),
|
|
16
|
+
deletePhoto: async () => ({ email: "", applied: false }),
|
|
17
|
+
getPhoto: async () => "",
|
|
18
|
+
generateBackupCodes: async () => ({ email: "", codes: [], applied: false }),
|
|
19
|
+
};
|
|
20
|
+
const defaultGroupDeps = {
|
|
21
|
+
createGroup: async () => ({ groupId: "", email: "", name: "", applied: false }),
|
|
22
|
+
deleteGroup: async () => ({ email: "", applied: false }),
|
|
23
|
+
updateGroup: async () => ({ email: "", name: "", applied: false }),
|
|
24
|
+
getGroup: async () => ({ id: "", email: "", name: "" }),
|
|
25
|
+
listGroups: async () => [],
|
|
26
|
+
addGroupMember: async () => ({ groupEmail: "", memberEmail: "", role: "", applied: false }),
|
|
27
|
+
removeGroupMember: async () => ({ groupEmail: "", memberEmail: "", applied: false }),
|
|
28
|
+
listGroupMembers: async () => [],
|
|
29
|
+
};
|
|
30
|
+
const defaultDeviceDeps = {
|
|
31
|
+
listDevices: async () => [],
|
|
32
|
+
getDevice: async () => ({ deviceId: "", email: "", modelName: "", osVersion: "", status: "", orgUnitPath: "", lastSync: "" }),
|
|
33
|
+
wipeDevice: async () => ({ deviceId: "", applied: false }),
|
|
34
|
+
disableDevice: async () => ({ deviceId: "", applied: false }),
|
|
35
|
+
};
|
|
36
|
+
const defaultReportDeps = {
|
|
37
|
+
getLoginAudit: async () => [],
|
|
38
|
+
getAdminAudit: async () => [],
|
|
39
|
+
getDeletedUsers: async () => [],
|
|
40
|
+
};
|
|
41
|
+
const defaultOrgUnitDeps = {
|
|
42
|
+
listOrgUnits: async () => [],
|
|
43
|
+
createOrgUnit: async () => ({ orgUnitId: "", name: "", orgUnitPath: "", applied: false }),
|
|
44
|
+
getOrgUnit: async () => ({ orgUnitId: "", name: "", orgUnitPath: "" }),
|
|
45
|
+
updateOrgUnit: async () => ({ orgUnitId: "", name: "", applied: false }),
|
|
46
|
+
deleteOrgUnit: async () => ({ orgUnitPath: "", applied: false }),
|
|
47
|
+
};
|
|
48
|
+
function fixOrgUnitPath(path) {
|
|
49
|
+
if (!path)
|
|
50
|
+
return path;
|
|
51
|
+
const normalized = path.replace(/\\/g, "/");
|
|
52
|
+
if (normalized.match(/^[A-Z]:\//i)) {
|
|
53
|
+
return "/" + normalized.split("/").pop();
|
|
54
|
+
}
|
|
55
|
+
return path;
|
|
56
|
+
}
|
|
57
|
+
function generatePassword(length = 8) {
|
|
58
|
+
const chars = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz23456789";
|
|
59
|
+
let password = "";
|
|
60
|
+
for (let i = 0; i < length; i++) {
|
|
61
|
+
password += chars.charAt(Math.floor(Math.random() * chars.length));
|
|
62
|
+
}
|
|
63
|
+
return password;
|
|
64
|
+
}
|
|
65
|
+
export function registerWorkspaceCommands(workspaceCommand, deps = {}) {
|
|
66
|
+
const userDeps = { ...defaultUserDeps, ...deps };
|
|
67
|
+
const groupDeps = { ...defaultGroupDeps, ...deps };
|
|
68
|
+
const deviceDeps = { ...defaultDeviceDeps, ...deps };
|
|
69
|
+
const reportDeps = { ...defaultReportDeps, ...deps };
|
|
70
|
+
const orgUnitDeps = { ...defaultOrgUnitDeps, ...deps };
|
|
71
|
+
const userCmd = workspaceCommand.command("user").description("User management");
|
|
72
|
+
const orgCmd = workspaceCommand.command("org").description("Organization unit management");
|
|
73
|
+
// typee workspace user list [--org-unit <path>]
|
|
74
|
+
userCmd
|
|
75
|
+
.command("list")
|
|
76
|
+
.description("List users in the domain, optionally filtered by org unit")
|
|
77
|
+
.option("--org-unit <path>", "Organization unit path to filter by")
|
|
78
|
+
.action(async function actionListUsers() {
|
|
79
|
+
const rootOptions = this.optsWithGlobals();
|
|
80
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
81
|
+
const opts = this.opts();
|
|
82
|
+
const users = await userDeps.listUsers(fixOrgUnitPath(opts.orgUnit));
|
|
83
|
+
if (ctx.output.mode === "json") {
|
|
84
|
+
process.stdout.write(`${JSON.stringify(users, null, 2)}\n`);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
for (const user of users) {
|
|
88
|
+
const adminTag = user.isAdmin ? " [ADMIN]" : "";
|
|
89
|
+
const susTag = user.suspended ? " [SUSPENDED]" : "";
|
|
90
|
+
process.stdout.write(`${user.primaryEmail}${adminTag}${susTag} - ${user.orgUnitPath}\n`);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
// typee workspace user create --email <email> --first-name <name> --last-name <name> [--password <pwd>] [--org-unit <path>] [--groups <emails>] [--admin]
|
|
94
|
+
userCmd
|
|
95
|
+
.command("create")
|
|
96
|
+
.description("Create a new user")
|
|
97
|
+
.requiredOption("--email <email>", "User email address")
|
|
98
|
+
.requiredOption("--first-name <name>", "First name")
|
|
99
|
+
.requiredOption("--last-name <name>", "Last name")
|
|
100
|
+
.option("--password <password>", "Password (auto-generated if not provided)")
|
|
101
|
+
.option("--org-unit <path>", "Organization unit path, e.g., /Sales")
|
|
102
|
+
.option("--groups <emails>", "Comma-separated list of group emails to add user to")
|
|
103
|
+
.option("--admin", "Make user an admin", false)
|
|
104
|
+
.action(async function actionCreateUser() {
|
|
105
|
+
const rootOptions = this.optsWithGlobals();
|
|
106
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
107
|
+
const opts = this.opts();
|
|
108
|
+
const password = opts.password ?? generatePassword(8);
|
|
109
|
+
const groups = opts.groups ? opts.groups.split(",").map((g) => g.trim()) : [];
|
|
110
|
+
const result = await userDeps.createUser({
|
|
111
|
+
email: opts.email,
|
|
112
|
+
firstName: opts.firstName,
|
|
113
|
+
lastName: opts.lastName,
|
|
114
|
+
password,
|
|
115
|
+
orgUnitPath: fixOrgUnitPath(opts.orgUnit),
|
|
116
|
+
groups,
|
|
117
|
+
makeAdmin: opts.admin,
|
|
118
|
+
});
|
|
119
|
+
if (ctx.output.mode === "json") {
|
|
120
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (result.applied) {
|
|
124
|
+
process.stdout.write(`User created: ${result.primaryEmail}\n`);
|
|
125
|
+
process.stdout.write(`Password: ${result.password}\n`);
|
|
126
|
+
process.stdout.write("Save this password - it will not be shown again!\n");
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
process.stdout.write("Failed to create user\n");
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
// typee workspace user delete --email <email>
|
|
133
|
+
userCmd
|
|
134
|
+
.command("delete")
|
|
135
|
+
.description("Delete a user")
|
|
136
|
+
.requiredOption("--email <email>", "User email address")
|
|
137
|
+
.option("-y, --force", "Skip confirmation", false)
|
|
138
|
+
.action(async function actionDeleteUser() {
|
|
139
|
+
const rootOptions = this.optsWithGlobals();
|
|
140
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
141
|
+
const opts = this.opts();
|
|
142
|
+
if (!opts.force) {
|
|
143
|
+
process.stdout.write(`Delete user ${opts.email}? Use --force to confirm\n`);
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const result = await userDeps.deleteUser(opts.email);
|
|
147
|
+
if (ctx.output.mode === "json") {
|
|
148
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
process.stdout.write(result.applied ? `User deleted: ${result.email}\n` : "Failed to delete user\n");
|
|
152
|
+
});
|
|
153
|
+
// typee workspace user suspend --email <email>
|
|
154
|
+
userCmd
|
|
155
|
+
.command("suspend")
|
|
156
|
+
.description("Suspend a user")
|
|
157
|
+
.requiredOption("--email <email>", "User email address")
|
|
158
|
+
.action(async function actionSuspendUser() {
|
|
159
|
+
const rootOptions = this.optsWithGlobals();
|
|
160
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
161
|
+
const opts = this.opts();
|
|
162
|
+
const result = await userDeps.suspendUser(opts.email);
|
|
163
|
+
if (ctx.output.mode === "json") {
|
|
164
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
process.stdout.write(result.applied ? `User suspended: ${result.email}\n` : "Failed to suspend user\n");
|
|
168
|
+
});
|
|
169
|
+
// typee workspace user unsuspend --email <email>
|
|
170
|
+
userCmd
|
|
171
|
+
.command("unsuspend")
|
|
172
|
+
.description("Unsuspend a user")
|
|
173
|
+
.requiredOption("--email <email>", "User email address")
|
|
174
|
+
.action(async function actionUnsuspendUser() {
|
|
175
|
+
const rootOptions = this.optsWithGlobals();
|
|
176
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
177
|
+
const opts = this.opts();
|
|
178
|
+
const result = await userDeps.unsuspendUser(opts.email);
|
|
179
|
+
if (ctx.output.mode === "json") {
|
|
180
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
process.stdout.write(result.applied ? `User unsuspended: ${result.email}\n` : "Failed to unsuspend user\n");
|
|
184
|
+
});
|
|
185
|
+
// typee workspace user reset-password --email <email>
|
|
186
|
+
userCmd
|
|
187
|
+
.command("reset-password")
|
|
188
|
+
.description("Reset user password (generates new password)")
|
|
189
|
+
.requiredOption("--email <email>", "User email address")
|
|
190
|
+
.action(async function actionResetPassword() {
|
|
191
|
+
const rootOptions = this.optsWithGlobals();
|
|
192
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
193
|
+
const opts = this.opts();
|
|
194
|
+
const result = await userDeps.resetPassword(opts.email);
|
|
195
|
+
if (ctx.output.mode === "json") {
|
|
196
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if (result.applied) {
|
|
200
|
+
process.stdout.write(`Password reset for: ${result.email}\n`);
|
|
201
|
+
process.stdout.write(`New password: ${result.newPassword}\n`);
|
|
202
|
+
process.stdout.write("Save this password - it will not be shown again!\n");
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
process.stdout.write("Failed to reset password\n");
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
// typee workspace user set-admin --email <email> [--yes]
|
|
209
|
+
userCmd
|
|
210
|
+
.command("set-admin")
|
|
211
|
+
.description("Make or remove admin privileges")
|
|
212
|
+
.requiredOption("--email <email>", "User email address")
|
|
213
|
+
.option("--yes", "Confirm admin promotion", false)
|
|
214
|
+
.action(async function actionSetAdmin() {
|
|
215
|
+
const rootOptions = this.optsWithGlobals();
|
|
216
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
217
|
+
const opts = this.opts();
|
|
218
|
+
if (!opts.yes) {
|
|
219
|
+
process.stdout.write(`Make ${opts.email} an admin? Use --yes to confirm\n`);
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
const result = await userDeps.setAdmin(opts.email, true);
|
|
223
|
+
if (ctx.output.mode === "json") {
|
|
224
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
process.stdout.write(result.applied ? `Admin privileges granted to: ${result.email}\n` : "Failed to set admin\n");
|
|
228
|
+
});
|
|
229
|
+
// typee workspace user set-org-unit --email <email> --org-unit <path>
|
|
230
|
+
userCmd
|
|
231
|
+
.command("set-org-unit")
|
|
232
|
+
.description("Set user's organization unit")
|
|
233
|
+
.requiredOption("--email <email>", "User email address")
|
|
234
|
+
.requiredOption("--org-unit <path>", "Organization unit path, e.g., /Sales")
|
|
235
|
+
.action(async function actionSetOrgUnit() {
|
|
236
|
+
const rootOptions = this.optsWithGlobals();
|
|
237
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
238
|
+
const opts = this.opts();
|
|
239
|
+
const result = await userDeps.setOrgUnit(opts.email, fixOrgUnitPath(opts.orgUnit) ?? opts.orgUnit);
|
|
240
|
+
if (ctx.output.mode === "json") {
|
|
241
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
process.stdout.write(result.applied ? `Org unit set for ${result.email}: ${result.orgUnitPath}\n` : "Failed to set org unit\n");
|
|
245
|
+
});
|
|
246
|
+
// Alias commands
|
|
247
|
+
// typee workspace user add-alias --email <email> --alias <alias@domain.com>
|
|
248
|
+
userCmd
|
|
249
|
+
.command("add-alias")
|
|
250
|
+
.description("Add an email alias to a user")
|
|
251
|
+
.requiredOption("--email <email>", "User email address")
|
|
252
|
+
.requiredOption("--alias <email>", "Alias email address")
|
|
253
|
+
.action(async function actionAddAlias() {
|
|
254
|
+
const rootOptions = this.optsWithGlobals();
|
|
255
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
256
|
+
const opts = this.opts();
|
|
257
|
+
const result = await userDeps.addAlias(opts.email, opts.alias);
|
|
258
|
+
if (ctx.output.mode === "json") {
|
|
259
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
process.stdout.write(result.applied ? `Alias added: ${result.alias}\n` : "Failed to add alias\n");
|
|
263
|
+
});
|
|
264
|
+
// typee workspace user list-aliases --email <email>
|
|
265
|
+
userCmd
|
|
266
|
+
.command("list-aliases")
|
|
267
|
+
.description("List all aliases for a user")
|
|
268
|
+
.requiredOption("--email <email>", "User email address")
|
|
269
|
+
.action(async function actionListAliases() {
|
|
270
|
+
const rootOptions = this.optsWithGlobals();
|
|
271
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
272
|
+
const opts = this.opts();
|
|
273
|
+
const aliases = await userDeps.listAliases(opts.email);
|
|
274
|
+
if (ctx.output.mode === "json") {
|
|
275
|
+
process.stdout.write(`${JSON.stringify(aliases, null, 2)}\n`);
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
if (aliases.length === 0) {
|
|
279
|
+
process.stdout.write(`No aliases found for ${opts.email}\n`);
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
for (const alias of aliases) {
|
|
283
|
+
process.stdout.write(`${alias}\n`);
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
// typee workspace user delete-alias --email <email> --alias <alias@domain.com>
|
|
287
|
+
userCmd
|
|
288
|
+
.command("delete-alias")
|
|
289
|
+
.description("Delete an email alias from a user")
|
|
290
|
+
.requiredOption("--email <email>", "User email address")
|
|
291
|
+
.requiredOption("--alias <email>", "Alias email address")
|
|
292
|
+
.action(async function actionDeleteAlias() {
|
|
293
|
+
const rootOptions = this.optsWithGlobals();
|
|
294
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
295
|
+
const opts = this.opts();
|
|
296
|
+
const result = await userDeps.deleteAlias(opts.email, opts.alias);
|
|
297
|
+
if (ctx.output.mode === "json") {
|
|
298
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
process.stdout.write(result.applied ? `Alias deleted: ${result.alias}\n` : "Failed to delete alias\n");
|
|
302
|
+
});
|
|
303
|
+
// typee workspace user set-photo --email <email> --path <path>
|
|
304
|
+
userCmd
|
|
305
|
+
.command("set-photo")
|
|
306
|
+
.description("Set user profile photo")
|
|
307
|
+
.requiredOption("--email <email>", "User email address")
|
|
308
|
+
.requiredOption("--path <path>", "Path to photo file (base64 encoded)")
|
|
309
|
+
.action(async function actionSetPhoto() {
|
|
310
|
+
const rootOptions = this.optsWithGlobals();
|
|
311
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
312
|
+
const opts = this.opts();
|
|
313
|
+
const result = await userDeps.setPhoto(opts.email, opts.path);
|
|
314
|
+
if (ctx.output.mode === "json") {
|
|
315
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
process.stdout.write(result.applied ? `Photo set for ${result.email}\n` : "Failed to set photo\n");
|
|
319
|
+
});
|
|
320
|
+
// typee workspace user delete-photo --email <email>
|
|
321
|
+
userCmd
|
|
322
|
+
.command("delete-photo")
|
|
323
|
+
.description("Delete user profile photo")
|
|
324
|
+
.requiredOption("--email <email>", "User email address")
|
|
325
|
+
.action(async function actionDeletePhoto() {
|
|
326
|
+
const rootOptions = this.optsWithGlobals();
|
|
327
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
328
|
+
const opts = this.opts();
|
|
329
|
+
const result = await userDeps.deletePhoto(opts.email);
|
|
330
|
+
if (ctx.output.mode === "json") {
|
|
331
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
process.stdout.write(result.applied ? `Photo deleted for ${result.email}\n` : "Failed to delete photo\n");
|
|
335
|
+
});
|
|
336
|
+
// typee workspace user generate-backup-codes --email <email>
|
|
337
|
+
userCmd
|
|
338
|
+
.command("generate-backup-codes")
|
|
339
|
+
.description("Generate backup codes for user's 2-step verification")
|
|
340
|
+
.requiredOption("--email <email>", "User email address")
|
|
341
|
+
.action(async function actionGenerateBackupCodes() {
|
|
342
|
+
const rootOptions = this.optsWithGlobals();
|
|
343
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
344
|
+
const opts = this.opts();
|
|
345
|
+
const result = await userDeps.generateBackupCodes(opts.email);
|
|
346
|
+
if (ctx.output.mode === "json") {
|
|
347
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
if (result.applied) {
|
|
351
|
+
process.stdout.write(`Backup codes generated for: ${result.email}\n\n`);
|
|
352
|
+
for (let i = 0; i < result.codes.length; i += 2) {
|
|
353
|
+
process.stdout.write(`${result.codes[i]}\t${result.codes[i + 1] || ""}\n`);
|
|
354
|
+
}
|
|
355
|
+
process.stdout.write("\nSave these codes - they will not be shown again!\n");
|
|
356
|
+
}
|
|
357
|
+
else {
|
|
358
|
+
process.stdout.write("Failed to generate backup codes\n");
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
// typee workspace org list
|
|
362
|
+
orgCmd
|
|
363
|
+
.command("list")
|
|
364
|
+
.description("List all organizational units")
|
|
365
|
+
.action(async function actionListOrgUnits() {
|
|
366
|
+
const rootOptions = this.optsWithGlobals();
|
|
367
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
368
|
+
const orgUnits = await orgUnitDeps.listOrgUnits();
|
|
369
|
+
if (ctx.output.mode === "json") {
|
|
370
|
+
process.stdout.write(`${JSON.stringify(orgUnits, null, 2)}\n`);
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
for (const ou of orgUnits) {
|
|
374
|
+
process.stdout.write(`${ou.orgUnitPath}\n`);
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
// typee workspace org create --name <name> --parent <parent-org-unit-id-or-path> [--description <desc>]
|
|
378
|
+
orgCmd
|
|
379
|
+
.command("create")
|
|
380
|
+
.description("Create an organizational unit")
|
|
381
|
+
.requiredOption("--name <name>", "Name of the organizational unit")
|
|
382
|
+
.requiredOption("--parent <parent>", "Parent org unit ID or path (e.g., / or /Sales)")
|
|
383
|
+
.option("--description <desc>", "Description of the organizational unit")
|
|
384
|
+
.action(async function actionCreateOrgUnit() {
|
|
385
|
+
const rootOptions = this.optsWithGlobals();
|
|
386
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
387
|
+
const opts = this.opts();
|
|
388
|
+
const result = await orgUnitDeps.createOrgUnit({
|
|
389
|
+
name: opts.name,
|
|
390
|
+
parentOrgUnitPath: opts.parent,
|
|
391
|
+
description: opts.description,
|
|
392
|
+
});
|
|
393
|
+
if (ctx.output.mode === "json") {
|
|
394
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
if (result.applied) {
|
|
398
|
+
process.stdout.write(`Org unit created: ${result.orgUnitPath} (ID: ${result.orgUnitId})\n`);
|
|
399
|
+
}
|
|
400
|
+
else {
|
|
401
|
+
process.stdout.write("Failed to create org unit\n");
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
// typee workspace org get --path <org-unit-path> or --id <org-unit-id>
|
|
405
|
+
orgCmd
|
|
406
|
+
.command("get")
|
|
407
|
+
.description("Get organizational unit details")
|
|
408
|
+
.option("--path <org-unit-path>", "Org unit path (e.g., /Sales)")
|
|
409
|
+
.option("--id <org-unit-id>", "Org unit ID")
|
|
410
|
+
.action(async function actionGetOrgUnit() {
|
|
411
|
+
const rootOptions = this.optsWithGlobals();
|
|
412
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
413
|
+
const opts = this.opts();
|
|
414
|
+
if (!opts.path && !opts.id) {
|
|
415
|
+
process.stdout.write("Error: Either --path or --id is required\n");
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
const orgUnitPath = opts.path ?? opts.id ?? "";
|
|
419
|
+
const orgUnit = await orgUnitDeps.getOrgUnit(orgUnitPath);
|
|
420
|
+
if (ctx.output.mode === "json") {
|
|
421
|
+
process.stdout.write(`${JSON.stringify(orgUnit, null, 2)}\n`);
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
if (orgUnit.orgUnitId) {
|
|
425
|
+
process.stdout.write(`Name: ${orgUnit.name}\n`);
|
|
426
|
+
process.stdout.write(`Path: ${orgUnit.orgUnitPath}\n`);
|
|
427
|
+
process.stdout.write(`ID: ${orgUnit.orgUnitId}\n`);
|
|
428
|
+
if (orgUnit.parentOrgUnitId) {
|
|
429
|
+
process.stdout.write(`Parent ID: ${orgUnit.parentOrgUnitId}\n`);
|
|
430
|
+
}
|
|
431
|
+
if (orgUnit.description) {
|
|
432
|
+
process.stdout.write(`Description: ${orgUnit.description}\n`);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
process.stdout.write("Org unit not found\n");
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
// typee workspace org update --path <org-unit-path> or --id <org-unit-id> [--name <new-name>] [--description <desc>] [--parent <new-parent>]
|
|
440
|
+
orgCmd
|
|
441
|
+
.command("update")
|
|
442
|
+
.description("Update an organizational unit")
|
|
443
|
+
.option("--path <org-unit-path>", "Org unit path (e.g., /Sales)")
|
|
444
|
+
.option("--id <org-unit-id>", "Org unit ID")
|
|
445
|
+
.option("--name <new-name>", "New name for the org unit")
|
|
446
|
+
.option("--description <desc>", "New description for the org unit")
|
|
447
|
+
.option("--parent <new-parent>", "New parent org unit ID")
|
|
448
|
+
.action(async function actionUpdateOrgUnit() {
|
|
449
|
+
const rootOptions = this.optsWithGlobals();
|
|
450
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
451
|
+
const opts = this.opts();
|
|
452
|
+
if (!opts.path && !opts.id) {
|
|
453
|
+
process.stdout.write("Error: Either --path or --id is required\n");
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
if (!opts.name && !opts.description && !opts.parent) {
|
|
457
|
+
process.stdout.write("Error: At least one of --name, --description, or --parent is required\n");
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
const orgUnitPath = opts.path ?? opts.id ?? "";
|
|
461
|
+
const result = await orgUnitDeps.updateOrgUnit(orgUnitPath, {
|
|
462
|
+
name: opts.name,
|
|
463
|
+
description: opts.description,
|
|
464
|
+
parentOrgUnitId: opts.parent,
|
|
465
|
+
});
|
|
466
|
+
if (ctx.output.mode === "json") {
|
|
467
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
if (result.applied) {
|
|
471
|
+
process.stdout.write(`Org unit updated: ${result.name} (ID: ${result.orgUnitId})\n`);
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
process.stdout.write("Failed to update org unit\n");
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
// typee workspace org delete --path <org-unit-path> or --id <org-unit-id> [-y, --force]
|
|
478
|
+
orgCmd
|
|
479
|
+
.command("delete")
|
|
480
|
+
.description("Delete an organizational unit")
|
|
481
|
+
.option("--path <org-unit-path>", "Org unit path (e.g., /Sales)")
|
|
482
|
+
.option("--id <org-unit-id>", "Org unit ID")
|
|
483
|
+
.option("-y, --force", "Skip confirmation", false)
|
|
484
|
+
.action(async function actionDeleteOrgUnit() {
|
|
485
|
+
const rootOptions = this.optsWithGlobals();
|
|
486
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
487
|
+
const opts = this.opts();
|
|
488
|
+
if (!opts.path && !opts.id) {
|
|
489
|
+
process.stdout.write("Error: Either --path or --id is required\n");
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
const orgUnitPath = opts.path ?? opts.id ?? "";
|
|
493
|
+
if (!opts.force) {
|
|
494
|
+
process.stdout.write(`Delete org unit ${orgUnitPath}? Use --force to confirm\n`);
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
const result = await orgUnitDeps.deleteOrgUnit(orgUnitPath);
|
|
498
|
+
if (ctx.output.mode === "json") {
|
|
499
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
process.stdout.write(result.applied ? `Org unit deleted: ${result.orgUnitPath}\n` : "Failed to delete org unit\n");
|
|
503
|
+
});
|
|
504
|
+
// Group commands
|
|
505
|
+
const groupCmd = workspaceCommand.command("group").description("Group management");
|
|
506
|
+
// typee workspace group create --email <email> --name <name>
|
|
507
|
+
groupCmd
|
|
508
|
+
.command("create")
|
|
509
|
+
.description("Create a new group")
|
|
510
|
+
.requiredOption("--email <email>", "Group email address")
|
|
511
|
+
.requiredOption("--name <name>", "Group name")
|
|
512
|
+
.action(async function actionCreateGroup() {
|
|
513
|
+
const rootOptions = this.optsWithGlobals();
|
|
514
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
515
|
+
const opts = this.opts();
|
|
516
|
+
const result = await groupDeps.createGroup({ email: opts.email, name: opts.name });
|
|
517
|
+
if (ctx.output.mode === "json") {
|
|
518
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
process.stdout.write(result.applied ? `Group created: ${result.email}\n` : "Failed to create group\n");
|
|
522
|
+
});
|
|
523
|
+
// typee workspace group delete --email <email>
|
|
524
|
+
groupCmd
|
|
525
|
+
.command("delete")
|
|
526
|
+
.description("Delete a group")
|
|
527
|
+
.requiredOption("--email <email>", "Group email address")
|
|
528
|
+
.option("-y, --force", "Skip confirmation", false)
|
|
529
|
+
.action(async function actionDeleteGroup() {
|
|
530
|
+
const rootOptions = this.optsWithGlobals();
|
|
531
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
532
|
+
const opts = this.opts();
|
|
533
|
+
if (!opts.force) {
|
|
534
|
+
process.stdout.write(`Delete group ${opts.email}? Use --force to confirm\n`);
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
const result = await groupDeps.deleteGroup(opts.email);
|
|
538
|
+
if (ctx.output.mode === "json") {
|
|
539
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
process.stdout.write(result.applied ? `Group deleted: ${result.email}\n` : "Failed to delete group\n");
|
|
543
|
+
});
|
|
544
|
+
// typee workspace group list
|
|
545
|
+
groupCmd
|
|
546
|
+
.command("list")
|
|
547
|
+
.description("List all groups")
|
|
548
|
+
.action(async function actionListGroups() {
|
|
549
|
+
const rootOptions = this.optsWithGlobals();
|
|
550
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
551
|
+
const groups = await groupDeps.listGroups();
|
|
552
|
+
if (ctx.output.mode === "json") {
|
|
553
|
+
process.stdout.write(`${JSON.stringify(groups, null, 2)}\n`);
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
for (const group of groups) {
|
|
557
|
+
process.stdout.write(`${group.email} - ${group.name}\n`);
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
// typee workspace group add-member --group <group-email> --email <member-email> [--role <MEMBER|MANAGER|OWNER>]
|
|
561
|
+
groupCmd
|
|
562
|
+
.command("add-member")
|
|
563
|
+
.description("Add member to group")
|
|
564
|
+
.requiredOption("--group <email>", "Group email address")
|
|
565
|
+
.requiredOption("--email <email>", "Member email address")
|
|
566
|
+
.option("--role <role>", "Member role: MEMBER, MANAGER, or OWNER", "MEMBER")
|
|
567
|
+
.action(async function actionAddGroupMember() {
|
|
568
|
+
const rootOptions = this.optsWithGlobals();
|
|
569
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
570
|
+
const opts = this.opts();
|
|
571
|
+
const validRoles = ["MEMBER", "MANAGER", "OWNER"];
|
|
572
|
+
const role = opts.role.toUpperCase();
|
|
573
|
+
if (!validRoles.includes(role)) {
|
|
574
|
+
process.stdout.write(`Invalid role: ${opts.role}. Must be MEMBER, MANAGER, or OWNER\n`);
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
const result = await groupDeps.addGroupMember(opts.group, opts.email, role);
|
|
578
|
+
if (ctx.output.mode === "json") {
|
|
579
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
process.stdout.write(result.applied ? `Member added: ${result.memberEmail} to ${result.groupEmail} as ${result.role}\n` : "Failed to add member\n");
|
|
583
|
+
});
|
|
584
|
+
// typee workspace group remove-member --group <group-email> --email <member-email>
|
|
585
|
+
groupCmd
|
|
586
|
+
.command("remove-member")
|
|
587
|
+
.description("Remove member from group")
|
|
588
|
+
.requiredOption("--group <email>", "Group email address")
|
|
589
|
+
.requiredOption("--email <email>", "Member email address")
|
|
590
|
+
.action(async function actionRemoveGroupMember() {
|
|
591
|
+
const rootOptions = this.optsWithGlobals();
|
|
592
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
593
|
+
const opts = this.opts();
|
|
594
|
+
const result = await groupDeps.removeGroupMember(opts.group, opts.email);
|
|
595
|
+
if (ctx.output.mode === "json") {
|
|
596
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
process.stdout.write(result.applied ? `Member removed: ${result.memberEmail} from ${result.groupEmail}\n` : "Failed to remove member\n");
|
|
600
|
+
});
|
|
601
|
+
// typee workspace group list-members --group <group-email>
|
|
602
|
+
groupCmd
|
|
603
|
+
.command("list-members")
|
|
604
|
+
.description("List all members of a group")
|
|
605
|
+
.requiredOption("--group <email>", "Group email address")
|
|
606
|
+
.action(async function actionListGroupMembers() {
|
|
607
|
+
const rootOptions = this.optsWithGlobals();
|
|
608
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
609
|
+
const opts = this.opts();
|
|
610
|
+
const members = await groupDeps.listGroupMembers(opts.group);
|
|
611
|
+
if (ctx.output.mode === "json") {
|
|
612
|
+
process.stdout.write(`${JSON.stringify(members, null, 2)}\n`);
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
if (members.length === 0) {
|
|
616
|
+
process.stdout.write(`No members found in ${opts.group}\n`);
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
619
|
+
for (const member of members) {
|
|
620
|
+
process.stdout.write(`${member.email} - ${member.role} - ${member.status}\n`);
|
|
621
|
+
}
|
|
622
|
+
});
|
|
623
|
+
// Device commands
|
|
624
|
+
const deviceCmd = workspaceCommand.command("device").description("Device management");
|
|
625
|
+
// typee workspace device list
|
|
626
|
+
deviceCmd
|
|
627
|
+
.command("list")
|
|
628
|
+
.description("List devices")
|
|
629
|
+
.option("--type <type>", "Device type: chromebook, mobile")
|
|
630
|
+
.option("--org-unit <path>", "Organization unit path")
|
|
631
|
+
.action(async function actionListDevices() {
|
|
632
|
+
const rootOptions = this.optsWithGlobals();
|
|
633
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
634
|
+
const opts = this.opts();
|
|
635
|
+
const devices = await deviceDeps.listDevices({ type: opts.type, orgUnitPath: fixOrgUnitPath(opts.orgUnit) });
|
|
636
|
+
if (ctx.output.mode === "json") {
|
|
637
|
+
process.stdout.write(`${JSON.stringify(devices, null, 2)}\n`);
|
|
638
|
+
return;
|
|
639
|
+
}
|
|
640
|
+
for (const device of devices) {
|
|
641
|
+
process.stdout.write(`${device.deviceId} - ${device.email} - ${device.modelName} - ${device.status}\n`);
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
// Report commands
|
|
645
|
+
const reportCmd = workspaceCommand.command("report").description("Reports and audit logs");
|
|
646
|
+
// typee workspace report logins
|
|
647
|
+
reportCmd
|
|
648
|
+
.command("logins")
|
|
649
|
+
.description("List login activities")
|
|
650
|
+
.option("--days <number>", "Number of days to look back", "30")
|
|
651
|
+
.action(async function actionReportLogins() {
|
|
652
|
+
const rootOptions = this.optsWithGlobals();
|
|
653
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
654
|
+
const opts = this.opts();
|
|
655
|
+
const days = parseInt(opts.days, 10);
|
|
656
|
+
const logins = await reportDeps.getLoginAudit(days);
|
|
657
|
+
if (ctx.output.mode === "json") {
|
|
658
|
+
process.stdout.write(`${JSON.stringify(logins, null, 2)}\n`);
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
for (const login of logins) {
|
|
662
|
+
process.stdout.write(`${login.timestamp} - ${login.userEmail} - ${login.ipAddress}\n`);
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
// typee workspace report admin
|
|
666
|
+
reportCmd
|
|
667
|
+
.command("admin")
|
|
668
|
+
.description("List admin activities")
|
|
669
|
+
.option("--days <number>", "Number of days to look back", "30")
|
|
670
|
+
.action(async function actionReportAdmin() {
|
|
671
|
+
const rootOptions = this.optsWithGlobals();
|
|
672
|
+
const ctx = buildExecutionContext(rootOptions);
|
|
673
|
+
const opts = this.opts();
|
|
674
|
+
const days = parseInt(opts.days, 10);
|
|
675
|
+
const activities = await reportDeps.getAdminAudit(days);
|
|
676
|
+
if (ctx.output.mode === "json") {
|
|
677
|
+
process.stdout.write(`${JSON.stringify(activities, null, 2)}\n`);
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
for (const activity of activities) {
|
|
681
|
+
process.stdout.write(`${activity.timestamp} - ${activity.userEmail} - ${activity.action} - ${activity.resource}\n`);
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
//# sourceMappingURL=commands.js.map
|