@shipstatic/ship 2.6.0-beta.2 → 2.6.0-beta.4
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/THIRD-PARTY-LICENSES.md +1 -1
- package/dist/browser.d.ts +54 -27
- package/dist/browser.js.map +1 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +54 -27
- package/dist/index.d.ts +54 -27
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -655,6 +655,20 @@ interface Account {
|
|
|
655
655
|
* must never be sent to Checkout.
|
|
656
656
|
*/
|
|
657
657
|
readonly upgrade: AccountPlanType | null;
|
|
658
|
+
/**
|
|
659
|
+
* The live Subscription's billing interval — Stripe's
|
|
660
|
+
* `Price.recurring.interval`, mirrored — or `null` when no Subscription
|
|
661
|
+
* bills the account (free and granted plans). It is what lets the console
|
|
662
|
+
* offer the current plan's OTHER interval as a switch.
|
|
663
|
+
*/
|
|
664
|
+
readonly interval: BillingInterval | null;
|
|
665
|
+
/**
|
|
666
|
+
* The pending plan change, or `null`. *Up is now, down is at period end*:
|
|
667
|
+
* a downgrade is a Stripe Subscription Schedule that applies at `at`, and
|
|
668
|
+
* until then the account keeps everything it paid for. Reversible —
|
|
669
|
+
* `DELETE /billing/change` releases it.
|
|
670
|
+
*/
|
|
671
|
+
readonly scheduled: ScheduledChange | null;
|
|
658
672
|
}
|
|
659
673
|
/**
|
|
660
674
|
* Account as returned by `GET /account` — the entity plus how the request
|
|
@@ -1843,46 +1857,59 @@ interface PlansResponse {
|
|
|
1843
1857
|
readonly plans: readonly Plan[];
|
|
1844
1858
|
}
|
|
1845
1859
|
/**
|
|
1846
|
-
* The body of `POST /billing/
|
|
1847
|
-
* required: with more than one billed plan there is no
|
|
1848
|
-
* the console always knows which card was clicked.
|
|
1849
|
-
*
|
|
1850
|
-
*
|
|
1851
|
-
*
|
|
1860
|
+
* The body of `POST /billing/change` — the one door for "get me onto this
|
|
1861
|
+
* plan". Both fields required: with more than one billed plan there is no
|
|
1862
|
+
* honest default, and the console always knows which card was clicked.
|
|
1863
|
+
*
|
|
1864
|
+
* The SERVER decides what the change means — the rule is *up is now, down is
|
|
1865
|
+
* at period end* — so the client holds no copy of the ladder: a free account
|
|
1866
|
+
* is sent to Stripe Checkout, a billed account moving up is sent to the
|
|
1867
|
+
* Portal's confirmation page (money moves now, so Stripe's page takes the
|
|
1868
|
+
* consent), and a billed account moving down gets a Stripe Subscription
|
|
1869
|
+
* Schedule that applies the change at period end. The answer says which
|
|
1870
|
+
* happened ({@link PlanChangeResponse}).
|
|
1852
1871
|
*/
|
|
1853
|
-
interface
|
|
1872
|
+
interface PlanChangeRequest {
|
|
1854
1873
|
readonly plan: AccountPlanType;
|
|
1855
1874
|
readonly interval: BillingInterval;
|
|
1856
1875
|
}
|
|
1857
1876
|
/**
|
|
1858
|
-
* The
|
|
1859
|
-
*
|
|
1860
|
-
*
|
|
1861
|
-
*
|
|
1862
|
-
* cancellation, and Stripe's own plan picker.
|
|
1877
|
+
* The pending plan change — a Stripe Subscription Schedule the platform
|
|
1878
|
+
* minted, mirrored onto the account. `at` is when it applies (the current
|
|
1879
|
+
* period's end, Unix seconds). Reversible until then: `DELETE
|
|
1880
|
+
* /billing/change` releases it.
|
|
1863
1881
|
*/
|
|
1864
|
-
interface
|
|
1865
|
-
readonly plan
|
|
1866
|
-
readonly interval
|
|
1882
|
+
interface ScheduledChange {
|
|
1883
|
+
readonly plan: AccountPlanType;
|
|
1884
|
+
readonly interval: BillingInterval;
|
|
1885
|
+
readonly at: number;
|
|
1867
1886
|
}
|
|
1868
1887
|
/**
|
|
1869
|
-
* The answer of `POST /billing/
|
|
1870
|
-
*
|
|
1888
|
+
* The answer of `POST /billing/change` — exactly one field is set, and the
|
|
1889
|
+
* UNION is what holds that: an answer carrying both, or neither, does not
|
|
1890
|
+
* compile, so "which door was taken" is structural rather than prose.
|
|
1871
1891
|
*
|
|
1872
|
-
*
|
|
1873
|
-
*
|
|
1874
|
-
*
|
|
1875
|
-
*
|
|
1892
|
+
* `url` means GO: a Stripe page (Checkout, or the Portal's confirmation page)
|
|
1893
|
+
* finishes the change and the browser must be redirected to it. `scheduled`
|
|
1894
|
+
* means DONE: the downgrade is booked for period end, nothing to visit, and
|
|
1895
|
+
* the account's `scheduled` field now carries it.
|
|
1876
1896
|
*/
|
|
1877
|
-
|
|
1878
|
-
|
|
1897
|
+
type PlanChangeResponse =
|
|
1898
|
+
/** GO: a Stripe page finishes the change. Absolute URL, single use, short-lived. */
|
|
1899
|
+
{
|
|
1879
1900
|
readonly url: string;
|
|
1901
|
+
readonly scheduled?: never;
|
|
1880
1902
|
}
|
|
1903
|
+
/** DONE: the downgrade is booked for period end; nothing to visit. */
|
|
1904
|
+
| {
|
|
1905
|
+
readonly url?: never;
|
|
1906
|
+
readonly scheduled: ScheduledChange;
|
|
1907
|
+
};
|
|
1881
1908
|
/**
|
|
1882
1909
|
* The answer of `POST /billing/portal` — Stripe's `BillingPortal.Session`,
|
|
1883
|
-
* projected the
|
|
1884
|
-
*
|
|
1885
|
-
*
|
|
1910
|
+
* projected to the one field a client needs. The Portal home: cards,
|
|
1911
|
+
* invoices, cancellation. Plan changes have their own door
|
|
1912
|
+
* ({@link PlanChangeRequest}).
|
|
1886
1913
|
*/
|
|
1887
1914
|
interface BillingPortalSession {
|
|
1888
1915
|
/** Absolute URL to redirect the browser to. Single use, short-lived. */
|
|
@@ -3085,6 +3112,6 @@ declare class Ship extends Ship$1 {
|
|
|
3085
3112
|
}
|
|
3086
3113
|
|
|
3087
3114
|
declare namespace Ship {
|
|
3088
|
-
export { API_KEY, API_PATHS, AUTH_BASE_PATH, Account, AccountDeleteResponse, AccountGetResponse, AccountKeyResponse, AccountPlan, AccountPlanType, AccountResource, Activity, ActivityEvent, ActivityListResponse, ActivityMeta, ApiDeployOptions, ApiHttp, ApiHttpOptions, AuthMethod, AuthMethodType, BillingInterval,
|
|
3115
|
+
export { API_KEY, API_PATHS, AUTH_BASE_PATH, Account, AccountDeleteResponse, AccountGetResponse, AccountKeyResponse, AccountPlan, AccountPlanType, AccountResource, Activity, ActivityEvent, ActivityListResponse, ActivityMeta, ApiDeployOptions, ApiHttp, ApiHttpOptions, AuthMethod, AuthMethodType, BillingInterval, BillingPortalSession, BillingSyncResponse, CALLER, Caps, DEFAULT_API, DEPLOYMENT_CONFIG_FILENAME, DEPLOY_FIELDS, DEPLOY_TOKEN, DeployBodyContext, DeployFile, DeployInput, DeployTransport, Deployment, DeploymentCreateResponse, DeploymentDeleteResponse, DeploymentListResponse, DeploymentOptions, DeploymentResource, DeploymentResourceContext, DeploymentSetOptions, DeploymentStatus, DeploymentStatusType, DeploymentUploadOptions, DeploymentVia, DeploymentViaType, DnsLookup, DnsProvider, DnsRecord, DnsRecordType, Domain, DomainDeleteResponse, DomainDnsResponse, DomainListResponse, DomainRecordsResponse, DomainResource, DomainSetOptions, DomainSetResult, DomainShareResponse, DomainStatus, DomainStatusType, DomainValidateResponse, DomainVerifyResponse, ErrorResponse, ErrorType, ExecutionEnvironment, FileValidationStatus as FILE_VALIDATION_STATUS, Fetch, FileValidationResult, FileValidationStatus, FileValidationStatusType, IDEMPOTENCY_KEY_CONSTRAINTS, JUNK_DIRECTORIES, LABEL_CONSTRAINTS, LABEL_PATTERN, LabelsResponse, ListOptions, ListResponse, MD5Result, MY_API_KEY_URL, OAUTH_TOKEN, OAuthScope, OAuthScopeType, PASSWORD_CONSTRAINTS, PUBLIC_DEPLOYMENT_TTL_SECONDS, PingResponse, Plan, PlanChangeRequest, PlanChangeResponse, PlansResponse, PlatformLimits, RequestResult, ResourceContext, SHIP_ENV, SIGN_IN_RETURN_PARAM, SPACheckDebug, SPACheckRequest, SPACheckResponse, SPA_CHECK_CONSTRAINTS, SPA_DEFAULT_CONFIG, ScheduledChange, SetupInstructionsResponse, ShipClientOptions, ShipError, ShipEvents, ShipRequestInit, StaticFile, TTL_CONSTRAINTS, Token, TokenCreateOptions, TokenCreateResponse, TokenDeleteResponse, TokenKind, TokenKindType, TokenListResponse, TokenProvider, TokenResource, Transport, UNBUILT_PROJECT_MARKERS, UNSAFE_FILENAME_CHARS, UploadedFile, UserVisibleActivityEvent, ValidatableFile, ValidationIssue, WEB_FILE_ACCEPT, __setTestEnvironment, allValidFilesReady, assertShipJsonSyntax, calculateMD5, classifyToken, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, deserializeLabels, extractSubdomain, filterJunk, formatFileSize, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isCustomDomain, isDeployment, isPlatformDomain, isShipError, normalizeVia, optimizeDeployPaths, pluralize, processFilesForNode, readBearerValue, serializeLabels, validateApiKey, validateApiUrl, validateCaller, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validateOAuthToken, validatePassword, validateToken, validateTtl };
|
|
3089
3116
|
}
|
|
3090
3117
|
export = Ship;
|
package/dist/index.d.ts
CHANGED
|
@@ -655,6 +655,20 @@ interface Account {
|
|
|
655
655
|
* must never be sent to Checkout.
|
|
656
656
|
*/
|
|
657
657
|
readonly upgrade: AccountPlanType | null;
|
|
658
|
+
/**
|
|
659
|
+
* The live Subscription's billing interval — Stripe's
|
|
660
|
+
* `Price.recurring.interval`, mirrored — or `null` when no Subscription
|
|
661
|
+
* bills the account (free and granted plans). It is what lets the console
|
|
662
|
+
* offer the current plan's OTHER interval as a switch.
|
|
663
|
+
*/
|
|
664
|
+
readonly interval: BillingInterval | null;
|
|
665
|
+
/**
|
|
666
|
+
* The pending plan change, or `null`. *Up is now, down is at period end*:
|
|
667
|
+
* a downgrade is a Stripe Subscription Schedule that applies at `at`, and
|
|
668
|
+
* until then the account keeps everything it paid for. Reversible —
|
|
669
|
+
* `DELETE /billing/change` releases it.
|
|
670
|
+
*/
|
|
671
|
+
readonly scheduled: ScheduledChange | null;
|
|
658
672
|
}
|
|
659
673
|
/**
|
|
660
674
|
* Account as returned by `GET /account` — the entity plus how the request
|
|
@@ -1843,46 +1857,59 @@ interface PlansResponse {
|
|
|
1843
1857
|
readonly plans: readonly Plan[];
|
|
1844
1858
|
}
|
|
1845
1859
|
/**
|
|
1846
|
-
* The body of `POST /billing/
|
|
1847
|
-
* required: with more than one billed plan there is no
|
|
1848
|
-
* the console always knows which card was clicked.
|
|
1849
|
-
*
|
|
1850
|
-
*
|
|
1851
|
-
*
|
|
1860
|
+
* The body of `POST /billing/change` — the one door for "get me onto this
|
|
1861
|
+
* plan". Both fields required: with more than one billed plan there is no
|
|
1862
|
+
* honest default, and the console always knows which card was clicked.
|
|
1863
|
+
*
|
|
1864
|
+
* The SERVER decides what the change means — the rule is *up is now, down is
|
|
1865
|
+
* at period end* — so the client holds no copy of the ladder: a free account
|
|
1866
|
+
* is sent to Stripe Checkout, a billed account moving up is sent to the
|
|
1867
|
+
* Portal's confirmation page (money moves now, so Stripe's page takes the
|
|
1868
|
+
* consent), and a billed account moving down gets a Stripe Subscription
|
|
1869
|
+
* Schedule that applies the change at period end. The answer says which
|
|
1870
|
+
* happened ({@link PlanChangeResponse}).
|
|
1852
1871
|
*/
|
|
1853
|
-
interface
|
|
1872
|
+
interface PlanChangeRequest {
|
|
1854
1873
|
readonly plan: AccountPlanType;
|
|
1855
1874
|
readonly interval: BillingInterval;
|
|
1856
1875
|
}
|
|
1857
1876
|
/**
|
|
1858
|
-
* The
|
|
1859
|
-
*
|
|
1860
|
-
*
|
|
1861
|
-
*
|
|
1862
|
-
* cancellation, and Stripe's own plan picker.
|
|
1877
|
+
* The pending plan change — a Stripe Subscription Schedule the platform
|
|
1878
|
+
* minted, mirrored onto the account. `at` is when it applies (the current
|
|
1879
|
+
* period's end, Unix seconds). Reversible until then: `DELETE
|
|
1880
|
+
* /billing/change` releases it.
|
|
1863
1881
|
*/
|
|
1864
|
-
interface
|
|
1865
|
-
readonly plan
|
|
1866
|
-
readonly interval
|
|
1882
|
+
interface ScheduledChange {
|
|
1883
|
+
readonly plan: AccountPlanType;
|
|
1884
|
+
readonly interval: BillingInterval;
|
|
1885
|
+
readonly at: number;
|
|
1867
1886
|
}
|
|
1868
1887
|
/**
|
|
1869
|
-
* The answer of `POST /billing/
|
|
1870
|
-
*
|
|
1888
|
+
* The answer of `POST /billing/change` — exactly one field is set, and the
|
|
1889
|
+
* UNION is what holds that: an answer carrying both, or neither, does not
|
|
1890
|
+
* compile, so "which door was taken" is structural rather than prose.
|
|
1871
1891
|
*
|
|
1872
|
-
*
|
|
1873
|
-
*
|
|
1874
|
-
*
|
|
1875
|
-
*
|
|
1892
|
+
* `url` means GO: a Stripe page (Checkout, or the Portal's confirmation page)
|
|
1893
|
+
* finishes the change and the browser must be redirected to it. `scheduled`
|
|
1894
|
+
* means DONE: the downgrade is booked for period end, nothing to visit, and
|
|
1895
|
+
* the account's `scheduled` field now carries it.
|
|
1876
1896
|
*/
|
|
1877
|
-
|
|
1878
|
-
|
|
1897
|
+
type PlanChangeResponse =
|
|
1898
|
+
/** GO: a Stripe page finishes the change. Absolute URL, single use, short-lived. */
|
|
1899
|
+
{
|
|
1879
1900
|
readonly url: string;
|
|
1901
|
+
readonly scheduled?: never;
|
|
1880
1902
|
}
|
|
1903
|
+
/** DONE: the downgrade is booked for period end; nothing to visit. */
|
|
1904
|
+
| {
|
|
1905
|
+
readonly url?: never;
|
|
1906
|
+
readonly scheduled: ScheduledChange;
|
|
1907
|
+
};
|
|
1881
1908
|
/**
|
|
1882
1909
|
* The answer of `POST /billing/portal` — Stripe's `BillingPortal.Session`,
|
|
1883
|
-
* projected the
|
|
1884
|
-
*
|
|
1885
|
-
*
|
|
1910
|
+
* projected to the one field a client needs. The Portal home: cards,
|
|
1911
|
+
* invoices, cancellation. Plan changes have their own door
|
|
1912
|
+
* ({@link PlanChangeRequest}).
|
|
1886
1913
|
*/
|
|
1887
1914
|
interface BillingPortalSession {
|
|
1888
1915
|
/** Absolute URL to redirect the browser to. Single use, short-lived. */
|
|
@@ -3084,4 +3111,4 @@ declare class Ship extends Ship$1 {
|
|
|
3084
3111
|
protected processInput(input: DeployInput, options: DeploymentOptions): Promise<StaticFile[]>;
|
|
3085
3112
|
}
|
|
3086
3113
|
|
|
3087
|
-
export { API_KEY, API_PATHS, AUTH_BASE_PATH, type Account, type AccountDeleteResponse, type AccountGetResponse, type AccountKeyResponse, AccountPlan, type AccountPlanType, type AccountResource, type Activity, type ActivityEvent, type ActivityListResponse, type ActivityMeta, type ApiDeployOptions, ApiHttp, type ApiHttpOptions, AuthMethod, type AuthMethodType, type BillingInterval, type
|
|
3114
|
+
export { API_KEY, API_PATHS, AUTH_BASE_PATH, type Account, type AccountDeleteResponse, type AccountGetResponse, type AccountKeyResponse, AccountPlan, type AccountPlanType, type AccountResource, type Activity, type ActivityEvent, type ActivityListResponse, type ActivityMeta, type ApiDeployOptions, ApiHttp, type ApiHttpOptions, AuthMethod, type AuthMethodType, type BillingInterval, type BillingPortalSession, type BillingSyncResponse, CALLER, type Caps, DEFAULT_API, DEPLOYMENT_CONFIG_FILENAME, DEPLOY_FIELDS, DEPLOY_TOKEN, type DeployBodyContext, type DeployFile, type DeployInput, type DeployTransport, type Deployment, type DeploymentCreateResponse, type DeploymentDeleteResponse, type DeploymentListResponse, type DeploymentOptions, type DeploymentResource, type DeploymentResourceContext, type DeploymentSetOptions, DeploymentStatus, type DeploymentStatusType, type DeploymentUploadOptions, DeploymentVia, type DeploymentViaType, type DnsLookup, type DnsProvider, type DnsRecord, type DnsRecordType, type Domain, type DomainDeleteResponse, type DomainDnsResponse, type DomainListResponse, type DomainRecordsResponse, type DomainResource, type DomainSetOptions, type DomainSetResult, type DomainShareResponse, DomainStatus, type DomainStatusType, type DomainValidateResponse, type DomainVerifyResponse, type ErrorResponse, ErrorType, type ExecutionEnvironment, FileValidationStatus as FILE_VALIDATION_STATUS, type Fetch, type FileValidationResult, FileValidationStatus, type FileValidationStatusType, IDEMPOTENCY_KEY_CONSTRAINTS, JUNK_DIRECTORIES, LABEL_CONSTRAINTS, LABEL_PATTERN, type LabelsResponse, type ListOptions, type ListResponse, type MD5Result, MY_API_KEY_URL, OAUTH_TOKEN, OAuthScope, type OAuthScopeType, PASSWORD_CONSTRAINTS, PUBLIC_DEPLOYMENT_TTL_SECONDS, type PingResponse, type Plan, type PlanChangeRequest, type PlanChangeResponse, type PlansResponse, type PlatformLimits, type RequestResult, type ResourceContext, SHIP_ENV, SIGN_IN_RETURN_PARAM, type SPACheckDebug, type SPACheckRequest, type SPACheckResponse, SPA_CHECK_CONSTRAINTS, SPA_DEFAULT_CONFIG, type ScheduledChange, type SetupInstructionsResponse, Ship, type ShipClientOptions, ShipError, type ShipEvents, type ShipRequestInit, type StaticFile, TTL_CONSTRAINTS, type Token, type TokenCreateOptions, type TokenCreateResponse, type TokenDeleteResponse, TokenKind, type TokenKindType, type TokenListResponse, type TokenProvider, type TokenResource, type Transport, UNBUILT_PROJECT_MARKERS, UNSAFE_FILENAME_CHARS, type UploadedFile, type UserVisibleActivityEvent, type ValidatableFile, type ValidationIssue, WEB_FILE_ACCEPT, __setTestEnvironment, allValidFilesReady, assertShipJsonSyntax, calculateMD5, classifyToken, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, Ship as default, deserializeLabels, extractSubdomain, filterJunk, formatFileSize, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isCustomDomain, isDeployment, isPlatformDomain, isShipError, normalizeVia, optimizeDeployPaths, pluralize, processFilesForNode, readBearerValue, serializeLabels, validateApiKey, validateApiUrl, validateCaller, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validateOAuthToken, validatePassword, validateToken, validateTtl };
|