@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
|
@@ -8,18 +8,10 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
8
8
|
* Create an event type
|
|
9
9
|
*/
|
|
10
10
|
class EventTypeCreateCommand extends command_js_1.Command {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
Object.defineProperty(this, "retryOnFailure", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: false
|
|
21
|
-
});
|
|
22
|
-
}
|
|
11
|
+
/**
|
|
12
|
+
* Whether the command should retry on failure
|
|
13
|
+
*/
|
|
14
|
+
retryOnFailure = false;
|
|
23
15
|
/**
|
|
24
16
|
* Get the method
|
|
25
17
|
*/
|
|
@@ -10,18 +10,10 @@ const event_type_exists_js_1 = require("./event-type.exists.js");
|
|
|
10
10
|
* Request to delete an event type
|
|
11
11
|
*/
|
|
12
12
|
class EventTypeRequestDeleteCommand extends command_js_1.Command {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: "delete-manager"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
13
|
+
/**
|
|
14
|
+
* The dedicated subdomain for the command
|
|
15
|
+
*/
|
|
16
|
+
dedicatedSubdomain = "delete-manager";
|
|
25
17
|
/**
|
|
26
18
|
* Get the method
|
|
27
19
|
*/
|
|
@@ -10,18 +10,10 @@ const event_type_fetch_js_1 = require("./event-type.fetch.js");
|
|
|
10
10
|
* Request to truncate an event type
|
|
11
11
|
*/
|
|
12
12
|
class EventTypeRequestTruncateCommand extends command_js_1.Command {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: "delete-manager"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
13
|
+
/**
|
|
14
|
+
* The dedicated subdomain for the command
|
|
15
|
+
*/
|
|
16
|
+
dedicatedSubdomain = "delete-manager";
|
|
25
17
|
/**
|
|
26
18
|
* Get the method
|
|
27
19
|
*/
|
|
@@ -16,18 +16,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
16
16
|
* Fetch time buckets for an event type
|
|
17
17
|
*/
|
|
18
18
|
class EventListCommand extends command_js_1.Command {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*/
|
|
24
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value: "event-source"
|
|
29
|
-
});
|
|
30
|
-
}
|
|
19
|
+
/**
|
|
20
|
+
* The dedicated subdomain for the command
|
|
21
|
+
*/
|
|
22
|
+
dedicatedSubdomain = "event-source";
|
|
31
23
|
/**
|
|
32
24
|
* Get the method for the request
|
|
33
25
|
*/
|
|
@@ -15,18 +15,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
15
15
|
* Fetch time buckets for an event type
|
|
16
16
|
*/
|
|
17
17
|
class EventsFetchTimeBucketsByNamesCommand extends command_js_1.Command {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true,
|
|
26
|
-
writable: true,
|
|
27
|
-
value: "event-source"
|
|
28
|
-
});
|
|
29
|
-
}
|
|
18
|
+
/**
|
|
19
|
+
* The dedicated subdomain for the command
|
|
20
|
+
*/
|
|
21
|
+
dedicatedSubdomain = "event-source";
|
|
30
22
|
/**
|
|
31
23
|
* Get the base url for the request
|
|
32
24
|
*/
|
|
@@ -16,18 +16,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
16
16
|
* Fetch time buckets for an event type
|
|
17
17
|
*/
|
|
18
18
|
class EventsFetchCommand extends command_js_1.Command {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*/
|
|
24
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value: "event-source"
|
|
29
|
-
});
|
|
30
|
-
}
|
|
19
|
+
/**
|
|
20
|
+
* The dedicated subdomain for the command
|
|
21
|
+
*/
|
|
22
|
+
dedicatedSubdomain = "event-source";
|
|
31
23
|
/**
|
|
32
24
|
* Get the base url for the request
|
|
33
25
|
*/
|
|
@@ -15,18 +15,10 @@ const responseSchema = typebox_1.Type.Object({
|
|
|
15
15
|
* Fetch time buckets for an event type
|
|
16
16
|
*/
|
|
17
17
|
class TimeBucketListCommand extends command_js_1.Command {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true,
|
|
26
|
-
writable: true,
|
|
27
|
-
value: "event-source"
|
|
28
|
-
});
|
|
29
|
-
}
|
|
18
|
+
/**
|
|
19
|
+
* The dedicated subdomain for the command
|
|
20
|
+
*/
|
|
21
|
+
dedicatedSubdomain = "event-source";
|
|
30
22
|
/**
|
|
31
23
|
* Get the method for the request
|
|
32
24
|
*/
|
|
@@ -8,18 +8,10 @@ const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js
|
|
|
8
8
|
* Create a flow type
|
|
9
9
|
*/
|
|
10
10
|
class FlowTypeCreateCommand extends command_js_1.Command {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
Object.defineProperty(this, "retryOnFailure", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: false
|
|
21
|
-
});
|
|
22
|
-
}
|
|
11
|
+
/**
|
|
12
|
+
* Whether the command should retry on failure
|
|
13
|
+
*/
|
|
14
|
+
retryOnFailure = false;
|
|
23
15
|
/**
|
|
24
16
|
* Get the method
|
|
25
17
|
*/
|
|
@@ -10,18 +10,10 @@ const flow_type_exists_js_1 = require("./flow-type.exists.js");
|
|
|
10
10
|
* Request to delete a flow type
|
|
11
11
|
*/
|
|
12
12
|
class FlowTypeRequestDeleteCommand extends command_js_1.Command {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
Object.defineProperty(this, "dedicatedSubdomain", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: "delete-manager"
|
|
23
|
-
});
|
|
24
|
-
}
|
|
13
|
+
/**
|
|
14
|
+
* The dedicated subdomain for the command
|
|
15
|
+
*/
|
|
16
|
+
dedicatedSubdomain = "delete-manager";
|
|
25
17
|
/**
|
|
26
18
|
* Get the method
|
|
27
19
|
*/
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Command } from "@flowcore/sdk";
|
|
2
|
+
import { type Static, type TArray, type TObject, type TString } from "@sinclair/typebox";
|
|
3
|
+
/**
|
|
4
|
+
* The schema for a permission
|
|
5
|
+
*/
|
|
6
|
+
export declare const UserPermissionSchema: TObject<{
|
|
7
|
+
tenant: TString;
|
|
8
|
+
type: TString;
|
|
9
|
+
id: TString;
|
|
10
|
+
action: TArray<TString>;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* The permission type
|
|
14
|
+
*/
|
|
15
|
+
export type UserPermission = Static<typeof UserPermissionSchema>;
|
|
16
|
+
/**
|
|
17
|
+
* The input for the user permissions command
|
|
18
|
+
*/
|
|
19
|
+
export interface UserPermissionsInput {
|
|
20
|
+
/** The optional permission type */
|
|
21
|
+
type?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get all permissions for the current user
|
|
25
|
+
*/
|
|
26
|
+
export declare class UserPermissionsCommand extends Command<UserPermissionsInput, UserPermission[]> {
|
|
27
|
+
/**
|
|
28
|
+
* Whether the command should retry on failure
|
|
29
|
+
*/
|
|
30
|
+
protected retryOnFailure: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Get the method
|
|
33
|
+
*/
|
|
34
|
+
protected getMethod(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Get the base url
|
|
37
|
+
*/
|
|
38
|
+
protected getBaseUrl(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Get the path
|
|
41
|
+
*/
|
|
42
|
+
protected getPath(): string;
|
|
43
|
+
/**
|
|
44
|
+
* Parse the response
|
|
45
|
+
*/
|
|
46
|
+
protected parseResponse(rawResponse: unknown): UserPermission[];
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=get-user-permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-user-permissions.d.ts","sourceRoot":"","sources":["../../../../src/commands/iam/permissions/get-user-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAuB,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AAE9F;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,OAAO,CAAC;IACzC,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;IACb,EAAE,EAAE,OAAO,CAAA;IACX,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;CACxB,CAKC,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEhE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,OAAO,CACjD,oBAAoB,EACpB,cAAc,EAAE,CACjB;IACC;;OAEG;IACH,UAAmB,cAAc,UAAO;IAExC;;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,cAAc,EAAE;CAGzE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserPermissionsCommand = exports.UserPermissionSchema = void 0;
|
|
4
|
+
const sdk_1 = require("@flowcore/sdk");
|
|
5
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
6
|
+
/**
|
|
7
|
+
* The schema for a permission
|
|
8
|
+
*/
|
|
9
|
+
exports.UserPermissionSchema = typebox_1.Type.Object({
|
|
10
|
+
tenant: typebox_1.Type.String(),
|
|
11
|
+
type: typebox_1.Type.String(),
|
|
12
|
+
id: typebox_1.Type.String(),
|
|
13
|
+
action: typebox_1.Type.Array(typebox_1.Type.String()),
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* Get all permissions for the current user
|
|
17
|
+
*/
|
|
18
|
+
class UserPermissionsCommand extends sdk_1.Command {
|
|
19
|
+
/**
|
|
20
|
+
* Whether the command should retry on failure
|
|
21
|
+
*/
|
|
22
|
+
retryOnFailure = true;
|
|
23
|
+
/**
|
|
24
|
+
* Get the method
|
|
25
|
+
*/
|
|
26
|
+
getMethod() {
|
|
27
|
+
return "GET";
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get the base url
|
|
31
|
+
*/
|
|
32
|
+
getBaseUrl() {
|
|
33
|
+
return "https://iam.api.flowcore.io";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get the path
|
|
37
|
+
*/
|
|
38
|
+
getPath() {
|
|
39
|
+
return "/api/v1/permissions/";
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Parse the response
|
|
43
|
+
*/
|
|
44
|
+
parseResponse(rawResponse) {
|
|
45
|
+
return (0, sdk_1.parseResponseHelper)(typebox_1.Type.Array(exports.UserPermissionSchema), rawResponse);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.UserPermissionsCommand = UserPermissionsCommand;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Command } from "@flowcore/sdk";
|
|
2
|
+
import { type Static, type TArray, type TBoolean, type TObject, type TOptional, type TString, type TUnion } from "@sinclair/typebox";
|
|
3
|
+
/**
|
|
4
|
+
* The schema for a policy statement document
|
|
5
|
+
*/
|
|
6
|
+
export declare const PolicyStatementSchema: TObject<{
|
|
7
|
+
statementId: TOptional<TString>;
|
|
8
|
+
resource: TString;
|
|
9
|
+
action: TUnion<[TString, TArray<TString>]>;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* The schema for a policy
|
|
13
|
+
*/
|
|
14
|
+
export declare const PolicySchema: TObject<{
|
|
15
|
+
id: TString;
|
|
16
|
+
organizationId: TString;
|
|
17
|
+
name: TString;
|
|
18
|
+
version: TString;
|
|
19
|
+
policyDocuments: TArray<typeof PolicyStatementSchema>;
|
|
20
|
+
description: TOptional<TString>;
|
|
21
|
+
principal: TOptional<TString>;
|
|
22
|
+
flowcoreManaged: TBoolean;
|
|
23
|
+
archived: TOptional<TBoolean>;
|
|
24
|
+
frn: TString;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* The Policy type
|
|
28
|
+
*/
|
|
29
|
+
export type Policy = Static<typeof PolicySchema>;
|
|
30
|
+
/**
|
|
31
|
+
* The Policy Statement type
|
|
32
|
+
*/
|
|
33
|
+
export type PolicyStatement = Static<typeof PolicyStatementSchema>;
|
|
34
|
+
/**
|
|
35
|
+
* The input for the policy create command
|
|
36
|
+
*/
|
|
37
|
+
export interface PolicyCreateInput {
|
|
38
|
+
/** The organization id */
|
|
39
|
+
organizationId: string;
|
|
40
|
+
/** The name of the policy */
|
|
41
|
+
name: string;
|
|
42
|
+
/** The version of the policy */
|
|
43
|
+
version: string;
|
|
44
|
+
/** The policy documents */
|
|
45
|
+
policyDocuments: Array<{
|
|
46
|
+
/** The optional statement id */
|
|
47
|
+
statementId?: string;
|
|
48
|
+
/** The resource for this statement */
|
|
49
|
+
resource: string;
|
|
50
|
+
/** The actions for this statement */
|
|
51
|
+
action: string | string[];
|
|
52
|
+
}>;
|
|
53
|
+
/** The description of the policy */
|
|
54
|
+
description?: string;
|
|
55
|
+
/** The principal role that can access the resource */
|
|
56
|
+
principal?: string;
|
|
57
|
+
/** Whether the policy is managed by Flowcore */
|
|
58
|
+
flowcoreManaged?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Create a policy
|
|
62
|
+
*/
|
|
63
|
+
export declare class PolicyCreateCommand extends Command<PolicyCreateInput, Policy> {
|
|
64
|
+
/**
|
|
65
|
+
* Whether the command should retry on failure
|
|
66
|
+
*/
|
|
67
|
+
protected retryOnFailure: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Get the method
|
|
70
|
+
*/
|
|
71
|
+
protected getMethod(): string;
|
|
72
|
+
/**
|
|
73
|
+
* Get the base url
|
|
74
|
+
*/
|
|
75
|
+
protected getBaseUrl(): string;
|
|
76
|
+
/**
|
|
77
|
+
* Get the path
|
|
78
|
+
*/
|
|
79
|
+
protected getPath(): string;
|
|
80
|
+
/**
|
|
81
|
+
* Get the body
|
|
82
|
+
*/
|
|
83
|
+
protected getBody(): Record<string, unknown>;
|
|
84
|
+
/**
|
|
85
|
+
* Parse the response
|
|
86
|
+
*/
|
|
87
|
+
protected parseResponse(rawResponse: unknown): Policy;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=create-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-policy.d.ts","sourceRoot":"","sources":["../../../../src/commands/iam/policies/create-policy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAuB,MAAM,eAAe,CAAA;AAC5D,OAAO,EACL,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,MAAM,EAEZ,MAAM,mBAAmB,CAAA;AAE1B;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC;IAC1C,WAAW,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC/B,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,MAAM,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;CAC3C,CAIC,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC;IACjC,EAAE,EAAE,OAAO,CAAA;IACX,cAAc,EAAE,OAAO,CAAA;IACvB,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,eAAe,EAAE,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;IACrD,WAAW,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC/B,SAAS,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC7B,eAAe,EAAE,QAAQ,CAAA;IACzB,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAA;IAC7B,GAAG,EAAE,OAAO,CAAA;CACb,CAWC,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,YAAY,CAAC,CAAA;AAEhD;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAElE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,0BAA0B;IAC1B,cAAc,EAAE,MAAM,CAAA;IACtB,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,2BAA2B;IAC3B,eAAe,EAAE,KAAK,CAAC;QACrB,gCAAgC;QAChC,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,sCAAsC;QACtC,QAAQ,EAAE,MAAM,CAAA;QAChB,qCAAqC;QACrC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAC1B,CAAC,CAAA;IACF,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gDAAgD;IAChD,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,OAAO,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACzE;;OAEG;IACH,UAAmB,cAAc,UAAQ;IAEzC;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOrD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM;CAG/D"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PolicyCreateCommand = exports.PolicySchema = exports.PolicyStatementSchema = void 0;
|
|
4
|
+
// src/contracts/policy.ts
|
|
5
|
+
const sdk_1 = require("@flowcore/sdk");
|
|
6
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
7
|
+
/**
|
|
8
|
+
* The schema for a policy statement document
|
|
9
|
+
*/
|
|
10
|
+
exports.PolicyStatementSchema = typebox_1.Type.Object({
|
|
11
|
+
statementId: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
12
|
+
resource: typebox_1.Type.String(),
|
|
13
|
+
action: typebox_1.Type.Union([typebox_1.Type.String(), typebox_1.Type.Array(typebox_1.Type.String())]),
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* The schema for a policy
|
|
17
|
+
*/
|
|
18
|
+
exports.PolicySchema = typebox_1.Type.Object({
|
|
19
|
+
id: typebox_1.Type.String(),
|
|
20
|
+
organizationId: typebox_1.Type.String(),
|
|
21
|
+
name: typebox_1.Type.String(),
|
|
22
|
+
version: typebox_1.Type.String(),
|
|
23
|
+
policyDocuments: typebox_1.Type.Array(exports.PolicyStatementSchema),
|
|
24
|
+
description: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
25
|
+
principal: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
26
|
+
flowcoreManaged: typebox_1.Type.Boolean(),
|
|
27
|
+
archived: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
|
28
|
+
frn: typebox_1.Type.String(),
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Create a policy
|
|
32
|
+
*/
|
|
33
|
+
class PolicyCreateCommand extends sdk_1.Command {
|
|
34
|
+
/**
|
|
35
|
+
* Whether the command should retry on failure
|
|
36
|
+
*/
|
|
37
|
+
retryOnFailure = false;
|
|
38
|
+
/**
|
|
39
|
+
* Get the method
|
|
40
|
+
*/
|
|
41
|
+
getMethod() {
|
|
42
|
+
return "POST";
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get the base url
|
|
46
|
+
*/
|
|
47
|
+
getBaseUrl() {
|
|
48
|
+
return "https://iam.api.flowcore.io";
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get the path
|
|
52
|
+
*/
|
|
53
|
+
getPath() {
|
|
54
|
+
return "/api/v1/policies/";
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get the body
|
|
58
|
+
*/
|
|
59
|
+
getBody() {
|
|
60
|
+
return {
|
|
61
|
+
...this.input,
|
|
62
|
+
flowcoreManaged: this.input.flowcoreManaged ?? false,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Parse the response
|
|
67
|
+
*/
|
|
68
|
+
parseResponse(rawResponse) {
|
|
69
|
+
return (0, sdk_1.parseResponseHelper)(exports.PolicySchema, rawResponse);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.PolicyCreateCommand = PolicyCreateCommand;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Command } from "@flowcore/sdk";
|
|
2
|
+
import { type Policy } from "./create-policy.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the policy list command
|
|
5
|
+
*/
|
|
6
|
+
export interface PolicyListInput {
|
|
7
|
+
/** The organization id */
|
|
8
|
+
organizationId?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* List policies
|
|
12
|
+
*/
|
|
13
|
+
export declare class PolicyListCommand extends Command<PolicyListInput, Policy[]> {
|
|
14
|
+
/**
|
|
15
|
+
* Whether the command should retry on failure
|
|
16
|
+
*/
|
|
17
|
+
protected retryOnFailure: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Get the method
|
|
20
|
+
*/
|
|
21
|
+
protected getMethod(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Get the base url
|
|
24
|
+
*/
|
|
25
|
+
protected getBaseUrl(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Get the path
|
|
28
|
+
*/
|
|
29
|
+
protected getPath(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Parse the response
|
|
32
|
+
*/
|
|
33
|
+
protected parseResponse(rawResponse: unknown): Policy[];
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=get-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-policy.d.ts","sourceRoot":"","sources":["../../../../src/commands/iam/policies/get-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAuB,MAAM,eAAe,CAAA;AAE5D,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,oBAAoB,CAAA;AAE9D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,OAAO,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IACvE;;OAEG;IACH,UAAmB,cAAc,UAAO;IAExC;;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,EAAE;CAGjE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PolicyListCommand = void 0;
|
|
4
|
+
const sdk_1 = require("@flowcore/sdk");
|
|
5
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
6
|
+
const create_policy_js_1 = require("./create-policy.js"); // Reuse the Policy type definition
|
|
7
|
+
/**
|
|
8
|
+
* List policies
|
|
9
|
+
*/
|
|
10
|
+
class PolicyListCommand extends sdk_1.Command {
|
|
11
|
+
/**
|
|
12
|
+
* Whether the command should retry on failure
|
|
13
|
+
*/
|
|
14
|
+
retryOnFailure = true;
|
|
15
|
+
/**
|
|
16
|
+
* Get the method
|
|
17
|
+
*/
|
|
18
|
+
getMethod() {
|
|
19
|
+
return "GET";
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get the base url
|
|
23
|
+
*/
|
|
24
|
+
getBaseUrl() {
|
|
25
|
+
return "https://iam.api.flowcore.io";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get the path
|
|
29
|
+
*/
|
|
30
|
+
getPath() {
|
|
31
|
+
return "/api/v1/policies/";
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Parse the response
|
|
35
|
+
*/
|
|
36
|
+
parseResponse(rawResponse) {
|
|
37
|
+
return (0, sdk_1.parseResponseHelper)(typebox_1.Type.Array(create_policy_js_1.PolicySchema), rawResponse);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.PolicyListCommand = PolicyListCommand;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Command } from "@flowcore/sdk";
|
|
2
|
+
import { type Static, type TObject, type TString } from "@sinclair/typebox";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the policy archive command
|
|
5
|
+
*/
|
|
6
|
+
export interface PolicyArchiveInput {
|
|
7
|
+
/** The policy id */
|
|
8
|
+
policyId: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The schema for the archive policy response
|
|
12
|
+
*/
|
|
13
|
+
export declare const ArchivePolicyResponseSchema: TObject<{
|
|
14
|
+
message: TString;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* The archive policy response type
|
|
18
|
+
*/
|
|
19
|
+
export type ArchivePolicyResponse = Static<typeof ArchivePolicyResponseSchema>;
|
|
20
|
+
/**
|
|
21
|
+
* Archive a policy by ID
|
|
22
|
+
*/
|
|
23
|
+
export declare class PolicyArchiveCommand extends Command<PolicyArchiveInput, ArchivePolicyResponse> {
|
|
24
|
+
/**
|
|
25
|
+
* Whether the command should retry on failure
|
|
26
|
+
*/
|
|
27
|
+
protected retryOnFailure: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Get the method
|
|
30
|
+
*/
|
|
31
|
+
protected getMethod(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get the base url
|
|
34
|
+
*/
|
|
35
|
+
protected getBaseUrl(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Get the path
|
|
38
|
+
*/
|
|
39
|
+
protected getPath(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Parse the response
|
|
42
|
+
*/
|
|
43
|
+
protected parseResponse(rawResponse: unknown): ArchivePolicyResponse;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=archive-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archive-policy.d.ts","sourceRoot":"","sources":["../../../../../src/commands/iam/policies/id/archive-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAuB,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AAEjF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,OAAO,CAAC;IAChD,OAAO,EAAE,OAAO,CAAA;CACjB,CAEC,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAE9E;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,OAAO,CAC/C,kBAAkB,EAClB,qBAAqB,CACtB;IACC;;OAEG;IACH,UAAmB,cAAc,UAAQ;IAEzC;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAC9B,WAAW,EAAE,OAAO,GACnB,qBAAqB;CAGzB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PolicyArchiveCommand = exports.ArchivePolicyResponseSchema = void 0;
|
|
4
|
+
const sdk_1 = require("@flowcore/sdk");
|
|
5
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
6
|
+
/**
|
|
7
|
+
* The schema for the archive policy response
|
|
8
|
+
*/
|
|
9
|
+
exports.ArchivePolicyResponseSchema = typebox_1.Type.Object({
|
|
10
|
+
message: typebox_1.Type.String(),
|
|
11
|
+
});
|
|
12
|
+
/**
|
|
13
|
+
* Archive a policy by ID
|
|
14
|
+
*/
|
|
15
|
+
class PolicyArchiveCommand extends sdk_1.Command {
|
|
16
|
+
/**
|
|
17
|
+
* Whether the command should retry on failure
|
|
18
|
+
*/
|
|
19
|
+
retryOnFailure = false;
|
|
20
|
+
/**
|
|
21
|
+
* Get the method
|
|
22
|
+
*/
|
|
23
|
+
getMethod() {
|
|
24
|
+
return "DELETE";
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get the base url
|
|
28
|
+
*/
|
|
29
|
+
getBaseUrl() {
|
|
30
|
+
return "https://iam.api.flowcore.io";
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get the path
|
|
34
|
+
*/
|
|
35
|
+
getPath() {
|
|
36
|
+
return `/api/v1/policies/${this.input.policyId}`;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Parse the response
|
|
40
|
+
*/
|
|
41
|
+
parseResponse(rawResponse) {
|
|
42
|
+
return (0, sdk_1.parseResponseHelper)(exports.ArchivePolicyResponseSchema, rawResponse);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.PolicyArchiveCommand = PolicyArchiveCommand;
|