@flowcore/sdk 1.49.0 → 1.51.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/CHANGELOG.md +31 -0
- package/README.md +47 -0
- package/esm/_dnt.shims.d.ts +1 -1
- package/esm/commands/adapter/reset-adapter.d.ts +52 -0
- package/esm/commands/adapter/reset-adapter.d.ts.map +1 -0
- package/esm/commands/adapter/reset-adapter.js +38 -0
- package/esm/commands/ai-agent-coordinator/conversation-stream.command.js +1 -6
- package/esm/commands/api-key/api-key.create.js +8 -21
- package/esm/commands/api-key/api-key.delete.js +4 -12
- package/esm/commands/api-key/api-key.list.js +4 -12
- package/esm/commands/data-core/data-core.create.js +4 -12
- package/esm/commands/data-core/data-core.request-delete.js +4 -12
- package/esm/commands/event-type/event-type.create.js +4 -12
- package/esm/commands/event-type/event-type.request-delete.js +4 -12
- package/esm/commands/event-type/event-type.request-truncate.js +4 -12
- package/esm/commands/events/event.list.js +4 -12
- package/esm/commands/events/events.fetch-time-buckets-by-names.js +4 -12
- package/esm/commands/events/events.fetch.js +4 -12
- package/esm/commands/events/time-bucket.list.js +4 -12
- package/esm/commands/flow-type/flow-type.create.js +4 -12
- package/esm/commands/flow-type/flow-type.request-delete.js +4 -12
- package/esm/commands/iam/permissions/get-user-permissions.d.ts +48 -0
- package/esm/commands/iam/permissions/get-user-permissions.d.ts.map +1 -0
- package/esm/commands/iam/permissions/get-user-permissions.js +44 -0
- package/esm/commands/iam/policies/create-policy.d.ts +89 -0
- package/esm/commands/iam/policies/create-policy.d.ts.map +1 -0
- package/esm/commands/iam/policies/create-policy.js +68 -0
- package/esm/commands/iam/policies/get-policy.d.ts +35 -0
- package/esm/commands/iam/policies/get-policy.d.ts.map +1 -0
- package/esm/commands/iam/policies/get-policy.js +36 -0
- package/esm/commands/iam/policies/id/archive-policy.d.ts +45 -0
- package/esm/commands/iam/policies/id/archive-policy.d.ts.map +1 -0
- package/esm/commands/iam/policies/id/archive-policy.js +41 -0
- package/esm/commands/iam/policies/id/get-policy.d.ts +45 -0
- package/esm/commands/iam/policies/id/get-policy.d.ts.map +1 -0
- package/esm/commands/iam/policies/id/get-policy.js +39 -0
- package/esm/commands/iam/policies/id/update-policy.d.ts +53 -0
- package/esm/commands/iam/policies/id/update-policy.d.ts.map +1 -0
- package/esm/commands/iam/policies/id/update-policy.js +45 -0
- package/esm/commands/iam/policy-associations/get-key-policies.d.ts +35 -0
- package/esm/commands/iam/policy-associations/get-key-policies.d.ts.map +1 -0
- package/esm/commands/iam/policy-associations/get-key-policies.js +76 -0
- package/esm/commands/iam/policy-associations/get-organization-policies.d.ts +35 -0
- package/esm/commands/iam/policy-associations/get-organization-policies.d.ts.map +1 -0
- package/esm/commands/iam/policy-associations/get-organization-policies.js +79 -0
- package/esm/commands/iam/policy-associations/get-policy-associations.d.ts +83 -0
- package/esm/commands/iam/policy-associations/get-policy-associations.d.ts.map +1 -0
- package/esm/commands/iam/policy-associations/get-policy-associations.js +108 -0
- package/esm/commands/iam/policy-associations/get-role-policies.d.ts +35 -0
- package/esm/commands/iam/policy-associations/get-role-policies.d.ts.map +1 -0
- package/esm/commands/iam/policy-associations/get-role-policies.js +64 -0
- package/esm/commands/iam/policy-associations/get-user-policies.d.ts +37 -0
- package/esm/commands/iam/policy-associations/get-user-policies.d.ts.map +1 -0
- package/esm/commands/iam/policy-associations/get-user-policies.js +36 -0
- package/esm/commands/iam/policy-associations/link-key-policy.d.ts +53 -0
- package/esm/commands/iam/policy-associations/link-key-policy.d.ts.map +1 -0
- package/esm/commands/iam/policy-associations/link-key-policy.js +51 -0
- package/esm/commands/iam/policy-associations/link-role-policy.d.ts +53 -0
- package/esm/commands/iam/policy-associations/link-role-policy.d.ts.map +1 -0
- package/esm/commands/iam/policy-associations/link-role-policy.js +51 -0
- package/esm/commands/iam/policy-associations/link-user-policy.d.ts +53 -0
- package/esm/commands/iam/policy-associations/link-user-policy.d.ts.map +1 -0
- package/esm/commands/iam/policy-associations/link-user-policy.js +51 -0
- package/esm/commands/iam/policy-associations/unlink-key-policy.d.ts +41 -0
- package/esm/commands/iam/policy-associations/unlink-key-policy.d.ts.map +1 -0
- package/esm/commands/iam/policy-associations/unlink-key-policy.js +43 -0
- package/esm/commands/iam/policy-associations/unlink-role-policy.d.ts +41 -0
- package/esm/commands/iam/policy-associations/unlink-role-policy.d.ts.map +1 -0
- package/esm/commands/iam/policy-associations/unlink-role-policy.js +43 -0
- package/esm/commands/iam/policy-associations/unlink-user-policy.d.ts +41 -0
- package/esm/commands/iam/policy-associations/unlink-user-policy.d.ts.map +1 -0
- package/esm/commands/iam/policy-associations/unlink-user-policy.js +43 -0
- package/esm/commands/iam/role-associations/get-key-roles.d.ts +35 -0
- package/esm/commands/iam/role-associations/get-key-roles.d.ts.map +1 -0
- package/esm/commands/iam/role-associations/get-key-roles.js +36 -0
- package/esm/commands/iam/role-associations/get-organization-roles.d.ts +35 -0
- package/esm/commands/iam/role-associations/get-organization-roles.d.ts.map +1 -0
- package/esm/commands/iam/role-associations/get-organization-roles.js +53 -0
- package/esm/commands/iam/role-associations/get-role-associations.d.ts +70 -0
- package/esm/commands/iam/role-associations/get-role-associations.d.ts.map +1 -0
- package/esm/commands/iam/role-associations/get-role-associations.js +58 -0
- package/esm/commands/iam/role-associations/get-user-roles.d.ts +37 -0
- package/esm/commands/iam/role-associations/get-user-roles.d.ts.map +1 -0
- package/esm/commands/iam/role-associations/get-user-roles.js +41 -0
- package/esm/commands/iam/role-associations/link-key-role.d.ts +53 -0
- package/esm/commands/iam/role-associations/link-key-role.d.ts.map +1 -0
- package/esm/commands/iam/role-associations/link-key-role.js +51 -0
- package/esm/commands/iam/role-associations/link-user-role.d.ts +53 -0
- package/esm/commands/iam/role-associations/link-user-role.d.ts.map +1 -0
- package/esm/commands/iam/{user-role-association.create.js → role-associations/link-user-role.js} +19 -8
- package/esm/commands/iam/role-associations/unlink-key-role.d.ts +41 -0
- package/esm/commands/iam/role-associations/unlink-key-role.d.ts.map +1 -0
- package/esm/commands/iam/role-associations/unlink-key-role.js +43 -0
- package/esm/commands/iam/role-associations/unlink-user-role.d.ts +41 -0
- package/esm/commands/iam/role-associations/unlink-user-role.d.ts.map +1 -0
- package/esm/commands/iam/role-associations/unlink-user-role.js +43 -0
- package/esm/commands/iam/roles/create-role.d.ts +60 -0
- package/esm/commands/iam/roles/create-role.d.ts.map +1 -0
- package/esm/commands/iam/roles/create-role.js +55 -0
- package/{script/commands/iam/role.list.d.ts → esm/commands/iam/roles/get-roles.d.ts} +10 -8
- package/esm/commands/iam/roles/get-roles.d.ts.map +1 -0
- package/esm/commands/iam/roles/get-roles.js +36 -0
- package/esm/commands/iam/roles/id/archive-role.d.ts +45 -0
- package/esm/commands/iam/roles/id/archive-role.d.ts.map +1 -0
- package/esm/commands/iam/roles/id/archive-role.js +41 -0
- package/esm/commands/iam/roles/id/get-role.d.ts +35 -0
- package/esm/commands/iam/roles/id/get-role.d.ts.map +1 -0
- package/esm/commands/iam/roles/id/get-role.js +35 -0
- package/esm/commands/iam/roles/id/update-role.d.ts +47 -0
- package/esm/commands/iam/roles/id/update-role.d.ts.map +1 -0
- package/esm/commands/iam/roles/id/update-role.js +46 -0
- package/esm/commands/iam/tenant-iam-audit/get-audit-for-tenant.d.ts +88 -0
- package/esm/commands/iam/tenant-iam-audit/get-audit-for-tenant.d.ts.map +1 -0
- package/esm/commands/iam/tenant-iam-audit/get-audit-for-tenant.js +101 -0
- package/esm/commands/iam/validate/validate-key.d.ts +43 -0
- package/esm/commands/iam/validate/validate-key.d.ts.map +1 -0
- package/esm/commands/iam/validate/validate-key.js +42 -0
- package/esm/commands/iam/validate/validate-user.d.ts +77 -0
- package/esm/commands/iam/validate/validate-user.d.ts.map +1 -0
- package/esm/commands/iam/validate/validate-user.js +57 -0
- package/esm/commands/index.d.ts +34 -7
- package/esm/commands/index.d.ts.map +1 -1
- package/esm/commands/index.js +36 -8
- package/esm/commands/ingestion/ingest.batch.js +5 -18
- package/esm/commands/ingestion/ingest.event.js +5 -18
- package/esm/commands/scenario/scenario.create.js +4 -12
- package/esm/commands/scenario/scenario.delete.js +4 -12
- package/esm/commands/scenario/scenario.fetch.js +4 -12
- package/esm/commands/scenario/scenario.list.js +4 -12
- package/esm/commands/scenario/scenario.update.js +4 -12
- package/esm/commands/secret/secret.create.js +4 -12
- package/esm/commands/secret/secret.delete.js +4 -12
- package/esm/commands/secret/secret.list.js +4 -12
- package/esm/commands/security/pat.create.js +4 -12
- package/esm/commands/security/pat.delete.js +4 -12
- package/esm/commands/security/pat.exchange.js +4 -12
- package/esm/commands/security/pat.get.js +4 -12
- package/esm/commands/security/pat.list.js +4 -12
- package/esm/commands/tenant/tenant.list.js +4 -12
- package/esm/commands/variable/variable.create.js +4 -12
- package/esm/commands/variable/variable.delete.js +4 -12
- package/esm/commands/variable/variable.list.js +4 -12
- package/esm/common/command-graphql.js +4 -12
- package/esm/common/command.js +20 -45
- package/esm/common/flowcore-client.js +4 -18
- package/esm/common/notification-client.js +15 -72
- package/esm/common/websocket-client.js +16 -80
- package/esm/exceptions/client-error.js +6 -18
- package/esm/exceptions/invalid-response.js +2 -6
- package/esm/utils/local-cache.js +5 -19
- package/package.json +1 -1
- package/script/_dnt.shims.d.ts +1 -1
- package/script/commands/adapter/reset-adapter.d.ts +52 -0
- package/script/commands/adapter/reset-adapter.d.ts.map +1 -0
- package/script/commands/adapter/reset-adapter.js +42 -0
- package/script/commands/ai-agent-coordinator/conversation-stream.command.js +1 -6
- package/script/commands/api-key/api-key.create.js +8 -21
- package/script/commands/api-key/api-key.delete.js +4 -12
- package/script/commands/api-key/api-key.list.js +4 -12
- package/script/commands/data-core/data-core.create.js +4 -12
- package/script/commands/data-core/data-core.request-delete.js +4 -12
- package/script/commands/event-type/event-type.create.js +4 -12
- package/script/commands/event-type/event-type.request-delete.js +4 -12
- package/script/commands/event-type/event-type.request-truncate.js +4 -12
- package/script/commands/events/event.list.js +4 -12
- package/script/commands/events/events.fetch-time-buckets-by-names.js +4 -12
- package/script/commands/events/events.fetch.js +4 -12
- package/script/commands/events/time-bucket.list.js +4 -12
- package/script/commands/flow-type/flow-type.create.js +4 -12
- package/script/commands/flow-type/flow-type.request-delete.js +4 -12
- package/script/commands/iam/permissions/get-user-permissions.d.ts +48 -0
- package/script/commands/iam/permissions/get-user-permissions.d.ts.map +1 -0
- package/script/commands/iam/permissions/get-user-permissions.js +48 -0
- package/script/commands/iam/policies/create-policy.d.ts +89 -0
- package/script/commands/iam/policies/create-policy.d.ts.map +1 -0
- package/script/commands/iam/policies/create-policy.js +72 -0
- package/script/commands/iam/policies/get-policy.d.ts +35 -0
- package/script/commands/iam/policies/get-policy.d.ts.map +1 -0
- package/script/commands/iam/policies/get-policy.js +40 -0
- package/script/commands/iam/policies/id/archive-policy.d.ts +45 -0
- package/script/commands/iam/policies/id/archive-policy.d.ts.map +1 -0
- package/script/commands/iam/policies/id/archive-policy.js +45 -0
- package/script/commands/iam/policies/id/get-policy.d.ts +45 -0
- package/script/commands/iam/policies/id/get-policy.d.ts.map +1 -0
- package/script/commands/iam/policies/id/get-policy.js +43 -0
- package/script/commands/iam/policies/id/update-policy.d.ts +53 -0
- package/script/commands/iam/policies/id/update-policy.d.ts.map +1 -0
- package/script/commands/iam/policies/id/update-policy.js +49 -0
- package/script/commands/iam/policy-associations/get-key-policies.d.ts +35 -0
- package/script/commands/iam/policy-associations/get-key-policies.d.ts.map +1 -0
- package/script/commands/iam/policy-associations/get-key-policies.js +80 -0
- package/script/commands/iam/policy-associations/get-organization-policies.d.ts +35 -0
- package/script/commands/iam/policy-associations/get-organization-policies.d.ts.map +1 -0
- package/script/commands/iam/policy-associations/get-organization-policies.js +83 -0
- package/script/commands/iam/policy-associations/get-policy-associations.d.ts +83 -0
- package/script/commands/iam/policy-associations/get-policy-associations.d.ts.map +1 -0
- package/script/commands/iam/policy-associations/get-policy-associations.js +112 -0
- package/script/commands/iam/policy-associations/get-role-policies.d.ts +35 -0
- package/script/commands/iam/policy-associations/get-role-policies.d.ts.map +1 -0
- package/script/commands/iam/policy-associations/get-role-policies.js +68 -0
- package/script/commands/iam/policy-associations/get-user-policies.d.ts +37 -0
- package/script/commands/iam/policy-associations/get-user-policies.d.ts.map +1 -0
- package/script/commands/iam/policy-associations/get-user-policies.js +40 -0
- package/script/commands/iam/policy-associations/link-key-policy.d.ts +53 -0
- package/script/commands/iam/policy-associations/link-key-policy.d.ts.map +1 -0
- package/script/commands/iam/policy-associations/link-key-policy.js +55 -0
- package/script/commands/iam/policy-associations/link-role-policy.d.ts +53 -0
- package/script/commands/iam/policy-associations/link-role-policy.d.ts.map +1 -0
- package/script/commands/iam/policy-associations/link-role-policy.js +55 -0
- package/script/commands/iam/policy-associations/link-user-policy.d.ts +53 -0
- package/script/commands/iam/policy-associations/link-user-policy.d.ts.map +1 -0
- package/script/commands/iam/policy-associations/link-user-policy.js +55 -0
- package/script/commands/iam/policy-associations/unlink-key-policy.d.ts +41 -0
- package/script/commands/iam/policy-associations/unlink-key-policy.d.ts.map +1 -0
- package/script/commands/iam/policy-associations/unlink-key-policy.js +47 -0
- package/script/commands/iam/policy-associations/unlink-role-policy.d.ts +41 -0
- package/script/commands/iam/policy-associations/unlink-role-policy.d.ts.map +1 -0
- package/script/commands/iam/policy-associations/unlink-role-policy.js +47 -0
- package/script/commands/iam/policy-associations/unlink-user-policy.d.ts +41 -0
- package/script/commands/iam/policy-associations/unlink-user-policy.d.ts.map +1 -0
- package/script/commands/iam/policy-associations/unlink-user-policy.js +47 -0
- package/script/commands/iam/role-associations/get-key-roles.d.ts +35 -0
- package/script/commands/iam/role-associations/get-key-roles.d.ts.map +1 -0
- package/script/commands/iam/role-associations/get-key-roles.js +40 -0
- package/script/commands/iam/role-associations/get-organization-roles.d.ts +35 -0
- package/script/commands/iam/role-associations/get-organization-roles.d.ts.map +1 -0
- package/script/commands/iam/role-associations/get-organization-roles.js +57 -0
- package/script/commands/iam/role-associations/get-role-associations.d.ts +70 -0
- package/script/commands/iam/role-associations/get-role-associations.d.ts.map +1 -0
- package/script/commands/iam/role-associations/get-role-associations.js +62 -0
- package/script/commands/iam/role-associations/get-user-roles.d.ts +37 -0
- package/script/commands/iam/role-associations/get-user-roles.d.ts.map +1 -0
- package/script/commands/iam/role-associations/get-user-roles.js +45 -0
- package/script/commands/iam/role-associations/link-key-role.d.ts +53 -0
- package/script/commands/iam/role-associations/link-key-role.d.ts.map +1 -0
- package/script/commands/iam/role-associations/link-key-role.js +55 -0
- package/script/commands/iam/role-associations/link-user-role.d.ts +53 -0
- package/script/commands/iam/role-associations/link-user-role.d.ts.map +1 -0
- package/script/commands/iam/{user-role-association.create.js → role-associations/link-user-role.js} +21 -10
- package/script/commands/iam/role-associations/unlink-key-role.d.ts +41 -0
- package/script/commands/iam/role-associations/unlink-key-role.d.ts.map +1 -0
- package/script/commands/iam/role-associations/unlink-key-role.js +47 -0
- package/script/commands/iam/role-associations/unlink-user-role.d.ts +41 -0
- package/script/commands/iam/role-associations/unlink-user-role.d.ts.map +1 -0
- package/script/commands/iam/role-associations/unlink-user-role.js +47 -0
- package/script/commands/iam/roles/create-role.d.ts +60 -0
- package/script/commands/iam/roles/create-role.d.ts.map +1 -0
- package/script/commands/iam/roles/create-role.js +59 -0
- package/{esm/commands/iam/role.list.d.ts → script/commands/iam/roles/get-roles.d.ts} +10 -8
- package/script/commands/iam/roles/get-roles.d.ts.map +1 -0
- package/script/commands/iam/roles/get-roles.js +40 -0
- package/script/commands/iam/roles/id/archive-role.d.ts +45 -0
- package/script/commands/iam/roles/id/archive-role.d.ts.map +1 -0
- package/script/commands/iam/roles/id/archive-role.js +45 -0
- package/script/commands/iam/roles/id/get-role.d.ts +35 -0
- package/script/commands/iam/roles/id/get-role.d.ts.map +1 -0
- package/script/commands/iam/roles/id/get-role.js +39 -0
- package/script/commands/iam/roles/id/update-role.d.ts +47 -0
- package/script/commands/iam/roles/id/update-role.d.ts.map +1 -0
- package/script/commands/iam/roles/id/update-role.js +50 -0
- package/script/commands/iam/tenant-iam-audit/get-audit-for-tenant.d.ts +88 -0
- package/script/commands/iam/tenant-iam-audit/get-audit-for-tenant.d.ts.map +1 -0
- package/script/commands/iam/tenant-iam-audit/get-audit-for-tenant.js +105 -0
- package/script/commands/iam/validate/validate-key.d.ts +43 -0
- package/script/commands/iam/validate/validate-key.d.ts.map +1 -0
- package/script/commands/iam/validate/validate-key.js +46 -0
- package/script/commands/iam/validate/validate-user.d.ts +77 -0
- package/script/commands/iam/validate/validate-user.d.ts.map +1 -0
- package/script/commands/iam/validate/validate-user.js +61 -0
- package/script/commands/index.d.ts +34 -7
- package/script/commands/index.d.ts.map +1 -1
- package/script/commands/index.js +36 -8
- package/script/commands/ingestion/ingest.batch.js +5 -18
- package/script/commands/ingestion/ingest.event.js +5 -18
- package/script/commands/scenario/scenario.create.js +4 -12
- package/script/commands/scenario/scenario.delete.js +4 -12
- package/script/commands/scenario/scenario.fetch.js +4 -12
- package/script/commands/scenario/scenario.list.js +4 -12
- package/script/commands/scenario/scenario.update.js +4 -12
- package/script/commands/secret/secret.create.js +4 -12
- package/script/commands/secret/secret.delete.js +4 -12
- package/script/commands/secret/secret.list.js +4 -12
- package/script/commands/security/pat.create.js +4 -12
- package/script/commands/security/pat.delete.js +4 -12
- package/script/commands/security/pat.exchange.js +4 -12
- package/script/commands/security/pat.get.js +4 -12
- package/script/commands/security/pat.list.js +4 -12
- package/script/commands/tenant/tenant.list.js +4 -12
- package/script/commands/variable/variable.create.js +4 -12
- package/script/commands/variable/variable.delete.js +4 -12
- package/script/commands/variable/variable.list.js +4 -12
- package/script/common/command-graphql.js +4 -12
- package/script/common/command.js +20 -45
- package/script/common/flowcore-client.js +4 -18
- package/script/common/notification-client.js +15 -72
- package/script/common/websocket-client.js +16 -80
- package/script/exceptions/client-error.js +6 -18
- package/script/exceptions/invalid-response.js +2 -6
- package/script/utils/local-cache.js +5 -19
- package/esm/commands/iam/api-key-role-association.create.d.ts +0 -45
- package/esm/commands/iam/api-key-role-association.create.d.ts.map +0 -1
- package/esm/commands/iam/api-key-role-association.create.js +0 -44
- package/esm/commands/iam/api-key-role-association.delete.d.ts +0 -45
- package/esm/commands/iam/api-key-role-association.delete.d.ts.map +0 -1
- package/esm/commands/iam/api-key-role-association.delete.js +0 -44
- package/esm/commands/iam/api-key-role-association.list.d.ts +0 -31
- package/esm/commands/iam/api-key-role-association.list.d.ts.map +0 -1
- package/esm/commands/iam/api-key-role-association.list.js +0 -37
- package/esm/commands/iam/role.list.d.ts.map +0 -1
- package/esm/commands/iam/role.list.js +0 -41
- package/esm/commands/iam/user-role-association.create.d.ts +0 -42
- package/esm/commands/iam/user-role-association.create.d.ts.map +0 -1
- package/esm/commands/iam/user-role-association.delete.d.ts +0 -42
- package/esm/commands/iam/user-role-association.delete.d.ts.map +0 -1
- package/esm/commands/iam/user-role-association.delete.js +0 -40
- package/esm/commands/iam/user-role-association.list.d.ts +0 -33
- package/esm/commands/iam/user-role-association.list.d.ts.map +0 -1
- package/esm/commands/iam/user-role-association.list.js +0 -39
- package/esm/contracts/iam.d.ts +0 -13
- package/esm/contracts/iam.d.ts.map +0 -1
- package/esm/contracts/iam.js +0 -9
- package/script/commands/iam/api-key-role-association.create.d.ts +0 -45
- package/script/commands/iam/api-key-role-association.create.d.ts.map +0 -1
- package/script/commands/iam/api-key-role-association.create.js +0 -48
- package/script/commands/iam/api-key-role-association.delete.d.ts +0 -45
- package/script/commands/iam/api-key-role-association.delete.d.ts.map +0 -1
- package/script/commands/iam/api-key-role-association.delete.js +0 -48
- package/script/commands/iam/api-key-role-association.list.d.ts +0 -31
- package/script/commands/iam/api-key-role-association.list.d.ts.map +0 -1
- package/script/commands/iam/api-key-role-association.list.js +0 -41
- package/script/commands/iam/role.list.d.ts.map +0 -1
- package/script/commands/iam/role.list.js +0 -45
- package/script/commands/iam/user-role-association.create.d.ts +0 -42
- package/script/commands/iam/user-role-association.create.d.ts.map +0 -1
- package/script/commands/iam/user-role-association.delete.d.ts +0 -42
- package/script/commands/iam/user-role-association.delete.d.ts.map +0 -1
- package/script/commands/iam/user-role-association.delete.js +0 -44
- package/script/commands/iam/user-role-association.list.d.ts +0 -33
- package/script/commands/iam/user-role-association.list.d.ts.map +0 -1
- package/script/commands/iam/user-role-association.list.js +0 -43
- package/script/contracts/iam.d.ts +0 -13
- package/script/contracts/iam.d.ts.map +0 -1
- package/script/contracts/iam.js +0 -12
|
@@ -35,6 +35,21 @@ const MAX_RECONNECT_INTERVAL = 30_000;
|
|
|
35
35
|
* Handles connection lifecycle, authentication, reconnection, and message sending/receiving.
|
|
36
36
|
*/
|
|
37
37
|
class WebSocketClient {
|
|
38
|
+
authOptions;
|
|
39
|
+
overrideBaseUrl; // Field to store the override URL
|
|
40
|
+
webSocket;
|
|
41
|
+
options;
|
|
42
|
+
logger;
|
|
43
|
+
reconnectInterval;
|
|
44
|
+
reconnectAttempts = 0;
|
|
45
|
+
_isOpen = false;
|
|
46
|
+
_isConnecting = false;
|
|
47
|
+
webSocketFactory;
|
|
48
|
+
// Internal subject to push received data
|
|
49
|
+
internalSubject = new rxjs_1.Subject();
|
|
50
|
+
// Store the current command and config for reconnects and sending
|
|
51
|
+
currentCommand = null;
|
|
52
|
+
currentConfig = null;
|
|
38
53
|
/**
|
|
39
54
|
* Creates a new WebSocketClient instance.
|
|
40
55
|
* @param authOptions - Authentication options (Bearer token via OIDC client or API Key).
|
|
@@ -42,86 +57,7 @@ class WebSocketClient {
|
|
|
42
57
|
* @param webSocketFactory - Optional WebSocket factory for testing.
|
|
43
58
|
*/
|
|
44
59
|
constructor(authOptions, options, webSocketFactory) {
|
|
45
|
-
|
|
46
|
-
enumerable: true,
|
|
47
|
-
configurable: true,
|
|
48
|
-
writable: true,
|
|
49
|
-
value: authOptions
|
|
50
|
-
});
|
|
51
|
-
Object.defineProperty(this, "overrideBaseUrl", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
configurable: true,
|
|
54
|
-
writable: true,
|
|
55
|
-
value: void 0
|
|
56
|
-
}); // Field to store the override URL
|
|
57
|
-
Object.defineProperty(this, "webSocket", {
|
|
58
|
-
enumerable: true,
|
|
59
|
-
configurable: true,
|
|
60
|
-
writable: true,
|
|
61
|
-
value: void 0
|
|
62
|
-
});
|
|
63
|
-
Object.defineProperty(this, "options", {
|
|
64
|
-
enumerable: true,
|
|
65
|
-
configurable: true,
|
|
66
|
-
writable: true,
|
|
67
|
-
value: void 0
|
|
68
|
-
});
|
|
69
|
-
Object.defineProperty(this, "logger", {
|
|
70
|
-
enumerable: true,
|
|
71
|
-
configurable: true,
|
|
72
|
-
writable: true,
|
|
73
|
-
value: void 0
|
|
74
|
-
});
|
|
75
|
-
Object.defineProperty(this, "reconnectInterval", {
|
|
76
|
-
enumerable: true,
|
|
77
|
-
configurable: true,
|
|
78
|
-
writable: true,
|
|
79
|
-
value: void 0
|
|
80
|
-
});
|
|
81
|
-
Object.defineProperty(this, "reconnectAttempts", {
|
|
82
|
-
enumerable: true,
|
|
83
|
-
configurable: true,
|
|
84
|
-
writable: true,
|
|
85
|
-
value: 0
|
|
86
|
-
});
|
|
87
|
-
Object.defineProperty(this, "_isOpen", {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
configurable: true,
|
|
90
|
-
writable: true,
|
|
91
|
-
value: false
|
|
92
|
-
});
|
|
93
|
-
Object.defineProperty(this, "_isConnecting", {
|
|
94
|
-
enumerable: true,
|
|
95
|
-
configurable: true,
|
|
96
|
-
writable: true,
|
|
97
|
-
value: false
|
|
98
|
-
});
|
|
99
|
-
Object.defineProperty(this, "webSocketFactory", {
|
|
100
|
-
enumerable: true,
|
|
101
|
-
configurable: true,
|
|
102
|
-
writable: true,
|
|
103
|
-
value: void 0
|
|
104
|
-
});
|
|
105
|
-
// Internal subject to push received data
|
|
106
|
-
Object.defineProperty(this, "internalSubject", {
|
|
107
|
-
enumerable: true,
|
|
108
|
-
configurable: true,
|
|
109
|
-
writable: true,
|
|
110
|
-
value: new rxjs_1.Subject()
|
|
111
|
-
});
|
|
112
|
-
// Store the current command and config for reconnects and sending
|
|
113
|
-
Object.defineProperty(this, "currentCommand", {
|
|
114
|
-
enumerable: true,
|
|
115
|
-
configurable: true,
|
|
116
|
-
writable: true,
|
|
117
|
-
value: null
|
|
118
|
-
});
|
|
119
|
-
Object.defineProperty(this, "currentConfig", {
|
|
120
|
-
enumerable: true,
|
|
121
|
-
configurable: true,
|
|
122
|
-
writable: true,
|
|
123
|
-
value: null
|
|
124
|
-
});
|
|
60
|
+
this.authOptions = authOptions;
|
|
125
61
|
this.options = { reconnectInterval: 1000, ...options };
|
|
126
62
|
this.logger = options?.logger ?? logger_js_1.defaultLogger;
|
|
127
63
|
this.reconnectInterval = this.options.reconnectInterval;
|
|
@@ -5,26 +5,14 @@ exports.ClientError = void 0;
|
|
|
5
5
|
* An error thrown when the client request fails
|
|
6
6
|
*/
|
|
7
7
|
class ClientError extends Error {
|
|
8
|
+
status;
|
|
9
|
+
command;
|
|
10
|
+
body;
|
|
8
11
|
constructor(message, status, command, body) {
|
|
9
12
|
super(`${command} failed with ${status}: ${body ? JSON.stringify(body) : message}`);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
writable: true,
|
|
14
|
-
value: status
|
|
15
|
-
});
|
|
16
|
-
Object.defineProperty(this, "command", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: command
|
|
21
|
-
});
|
|
22
|
-
Object.defineProperty(this, "body", {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
configurable: true,
|
|
25
|
-
writable: true,
|
|
26
|
-
value: body
|
|
27
|
-
});
|
|
13
|
+
this.status = status;
|
|
14
|
+
this.command = command;
|
|
15
|
+
this.body = body;
|
|
28
16
|
}
|
|
29
17
|
}
|
|
30
18
|
exports.ClientError = ClientError;
|
|
@@ -5,15 +5,11 @@ exports.InvalidResponseException = void 0;
|
|
|
5
5
|
* An error thrown when the response from the server is invalid
|
|
6
6
|
*/
|
|
7
7
|
class InvalidResponseException extends Error {
|
|
8
|
+
errors;
|
|
8
9
|
constructor(message, errors) {
|
|
9
10
|
const errorString = JSON.stringify(errors);
|
|
10
11
|
super(`${message}: ${errorString.slice(0, 1000)}`);
|
|
11
|
-
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
writable: true,
|
|
15
|
-
value: errors
|
|
16
|
-
});
|
|
12
|
+
this.errors = errors;
|
|
17
13
|
this.errors = errors;
|
|
18
14
|
}
|
|
19
15
|
}
|
|
@@ -2,26 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LocalCache = void 0;
|
|
4
4
|
class LocalCache {
|
|
5
|
+
defaultTtlMs;
|
|
6
|
+
cache = new Map();
|
|
7
|
+
// deno-lint-ignore no-explicit-any
|
|
8
|
+
timers = new Map();
|
|
5
9
|
constructor(defaultTtlMs) {
|
|
6
|
-
|
|
7
|
-
enumerable: true,
|
|
8
|
-
configurable: true,
|
|
9
|
-
writable: true,
|
|
10
|
-
value: defaultTtlMs
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(this, "cache", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
configurable: true,
|
|
15
|
-
writable: true,
|
|
16
|
-
value: new Map()
|
|
17
|
-
});
|
|
18
|
-
// deno-lint-ignore no-explicit-any
|
|
19
|
-
Object.defineProperty(this, "timers", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true,
|
|
23
|
-
value: new Map()
|
|
24
|
-
});
|
|
10
|
+
this.defaultTtlMs = defaultTtlMs;
|
|
25
11
|
}
|
|
26
12
|
get(key) {
|
|
27
13
|
return this.cache.get(key);
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { type Static, type TObject, type TString } from "@sinclair/typebox";
|
|
2
|
-
import { Command } from "../../common/command.js";
|
|
3
|
-
/**
|
|
4
|
-
* The input for the api key role associations create command
|
|
5
|
-
*/
|
|
6
|
-
export interface ApiKeyRoleAssociationCreateInput {
|
|
7
|
-
/** the api key id */
|
|
8
|
-
apiKeyId: string;
|
|
9
|
-
/** the role id */
|
|
10
|
-
roleId: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The response for the api key role associations create command
|
|
14
|
-
*/
|
|
15
|
-
declare const responseSchema: TObject<{
|
|
16
|
-
roleId: TString;
|
|
17
|
-
organizationId: TString;
|
|
18
|
-
keyId: TString;
|
|
19
|
-
}>;
|
|
20
|
-
type ApiKeyRoleAssociationCreateOutput = Omit<Static<typeof responseSchema>, "keyId"> & {
|
|
21
|
-
apiKeyId: string;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Create a api key role association
|
|
25
|
-
*/
|
|
26
|
-
export declare class ApiKeyRoleAssociationCreateCommand extends Command<ApiKeyRoleAssociationCreateInput, ApiKeyRoleAssociationCreateOutput> {
|
|
27
|
-
/**
|
|
28
|
-
* Get the method
|
|
29
|
-
*/
|
|
30
|
-
protected getMethod(): string;
|
|
31
|
-
/**
|
|
32
|
-
* Get the base url
|
|
33
|
-
*/
|
|
34
|
-
protected getBaseUrl(): string;
|
|
35
|
-
/**
|
|
36
|
-
* Get the path
|
|
37
|
-
*/
|
|
38
|
-
protected getPath(): string;
|
|
39
|
-
/**
|
|
40
|
-
* Parse the response
|
|
41
|
-
*/
|
|
42
|
-
protected parseResponse(rawResponse: unknown): ApiKeyRoleAssociationCreateOutput;
|
|
43
|
-
}
|
|
44
|
-
export {};
|
|
45
|
-
//# sourceMappingURL=api-key-role-association.create.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-key-role-association.create.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/api-key-role-association.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,qBAAqB;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,QAAA,MAAM,cAAc,EAAE,OAAO,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,cAAc,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,OAAO,CAAA;CACf,CAIC,CAAA;AAEF,KAAK,iCAAiC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,EAAE,OAAO,CAAC,GAAG;IACtF,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,qBAAa,kCACX,SAAQ,OAAO,CAAC,gCAAgC,EAAE,iCAAiC,CAAC;IACpF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,iCAAiC;CAO1F"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { Command } from "../../common/command.js";
|
|
3
|
-
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
|
-
/**
|
|
5
|
-
* The response for the api key role associations create command
|
|
6
|
-
*/
|
|
7
|
-
const responseSchema = Type.Object({
|
|
8
|
-
roleId: Type.String(),
|
|
9
|
-
organizationId: Type.String(),
|
|
10
|
-
keyId: Type.String(),
|
|
11
|
-
});
|
|
12
|
-
/**
|
|
13
|
-
* Create a api key role association
|
|
14
|
-
*/
|
|
15
|
-
export class ApiKeyRoleAssociationCreateCommand extends Command {
|
|
16
|
-
/**
|
|
17
|
-
* Get the method
|
|
18
|
-
*/
|
|
19
|
-
getMethod() {
|
|
20
|
-
return "POST";
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Get the base url
|
|
24
|
-
*/
|
|
25
|
-
getBaseUrl() {
|
|
26
|
-
return "https://iam.api.flowcore.io";
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Get the path
|
|
30
|
-
*/
|
|
31
|
-
getPath() {
|
|
32
|
-
return `/api/v1/role-associations/key/${this.input.apiKeyId}`;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Parse the response
|
|
36
|
-
*/
|
|
37
|
-
parseResponse(rawResponse) {
|
|
38
|
-
const { keyId, ...rest } = parseResponseHelper(responseSchema, rawResponse);
|
|
39
|
-
return {
|
|
40
|
-
...rest,
|
|
41
|
-
apiKeyId: keyId,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { type Static, type TObject, type TString } from "@sinclair/typebox";
|
|
2
|
-
import { Command } from "../../common/command.js";
|
|
3
|
-
/**
|
|
4
|
-
* The input for the api key role associations delete command
|
|
5
|
-
*/
|
|
6
|
-
export interface ApiKeyRoleAssociationDeleteInput {
|
|
7
|
-
/** the api key id */
|
|
8
|
-
apiKeyId: string;
|
|
9
|
-
/** the role id */
|
|
10
|
-
roleId: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The response for the api key role association delete command
|
|
14
|
-
*/
|
|
15
|
-
declare const responseSchema: TObject<{
|
|
16
|
-
roleId: TString;
|
|
17
|
-
organizationId: TString;
|
|
18
|
-
keyId: TString;
|
|
19
|
-
}>;
|
|
20
|
-
type ApiKeyRoleAssociationDeleteOutput = Omit<Static<typeof responseSchema>, "keyId"> & {
|
|
21
|
-
apiKeyId: string;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Delete a user role association
|
|
25
|
-
*/
|
|
26
|
-
export declare class ApiKeyRoleAssociationDeleteCommand extends Command<ApiKeyRoleAssociationDeleteInput, ApiKeyRoleAssociationDeleteOutput> {
|
|
27
|
-
/**
|
|
28
|
-
* Get the method
|
|
29
|
-
*/
|
|
30
|
-
protected getMethod(): string;
|
|
31
|
-
/**
|
|
32
|
-
* Get the base url
|
|
33
|
-
*/
|
|
34
|
-
protected getBaseUrl(): string;
|
|
35
|
-
/**
|
|
36
|
-
* Get the path
|
|
37
|
-
*/
|
|
38
|
-
protected getPath(): string;
|
|
39
|
-
/**
|
|
40
|
-
* Parse the response
|
|
41
|
-
*/
|
|
42
|
-
protected parseResponse(rawResponse: unknown): ApiKeyRoleAssociationDeleteOutput;
|
|
43
|
-
}
|
|
44
|
-
export {};
|
|
45
|
-
//# sourceMappingURL=api-key-role-association.delete.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-key-role-association.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/api-key-role-association.delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,qBAAqB;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,QAAA,MAAM,cAAc,EAAE,OAAO,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,cAAc,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,OAAO,CAAA;CACf,CAIC,CAAA;AAEF,KAAK,iCAAiC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,EAAE,OAAO,CAAC,GAAG;IACtF,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,qBAAa,kCACX,SAAQ,OAAO,CAAC,gCAAgC,EAAE,iCAAiC,CAAC;IACpF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,iCAAiC;CAO1F"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { Command } from "../../common/command.js";
|
|
3
|
-
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
|
-
/**
|
|
5
|
-
* The response for the api key role association delete command
|
|
6
|
-
*/
|
|
7
|
-
const responseSchema = Type.Object({
|
|
8
|
-
roleId: Type.String(),
|
|
9
|
-
organizationId: Type.String(),
|
|
10
|
-
keyId: Type.String(),
|
|
11
|
-
});
|
|
12
|
-
/**
|
|
13
|
-
* Delete a user role association
|
|
14
|
-
*/
|
|
15
|
-
export class ApiKeyRoleAssociationDeleteCommand extends Command {
|
|
16
|
-
/**
|
|
17
|
-
* Get the method
|
|
18
|
-
*/
|
|
19
|
-
getMethod() {
|
|
20
|
-
return "DELETE";
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Get the base url
|
|
24
|
-
*/
|
|
25
|
-
getBaseUrl() {
|
|
26
|
-
return "https://iam.api.flowcore.io";
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Get the path
|
|
30
|
-
*/
|
|
31
|
-
getPath() {
|
|
32
|
-
return `/api/v1/role-associations/key/${this.input.apiKeyId}`;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Parse the response
|
|
36
|
-
*/
|
|
37
|
-
parseResponse(rawResponse) {
|
|
38
|
-
const { keyId, ...rest } = parseResponseHelper(responseSchema, rawResponse);
|
|
39
|
-
return {
|
|
40
|
-
...rest,
|
|
41
|
-
apiKeyId: keyId,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Command } from "../../common/command.js";
|
|
2
|
-
import { type Role } from "../../contracts/iam.js";
|
|
3
|
-
/**
|
|
4
|
-
* The input for the api key role association list command
|
|
5
|
-
*/
|
|
6
|
-
export interface ApiKeyRoleAssociationListInput {
|
|
7
|
-
/** the api key id */
|
|
8
|
-
apiKeyId: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Fetch all user role associations
|
|
12
|
-
*/
|
|
13
|
-
export declare class ApiKeyRoleAssociationListCommand extends Command<ApiKeyRoleAssociationListInput, Role[]> {
|
|
14
|
-
/**
|
|
15
|
-
* Get the method
|
|
16
|
-
*/
|
|
17
|
-
protected getMethod(): string;
|
|
18
|
-
/**
|
|
19
|
-
* Get the base url
|
|
20
|
-
*/
|
|
21
|
-
protected getBaseUrl(): string;
|
|
22
|
-
/**
|
|
23
|
-
* Get the path
|
|
24
|
-
*/
|
|
25
|
-
protected getPath(): string;
|
|
26
|
-
/**
|
|
27
|
-
* Parse the response
|
|
28
|
-
*/
|
|
29
|
-
protected parseResponse(rawResponse: unknown): Role[];
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=api-key-role-association.list.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-key-role-association.list.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/api-key-role-association.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,wBAAwB,CAAA;AAE9D;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,qBAAqB;IACrB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,OAAO,CAAC,8BAA8B,EAAE,IAAI,EAAE,CAAC;IACnG;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,EAAE;CAO/D"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Command } from "../../common/command.js";
|
|
2
|
-
import { Type } from "@sinclair/typebox";
|
|
3
|
-
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
|
-
import { RoleSchema } from "../../contracts/iam.js";
|
|
5
|
-
/**
|
|
6
|
-
* Fetch all user role associations
|
|
7
|
-
*/
|
|
8
|
-
export class ApiKeyRoleAssociationListCommand extends Command {
|
|
9
|
-
/**
|
|
10
|
-
* Get the method
|
|
11
|
-
*/
|
|
12
|
-
getMethod() {
|
|
13
|
-
return "GET";
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Get the base url
|
|
17
|
-
*/
|
|
18
|
-
getBaseUrl() {
|
|
19
|
-
return "https://iam.api.flowcore.io";
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get the path
|
|
23
|
-
*/
|
|
24
|
-
getPath() {
|
|
25
|
-
return `/api/v1/role-associations/key/${this.input.apiKeyId}`;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Parse the response
|
|
29
|
-
*/
|
|
30
|
-
parseResponse(rawResponse) {
|
|
31
|
-
const response = parseResponseHelper(Type.Array(RoleSchema), rawResponse);
|
|
32
|
-
return response.map((role) => ({
|
|
33
|
-
...role,
|
|
34
|
-
tenantId: role.organizationId,
|
|
35
|
-
}));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"role.list.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/role.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,wBAAwB,CAAA;AAE9D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,OAAO,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC;IACjE;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAQpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,EAAE;CAO/D"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Command } from "../../common/command.js";
|
|
2
|
-
import { Type } from "@sinclair/typebox";
|
|
3
|
-
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
|
-
import { RoleSchema } from "../../contracts/iam.js";
|
|
5
|
-
/**
|
|
6
|
-
* Fetch all roles for a tenant
|
|
7
|
-
*/
|
|
8
|
-
export class RoleListCommand extends Command {
|
|
9
|
-
/**
|
|
10
|
-
* Get the method
|
|
11
|
-
*/
|
|
12
|
-
getMethod() {
|
|
13
|
-
return "GET";
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Get the base url
|
|
17
|
-
*/
|
|
18
|
-
getBaseUrl() {
|
|
19
|
-
return "https://iam.api.flowcore.io";
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get the path
|
|
23
|
-
*/
|
|
24
|
-
getPath() {
|
|
25
|
-
const query = new URLSearchParams();
|
|
26
|
-
if (this.input.name) {
|
|
27
|
-
query.set("name", this.input.name);
|
|
28
|
-
}
|
|
29
|
-
return `/api/v1/role-associations/organization/${this.input.tenantId}?${query.toString()}`;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Parse the response
|
|
33
|
-
*/
|
|
34
|
-
parseResponse(rawResponse) {
|
|
35
|
-
const response = parseResponseHelper(Type.Array(RoleSchema), rawResponse);
|
|
36
|
-
return response.map((role) => ({
|
|
37
|
-
...role,
|
|
38
|
-
tenantId: role.organizationId,
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type Static, type TObject, type TString } from "@sinclair/typebox";
|
|
2
|
-
import { Command } from "../../common/command.js";
|
|
3
|
-
/**
|
|
4
|
-
* The input for the user role associations create command
|
|
5
|
-
*/
|
|
6
|
-
export interface UserRoleAssociationCreateInput {
|
|
7
|
-
/** the user id */
|
|
8
|
-
userId: string;
|
|
9
|
-
/** the role id */
|
|
10
|
-
roleId: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The response for the user role associations delete command
|
|
14
|
-
*/
|
|
15
|
-
declare const responseSchema: TObject<{
|
|
16
|
-
roleId: TString;
|
|
17
|
-
organizationId: TString;
|
|
18
|
-
userId: TString;
|
|
19
|
-
}>;
|
|
20
|
-
/**
|
|
21
|
-
* Create a user role association
|
|
22
|
-
*/
|
|
23
|
-
export declare class UserRoleAssociationCreateCommand extends Command<UserRoleAssociationCreateInput, Static<typeof responseSchema>> {
|
|
24
|
-
/**
|
|
25
|
-
* Get the method
|
|
26
|
-
*/
|
|
27
|
-
protected getMethod(): string;
|
|
28
|
-
/**
|
|
29
|
-
* Get the base url
|
|
30
|
-
*/
|
|
31
|
-
protected getBaseUrl(): string;
|
|
32
|
-
/**
|
|
33
|
-
* Get the path
|
|
34
|
-
*/
|
|
35
|
-
protected getPath(): string;
|
|
36
|
-
/**
|
|
37
|
-
* Parse the response
|
|
38
|
-
*/
|
|
39
|
-
protected parseResponse(rawResponse: unknown): Static<typeof responseSchema>;
|
|
40
|
-
}
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=user-role-association.create.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-role-association.create.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/user-role-association.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,QAAA,MAAM,cAAc,EAAE,OAAO,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,cAAc,EAAE,OAAO,CAAA;IACvB,MAAM,EAAE,OAAO,CAAA;CAChB,CAIC,CAAA;AAEF;;GAEG;AACH,qBAAa,gCACX,SAAQ,OAAO,CAAC,8BAA8B,EAAE,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;IAC9E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC;CAGtF"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type Static, type TObject, type TString } from "@sinclair/typebox";
|
|
2
|
-
import { Command } from "../../common/command.js";
|
|
3
|
-
/**
|
|
4
|
-
* The input for the user role associations delete command
|
|
5
|
-
*/
|
|
6
|
-
export interface UserRoleAssociationDeleteInput {
|
|
7
|
-
/** the user id */
|
|
8
|
-
userId: string;
|
|
9
|
-
/** the role id */
|
|
10
|
-
roleId: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The response for the user role associations delete command
|
|
14
|
-
*/
|
|
15
|
-
declare const responseSchema: TObject<{
|
|
16
|
-
roleId: TString;
|
|
17
|
-
organizationId: TString;
|
|
18
|
-
userId: TString;
|
|
19
|
-
}>;
|
|
20
|
-
/**
|
|
21
|
-
* Delete a user role association
|
|
22
|
-
*/
|
|
23
|
-
export declare class UserRoleAssociationDeleteCommand extends Command<UserRoleAssociationDeleteInput, Static<typeof responseSchema>> {
|
|
24
|
-
/**
|
|
25
|
-
* Get the method
|
|
26
|
-
*/
|
|
27
|
-
protected getMethod(): string;
|
|
28
|
-
/**
|
|
29
|
-
* Get the base url
|
|
30
|
-
*/
|
|
31
|
-
protected getBaseUrl(): string;
|
|
32
|
-
/**
|
|
33
|
-
* Get the path
|
|
34
|
-
*/
|
|
35
|
-
protected getPath(): string;
|
|
36
|
-
/**
|
|
37
|
-
* Parse the response
|
|
38
|
-
*/
|
|
39
|
-
protected parseResponse(rawResponse: unknown): Static<typeof responseSchema>;
|
|
40
|
-
}
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=user-role-association.delete.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-role-association.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/user-role-association.delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,QAAA,MAAM,cAAc,EAAE,OAAO,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,cAAc,EAAE,OAAO,CAAA;IACvB,MAAM,EAAE,OAAO,CAAA;CAChB,CAIC,CAAA;AAEF;;GAEG;AACH,qBAAa,gCACX,SAAQ,OAAO,CAAC,8BAA8B,EAAE,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;IAC9E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC;CAGtF"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { Command } from "../../common/command.js";
|
|
3
|
-
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
|
-
/**
|
|
5
|
-
* The response for the user role associations delete command
|
|
6
|
-
*/
|
|
7
|
-
const responseSchema = Type.Object({
|
|
8
|
-
roleId: Type.String(),
|
|
9
|
-
organizationId: Type.String(),
|
|
10
|
-
userId: Type.String(),
|
|
11
|
-
});
|
|
12
|
-
/**
|
|
13
|
-
* Delete a user role association
|
|
14
|
-
*/
|
|
15
|
-
export class UserRoleAssociationDeleteCommand extends Command {
|
|
16
|
-
/**
|
|
17
|
-
* Get the method
|
|
18
|
-
*/
|
|
19
|
-
getMethod() {
|
|
20
|
-
return "DELETE";
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Get the base url
|
|
24
|
-
*/
|
|
25
|
-
getBaseUrl() {
|
|
26
|
-
return "https://iam.api.flowcore.io";
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Get the path
|
|
30
|
-
*/
|
|
31
|
-
getPath() {
|
|
32
|
-
return `/api/v1/role-associations/user/${this.input.userId}`;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Parse the response
|
|
36
|
-
*/
|
|
37
|
-
parseResponse(rawResponse) {
|
|
38
|
-
return parseResponseHelper(responseSchema, rawResponse);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Command } from "../../common/command.js";
|
|
2
|
-
import { type Role } from "../../contracts/iam.js";
|
|
3
|
-
/**
|
|
4
|
-
* The input for the user role associations list command
|
|
5
|
-
*/
|
|
6
|
-
export interface UserRoleAssociationListInput {
|
|
7
|
-
/** the user id */
|
|
8
|
-
userId: string;
|
|
9
|
-
/** the tenant id */
|
|
10
|
-
tenantId?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Fetch all user role associations
|
|
14
|
-
*/
|
|
15
|
-
export declare class UserRoleAssociationListCommand extends Command<UserRoleAssociationListInput, Role[]> {
|
|
16
|
-
/**
|
|
17
|
-
* Get the method
|
|
18
|
-
*/
|
|
19
|
-
protected getMethod(): string;
|
|
20
|
-
/**
|
|
21
|
-
* Get the base url
|
|
22
|
-
*/
|
|
23
|
-
protected getBaseUrl(): string;
|
|
24
|
-
/**
|
|
25
|
-
* Get the path
|
|
26
|
-
*/
|
|
27
|
-
protected getPath(): string;
|
|
28
|
-
/**
|
|
29
|
-
* Parse the response
|
|
30
|
-
*/
|
|
31
|
-
protected parseResponse(rawResponse: unknown): Role[];
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=user-role-association.list.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-role-association.list.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/user-role-association.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,wBAAwB,CAAA;AAE9D;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,OAAO,CAAC,4BAA4B,EAAE,IAAI,EAAE,CAAC;IAC/F;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAMpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,EAAE;CAO/D"}
|