@gigadrive/sdk 0.5.0 → 0.6.1
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.mts +61 -2
- package/dist/index.d.ts +61 -2
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2202,6 +2202,44 @@ interface Application {
|
|
|
2202
2202
|
/** ISO 8601 last-updated timestamp. */
|
|
2203
2203
|
updatedAt: string;
|
|
2204
2204
|
}
|
|
2205
|
+
/** Input accepted when creating a Gigadrive Network application. */
|
|
2206
|
+
interface CreateApplicationInput {
|
|
2207
|
+
/** Organization that will own the application. */
|
|
2208
|
+
organizationId: string;
|
|
2209
|
+
/** Display name. Surrounding whitespace is removed by the API. */
|
|
2210
|
+
name: string;
|
|
2211
|
+
/** Optional lowercase slug. Generated from {@link name} when omitted. */
|
|
2212
|
+
slug?: string;
|
|
2213
|
+
/**
|
|
2214
|
+
* Project directory relative to the repository root. The API normalizes
|
|
2215
|
+
* redundant separators and rejects absolute paths and traversal segments.
|
|
2216
|
+
*/
|
|
2217
|
+
rootDirectory?: string;
|
|
2218
|
+
}
|
|
2219
|
+
/**
|
|
2220
|
+
* Application creation result used to start the first deployment without an
|
|
2221
|
+
* additional lookup.
|
|
2222
|
+
*/
|
|
2223
|
+
interface CreatedApplication {
|
|
2224
|
+
/** Stable application UUID. */
|
|
2225
|
+
id: string;
|
|
2226
|
+
/** Owning organization UUID. */
|
|
2227
|
+
organizationId: string;
|
|
2228
|
+
/** Normalized display name. */
|
|
2229
|
+
name: string;
|
|
2230
|
+
/** Generated or caller-supplied application slug. */
|
|
2231
|
+
slug: string;
|
|
2232
|
+
/** Application icon URL. */
|
|
2233
|
+
imageUrl: string;
|
|
2234
|
+
/** Normalized project directory, or `null` for the repository root. */
|
|
2235
|
+
rootDirectory: string | null;
|
|
2236
|
+
/** Production environment slug to use for the first deployment. */
|
|
2237
|
+
defaultEnvironmentSlug: string;
|
|
2238
|
+
/** ISO 8601 creation timestamp. */
|
|
2239
|
+
createdAt: string;
|
|
2240
|
+
/** ISO 8601 last-updated timestamp. */
|
|
2241
|
+
updatedAt: string;
|
|
2242
|
+
}
|
|
2205
2243
|
/** Query filters for listing applications. */
|
|
2206
2244
|
interface ListApplicationsQuery extends ListQuery {
|
|
2207
2245
|
/** Only return applications belonging to this organization. */
|
|
@@ -2273,6 +2311,27 @@ declare class ApplicationsResource extends BaseResource {
|
|
|
2273
2311
|
* ```
|
|
2274
2312
|
*/
|
|
2275
2313
|
list(query?: ListApplicationsQuery): Promise<Paginated<Application>>;
|
|
2314
|
+
/**
|
|
2315
|
+
* Creates an application with production and preview environments.
|
|
2316
|
+
*
|
|
2317
|
+
* Requires the `network:applications:write` scope and access to the owning
|
|
2318
|
+
* organization. Application-, deployment-, and function-scoped tokens cannot
|
|
2319
|
+
* create applications.
|
|
2320
|
+
*
|
|
2321
|
+
* @param input - Ownership, display name, and optional repository layout.
|
|
2322
|
+
* @returns The persisted application plus the default production environment
|
|
2323
|
+
* slug, ready for an immediate deployment request.
|
|
2324
|
+
*
|
|
2325
|
+
* @example
|
|
2326
|
+
* ```ts
|
|
2327
|
+
* const app = await client.applications.create({
|
|
2328
|
+
* organizationId: 'org-id',
|
|
2329
|
+
* name: 'Next.js Storefront',
|
|
2330
|
+
* });
|
|
2331
|
+
* console.log(app.id, app.defaultEnvironmentSlug);
|
|
2332
|
+
* ```
|
|
2333
|
+
*/
|
|
2334
|
+
create(input: CreateApplicationInput): Promise<CreatedApplication>;
|
|
2276
2335
|
/**
|
|
2277
2336
|
* List the `*.gigadrive.app` hostnames for an application (production alias
|
|
2278
2337
|
* and per-branch aliases).
|
|
@@ -2337,7 +2396,7 @@ declare class ApplicationsResource extends BaseResource {
|
|
|
2337
2396
|
*/
|
|
2338
2397
|
type DeploymentStatus = 'PENDING' | 'QUEUED' | 'STARTING' | 'BUILDING' | 'PROVISIONING' | 'ACTIVE' | 'FAILED';
|
|
2339
2398
|
/** The severity level of a deployment log entry. */
|
|
2340
|
-
type DeploymentLogType = 'INFO' | 'ERROR' | 'WARN';
|
|
2399
|
+
type DeploymentLogType = 'INFO' | 'ERROR' | 'WARN' | 'DEBUG';
|
|
2341
2400
|
/** A deployment of an application to the Gigadrive Network. */
|
|
2342
2401
|
interface Deployment {
|
|
2343
2402
|
/** Unique identifier (UUID). */
|
|
@@ -2357,7 +2416,7 @@ interface DeploymentLog {
|
|
|
2357
2416
|
id: string;
|
|
2358
2417
|
/** The log message text. */
|
|
2359
2418
|
message: string;
|
|
2360
|
-
/** Severity level: `"INFO"`, `"ERROR"`, or `"
|
|
2419
|
+
/** Severity level: `"INFO"`, `"ERROR"`, `"WARN"`, or `"DEBUG"`. */
|
|
2361
2420
|
type: DeploymentLogType;
|
|
2362
2421
|
/** ISO 8601 timestamp of when this log entry was created. */
|
|
2363
2422
|
createdAt: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2202,6 +2202,44 @@ interface Application {
|
|
|
2202
2202
|
/** ISO 8601 last-updated timestamp. */
|
|
2203
2203
|
updatedAt: string;
|
|
2204
2204
|
}
|
|
2205
|
+
/** Input accepted when creating a Gigadrive Network application. */
|
|
2206
|
+
interface CreateApplicationInput {
|
|
2207
|
+
/** Organization that will own the application. */
|
|
2208
|
+
organizationId: string;
|
|
2209
|
+
/** Display name. Surrounding whitespace is removed by the API. */
|
|
2210
|
+
name: string;
|
|
2211
|
+
/** Optional lowercase slug. Generated from {@link name} when omitted. */
|
|
2212
|
+
slug?: string;
|
|
2213
|
+
/**
|
|
2214
|
+
* Project directory relative to the repository root. The API normalizes
|
|
2215
|
+
* redundant separators and rejects absolute paths and traversal segments.
|
|
2216
|
+
*/
|
|
2217
|
+
rootDirectory?: string;
|
|
2218
|
+
}
|
|
2219
|
+
/**
|
|
2220
|
+
* Application creation result used to start the first deployment without an
|
|
2221
|
+
* additional lookup.
|
|
2222
|
+
*/
|
|
2223
|
+
interface CreatedApplication {
|
|
2224
|
+
/** Stable application UUID. */
|
|
2225
|
+
id: string;
|
|
2226
|
+
/** Owning organization UUID. */
|
|
2227
|
+
organizationId: string;
|
|
2228
|
+
/** Normalized display name. */
|
|
2229
|
+
name: string;
|
|
2230
|
+
/** Generated or caller-supplied application slug. */
|
|
2231
|
+
slug: string;
|
|
2232
|
+
/** Application icon URL. */
|
|
2233
|
+
imageUrl: string;
|
|
2234
|
+
/** Normalized project directory, or `null` for the repository root. */
|
|
2235
|
+
rootDirectory: string | null;
|
|
2236
|
+
/** Production environment slug to use for the first deployment. */
|
|
2237
|
+
defaultEnvironmentSlug: string;
|
|
2238
|
+
/** ISO 8601 creation timestamp. */
|
|
2239
|
+
createdAt: string;
|
|
2240
|
+
/** ISO 8601 last-updated timestamp. */
|
|
2241
|
+
updatedAt: string;
|
|
2242
|
+
}
|
|
2205
2243
|
/** Query filters for listing applications. */
|
|
2206
2244
|
interface ListApplicationsQuery extends ListQuery {
|
|
2207
2245
|
/** Only return applications belonging to this organization. */
|
|
@@ -2273,6 +2311,27 @@ declare class ApplicationsResource extends BaseResource {
|
|
|
2273
2311
|
* ```
|
|
2274
2312
|
*/
|
|
2275
2313
|
list(query?: ListApplicationsQuery): Promise<Paginated<Application>>;
|
|
2314
|
+
/**
|
|
2315
|
+
* Creates an application with production and preview environments.
|
|
2316
|
+
*
|
|
2317
|
+
* Requires the `network:applications:write` scope and access to the owning
|
|
2318
|
+
* organization. Application-, deployment-, and function-scoped tokens cannot
|
|
2319
|
+
* create applications.
|
|
2320
|
+
*
|
|
2321
|
+
* @param input - Ownership, display name, and optional repository layout.
|
|
2322
|
+
* @returns The persisted application plus the default production environment
|
|
2323
|
+
* slug, ready for an immediate deployment request.
|
|
2324
|
+
*
|
|
2325
|
+
* @example
|
|
2326
|
+
* ```ts
|
|
2327
|
+
* const app = await client.applications.create({
|
|
2328
|
+
* organizationId: 'org-id',
|
|
2329
|
+
* name: 'Next.js Storefront',
|
|
2330
|
+
* });
|
|
2331
|
+
* console.log(app.id, app.defaultEnvironmentSlug);
|
|
2332
|
+
* ```
|
|
2333
|
+
*/
|
|
2334
|
+
create(input: CreateApplicationInput): Promise<CreatedApplication>;
|
|
2276
2335
|
/**
|
|
2277
2336
|
* List the `*.gigadrive.app` hostnames for an application (production alias
|
|
2278
2337
|
* and per-branch aliases).
|
|
@@ -2337,7 +2396,7 @@ declare class ApplicationsResource extends BaseResource {
|
|
|
2337
2396
|
*/
|
|
2338
2397
|
type DeploymentStatus = 'PENDING' | 'QUEUED' | 'STARTING' | 'BUILDING' | 'PROVISIONING' | 'ACTIVE' | 'FAILED';
|
|
2339
2398
|
/** The severity level of a deployment log entry. */
|
|
2340
|
-
type DeploymentLogType = 'INFO' | 'ERROR' | 'WARN';
|
|
2399
|
+
type DeploymentLogType = 'INFO' | 'ERROR' | 'WARN' | 'DEBUG';
|
|
2341
2400
|
/** A deployment of an application to the Gigadrive Network. */
|
|
2342
2401
|
interface Deployment {
|
|
2343
2402
|
/** Unique identifier (UUID). */
|
|
@@ -2357,7 +2416,7 @@ interface DeploymentLog {
|
|
|
2357
2416
|
id: string;
|
|
2358
2417
|
/** The log message text. */
|
|
2359
2418
|
message: string;
|
|
2360
|
-
/** Severity level: `"INFO"`, `"ERROR"`, or `"
|
|
2419
|
+
/** Severity level: `"INFO"`, `"ERROR"`, `"WARN"`, or `"DEBUG"`. */
|
|
2361
2420
|
type: DeploymentLogType;
|
|
2362
2421
|
/** ISO 8601 timestamp of when this log entry was created. */
|
|
2363
2422
|
createdAt: string;
|
package/dist/index.js
CHANGED
|
@@ -1674,6 +1674,29 @@ var ApplicationsResource = class extends BaseResource {
|
|
|
1674
1674
|
query
|
|
1675
1675
|
});
|
|
1676
1676
|
}
|
|
1677
|
+
/**
|
|
1678
|
+
* Creates an application with production and preview environments.
|
|
1679
|
+
*
|
|
1680
|
+
* Requires the `network:applications:write` scope and access to the owning
|
|
1681
|
+
* organization. Application-, deployment-, and function-scoped tokens cannot
|
|
1682
|
+
* create applications.
|
|
1683
|
+
*
|
|
1684
|
+
* @param input - Ownership, display name, and optional repository layout.
|
|
1685
|
+
* @returns The persisted application plus the default production environment
|
|
1686
|
+
* slug, ready for an immediate deployment request.
|
|
1687
|
+
*
|
|
1688
|
+
* @example
|
|
1689
|
+
* ```ts
|
|
1690
|
+
* const app = await client.applications.create({
|
|
1691
|
+
* organizationId: 'org-id',
|
|
1692
|
+
* name: 'Next.js Storefront',
|
|
1693
|
+
* });
|
|
1694
|
+
* console.log(app.id, app.defaultEnvironmentSlug);
|
|
1695
|
+
* ```
|
|
1696
|
+
*/
|
|
1697
|
+
async create(input) {
|
|
1698
|
+
return this.httpClient.post("/applications", input);
|
|
1699
|
+
}
|
|
1677
1700
|
/**
|
|
1678
1701
|
* List the `*.gigadrive.app` hostnames for an application (production alias
|
|
1679
1702
|
* and per-branch aliases).
|