@shipstatic/types 2.0.0 → 2.1.0
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/dist/index.d.ts +20 -0
- package/dist/index.js +19 -0
- package/package.json +1 -1
- package/src/index.ts +22 -0
package/dist/index.d.ts
CHANGED
|
@@ -555,10 +555,30 @@ export declare const AuthMethod: {
|
|
|
555
555
|
readonly SESSION: "session";
|
|
556
556
|
readonly API_KEY: "apiKey";
|
|
557
557
|
readonly TOKEN: "token";
|
|
558
|
+
readonly OAUTH: "oauth";
|
|
558
559
|
readonly WEBHOOK: "webhook";
|
|
559
560
|
readonly SYSTEM: "system";
|
|
560
561
|
};
|
|
561
562
|
export type AuthMethodType = typeof AuthMethod[keyof typeof AuthMethod];
|
|
563
|
+
/**
|
|
564
|
+
* OAuth scope vocabulary for delegated third-party access tokens.
|
|
565
|
+
* Single source of truth used by the authorization server (advertised in
|
|
566
|
+
* `scopes_supported`), the API's scope-enforcement middleware, and consent UI
|
|
567
|
+
* copy. The standard `offline_access` scope (refresh tokens) is not platform
|
|
568
|
+
* vocabulary and is deliberately absent — the middleware never checks it.
|
|
569
|
+
*
|
|
570
|
+
* Deliberately absent by design: any `tokens:*` scope, `account:write`, or
|
|
571
|
+
* admin scope — a delegated app must never mint credentials, delete the
|
|
572
|
+
* account, or act as admin.
|
|
573
|
+
*/
|
|
574
|
+
export declare const OAuthScope: {
|
|
575
|
+
readonly ACCOUNT_READ: "account:read";
|
|
576
|
+
readonly DEPLOYMENTS_READ: "deployments:read";
|
|
577
|
+
readonly DEPLOYMENTS_WRITE: "deployments:write";
|
|
578
|
+
readonly DOMAINS_READ: "domains:read";
|
|
579
|
+
readonly DOMAINS_WRITE: "domains:write";
|
|
580
|
+
};
|
|
581
|
+
export type OAuthScopeType = typeof OAuthScope[keyof typeof OAuthScope];
|
|
562
582
|
export declare const DEPLOYMENT_CONFIG_FILENAME = "ship.json";
|
|
563
583
|
/** Default ship.json config for SPA routing. Single source of truth — used by both API and SDK. */
|
|
564
584
|
export declare const SPA_DEFAULT_CONFIG: {
|
package/dist/index.js
CHANGED
|
@@ -448,9 +448,28 @@ export const AuthMethod = {
|
|
|
448
448
|
SESSION: 'session',
|
|
449
449
|
API_KEY: 'apiKey',
|
|
450
450
|
TOKEN: 'token',
|
|
451
|
+
OAUTH: 'oauth',
|
|
451
452
|
WEBHOOK: 'webhook',
|
|
452
453
|
SYSTEM: 'system'
|
|
453
454
|
};
|
|
455
|
+
/**
|
|
456
|
+
* OAuth scope vocabulary for delegated third-party access tokens.
|
|
457
|
+
* Single source of truth used by the authorization server (advertised in
|
|
458
|
+
* `scopes_supported`), the API's scope-enforcement middleware, and consent UI
|
|
459
|
+
* copy. The standard `offline_access` scope (refresh tokens) is not platform
|
|
460
|
+
* vocabulary and is deliberately absent — the middleware never checks it.
|
|
461
|
+
*
|
|
462
|
+
* Deliberately absent by design: any `tokens:*` scope, `account:write`, or
|
|
463
|
+
* admin scope — a delegated app must never mint credentials, delete the
|
|
464
|
+
* account, or act as admin.
|
|
465
|
+
*/
|
|
466
|
+
export const OAuthScope = {
|
|
467
|
+
ACCOUNT_READ: 'account:read',
|
|
468
|
+
DEPLOYMENTS_READ: 'deployments:read',
|
|
469
|
+
DEPLOYMENTS_WRITE: 'deployments:write',
|
|
470
|
+
DOMAINS_READ: 'domains:read',
|
|
471
|
+
DOMAINS_WRITE: 'domains:write',
|
|
472
|
+
};
|
|
454
473
|
// Deployment Configuration
|
|
455
474
|
export const DEPLOYMENT_CONFIG_FILENAME = 'ship.json';
|
|
456
475
|
/** Default ship.json config for SPA routing. Single source of truth — used by both API and SDK. */
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -840,12 +840,34 @@ export const AuthMethod = {
|
|
|
840
840
|
SESSION: 'session',
|
|
841
841
|
API_KEY: 'apiKey',
|
|
842
842
|
TOKEN: 'token',
|
|
843
|
+
OAUTH: 'oauth',
|
|
843
844
|
WEBHOOK: 'webhook',
|
|
844
845
|
SYSTEM: 'system'
|
|
845
846
|
} as const;
|
|
846
847
|
|
|
847
848
|
export type AuthMethodType = typeof AuthMethod[keyof typeof AuthMethod];
|
|
848
849
|
|
|
850
|
+
/**
|
|
851
|
+
* OAuth scope vocabulary for delegated third-party access tokens.
|
|
852
|
+
* Single source of truth used by the authorization server (advertised in
|
|
853
|
+
* `scopes_supported`), the API's scope-enforcement middleware, and consent UI
|
|
854
|
+
* copy. The standard `offline_access` scope (refresh tokens) is not platform
|
|
855
|
+
* vocabulary and is deliberately absent — the middleware never checks it.
|
|
856
|
+
*
|
|
857
|
+
* Deliberately absent by design: any `tokens:*` scope, `account:write`, or
|
|
858
|
+
* admin scope — a delegated app must never mint credentials, delete the
|
|
859
|
+
* account, or act as admin.
|
|
860
|
+
*/
|
|
861
|
+
export const OAuthScope = {
|
|
862
|
+
ACCOUNT_READ: 'account:read',
|
|
863
|
+
DEPLOYMENTS_READ: 'deployments:read',
|
|
864
|
+
DEPLOYMENTS_WRITE: 'deployments:write',
|
|
865
|
+
DOMAINS_READ: 'domains:read',
|
|
866
|
+
DOMAINS_WRITE: 'domains:write',
|
|
867
|
+
} as const;
|
|
868
|
+
|
|
869
|
+
export type OAuthScopeType = typeof OAuthScope[keyof typeof OAuthScope];
|
|
870
|
+
|
|
849
871
|
// Deployment Configuration
|
|
850
872
|
export const DEPLOYMENT_CONFIG_FILENAME = 'ship.json';
|
|
851
873
|
|