@lunch-money/v2-api-spec 2.11.1-preview.10 → 2.11.1-preview.12
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/oauth-scopes/catalog.js +2 -23
- package/oauth-scopes/types.d.ts +1 -1
- package/package.json +1 -1
package/oauth-scopes/catalog.js
CHANGED
|
@@ -9,30 +9,9 @@ exports.validateOAuthCatalog = validateOAuthCatalog;
|
|
|
9
9
|
const freezeScope = (scope) => Object.freeze({ ...scope, operationIds: Object.freeze([...scope.operationIds]) });
|
|
10
10
|
const freezeGroup = (group) => Object.freeze({ ...group, scopes: Object.freeze([...group.scopes]) });
|
|
11
11
|
const scopeDefinitions = [
|
|
12
|
-
{
|
|
13
|
-
name: 'openid',
|
|
14
|
-
description: 'Verify your identity with Lunch Money',
|
|
15
|
-
category: 'identity',
|
|
16
|
-
operationIds: [],
|
|
17
|
-
status: 'active',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
name: 'email',
|
|
21
|
-
description: 'View your email address and whether it has been verified',
|
|
22
|
-
category: 'identity',
|
|
23
|
-
operationIds: [],
|
|
24
|
-
status: 'active',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'profile',
|
|
28
|
-
description: 'View your Lunch Money profile information',
|
|
29
|
-
category: 'identity',
|
|
30
|
-
operationIds: [],
|
|
31
|
-
status: 'active',
|
|
32
|
-
},
|
|
33
12
|
{
|
|
34
13
|
name: 'offline_access',
|
|
35
|
-
description: '
|
|
14
|
+
description: 'Allow this app to maintain access without asking you to sign in and authorize it again',
|
|
36
15
|
category: 'offline',
|
|
37
16
|
operationIds: [],
|
|
38
17
|
status: 'active',
|
|
@@ -413,7 +392,7 @@ function getOAuthScopeForOperationId(operationId) {
|
|
|
413
392
|
return scopeByOperationId.get(operationId);
|
|
414
393
|
}
|
|
415
394
|
const canonicalSet = (values) => [...values].sort().join('\u0000');
|
|
416
|
-
const SCOPE_NAME_PATTERN = /^(?:
|
|
395
|
+
const SCOPE_NAME_PATTERN = /^(?:offline_access|[a-z][a-z0-9_]*:(?:read|create|update|delete))$/;
|
|
417
396
|
const GROUP_ID_PATTERN = /^[a-z][a-z0-9_]*$/;
|
|
418
397
|
function matchOAuthScopeGroup(scopeNames) {
|
|
419
398
|
const names = new Set(scopeNames);
|
package/oauth-scopes/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type OAuthScopeResource = 'me' | 'summary' | 'categories' | 'crypto_manua
|
|
|
7
7
|
* Persisted and API-facing scope values remain strings so newer names can be
|
|
8
8
|
* preserved and reported as unknown by consumers with an older catalog.
|
|
9
9
|
*/
|
|
10
|
-
export type KnownOAuthScopeName = '
|
|
10
|
+
export type KnownOAuthScopeName = 'offline_access' | 'me:read' | 'me:update' | 'summary:read' | 'categories:read' | 'categories:create' | 'categories:update' | 'categories:delete' | 'crypto_manual:read' | 'crypto_manual:create' | 'crypto_manual:update' | 'crypto_manual:delete' | 'crypto_synced:read' | 'crypto_synced:update' | 'balance_history:read' | 'balance_history:update' | 'balance_history:delete' | 'manual_accounts:read' | 'manual_accounts:create' | 'manual_accounts:update' | 'manual_accounts:delete' | 'plaid_accounts:read' | 'plaid_accounts:update' | 'transactions:read' | 'transactions:create' | 'transactions:update' | 'transactions:delete' | 'transaction_attachments:read' | 'transaction_attachments:create' | 'transaction_attachments:delete' | 'tags:read' | 'tags:create' | 'tags:update' | 'tags:delete' | 'recurring_items:read' | 'budgets:read' | 'budgets:update' | 'budgets:delete';
|
|
11
11
|
export type OAuthScopeName = string;
|
|
12
12
|
export interface OAuthScopeDefinition {
|
|
13
13
|
readonly name: KnownOAuthScopeName;
|
package/package.json
CHANGED