Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion @theme/ext/use-configure-replay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type ContextProps = {
userClaims: UserClaims;
};

const SCOPES = ['menu:read', 'menu:write', 'orders:read', 'orders:write'];
const SCOPES = ['menu:read', 'menu:write', 'orders:read', 'orders:write', 'revenue:read'];
const BASE_URL = 'https://cafe.cloud.redocly.com';
const CLIENT_NAME = 'auth';

Expand Down
2 changes: 2 additions & 0 deletions openapi/cafe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ components:
menu:write: Write access to menu items (create, delete)
orders:read: Read access to orders
orders:write: Write access to orders (create, update, delete)
revenue:read: Read access to revenue statistics
clientCredentials:
tokenUrl: https://cafe.cloud.redocly.com/oauth2/token
scopes:
menu:read: Read access to menu items and images
menu:write: Write access to menu items (create, delete)
orders:read: Read access to orders
orders:write: Write access to orders (create, update, delete)
revenue:read: Read access to revenue statistics
ApiKey:
type: apiKey
name: X-API-Key
Expand Down
1 change: 1 addition & 0 deletions openapi/components/schemas/OAuth2Client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ properties:
- menu:write
- orders:read
- orders:write
- revenue:read
description: List of scopes (registered metadata).
grantTypes:
type: array
Expand Down
1 change: 1 addition & 0 deletions openapi/components/schemas/RegisterClientObject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ properties:
- menu:write
- orders:read
- orders:write
- revenue:read
description: List of scopes.
grantTypes:
type: array
Expand Down
1 change: 1 addition & 0 deletions openapi/paths/oauth2_register.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ post:
- menu:write
- orders:read
- orders:write
- revenue:read
Comment thread
DmitryAnansky marked this conversation as resolved.
grantTypes:
- client_credentials
responses:
Expand Down
2 changes: 2 additions & 0 deletions openapi/paths/revenue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ get:
operationId: getRevenue
security:
- ApiKey: []
- OAuth2:
- revenue:read
Comment thread
DmitryAnansky marked this conversation as resolved.
parameters:
- name: startDate
in: query
Expand Down