@lunch-money/v2-api-spec 2.11.1-preview.11 → 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
CHANGED
|
@@ -9,6 +9,13 @@ 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: 'offline_access',
|
|
14
|
+
description: 'Allow this app to maintain access without asking you to sign in and authorize it again',
|
|
15
|
+
category: 'offline',
|
|
16
|
+
operationIds: [],
|
|
17
|
+
status: 'active',
|
|
18
|
+
},
|
|
12
19
|
{
|
|
13
20
|
name: 'me:read',
|
|
14
21
|
description: 'View your Lunch Money identity and account, user, and budget settings',
|
|
@@ -385,7 +392,7 @@ function getOAuthScopeForOperationId(operationId) {
|
|
|
385
392
|
return scopeByOperationId.get(operationId);
|
|
386
393
|
}
|
|
387
394
|
const canonicalSet = (values) => [...values].sort().join('\u0000');
|
|
388
|
-
const SCOPE_NAME_PATTERN = /^[a-z][a-z0-9_]*:(?:read|create|update|delete)$/;
|
|
395
|
+
const SCOPE_NAME_PATTERN = /^(?:offline_access|[a-z][a-z0-9_]*:(?:read|create|update|delete))$/;
|
|
389
396
|
const GROUP_ID_PATTERN = /^[a-z][a-z0-9_]*$/;
|
|
390
397
|
function matchOAuthScopeGroup(scopeNames) {
|
|
391
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 = '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';
|
|
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