@decaf-ts/integrations 0.11.0 → 0.12.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/README.md +164 -0
- package/dist/integrations.cjs +1 -1
- package/dist/integrations.cjs.map +1 -1
- package/dist/integrations.js +1 -1
- package/dist/integrations.js.map +1 -1
- package/docker/mailpit-compose.yml +17 -0
- package/docker/postgres-compose.yml +26 -0
- package/lib/cjs/blob/azure/AzureBlobStoreService.cjs +12 -23
- package/lib/cjs/blob/azure/AzureBlobStoreService.cjs.map +1 -1
- package/lib/cjs/blob/core/BlobStoreService.cjs +26 -25
- package/lib/cjs/blob/core/BlobStoreService.cjs.map +1 -1
- package/lib/cjs/blob/gcp/GcsBlobStoreService.cjs +12 -23
- package/lib/cjs/blob/gcp/GcsBlobStoreService.cjs.map +1 -1
- package/lib/cjs/blob/s3/S3BlobStoreService.cjs +11 -16
- package/lib/cjs/blob/s3/S3BlobStoreService.cjs.map +1 -1
- package/lib/cjs/blob/s3/S3CompatibleBlobStoreService.cjs +14 -16
- package/lib/cjs/blob/s3/S3CompatibleBlobStoreService.cjs.map +1 -1
- package/lib/cjs/comms/email/EmailService.cjs +376 -0
- package/lib/cjs/comms/email/EmailService.cjs.map +1 -0
- package/lib/cjs/comms/email/index.cjs +29 -0
- package/lib/cjs/comms/email/index.cjs.map +1 -0
- package/lib/cjs/comms/email/mime.cjs +225 -0
- package/lib/cjs/comms/email/mime.cjs.map +1 -0
- package/lib/cjs/comms/email/smtp.cjs +204 -0
- package/lib/cjs/comms/email/smtp.cjs.map +1 -0
- package/lib/cjs/comms/environment.cjs +63 -0
- package/lib/cjs/comms/environment.cjs.map +1 -0
- package/lib/cjs/comms/gmail/GmailService.cjs +235 -0
- package/lib/cjs/comms/gmail/GmailService.cjs.map +1 -0
- package/lib/cjs/comms/gmail/index.cjs +24 -0
- package/lib/cjs/comms/gmail/index.cjs.map +1 -0
- package/lib/cjs/comms/index.cjs +31 -0
- package/lib/cjs/comms/index.cjs.map +1 -0
- package/lib/cjs/comms/slack/SlackService.cjs +264 -0
- package/lib/cjs/comms/slack/SlackService.cjs.map +1 -0
- package/lib/cjs/comms/slack/index.cjs +24 -0
- package/lib/cjs/comms/slack/index.cjs.map +1 -0
- package/lib/cjs/comms/teams/TeamsService.cjs +212 -0
- package/lib/cjs/comms/teams/TeamsService.cjs.map +1 -0
- package/lib/cjs/comms/teams/index.cjs +24 -0
- package/lib/cjs/comms/teams/index.cjs.map +1 -0
- package/lib/cjs/comms/telegram/TelegramService.cjs +196 -0
- package/lib/cjs/comms/telegram/TelegramService.cjs.map +1 -0
- package/lib/cjs/comms/telegram/index.cjs +24 -0
- package/lib/cjs/comms/telegram/index.cjs.map +1 -0
- package/lib/cjs/devops/environment.cjs +43 -0
- package/lib/cjs/devops/environment.cjs.map +1 -0
- package/lib/cjs/devops/github/GithubService.cjs +302 -0
- package/lib/cjs/devops/github/GithubService.cjs.map +1 -0
- package/lib/cjs/devops/github/index.cjs +24 -0
- package/lib/cjs/devops/github/index.cjs.map +1 -0
- package/lib/cjs/devops/gitlab/GitlabService.cjs +282 -0
- package/lib/cjs/devops/gitlab/GitlabService.cjs.map +1 -0
- package/lib/cjs/devops/gitlab/index.cjs +24 -0
- package/lib/cjs/devops/gitlab/index.cjs.map +1 -0
- package/lib/cjs/devops/index.cjs +28 -0
- package/lib/cjs/devops/index.cjs.map +1 -0
- package/lib/cjs/feature-flags/models/FeatureFlag.model.cjs +2 -0
- package/lib/cjs/feature-flags/models/FeatureFlag.model.cjs.map +1 -1
- package/lib/cjs/feature-flags/models/FeatureFlagAccess.model.cjs +2 -0
- package/lib/cjs/feature-flags/models/FeatureFlagAccess.model.cjs.map +1 -1
- package/lib/cjs/index.cjs +3 -3
- package/lib/cjs/io/airtable/AirtableService.cjs +266 -0
- package/lib/cjs/io/airtable/AirtableService.cjs.map +1 -0
- package/lib/cjs/io/airtable/index.cjs +24 -0
- package/lib/cjs/io/airtable/index.cjs.map +1 -0
- package/lib/cjs/io/environment.cjs +46 -0
- package/lib/cjs/io/environment.cjs.map +1 -0
- package/lib/cjs/io/google-sheets/GoogleSheetsService.cjs +288 -0
- package/lib/cjs/io/google-sheets/GoogleSheetsService.cjs.map +1 -0
- package/lib/cjs/io/google-sheets/index.cjs +24 -0
- package/lib/cjs/io/google-sheets/index.cjs.map +1 -0
- package/lib/cjs/io/graphql/GraphqlService.cjs +143 -0
- package/lib/cjs/io/graphql/GraphqlService.cjs.map +1 -0
- package/lib/cjs/io/graphql/index.cjs +24 -0
- package/lib/cjs/io/graphql/index.cjs.map +1 -0
- package/lib/cjs/io/index.cjs +30 -0
- package/lib/cjs/io/index.cjs.map +1 -0
- package/lib/cjs/io/spreadsheet/SpreadsheetService.cjs +205 -0
- package/lib/cjs/io/spreadsheet/SpreadsheetService.cjs.map +1 -0
- package/lib/cjs/io/spreadsheet/index.cjs +25 -0
- package/lib/cjs/io/spreadsheet/index.cjs.map +1 -0
- package/lib/cjs/namespaces/index.cjs +1 -0
- package/lib/cjs/namespaces/index.cjs.map +1 -1
- package/lib/cjs/namespaces/models/credential.model.cjs +115 -0
- package/lib/cjs/namespaces/models/credential.model.cjs.map +1 -0
- package/lib/cjs/namespaces/models/effective-permission.model.cjs +2 -0
- package/lib/cjs/namespaces/models/effective-permission.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/group-membership.model.cjs +2 -0
- package/lib/cjs/namespaces/models/group-membership.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/group.model.cjs +2 -0
- package/lib/cjs/namespaces/models/group.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/index.cjs +1 -0
- package/lib/cjs/namespaces/models/index.cjs.map +1 -1
- package/lib/cjs/namespaces/models/inheritance-block.model.cjs +2 -0
- package/lib/cjs/namespaces/models/inheritance-block.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/org-unit-closure.model.cjs +2 -0
- package/lib/cjs/namespaces/models/org-unit-closure.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/org-unit-membership.model.cjs +2 -0
- package/lib/cjs/namespaces/models/org-unit-membership.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/org-unit-profile.model.cjs +2 -0
- package/lib/cjs/namespaces/models/org-unit-profile.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/org-unit.model.cjs +2 -0
- package/lib/cjs/namespaces/models/org-unit.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/permission.model.cjs +2 -0
- package/lib/cjs/namespaces/models/permission.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/principal.model.cjs +2 -0
- package/lib/cjs/namespaces/models/principal.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/protected-resource.model.cjs +2 -0
- package/lib/cjs/namespaces/models/protected-resource.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/resource-grant.model.cjs +2 -0
- package/lib/cjs/namespaces/models/resource-grant.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/role-assignment.model.cjs +2 -0
- package/lib/cjs/namespaces/models/role-assignment.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/role-permission.model.cjs +2 -0
- package/lib/cjs/namespaces/models/role-permission.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/role.model.cjs +2 -0
- package/lib/cjs/namespaces/models/role.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/storage-binding.model.cjs +2 -0
- package/lib/cjs/namespaces/models/storage-binding.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/tenant-membership.model.cjs +2 -0
- package/lib/cjs/namespaces/models/tenant-membership.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/tenant-profile.model.cjs +2 -0
- package/lib/cjs/namespaces/models/tenant-profile.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/tenant.model.cjs +2 -0
- package/lib/cjs/namespaces/models/tenant.model.cjs.map +1 -1
- package/lib/cjs/namespaces/models/user.model.cjs +2 -0
- package/lib/cjs/namespaces/models/user.model.cjs.map +1 -1
- package/lib/cjs/namespaces/rls/index.cjs +28 -0
- package/lib/cjs/namespaces/rls/index.cjs.map +1 -0
- package/lib/cjs/namespaces/rls/principal-resolver.cjs +66 -0
- package/lib/cjs/namespaces/rls/principal-resolver.cjs.map +1 -0
- package/lib/cjs/namespaces/rls/rls-bootstrap.service.cjs +269 -0
- package/lib/cjs/namespaces/rls/rls-bootstrap.service.cjs.map +1 -0
- package/lib/cjs/namespaces/rls/rls.constants.cjs +79 -0
- package/lib/cjs/namespaces/rls/rls.constants.cjs.map +1 -0
- package/lib/cjs/namespaces/rls/rls.template.cjs +719 -0
- package/lib/cjs/namespaces/rls/rls.template.cjs.map +1 -0
- package/lib/cjs/namespaces/rls/rls.types.cjs +4 -0
- package/lib/cjs/namespaces/rls/rls.types.cjs.map +1 -0
- package/lib/cjs/namespaces/rls/session-binding.cjs +70 -0
- package/lib/cjs/namespaces/rls/session-binding.cjs.map +1 -0
- package/lib/cjs/namespaces/services/credential.service.cjs +327 -0
- package/lib/cjs/namespaces/services/credential.service.cjs.map +1 -0
- package/lib/cjs/namespaces/services/index.cjs +1 -0
- package/lib/cjs/namespaces/services/index.cjs.map +1 -1
- package/lib/cjs/namespaces/types.cjs +6 -1
- package/lib/cjs/namespaces/types.cjs.map +1 -1
- package/lib/cjs/redis/adapter.cjs +7 -1
- package/lib/cjs/redis/adapter.cjs.map +1 -1
- package/lib/cjs/secrets/InfraCredentialBootstrap.cjs +80 -0
- package/lib/cjs/secrets/InfraCredentialBootstrap.cjs.map +1 -0
- package/lib/cjs/secrets/aws/AwsSecretService.cjs +2 -15
- package/lib/cjs/secrets/aws/AwsSecretService.cjs.map +1 -1
- package/lib/cjs/secrets/azure/AzureKeyVaultSecretService.cjs +2 -16
- package/lib/cjs/secrets/azure/AzureKeyVaultSecretService.cjs.map +1 -1
- package/lib/cjs/secrets/core/SecretReference.cjs +1 -0
- package/lib/cjs/secrets/core/SecretReference.cjs.map +1 -1
- package/lib/cjs/secrets/fs/FsSecretEnvironment.cjs +28 -0
- package/lib/cjs/secrets/fs/FsSecretEnvironment.cjs.map +1 -0
- package/lib/cjs/secrets/fs/FsSecretService.cjs +420 -0
- package/lib/cjs/secrets/fs/FsSecretService.cjs.map +1 -0
- package/lib/cjs/secrets/fs/FsSecretServiceConfig.cjs +25 -0
- package/lib/cjs/secrets/fs/FsSecretServiceConfig.cjs.map +1 -0
- package/lib/cjs/secrets/fs/index.cjs +27 -0
- package/lib/cjs/secrets/fs/index.cjs.map +1 -0
- package/lib/cjs/secrets/gcp/GcpSecretManagerService.cjs +2 -16
- package/lib/cjs/secrets/gcp/GcpSecretManagerService.cjs.map +1 -1
- package/lib/cjs/secrets/index.cjs +2 -0
- package/lib/cjs/secrets/index.cjs.map +1 -1
- package/lib/cjs/secrets/model/ModelSecretService.cjs +335 -43
- package/lib/cjs/secrets/model/ModelSecretService.cjs.map +1 -1
- package/lib/cjs/secrets/model/Secret.cjs +83 -5
- package/lib/cjs/secrets/model/Secret.cjs.map +1 -1
- package/lib/cjs/secrets/onepassword/OnePasswordSecretService.cjs +2 -16
- package/lib/cjs/secrets/onepassword/OnePasswordSecretService.cjs.map +1 -1
- package/lib/cjs/secrets/vault/VaultSecretService.cjs +2 -16
- package/lib/cjs/secrets/vault/VaultSecretService.cjs.map +1 -1
- package/lib/cjs/shared/environmentValue.cjs +24 -0
- package/lib/cjs/shared/environmentValue.cjs.map +1 -1
- package/lib/cjs/shared/http/HttpApiService.cjs +190 -0
- package/lib/cjs/shared/http/HttpApiService.cjs.map +1 -0
- package/lib/cjs/shared/http/hermeticBoot.cjs +150 -0
- package/lib/cjs/shared/http/hermeticBoot.cjs.map +1 -0
- package/lib/cjs/shared/http/index.cjs +28 -0
- package/lib/cjs/shared/http/index.cjs.map +1 -0
- package/lib/esm/blob/azure/AzureBlobStoreService.js +13 -21
- package/lib/esm/blob/azure/AzureBlobStoreService.js.map +1 -1
- package/lib/esm/blob/core/BlobStoreService.js +26 -25
- package/lib/esm/blob/core/BlobStoreService.js.map +1 -1
- package/lib/esm/blob/gcp/GcsBlobStoreService.js +13 -21
- package/lib/esm/blob/gcp/GcsBlobStoreService.js.map +1 -1
- package/lib/esm/blob/s3/S3BlobStoreService.js +12 -14
- package/lib/esm/blob/s3/S3BlobStoreService.js.map +1 -1
- package/lib/esm/blob/s3/S3CompatibleBlobStoreService.js +14 -16
- package/lib/esm/blob/s3/S3CompatibleBlobStoreService.js.map +1 -1
- package/lib/esm/comms/email/EmailService.js +338 -0
- package/lib/esm/comms/email/EmailService.js.map +1 -0
- package/lib/esm/comms/email/index.js +12 -0
- package/lib/esm/comms/email/index.js.map +1 -0
- package/lib/esm/comms/email/mime.js +218 -0
- package/lib/esm/comms/email/mime.js.map +1 -0
- package/lib/esm/comms/email/smtp.js +166 -0
- package/lib/esm/comms/email/smtp.js.map +1 -0
- package/lib/esm/comms/environment.js +59 -0
- package/lib/esm/comms/environment.js.map +1 -0
- package/lib/esm/comms/gmail/GmailService.js +230 -0
- package/lib/esm/comms/gmail/GmailService.js.map +1 -0
- package/lib/esm/comms/gmail/index.js +7 -0
- package/lib/esm/comms/gmail/index.js.map +1 -0
- package/lib/esm/comms/index.js +14 -0
- package/lib/esm/comms/index.js.map +1 -0
- package/lib/esm/comms/slack/SlackService.js +259 -0
- package/lib/esm/comms/slack/SlackService.js.map +1 -0
- package/lib/esm/comms/slack/index.js +7 -0
- package/lib/esm/comms/slack/index.js.map +1 -0
- package/lib/esm/comms/teams/TeamsService.js +204 -0
- package/lib/esm/comms/teams/TeamsService.js.map +1 -0
- package/lib/esm/comms/teams/index.js +7 -0
- package/lib/esm/comms/teams/index.js.map +1 -0
- package/lib/esm/comms/telegram/TelegramService.js +191 -0
- package/lib/esm/comms/telegram/TelegramService.js.map +1 -0
- package/lib/esm/comms/telegram/index.js +7 -0
- package/lib/esm/comms/telegram/index.js.map +1 -0
- package/lib/esm/devops/environment.js +39 -0
- package/lib/esm/devops/environment.js.map +1 -0
- package/lib/esm/devops/github/GithubService.js +297 -0
- package/lib/esm/devops/github/GithubService.js.map +1 -0
- package/lib/esm/devops/github/index.js +7 -0
- package/lib/esm/devops/github/index.js.map +1 -0
- package/lib/esm/devops/gitlab/GitlabService.js +277 -0
- package/lib/esm/devops/gitlab/GitlabService.js.map +1 -0
- package/lib/esm/devops/gitlab/index.js +7 -0
- package/lib/esm/devops/gitlab/index.js.map +1 -0
- package/lib/esm/devops/index.js +11 -0
- package/lib/esm/devops/index.js.map +1 -0
- package/lib/esm/feature-flags/models/FeatureFlag.model.js +2 -0
- package/lib/esm/feature-flags/models/FeatureFlag.model.js.map +1 -1
- package/lib/esm/feature-flags/models/FeatureFlagAccess.model.js +2 -0
- package/lib/esm/feature-flags/models/FeatureFlagAccess.model.js.map +1 -1
- package/lib/esm/index.js +3 -3
- package/lib/esm/io/airtable/AirtableService.js +261 -0
- package/lib/esm/io/airtable/AirtableService.js.map +1 -0
- package/lib/esm/io/airtable/index.js +7 -0
- package/lib/esm/io/airtable/index.js.map +1 -0
- package/lib/esm/io/environment.js +42 -0
- package/lib/esm/io/environment.js.map +1 -0
- package/lib/esm/io/google-sheets/GoogleSheetsService.js +283 -0
- package/lib/esm/io/google-sheets/GoogleSheetsService.js.map +1 -0
- package/lib/esm/io/google-sheets/index.js +7 -0
- package/lib/esm/io/google-sheets/index.js.map +1 -0
- package/lib/esm/io/graphql/GraphqlService.js +138 -0
- package/lib/esm/io/graphql/GraphqlService.js.map +1 -0
- package/lib/esm/io/graphql/index.js +7 -0
- package/lib/esm/io/graphql/index.js.map +1 -0
- package/lib/esm/io/index.js +13 -0
- package/lib/esm/io/index.js.map +1 -0
- package/lib/esm/io/spreadsheet/SpreadsheetService.js +200 -0
- package/lib/esm/io/spreadsheet/SpreadsheetService.js.map +1 -0
- package/lib/esm/io/spreadsheet/index.js +8 -0
- package/lib/esm/io/spreadsheet/index.js.map +1 -0
- package/lib/esm/namespaces/index.js +1 -0
- package/lib/esm/namespaces/index.js.map +1 -1
- package/lib/esm/namespaces/models/credential.model.js +106 -0
- package/lib/esm/namespaces/models/credential.model.js.map +1 -0
- package/lib/esm/namespaces/models/effective-permission.model.js +2 -0
- package/lib/esm/namespaces/models/effective-permission.model.js.map +1 -1
- package/lib/esm/namespaces/models/group-membership.model.js +2 -0
- package/lib/esm/namespaces/models/group-membership.model.js.map +1 -1
- package/lib/esm/namespaces/models/group.model.js +2 -0
- package/lib/esm/namespaces/models/group.model.js.map +1 -1
- package/lib/esm/namespaces/models/index.js +1 -0
- package/lib/esm/namespaces/models/index.js.map +1 -1
- package/lib/esm/namespaces/models/inheritance-block.model.js +2 -0
- package/lib/esm/namespaces/models/inheritance-block.model.js.map +1 -1
- package/lib/esm/namespaces/models/org-unit-closure.model.js +2 -0
- package/lib/esm/namespaces/models/org-unit-closure.model.js.map +1 -1
- package/lib/esm/namespaces/models/org-unit-membership.model.js +2 -0
- package/lib/esm/namespaces/models/org-unit-membership.model.js.map +1 -1
- package/lib/esm/namespaces/models/org-unit-profile.model.js +2 -0
- package/lib/esm/namespaces/models/org-unit-profile.model.js.map +1 -1
- package/lib/esm/namespaces/models/org-unit.model.js +2 -0
- package/lib/esm/namespaces/models/org-unit.model.js.map +1 -1
- package/lib/esm/namespaces/models/permission.model.js +2 -0
- package/lib/esm/namespaces/models/permission.model.js.map +1 -1
- package/lib/esm/namespaces/models/principal.model.js +2 -0
- package/lib/esm/namespaces/models/principal.model.js.map +1 -1
- package/lib/esm/namespaces/models/protected-resource.model.js +2 -0
- package/lib/esm/namespaces/models/protected-resource.model.js.map +1 -1
- package/lib/esm/namespaces/models/resource-grant.model.js +2 -0
- package/lib/esm/namespaces/models/resource-grant.model.js.map +1 -1
- package/lib/esm/namespaces/models/role-assignment.model.js +2 -0
- package/lib/esm/namespaces/models/role-assignment.model.js.map +1 -1
- package/lib/esm/namespaces/models/role-permission.model.js +2 -0
- package/lib/esm/namespaces/models/role-permission.model.js.map +1 -1
- package/lib/esm/namespaces/models/role.model.js +2 -0
- package/lib/esm/namespaces/models/role.model.js.map +1 -1
- package/lib/esm/namespaces/models/storage-binding.model.js +2 -0
- package/lib/esm/namespaces/models/storage-binding.model.js.map +1 -1
- package/lib/esm/namespaces/models/tenant-membership.model.js +2 -0
- package/lib/esm/namespaces/models/tenant-membership.model.js.map +1 -1
- package/lib/esm/namespaces/models/tenant-profile.model.js +2 -0
- package/lib/esm/namespaces/models/tenant-profile.model.js.map +1 -1
- package/lib/esm/namespaces/models/tenant.model.js +2 -0
- package/lib/esm/namespaces/models/tenant.model.js.map +1 -1
- package/lib/esm/namespaces/models/user.model.js +2 -0
- package/lib/esm/namespaces/models/user.model.js.map +1 -1
- package/lib/esm/namespaces/rls/index.js +11 -0
- package/lib/esm/namespaces/rls/index.js.map +1 -0
- package/lib/esm/namespaces/rls/principal-resolver.js +61 -0
- package/lib/esm/namespaces/rls/principal-resolver.js.map +1 -0
- package/lib/esm/namespaces/rls/rls-bootstrap.service.js +261 -0
- package/lib/esm/namespaces/rls/rls-bootstrap.service.js.map +1 -0
- package/lib/esm/namespaces/rls/rls.constants.js +75 -0
- package/lib/esm/namespaces/rls/rls.constants.js.map +1 -0
- package/lib/esm/namespaces/rls/rls.template.js +711 -0
- package/lib/esm/namespaces/rls/rls.template.js.map +1 -0
- package/lib/esm/namespaces/rls/rls.types.js +9 -0
- package/lib/esm/namespaces/rls/rls.types.js.map +1 -0
- package/lib/esm/namespaces/rls/session-binding.js +65 -0
- package/lib/esm/namespaces/rls/session-binding.js.map +1 -0
- package/lib/esm/namespaces/services/credential.service.js +322 -0
- package/lib/esm/namespaces/services/credential.service.js.map +1 -0
- package/lib/esm/namespaces/services/index.js +1 -0
- package/lib/esm/namespaces/services/index.js.map +1 -1
- package/lib/esm/namespaces/types.js +6 -0
- package/lib/esm/namespaces/types.js.map +1 -1
- package/lib/esm/redis/adapter.js +7 -1
- package/lib/esm/redis/adapter.js.map +1 -1
- package/lib/esm/secrets/InfraCredentialBootstrap.js +74 -0
- package/lib/esm/secrets/InfraCredentialBootstrap.js.map +1 -0
- package/lib/esm/secrets/aws/AwsSecretService.js +3 -13
- package/lib/esm/secrets/aws/AwsSecretService.js.map +1 -1
- package/lib/esm/secrets/azure/AzureKeyVaultSecretService.js +2 -13
- package/lib/esm/secrets/azure/AzureKeyVaultSecretService.js.map +1 -1
- package/lib/esm/secrets/core/SecretReference.js +1 -0
- package/lib/esm/secrets/core/SecretReference.js.map +1 -1
- package/lib/esm/secrets/fs/FsSecretEnvironment.js +24 -0
- package/lib/esm/secrets/fs/FsSecretEnvironment.js.map +1 -0
- package/lib/esm/secrets/fs/FsSecretService.js +412 -0
- package/lib/esm/secrets/fs/FsSecretService.js.map +1 -0
- package/lib/esm/secrets/fs/FsSecretServiceConfig.js +21 -0
- package/lib/esm/secrets/fs/FsSecretServiceConfig.js.map +1 -0
- package/lib/esm/secrets/fs/index.js +10 -0
- package/lib/esm/secrets/fs/index.js.map +1 -0
- package/lib/esm/secrets/gcp/GcpSecretManagerService.js +2 -13
- package/lib/esm/secrets/gcp/GcpSecretManagerService.js.map +1 -1
- package/lib/esm/secrets/index.js +2 -0
- package/lib/esm/secrets/index.js.map +1 -1
- package/lib/esm/secrets/model/ModelSecretService.js +337 -42
- package/lib/esm/secrets/model/ModelSecretService.js.map +1 -1
- package/lib/esm/secrets/model/Secret.js +86 -7
- package/lib/esm/secrets/model/Secret.js.map +1 -1
- package/lib/esm/secrets/onepassword/OnePasswordSecretService.js +2 -13
- package/lib/esm/secrets/onepassword/OnePasswordSecretService.js.map +1 -1
- package/lib/esm/secrets/vault/VaultSecretService.js +2 -13
- package/lib/esm/secrets/vault/VaultSecretService.js.map +1 -1
- package/lib/esm/shared/environmentValue.js +24 -0
- package/lib/esm/shared/environmentValue.js.map +1 -1
- package/lib/esm/shared/http/HttpApiService.js +181 -0
- package/lib/esm/shared/http/HttpApiService.js.map +1 -0
- package/lib/esm/shared/http/hermeticBoot.js +146 -0
- package/lib/esm/shared/http/hermeticBoot.js.map +1 -0
- package/lib/esm/shared/http/index.js +11 -0
- package/lib/esm/shared/http/index.js.map +1 -0
- package/lib/types/blob/azure/AzureBlobStoreService.d.cts +7 -7
- package/lib/types/blob/azure/AzureBlobStoreService.d.mts +7 -7
- package/lib/types/blob/core/BlobStoreService.d.cts +28 -27
- package/lib/types/blob/core/BlobStoreService.d.mts +28 -27
- package/lib/types/blob/gcp/GcsBlobStoreService.d.cts +7 -7
- package/lib/types/blob/gcp/GcsBlobStoreService.d.mts +7 -7
- package/lib/types/blob/s3/S3BlobStoreService.d.cts +9 -1
- package/lib/types/blob/s3/S3BlobStoreService.d.mts +9 -1
- package/lib/types/blob/s3/S3CompatibleBlobStoreService.d.cts +11 -15
- package/lib/types/blob/s3/S3CompatibleBlobStoreService.d.mts +11 -15
- package/lib/types/comms/email/EmailService.d.cts +184 -0
- package/lib/types/comms/email/EmailService.d.mts +184 -0
- package/lib/types/comms/email/index.d.cts +11 -0
- package/lib/types/comms/email/index.d.mts +11 -0
- package/lib/types/comms/email/mime.d.cts +84 -0
- package/lib/types/comms/email/mime.d.mts +84 -0
- package/lib/types/comms/email/smtp.d.cts +107 -0
- package/lib/types/comms/email/smtp.d.mts +107 -0
- package/lib/types/comms/environment.d.cts +84 -0
- package/lib/types/comms/environment.d.mts +84 -0
- package/lib/types/comms/gmail/GmailService.d.cts +190 -0
- package/lib/types/comms/gmail/GmailService.d.mts +190 -0
- package/lib/types/comms/gmail/index.d.cts +6 -0
- package/lib/types/comms/gmail/index.d.mts +6 -0
- package/lib/types/comms/index.d.cts +13 -0
- package/lib/types/comms/index.d.mts +13 -0
- package/lib/types/comms/slack/SlackService.d.cts +259 -0
- package/lib/types/comms/slack/SlackService.d.mts +259 -0
- package/lib/types/comms/slack/index.d.cts +6 -0
- package/lib/types/comms/slack/index.d.mts +6 -0
- package/lib/types/comms/teams/TeamsService.d.cts +172 -0
- package/lib/types/comms/teams/TeamsService.d.mts +172 -0
- package/lib/types/comms/teams/index.d.cts +6 -0
- package/lib/types/comms/teams/index.d.mts +6 -0
- package/lib/types/comms/telegram/TelegramService.d.cts +202 -0
- package/lib/types/comms/telegram/TelegramService.d.mts +202 -0
- package/lib/types/comms/telegram/index.d.cts +6 -0
- package/lib/types/comms/telegram/index.d.mts +6 -0
- package/lib/types/devops/environment.d.cts +62 -0
- package/lib/types/devops/environment.d.mts +62 -0
- package/lib/types/devops/github/GithubService.d.cts +287 -0
- package/lib/types/devops/github/GithubService.d.mts +287 -0
- package/lib/types/devops/github/index.d.cts +6 -0
- package/lib/types/devops/github/index.d.mts +6 -0
- package/lib/types/devops/gitlab/GitlabService.d.cts +277 -0
- package/lib/types/devops/gitlab/GitlabService.d.mts +277 -0
- package/lib/types/devops/gitlab/index.d.cts +6 -0
- package/lib/types/devops/gitlab/index.d.mts +6 -0
- package/lib/types/devops/index.d.cts +10 -0
- package/lib/types/devops/index.d.mts +10 -0
- package/lib/types/index.d.cts +2 -2
- package/lib/types/index.d.mts +2 -2
- package/lib/types/io/airtable/AirtableService.d.cts +268 -0
- package/lib/types/io/airtable/AirtableService.d.mts +268 -0
- package/lib/types/io/airtable/index.d.cts +6 -0
- package/lib/types/io/airtable/index.d.mts +6 -0
- package/lib/types/io/environment.d.cts +67 -0
- package/lib/types/io/environment.d.mts +67 -0
- package/lib/types/io/google-sheets/GoogleSheetsService.d.cts +204 -0
- package/lib/types/io/google-sheets/GoogleSheetsService.d.mts +204 -0
- package/lib/types/io/google-sheets/index.d.cts +6 -0
- package/lib/types/io/google-sheets/index.d.mts +6 -0
- package/lib/types/io/graphql/GraphqlService.d.cts +173 -0
- package/lib/types/io/graphql/GraphqlService.d.mts +173 -0
- package/lib/types/io/graphql/index.d.cts +6 -0
- package/lib/types/io/graphql/index.d.mts +6 -0
- package/lib/types/io/index.d.cts +12 -0
- package/lib/types/io/index.d.mts +12 -0
- package/lib/types/io/spreadsheet/SpreadsheetService.d.cts +144 -0
- package/lib/types/io/spreadsheet/SpreadsheetService.d.mts +144 -0
- package/lib/types/io/spreadsheet/index.d.cts +7 -0
- package/lib/types/io/spreadsheet/index.d.mts +7 -0
- package/lib/types/namespaces/index.d.cts +1 -0
- package/lib/types/namespaces/index.d.mts +1 -0
- package/lib/types/namespaces/models/credential.model.d.cts +23 -0
- package/lib/types/namespaces/models/credential.model.d.mts +23 -0
- package/lib/types/namespaces/models/index.d.cts +1 -0
- package/lib/types/namespaces/models/index.d.mts +1 -0
- package/lib/types/namespaces/rls/index.d.cts +10 -0
- package/lib/types/namespaces/rls/index.d.mts +10 -0
- package/lib/types/namespaces/rls/principal-resolver.d.cts +47 -0
- package/lib/types/namespaces/rls/principal-resolver.d.mts +47 -0
- package/lib/types/namespaces/rls/rls-bootstrap.service.d.cts +157 -0
- package/lib/types/namespaces/rls/rls-bootstrap.service.d.mts +157 -0
- package/lib/types/namespaces/rls/rls.constants.d.cts +52 -0
- package/lib/types/namespaces/rls/rls.constants.d.mts +52 -0
- package/lib/types/namespaces/rls/rls.template.d.cts +42 -0
- package/lib/types/namespaces/rls/rls.template.d.mts +42 -0
- package/lib/types/namespaces/rls/rls.types.d.cts +77 -0
- package/lib/types/namespaces/rls/rls.types.d.mts +77 -0
- package/lib/types/namespaces/rls/session-binding.d.cts +87 -0
- package/lib/types/namespaces/rls/session-binding.d.mts +87 -0
- package/lib/types/namespaces/services/credential.service.d.cts +175 -0
- package/lib/types/namespaces/services/credential.service.d.mts +175 -0
- package/lib/types/namespaces/services/index.d.cts +1 -0
- package/lib/types/namespaces/services/index.d.mts +1 -0
- package/lib/types/namespaces/types.d.cts +37 -0
- package/lib/types/namespaces/types.d.mts +37 -0
- package/lib/types/redis/adapter.d.cts +2 -0
- package/lib/types/redis/adapter.d.mts +2 -0
- package/lib/types/redis/types.d.cts +27 -2
- package/lib/types/redis/types.d.mts +27 -2
- package/lib/types/secrets/InfraCredentialBootstrap.d.cts +100 -0
- package/lib/types/secrets/InfraCredentialBootstrap.d.mts +100 -0
- package/lib/types/secrets/core/SecretTypes.d.cts +15 -1
- package/lib/types/secrets/core/SecretTypes.d.mts +15 -1
- package/lib/types/secrets/fs/FsSecretEnvironment.d.cts +42 -0
- package/lib/types/secrets/fs/FsSecretEnvironment.d.mts +42 -0
- package/lib/types/secrets/fs/FsSecretService.d.cts +207 -0
- package/lib/types/secrets/fs/FsSecretService.d.mts +207 -0
- package/lib/types/secrets/fs/FsSecretServiceConfig.d.cts +37 -0
- package/lib/types/secrets/fs/FsSecretServiceConfig.d.mts +37 -0
- package/lib/types/secrets/fs/index.d.cts +9 -0
- package/lib/types/secrets/fs/index.d.mts +9 -0
- package/lib/types/secrets/index.d.cts +2 -0
- package/lib/types/secrets/index.d.mts +2 -0
- package/lib/types/secrets/model/ModelSecretService.d.cts +190 -1
- package/lib/types/secrets/model/ModelSecretService.d.mts +190 -1
- package/lib/types/secrets/model/Secret.d.cts +44 -3
- package/lib/types/secrets/model/Secret.d.mts +44 -3
- package/lib/types/shared/environmentValue.d.cts +24 -0
- package/lib/types/shared/environmentValue.d.mts +24 -0
- package/lib/types/shared/http/HttpApiService.d.cts +193 -0
- package/lib/types/shared/http/HttpApiService.d.mts +193 -0
- package/lib/types/shared/http/hermeticBoot.d.cts +84 -0
- package/lib/types/shared/http/hermeticBoot.d.mts +84 -0
- package/lib/types/shared/http/index.d.cts +10 -0
- package/lib/types/shared/http/index.d.mts +10 -0
- package/package.json +180 -3
- package/sql/002_rls.sql +660 -15
- package/sql/004_credentials.sql +46 -0
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/devops/github/service
|
|
3
|
+
* @summary GitHub REST API integration service for repositories, issues, and pull requests.
|
|
4
|
+
* @description Exposes a focused subset of the GitHub REST API (`/repos/*`:
|
|
5
|
+
* repository lookup, issue listing/creation/commenting, and pull-request
|
|
6
|
+
* listing) as an undecorated client-based service built on
|
|
7
|
+
* {@link HttpApiService}. Configuration comes from an explicit
|
|
8
|
+
* `GithubServiceConfig` or the `devops.github` environment slice; repository
|
|
9
|
+
* targets default to the configured `owner`/`repo` and can be overridden per
|
|
10
|
+
* call. Raw GitHub responses are normalized to camelCase issue descriptors,
|
|
11
|
+
* and failures are mapped to decaf errors via {@link httpError}.
|
|
12
|
+
*/
|
|
13
|
+
import { InternalError } from "@decaf-ts/db-decorators";
|
|
14
|
+
import { DevopsEnvironment } from "./../environment.js";
|
|
15
|
+
import { envNumber, envString } from "./../../shared/environmentValue.js";
|
|
16
|
+
import { HttpApiService, httpError, } from "./../../shared/http/index.js";
|
|
17
|
+
/**
|
|
18
|
+
* @description GitHub REST API integration service
|
|
19
|
+
* @summary An undecorated HTTP service for looking up
|
|
20
|
+
* repositories, listing issues (excluding pull requests), creating issues,
|
|
21
|
+
* commenting on issues, and listing pull requests. Repository targets resolve
|
|
22
|
+
* per call from the input's `owner`/`repo`, falling back to the configured
|
|
23
|
+
* config values, and throw `InternalError` when unresolved. The token is sent
|
|
24
|
+
* as a bearer token with the GitHub `Accept` and API-version headers, and
|
|
25
|
+
* transport failures are mapped to decaf errors via {@link httpError}.
|
|
26
|
+
* @class GithubService
|
|
27
|
+
* @category DevOps
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* import { GithubService } from "@decaf-ts/integrations/devops/github";
|
|
31
|
+
*
|
|
32
|
+
* const github = new GithubService();
|
|
33
|
+
* await github.initialize({
|
|
34
|
+
* token: process.env.GRAPH_CREDENTIAL_GITHUB_TOKEN,
|
|
35
|
+
* owner: "example-org",
|
|
36
|
+
* repo: "example-repo",
|
|
37
|
+
* });
|
|
38
|
+
* const issue = await github.createIssue({
|
|
39
|
+
* title: "Bug report",
|
|
40
|
+
* body: "Something is broken",
|
|
41
|
+
* labels: ["bug"],
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
* @memberOf module:integrations/devops/github/service
|
|
45
|
+
*/
|
|
46
|
+
export class GithubService extends HttpApiService {
|
|
47
|
+
constructor() {
|
|
48
|
+
super(...arguments);
|
|
49
|
+
/**
|
|
50
|
+
* @description The provider name used in error messages
|
|
51
|
+
*/
|
|
52
|
+
this.serviceName = "GitHub";
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @description The GitHub REST API base URL
|
|
56
|
+
* @summary Used when the resolved config carries no `baseUrl`.
|
|
57
|
+
* @returns {string} `"https://api.github.com"`.
|
|
58
|
+
*/
|
|
59
|
+
defaultBaseUrl() {
|
|
60
|
+
return "https://api.github.com";
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @description Builds the GitHub authentication and API version headers
|
|
64
|
+
* @summary Returns `Authorization: Bearer <token>`, the GitHub JSON
|
|
65
|
+
* `Accept` header, and the `X-GitHub-Api-Version` header when the config
|
|
66
|
+
* carries a token; without a token only the `Accept` headers are sent.
|
|
67
|
+
* @param {GithubServiceConfig} config - The resolved service configuration.
|
|
68
|
+
* @returns {Record<string, string>} The authorization and version headers.
|
|
69
|
+
*/
|
|
70
|
+
authHeaders(config) {
|
|
71
|
+
return config.token
|
|
72
|
+
? {
|
|
73
|
+
Authorization: `Bearer ${config.token}`,
|
|
74
|
+
Accept: "application/vnd.github+json",
|
|
75
|
+
"X-GitHub-Api-Version": "2022-11-28",
|
|
76
|
+
}
|
|
77
|
+
: { Accept: "application/vnd.github+json" };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @description Reads the GitHub credentials and defaults from the environment
|
|
81
|
+
* @summary Reads the `devops.github` environment slice and returns a
|
|
82
|
+
* partial config when a token is configured, `undefined` otherwise. Values
|
|
83
|
+
* pass through `envString`/`envNumber` to reject unset-leaf proxies.
|
|
84
|
+
* @returns {Partial<GithubServiceConfig> | undefined} A partial config, or `undefined` when no GitHub token is configured.
|
|
85
|
+
*/
|
|
86
|
+
configFromEnvironment() {
|
|
87
|
+
const env = DevopsEnvironment.devops.github;
|
|
88
|
+
const token = envString(env?.token);
|
|
89
|
+
if (!token)
|
|
90
|
+
return undefined;
|
|
91
|
+
return {
|
|
92
|
+
token,
|
|
93
|
+
owner: envString(env.owner),
|
|
94
|
+
repo: envString(env.repo),
|
|
95
|
+
baseUrl: envString(env.baseUrl),
|
|
96
|
+
timeout: envNumber(env.timeout),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @description Resolves the URL-encoded repository path for a call
|
|
101
|
+
* @summary Builds `/repos/<owner>/<repo>` from the input's `owner`/`repo`,
|
|
102
|
+
* falling back to the configured config values, and throws when either
|
|
103
|
+
* value is missing.
|
|
104
|
+
* @param {GithubRepositoryRef} [input] - The per-call repository override.
|
|
105
|
+
* @returns {string} The URL-encoded repository API path.
|
|
106
|
+
* @throws {InternalError} When neither the input nor the config yields an owner and repository.
|
|
107
|
+
*/
|
|
108
|
+
repoPath(input = {}) {
|
|
109
|
+
const owner = input.owner ?? this.config.owner;
|
|
110
|
+
const repo = input.repo ?? this.config.repo;
|
|
111
|
+
if (!owner || !repo) {
|
|
112
|
+
throw new InternalError("GitHub requires an owner and repository");
|
|
113
|
+
}
|
|
114
|
+
return `/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}`;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @description Normalizes a raw GitHub issue payload
|
|
118
|
+
* @summary Maps the raw issue JSON onto a {@link GithubIssue}: label objects
|
|
119
|
+
* are reduced to names, the author to its `login`, and numeric/string
|
|
120
|
+
* fields are coerced. The repository reference is echoed from the input,
|
|
121
|
+
* falling back to the configured `owner`/`repo`.
|
|
122
|
+
* @param {Record<string, unknown>} raw - The raw GitHub issue payload.
|
|
123
|
+
* @param {GithubRepositoryRef} ref - The repository reference the issue belongs to.
|
|
124
|
+
* @returns {GithubIssue} The normalized issue descriptor.
|
|
125
|
+
*/
|
|
126
|
+
mapIssue(raw, ref) {
|
|
127
|
+
return {
|
|
128
|
+
owner: ref.owner ?? this.config.owner,
|
|
129
|
+
repo: ref.repo ?? this.config.repo,
|
|
130
|
+
number: Number(raw["number"] ?? 0),
|
|
131
|
+
title: String(raw["title"] ?? ""),
|
|
132
|
+
state: envString(raw["state"]),
|
|
133
|
+
htmlUrl: envString(raw["html_url"]),
|
|
134
|
+
body: envString(raw["body"]),
|
|
135
|
+
user: envString(raw["user"]?.login),
|
|
136
|
+
labels: Array.isArray(raw["labels"])
|
|
137
|
+
? raw["labels"].map((label) => typeof label === "string" ? label : String(label.name ?? ""))
|
|
138
|
+
: undefined,
|
|
139
|
+
comments: typeof raw["comments"] === "number"
|
|
140
|
+
? raw["comments"]
|
|
141
|
+
: undefined,
|
|
142
|
+
createdAt: envString(raw["created_at"]),
|
|
143
|
+
updatedAt: envString(raw["updated_at"]),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* @description Fetches a GitHub repository
|
|
148
|
+
* @summary `GET`s `/repos/<owner>/<repo>` for the given reference (falling
|
|
149
|
+
* back to the configured `owner`/`repo`) and returns the raw repository
|
|
150
|
+
* payload.
|
|
151
|
+
* @param {GithubRepositoryRef} [ref] - The repository to look up; defaults to the configured `owner`/`repo`.
|
|
152
|
+
* @returns {Promise<unknown>} The raw GitHub repository payload.
|
|
153
|
+
* @throws {InternalError} When the repository reference cannot be resolved.
|
|
154
|
+
* @throws {NotFoundError} When the repository does not exist (HTTP 404).
|
|
155
|
+
* @throws {ConflictError} When GitHub answers with HTTP 409.
|
|
156
|
+
* @throws {BadRequestError} When GitHub answers with any other HTTP error status.
|
|
157
|
+
*/
|
|
158
|
+
async getRepository(ref = {}) {
|
|
159
|
+
try {
|
|
160
|
+
const response = await this.client.get(this.repoPath(ref));
|
|
161
|
+
return response.data;
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
throw httpError("GitHub", "get repository", error);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* @description Lists GitHub issues with state, label, and page filtering
|
|
169
|
+
* @summary `GET`s `/repos/<owner>/<repo>/issues` with a `state` filter
|
|
170
|
+
* (default `"open"`), a page size (`per_page`, default `30`), a page
|
|
171
|
+
* number, and a comma-separated `labels` filter. Entries carrying a
|
|
172
|
+
* `pull_request` key are filtered out so only true issues are returned.
|
|
173
|
+
* @param {GithubListOptions} [options] - Repository override, state, paging, and label options.
|
|
174
|
+
* @returns {Promise<GithubIssue[]>} The normalized issues for the requested page.
|
|
175
|
+
* @throws {InternalError} When the repository reference cannot be resolved.
|
|
176
|
+
* @throws {NotFoundError} When the repository does not exist (HTTP 404).
|
|
177
|
+
* @throws {ConflictError} When GitHub answers with HTTP 409.
|
|
178
|
+
* @throws {BadRequestError} When GitHub answers with any other HTTP error status.
|
|
179
|
+
* @example
|
|
180
|
+
* ```ts
|
|
181
|
+
* let page = 1;
|
|
182
|
+
* for (;;) {
|
|
183
|
+
* const issues = await github.listIssues({
|
|
184
|
+
* state: "open",
|
|
185
|
+
* labels: "bug,priority:high",
|
|
186
|
+
* limit: 50,
|
|
187
|
+
* page,
|
|
188
|
+
* });
|
|
189
|
+
* if (issues.length === 0) break;
|
|
190
|
+
* page += 1;
|
|
191
|
+
* }
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
async listIssues(options = {}) {
|
|
195
|
+
try {
|
|
196
|
+
const response = await this.client.get(`${this.repoPath(options)}/issues`, {
|
|
197
|
+
params: {
|
|
198
|
+
state: options.state ?? "open",
|
|
199
|
+
per_page: options.limit ?? 30,
|
|
200
|
+
page: options.page,
|
|
201
|
+
labels: options.labels,
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
return response.data
|
|
205
|
+
.filter((entry) => !entry["pull_request"])
|
|
206
|
+
.map((entry) => this.mapIssue(entry, options));
|
|
207
|
+
}
|
|
208
|
+
catch (error) {
|
|
209
|
+
throw httpError("GitHub", "list issues", error);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* @description Creates a GitHub issue
|
|
214
|
+
* @summary `POST`s the title, body, labels, assignees, and milestone to
|
|
215
|
+
* `/repos/<owner>/<repo>/issues` and returns the normalized issue
|
|
216
|
+
* descriptor. Requires a non-empty `title` and a resolvable repository
|
|
217
|
+
* reference.
|
|
218
|
+
* @param {GithubIssueInput} input - The issue content and repository targeting.
|
|
219
|
+
* @returns {Promise<GithubIssue>} The normalized created issue.
|
|
220
|
+
* @throws {InternalError} When the title is empty or the repository reference cannot be resolved.
|
|
221
|
+
* @throws {NotFoundError} When the repository does not exist (HTTP 404).
|
|
222
|
+
* @throws {ConflictError} When GitHub answers with HTTP 409.
|
|
223
|
+
* @throws {BadRequestError} When GitHub answers with any other HTTP error status (e.g. invalid labels or assignees).
|
|
224
|
+
*/
|
|
225
|
+
async createIssue(input) {
|
|
226
|
+
if (!input.title) {
|
|
227
|
+
throw new InternalError("GitHub issue requires a title");
|
|
228
|
+
}
|
|
229
|
+
try {
|
|
230
|
+
const response = await this.client.post(`${this.repoPath(input)}/issues`, {
|
|
231
|
+
title: input.title,
|
|
232
|
+
body: input.body,
|
|
233
|
+
labels: input.labels,
|
|
234
|
+
assignees: input.assignees,
|
|
235
|
+
milestone: input.milestone,
|
|
236
|
+
});
|
|
237
|
+
return this.mapIssue(response.data, input);
|
|
238
|
+
}
|
|
239
|
+
catch (error) {
|
|
240
|
+
throw httpError("GitHub", "create issue", error);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* @description Comments on a GitHub issue
|
|
245
|
+
* @summary `POST`s the comment body to
|
|
246
|
+
* `/repos/<owner>/<repo>/issues/<number>/comments` and returns the comment
|
|
247
|
+
* identifier and its HTML URL. Requires a non-empty issue number and body.
|
|
248
|
+
* @param {GithubRepositoryRef & {number: number, body: string}} input - The repository targeting, issue number, and comment body.
|
|
249
|
+
* @returns {Promise<{id: number, htmlUrl?: string}>} The created comment's ID and HTML URL.
|
|
250
|
+
* @throws {InternalError} When the issue number or body is empty, or the repository reference cannot be resolved.
|
|
251
|
+
* @throws {NotFoundError} When the issue does not exist (HTTP 404).
|
|
252
|
+
* @throws {ConflictError} When GitHub answers with HTTP 409.
|
|
253
|
+
* @throws {BadRequestError} When GitHub answers with any other HTTP error status.
|
|
254
|
+
*/
|
|
255
|
+
async commentOnIssue(input) {
|
|
256
|
+
if (!input.number || !input.body) {
|
|
257
|
+
throw new InternalError("GitHub comment requires an issue number and body");
|
|
258
|
+
}
|
|
259
|
+
try {
|
|
260
|
+
const response = await this.client.post(`${this.repoPath(input)}/issues/${input.number}/comments`, {
|
|
261
|
+
body: input.body,
|
|
262
|
+
});
|
|
263
|
+
return { id: Number(response.data.id ?? 0), htmlUrl: response.data.html_url };
|
|
264
|
+
}
|
|
265
|
+
catch (error) {
|
|
266
|
+
throw httpError("GitHub", "comment on issue", error);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* @description Lists GitHub pull requests with state and page filtering
|
|
271
|
+
* @summary `GET`s `/repos/<owner>/<repo>/pulls` with a `state` filter
|
|
272
|
+
* (default `"open"`), a page size (`per_page`, default `30`), and a page
|
|
273
|
+
* number. Pull requests are returned as raw GitHub payloads.
|
|
274
|
+
* @param {GithubListOptions} [options] - Repository override, state, and paging options.
|
|
275
|
+
* @returns {Promise<unknown[]>} The raw GitHub pull-request payloads.
|
|
276
|
+
* @throws {InternalError} When the repository reference cannot be resolved.
|
|
277
|
+
* @throws {NotFoundError} When the repository does not exist (HTTP 404).
|
|
278
|
+
* @throws {ConflictError} When GitHub answers with HTTP 409.
|
|
279
|
+
* @throws {BadRequestError} When GitHub answers with any other HTTP error status.
|
|
280
|
+
*/
|
|
281
|
+
async listPullRequests(options = {}) {
|
|
282
|
+
try {
|
|
283
|
+
const response = await this.client.get(`${this.repoPath(options)}/pulls`, {
|
|
284
|
+
params: {
|
|
285
|
+
state: options.state ?? "open",
|
|
286
|
+
per_page: options.limit ?? 30,
|
|
287
|
+
page: options.page,
|
|
288
|
+
},
|
|
289
|
+
});
|
|
290
|
+
return response.data;
|
|
291
|
+
}
|
|
292
|
+
catch (error) {
|
|
293
|
+
throw httpError("GitHub", "list pull requests", error);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
//# sourceMappingURL=GithubService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GithubService.js","sourceRoot":"","sources":["../../../../src/devops/github/GithubService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,4BAAuB;AACnD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,2CAAsC;AACrE,OAAO,EACL,cAAc,EAEd,SAAS,GACV,qCAA0B;AAqI3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,OAAO,aAAc,SAAQ,cAAmC;IAAtE;;QACE;;WAEG;QACgB,gBAAW,GAAG,QAAQ,CAAC;IAiR5C,CAAC;IA/QC;;;;OAIG;IACO,cAAc;QACtB,OAAO,wBAAwB,CAAC;IAClC,CAAC;IAED;;;;;;;OAOG;IACO,WAAW,CAAC,MAA2B;QAC/C,OAAO,MAAM,CAAC,KAAK;YACjB,CAAC,CAAC;gBACE,aAAa,EAAE,UAAU,MAAM,CAAC,KAAK,EAAE;gBACvC,MAAM,EAAE,6BAA6B;gBACrC,sBAAsB,EAAE,YAAY;aACrC;YACH,CAAC,CAAC,EAAE,MAAM,EAAE,6BAA6B,EAAE,CAAC;IAChD,CAAC;IAED;;;;;;OAMG;IACO,qBAAqB;QAC7B,MAAM,GAAG,GAAG,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC;QAC5C,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK;YAAE,OAAO,SAAS,CAAC;QAC7B,OAAO;YACL,KAAK;YACL,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;YAC3B,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;YACzB,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC;YA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**
|
|
2
|
+
* @module integrations/devops/github
|
|
3
|
+
* @summary GitHub REST v3 service (repositories, issues, pull requests).
|
|
4
|
+
* @description Re-exports the GitHub client-based service and its types.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./GithubService.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/devops/github/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mCAAgC"}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/devops/gitlab/service
|
|
3
|
+
* @summary GitLab REST API integration service for projects, issues, and merge requests.
|
|
4
|
+
* @description Exposes a focused subset of the GitLab REST v4 API (`/projects/*`:
|
|
5
|
+
* project lookup, issue listing/creation/commenting, and merge-request
|
|
6
|
+
* listing) as an undecorated client-based service built on
|
|
7
|
+
* {@link HttpApiService}. Configuration comes from an explicit
|
|
8
|
+
* `GitlabServiceConfig` or the `devops.gitlab` environment slice; project
|
|
9
|
+
* targets default to the configured `projectId` and can be overridden per
|
|
10
|
+
* call. Raw GitLab responses are normalized to camelCase issue descriptors,
|
|
11
|
+
* and failures are mapped to decaf errors via {@link httpError}.
|
|
12
|
+
*/
|
|
13
|
+
import { InternalError } from "@decaf-ts/db-decorators";
|
|
14
|
+
import { DevopsEnvironment } from "./../environment.js";
|
|
15
|
+
import { envNumber, envString } from "./../../shared/environmentValue.js";
|
|
16
|
+
import { HttpApiService, httpError, } from "./../../shared/http/index.js";
|
|
17
|
+
/**
|
|
18
|
+
* @description GitLab REST API integration service
|
|
19
|
+
* @summary An undecorated HTTP service for looking up projects,
|
|
20
|
+
* listing issues, creating issues, commenting on issues (notes), and listing
|
|
21
|
+
* merge requests. Project targets resolve per call from the input's
|
|
22
|
+
* `projectId`, falling back to the configured value, and throw
|
|
23
|
+
* `InternalError` when unresolved. The token is sent as the `PRIVATE-TOKEN`
|
|
24
|
+
* header, and transport failures are mapped to decaf errors via
|
|
25
|
+
* {@link httpError}.
|
|
26
|
+
* @class GitlabService
|
|
27
|
+
* @category DevOps
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* import { GitlabService } from "@decaf-ts/integrations/devops/gitlab";
|
|
31
|
+
*
|
|
32
|
+
* const gitlab = new GitlabService();
|
|
33
|
+
* await gitlab.initialize({
|
|
34
|
+
* token: process.env.GRAPH_CREDENTIAL_GITLAB_TOKEN,
|
|
35
|
+
* projectId: "example-org%2Fexample-repo",
|
|
36
|
+
* });
|
|
37
|
+
* const issue = await gitlab.createIssue({
|
|
38
|
+
* title: "Bug report",
|
|
39
|
+
* description: "Something is broken",
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
* @memberOf module:integrations/devops/gitlab/service
|
|
43
|
+
*/
|
|
44
|
+
export class GitlabService extends HttpApiService {
|
|
45
|
+
constructor() {
|
|
46
|
+
super(...arguments);
|
|
47
|
+
/**
|
|
48
|
+
* @description The provider name used in error messages
|
|
49
|
+
*/
|
|
50
|
+
this.serviceName = "GitLab";
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @description The GitLab REST v4 base URL
|
|
54
|
+
* @summary Used when the resolved config carries no `baseUrl`.
|
|
55
|
+
* @returns {string} `"https://gitlab.com/api/v4"`.
|
|
56
|
+
*/
|
|
57
|
+
defaultBaseUrl() {
|
|
58
|
+
return "https://gitlab.com/api/v4";
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @description Builds the GitLab `PRIVATE-TOKEN` authorization headers
|
|
62
|
+
* @summary Returns the `PRIVATE-TOKEN: <token>` header when the config
|
|
63
|
+
* carries a token, and no headers otherwise.
|
|
64
|
+
* @param {GitlabServiceConfig} config - The resolved service configuration.
|
|
65
|
+
* @returns {Record<string, string>} The authorization headers (empty without a token).
|
|
66
|
+
*/
|
|
67
|
+
authHeaders(config) {
|
|
68
|
+
return config.token ? { "PRIVATE-TOKEN": config.token } : {};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* @description Reads the GitLab credentials and defaults from the environment
|
|
72
|
+
* @summary Reads the `devops.gitlab` environment slice and returns a
|
|
73
|
+
* partial config when a token is configured, `undefined` otherwise. Values
|
|
74
|
+
* pass through `envString`/`envNumber` to reject unset-leaf proxies.
|
|
75
|
+
* @returns {Partial<GitlabServiceConfig> | undefined} A partial config, or `undefined` when no GitLab token is configured.
|
|
76
|
+
*/
|
|
77
|
+
configFromEnvironment() {
|
|
78
|
+
const env = DevopsEnvironment.devops.gitlab;
|
|
79
|
+
const token = envString(env?.token);
|
|
80
|
+
if (!token)
|
|
81
|
+
return undefined;
|
|
82
|
+
return {
|
|
83
|
+
token,
|
|
84
|
+
projectId: envString(env.projectId),
|
|
85
|
+
baseUrl: envString(env.baseUrl),
|
|
86
|
+
timeout: envNumber(env.timeout),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @description Resolves the URL-encoded project path for a call
|
|
91
|
+
* @summary Builds `/projects/<projectId>` from the given project ID,
|
|
92
|
+
* falling back to the configured value, and throws when neither is
|
|
93
|
+
* available.
|
|
94
|
+
* @param {string} [projectId] - The per-call project override (URL-encoded path or numeric ID).
|
|
95
|
+
* @returns {string} The URL-encoded project API path.
|
|
96
|
+
* @throws {InternalError} When neither the input nor the config yields a project ID.
|
|
97
|
+
*/
|
|
98
|
+
projectPath(projectId) {
|
|
99
|
+
const resolved = projectId ?? this.config.projectId;
|
|
100
|
+
if (!resolved)
|
|
101
|
+
throw new InternalError("GitLab requires a project ID");
|
|
102
|
+
return `/projects/${encodeURIComponent(resolved)}`;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @description Normalizes a raw GitLab issue payload
|
|
106
|
+
* @summary Maps the raw issue JSON onto a {@link GitlabIssue}: the author
|
|
107
|
+
* to its `username`, the label array to strings, and numeric/string fields
|
|
108
|
+
* are coerced. The project ID is echoed from the input, falling back to the
|
|
109
|
+
* configured value.
|
|
110
|
+
* @param {Record<string, unknown>} raw - The raw GitLab issue payload.
|
|
111
|
+
* @param {string} [projectId] - The project ID the issue belongs to.
|
|
112
|
+
* @returns {GitlabIssue} The normalized issue descriptor.
|
|
113
|
+
*/
|
|
114
|
+
mapIssue(raw, projectId) {
|
|
115
|
+
return {
|
|
116
|
+
projectId: projectId ?? this.config.projectId,
|
|
117
|
+
iid: Number(raw["iid"] ?? raw["id"] ?? 0),
|
|
118
|
+
title: String(raw["title"] ?? ""),
|
|
119
|
+
state: envString(raw["state"]),
|
|
120
|
+
webUrl: envString(raw["web_url"]),
|
|
121
|
+
description: envString(raw["description"]),
|
|
122
|
+
author: envString(raw["author"]?.username),
|
|
123
|
+
labels: Array.isArray(raw["labels"])
|
|
124
|
+
? raw["labels"].map((label) => String(label))
|
|
125
|
+
: undefined,
|
|
126
|
+
createdAt: envString(raw["created_at"]),
|
|
127
|
+
updatedAt: envString(raw["updated_at"]),
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* @description Fetches a GitLab project
|
|
132
|
+
* @summary `GET`s `/projects/<projectId>` for the given ID (falling back to
|
|
133
|
+
* the configured `projectId`) and returns the raw project payload.
|
|
134
|
+
* @param {string} [projectId] - The project to look up; defaults to the configured `projectId`.
|
|
135
|
+
* @returns {Promise<unknown>} The raw GitLab project payload.
|
|
136
|
+
* @throws {InternalError} When the project ID cannot be resolved.
|
|
137
|
+
* @throws {NotFoundError} When the project does not exist (HTTP 404).
|
|
138
|
+
* @throws {ConflictError} When GitLab answers with HTTP 409.
|
|
139
|
+
* @throws {BadRequestError} When GitLab answers with any other HTTP error status.
|
|
140
|
+
*/
|
|
141
|
+
async getProject(projectId) {
|
|
142
|
+
try {
|
|
143
|
+
const response = await this.client.get(this.projectPath(projectId));
|
|
144
|
+
return response.data;
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
throw httpError("GitLab", "get project", error);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @description Lists GitLab issues with state, label, search, and page filtering
|
|
152
|
+
* @summary `GET`s `/projects/<projectId>/issues` with a `state` filter
|
|
153
|
+
* (default `"opened"`), a page size (`per_page`, default `30`), a page
|
|
154
|
+
* number, a comma-separated `labels` filter, and a `search` term.
|
|
155
|
+
* @param {GitlabListOptions} [options] - Project override, state, paging, label, and search options.
|
|
156
|
+
* @returns {Promise<GitlabIssue[]>} The normalized issues for the requested page.
|
|
157
|
+
* @throws {InternalError} When the project ID cannot be resolved.
|
|
158
|
+
* @throws {NotFoundError} When the project does not exist (HTTP 404).
|
|
159
|
+
* @throws {ConflictError} When GitLab answers with HTTP 409.
|
|
160
|
+
* @throws {BadRequestError} When GitLab answers with any other HTTP error status.
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* const issues = await gitlab.listIssues({
|
|
164
|
+
* projectId: "example-org%2Fexample-repo",
|
|
165
|
+
* state: "opened",
|
|
166
|
+
* labels: "bug,priority::high",
|
|
167
|
+
* limit: 50,
|
|
168
|
+
* page: 1,
|
|
169
|
+
* });
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
async listIssues(options = {}) {
|
|
173
|
+
try {
|
|
174
|
+
const response = await this.client.get(`${this.projectPath(options.projectId)}/issues`, {
|
|
175
|
+
params: {
|
|
176
|
+
state: options.state ?? "opened",
|
|
177
|
+
per_page: options.limit ?? 30,
|
|
178
|
+
page: options.page,
|
|
179
|
+
labels: options.labels,
|
|
180
|
+
search: options.search,
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
return response.data.map((entry) => this.mapIssue(entry, options.projectId));
|
|
184
|
+
}
|
|
185
|
+
catch (error) {
|
|
186
|
+
throw httpError("GitLab", "list issues", error);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* @description Creates a GitLab issue
|
|
191
|
+
* @summary `POST`s the title, description, labels, assignee IDs, and
|
|
192
|
+
* milestone ID to `/projects/<projectId>/issues` and returns the normalized
|
|
193
|
+
* issue descriptor. Requires a non-empty `title` and a resolvable project
|
|
194
|
+
* ID.
|
|
195
|
+
* @param {GitlabIssueInput} input - The issue content and project targeting.
|
|
196
|
+
* @returns {Promise<GitlabIssue>} The normalized created issue.
|
|
197
|
+
* @throws {InternalError} When the title is empty or the project ID cannot be resolved.
|
|
198
|
+
* @throws {NotFoundError} When the project does not exist (HTTP 404).
|
|
199
|
+
* @throws {ConflictError} When GitLab answers with HTTP 409.
|
|
200
|
+
* @throws {BadRequestError} When GitLab answers with any other HTTP error status (e.g. invalid labels or assignees).
|
|
201
|
+
*/
|
|
202
|
+
async createIssue(input) {
|
|
203
|
+
if (!input.title) {
|
|
204
|
+
throw new InternalError("GitLab issue requires a title");
|
|
205
|
+
}
|
|
206
|
+
try {
|
|
207
|
+
const response = await this.client.post(`${this.projectPath(input.projectId)}/issues`, {
|
|
208
|
+
title: input.title,
|
|
209
|
+
description: input.description,
|
|
210
|
+
labels: input.labels,
|
|
211
|
+
assignee_ids: input.assigneeIds,
|
|
212
|
+
milestone_id: input.milestoneId,
|
|
213
|
+
});
|
|
214
|
+
return this.mapIssue(response.data, input.projectId);
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
throw httpError("GitLab", "create issue", error);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* @description Comments on a GitLab issue
|
|
222
|
+
* @summary `POST`s the comment body as a note to
|
|
223
|
+
* `/projects/<projectId>/issues/<iid>/notes` and returns the note
|
|
224
|
+
* identifier and its web URL. Requires a non-empty issue IID and body.
|
|
225
|
+
* @param {object} input - The comment target and body.
|
|
226
|
+
* @param {string} [input.projectId] - The project override; falls back to the configured `projectId`.
|
|
227
|
+
* @param {number} input.iid - The issue's project-scoped IID.
|
|
228
|
+
* @param {string} input.body - The comment body.
|
|
229
|
+
* @returns {Promise<{id: number, webUrl?: string}>} The created note's ID and web URL.
|
|
230
|
+
* @throws {InternalError} When the issue IID or body is empty, or the project ID cannot be resolved.
|
|
231
|
+
* @throws {NotFoundError} When the issue does not exist (HTTP 404).
|
|
232
|
+
* @throws {ConflictError} When GitLab answers with HTTP 409.
|
|
233
|
+
* @throws {BadRequestError} When GitLab answers with any other HTTP error status.
|
|
234
|
+
*/
|
|
235
|
+
async commentOnIssue(input) {
|
|
236
|
+
if (!input.iid || !input.body) {
|
|
237
|
+
throw new InternalError("GitLab comment requires an issue IID and body");
|
|
238
|
+
}
|
|
239
|
+
try {
|
|
240
|
+
const response = await this.client.post(`${this.projectPath(input.projectId)}/issues/${input.iid}/notes`, { body: input.body });
|
|
241
|
+
return { id: Number(response.data.id ?? 0), webUrl: response.data.web_url };
|
|
242
|
+
}
|
|
243
|
+
catch (error) {
|
|
244
|
+
throw httpError("GitLab", "comment on issue", error);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* @description Lists GitLab merge requests with state, search, and page filtering
|
|
249
|
+
* @summary `GET`s `/projects/<projectId>/merge_requests` with a `state`
|
|
250
|
+
* filter (default `"opened"`; `"all"` is sent as no state parameter),
|
|
251
|
+
* a page size (`per_page`, default `30`), a page number, and a `search`
|
|
252
|
+
* term. Merge requests are returned as raw GitLab payloads.
|
|
253
|
+
* @param {GitlabListOptions} [options] - Project override, state, paging, and search options.
|
|
254
|
+
* @returns {Promise<unknown[]>} The raw GitLab merge-request payloads.
|
|
255
|
+
* @throws {InternalError} When the project ID cannot be resolved.
|
|
256
|
+
* @throws {NotFoundError} When the project does not exist (HTTP 404).
|
|
257
|
+
* @throws {ConflictError} When GitLab answers with HTTP 409.
|
|
258
|
+
* @throws {BadRequestError} When GitLab answers with any other HTTP error status.
|
|
259
|
+
*/
|
|
260
|
+
async listMergeRequests(options = {}) {
|
|
261
|
+
try {
|
|
262
|
+
const response = await this.client.get(`${this.projectPath(options.projectId)}/merge_requests`, {
|
|
263
|
+
params: {
|
|
264
|
+
state: options.state === "all" ? undefined : options.state ?? "opened",
|
|
265
|
+
per_page: options.limit ?? 30,
|
|
266
|
+
page: options.page,
|
|
267
|
+
search: options.search,
|
|
268
|
+
},
|
|
269
|
+
});
|
|
270
|
+
return response.data;
|
|
271
|
+
}
|
|
272
|
+
catch (error) {
|
|
273
|
+
throw httpError("GitLab", "list merge requests", error);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
//# sourceMappingURL=GitlabService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitlabService.js","sourceRoot":"","sources":["../../../../src/devops/gitlab/GitlabService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,4BAAuB;AACnD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,2CAAsC;AACrE,OAAO,EACL,cAAc,EAEd,SAAS,GACV,qCAA0B;AAwH3B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,OAAO,aAAc,SAAQ,cAAmC;IAAtE;;QACE;;WAEG;QACgB,gBAAW,GAAG,QAAQ,CAAC;IAkQ5C,CAAC;IAhQC;;;;OAIG;IACO,cAAc;QACtB,OAAO,2BAA2B,CAAC;IACrC,CAAC;IAED;;;;;;OAMG;IACO,WAAW,CAAC,MAA2B;QAC/C,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/D,CAAC;IAED;;;;;;OAMG;IACO,qBAAqB;QAC7B,MAAM,GAAG,GAAG,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC;QAC5C,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK;YAAE,OAAO,SAAS,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I,EAAE,CACrB,CAAC;YACF,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAC9E,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,SAAS,CAAC,QAAQ,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,iBAAiB,CACrB,UAA6B,EAAE;QAE/B,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACpC,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,iBAAiB,EACvD;gBACE,MAAM,EAAE;oBACN,KAAK,EAAE,OAAO,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,IAAI,QAAQ;oBACtE,QAAQ,EAAE,OAAO,CAAC,KAAK,IAAI,EAAE;oBAC7B,IAAI,EAAE,OAAO,CAAC,IAAI;oBAClB,MAAM,EAAE,OAAO,CAAC,MAAM;iBACvB;aACF,CACF,CAAC;YACF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,SAAS,CAAC,QAAQ,EAAE,qBAAqB,EAAE,KAAK,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/devops/gitlab
|
|
3
|
+
* @summary GitLab REST v4 service (projects, issues, merge requests).
|
|
4
|
+
* @description Re-exports the GitLab client-based service and its types.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./GitlabService.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/devops/gitlab/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mCAAgC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/devops
|
|
3
|
+
* @summary DevOps integration services (GitHub, GitLab).
|
|
4
|
+
* @description Re-exports the repository-hosting services, their per-service
|
|
5
|
+
* modules, and the shared `devops` environment slice. Each sub-module is also
|
|
6
|
+
* available through its own package subpath export.
|
|
7
|
+
*/
|
|
8
|
+
export * from "./github/index.js";
|
|
9
|
+
export * from "./gitlab/index.js";
|
|
10
|
+
export * from "./environment.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/devops/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,kCAAyB;AACzB,kCAAyB;AACzB,iCAA8B"}
|
|
@@ -7,6 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
+
import { description } from "@decaf-ts/decoration";
|
|
10
11
|
import { BaseModel } from "@decaf-ts/core";
|
|
11
12
|
import { column, createdAt, pk, table, updatedAt, uuid, unique, } from "@decaf-ts/core";
|
|
12
13
|
import { model, required } from "@decaf-ts/decorator-validation";
|
|
@@ -64,6 +65,7 @@ __decorate([
|
|
|
64
65
|
__metadata("design:type", Date)
|
|
65
66
|
], FeatureFlag.prototype, "updatedAt", void 0);
|
|
66
67
|
FeatureFlag = __decorate([
|
|
68
|
+
description("Persisted feature flag definition used for runtime evaluation"),
|
|
67
69
|
table("feature_flags"),
|
|
68
70
|
model(),
|
|
69
71
|
__metadata("design:paramtypes", [Object])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureFlag.model.js","sourceRoot":"","sources":["../../../../src/feature-flags/models/FeatureFlag.model.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,MAAM,EACN,SAAS,EACT,EAAE,EACF,KAAK,EACL,SAAS,EACT,IAAI,EACJ,MAAM,GACP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"FeatureFlag.model.js","sourceRoot":"","sources":["../../../../src/feature-flags/models/FeatureFlag.model.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,MAAM,EACN,SAAS,EACT,EAAE,EACF,KAAK,EACL,SAAS,EACT,IAAI,EACJ,MAAM,GACP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAM1D,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,SAAS;IACxC,YAAY,IAA2B;QACrC,KAAK,CAAC,IAAI,CAAC,CAAC;QAad,YAAO,GAAY,IAAI,CAAC;IAZxB,CAAC;CAqCF,CAAA;AAjCC;IAFC,EAAE,EAAE;IACJ,IAAI,EAAE;;uCACK;AAKZ;IAHC,MAAM,EAAE;IACR,QAAQ,EAAE;IACV,MAAM,EAAE;;wCACI;AAGb;IADC,MAAM,EAAE;;4CACe;AAGxB;IADC,MAAM,EAAE;;gDACY;AAGrB;IADC,MAAM,EAAE;;0CACM;AAGf;IADC,MAAM,EAAE;;6CAC0B;AAGnC;IADC,MAAM,EAAE;;2CACkB;AAG3B;IADC,MAAM,EAAE;;8CACU;AAGnB;IADC,MAAM,EAAE;;8CACU;AAGnB;IADC,SAAS,EAAE;8BACA,IAAI;8CAAC;AAGjB;IADC,SAAS,EAAE;8BACA,IAAI;8CAAC;AAvCN,WAAW;IAHvB,WAAW,CAAC,+DAA+D,CAAC;IAC5E,KAAK,CAAC,eAAe,CAAC;IACtB,KAAK,EAAE;;GACK,WAAW,CAwCvB"}
|