@ludeo/cloud-common 1.1.142 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/v3/types/cloud.d.ts +1 -0
- package/dist/v3/types/cloud.js +5 -0
- package/dist/v3/types/cloud.js.map +1 -1
- package/dist/v4/contexts/cloud-pool-context.d.ts +8 -0
- package/dist/v4/contexts/cloud-pool-context.js +41 -0
- package/dist/v4/contexts/cloud-pool-context.js.map +1 -0
- package/dist/v4/contexts/cloud-resource-context.d.ts +14 -0
- package/dist/v4/contexts/cloud-resource-context.js +72 -0
- package/dist/v4/contexts/cloud-resource-context.js.map +1 -0
- package/dist/v4/contexts/cloud-session-context.d.ts +20 -0
- package/dist/v4/contexts/cloud-session-context.js +101 -0
- package/dist/v4/contexts/cloud-session-context.js.map +1 -0
- package/dist/v4/contexts/getCloudContextType.d.ts +5 -0
- package/dist/v4/contexts/getCloudContextType.js +20 -0
- package/dist/v4/contexts/getCloudContextType.js.map +1 -0
- package/dist/v4/contexts/getCloudContextType.spec.d.ts +1 -0
- package/dist/v4/contexts/getCloudContextType.spec.js +95 -0
- package/dist/v4/contexts/getCloudContextType.spec.js.map +1 -0
- package/dist/v4/contexts/index.d.ts +4 -0
- package/dist/v4/contexts/index.js +21 -0
- package/dist/v4/contexts/index.js.map +1 -0
- package/dist/v4/events/allocate-cloud-session-failed.d.ts +11 -0
- package/dist/v4/events/allocate-cloud-session-failed.js +41 -0
- package/dist/v4/events/allocate-cloud-session-failed.js.map +1 -0
- package/dist/v4/events/allocate-cloud-session-request.d.ts +12 -0
- package/dist/v4/events/allocate-cloud-session-request.js +41 -0
- package/dist/v4/events/allocate-cloud-session-request.js.map +1 -0
- package/dist/v4/events/allocate-game-request.d.ts +13 -0
- package/dist/v4/events/allocate-game-request.js +46 -0
- package/dist/v4/events/allocate-game-request.js.map +1 -0
- package/dist/v4/events/allocate-game-resource-request.d.ts +17 -0
- package/dist/v4/events/allocate-game-resource-request.js +62 -0
- package/dist/v4/events/allocate-game-resource-request.js.map +1 -0
- package/dist/v4/events/allocate-ludeo-resource-request.d.ts +11 -0
- package/dist/v4/events/allocate-ludeo-resource-request.js +41 -0
- package/dist/v4/events/allocate-ludeo-resource-request.js.map +1 -0
- package/dist/v4/events/allocate-machine-request.d.ts +13 -0
- package/dist/v4/events/allocate-machine-request.js +49 -0
- package/dist/v4/events/allocate-machine-request.js.map +1 -0
- package/dist/v4/events/aws-poll-stream-session-task.d.ts +15 -0
- package/dist/v4/events/aws-poll-stream-session-task.js +49 -0
- package/dist/v4/events/aws-poll-stream-session-task.js.map +1 -0
- package/dist/v4/events/aws-reactivate-stream-session-task.d.ts +13 -0
- package/dist/v4/events/aws-reactivate-stream-session-task.js +44 -0
- package/dist/v4/events/aws-reactivate-stream-session-task.js.map +1 -0
- package/dist/v4/events/aws-stream-session-active.d.ts +15 -0
- package/dist/v4/events/aws-stream-session-active.js +51 -0
- package/dist/v4/events/aws-stream-session-active.js.map +1 -0
- package/dist/v4/events/aws-stream-session-reactivation-started.d.ts +13 -0
- package/dist/v4/events/aws-stream-session-reactivation-started.js +44 -0
- package/dist/v4/events/aws-stream-session-reactivation-started.js.map +1 -0
- package/dist/v4/events/cloud-machine-auth-ready.d.ts +16 -0
- package/dist/v4/events/cloud-machine-auth-ready.js +54 -0
- package/dist/v4/events/cloud-machine-auth-ready.js.map +1 -0
- package/dist/v4/events/cloud-session-allocated.d.ts +13 -0
- package/dist/v4/events/cloud-session-allocated.js +47 -0
- package/dist/v4/events/cloud-session-allocated.js.map +1 -0
- package/dist/v4/events/cloud-session-created.d.ts +9 -0
- package/dist/v4/events/cloud-session-created.js +34 -0
- package/dist/v4/events/cloud-session-created.js.map +1 -0
- package/dist/v4/events/cloud-session-ended.d.ts +14 -0
- package/dist/v4/events/cloud-session-ended.js +53 -0
- package/dist/v4/events/cloud-session-ended.js.map +1 -0
- package/dist/v4/events/cloud-session-optimal-region-selected.d.ts +12 -0
- package/dist/v4/events/cloud-session-optimal-region-selected.js +40 -0
- package/dist/v4/events/cloud-session-optimal-region-selected.js.map +1 -0
- package/dist/v4/events/cloud-session-provider-requested.d.ts +14 -0
- package/dist/v4/events/cloud-session-provider-requested.js +51 -0
- package/dist/v4/events/cloud-session-provider-requested.js.map +1 -0
- package/dist/v4/events/cloud-session-timeout-task.d.ts +10 -0
- package/dist/v4/events/cloud-session-timeout-task.js +36 -0
- package/dist/v4/events/cloud-session-timeout-task.js.map +1 -0
- package/dist/v4/events/create-game-resource-request.d.ts +16 -0
- package/dist/v4/events/create-game-resource-request.js +58 -0
- package/dist/v4/events/create-game-resource-request.js.map +1 -0
- package/dist/v4/events/create-games-request.d.ts +12 -0
- package/dist/v4/events/create-games-request.js +45 -0
- package/dist/v4/events/create-games-request.js.map +1 -0
- package/dist/v4/events/create-ludeos-request.d.ts +12 -0
- package/dist/v4/events/create-ludeos-request.js +45 -0
- package/dist/v4/events/create-ludeos-request.js.map +1 -0
- package/dist/v4/events/create-machine-resource-batch-request.d.ts +15 -0
- package/dist/v4/events/create-machine-resource-batch-request.js +54 -0
- package/dist/v4/events/create-machine-resource-batch-request.js.map +1 -0
- package/dist/v4/events/create-machine-resource-request.d.ts +15 -0
- package/dist/v4/events/create-machine-resource-request.js +54 -0
- package/dist/v4/events/create-machine-resource-request.js.map +1 -0
- package/dist/v4/events/create-machines-request.d.ts +12 -0
- package/dist/v4/events/create-machines-request.js +45 -0
- package/dist/v4/events/create-machines-request.js.map +1 -0
- package/dist/v4/events/deallocate-machine-request.d.ts +14 -0
- package/dist/v4/events/deallocate-machine-request.js +53 -0
- package/dist/v4/events/deallocate-machine-request.js.map +1 -0
- package/dist/v4/events/game-allocated-response.d.ts +12 -0
- package/dist/v4/events/game-allocated-response.js +41 -0
- package/dist/v4/events/game-allocated-response.js.map +1 -0
- package/dist/v4/events/game-allocation-failed-response.d.ts +13 -0
- package/dist/v4/events/game-allocation-failed-response.js +46 -0
- package/dist/v4/events/game-allocation-failed-response.js.map +1 -0
- package/dist/v4/events/game-available.d.ts +11 -0
- package/dist/v4/events/game-available.js +41 -0
- package/dist/v4/events/game-available.js.map +1 -0
- package/dist/v4/events/game-resource-allocated-response.d.ts +15 -0
- package/dist/v4/events/game-resource-allocated-response.js +54 -0
- package/dist/v4/events/game-resource-allocated-response.js.map +1 -0
- package/dist/v4/events/game-resource-allocation-failed-response.d.ts +15 -0
- package/dist/v4/events/game-resource-allocation-failed-response.js +54 -0
- package/dist/v4/events/game-resource-allocation-failed-response.js.map +1 -0
- package/dist/v4/events/game-resource-allocation-timeout-task.d.ts +11 -0
- package/dist/v4/events/game-resource-allocation-timeout-task.js +39 -0
- package/dist/v4/events/game-resource-allocation-timeout-task.js.map +1 -0
- package/dist/v4/events/game-resource-created-response.d.ts +15 -0
- package/dist/v4/events/game-resource-created-response.js +54 -0
- package/dist/v4/events/game-resource-created-response.js.map +1 -0
- package/dist/v4/events/game-resource-creation-failed-response.d.ts +13 -0
- package/dist/v4/events/game-resource-creation-failed-response.js +49 -0
- package/dist/v4/events/game-resource-creation-failed-response.js.map +1 -0
- package/dist/v4/events/game-resource-ready-for-creation-failed.d.ts +13 -0
- package/dist/v4/events/game-resource-ready-for-creation-failed.js +49 -0
- package/dist/v4/events/game-resource-ready-for-creation-failed.js.map +1 -0
- package/dist/v4/events/game-resource-ready-for-creation.d.ts +14 -0
- package/dist/v4/events/game-resource-ready-for-creation.js +46 -0
- package/dist/v4/events/game-resource-ready-for-creation.js.map +1 -0
- package/dist/v4/events/game-resource-status-changed.d.ts +17 -0
- package/dist/v4/events/game-resource-status-changed.js +64 -0
- package/dist/v4/events/game-resource-status-changed.js.map +1 -0
- package/dist/v4/events/game-resource-terminated-response.d.ts +13 -0
- package/dist/v4/events/game-resource-terminated-response.js +49 -0
- package/dist/v4/events/game-resource-terminated-response.js.map +1 -0
- package/dist/v4/events/game-resource-termination-failed-response.d.ts +14 -0
- package/dist/v4/events/game-resource-termination-failed-response.js +53 -0
- package/dist/v4/events/game-resource-termination-failed-response.js.map +1 -0
- package/dist/v4/events/game-terminated-response.d.ts +12 -0
- package/dist/v4/events/game-terminated-response.js +45 -0
- package/dist/v4/events/game-terminated-response.js.map +1 -0
- package/dist/v4/events/game-termination-failed-response.d.ts +13 -0
- package/dist/v4/events/game-termination-failed-response.js +49 -0
- package/dist/v4/events/game-termination-failed-response.js.map +1 -0
- package/dist/v4/events/gameplay-waiting-for-user.d.ts +11 -0
- package/dist/v4/events/gameplay-waiting-for-user.js +41 -0
- package/dist/v4/events/gameplay-waiting-for-user.js.map +1 -0
- package/dist/v4/events/index.d.ts +84 -0
- package/dist/v4/events/index.js +101 -0
- package/dist/v4/events/index.js.map +1 -0
- package/dist/v4/events/invalid-game-resource.d.ts +13 -0
- package/dist/v4/events/invalid-game-resource.js +49 -0
- package/dist/v4/events/invalid-game-resource.js.map +1 -0
- package/dist/v4/events/load-ludeo-resource.d.ts +11 -0
- package/dist/v4/events/load-ludeo-resource.js +41 -0
- package/dist/v4/events/load-ludeo-resource.js.map +1 -0
- package/dist/v4/events/ludeo-allocated-response.d.ts +11 -0
- package/dist/v4/events/ludeo-allocated-response.js +41 -0
- package/dist/v4/events/ludeo-allocated-response.js.map +1 -0
- package/dist/v4/events/ludeo-allocation-failed.d.ts +11 -0
- package/dist/v4/events/ludeo-allocation-failed.js +41 -0
- package/dist/v4/events/ludeo-allocation-failed.js.map +1 -0
- package/dist/v4/events/ludeo-obtained-timeout-task.d.ts +10 -0
- package/dist/v4/events/ludeo-obtained-timeout-task.js +36 -0
- package/dist/v4/events/ludeo-obtained-timeout-task.js.map +1 -0
- package/dist/v4/events/ludeo-resource-allocated-response.d.ts +11 -0
- package/dist/v4/events/ludeo-resource-allocated-response.js +41 -0
- package/dist/v4/events/ludeo-resource-allocated-response.js.map +1 -0
- package/dist/v4/events/ludeo-resource-allocation-failed.d.ts +11 -0
- package/dist/v4/events/ludeo-resource-allocation-failed.js +41 -0
- package/dist/v4/events/ludeo-resource-allocation-failed.js.map +1 -0
- package/dist/v4/events/ludeo-resource-loaded.d.ts +11 -0
- package/dist/v4/events/ludeo-resource-loaded.js +41 -0
- package/dist/v4/events/ludeo-resource-loaded.js.map +1 -0
- package/dist/v4/events/ludeo-resource-loading-failed.d.ts +11 -0
- package/dist/v4/events/ludeo-resource-loading-failed.js +41 -0
- package/dist/v4/events/ludeo-resource-loading-failed.js.map +1 -0
- package/dist/v4/events/machine-allocated-response.d.ts +17 -0
- package/dist/v4/events/machine-allocated-response.js +62 -0
- package/dist/v4/events/machine-allocated-response.js.map +1 -0
- package/dist/v4/events/machine-allocation-failed-response.d.ts +14 -0
- package/dist/v4/events/machine-allocation-failed-response.js +53 -0
- package/dist/v4/events/machine-allocation-failed-response.js.map +1 -0
- package/dist/v4/events/machine-deallocated-response.d.ts +14 -0
- package/dist/v4/events/machine-deallocated-response.js +53 -0
- package/dist/v4/events/machine-deallocated-response.js.map +1 -0
- package/dist/v4/events/machine-deallocation-failed-response.d.ts +15 -0
- package/dist/v4/events/machine-deallocation-failed-response.js +57 -0
- package/dist/v4/events/machine-deallocation-failed-response.js.map +1 -0
- package/dist/v4/events/machine-pool-resizing-task.d.ts +13 -0
- package/dist/v4/events/machine-pool-resizing-task.js +45 -0
- package/dist/v4/events/machine-pool-resizing-task.js.map +1 -0
- package/dist/v4/events/machine-resource-batch-creation-failed-response.d.ts +16 -0
- package/dist/v4/events/machine-resource-batch-creation-failed-response.js +58 -0
- package/dist/v4/events/machine-resource-batch-creation-failed-response.js.map +1 -0
- package/dist/v4/events/machine-resource-batch-termination-failed-response.d.ts +16 -0
- package/dist/v4/events/machine-resource-batch-termination-failed-response.js +58 -0
- package/dist/v4/events/machine-resource-batch-termination-failed-response.js.map +1 -0
- package/dist/v4/events/machine-resource-created-response.d.ts +12 -0
- package/dist/v4/events/machine-resource-created-response.js +45 -0
- package/dist/v4/events/machine-resource-created-response.js.map +1 -0
- package/dist/v4/events/machine-resource-creation-failed-response.d.ts +13 -0
- package/dist/v4/events/machine-resource-creation-failed-response.js +49 -0
- package/dist/v4/events/machine-resource-creation-failed-response.js.map +1 -0
- package/dist/v4/events/machine-resource-terminated-response.d.ts +12 -0
- package/dist/v4/events/machine-resource-terminated-response.js +45 -0
- package/dist/v4/events/machine-resource-terminated-response.js.map +1 -0
- package/dist/v4/events/machine-resource-updated.d.ts +12 -0
- package/dist/v4/events/machine-resource-updated.js +45 -0
- package/dist/v4/events/machine-resource-updated.js.map +1 -0
- package/dist/v4/events/monitor-game-resource-task.d.ts +14 -0
- package/dist/v4/events/monitor-game-resource-task.js +48 -0
- package/dist/v4/events/monitor-game-resource-task.js.map +1 -0
- package/dist/v4/events/pool-status.d.ts +20 -0
- package/dist/v4/events/pool-status.js +54 -0
- package/dist/v4/events/pool-status.js.map +1 -0
- package/dist/v4/events/prepare-cloud-machine-auth-failed.d.ts +13 -0
- package/dist/v4/events/prepare-cloud-machine-auth-failed.js +48 -0
- package/dist/v4/events/prepare-cloud-machine-auth-failed.js.map +1 -0
- package/dist/v4/events/prepare-cloud-machine-auth.d.ts +16 -0
- package/dist/v4/events/prepare-cloud-machine-auth.js +60 -0
- package/dist/v4/events/prepare-cloud-machine-auth.js.map +1 -0
- package/dist/v4/events/send-pools-to-predictor.d.ts +5 -0
- package/dist/v4/events/send-pools-to-predictor.js +12 -0
- package/dist/v4/events/send-pools-to-predictor.js.map +1 -0
- package/dist/v4/events/set-pool.d.ts +9 -0
- package/dist/v4/events/set-pool.js +29 -0
- package/dist/v4/events/set-pool.js.map +1 -0
- package/dist/v4/events/set-pools-state.d.ts +26 -0
- package/dist/v4/events/set-pools-state.js +64 -0
- package/dist/v4/events/set-pools-state.js.map +1 -0
- package/dist/v4/events/swap-cloud-user-completed.d.ts +12 -0
- package/dist/v4/events/swap-cloud-user-completed.js +45 -0
- package/dist/v4/events/swap-cloud-user-completed.js.map +1 -0
- package/dist/v4/events/swap-cloud-user-request-failed.d.ts +15 -0
- package/dist/v4/events/swap-cloud-user-request-failed.js +58 -0
- package/dist/v4/events/swap-cloud-user-request-failed.js.map +1 -0
- package/dist/v4/events/swap-cloud-user-request.d.ts +13 -0
- package/dist/v4/events/swap-cloud-user-request.js +50 -0
- package/dist/v4/events/swap-cloud-user-request.js.map +1 -0
- package/dist/v4/events/swap-to-default-user-completed.d.ts +11 -0
- package/dist/v4/events/swap-to-default-user-completed.js +41 -0
- package/dist/v4/events/swap-to-default-user-completed.js.map +1 -0
- package/dist/v4/events/swap-to-default-user.d.ts +11 -0
- package/dist/v4/events/swap-to-default-user.js +41 -0
- package/dist/v4/events/swap-to-default-user.js.map +1 -0
- package/dist/v4/events/terminate-cloud-session-request.d.ts +11 -0
- package/dist/v4/events/terminate-cloud-session-request.js +42 -0
- package/dist/v4/events/terminate-cloud-session-request.js.map +1 -0
- package/dist/v4/events/terminate-game-request.d.ts +13 -0
- package/dist/v4/events/terminate-game-request.js +50 -0
- package/dist/v4/events/terminate-game-request.js.map +1 -0
- package/dist/v4/events/terminate-game-resource-request.d.ts +18 -0
- package/dist/v4/events/terminate-game-resource-request.js +67 -0
- package/dist/v4/events/terminate-game-resource-request.js.map +1 -0
- package/dist/v4/events/terminate-games-request.d.ts +12 -0
- package/dist/v4/events/terminate-games-request.js +45 -0
- package/dist/v4/events/terminate-games-request.js.map +1 -0
- package/dist/v4/events/terminate-machine-resource-batch-request.d.ts +15 -0
- package/dist/v4/events/terminate-machine-resource-batch-request.js +54 -0
- package/dist/v4/events/terminate-machine-resource-batch-request.js.map +1 -0
- package/dist/v4/events/terminate-machine-resource-request.d.ts +15 -0
- package/dist/v4/events/terminate-machine-resource-request.js +54 -0
- package/dist/v4/events/terminate-machine-resource-request.js.map +1 -0
- package/dist/v4/events/terminate-machines-request.d.ts +12 -0
- package/dist/v4/events/terminate-machines-request.js +45 -0
- package/dist/v4/events/terminate-machines-request.js.map +1 -0
- package/dist/v4/events/terminate-stale-games.d.ts +11 -0
- package/dist/v4/events/terminate-stale-games.js +41 -0
- package/dist/v4/events/terminate-stale-games.js.map +1 -0
- package/dist/v4/events/terminate-stale-machines.d.ts +11 -0
- package/dist/v4/events/terminate-stale-machines.js +41 -0
- package/dist/v4/events/terminate-stale-machines.js.map +1 -0
- package/dist/v4/events/terminate-stale-resources-task.d.ts +9 -0
- package/dist/v4/events/terminate-stale-resources-task.js +16 -0
- package/dist/v4/events/terminate-stale-resources-task.js.map +1 -0
- package/dist/v4/events/token-required.event.d.ts +25 -0
- package/dist/v4/events/token-required.event.js +86 -0
- package/dist/v4/events/token-required.event.js.map +1 -0
- package/dist/v4/index.d.ts +3 -0
- package/dist/v4/index.js +7 -0
- package/dist/v4/index.js.map +1 -0
- package/dist/v4/types/cloud.d.ts +68 -0
- package/dist/v4/types/cloud.js +173 -0
- package/dist/v4/types/cloud.js.map +1 -0
- package/dist/v4/types/index.d.ts +2 -0
- package/dist/v4/types/index.js +19 -0
- package/dist/v4/types/index.js.map +1 -0
- package/dist/v4/types/pools/configuration/attributes/base.d.ts +6 -0
- package/dist/v4/types/pools/configuration/attributes/base.js +32 -0
- package/dist/v4/types/pools/configuration/attributes/base.js.map +1 -0
- package/dist/v4/types/pools/configuration/attributes/game.d.ts +4 -0
- package/dist/v4/types/pools/configuration/attributes/game.js +22 -0
- package/dist/v4/types/pools/configuration/attributes/game.js.map +1 -0
- package/dist/v4/types/pools/configuration/attributes/index.d.ts +4 -0
- package/dist/v4/types/pools/configuration/attributes/index.js +21 -0
- package/dist/v4/types/pools/configuration/attributes/index.js.map +1 -0
- package/dist/v4/types/pools/configuration/attributes/ludeo.d.ts +4 -0
- package/dist/v4/types/pools/configuration/attributes/ludeo.js +22 -0
- package/dist/v4/types/pools/configuration/attributes/ludeo.js.map +1 -0
- package/dist/v4/types/pools/configuration/attributes/machine.d.ts +4 -0
- package/dist/v4/types/pools/configuration/attributes/machine.js +22 -0
- package/dist/v4/types/pools/configuration/attributes/machine.js.map +1 -0
- package/dist/v4/types/pools/configuration/base.d.ts +14 -0
- package/dist/v4/types/pools/configuration/base.js +53 -0
- package/dist/v4/types/pools/configuration/base.js.map +1 -0
- package/dist/v4/types/pools/configuration/game.d.ts +9 -0
- package/dist/v4/types/pools/configuration/game.js +37 -0
- package/dist/v4/types/pools/configuration/game.js.map +1 -0
- package/dist/v4/types/pools/configuration/index.d.ts +6 -0
- package/dist/v4/types/pools/configuration/index.js +23 -0
- package/dist/v4/types/pools/configuration/index.js.map +1 -0
- package/dist/v4/types/pools/configuration/ludeo.d.ts +9 -0
- package/dist/v4/types/pools/configuration/ludeo.js +37 -0
- package/dist/v4/types/pools/configuration/ludeo.js.map +1 -0
- package/dist/v4/types/pools/configuration/machine.d.ts +7 -0
- package/dist/v4/types/pools/configuration/machine.js +29 -0
- package/dist/v4/types/pools/configuration/machine.js.map +1 -0
- package/dist/v4/types/pools/configuration/type.d.ts +6 -0
- package/dist/v4/types/pools/configuration/type.js +3 -0
- package/dist/v4/types/pools/configuration/type.js.map +1 -0
- package/dist/v4/types/pools/index.d.ts +5 -0
- package/dist/v4/types/pools/index.js +22 -0
- package/dist/v4/types/pools/index.js.map +1 -0
- package/dist/v4/types/pools/pool.d.ts +12 -0
- package/dist/v4/types/pools/pool.js +7 -0
- package/dist/v4/types/pools/pool.js.map +1 -0
- package/dist/v4/types/pools/resource/base.d.ts +10 -0
- package/dist/v4/types/pools/resource/base.js +45 -0
- package/dist/v4/types/pools/resource/base.js.map +1 -0
- package/dist/v4/types/pools/resource/game.d.ts +6 -0
- package/dist/v4/types/pools/resource/game.js +33 -0
- package/dist/v4/types/pools/resource/game.js.map +1 -0
- package/dist/v4/types/pools/resource/index.d.ts +7 -0
- package/dist/v4/types/pools/resource/index.js +24 -0
- package/dist/v4/types/pools/resource/index.js.map +1 -0
- package/dist/v4/types/pools/resource/ludeo.d.ts +4 -0
- package/dist/v4/types/pools/resource/ludeo.js +23 -0
- package/dist/v4/types/pools/resource/ludeo.js.map +1 -0
- package/dist/v4/types/pools/resource/machine.d.ts +5 -0
- package/dist/v4/types/pools/resource/machine.js +28 -0
- package/dist/v4/types/pools/resource/machine.js.map +1 -0
- package/dist/v4/types/pools/resource/status.d.ts +10 -0
- package/dist/v4/types/pools/resource/status.js +15 -0
- package/dist/v4/types/pools/resource/status.js.map +1 -0
- package/dist/v4/types/pools/resource/statusMap.d.ts +2 -0
- package/dist/v4/types/pools/resource/statusMap.js +3 -0
- package/dist/v4/types/pools/resource/statusMap.js.map +1 -0
- package/dist/v4/types/pools/resource/type.d.ts +6 -0
- package/dist/v4/types/pools/resource/type.js +3 -0
- package/dist/v4/types/pools/resource/type.js.map +1 -0
- package/dist/v4/types/pools/status.d.ts +6 -0
- package/dist/v4/types/pools/status.js +11 -0
- package/dist/v4/types/pools/status.js.map +1 -0
- package/dist/v4/types/pools/type.d.ts +5 -0
- package/dist/v4/types/pools/type.js +10 -0
- package/dist/v4/types/pools/type.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/v3/types/cloud.ts +4 -0
- package/src/v4/contexts/cloud-pool-context.ts +22 -0
- package/src/v4/contexts/cloud-resource-context.ts +49 -0
- package/src/v4/contexts/cloud-session-context.ts +71 -0
- package/src/v4/contexts/getCloudContextType.spec.ts +102 -0
- package/src/v4/contexts/getCloudContextType.ts +22 -0
- package/src/v4/contexts/index.ts +4 -0
- package/src/v4/events/allocate-cloud-session-failed.ts +28 -0
- package/src/v4/events/allocate-cloud-session-request.ts +28 -0
- package/src/v4/events/allocate-game-request.ts +33 -0
- package/src/v4/events/allocate-game-resource-request.ts +52 -0
- package/src/v4/events/allocate-ludeo-resource-request.ts +28 -0
- package/src/v4/events/allocate-machine-request.ts +35 -0
- package/src/v4/events/aws-poll-stream-session-task.ts +33 -0
- package/src/v4/events/aws-reactivate-stream-session-task.ts +31 -0
- package/src/v4/events/aws-stream-session-active.ts +36 -0
- package/src/v4/events/aws-stream-session-reactivation-started.ts +31 -0
- package/src/v4/events/cloud-machine-auth-ready.ts +38 -0
- package/src/v4/events/cloud-session-allocated.ts +34 -0
- package/src/v4/events/cloud-session-created.ts +20 -0
- package/src/v4/events/cloud-session-ended.ts +34 -0
- package/src/v4/events/cloud-session-optimal-region-selected.ts +29 -0
- package/src/v4/events/cloud-session-provider-requested.ts +37 -0
- package/src/v4/events/cloud-session-timeout-task.ts +26 -0
- package/src/v4/events/create-game-resource-request.ts +46 -0
- package/src/v4/events/create-games-request.ts +29 -0
- package/src/v4/events/create-ludeos-request.ts +29 -0
- package/src/v4/events/create-machine-resource-batch-request.ts +44 -0
- package/src/v4/events/create-machine-resource-request.ts +43 -0
- package/src/v4/events/create-machines-request.ts +32 -0
- package/src/v4/events/deallocate-machine-request.ts +39 -0
- package/src/v4/events/game-allocated-response.ts +28 -0
- package/src/v4/events/game-allocation-failed-response.ts +33 -0
- package/src/v4/events/game-available.ts +26 -0
- package/src/v4/events/game-resource-allocated-response.ts +44 -0
- package/src/v4/events/game-resource-allocation-failed-response.ts +40 -0
- package/src/v4/events/game-resource-allocation-timeout-task.ts +26 -0
- package/src/v4/events/game-resource-created-response.ts +43 -0
- package/src/v4/events/game-resource-creation-failed-response.ts +36 -0
- package/src/v4/events/game-resource-ready-for-creation-failed.ts +35 -0
- package/src/v4/events/game-resource-ready-for-creation.ts +37 -0
- package/src/v4/events/game-resource-status-changed.ts +47 -0
- package/src/v4/events/game-resource-terminated-response.ts +40 -0
- package/src/v4/events/game-resource-termination-failed-response.ts +43 -0
- package/src/v4/events/game-terminated-response.ts +36 -0
- package/src/v4/events/game-termination-failed-response.ts +39 -0
- package/src/v4/events/gameplay-waiting-for-user.ts +28 -0
- package/src/v4/events/index.ts +84 -0
- package/src/v4/events/invalid-game-resource.ts +34 -0
- package/src/v4/events/load-ludeo-resource.ts +28 -0
- package/src/v4/events/ludeo-allocated-response.ts +28 -0
- package/src/v4/events/ludeo-allocation-failed.ts +28 -0
- package/src/v4/events/ludeo-obtained-timeout-task.ts +23 -0
- package/src/v4/events/ludeo-resource-allocated-response.ts +29 -0
- package/src/v4/events/ludeo-resource-allocation-failed.ts +29 -0
- package/src/v4/events/ludeo-resource-loaded.ts +28 -0
- package/src/v4/events/ludeo-resource-loading-failed.ts +28 -0
- package/src/v4/events/machine-allocated-response.ts +49 -0
- package/src/v4/events/machine-allocation-failed-response.ts +39 -0
- package/src/v4/events/machine-deallocated-response.ts +42 -0
- package/src/v4/events/machine-deallocation-failed-response.ts +46 -0
- package/src/v4/events/machine-pool-resizing-task.ts +35 -0
- package/src/v4/events/machine-resource-batch-creation-failed-response.ts +47 -0
- package/src/v4/events/machine-resource-batch-termination-failed-response.ts +49 -0
- package/src/v4/events/machine-resource-created-response.ts +33 -0
- package/src/v4/events/machine-resource-creation-failed-response.ts +36 -0
- package/src/v4/events/machine-resource-terminated-response.ts +33 -0
- package/src/v4/events/machine-resource-updated.ts +32 -0
- package/src/v4/events/monitor-game-resource-task.ts +36 -0
- package/src/v4/events/pool-status.ts +41 -0
- package/src/v4/events/prepare-cloud-machine-auth-failed.ts +34 -0
- package/src/v4/events/prepare-cloud-machine-auth.ts +43 -0
- package/src/v4/events/send-pools-to-predictor.ts +9 -0
- package/src/v4/events/set-pool.ts +22 -0
- package/src/v4/events/set-pools-state.ts +55 -0
- package/src/v4/events/swap-cloud-user-completed.ts +31 -0
- package/src/v4/events/swap-cloud-user-request-failed.ts +42 -0
- package/src/v4/events/swap-cloud-user-request.ts +36 -0
- package/src/v4/events/swap-to-default-user-completed.ts +28 -0
- package/src/v4/events/swap-to-default-user.ts +28 -0
- package/src/v4/events/terminate-cloud-session-request.ts +29 -0
- package/src/v4/events/terminate-game-request.ts +40 -0
- package/src/v4/events/terminate-game-resource-request.ts +59 -0
- package/src/v4/events/terminate-games-request.ts +32 -0
- package/src/v4/events/terminate-machine-resource-batch-request.ts +44 -0
- package/src/v4/events/terminate-machine-resource-request.ts +43 -0
- package/src/v4/events/terminate-machines-request.ts +32 -0
- package/src/v4/events/terminate-stale-games.ts +28 -0
- package/src/v4/events/terminate-stale-machines.ts +28 -0
- package/src/v4/events/terminate-stale-resources-task.ts +16 -0
- package/src/v4/events/token-required.event.ts +61 -0
- package/src/v4/index.ts +3 -0
- package/src/v4/types/cloud.ts +155 -0
- package/src/v4/types/index.ts +2 -0
- package/src/v4/types/pools/configuration/attributes/base.ts +15 -0
- package/src/v4/types/pools/configuration/attributes/game.ts +7 -0
- package/src/v4/types/pools/configuration/attributes/index.ts +4 -0
- package/src/v4/types/pools/configuration/attributes/ludeo.ts +7 -0
- package/src/v4/types/pools/configuration/attributes/machine.ts +8 -0
- package/src/v4/types/pools/configuration/base.ts +36 -0
- package/src/v4/types/pools/configuration/game.ts +20 -0
- package/src/v4/types/pools/configuration/index.ts +6 -0
- package/src/v4/types/pools/configuration/ludeo.ts +20 -0
- package/src/v4/types/pools/configuration/machine.ts +14 -0
- package/src/v4/types/pools/configuration/type.ts +17 -0
- package/src/v4/types/pools/index.ts +5 -0
- package/src/v4/types/pools/pool.ts +14 -0
- package/src/v4/types/pools/resource/base.ts +26 -0
- package/src/v4/types/pools/resource/game.ts +17 -0
- package/src/v4/types/pools/resource/index.ts +7 -0
- package/src/v4/types/pools/resource/ludeo.ts +9 -0
- package/src/v4/types/pools/resource/machine.ts +12 -0
- package/src/v4/types/pools/resource/status.ts +10 -0
- package/src/v4/types/pools/resource/statusMap.ts +3 -0
- package/src/v4/types/pools/resource/type.ts +16 -0
- package/src/v4/types/pools/status.ts +6 -0
- package/src/v4/types/pools/type.ts +5 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra";
|
|
2
|
+
|
|
3
|
+
export class TerminateStaleResourcesTaskPayload {}
|
|
4
|
+
|
|
5
|
+
export class TerminateStaleResourcesTask extends LudeoEvent {
|
|
6
|
+
static readonly EVENT_NAME = "cloud-pools.terminate-stale-resources-task";
|
|
7
|
+
|
|
8
|
+
constructor(payload: TerminateStaleResourcesTaskPayload, context: never) {
|
|
9
|
+
super(TerminateStaleResourcesTask.EVENT_NAME);
|
|
10
|
+
this.payload = payload;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
context: never;
|
|
14
|
+
|
|
15
|
+
payload: TerminateStaleResourcesTaskPayload;
|
|
16
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { IsBoolean, IsNumber, IsString } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
4
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
5
|
+
|
|
6
|
+
export class TokenRequiredConnectionDetails {
|
|
7
|
+
@IsString()
|
|
8
|
+
resourceId: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class TokenRequiredEventData {
|
|
12
|
+
@IsString()
|
|
13
|
+
defaultUser: string;
|
|
14
|
+
|
|
15
|
+
@IsString()
|
|
16
|
+
authSource: string;
|
|
17
|
+
|
|
18
|
+
@ValidateNestedType(() => TokenRequiredConnectionDetails)
|
|
19
|
+
connectionDetails: TokenRequiredConnectionDetails;
|
|
20
|
+
|
|
21
|
+
@IsString()
|
|
22
|
+
authToken: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class TokenRequiredEventPayload {
|
|
26
|
+
@IsString()
|
|
27
|
+
id: string;
|
|
28
|
+
|
|
29
|
+
@IsString()
|
|
30
|
+
type: string;
|
|
31
|
+
|
|
32
|
+
@IsString()
|
|
33
|
+
userId: string;
|
|
34
|
+
|
|
35
|
+
@IsNumber()
|
|
36
|
+
expireAt: number;
|
|
37
|
+
|
|
38
|
+
@IsNumber()
|
|
39
|
+
quota: number;
|
|
40
|
+
|
|
41
|
+
@IsBoolean()
|
|
42
|
+
isUnique: boolean;
|
|
43
|
+
|
|
44
|
+
@ValidateNestedType(() => TokenRequiredEventData)
|
|
45
|
+
data: TokenRequiredEventData;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class TokenRequired extends LudeoEvent {
|
|
49
|
+
static readonly EVENT_NAME = "tokens.token-required";
|
|
50
|
+
|
|
51
|
+
@ValidateNestedType(() => TokenRequiredEventPayload)
|
|
52
|
+
payload: TokenRequiredEventPayload;
|
|
53
|
+
|
|
54
|
+
context?: never;
|
|
55
|
+
|
|
56
|
+
constructor(payload: TokenRequiredEventPayload, context?: never) {
|
|
57
|
+
super(TokenRequired.EVENT_NAME);
|
|
58
|
+
this.payload = payload;
|
|
59
|
+
this.context = context;
|
|
60
|
+
}
|
|
61
|
+
}
|
package/src/v4/index.ts
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { GameCast } from "@ludeo/aws-gamecast-sdk";
|
|
2
|
+
import {
|
|
3
|
+
IsDefined,
|
|
4
|
+
IsEnum,
|
|
5
|
+
IsNotEmpty,
|
|
6
|
+
IsNumber,
|
|
7
|
+
IsOptional,
|
|
8
|
+
IsString,
|
|
9
|
+
IsUUID,
|
|
10
|
+
} from "class-validator";
|
|
11
|
+
import { ValidateNestedType } from "../../decorators";
|
|
12
|
+
|
|
13
|
+
export class AWSRequestData {
|
|
14
|
+
@IsString()
|
|
15
|
+
@IsNotEmpty()
|
|
16
|
+
signalRequest: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type CloudProviderRequest = AWSRequestData;
|
|
20
|
+
|
|
21
|
+
export enum CloudProvider {
|
|
22
|
+
AWS = "aws",
|
|
23
|
+
NVIDIA = "nvidia",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class AWSProviderSettings {
|
|
27
|
+
streamGroupId: GameCast.Identifier;
|
|
28
|
+
additionalEnvironmentVariables?: GameCast.EnvironmentVariables;
|
|
29
|
+
protocol?: GameCast.Protocol;
|
|
30
|
+
connectionTimeoutSeconds?: GameCast.ConnectionTimeoutSeconds;
|
|
31
|
+
sessionLengthSeconds?: GameCast.SessionLengthSeconds;
|
|
32
|
+
applicationIdentifier?: GameCast.Identifier;
|
|
33
|
+
machinePoolSize?: number;
|
|
34
|
+
region?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type CloudProviderSettings = AWSProviderSettings;
|
|
38
|
+
|
|
39
|
+
export class AwsAllocationData {
|
|
40
|
+
@IsString()
|
|
41
|
+
streamGroupId: string;
|
|
42
|
+
|
|
43
|
+
@IsString()
|
|
44
|
+
streamSessionId: string;
|
|
45
|
+
|
|
46
|
+
@IsString()
|
|
47
|
+
signalResponse: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type CloudProviderAllocationData = AwsAllocationData;
|
|
51
|
+
|
|
52
|
+
export class AWSResourceProviderSettings {
|
|
53
|
+
@IsOptional()
|
|
54
|
+
@IsString()
|
|
55
|
+
streamSessionId?: string;
|
|
56
|
+
|
|
57
|
+
@IsOptional()
|
|
58
|
+
@IsString()
|
|
59
|
+
streamGroupId?: string;
|
|
60
|
+
|
|
61
|
+
@IsEnum(CloudProvider)
|
|
62
|
+
@IsOptional()
|
|
63
|
+
cloudProvider?: CloudProvider;
|
|
64
|
+
|
|
65
|
+
@IsOptional()
|
|
66
|
+
@IsString()
|
|
67
|
+
region?: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export type CloudResourceProviderSettings = AWSResourceProviderSettings;
|
|
71
|
+
|
|
72
|
+
export class AWSGameCreationResponse {
|
|
73
|
+
@IsString()
|
|
74
|
+
@IsNotEmpty()
|
|
75
|
+
streamSessionId: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type GameCreationResponse = AWSGameCreationResponse;
|
|
79
|
+
|
|
80
|
+
export class AllocationRequestData {
|
|
81
|
+
@ValidateNestedType(() => AWSRequestData)
|
|
82
|
+
@IsDefined()
|
|
83
|
+
cloudProviderRequest: CloudProviderRequest;
|
|
84
|
+
|
|
85
|
+
@IsString()
|
|
86
|
+
@IsOptional()
|
|
87
|
+
clientIp?: string;
|
|
88
|
+
|
|
89
|
+
@IsString()
|
|
90
|
+
@IsOptional()
|
|
91
|
+
region?: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export enum CloudSessionStatus {
|
|
95
|
+
Created = "created",
|
|
96
|
+
PendingAllocation = "pending",
|
|
97
|
+
SwappingUser = "swappingUser",
|
|
98
|
+
LudeoObtained = "ludeoObtained",
|
|
99
|
+
Allocated = "allocated",
|
|
100
|
+
Terminated = "terminated",
|
|
101
|
+
Failed = "failed",
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export class CloudSession {
|
|
105
|
+
@IsUUID()
|
|
106
|
+
id: string;
|
|
107
|
+
|
|
108
|
+
@IsUUID()
|
|
109
|
+
userId: string;
|
|
110
|
+
|
|
111
|
+
@IsUUID()
|
|
112
|
+
gameId: string;
|
|
113
|
+
|
|
114
|
+
@IsUUID()
|
|
115
|
+
ludeoId: string;
|
|
116
|
+
|
|
117
|
+
@IsNumber()
|
|
118
|
+
createdAt: number;
|
|
119
|
+
|
|
120
|
+
@IsNumber()
|
|
121
|
+
updatedAt: number;
|
|
122
|
+
|
|
123
|
+
@IsEnum(CloudSessionStatus)
|
|
124
|
+
status: CloudSessionStatus;
|
|
125
|
+
|
|
126
|
+
@IsEnum(CloudProvider)
|
|
127
|
+
cloudProvider: CloudProvider;
|
|
128
|
+
|
|
129
|
+
@IsOptional()
|
|
130
|
+
@IsUUID()
|
|
131
|
+
gameResourceId?: string;
|
|
132
|
+
|
|
133
|
+
@IsOptional()
|
|
134
|
+
@IsUUID()
|
|
135
|
+
poolId?: string;
|
|
136
|
+
|
|
137
|
+
@ValidateNestedType(() => AllocationRequestData)
|
|
138
|
+
requestData: AllocationRequestData;
|
|
139
|
+
|
|
140
|
+
@IsOptional()
|
|
141
|
+
@ValidateNestedType(() => AwsAllocationData)
|
|
142
|
+
allocationData?: CloudProviderAllocationData;
|
|
143
|
+
|
|
144
|
+
@IsUUID()
|
|
145
|
+
clientRequestId: string;
|
|
146
|
+
|
|
147
|
+
@IsOptional()
|
|
148
|
+
@IsString()
|
|
149
|
+
sessionToken?: string;
|
|
150
|
+
|
|
151
|
+
// For backwards compatability
|
|
152
|
+
@IsOptional()
|
|
153
|
+
@IsString()
|
|
154
|
+
resourceId?: string;
|
|
155
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IsEnum, IsOptional, IsString } from "class-validator";
|
|
2
|
+
import { CloudProvider } from "../../../cloud";
|
|
3
|
+
|
|
4
|
+
export class BasePoolAttributes {
|
|
5
|
+
@IsEnum(CloudProvider)
|
|
6
|
+
cloudProvider: CloudProvider;
|
|
7
|
+
|
|
8
|
+
@IsOptional()
|
|
9
|
+
@IsString()
|
|
10
|
+
friendlyName?: string;
|
|
11
|
+
|
|
12
|
+
@IsOptional()
|
|
13
|
+
@IsString()
|
|
14
|
+
region?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IsNumber, IsEnum, IsUUID, IsOptional } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AWSProviderSettings,
|
|
5
|
+
CloudProvider,
|
|
6
|
+
CloudProviderSettings,
|
|
7
|
+
} from "../../cloud";
|
|
8
|
+
import { CloudPoolType } from "../type";
|
|
9
|
+
import { BasePoolAttributes } from "./attributes";
|
|
10
|
+
import { ValidateNestedType } from "../../../../decorators";
|
|
11
|
+
|
|
12
|
+
export class PoolScaleConfiguration {
|
|
13
|
+
@IsNumber()
|
|
14
|
+
size: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class BaseCloudPoolConfiguration {
|
|
18
|
+
@IsOptional()
|
|
19
|
+
@ValidateNestedType(() => AWSProviderSettings)
|
|
20
|
+
providerSettings?: CloudProviderSettings;
|
|
21
|
+
|
|
22
|
+
@IsEnum(CloudProvider)
|
|
23
|
+
cloudProvider: CloudProvider;
|
|
24
|
+
|
|
25
|
+
@IsUUID()
|
|
26
|
+
poolId: string;
|
|
27
|
+
|
|
28
|
+
@ValidateNestedType(() => PoolScaleConfiguration)
|
|
29
|
+
poolScaleConfiguration: PoolScaleConfiguration;
|
|
30
|
+
|
|
31
|
+
@IsEnum(CloudPoolType)
|
|
32
|
+
type: CloudPoolType;
|
|
33
|
+
|
|
34
|
+
@ValidateNestedType(() => BasePoolAttributes)
|
|
35
|
+
attributes: BasePoolAttributes;
|
|
36
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IsEnum, IsUUID } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { CloudPoolType } from "../type";
|
|
4
|
+
import { GamePoolAttributes } from "./attributes";
|
|
5
|
+
import { BaseCloudPoolConfiguration } from "./base";
|
|
6
|
+
import { ValidateNestedType } from "../../../../decorators";
|
|
7
|
+
|
|
8
|
+
export class GamePoolConfiguration extends BaseCloudPoolConfiguration {
|
|
9
|
+
@IsEnum(CloudPoolType)
|
|
10
|
+
type: CloudPoolType.GAME;
|
|
11
|
+
|
|
12
|
+
@IsUUID()
|
|
13
|
+
gameId: string;
|
|
14
|
+
|
|
15
|
+
@IsUUID()
|
|
16
|
+
machinePoolId: string;
|
|
17
|
+
|
|
18
|
+
@ValidateNestedType(() => GamePoolAttributes)
|
|
19
|
+
attributes: GamePoolAttributes;
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IsEnum, IsUUID } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { CloudPoolType } from "../type";
|
|
4
|
+
import { LudeoPoolAttributes } from "./attributes";
|
|
5
|
+
import { BaseCloudPoolConfiguration } from "./base";
|
|
6
|
+
import { ValidateNestedType } from "../../../../decorators";
|
|
7
|
+
|
|
8
|
+
export class LudeoPoolConfiguration extends BaseCloudPoolConfiguration {
|
|
9
|
+
@IsEnum(CloudPoolType)
|
|
10
|
+
type: CloudPoolType.LUDEO;
|
|
11
|
+
|
|
12
|
+
@IsUUID()
|
|
13
|
+
ludeoId: string;
|
|
14
|
+
|
|
15
|
+
@IsUUID()
|
|
16
|
+
gamePoolId: string;
|
|
17
|
+
|
|
18
|
+
@ValidateNestedType(() => LudeoPoolAttributes)
|
|
19
|
+
attributes: LudeoPoolAttributes;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IsEnum } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { CloudPoolType } from "../type";
|
|
4
|
+
import { BaseCloudPoolConfiguration } from "./base";
|
|
5
|
+
import { MachinePoolAttributes } from "./attributes";
|
|
6
|
+
import { ValidateNestedType } from "../../../../decorators";
|
|
7
|
+
|
|
8
|
+
export class MachinePoolConfiguration extends BaseCloudPoolConfiguration {
|
|
9
|
+
@IsEnum(CloudPoolType)
|
|
10
|
+
type: CloudPoolType.MACHINE;
|
|
11
|
+
|
|
12
|
+
@ValidateNestedType(() => MachinePoolAttributes)
|
|
13
|
+
attributes: MachinePoolAttributes;
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CloudPoolType } from "../type";
|
|
2
|
+
import { GamePoolConfiguration } from "./game";
|
|
3
|
+
import { LudeoPoolConfiguration } from "./ludeo";
|
|
4
|
+
import { BaseCloudPoolConfiguration } from "./base";
|
|
5
|
+
import { MachinePoolConfiguration } from "./machine";
|
|
6
|
+
|
|
7
|
+
export type CloudPoolConfigurationType<
|
|
8
|
+
T extends CloudPoolType | undefined = undefined
|
|
9
|
+
> = T extends undefined
|
|
10
|
+
? BaseCloudPoolConfiguration
|
|
11
|
+
: T extends CloudPoolType.GAME
|
|
12
|
+
? GamePoolConfiguration
|
|
13
|
+
: T extends CloudPoolType.MACHINE
|
|
14
|
+
? MachinePoolConfiguration
|
|
15
|
+
: T extends CloudPoolType.LUDEO
|
|
16
|
+
? LudeoPoolConfiguration
|
|
17
|
+
: BaseCloudPoolConfiguration;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CloudPoolType } from "./type";
|
|
2
|
+
import { CloudPoolStatus } from "./status";
|
|
3
|
+
import { CloudPoolConfigurationType } from "./configuration";
|
|
4
|
+
import { BaseCloudResource } from "./resource";
|
|
5
|
+
|
|
6
|
+
export type CloudResourcesMap<T extends BaseCloudResource> = Record<string, T>;
|
|
7
|
+
|
|
8
|
+
export class CloudPool<T extends CloudPoolType | undefined = undefined> {
|
|
9
|
+
id: string;
|
|
10
|
+
status: CloudPoolStatus;
|
|
11
|
+
createdAt: number;
|
|
12
|
+
updatedAt?: number;
|
|
13
|
+
config: CloudPoolConfigurationType<T>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IsEnum, IsNumber, IsOptional, IsUUID } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { CloudResourceStatus } from "./status";
|
|
4
|
+
import { AWSResourceProviderSettings } from "../../cloud";
|
|
5
|
+
import { ValidateNestedType } from "../../../../decorators";
|
|
6
|
+
|
|
7
|
+
export class BaseCloudResource {
|
|
8
|
+
@IsUUID()
|
|
9
|
+
id: string;
|
|
10
|
+
|
|
11
|
+
@IsEnum(CloudResourceStatus)
|
|
12
|
+
status: CloudResourceStatus;
|
|
13
|
+
|
|
14
|
+
@IsNumber()
|
|
15
|
+
createdAt: number;
|
|
16
|
+
|
|
17
|
+
@IsUUID()
|
|
18
|
+
poolId: string;
|
|
19
|
+
|
|
20
|
+
@IsNumber()
|
|
21
|
+
@IsOptional()
|
|
22
|
+
updatedAt?: number;
|
|
23
|
+
|
|
24
|
+
@ValidateNestedType(() => AWSResourceProviderSettings)
|
|
25
|
+
settings?: AWSResourceProviderSettings;
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IsOptional, IsString } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { BaseCloudResource } from "./base";
|
|
4
|
+
|
|
5
|
+
export class GameCloudResource extends BaseCloudResource {
|
|
6
|
+
@IsString()
|
|
7
|
+
@IsOptional()
|
|
8
|
+
machineResourceId?: string;
|
|
9
|
+
|
|
10
|
+
@IsString()
|
|
11
|
+
@IsOptional()
|
|
12
|
+
ludeoResourceId?: string;
|
|
13
|
+
|
|
14
|
+
@IsString()
|
|
15
|
+
@IsOptional()
|
|
16
|
+
ludeoPoolId?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IsOptional, IsUUID } from "class-validator";
|
|
2
|
+
import { BaseCloudResource } from "./base";
|
|
3
|
+
|
|
4
|
+
export class MachineCloudResource extends BaseCloudResource {
|
|
5
|
+
@IsOptional()
|
|
6
|
+
@IsUUID()
|
|
7
|
+
gameResourceId?: string;
|
|
8
|
+
|
|
9
|
+
@IsOptional()
|
|
10
|
+
@IsUUID()
|
|
11
|
+
gamePoolId?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CloudPoolType } from "../type";
|
|
2
|
+
import { BaseCloudResource } from "./base";
|
|
3
|
+
import { GameCloudResource } from "./game";
|
|
4
|
+
import { LudeoCloudResource } from "./ludeo";
|
|
5
|
+
import { MachineCloudResource } from "./machine";
|
|
6
|
+
|
|
7
|
+
export type CloudResourceType<T extends CloudPoolType | undefined = undefined> =
|
|
8
|
+
T extends undefined
|
|
9
|
+
? BaseCloudResource
|
|
10
|
+
: T extends CloudPoolType.GAME
|
|
11
|
+
? GameCloudResource
|
|
12
|
+
: T extends CloudPoolType.MACHINE
|
|
13
|
+
? MachineCloudResource
|
|
14
|
+
: T extends CloudPoolType.LUDEO
|
|
15
|
+
? LudeoCloudResource
|
|
16
|
+
: BaseCloudResource;
|