['method' => 'GET', 'paths' => $this->paths(''), 'ability' => 'read', 'description' => 'the source and the secret manager tokens of the team that can be linked'], 'set' => ['method' => 'PATCH', 'paths' => $this->paths(''), 'ability' => 'write', 'description' => 'link a token or change the settings (data: integration_token_uuid, settings)'], 'remove' => ['method' => 'DELETE', 'paths' => $this->paths(''), 'ability' => 'delete', 'confirm' => true, 'description' => 'remove the source; existing {{vault.*}} variables then fail the next deployment'], 'keys' => ['method' => 'GET', 'paths' => $this->paths('/keys'), 'ability' => 'write', 'description' => 'key names of the remote secrets'], 'add_reference' => ['method' => 'POST', 'paths' => $this->paths('/references'), 'ability' => 'write', 'description' => 'add a {{vault.KEY}} variable for one remote key (data: key)'], 'import' => ['method' => 'POST', 'paths' => $this->paths('/import'), 'ability' => 'write', 'description' => 'add a {{vault.KEY}} variable for every remote key that has no variable yet'], ]; } /** * @return array */ private function paths(string $suffix): array { return [ 'application' => "applications/{uuid}/secret-manager{$suffix}", 'service' => "services/{uuid}/secret-manager{$suffix}", 'database' => "databases/{uuid}/secret-manager{$suffix}", ]; } protected function pathParams(): array { return [ 'uuid' => 'Application, service, or database UUID.', ]; } protected function dataDescription(): string { return 'Request body, same fields as the REST API: integration_token_uuid, settings (set); key (add_reference). Settings: Doppler service account project, config; Infisical project_id, environment, secret_path; Vault mount, path.'; } }