Merge branch 'main' into fix-flaky-tests

This commit is contained in:
Matej Bačo 2024-09-26 12:33:38 +02:00 committed by GitHub
commit eb81474962
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 57 additions and 57 deletions

View file

@ -3683,7 +3683,7 @@ App::patch('/v1/account/mfa')
}); });
App::get('/v1/account/mfa/factors') App::get('/v1/account/mfa/factors')
->desc('List Factors') ->desc('List factors')
->groups(['api', 'account', 'mfa']) ->groups(['api', 'account', 'mfa'])
->label('scope', 'account') ->label('scope', 'account')
->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT])
@ -3715,7 +3715,7 @@ App::get('/v1/account/mfa/factors')
}); });
App::post('/v1/account/mfa/authenticators/:type') App::post('/v1/account/mfa/authenticators/:type')
->desc('Create Authenticator') ->desc('Create authenticator')
->groups(['api', 'account']) ->groups(['api', 'account'])
->label('event', 'users.[userId].update.mfa') ->label('event', 'users.[userId].update.mfa')
->label('scope', 'account') ->label('scope', 'account')
@ -3787,7 +3787,7 @@ App::post('/v1/account/mfa/authenticators/:type')
}); });
App::put('/v1/account/mfa/authenticators/:type') App::put('/v1/account/mfa/authenticators/:type')
->desc('Verify Authenticator') ->desc('Verify authenticator')
->groups(['api', 'account']) ->groups(['api', 'account'])
->label('event', 'users.[userId].update.mfa') ->label('event', 'users.[userId].update.mfa')
->label('scope', 'account') ->label('scope', 'account')
@ -3852,7 +3852,7 @@ App::put('/v1/account/mfa/authenticators/:type')
}); });
App::post('/v1/account/mfa/recovery-codes') App::post('/v1/account/mfa/recovery-codes')
->desc('Create MFA Recovery Codes') ->desc('Create MFA recovery codes')
->groups(['api', 'account']) ->groups(['api', 'account'])
->label('event', 'users.[userId].update.mfa') ->label('event', 'users.[userId].update.mfa')
->label('scope', 'account') ->label('scope', 'account')
@ -3894,7 +3894,7 @@ App::post('/v1/account/mfa/recovery-codes')
}); });
App::patch('/v1/account/mfa/recovery-codes') App::patch('/v1/account/mfa/recovery-codes')
->desc('Regenerate MFA Recovery Codes') ->desc('Regenerate MFA recovery codes')
->groups(['api', 'account', 'mfaProtected']) ->groups(['api', 'account', 'mfaProtected'])
->label('event', 'users.[userId].update.mfa') ->label('event', 'users.[userId].update.mfa')
->label('scope', 'account') ->label('scope', 'account')
@ -3935,7 +3935,7 @@ App::patch('/v1/account/mfa/recovery-codes')
}); });
App::get('/v1/account/mfa/recovery-codes') App::get('/v1/account/mfa/recovery-codes')
->desc('Get MFA Recovery Codes') ->desc('Get MFA recovery codes')
->groups(['api', 'account', 'mfaProtected']) ->groups(['api', 'account', 'mfaProtected'])
->label('scope', 'account') ->label('scope', 'account')
->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT])
@ -3965,7 +3965,7 @@ App::get('/v1/account/mfa/recovery-codes')
}); });
App::delete('/v1/account/mfa/authenticators/:type') App::delete('/v1/account/mfa/authenticators/:type')
->desc('Delete Authenticator') ->desc('Delete authenticator')
->groups(['api', 'account', 'mfaProtected']) ->groups(['api', 'account', 'mfaProtected'])
->label('event', 'users.[userId].delete.mfa') ->label('event', 'users.[userId].delete.mfa')
->label('scope', 'account') ->label('scope', 'account')
@ -4003,7 +4003,7 @@ App::delete('/v1/account/mfa/authenticators/:type')
}); });
App::post('/v1/account/mfa/challenge') App::post('/v1/account/mfa/challenge')
->desc('Create MFA Challenge') ->desc('Create MFA challenge')
->groups(['api', 'account', 'mfa']) ->groups(['api', 'account', 'mfa'])
->label('scope', 'account') ->label('scope', 'account')
->label('event', 'users.[userId].challenges.[challengeId].create') ->label('event', 'users.[userId].challenges.[challengeId].create')
@ -4191,7 +4191,7 @@ App::post('/v1/account/mfa/challenge')
}); });
App::put('/v1/account/mfa/challenge') App::put('/v1/account/mfa/challenge')
->desc('Create MFA Challenge (confirmation)') ->desc('Create MFA challenge (confirmation)')
->groups(['api', 'account', 'mfa']) ->groups(['api', 'account', 'mfa'])
->label('scope', 'account') ->label('scope', 'account')
->label('event', 'users.[userId].sessions.[sessionId].create') ->label('event', 'users.[userId].sessions.[sessionId].create')
@ -4452,7 +4452,7 @@ App::delete('/v1/account/targets/:targetId/push')
$response->noContent(); $response->noContent();
}); });
App::get('/v1/account/identities') App::get('/v1/account/identities')
->desc('List Identities') ->desc('List identities')
->groups(['api', 'account']) ->groups(['api', 'account'])
->label('scope', 'account') ->label('scope', 'account')
->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT]) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_JWT])

View file

@ -550,7 +550,7 @@ App::get('/v1/avatars/initials')
}); });
App::get('/v1/cards/cloud') App::get('/v1/cards/cloud')
->desc('Get Front Of Cloud Card') ->desc('Get front Of Cloud Card')
->groups(['api', 'avatars']) ->groups(['api', 'avatars'])
->label('scope', 'avatars.read') ->label('scope', 'avatars.read')
->label('cache', true) ->label('cache', true)
@ -757,7 +757,7 @@ App::get('/v1/cards/cloud')
}); });
App::get('/v1/cards/cloud-back') App::get('/v1/cards/cloud-back')
->desc('Get Back Of Cloud Card') ->desc('Get back Of Cloud Card')
->groups(['api', 'avatars']) ->groups(['api', 'avatars'])
->label('scope', 'avatars.read') ->label('scope', 'avatars.read')
->label('cache', true) ->label('cache', true)
@ -835,7 +835,7 @@ App::get('/v1/cards/cloud-back')
}); });
App::get('/v1/cards/cloud-og') App::get('/v1/cards/cloud-og')
->desc('Get OG Image From Cloud Card') ->desc('Get OG image From Cloud Card')
->groups(['api', 'avatars']) ->groups(['api', 'avatars'])
->label('scope', 'avatars.read') ->label('scope', 'avatars.read')
->label('cache', true) ->label('cache', true)

View file

@ -57,7 +57,7 @@ App::get('/v1/console/variables')
}); });
App::post('/v1/console/assistant') App::post('/v1/console/assistant')
->desc('Ask Query') ->desc('Ask query')
->groups(['api', 'assistant']) ->groups(['api', 'assistant'])
->label('scope', 'assistant.read') ->label('scope', 'assistant.read')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])

View file

@ -69,7 +69,7 @@ App::get('/v1/locale')
}); });
App::get('/v1/locale/codes') App::get('/v1/locale/codes')
->desc('List Locale Codes') ->desc('List locale codes')
->groups(['api', 'locale']) ->groups(['api', 'locale'])
->label('scope', 'locale.read') ->label('scope', 'locale.read')
->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT])

View file

@ -33,7 +33,7 @@ include_once __DIR__ . '/../shared/api.php';
App::post('/v1/migrations/appwrite') App::post('/v1/migrations/appwrite')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->desc('Migrate Appwrite Data') ->desc('Migrate Appwrite data')
->label('scope', 'migrations.write') ->label('scope', 'migrations.write')
->label('event', 'migrations.[migrationId].create') ->label('event', 'migrations.[migrationId].create')
->label('audits.event', 'migration.create') ->label('audits.event', 'migration.create')
@ -87,7 +87,7 @@ App::post('/v1/migrations/appwrite')
App::post('/v1/migrations/firebase/oauth') App::post('/v1/migrations/firebase/oauth')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->desc('Migrate Firebase Data (OAuth)') ->desc('Migrate Firebase data (OAuth)')
->label('scope', 'migrations.write') ->label('scope', 'migrations.write')
->label('event', 'migrations.[migrationId].create') ->label('event', 'migrations.[migrationId].create')
->label('audits.event', 'migration.create') ->label('audits.event', 'migration.create')
@ -189,7 +189,7 @@ App::post('/v1/migrations/firebase/oauth')
App::post('/v1/migrations/firebase') App::post('/v1/migrations/firebase')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->desc('Migrate Firebase Data (Service Account)') ->desc('Migrate Firebase data (Service Account)')
->label('scope', 'migrations.write') ->label('scope', 'migrations.write')
->label('event', 'migrations.[migrationId].create') ->label('event', 'migrations.[migrationId].create')
->label('audits.event', 'migration.create') ->label('audits.event', 'migration.create')
@ -249,7 +249,7 @@ App::post('/v1/migrations/firebase')
App::post('/v1/migrations/supabase') App::post('/v1/migrations/supabase')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->desc('Migrate Supabase Data') ->desc('Migrate Supabase data')
->label('scope', 'migrations.write') ->label('scope', 'migrations.write')
->label('event', 'migrations.[migrationId].create') ->label('event', 'migrations.[migrationId].create')
->label('audits.event', 'migration.create') ->label('audits.event', 'migration.create')
@ -309,7 +309,7 @@ App::post('/v1/migrations/supabase')
App::post('/v1/migrations/nhost') App::post('/v1/migrations/nhost')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->desc('Migrate NHost Data') ->desc('Migrate NHost data')
->label('scope', 'migrations.write') ->label('scope', 'migrations.write')
->label('event', 'migrations.[migrationId].create') ->label('event', 'migrations.[migrationId].create')
->label('audits.event', 'migration.create') ->label('audits.event', 'migration.create')
@ -371,7 +371,7 @@ App::post('/v1/migrations/nhost')
App::get('/v1/migrations') App::get('/v1/migrations')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->desc('List Migrations') ->desc('List migrations')
->label('scope', 'migrations.read') ->label('scope', 'migrations.read')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'migrations') ->label('sdk.namespace', 'migrations')
@ -424,7 +424,7 @@ App::get('/v1/migrations')
App::get('/v1/migrations/:migrationId') App::get('/v1/migrations/:migrationId')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->desc('Get Migration') ->desc('Get migration')
->label('scope', 'migrations.read') ->label('scope', 'migrations.read')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'migrations') ->label('sdk.namespace', 'migrations')
@ -448,7 +448,7 @@ App::get('/v1/migrations/:migrationId')
App::get('/v1/migrations/appwrite/report') App::get('/v1/migrations/appwrite/report')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->desc('Generate a report on Appwrite Data') ->desc('Generate a report on Appwrite data')
->label('scope', 'migrations.write') ->label('scope', 'migrations.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'migrations') ->label('sdk.namespace', 'migrations')
@ -490,7 +490,7 @@ App::get('/v1/migrations/appwrite/report')
App::get('/v1/migrations/firebase/report') App::get('/v1/migrations/firebase/report')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->desc('Generate a report on Firebase Data') ->desc('Generate a report on Firebase data')
->label('scope', 'migrations.write') ->label('scope', 'migrations.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'migrations') ->label('sdk.namespace', 'migrations')
@ -537,7 +537,7 @@ App::get('/v1/migrations/firebase/report')
App::get('/v1/migrations/firebase/report/oauth') App::get('/v1/migrations/firebase/report/oauth')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->desc('Generate a report on Firebase Data using OAuth') ->desc('Generate a report on Firebase data using OAuth')
->label('scope', 'migrations.write') ->label('scope', 'migrations.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'migrations') ->label('sdk.namespace', 'migrations')
@ -627,7 +627,7 @@ App::get('/v1/migrations/firebase/report/oauth')
}); });
App::get('/v1/migrations/firebase/connect') App::get('/v1/migrations/firebase/connect')
->desc('Authorize with firebase') ->desc('Authorize with Firebase')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->label('scope', 'migrations.write') ->label('scope', 'migrations.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
@ -781,7 +781,7 @@ App::get('/v1/migrations/firebase/redirect')
}); });
App::get('/v1/migrations/firebase/projects') App::get('/v1/migrations/firebase/projects')
->desc('List Firebase Projects') ->desc('List Firebase projects')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->label('scope', 'migrations.read') ->label('scope', 'migrations.read')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
@ -870,7 +870,7 @@ App::get('/v1/migrations/firebase/projects')
}); });
App::get('/v1/migrations/firebase/deauthorize') App::get('/v1/migrations/firebase/deauthorize')
->desc('Revoke Appwrite\'s authorization to access Firebase Projects') ->desc('Revoke Appwrite\'s authorization to access Firebase projects')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->label('scope', 'migrations.write') ->label('scope', 'migrations.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
@ -985,7 +985,7 @@ App::get('/v1/migrations/nhost/report')
App::patch('/v1/migrations/:migrationId') App::patch('/v1/migrations/:migrationId')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->desc('Retry Migration') ->desc('Retry migration')
->label('scope', 'migrations.write') ->label('scope', 'migrations.write')
->label('event', 'migrations.[migrationId].retry') ->label('event', 'migrations.[migrationId].retry')
->label('audits.event', 'migration.retry') ->label('audits.event', 'migration.retry')
@ -1030,7 +1030,7 @@ App::patch('/v1/migrations/:migrationId')
App::delete('/v1/migrations/:migrationId') App::delete('/v1/migrations/:migrationId')
->groups(['api', 'migrations']) ->groups(['api', 'migrations'])
->desc('Delete Migration') ->desc('Delete migration')
->label('scope', 'migrations.write') ->label('scope', 'migrations.write')
->label('event', 'migrations.[migrationId].delete') ->label('event', 'migrations.[migrationId].delete')
->label('audits.event', 'migrationId.delete') ->label('audits.event', 'migrationId.delete')

View file

@ -288,7 +288,7 @@ App::get('/v1/project/usage')
// Variables // Variables
App::post('/v1/project/variables') App::post('/v1/project/variables')
->desc('Create Variable') ->desc('Create variable')
->groups(['api']) ->groups(['api'])
->label('scope', 'projects.write') ->label('scope', 'projects.write')
->label('audits.event', 'variable.create') ->label('audits.event', 'variable.create')
@ -343,7 +343,7 @@ App::post('/v1/project/variables')
}); });
App::get('/v1/project/variables') App::get('/v1/project/variables')
->desc('List Variables') ->desc('List variables')
->groups(['api']) ->groups(['api'])
->label('scope', 'projects.read') ->label('scope', 'projects.read')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
@ -368,7 +368,7 @@ App::get('/v1/project/variables')
}); });
App::get('/v1/project/variables/:variableId') App::get('/v1/project/variables/:variableId')
->desc('Get Variable') ->desc('Get variable')
->groups(['api']) ->groups(['api'])
->label('scope', 'projects.read') ->label('scope', 'projects.read')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
@ -392,7 +392,7 @@ App::get('/v1/project/variables/:variableId')
}); });
App::put('/v1/project/variables/:variableId') App::put('/v1/project/variables/:variableId')
->desc('Update Variable') ->desc('Update variable')
->groups(['api']) ->groups(['api'])
->label('scope', 'projects.write') ->label('scope', 'projects.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
@ -438,7 +438,7 @@ App::put('/v1/project/variables/:variableId')
}); });
App::delete('/v1/project/variables/:variableId') App::delete('/v1/project/variables/:variableId')
->desc('Delete Variable') ->desc('Delete variable')
->groups(['api']) ->groups(['api'])
->label('scope', 'projects.write') ->label('scope', 'projects.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])

View file

@ -23,7 +23,7 @@ use Utopia\Validator\WhiteList;
App::post('/v1/proxy/rules') App::post('/v1/proxy/rules')
->groups(['api', 'proxy']) ->groups(['api', 'proxy'])
->desc('Create Rule') ->desc('Create rule')
->label('scope', 'rules.write') ->label('scope', 'rules.write')
->label('event', 'rules.[ruleId].create') ->label('event', 'rules.[ruleId].create')
->label('audits.event', 'rule.create') ->label('audits.event', 'rule.create')
@ -149,7 +149,7 @@ App::post('/v1/proxy/rules')
App::get('/v1/proxy/rules') App::get('/v1/proxy/rules')
->groups(['api', 'proxy']) ->groups(['api', 'proxy'])
->desc('List Rules') ->desc('List rules')
->label('scope', 'rules.read') ->label('scope', 'rules.read')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'proxy') ->label('sdk.namespace', 'proxy')
@ -212,7 +212,7 @@ App::get('/v1/proxy/rules')
App::get('/v1/proxy/rules/:ruleId') App::get('/v1/proxy/rules/:ruleId')
->groups(['api', 'proxy']) ->groups(['api', 'proxy'])
->desc('Get Rule') ->desc('Get rule')
->label('scope', 'rules.read') ->label('scope', 'rules.read')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'proxy') ->label('sdk.namespace', 'proxy')
@ -241,7 +241,7 @@ App::get('/v1/proxy/rules/:ruleId')
App::delete('/v1/proxy/rules/:ruleId') App::delete('/v1/proxy/rules/:ruleId')
->groups(['api', 'proxy']) ->groups(['api', 'proxy'])
->desc('Delete Rule') ->desc('Delete rule')
->label('scope', 'rules.write') ->label('scope', 'rules.write')
->label('event', 'rules.[ruleId].delete') ->label('event', 'rules.[ruleId].delete')
->label('audits.event', 'rules.delete') ->label('audits.event', 'rules.delete')
@ -277,7 +277,7 @@ App::delete('/v1/proxy/rules/:ruleId')
}); });
App::patch('/v1/proxy/rules/:ruleId/verification') App::patch('/v1/proxy/rules/:ruleId/verification')
->desc('Update Rule Verification Status') ->desc('Update rule verification status')
->groups(['api', 'proxy']) ->groups(['api', 'proxy'])
->label('scope', 'rules.write') ->label('scope', 'rules.write')
->label('event', 'rules.[ruleId].update') ->label('event', 'rules.[ruleId].update')

View file

@ -1549,7 +1549,7 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId')
}); });
App::delete('/v1/storage/buckets/:bucketId/files/:fileId') App::delete('/v1/storage/buckets/:bucketId/files/:fileId')
->desc('Delete File') ->desc('Delete file')
->groups(['api', 'storage']) ->groups(['api', 'storage'])
->label('scope', 'files.write') ->label('scope', 'files.write')
->label('event', 'buckets.[bucketId].files.[fileId].delete') ->label('event', 'buckets.[bucketId].files.[fileId].delete')

View file

@ -452,7 +452,7 @@ App::post('/v1/users/scrypt-modified')
}); });
App::post('/v1/users/:userId/targets') App::post('/v1/users/:userId/targets')
->desc('Create User Target') ->desc('Create user target')
->groups(['api', 'users']) ->groups(['api', 'users'])
->label('audits.event', 'target.create') ->label('audits.event', 'target.create')
->label('audits.resource', 'target/response.$id') ->label('audits.resource', 'target/response.$id')
@ -647,7 +647,7 @@ App::get('/v1/users/:userId/prefs')
}); });
App::get('/v1/users/:userId/targets/:targetId') App::get('/v1/users/:userId/targets/:targetId')
->desc('Get User Target') ->desc('Get user target')
->groups(['api', 'users']) ->groups(['api', 'users'])
->label('scope', 'targets.read') ->label('scope', 'targets.read')
->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_ADMIN])
@ -848,7 +848,7 @@ App::get('/v1/users/:userId/logs')
}); });
App::get('/v1/users/:userId/targets') App::get('/v1/users/:userId/targets')
->desc('List User Targets') ->desc('List user targets')
->groups(['api', 'users']) ->groups(['api', 'users'])
->label('scope', 'targets.read') ->label('scope', 'targets.read')
->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_ADMIN]) ->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_ADMIN])
@ -903,7 +903,7 @@ App::get('/v1/users/:userId/targets')
}); });
App::get('/v1/users/identities') App::get('/v1/users/identities')
->desc('List Identities') ->desc('List identities')
->groups(['api', 'users']) ->groups(['api', 'users'])
->label('scope', 'users.read') ->label('scope', 'users.read')
->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.auth', [APP_AUTH_TYPE_KEY])
@ -1425,7 +1425,7 @@ App::patch('/v1/users/:userId/prefs')
}); });
App::patch('/v1/users/:userId/targets/:targetId') App::patch('/v1/users/:userId/targets/:targetId')
->desc('Update User target') ->desc('Update user target')
->groups(['api', 'users']) ->groups(['api', 'users'])
->label('audits.event', 'target.update') ->label('audits.event', 'target.update')
->label('audits.resource', 'target/{response.$id}') ->label('audits.resource', 'target/{response.$id}')
@ -1557,7 +1557,7 @@ App::patch('/v1/users/:userId/mfa')
}); });
App::get('/v1/users/:userId/mfa/factors') App::get('/v1/users/:userId/mfa/factors')
->desc('List Factors') ->desc('List factors')
->groups(['api', 'users']) ->groups(['api', 'users'])
->label('scope', 'users.read') ->label('scope', 'users.read')
->label('usage.metric', 'users.{scope}.requests.read') ->label('usage.metric', 'users.{scope}.requests.read')
@ -1590,7 +1590,7 @@ App::get('/v1/users/:userId/mfa/factors')
}); });
App::get('/v1/users/:userId/mfa/recovery-codes') App::get('/v1/users/:userId/mfa/recovery-codes')
->desc('Get MFA Recovery Codes') ->desc('Get MFA recovery codes')
->groups(['api', 'users']) ->groups(['api', 'users'])
->label('scope', 'users.read') ->label('scope', 'users.read')
->label('usage.metric', 'users.{scope}.requests.read') ->label('usage.metric', 'users.{scope}.requests.read')
@ -1625,7 +1625,7 @@ App::get('/v1/users/:userId/mfa/recovery-codes')
}); });
App::patch('/v1/users/:userId/mfa/recovery-codes') App::patch('/v1/users/:userId/mfa/recovery-codes')
->desc('Create MFA Recovery Codes') ->desc('Create MFA recovery codes')
->groups(['api', 'users']) ->groups(['api', 'users'])
->label('event', 'users.[userId].create.mfa.recovery-codes') ->label('event', 'users.[userId].create.mfa.recovery-codes')
->label('scope', 'users.write') ->label('scope', 'users.write')
@ -1671,7 +1671,7 @@ App::patch('/v1/users/:userId/mfa/recovery-codes')
}); });
App::put('/v1/users/:userId/mfa/recovery-codes') App::put('/v1/users/:userId/mfa/recovery-codes')
->desc('Regenerate MFA Recovery Codes') ->desc('Regenerate MFA recovery codes')
->groups(['api', 'users']) ->groups(['api', 'users'])
->label('event', 'users.[userId].update.mfa.recovery-codes') ->label('event', 'users.[userId].update.mfa.recovery-codes')
->label('scope', 'users.write') ->label('scope', 'users.write')
@ -1716,7 +1716,7 @@ App::put('/v1/users/:userId/mfa/recovery-codes')
}); });
App::delete('/v1/users/:userId/mfa/authenticators/:type') App::delete('/v1/users/:userId/mfa/authenticators/:type')
->desc('Delete Authenticator') ->desc('Delete authenticator')
->groups(['api', 'users']) ->groups(['api', 'users'])
->label('event', 'users.[userId].delete.mfa') ->label('event', 'users.[userId].delete.mfa')
->label('scope', 'users.write') ->label('scope', 'users.write')

View file

@ -263,7 +263,7 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
}; };
App::get('/v1/vcs/github/authorize') App::get('/v1/vcs/github/authorize')
->desc('Install GitHub App') ->desc('Install GitHub app')
->groups(['api', 'vcs']) ->groups(['api', 'vcs'])
->label('scope', 'vcs.read') ->label('scope', 'vcs.read')
->label('sdk.namespace', 'vcs') ->label('sdk.namespace', 'vcs')
@ -305,7 +305,7 @@ App::get('/v1/vcs/github/authorize')
}); });
App::get('/v1/vcs/github/callback') App::get('/v1/vcs/github/callback')
->desc('Capture installation and authorization from GitHub App') ->desc('Capture installation and authorization from GitHub app')
->groups(['api', 'vcs']) ->groups(['api', 'vcs'])
->label('scope', 'public') ->label('scope', 'public')
->label('error', __DIR__ . '/../../views/general/error.phtml') ->label('error', __DIR__ . '/../../views/general/error.phtml')
@ -598,7 +598,7 @@ App::post('/v1/vcs/github/installations/:installationId/providerRepositories/:pr
}); });
App::get('/v1/vcs/github/installations/:installationId/providerRepositories') App::get('/v1/vcs/github/installations/:installationId/providerRepositories')
->desc('List Repositories') ->desc('List repositories')
->groups(['api', 'vcs']) ->groups(['api', 'vcs'])
->label('scope', 'vcs.read') ->label('scope', 'vcs.read')
->label('sdk.namespace', 'vcs') ->label('sdk.namespace', 'vcs')
@ -843,7 +843,7 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro
}); });
App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:providerRepositoryId/branches') App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:providerRepositoryId/branches')
->desc('List Repository Branches') ->desc('List repository branches')
->groups(['api', 'vcs']) ->groups(['api', 'vcs'])
->label('scope', 'vcs.read') ->label('scope', 'vcs.read')
->label('sdk.namespace', 'vcs') ->label('sdk.namespace', 'vcs')
@ -892,7 +892,7 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro
}); });
App::post('/v1/vcs/github/events') App::post('/v1/vcs/github/events')
->desc('Create Event') ->desc('Create event')
->groups(['api', 'vcs']) ->groups(['api', 'vcs'])
->label('scope', 'public') ->label('scope', 'public')
->inject('gitHub') ->inject('gitHub')
@ -1120,7 +1120,7 @@ App::get('/v1/vcs/installations/:installationId')
}); });
App::delete('/v1/vcs/installations/:installationId') App::delete('/v1/vcs/installations/:installationId')
->desc('Delete Installation') ->desc('Delete installation')
->groups(['api', 'vcs']) ->groups(['api', 'vcs'])
->label('scope', 'vcs.write') ->label('scope', 'vcs.write')
->label('sdk.namespace', 'vcs') ->label('sdk.namespace', 'vcs')