@webex/test-users 3.0.0-beta.9 → 3.0.0-bnr.2
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/README.md +3 -3
- package/dist/index.js +34 -74
- package/dist/index.js.map +1 -1
- package/dist/types/@webex/common/src/base64.d.ts +38 -0
- package/dist/types/@webex/common/src/browser-detection.d.ts +8 -0
- package/dist/types/@webex/common/src/capped-debounce.d.ts +12 -0
- package/dist/types/@webex/common/src/check-required.d.ts +11 -0
- package/dist/types/@webex/common/src/constants.d.ts +76 -0
- package/dist/types/@webex/common/src/defer.d.ts +23 -0
- package/dist/types/@webex/common/src/deprecated.d.ts +7 -0
- package/dist/types/@webex/common/src/event-envelope.d.ts +13 -0
- package/dist/types/@webex/common/src/events.d.ts +15 -0
- package/dist/types/@webex/common/src/exception.d.ts +23 -0
- package/dist/types/@webex/common/src/in-browser/browser.d.ts +2 -0
- package/dist/types/@webex/common/src/in-browser/index.d.ts +1 -0
- package/dist/types/@webex/common/src/in-browser/node.d.ts +2 -0
- package/dist/types/@webex/common/src/index.d.ts +21 -0
- package/dist/types/@webex/common/src/isBuffer.d.ts +2 -0
- package/dist/types/@webex/common/src/make-state-datatype.d.ts +11 -0
- package/dist/types/@webex/common/src/one-flight.d.ts +9 -0
- package/dist/types/@webex/common/src/patterns.d.ts +8 -0
- package/dist/types/@webex/common/src/resolve-with.d.ts +22 -0
- package/dist/types/@webex/common/src/retry.d.ts +13 -0
- package/dist/types/@webex/common/src/tap.d.ts +17 -0
- package/dist/types/@webex/common/src/template-container.d.ts +59 -0
- package/dist/types/@webex/common/src/uuid-utils.d.ts +112 -0
- package/dist/types/@webex/common/src/while-in-flight.d.ts +7 -0
- package/dist/types/@webex/common/test/unit/spec/capped-debounce.d.ts +1 -0
- package/dist/types/@webex/common/test/unit/spec/common.d.ts +1 -0
- package/dist/types/@webex/common/test/unit/spec/exception.d.ts +1 -0
- package/dist/types/@webex/common/test/unit/spec/one-flight.d.ts +1 -0
- package/dist/types/@webex/common/test/unit/spec/template-container.d.ts +1 -0
- package/dist/types/@webex/common/test/unit/spec/while-in-flight.d.ts +1 -0
- package/dist/types/@webex/common-evented/src/index.d.ts +9 -0
- package/dist/types/@webex/common-evented/test/unit/spec/evented.d.ts +1 -0
- package/dist/types/@webex/common-timers/src/index.d.ts +19 -0
- package/dist/types/@webex/helper-html/browsers.d.ts +2 -0
- package/dist/types/@webex/helper-html/src/html-base.d.ts +12 -0
- package/dist/types/@webex/helper-html/src/html.d.ts +5 -0
- package/dist/types/@webex/helper-html/src/html.shim.d.ts +33 -0
- package/dist/types/@webex/helper-html/src/index.d.ts +1 -0
- package/dist/types/@webex/helper-html/test/unit/spec/html.d.ts +1 -0
- package/dist/types/@webex/helper-image/src/detect-filetype.d.ts +7 -0
- package/dist/types/@webex/helper-image/src/index.d.ts +26 -0
- package/dist/types/@webex/helper-image/src/process-image.browser.d.ts +19 -0
- package/dist/types/@webex/helper-image/src/process-image.d.ts +17 -0
- package/dist/types/@webex/helper-image/test/unit/spec/index.d.ts +1 -0
- package/dist/types/@webex/http-core/src/http-error-subtypes.d.ts +8 -0
- package/dist/types/@webex/http-core/src/http-error.d.ts +41 -0
- package/dist/types/@webex/http-core/src/index.d.ts +7 -0
- package/dist/types/@webex/http-core/src/interceptors/http-status.d.ts +17 -0
- package/dist/types/@webex/http-core/src/lib/detect.d.ts +6 -0
- package/dist/types/@webex/http-core/src/lib/interceptor.d.ts +51 -0
- package/dist/types/@webex/http-core/src/lib/xhr.d.ts +6 -0
- package/dist/types/@webex/http-core/src/progress-event.d.ts +18 -0
- package/dist/types/@webex/http-core/src/request/index.d.ts +5 -0
- package/dist/types/@webex/http-core/src/request/request.d.ts +6 -0
- package/dist/types/@webex/http-core/src/request/request.shim.d.ts +6 -0
- package/dist/types/@webex/http-core/test/integration/spec/http-error.d.ts +1 -0
- package/dist/types/@webex/http-core/test/integration/spec/interceptor.d.ts +1 -0
- package/dist/types/@webex/http-core/test/integration/spec/progress-event.d.ts +1 -0
- package/dist/types/@webex/http-core/test/integration/spec/request.d.ts +1 -0
- package/dist/types/@webex/http-core/test/unit/spec/interceptors/http-status.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-avatar/src/avatar-url-batcher.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-avatar/src/avatar-url-store.d.ts +50 -0
- package/dist/types/@webex/internal-plugin-avatar/src/avatar.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-avatar/src/config.d.ts +13 -0
- package/dist/types/@webex/internal-plugin-avatar/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-avatar/test/integration/spec/avatar.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-avatar/test/unit/spec/avatar-url-batcher.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-avatar/test/unit/spec/avatar-url-store.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-avatar/test/unit/spec/avatar.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-board/src/board.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-board/src/config.d.ts +11 -0
- package/dist/types/@webex/internal-plugin-board/src/index.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-board/src/realtime-channel-collection.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-board/src/realtime-channel.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-board/src/realtime.d.ts +7 -0
- package/dist/types/@webex/internal-plugin-board/test/integration/spec/board.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-board/test/integration/spec/realtime.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-board/test/integration/spec/sharing-mercury.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-board/test/unit/spec/board.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-board/test/unit/spec/encryption.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-board/test/unit/spec/realtime.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-calendar/src/calendar.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-calendar/src/collection.d.ts +58 -0
- package/dist/types/@webex/internal-plugin-calendar/src/config.d.ts +7 -0
- package/dist/types/@webex/internal-plugin-calendar/src/constants.d.ts +6 -0
- package/dist/types/@webex/internal-plugin-calendar/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-calendar/src/util.d.ts +15 -0
- package/dist/types/@webex/internal-plugin-calendar/test/integration/spec/calendar.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-calendar/test/unit/spec/calendar.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-calendar/test/unit/spec/utils.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/src/activities.d.ts +32 -0
- package/dist/types/@webex/internal-plugin-conversation/src/activity-thread-ordering.d.ts +18 -0
- package/dist/types/@webex/internal-plugin-conversation/src/config.d.ts +19 -0
- package/dist/types/@webex/internal-plugin-conversation/src/constants.d.ts +5 -0
- package/dist/types/@webex/internal-plugin-conversation/src/conversation.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-conversation/src/convo-error.d.ts +10 -0
- package/dist/types/@webex/internal-plugin-conversation/src/decryption-transforms.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/src/encryption-transforms.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/src/index.d.ts +3 -0
- package/dist/types/@webex/internal-plugin-conversation/src/share-activity.d.ts +7 -0
- package/dist/types/@webex/internal-plugin-conversation/src/to-array.d.ts +9 -0
- package/dist/types/@webex/internal-plugin-conversation/test/integration/spec/create.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/integration/spec/encryption.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/integration/spec/get.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/integration/spec/mercury.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/integration/spec/share.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/integration/spec/verbs.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/unit/spec/conversation.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/unit/spec/decrypt-transforms.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/unit/spec/encryption-transforms.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/unit/spec/share-activity.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/src/config.d.ts +10 -0
- package/dist/types/@webex/internal-plugin-device/src/constants.d.ts +12 -0
- package/dist/types/@webex/internal-plugin-device/src/device.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-device/src/features/feature-collection.d.ts +9 -0
- package/dist/types/@webex/internal-plugin-device/src/features/feature-model.d.ts +29 -0
- package/dist/types/@webex/internal-plugin-device/src/features/features-model.d.ts +9 -0
- package/dist/types/@webex/internal-plugin-device/src/features/index.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-device/src/index.d.ts +8 -0
- package/dist/types/@webex/internal-plugin-device/src/interceptors/device-url.d.ts +15 -0
- package/dist/types/@webex/internal-plugin-device/src/metrics.d.ts +5 -0
- package/dist/types/@webex/internal-plugin-device/test/integration/spec/device.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/test/integration/spec/webex.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/test/unit/spec/device.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/test/unit/spec/features/feature-collection.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/test/unit/spec/features/feature-model.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/test/unit/spec/features/features-model.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/test/unit/spec/interceptors/device-url.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-dss/src/constants.d.ts +14 -0
- package/dist/types/@webex/internal-plugin-dss/src/dss.d.ts +3 -0
- package/dist/types/@webex/internal-plugin-dss/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-dss/src/types.d.ts +28 -0
- package/dist/types/@webex/internal-plugin-dss/test/unit/spec/dss.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/config.d.ts +11 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/ediscovery-error.d.ts +11 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/ediscovery.d.ts +6 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/index.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/report-request.d.ts +29 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/retry.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/transforms.d.ts +35 -0
- package/dist/types/@webex/internal-plugin-ediscovery/test/integration/spec/ediscovery.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-ediscovery/test/unit/spec/content.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-ediscovery/test/unit/spec/report.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-ediscovery/test/unit/spec/transforms.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-encryption/src/config.d.ts +16 -0
- package/dist/types/@webex/internal-plugin-encryption/src/encryption.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-encryption/src/ensure-buffer.browser.d.ts +10 -0
- package/dist/types/@webex/internal-plugin-encryption/src/ensure-buffer.d.ts +7 -0
- package/dist/types/@webex/internal-plugin-encryption/src/index.d.ts +3 -0
- package/dist/types/@webex/internal-plugin-encryption/src/kms-batcher.d.ts +6 -0
- package/dist/types/@webex/internal-plugin-encryption/src/kms-certificate-validation.d.ts +24 -0
- package/dist/types/@webex/internal-plugin-encryption/src/kms-dry-error-interceptor.d.ts +25 -0
- package/dist/types/@webex/internal-plugin-encryption/src/kms-errors.d.ts +33 -0
- package/dist/types/@webex/internal-plugin-encryption/src/kms.d.ts +5 -0
- package/dist/types/@webex/internal-plugin-encryption/test/integration/spec/encryption.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-encryption/test/integration/spec/kms.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-encryption/test/integration/spec/payload-transfom.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-encryption/test/unit/spec/encryption.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-encryption/test/unit/spec/kms-certificate-validation.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-feature/src/config.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-feature/src/feature.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-feature/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-feature/test/integration/spec/feature.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-feature/test/unit/spec/feature.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-flag/src/config.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-flag/src/flag.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-flag/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-flag/test/integration/spec/flag.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-flag/test/unit/spec/flag.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-llm/src/constants.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-llm/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-llm/src/llm.d.ts +88 -0
- package/dist/types/@webex/internal-plugin-llm/src/llm.types.d.ts +8 -0
- package/dist/types/@webex/internal-plugin-llm/test/unit/spec/llm.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-locus/src/event-keys.d.ts +5 -0
- package/dist/types/@webex/internal-plugin-locus/src/index.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-locus/src/locus.d.ts +12 -0
- package/dist/types/@webex/internal-plugin-locus/test/unit/spec/locus.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-lyra/src/config.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-lyra/src/device.d.ts +7 -0
- package/dist/types/@webex/internal-plugin-lyra/src/index.d.ts +3 -0
- package/dist/types/@webex/internal-plugin-lyra/src/lyra.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-lyra/src/space.d.ts +7 -0
- package/dist/types/@webex/internal-plugin-lyra/test/integration/spec/device.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-lyra/test/integration/spec/space.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-lyra/test/unit/spec/device.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-lyra/test/unit/spec/lyra.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-lyra/test/unit/spec/space.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/src/config.d.ts +10 -0
- package/dist/types/@webex/internal-plugin-mercury/src/errors.d.ts +31 -0
- package/dist/types/@webex/internal-plugin-mercury/src/index.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-mercury/src/mercury.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-mercury/src/socket/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/src/socket/socket-base.d.ts +120 -0
- package/dist/types/@webex/internal-plugin-mercury/src/socket/socket.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-mercury/src/socket/socket.shim.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-mercury/test/integration/spec/mercury.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/test/integration/spec/sharable-mercury.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/test/integration/spec/webex.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/test/unit/lib/promise-tick.d.ts +9 -0
- package/dist/types/@webex/internal-plugin-mercury/test/unit/spec/_setup.d.ts +0 -0
- package/dist/types/@webex/internal-plugin-mercury/test/unit/spec/mercury-events.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/test/unit/spec/mercury.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/test/unit/spec/socket.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-metrics/src/batcher.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-metrics/src/call-diagnostic-events-batcher.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-metrics/src/client-metrics-batcher.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-metrics/src/config.d.ts +18 -0
- package/dist/types/@webex/internal-plugin-metrics/src/index.d.ts +3 -0
- package/dist/types/@webex/internal-plugin-metrics/src/metrics.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-metrics/test/unit/spec/batcher.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-metrics/test/unit/spec/call-diagnostic-events-batcher.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-metrics/test/unit/spec/client-metrics-batcher.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-metrics/test/unit/spec/metrics.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-presence/src/config.d.ts +8 -0
- package/dist/types/@webex/internal-plugin-presence/src/constants.d.ts +14 -0
- package/dist/types/@webex/internal-plugin-presence/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-presence/src/presence-batcher.d.ts +6 -0
- package/dist/types/@webex/internal-plugin-presence/src/presence-worker.d.ts +68 -0
- package/dist/types/@webex/internal-plugin-presence/src/presence.d.ts +6 -0
- package/dist/types/@webex/internal-plugin-presence/test/integration/spec/presence.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-presence/test/unit/spec/presence-worker.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-presence/test/unit/spec/presence.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-search/src/config.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-search/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-search/src/search.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-search/test/integration/spec/search.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-support/src/config.d.ts +16 -0
- package/dist/types/@webex/internal-plugin-support/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-support/src/support.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-support/test/integration/spec/support.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-support/test/unit/spec/support.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-team/src/config.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-team/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-team/src/team.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-team/test/integration/spec/actions.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-team/test/integration/spec/create.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-team/test/integration/spec/get.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-team/test/integration/spec/mercury.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-team/test/unit/spec/team.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-user/src/config.d.ts +17 -0
- package/dist/types/@webex/internal-plugin-user/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-user/src/user-uuid-batcher.d.ts +5 -0
- package/dist/types/@webex/internal-plugin-user/src/user-uuid-store.d.ts +34 -0
- package/dist/types/@webex/internal-plugin-user/src/user.d.ts +5 -0
- package/dist/types/@webex/internal-plugin-user/test/integration/spec/user.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-user/test/unit/spec/user-uuid-batcher.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-user/test/unit/spec/user.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-voicea/src/constants.d.ts +28 -0
- package/dist/types/@webex/internal-plugin-voicea/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-voicea/src/utils.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-voicea/src/voicea.d.ts +78 -0
- package/dist/types/@webex/internal-plugin-voicea/src/voicea.types.d.ts +72 -0
- package/dist/types/@webex/internal-plugin-voicea/test/unit/spec/utils.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-voicea/test/unit/spec/voicea.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-wdm/src/index.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-wdm/test/integration/spec/webex.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-wdm/test/unit/spec/device.d.ts +1 -0
- package/dist/types/@webex/jsdoctrinetest/src/assertions/literal.d.ts +12 -0
- package/dist/types/@webex/jsdoctrinetest/src/extract.d.ts +20 -0
- package/dist/types/@webex/jsdoctrinetest/src/index.d.ts +1 -0
- package/dist/types/@webex/jsdoctrinetest/src/mocha-template.d.ts +11 -0
- package/dist/types/@webex/jsdoctrinetest/src/parse.d.ts +7 -0
- package/dist/types/@webex/jsdoctrinetest/src/transform.d.ts +14 -0
- package/dist/types/@webex/jsdoctrinetest/test/unit/spec/default.d.ts +1 -0
- package/dist/types/@webex/plugin-attachment-actions/src/attachmentActions.d.ts +51 -0
- package/dist/types/@webex/plugin-attachment-actions/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-attachment-actions/test/integration/spec/attachmentActions.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization/src/index.browser.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization/src/index.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser/src/authorization.d.ts +8 -0
- package/dist/types/@webex/plugin-authorization-browser/src/config.d.ts +6 -0
- package/dist/types/@webex/plugin-authorization-browser/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-authorization-browser/test/automation/fixtures/app.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser/test/automation/spec/authorization-code-grant.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser/test/automation/spec/implicit-grant.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser/test/integration/spec/authorization.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser/test/unit/spec/authorization.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser-first-party/src/authorization.d.ts +12 -0
- package/dist/types/@webex/plugin-authorization-browser-first-party/src/config.d.ts +7 -0
- package/dist/types/@webex/plugin-authorization-browser-first-party/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-authorization-browser-first-party/test/automation/fixtures/app.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser-first-party/test/automation/spec/authorization-code-grant.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser-first-party/test/unit/spec/authorization.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-node/src/authorization.d.ts +7 -0
- package/dist/types/@webex/plugin-authorization-node/src/config.d.ts +4 -0
- package/dist/types/@webex/plugin-authorization-node/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-authorization-node/test/integration/spec/authorization.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-node/test/unit/spec/authorization.d.ts +1 -0
- package/dist/types/@webex/plugin-device-manager/sample/app.d.ts +841 -0
- package/dist/types/@webex/plugin-device-manager/src/collection.d.ts +8 -0
- package/dist/types/@webex/plugin-device-manager/src/config.d.ts +2 -0
- package/dist/types/@webex/plugin-device-manager/src/constants.d.ts +3 -0
- package/dist/types/@webex/plugin-device-manager/src/device-manager.d.ts +2 -0
- package/dist/types/@webex/plugin-device-manager/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-device-manager/test/unit/spec/index.d.ts +1 -0
- package/dist/types/@webex/plugin-device-manager/webex.d.ts +1 -0
- package/dist/types/@webex/plugin-logger/src/config.d.ts +19 -0
- package/dist/types/@webex/plugin-logger/src/index.d.ts +1 -0
- package/dist/types/@webex/plugin-logger/src/logger.d.ts +7 -0
- package/dist/types/@webex/plugin-logger/test/unit/spec/logger.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/browsers.d.ts +75 -0
- package/dist/types/@webex/plugin-meetings/src/breakouts/breakout.d.ts +8 -0
- package/dist/types/@webex/plugin-meetings/src/breakouts/collection.d.ts +5 -0
- package/dist/types/@webex/plugin-meetings/src/breakouts/index.d.ts +5 -0
- package/dist/types/@webex/plugin-meetings/src/breakouts/request.d.ts +22 -0
- package/dist/types/@webex/plugin-meetings/src/breakouts/utils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/src/common/browser-detection.d.ts +9 -0
- package/dist/types/@webex/plugin-meetings/src/common/collection.d.ts +48 -0
- package/dist/types/@webex/plugin-meetings/src/common/config.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/media.d.ts +15 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/parameter.d.ts +15 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/password-error.d.ts +15 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/permission.d.ts +14 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/reconnection.d.ts +15 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/stats.d.ts +15 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/webex-errors.d.ts +69 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/@webex/plugin-meetings/src/common/events/events-scope.d.ts +17 -0
- package/dist/types/@webex/plugin-meetings/src/common/events/events.d.ts +12 -0
- package/dist/types/@webex/plugin-meetings/src/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/common/events/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/common/logs/logger-config.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/common/logs/request.d.ts +34 -0
- package/dist/types/@webex/plugin-meetings/src/common/queue.d.ts +32 -0
- package/dist/types/@webex/plugin-meetings/src/config.d.ts +77 -0
- package/dist/types/@webex/plugin-meetings/src/constants.d.ts +899 -0
- package/dist/types/@webex/plugin-meetings/src/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/@webex/plugin-meetings/src/controls-options-manager/enums.d.ts +5 -0
- package/dist/types/@webex/plugin-meetings/src/controls-options-manager/index.d.ts +120 -0
- package/dist/types/@webex/plugin-meetings/src/controls-options-manager/util.d.ts +7 -0
- package/dist/types/@webex/plugin-meetings/src/index.d.ts +7 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/fullState.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/index.d.ts +269 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/parser.d.ts +212 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/media/index.d.ts +32 -0
- package/dist/types/@webex/plugin-meetings/src/media/properties.d.ts +107 -0
- package/dist/types/@webex/plugin-meetings/src/media/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/effectsState.d.ts +42 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/in-meeting-actions.d.ts +83 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/index.d.ts +1724 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/muteState.d.ts +108 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/request.d.ts +261 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/request.type.d.ts +11 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/state.d.ts +9 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/meeting-info/collection.d.ts +20 -0
- package/dist/types/@webex/plugin-meetings/src/meeting-info/index.d.ts +57 -0
- package/dist/types/@webex/plugin-meetings/src/meeting-info/meeting-info-v2.d.ts +93 -0
- package/dist/types/@webex/plugin-meetings/src/meeting-info/request.d.ts +22 -0
- package/dist/types/@webex/plugin-meetings/src/meeting-info/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/meetings/collection.d.ts +23 -0
- package/dist/types/@webex/plugin-meetings/src/meetings/index.d.ts +297 -0
- package/dist/types/@webex/plugin-meetings/src/meetings/request.d.ts +27 -0
- package/dist/types/@webex/plugin-meetings/src/meetings/util.d.ts +18 -0
- package/dist/types/@webex/plugin-meetings/src/member/index.d.ts +146 -0
- package/dist/types/@webex/plugin-meetings/src/member/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/members/collection.d.ts +24 -0
- package/dist/types/@webex/plugin-meetings/src/members/index.d.ts +320 -0
- package/dist/types/@webex/plugin-meetings/src/members/request.d.ts +50 -0
- package/dist/types/@webex/plugin-meetings/src/members/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/metrics/config.d.ts +178 -0
- package/dist/types/@webex/plugin-meetings/src/metrics/constants.d.ts +57 -0
- package/dist/types/@webex/plugin-meetings/src/metrics/index.d.ts +160 -0
- package/dist/types/@webex/plugin-meetings/src/multistream/mediaRequestManager.d.ts +51 -0
- package/dist/types/@webex/plugin-meetings/src/multistream/receiveSlot.d.ts +66 -0
- package/dist/types/@webex/plugin-meetings/src/multistream/receiveSlotManager.d.ts +46 -0
- package/dist/types/@webex/plugin-meetings/src/multistream/remoteMedia.d.ts +93 -0
- package/dist/types/@webex/plugin-meetings/src/multistream/remoteMediaGroup.d.ts +56 -0
- package/dist/types/@webex/plugin-meetings/src/multistream/remoteMediaManager.d.ts +241 -0
- package/dist/types/@webex/plugin-meetings/src/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/@webex/plugin-meetings/src/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/@webex/plugin-meetings/src/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/@webex/plugin-meetings/src/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/reachability/index.d.ts +140 -0
- package/dist/types/@webex/plugin-meetings/src/reachability/request.d.ts +35 -0
- package/dist/types/@webex/plugin-meetings/src/reactions/constants.d.ts +3 -0
- package/dist/types/@webex/plugin-meetings/src/reactions/reactions.d.ts +4 -0
- package/dist/types/@webex/plugin-meetings/src/reactions/reactions.type.d.ts +52 -0
- package/dist/types/@webex/plugin-meetings/src/reconnection-manager/index.d.ts +117 -0
- package/dist/types/@webex/plugin-meetings/src/recording-controller/enums.d.ts +7 -0
- package/dist/types/@webex/plugin-meetings/src/recording-controller/index.d.ts +193 -0
- package/dist/types/@webex/plugin-meetings/src/recording-controller/util.d.ts +13 -0
- package/dist/types/@webex/plugin-meetings/src/roap/index.d.ts +77 -0
- package/dist/types/@webex/plugin-meetings/src/roap/request.d.ts +35 -0
- package/dist/types/@webex/plugin-meetings/src/roap/turnDiscovery.d.ts +74 -0
- package/dist/types/@webex/plugin-meetings/src/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/@webex/plugin-meetings/src/statsAnalyzer/index.d.ts +195 -0
- package/dist/types/@webex/plugin-meetings/src/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/@webex/plugin-meetings/src/transcription/index.d.ts +64 -0
- package/dist/types/@webex/plugin-meetings/test/integration/spec/converged-space-meetings.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/integration/spec/journey.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/integration/spec/space-meeting.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/integration/spec/transcription.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/breakouts/breakout.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/breakouts/collection.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/breakouts/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/breakouts/request.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/breakouts/utils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/common/browser-detection.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/common/queue.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/controls-options-manager/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/controls-options-manager/util.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/fixture/locus.d.ts +332 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/controlsUtils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/embeddedAppsUtils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/infoUtils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/parser.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/selfConstant.d.ts +274 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/selfUtils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/media/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/media/properties.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting/effectsState.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting/in-meeting-actions.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting/muteState.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting/request.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting/utils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting-info/meetinginfov2.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting-info/request.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting-info/util.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting-info/utilv2.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meetings/collection.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meetings/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meetings/utils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/member/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/member/util.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/members/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/members/request.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/members/utils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/metrics/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/multistream/mediaRequestManager.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/multistream/receiveSlot.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/multistream/receiveSlotManager.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/multistream/remoteMedia.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/multistream/remoteMediaGroup.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/multistream/remoteMediaManager.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/networkQualityMonitor/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/personal-meeting-room/personal-meeting-room.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/reachability/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/reconnection-manager/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/recording-controller/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/recording-controller/util.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/roap/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/roap/request.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/roap/turnDiscovery.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/stats-analyzer/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/utils/cmr.d.ts +6 -0
- package/dist/types/@webex/plugin-meetings/test/utils/constants.d.ts +5 -0
- package/dist/types/@webex/plugin-meetings/test/utils/testUtils.d.ts +27 -0
- package/dist/types/@webex/plugin-meetings/test/utils/webex-config.d.ts +63 -0
- package/dist/types/@webex/plugin-meetings/test/utils/webex-test-users.d.ts +2 -0
- package/dist/types/@webex/plugin-memberships/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-memberships/src/memberships.d.ts +50 -0
- package/dist/types/@webex/plugin-memberships/test/integration/spec/memberships.d.ts +1 -0
- package/dist/types/@webex/plugin-messages/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-messages/src/messages.d.ts +58 -0
- package/dist/types/@webex/plugin-messages/test/integration/spec/messages.d.ts +1 -0
- package/dist/types/@webex/plugin-people/src/config.d.ts +9 -0
- package/dist/types/@webex/plugin-people/src/index.d.ts +1 -0
- package/dist/types/@webex/plugin-people/src/people-batcher.d.ts +6 -0
- package/dist/types/@webex/plugin-people/src/people.d.ts +30 -0
- package/dist/types/@webex/plugin-people/test/integration/spec/people.d.ts +1 -0
- package/dist/types/@webex/plugin-people/test/unit/spec/people-batcher.d.ts +1 -0
- package/dist/types/@webex/plugin-people/test/unit/spec/people.d.ts +1 -0
- package/dist/types/@webex/plugin-rooms/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-rooms/src/rooms.d.ts +41 -0
- package/dist/types/@webex/plugin-rooms/test/integration/spec/rooms.d.ts +1 -0
- package/dist/types/@webex/plugin-team-memberships/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-team-memberships/src/team-memberships.d.ts +49 -0
- package/dist/types/@webex/plugin-team-memberships/test/integration/spec/team-memberships.d.ts +1 -0
- package/dist/types/@webex/plugin-teams/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-teams/src/teams.d.ts +27 -0
- package/dist/types/@webex/plugin-teams/test/integration/spec/teams.d.ts +1 -0
- package/dist/types/@webex/plugin-webhooks/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-webhooks/src/webhooks.d.ts +48 -0
- package/dist/types/@webex/plugin-webhooks/test/integration/spec/webhooks.d.ts +1 -0
- package/dist/types/@webex/recipe-private-web-client/src/config.d.ts +10 -0
- package/dist/types/@webex/recipe-private-web-client/src/index.d.ts +8 -0
- package/dist/types/@webex/storage-adapter-local-forage/src/index.d.ts +35 -0
- package/dist/types/@webex/storage-adapter-local-forage/test/unit/spec/storage-adapter-local-forage.d.ts +1 -0
- package/dist/types/@webex/storage-adapter-local-storage/src/index.d.ts +66 -0
- package/dist/types/@webex/storage-adapter-local-storage/test/unit/spec/storage-adapter-local-storage.d.ts +1 -0
- package/dist/types/@webex/storage-adapter-session-storage/src/index.d.ts +66 -0
- package/dist/types/@webex/storage-adapter-session-storage/test/unit/spec/storage-adapter-session-storage.d.ts +1 -0
- package/dist/types/@webex/storage-adapter-spec/src/index.d.ts +1 -0
- package/dist/types/@webex/test-helper-appid/src/create-user.browser.d.ts +2 -0
- package/dist/types/@webex/test-helper-appid/src/create-user.d.ts +7 -0
- package/dist/types/@webex/test-helper-appid/src/index.d.ts +7 -0
- package/dist/types/@webex/test-helper-appid/src/router.d.ts +2 -0
- package/dist/types/@webex/test-helper-automation/src/index.d.ts +2 -0
- package/dist/types/@webex/test-helper-automation/src/wd/accept-grant.d.ts +1 -0
- package/dist/types/@webex/test-helper-automation/src/wd/login.d.ts +1 -0
- package/dist/types/@webex/test-helper-automation/src/wd/print-logs.d.ts +1 -0
- package/dist/types/@webex/test-helper-automation/src/wd/submit-password.d.ts +1 -0
- package/dist/types/@webex/test-helper-chai/src/assertions/index.d.ts +2 -0
- package/dist/types/@webex/test-helper-chai/src/assertions/primitives.d.ts +2 -0
- package/dist/types/@webex/test-helper-chai/src/assertions/schemas.d.ts +2 -0
- package/dist/types/@webex/test-helper-chai/src/assertions/should-to-assert.d.ts +2 -0
- package/dist/types/@webex/test-helper-chai/src/index.d.ts +2 -0
- package/dist/types/@webex/test-helper-file/src/file.d.ts +5 -0
- package/dist/types/@webex/test-helper-file/src/file.shim.d.ts +18 -0
- package/dist/types/@webex/test-helper-file/src/index.d.ts +2 -0
- package/dist/types/@webex/test-helper-make-local-url/src/index.d.ts +4 -0
- package/dist/types/@webex/test-helper-mocha/src/index.d.ts +29 -0
- package/dist/types/@webex/test-helper-mock-web-socket/src/index.d.ts +26 -0
- package/dist/types/@webex/test-helper-mock-webex/src/index.d.ts +7 -0
- package/dist/types/@webex/test-helper-refresh-callback/src/index.d.ts +10 -0
- package/dist/types/@webex/test-helper-retry/src/index.d.ts +15 -0
- package/dist/types/@webex/test-helper-server/src/cookies.d.ts +2 -0
- package/dist/types/@webex/test-helper-server/src/files.d.ts +2 -0
- package/dist/types/@webex/test-helper-server/src/form.d.ts +2 -0
- package/dist/types/@webex/test-helper-server/src/index.d.ts +1 -0
- package/dist/types/@webex/test-helper-server/src/json.d.ts +2 -0
- package/dist/types/@webex/test-helper-server/src/reflect.d.ts +10 -0
- package/dist/types/@webex/test-helper-test-users/src/index.d.ts +8 -0
- package/dist/types/@webex/test-users/src/index.d.ts +115 -0
- package/dist/types/@webex/test-users/src/whistler.d.ts +44 -0
- package/dist/types/@webex/test-users/test/integration/spec/index.d.ts +1 -0
- package/dist/types/@webex/test-users/test/integration/spec/whistler.d.ts +1 -0
- package/dist/types/@webex/webex-core/src/config.d.ts +39 -0
- package/dist/types/@webex/webex-core/src/credentials-config.d.ts +2 -0
- package/dist/types/@webex/webex-core/src/index.d.ts +24 -0
- package/dist/types/@webex/webex-core/src/interceptors/auth.d.ts +43 -0
- package/dist/types/@webex/webex-core/src/interceptors/default-options.d.ts +31 -0
- package/dist/types/@webex/webex-core/src/interceptors/embargo.d.ts +16 -0
- package/dist/types/@webex/webex-core/src/interceptors/network-timing.d.ts +30 -0
- package/dist/types/@webex/webex-core/src/interceptors/payload-transformer.d.ts +30 -0
- package/dist/types/@webex/webex-core/src/interceptors/rate-limit.d.ts +61 -0
- package/dist/types/@webex/webex-core/src/interceptors/redirect.d.ts +22 -0
- package/dist/types/@webex/webex-core/src/interceptors/request-event.d.ts +36 -0
- package/dist/types/@webex/webex-core/src/interceptors/request-logger.d.ts +22 -0
- package/dist/types/@webex/webex-core/src/interceptors/request-timing.d.ts +36 -0
- package/dist/types/@webex/webex-core/src/interceptors/response-logger.d.ts +30 -0
- package/dist/types/@webex/webex-core/src/interceptors/user-agent.d.ts +38 -0
- package/dist/types/@webex/webex-core/src/interceptors/webex-tracking-id.d.ts +26 -0
- package/dist/types/@webex/webex-core/src/interceptors/webex-user-agent.d.ts +22 -0
- package/dist/types/@webex/webex-core/src/lib/batcher.d.ts +6 -0
- package/dist/types/@webex/webex-core/src/lib/credentials/credentials.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/credentials/grant-errors.d.ts +57 -0
- package/dist/types/@webex/webex-core/src/lib/credentials/index.d.ts +4 -0
- package/dist/types/@webex/webex-core/src/lib/credentials/scope.d.ts +16 -0
- package/dist/types/@webex/webex-core/src/lib/credentials/token-collection.d.ts +2 -0
- package/dist/types/@webex/webex-core/src/lib/credentials/token.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/page.d.ts +76 -0
- package/dist/types/@webex/webex-core/src/lib/services/constants.d.ts +6 -0
- package/dist/types/@webex/webex-core/src/lib/services/index.d.ts +10 -0
- package/dist/types/@webex/webex-core/src/lib/services/interceptors/server-error.d.ts +16 -0
- package/dist/types/@webex/webex-core/src/lib/services/interceptors/service.d.ts +37 -0
- package/dist/types/@webex/webex-core/src/lib/services/metrics.d.ts +4 -0
- package/dist/types/@webex/webex-core/src/lib/services/service-catalog.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/services/service-fed-ramp.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/services/service-host.d.ts +217 -0
- package/dist/types/@webex/webex-core/src/lib/services/service-registry.d.ts +271 -0
- package/dist/types/@webex/webex-core/src/lib/services/service-state.d.ts +46 -0
- package/dist/types/@webex/webex-core/src/lib/services/service-url.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/services/services.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/stateless-webex-plugin.d.ts +48 -0
- package/dist/types/@webex/webex-core/src/lib/storage/decorators.d.ts +15 -0
- package/dist/types/@webex/webex-core/src/lib/storage/errors.d.ts +10 -0
- package/dist/types/@webex/webex-core/src/lib/storage/index.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/storage/make-webex-plugin-store.d.ts +8 -0
- package/dist/types/@webex/webex-core/src/lib/storage/make-webex-store.d.ts +48 -0
- package/dist/types/@webex/webex-core/src/lib/storage/memory-store-adapter.d.ts +18 -0
- package/dist/types/@webex/webex-core/src/lib/webex-core-plugin-mixin.d.ts +8 -0
- package/dist/types/@webex/webex-core/src/lib/webex-http-error.d.ts +12 -0
- package/dist/types/@webex/webex-core/src/lib/webex-internal-core-plugin-mixin.d.ts +8 -0
- package/dist/types/@webex/webex-core/src/lib/webex-plugin.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/plugins/logger.d.ts +2 -0
- package/dist/types/@webex/webex-core/src/webex-core.d.ts +31 -0
- package/dist/types/@webex/webex-core/src/webex-internal-core.d.ts +7 -0
- package/dist/types/@webex/webex-core/test/integration/spec/credentials/credentials.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/integration/spec/credentials/token.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/integration/spec/services/service-catalog.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/integration/spec/services/services.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/integration/spec/webex-core.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/_setup.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/credentials/credentials.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/credentials/token.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/auth.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/default-options.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/embargo.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/network-timing.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/payload-transformer.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/rate-limit.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/redirect.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/request-timing.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/user-agent.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/webex-tracking-id.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/webex-user-agent.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/lib/batcher.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/lib/page.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/lib/webex-plugin.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/interceptors/server-error.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/interceptors/service.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/service-catalog.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/service-host.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/service-registry.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/service-state.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/service-url.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/services.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/storage/persist.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/storage/storage-adapter.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/storage/wait-for-value.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/webex-core.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/webex-internal-core.d.ts +1 -0
- package/dist/types/@webex/webrtc/src/analyzer.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/constants.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/extractor.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/generator.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/history.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/ice.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/index.d.ts +31 -0
- package/dist/types/@webex/webrtc/src/logger.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/parser.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/stats.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/transformer.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/validator.d.ts +0 -0
- package/dist/types/@webex/xunit-with-logs/src/index.d.ts +43 -0
- package/dist/types/webex/browser.d.ts +5 -0
- package/dist/types/webex/env.d.ts +2 -0
- package/dist/types/webex/src/_setup.d.ts +1 -0
- package/dist/types/webex/src/config-storage.d.ts +5 -0
- package/dist/types/webex/src/config-storage.shim.d.ts +5 -0
- package/dist/types/webex/src/config.d.ts +17 -0
- package/dist/types/webex/src/index.d.ts +11 -0
- package/dist/types/webex/src/webex.d.ts +9 -0
- package/dist/types/webex/test/integration/spec/commonjs.d.ts +1 -0
- package/dist/types/webex/test/integration/spec/env.d.ts +1 -0
- package/dist/types/webex/test/integration/spec/init.d.ts +1 -0
- package/dist/types/webex/test/integration/spec/request.d.ts +1 -0
- package/dist/types/webex/test/unit/spec/webex.d.ts +1 -0
- package/dist/types/webex/umd/webex.min.d.ts +2 -0
- package/dist/whistler.js +32 -39
- package/dist/whistler.js.map +1 -1
- package/package.json +4 -4
- package/src/index.js +65 -52
- package/src/whistler.js +75 -59
- package/test/integration/spec/index.js +76 -64
- package/test/integration/spec/whistler.js +4 -5
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ npm install --save @webex/test-users
|
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
_Note: This package is NODE only, not for browser usage_
|
|
25
25
|
|
|
26
26
|
With the test users library, you can create and remove Webex test users:
|
|
27
27
|
|
|
@@ -32,7 +32,7 @@ createTestUser({displayName: 'Test User'}).then((myTestUser) => {
|
|
|
32
32
|
// Do something amazing with myTestUser
|
|
33
33
|
|
|
34
34
|
// When done, remove the test user
|
|
35
|
-
removeTestUser(myTestUser)
|
|
35
|
+
removeTestUser(myTestUser);
|
|
36
36
|
});
|
|
37
37
|
```
|
|
38
38
|
|
|
@@ -68,7 +68,7 @@ createTestUser({whistler: true}).then((myTestUser) => {
|
|
|
68
68
|
// Do something amazing with myTestUser
|
|
69
69
|
|
|
70
70
|
// When done, remove the test user
|
|
71
|
-
removeTestUser(myTestUser)
|
|
71
|
+
removeTestUser(myTestUser);
|
|
72
72
|
});
|
|
73
73
|
```
|
|
74
74
|
|
package/dist/index.js
CHANGED
|
@@ -1,64 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _typeof = require("@babel/runtime-corejs2/helpers/typeof");
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
8
|
-
|
|
4
|
+
var _Object$keys = require("@babel/runtime-corejs2/core-js/object/keys");
|
|
5
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
|
|
9
6
|
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
|
|
10
|
-
|
|
7
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
|
|
8
|
+
var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
|
|
9
|
+
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
10
|
+
var _WeakMap = require("@babel/runtime-corejs2/core-js/weak-map");
|
|
11
11
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
12
|
-
|
|
13
12
|
_Object$defineProperty(exports, "__esModule", {
|
|
14
13
|
value: true
|
|
15
14
|
});
|
|
16
|
-
|
|
17
15
|
exports.createTestUser = createTestUser;
|
|
18
|
-
|
|
19
16
|
_Object$defineProperty(exports, "createWhistlerTestUser", {
|
|
20
17
|
enumerable: true,
|
|
21
18
|
get: function get() {
|
|
22
19
|
return _whistler.default;
|
|
23
20
|
}
|
|
24
21
|
});
|
|
25
|
-
|
|
26
22
|
exports.loginTestUser = loginTestUser;
|
|
27
23
|
exports.removeTestUser = removeTestUser;
|
|
28
|
-
|
|
29
24
|
_Object$defineProperty(exports, "removeWhistlerTestUser", {
|
|
30
25
|
enumerable: true,
|
|
31
26
|
get: function get() {
|
|
32
27
|
return _whistler.removeTestUser;
|
|
33
28
|
}
|
|
34
29
|
});
|
|
35
|
-
|
|
36
30
|
var _now = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/date/now"));
|
|
37
|
-
|
|
38
31
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
39
|
-
|
|
40
|
-
var _assign = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/assign"));
|
|
41
|
-
|
|
32
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
42
33
|
var _defaultsDeep2 = _interopRequireDefault(require("lodash/defaultsDeep"));
|
|
43
|
-
|
|
44
34
|
var _assert = _interopRequireDefault(require("assert"));
|
|
45
|
-
|
|
46
35
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
47
|
-
|
|
48
36
|
var _btoa = _interopRequireDefault(require("btoa"));
|
|
49
|
-
|
|
50
37
|
var _nodeRandomName = _interopRequireDefault(require("node-random-name"));
|
|
51
|
-
|
|
52
38
|
var _httpCore = require("@webex/http-core");
|
|
53
|
-
|
|
54
39
|
var _whistler = _interopRequireWildcard(require("./whistler"));
|
|
55
|
-
|
|
56
40
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
57
|
-
|
|
58
41
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
59
|
-
|
|
42
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
43
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
60
44
|
var BASE_PATH_SECURE = '/users/test_users_s';
|
|
61
45
|
var BASE_PATH = '/users/test_users';
|
|
46
|
+
|
|
62
47
|
/**
|
|
63
48
|
* Computes `expires` and `refresh_token_expires` from `expires_in` and
|
|
64
49
|
* `refresh_token_expires_in` and creates an `authorization` string.
|
|
@@ -66,27 +51,22 @@ var BASE_PATH = '/users/test_users';
|
|
|
66
51
|
* @private
|
|
67
52
|
* @returns {Object}
|
|
68
53
|
*/
|
|
69
|
-
|
|
70
54
|
function fixToken(token) {
|
|
71
55
|
var now = (0, _now.default)();
|
|
72
|
-
|
|
73
56
|
if (token.expires_in && !token.expires) {
|
|
74
57
|
token.expires = now + token.expires_in * 1000;
|
|
75
58
|
}
|
|
76
|
-
|
|
77
59
|
if (token.refresh_token_expires_in && !token.refresh_token_expires) {
|
|
78
60
|
/* eslint camelcase: [0] */
|
|
79
61
|
token.refresh_token_expires = now + token.refresh_token_expires_in * 1000;
|
|
80
62
|
}
|
|
81
|
-
|
|
82
63
|
if (token.token_type && token.access_token) {
|
|
83
64
|
token.authorization = "".concat(token.token_type, " ").concat(token.access_token);
|
|
84
65
|
}
|
|
85
|
-
|
|
86
66
|
return token;
|
|
87
67
|
}
|
|
88
|
-
|
|
89
68
|
var clientToken;
|
|
69
|
+
|
|
90
70
|
/**
|
|
91
71
|
* Fetches credentials to talk to the test_users_s endpoint
|
|
92
72
|
*
|
|
@@ -98,16 +78,13 @@ var clientToken;
|
|
|
98
78
|
* @private
|
|
99
79
|
* @returns {String}
|
|
100
80
|
*/
|
|
101
|
-
|
|
102
81
|
function getClientCredentials(_ref) {
|
|
103
82
|
var clientId = _ref.clientId,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
83
|
+
clientSecret = _ref.clientSecret,
|
|
84
|
+
idbrokerUrl = _ref.idbrokerUrl;
|
|
107
85
|
if (clientToken) {
|
|
108
86
|
return _promise.default.resolve(clientToken);
|
|
109
87
|
}
|
|
110
|
-
|
|
111
88
|
return (0, _httpCore.request)({
|
|
112
89
|
method: 'POST',
|
|
113
90
|
uri: "".concat(idbrokerUrl, "/idb/oauth2/v1/access_token"),
|
|
@@ -132,6 +109,7 @@ function getClientCredentials(_ref) {
|
|
|
132
109
|
return clientToken;
|
|
133
110
|
});
|
|
134
111
|
}
|
|
112
|
+
|
|
135
113
|
/**
|
|
136
114
|
* Makes a request authorized with client credentials
|
|
137
115
|
* @param {Object} options
|
|
@@ -142,8 +120,6 @@ function getClientCredentials(_ref) {
|
|
|
142
120
|
* @private
|
|
143
121
|
* @returns {Promise<HttpResponseObject>}
|
|
144
122
|
*/
|
|
145
|
-
|
|
146
|
-
|
|
147
123
|
function requestWithAuth(options) {
|
|
148
124
|
return getClientCredentials(options.body).then(function (authorization) {
|
|
149
125
|
options.headers = options.headers || {};
|
|
@@ -151,6 +127,7 @@ function requestWithAuth(options) {
|
|
|
151
127
|
return (0, _httpCore.request)(options);
|
|
152
128
|
});
|
|
153
129
|
}
|
|
130
|
+
|
|
154
131
|
/**
|
|
155
132
|
* @typedef {Object} AccessTokenObject
|
|
156
133
|
* @property {string} token.access_token
|
|
@@ -181,51 +158,44 @@ function requestWithAuth(options) {
|
|
|
181
158
|
*/
|
|
182
159
|
|
|
183
160
|
/**
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
161
|
+
* @typedef {Object} TestUserObject
|
|
162
|
+
* @property {string} password
|
|
163
|
+
* @property {string} emailAddress
|
|
164
|
+
* @property {string} displayName
|
|
165
|
+
* @property {string} id
|
|
166
|
+
* @property {string} userName
|
|
167
|
+
* @property {string} email
|
|
168
|
+
* @property {string} name
|
|
169
|
+
* @property {string} givenName
|
|
170
|
+
* @property {string} type
|
|
171
|
+
* @property {Array.<string>} entitlements
|
|
172
|
+
* @property {string} orgId
|
|
173
|
+
* @property {AccessTokenObject} token
|
|
174
|
+
*/
|
|
198
175
|
|
|
199
176
|
/**
|
|
200
177
|
* Creates a test user
|
|
201
178
|
* @param {CreateUserOptions} options
|
|
202
179
|
* @returns {Promise.<TestUserObject>}
|
|
203
180
|
*/
|
|
204
|
-
|
|
205
|
-
|
|
206
181
|
function createTestUser() {
|
|
207
182
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
208
183
|
var clientId = options.clientId || process.env.WEBEX_CLIENT_ID;
|
|
209
184
|
var clientSecret = options.clientSecret || process.env.WEBEX_CLIENT_SECRET;
|
|
210
185
|
var idbrokerUrl = options.idbrokerUrl || process.env.IDBROKER_BASE_URL;
|
|
211
186
|
var cigServiceUrl = options.cigServiceUrl || process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL || process.env.WEBEX_TEST_USERS_CONVERSATION_SERVICE_URL;
|
|
212
|
-
|
|
213
187
|
if (!clientId) {
|
|
214
188
|
throw new Error('options.clientId or process.env.WEBEX_CLIENT_ID must be defined');
|
|
215
189
|
}
|
|
216
|
-
|
|
217
190
|
if (!clientSecret) {
|
|
218
191
|
throw new Error('options.clientSecret or process.env.WEBEX_CLIENT_SECRET must be defined');
|
|
219
192
|
}
|
|
220
|
-
|
|
221
193
|
if (!idbrokerUrl) {
|
|
222
194
|
throw new Error('options.idbrokerUrl or process.env.IDBROKER_BASE_URL must be defined');
|
|
223
195
|
}
|
|
224
|
-
|
|
225
196
|
if (!cigServiceUrl) {
|
|
226
197
|
throw new Error('options.cigServiceUrl or process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL must be defined');
|
|
227
198
|
}
|
|
228
|
-
|
|
229
199
|
var body = {
|
|
230
200
|
authCodeOnly: options.authCodeOnly,
|
|
231
201
|
clientId: clientId,
|
|
@@ -248,15 +218,16 @@ function createTestUser() {
|
|
|
248
218
|
json: true,
|
|
249
219
|
body: body
|
|
250
220
|
}).then(function (res) {
|
|
251
|
-
return (
|
|
221
|
+
return _objectSpread(_objectSpread({
|
|
252
222
|
password: body.password,
|
|
253
223
|
emailAddress: res.body.user.email,
|
|
254
224
|
displayName: res.body.user.name
|
|
255
|
-
}, res.body.user, {
|
|
225
|
+
}, res.body.user), {}, {
|
|
256
226
|
token: fixToken(res.body.token)
|
|
257
227
|
});
|
|
258
228
|
});
|
|
259
229
|
}
|
|
230
|
+
|
|
260
231
|
/**
|
|
261
232
|
* Exchanges a user name/password for an access token
|
|
262
233
|
* @param {Object} options
|
|
@@ -268,25 +239,19 @@ function createTestUser() {
|
|
|
268
239
|
* @param {string} options.cigServiceUrl
|
|
269
240
|
* @returns {Promise.<AccessTokenObject>}
|
|
270
241
|
*/
|
|
271
|
-
|
|
272
|
-
|
|
273
242
|
function loginTestUser(options) {
|
|
274
243
|
var clientId = options.clientId || process.env.WEBEX_CLIENT_ID;
|
|
275
244
|
var clientSecret = options.clientSecret || process.env.WEBEX_CLIENT_SECRET;
|
|
276
245
|
var cigServiceUrl = options.cigServiceUrl || process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL || process.env.WEBEX_TEST_USERS_CONVERSATION_SERVICE_URL;
|
|
277
|
-
|
|
278
246
|
if (!clientId) {
|
|
279
247
|
throw new Error('options.clientId or process.env.WEBEX_CLIENT_ID must be defined');
|
|
280
248
|
}
|
|
281
|
-
|
|
282
249
|
if (!clientSecret) {
|
|
283
250
|
throw new Error('options.clientSecret or process.env.WEBEX_CLIENT_SECRET must be defined');
|
|
284
251
|
}
|
|
285
|
-
|
|
286
252
|
if (!cigServiceUrl) {
|
|
287
253
|
throw new Error('options.cigServiceUrl or process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL must be defined');
|
|
288
254
|
}
|
|
289
|
-
|
|
290
255
|
return (0, _httpCore.request)({
|
|
291
256
|
method: 'POST',
|
|
292
257
|
uri: "".concat(cigServiceUrl).concat(BASE_PATH, "/login"),
|
|
@@ -299,6 +264,7 @@ function loginTestUser(options) {
|
|
|
299
264
|
return fixToken(res.body);
|
|
300
265
|
});
|
|
301
266
|
}
|
|
267
|
+
|
|
302
268
|
/**
|
|
303
269
|
* Removes a test user
|
|
304
270
|
* @param {Object} options
|
|
@@ -309,27 +275,21 @@ function loginTestUser(options) {
|
|
|
309
275
|
* @param {string} [options.token.refresh_token]
|
|
310
276
|
* @returns {Promise}
|
|
311
277
|
*/
|
|
312
|
-
|
|
313
|
-
|
|
314
278
|
function removeTestUser() {
|
|
315
279
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
316
280
|
var cigServiceUrl = options.cigServiceUrl || process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL || process.env.WEBEX_TEST_USERS_CONVERSATION_SERVICE_URL;
|
|
317
|
-
|
|
318
281
|
if (!cigServiceUrl) {
|
|
319
282
|
throw new Error('options.cigServiceUrl or process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL must be defined');
|
|
320
283
|
}
|
|
321
|
-
|
|
322
284
|
if (!options.id) {
|
|
323
285
|
return _promise.default.reject(new Error('options.id is required'));
|
|
324
286
|
}
|
|
325
|
-
|
|
326
287
|
if (!options.token) {
|
|
327
288
|
return loginTestUser(options).then(function (token) {
|
|
328
289
|
options.token = token;
|
|
329
290
|
return removeTestUser(options);
|
|
330
291
|
});
|
|
331
292
|
}
|
|
332
|
-
|
|
333
293
|
(0, _assert.default)(options.token.authorization, 'options.token.authorization must be defined');
|
|
334
294
|
return (0, _httpCore.request)({
|
|
335
295
|
method: 'POST',
|
|
@@ -343,8 +303,8 @@ function removeTestUser() {
|
|
|
343
303
|
refresh_token: options.token.refresh_token,
|
|
344
304
|
user_type: options.userType || 'PERSON'
|
|
345
305
|
/* eslint-enable camelcase */
|
|
346
|
-
|
|
347
306
|
},
|
|
307
|
+
|
|
348
308
|
uri: "".concat(cigServiceUrl).concat(BASE_PATH, "/delete")
|
|
349
309
|
});
|
|
350
310
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_PATH_SECURE","BASE_PATH","fixToken","token","now","expires_in","expires","refresh_token_expires_in","refresh_token_expires","token_type","access_token","authorization","clientToken","getClientCredentials","clientId","clientSecret","idbrokerUrl","resolve","request","method","uri","json","form","grant_type","scope","client_id","client_secret","headers","btoa","then","res","body","requestWithAuth","options","createTestUser","process","env","WEBEX_CLIENT_ID","WEBEX_CLIENT_SECRET","IDBROKER_BASE_URL","cigServiceUrl","WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL","WEBEX_TEST_USERS_CONVERSATION_SERVICE_URL","Error","authCodeOnly","displayName","randomName","emailTemplate","emailAddress","entitlements","machineType","orgId","password","uuid","v4","roles","scopes","WEBEX_SCOPE","type","user","email","name","loginTestUser","removeTestUser","id","reject","assert","user_id","refresh_token","user_type","userType"],"sources":["index.js"],"sourcesContent":["import assert from 'assert';\n\nimport uuid from 'uuid';\nimport btoa from 'btoa';\nimport _ from 'lodash';\nimport randomName from 'node-random-name';\nimport {request} from '@webex/http-core';\n\nconst BASE_PATH_SECURE = '/users/test_users_s';\nconst BASE_PATH = '/users/test_users';\n\n/**\n * Computes `expires` and `refresh_token_expires` from `expires_in` and\n * `refresh_token_expires_in` and creates an `authorization` string.\n * @param {Object} token\n * @private\n * @returns {Object}\n */\nfunction fixToken(token) {\n const now = Date.now();\n\n if (token.expires_in && !token.expires) {\n token.expires = now + token.expires_in * 1000;\n }\n\n if (token.refresh_token_expires_in && !token.refresh_token_expires) {\n /* eslint camelcase: [0] */\n token.refresh_token_expires = now + token.refresh_token_expires_in * 1000;\n }\n\n if (token.token_type && token.access_token) {\n token.authorization = `${token.token_type} ${token.access_token}`;\n }\n\n return token;\n}\n\nlet clientToken;\n\n/**\n * Fetches credentials to talk to the test_users_s endpoint\n *\n * Caches result in `clientToken` variable for multiple runs\n * @param {Object} options\n * @param {string} options.clientId\n * @param {string} options.clientSecret\n * @param {string} options.idbrokerUrl\n * @private\n * @returns {String}\n */\nfunction getClientCredentials({clientId, clientSecret, idbrokerUrl}) {\n if (clientToken) {\n return Promise.resolve(clientToken);\n }\n\n return request({\n method: 'POST',\n uri: `${idbrokerUrl}/idb/oauth2/v1/access_token`,\n json: true,\n form: {\n grant_type: 'client_credentials',\n scope: 'Identity:SCIM webexsquare:get_conversation',\n client_id: clientId,\n client_secret: clientSecret\n },\n headers: {\n // Note: we can't request's auth hash here because this endpoint expects\n // us to send the auth header *without including \"Basic \"* before the\n // token string\n authorization: btoa(`${clientId}:${clientSecret}`)\n }\n })\n .then((res) => {\n const token = fixToken(res.body);\n\n return `${token.token_type} ${token.access_token}`;\n })\n .then((token) => {\n clientToken = token;\n\n return clientToken;\n });\n}\n\n/**\n * Makes a request authorized with client credentials\n * @param {Object} options\n * @param {Object} options.body\n * @param {string} options.body.clientId\n * @param {string} options.body.clientSecret\n * @param {string} options.body.idbrokerUrl\n * @private\n * @returns {Promise<HttpResponseObject>}\n */\nfunction requestWithAuth(options) {\n return getClientCredentials(options.body)\n .then((authorization) => {\n options.headers = options.headers || {};\n options.headers.authorization = authorization;\n\n return request(options);\n });\n}\n\n/**\n * @typedef {Object} AccessTokenObject\n * @property {string} token.access_token\n * @property {Number} token.expires_in\n * @property {string} token.token_type\n * @property {string} token.refresh_token\n * @property {Number} token.refresh_token_expires_in\n * @property {string} token.expires\n * @property {string} token.refresh_token_expires\n */\n\n/**\n * @typedef {Object} CreateUserOptions\n * @property {boolean} [authCodeOnly] generates auth_code\n * @param {string} [clientId] defaults to WEBEX_CLIENT_ID\n * @param {string} [clientSecret] defaults to WEBEX_CLIENT_SECRET\n * @param {string} [cigServiceUrl] defaults to WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL\n * @property {string} [displayName]\n * @property {string} [emailAddress]\n * @property {Array.<string>} [entitlements]\n * @param {string} [idbrokerUrl] defaults to IDBROKER_BASE_URL\n * @property {string} [machineType] used when creating a machine user/device\n * @property {string} [orgId] organization ID to create the user under\n * @property {string} [password] defaults to a random password\n * @property {string} [roles] defaults to []\n * @property {string} [scope] defaults to WEBEX_SCOPE\n * @property {string} [type] used to create a machine\n */\n\n/**\n * @typedef {Object} TestUserObject\n * @property {string} password\n * @property {string} emailAddress\n * @property {string} displayName\n * @property {string} id\n * @property {string} userName\n * @property {string} email\n * @property {string} name\n * @property {string} givenName\n * @property {string} type\n * @property {Array.<string>} entitlements\n * @property {string} orgId\n * @property {AccessTokenObject} token\n */\n\n/**\n * Creates a test user\n * @param {CreateUserOptions} options\n * @returns {Promise.<TestUserObject>}\n */\nexport function createTestUser(options = {}) {\n const clientId = options.clientId || process.env.WEBEX_CLIENT_ID;\n const clientSecret = options.clientSecret || process.env.WEBEX_CLIENT_SECRET;\n const idbrokerUrl = options.idbrokerUrl || process.env.IDBROKER_BASE_URL;\n const cigServiceUrl = options.cigServiceUrl || process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL || process.env.WEBEX_TEST_USERS_CONVERSATION_SERVICE_URL;\n\n if (!clientId) {\n throw new Error('options.clientId or process.env.WEBEX_CLIENT_ID must be defined');\n }\n\n if (!clientSecret) {\n throw new Error('options.clientSecret or process.env.WEBEX_CLIENT_SECRET must be defined');\n }\n\n if (!idbrokerUrl) {\n throw new Error('options.idbrokerUrl or process.env.IDBROKER_BASE_URL must be defined');\n }\n\n if (!cigServiceUrl) {\n throw new Error('options.cigServiceUrl or process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL must be defined');\n }\n\n const body = {\n authCodeOnly: options.authCodeOnly,\n clientId,\n clientSecret,\n displayName: options.displayName || randomName(),\n emailTemplate: options.emailAddress,\n entitlements: options.entitlements || [\n 'spark',\n 'squaredCallInitiation',\n 'squaredRoomModeration',\n 'squaredInviter',\n 'webExSquared'\n ],\n idbrokerUrl,\n machineType: options.machineType,\n orgId: options.orgId,\n // The five characters on the end are to hit all the password requirements\n password: options.password || `${uuid.v4()}zAY1*`,\n roles: options.roles || [],\n scopes: options.scope || process.env.WEBEX_SCOPE,\n type: options.type\n };\n\n return requestWithAuth({\n method: 'POST',\n uri: `${cigServiceUrl}${BASE_PATH_SECURE}`,\n json: true,\n body\n })\n .then((res) => Object.assign({\n password: body.password,\n emailAddress: res.body.user.email,\n displayName: res.body.user.name\n }, res.body.user, {token: fixToken(res.body.token)}));\n}\n\n/**\n * Exchanges a user name/password for an access token\n * @param {Object} options\n * @param {string} options.id\n * @param {string} options.email\n * @param {string} options.password\n * @param {string} options.clientId\n * @param {string} options.clientSecret\n * @param {string} options.cigServiceUrl\n * @returns {Promise.<AccessTokenObject>}\n */\nexport function loginTestUser(options) {\n const clientId = options.clientId || process.env.WEBEX_CLIENT_ID;\n const clientSecret = options.clientSecret || process.env.WEBEX_CLIENT_SECRET;\n const cigServiceUrl = options.cigServiceUrl || process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL || process.env.WEBEX_TEST_USERS_CONVERSATION_SERVICE_URL;\n\n if (!clientId) {\n throw new Error('options.clientId or process.env.WEBEX_CLIENT_ID must be defined');\n }\n\n if (!clientSecret) {\n throw new Error('options.clientSecret or process.env.WEBEX_CLIENT_SECRET must be defined');\n }\n\n if (!cigServiceUrl) {\n throw new Error('options.cigServiceUrl or process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL must be defined');\n }\n\n return request({\n method: 'POST',\n uri: `${cigServiceUrl}${BASE_PATH}/login`,\n json: true,\n body: _.defaultsDeep(options, {\n clientId,\n clientSecret\n })\n })\n .then((res) => fixToken(res.body));\n}\n\n/**\n * Removes a test user\n * @param {Object} options\n * @param {string} options.id user id to remove\n * @param {string} options.cigServiceUrl\n * @param {Object} options.token\n * @param {string} options.token.authorization\n * @param {string} [options.token.refresh_token]\n * @returns {Promise}\n */\nexport function removeTestUser(options = {}) {\n const cigServiceUrl = options.cigServiceUrl || process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL || process.env.WEBEX_TEST_USERS_CONVERSATION_SERVICE_URL;\n\n if (!cigServiceUrl) {\n throw new Error('options.cigServiceUrl or process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL must be defined');\n }\n\n if (!options.id) {\n return Promise.reject(new Error('options.id is required'));\n }\n\n if (!options.token) {\n return loginTestUser(options)\n .then((token) => {\n options.token = token;\n\n return removeTestUser(options);\n });\n }\n\n assert(options.token.authorization, 'options.token.authorization must be defined');\n\n return request({\n method: 'POST',\n json: true,\n headers: {\n authorization: options.token.authorization\n },\n body: {\n /* eslint-disable camelcase */\n user_id: options.id,\n refresh_token: options.token.refresh_token,\n user_type: options.userType || 'PERSON'\n /* eslint-enable camelcase */\n },\n uri: `${cigServiceUrl}${BASE_PATH}/delete`\n });\n}\n\nexport {\n default as createWhistlerTestUser,\n removeTestUser as removeWhistlerTestUser\n} from './whistler';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AAEA;;AACA;;AAuSA;;;;;;AArSA,IAAMA,gBAAgB,GAAG,qBAAzB;AACA,IAAMC,SAAS,GAAG,mBAAlB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,Q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,EAAE;MACJ;MACAoC,OAAO,EAAElC,OAAO,CAAC+B,EAFb;MAGJI,aAAa,EAAEnC,OAAO,CAAC9B,KAAR,CAAciE,aAHzB;MAIJC,SAAS,EAAEpC,OAAO,CAACqC,QAAR,IAAoB;MAC/B;;IALI,CANO;IAablD,GAAG,YAAKoB,aAAL,SAAqBvC,SAArB;EAbU,CAAR,CAAP;AAeD"}
|
|
1
|
+
{"version":3,"names":["BASE_PATH_SECURE","BASE_PATH","fixToken","token","now","expires_in","expires","refresh_token_expires_in","refresh_token_expires","token_type","access_token","authorization","clientToken","getClientCredentials","clientId","clientSecret","idbrokerUrl","resolve","request","method","uri","json","form","grant_type","scope","client_id","client_secret","headers","btoa","then","res","body","requestWithAuth","options","createTestUser","process","env","WEBEX_CLIENT_ID","WEBEX_CLIENT_SECRET","IDBROKER_BASE_URL","cigServiceUrl","WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL","WEBEX_TEST_USERS_CONVERSATION_SERVICE_URL","Error","authCodeOnly","displayName","randomName","emailTemplate","emailAddress","entitlements","machineType","orgId","password","uuid","v4","roles","scopes","WEBEX_SCOPE","type","user","email","name","loginTestUser","removeTestUser","id","reject","assert","user_id","refresh_token","user_type","userType"],"sources":["index.js"],"sourcesContent":["import assert from 'assert';\n\nimport uuid from 'uuid';\nimport btoa from 'btoa';\nimport _ from 'lodash';\nimport randomName from 'node-random-name';\nimport {request} from '@webex/http-core';\n\nconst BASE_PATH_SECURE = '/users/test_users_s';\nconst BASE_PATH = '/users/test_users';\n\n/**\n * Computes `expires` and `refresh_token_expires` from `expires_in` and\n * `refresh_token_expires_in` and creates an `authorization` string.\n * @param {Object} token\n * @private\n * @returns {Object}\n */\nfunction fixToken(token) {\n const now = Date.now();\n\n if (token.expires_in && !token.expires) {\n token.expires = now + token.expires_in * 1000;\n }\n\n if (token.refresh_token_expires_in && !token.refresh_token_expires) {\n /* eslint camelcase: [0] */\n token.refresh_token_expires = now + token.refresh_token_expires_in * 1000;\n }\n\n if (token.token_type && token.access_token) {\n token.authorization = `${token.token_type} ${token.access_token}`;\n }\n\n return token;\n}\n\nlet clientToken;\n\n/**\n * Fetches credentials to talk to the test_users_s endpoint\n *\n * Caches result in `clientToken` variable for multiple runs\n * @param {Object} options\n * @param {string} options.clientId\n * @param {string} options.clientSecret\n * @param {string} options.idbrokerUrl\n * @private\n * @returns {String}\n */\nfunction getClientCredentials({clientId, clientSecret, idbrokerUrl}) {\n if (clientToken) {\n return Promise.resolve(clientToken);\n }\n\n return request({\n method: 'POST',\n uri: `${idbrokerUrl}/idb/oauth2/v1/access_token`,\n json: true,\n form: {\n grant_type: 'client_credentials',\n scope: 'Identity:SCIM webexsquare:get_conversation',\n client_id: clientId,\n client_secret: clientSecret,\n },\n headers: {\n // Note: we can't request's auth hash here because this endpoint expects\n // us to send the auth header *without including \"Basic \"* before the\n // token string\n authorization: btoa(`${clientId}:${clientSecret}`),\n },\n })\n .then((res) => {\n const token = fixToken(res.body);\n\n return `${token.token_type} ${token.access_token}`;\n })\n .then((token) => {\n clientToken = token;\n\n return clientToken;\n });\n}\n\n/**\n * Makes a request authorized with client credentials\n * @param {Object} options\n * @param {Object} options.body\n * @param {string} options.body.clientId\n * @param {string} options.body.clientSecret\n * @param {string} options.body.idbrokerUrl\n * @private\n * @returns {Promise<HttpResponseObject>}\n */\nfunction requestWithAuth(options) {\n return getClientCredentials(options.body).then((authorization) => {\n options.headers = options.headers || {};\n options.headers.authorization = authorization;\n\n return request(options);\n });\n}\n\n/**\n * @typedef {Object} AccessTokenObject\n * @property {string} token.access_token\n * @property {Number} token.expires_in\n * @property {string} token.token_type\n * @property {string} token.refresh_token\n * @property {Number} token.refresh_token_expires_in\n * @property {string} token.expires\n * @property {string} token.refresh_token_expires\n */\n\n/**\n * @typedef {Object} CreateUserOptions\n * @property {boolean} [authCodeOnly] generates auth_code\n * @param {string} [clientId] defaults to WEBEX_CLIENT_ID\n * @param {string} [clientSecret] defaults to WEBEX_CLIENT_SECRET\n * @param {string} [cigServiceUrl] defaults to WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL\n * @property {string} [displayName]\n * @property {string} [emailAddress]\n * @property {Array.<string>} [entitlements]\n * @param {string} [idbrokerUrl] defaults to IDBROKER_BASE_URL\n * @property {string} [machineType] used when creating a machine user/device\n * @property {string} [orgId] organization ID to create the user under\n * @property {string} [password] defaults to a random password\n * @property {string} [roles] defaults to []\n * @property {string} [scope] defaults to WEBEX_SCOPE\n * @property {string} [type] used to create a machine\n */\n\n/**\n * @typedef {Object} TestUserObject\n * @property {string} password\n * @property {string} emailAddress\n * @property {string} displayName\n * @property {string} id\n * @property {string} userName\n * @property {string} email\n * @property {string} name\n * @property {string} givenName\n * @property {string} type\n * @property {Array.<string>} entitlements\n * @property {string} orgId\n * @property {AccessTokenObject} token\n */\n\n/**\n * Creates a test user\n * @param {CreateUserOptions} options\n * @returns {Promise.<TestUserObject>}\n */\nexport function createTestUser(options = {}) {\n const clientId = options.clientId || process.env.WEBEX_CLIENT_ID;\n const clientSecret = options.clientSecret || process.env.WEBEX_CLIENT_SECRET;\n const idbrokerUrl = options.idbrokerUrl || process.env.IDBROKER_BASE_URL;\n const cigServiceUrl =\n options.cigServiceUrl ||\n process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL ||\n process.env.WEBEX_TEST_USERS_CONVERSATION_SERVICE_URL;\n\n if (!clientId) {\n throw new Error('options.clientId or process.env.WEBEX_CLIENT_ID must be defined');\n }\n\n if (!clientSecret) {\n throw new Error('options.clientSecret or process.env.WEBEX_CLIENT_SECRET must be defined');\n }\n\n if (!idbrokerUrl) {\n throw new Error('options.idbrokerUrl or process.env.IDBROKER_BASE_URL must be defined');\n }\n\n if (!cigServiceUrl) {\n throw new Error(\n 'options.cigServiceUrl or process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL must be defined'\n );\n }\n\n const body = {\n authCodeOnly: options.authCodeOnly,\n clientId,\n clientSecret,\n displayName: options.displayName || randomName(),\n emailTemplate: options.emailAddress,\n entitlements: options.entitlements || [\n 'spark',\n 'squaredCallInitiation',\n 'squaredRoomModeration',\n 'squaredInviter',\n 'webExSquared',\n ],\n idbrokerUrl,\n machineType: options.machineType,\n orgId: options.orgId,\n // The five characters on the end are to hit all the password requirements\n password: options.password || `${uuid.v4()}zAY1*`,\n roles: options.roles || [],\n scopes: options.scope || process.env.WEBEX_SCOPE,\n type: options.type,\n };\n\n return requestWithAuth({\n method: 'POST',\n uri: `${cigServiceUrl}${BASE_PATH_SECURE}`,\n json: true,\n body,\n }).then((res) => ({\n password: body.password,\n emailAddress: res.body.user.email,\n displayName: res.body.user.name,\n ...res.body.user,\n token: fixToken(res.body.token),\n }));\n}\n\n/**\n * Exchanges a user name/password for an access token\n * @param {Object} options\n * @param {string} options.id\n * @param {string} options.email\n * @param {string} options.password\n * @param {string} options.clientId\n * @param {string} options.clientSecret\n * @param {string} options.cigServiceUrl\n * @returns {Promise.<AccessTokenObject>}\n */\nexport function loginTestUser(options) {\n const clientId = options.clientId || process.env.WEBEX_CLIENT_ID;\n const clientSecret = options.clientSecret || process.env.WEBEX_CLIENT_SECRET;\n const cigServiceUrl =\n options.cigServiceUrl ||\n process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL ||\n process.env.WEBEX_TEST_USERS_CONVERSATION_SERVICE_URL;\n\n if (!clientId) {\n throw new Error('options.clientId or process.env.WEBEX_CLIENT_ID must be defined');\n }\n\n if (!clientSecret) {\n throw new Error('options.clientSecret or process.env.WEBEX_CLIENT_SECRET must be defined');\n }\n\n if (!cigServiceUrl) {\n throw new Error(\n 'options.cigServiceUrl or process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL must be defined'\n );\n }\n\n return request({\n method: 'POST',\n uri: `${cigServiceUrl}${BASE_PATH}/login`,\n json: true,\n body: _.defaultsDeep(options, {\n clientId,\n clientSecret,\n }),\n }).then((res) => fixToken(res.body));\n}\n\n/**\n * Removes a test user\n * @param {Object} options\n * @param {string} options.id user id to remove\n * @param {string} options.cigServiceUrl\n * @param {Object} options.token\n * @param {string} options.token.authorization\n * @param {string} [options.token.refresh_token]\n * @returns {Promise}\n */\nexport function removeTestUser(options = {}) {\n const cigServiceUrl =\n options.cigServiceUrl ||\n process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL ||\n process.env.WEBEX_TEST_USERS_CONVERSATION_SERVICE_URL;\n\n if (!cigServiceUrl) {\n throw new Error(\n 'options.cigServiceUrl or process.env.WEBEX_TEST_USERS_CI_GATEWAY_SERVICE_URL must be defined'\n );\n }\n\n if (!options.id) {\n return Promise.reject(new Error('options.id is required'));\n }\n\n if (!options.token) {\n return loginTestUser(options).then((token) => {\n options.token = token;\n\n return removeTestUser(options);\n });\n }\n\n assert(options.token.authorization, 'options.token.authorization must be defined');\n\n return request({\n method: 'POST',\n json: true,\n headers: {\n authorization: options.token.authorization,\n },\n body: {\n /* eslint-disable camelcase */\n user_id: options.id,\n refresh_token: options.token.refresh_token,\n user_type: options.userType || 'PERSON',\n /* eslint-enable camelcase */\n },\n uri: `${cigServiceUrl}${BASE_PATH}/delete`,\n });\n}\n\nexport {\n default as createWhistlerTestUser,\n removeTestUser as removeWhistlerTestUser,\n} from './whistler';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAEA;AACA;AAEA;AACA;AAoTA;AAGoB;AAAA;AAAA;AAAA;AArTpB,IAAMA,gBAAgB,GAAG,qBAAqB;AAC9C,IAAMC,SAAS,GAAG,mBAAmB;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,QAAQ,CAACC,KAAK,EAAE;EACvB,IAAMC,GAAG,GAAG,mBAAU;EAEtB,IAAID,KAAK,CAACE,UAAU,IAAI,CAACF,KAAK,CAACG,OAAO,EAAE;IACtCH,KAAK,CAACG,OAAO,GAAGF,GAAG,GAAGD,KAAK,CAACE,UAAU,GAAG,IAAI;EAC/C;EAEA,IAAIF,KAAK,CAACI,wBAAw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|
+
*/
|
|
6
|
+
export function fromBase64url(str: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Converts a string to a base64url-encoded string. It also accepts a buffer
|
|
9
|
+
* @param {string|buffer} str
|
|
10
|
+
* @returns {string}
|
|
11
|
+
*/
|
|
12
|
+
export function toBase64Url(str: any): string;
|
|
13
|
+
/**
|
|
14
|
+
* Converts a string to a base64url-encoded string. It also accepts a buffer
|
|
15
|
+
* @param {string|buffer} str
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
18
|
+
export function encode(str: string | buffer): string;
|
|
19
|
+
/**
|
|
20
|
+
* Converts a string from a base64url-encoded string
|
|
21
|
+
* @param {string} str
|
|
22
|
+
* @returns {string}
|
|
23
|
+
*/
|
|
24
|
+
export function decode(str: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Indicates if the provided string is, in fact, a base64 string
|
|
27
|
+
* @param {String} str
|
|
28
|
+
* @returns {Boolean}
|
|
29
|
+
*/
|
|
30
|
+
export function validate(str: string): boolean;
|
|
31
|
+
declare namespace _default {
|
|
32
|
+
export { fromBase64url };
|
|
33
|
+
export { toBase64Url };
|
|
34
|
+
export { encode };
|
|
35
|
+
export { decode };
|
|
36
|
+
export { validate };
|
|
37
|
+
}
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Behaves like debounce, but additionally executes after a number of calls are
|
|
6
|
+
* attempted, rather than just time
|
|
7
|
+
* @param {Function} fn
|
|
8
|
+
* @param {Number} wait
|
|
9
|
+
* @param {Object} options
|
|
10
|
+
* @returns {Function}
|
|
11
|
+
*/
|
|
12
|
+
export default function debounce(fn: Function, wait: number, options: any): Function;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Check object for the specified keys
|
|
6
|
+
* @param {Array<string>} keys
|
|
7
|
+
* @param {Object} object
|
|
8
|
+
* @returns {undefined}
|
|
9
|
+
* @throws Error
|
|
10
|
+
*/
|
|
11
|
+
export default function checkRequired(keys: Array<string>, object: any): undefined;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export namespace SDK_EVENT {
|
|
2
|
+
namespace INTERNAL {
|
|
3
|
+
const WEBEX_ACTIVITY: string;
|
|
4
|
+
namespace ACTIVITY_FIELD {
|
|
5
|
+
const ACTOR: string;
|
|
6
|
+
const OBJECT: string;
|
|
7
|
+
const TARGET: string;
|
|
8
|
+
}
|
|
9
|
+
namespace ACTIVITY_VERB {
|
|
10
|
+
const ACKNOWLEDGE: string;
|
|
11
|
+
const CARD_ACTION: string;
|
|
12
|
+
const CREATE: string;
|
|
13
|
+
const POST: string;
|
|
14
|
+
const SHARE: string;
|
|
15
|
+
const DELETE: string;
|
|
16
|
+
const ADD: string;
|
|
17
|
+
const LEAVE: string;
|
|
18
|
+
const ADD_MODERATOR: string;
|
|
19
|
+
const REMOVE_MODERATOR: string;
|
|
20
|
+
const LOCK: string;
|
|
21
|
+
const UNLOCK: string;
|
|
22
|
+
const HIDE: string;
|
|
23
|
+
const UPDATE: string;
|
|
24
|
+
}
|
|
25
|
+
namespace ACTIVITY_TAG {
|
|
26
|
+
const HIDDEN: string;
|
|
27
|
+
const ONE_ON_ONE: string;
|
|
28
|
+
const LOCKED: string;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
namespace EXTERNAL {
|
|
32
|
+
namespace EVENT_TYPE {
|
|
33
|
+
const CREATED: string;
|
|
34
|
+
const DELETED: string;
|
|
35
|
+
const UPDATED: string;
|
|
36
|
+
const SEEN: string;
|
|
37
|
+
}
|
|
38
|
+
namespace OWNER {
|
|
39
|
+
const CREATOR: string;
|
|
40
|
+
const ORG: string;
|
|
41
|
+
}
|
|
42
|
+
namespace STATUS {
|
|
43
|
+
const ACTIVE: string;
|
|
44
|
+
const DISABLED: string;
|
|
45
|
+
}
|
|
46
|
+
namespace SPACE_TYPE {
|
|
47
|
+
const DIRECT: string;
|
|
48
|
+
const GROUP: string;
|
|
49
|
+
}
|
|
50
|
+
namespace RESOURCE {
|
|
51
|
+
const ATTACHMENT_ACTIONS: string;
|
|
52
|
+
const MEMBERSHIPS: string;
|
|
53
|
+
const MESSAGES: string;
|
|
54
|
+
const ROOMS: string;
|
|
55
|
+
}
|
|
56
|
+
namespace ATTACHMENTS {
|
|
57
|
+
const CARD_CONTENT_TYPE: string;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export namespace hydraTypes {
|
|
62
|
+
const ATTACHMENT_ACTION: string;
|
|
63
|
+
const CONTENT: string;
|
|
64
|
+
const MEMBERSHIP: string;
|
|
65
|
+
const MESSAGE: string;
|
|
66
|
+
const ORGANIZATION: string;
|
|
67
|
+
const PEOPLE: string;
|
|
68
|
+
const ROOM: string;
|
|
69
|
+
const TEAM: string;
|
|
70
|
+
}
|
|
71
|
+
export namespace deviceType {
|
|
72
|
+
const PROVISIONAL: string;
|
|
73
|
+
const WEB: string;
|
|
74
|
+
}
|
|
75
|
+
export const INTERNAL_US_CLUSTER_NAME: "urn:TEAM:us-east-2_a";
|
|
76
|
+
export const INTERNAL_US_INTEGRATION_CLUSTER_NAME: "urn:TEAM:us-east-1_int13";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Creates a new `Defer`red object,
|
|
6
|
+
* @returns {Defer}
|
|
7
|
+
*/
|
|
8
|
+
export default function Defer(): Defer;
|
|
9
|
+
export default class Defer {
|
|
10
|
+
promise: Promise<any>;
|
|
11
|
+
/**
|
|
12
|
+
* @instance
|
|
13
|
+
* @memberof Defer
|
|
14
|
+
* @type {function}
|
|
15
|
+
*/
|
|
16
|
+
resolve: Function;
|
|
17
|
+
/**
|
|
18
|
+
* @instance
|
|
19
|
+
* @memberof Defer
|
|
20
|
+
* @type {function}
|
|
21
|
+
*/
|
|
22
|
+
reject: Function;
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a 'webhook' envelope to wrap Webex events in
|
|
3
|
+
* @param {object} webex - sdk object
|
|
4
|
+
* @param {string} resource - resource to create an envelope for
|
|
5
|
+
* @returns {object} - Returns a promise of an event envelope object
|
|
6
|
+
*/
|
|
7
|
+
export function createEventEnvelope(webex: object, resource: string): object;
|
|
8
|
+
/**
|
|
9
|
+
* Stores SDK users info in the sdk object if it doesn't already exist
|
|
10
|
+
* @param {object} webex - sdk object
|
|
11
|
+
* @returns {Promise} - Returns a promise that user info will be available
|
|
12
|
+
*/
|
|
13
|
+
export function ensureMyIdIsAvailable(webex: object): Promise<any>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Proxies the event binding methods of emitter onto proxy
|
|
3
|
+
* @param {EventEmitter|EventEmitterProxy} emitter
|
|
4
|
+
* @param {mixed} proxy (probably a promise)
|
|
5
|
+
* @returns {EventEmitter} Returns the source emitter to ease use in promise chains
|
|
6
|
+
*/
|
|
7
|
+
export function proxyEvents(emitter: EventEmitter | EventEmitterProxy, proxy: mixed): EventEmitter;
|
|
8
|
+
/**
|
|
9
|
+
* Given a list of events, fires them on drain when they're emitted from source
|
|
10
|
+
* @param {Array|string} events
|
|
11
|
+
* @param {EventEmitter} source
|
|
12
|
+
* @param {EventEmitter} drain
|
|
13
|
+
* @returns {undefined}
|
|
14
|
+
*/
|
|
15
|
+
export function transferEvents(events: any[] | string, source: EventEmitter, drain: EventEmitter): undefined;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Base Exception class
|
|
6
|
+
*/
|
|
7
|
+
export default class Exception extends Error {
|
|
8
|
+
static defaultMessage: string;
|
|
9
|
+
/**
|
|
10
|
+
* Generates the value assigned to `this.message`. You'll probably want to
|
|
11
|
+
* override this in your custom Exception
|
|
12
|
+
* @param {mixed} args
|
|
13
|
+
* @returns {string}
|
|
14
|
+
*/
|
|
15
|
+
static parse(...args: mixed): string;
|
|
16
|
+
/**
|
|
17
|
+
* constructor
|
|
18
|
+
* @param {mixed} args
|
|
19
|
+
* @returns {Exception}
|
|
20
|
+
*/
|
|
21
|
+
constructor(...args: mixed);
|
|
22
|
+
message: any;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./node";
|