@coffre/client 0.6.0 → 0.6.2
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-BHK1QCh7.d.ts → index-M5Gp4kSA.d.ts} +6 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -2
- package/dist/routes.d.ts +1 -1
- package/package.json +1 -1
- package/src/api.ts +2 -2
- package/src/index.ts +4 -2
|
@@ -73,7 +73,7 @@ type Api = {
|
|
|
73
73
|
};
|
|
74
74
|
"PUT /projects/:project": {
|
|
75
75
|
input: {
|
|
76
|
-
name
|
|
76
|
+
name?: string;
|
|
77
77
|
};
|
|
78
78
|
output: {
|
|
79
79
|
project: {
|
|
@@ -125,7 +125,7 @@ type Api = {
|
|
|
125
125
|
};
|
|
126
126
|
"PUT /projects/:project/:environment": {
|
|
127
127
|
input: {
|
|
128
|
-
name
|
|
128
|
+
name?: string;
|
|
129
129
|
from?: string;
|
|
130
130
|
references?: boolean;
|
|
131
131
|
};
|
|
@@ -1861,7 +1861,8 @@ declare function createClient(options: ClientOptions): {
|
|
|
1861
1861
|
secretCount: number | null;
|
|
1862
1862
|
}[];
|
|
1863
1863
|
}>;
|
|
1864
|
-
|
|
1864
|
+
/** Its `name`, which releases before 0.6.2 show, defaults to the slug. */
|
|
1865
|
+
create: (project: string, input?: RouteInput<"PUT /projects/:project">) => Promise<{
|
|
1865
1866
|
project: {
|
|
1866
1867
|
slug: string;
|
|
1867
1868
|
name: string;
|
|
@@ -1902,7 +1903,8 @@ declare function createClient(options: ClientOptions): {
|
|
|
1902
1903
|
}>;
|
|
1903
1904
|
};
|
|
1904
1905
|
environments: {
|
|
1905
|
-
|
|
1906
|
+
/** As a project's: its `name` defaults to the slug. `from` forks a sibling. */
|
|
1907
|
+
create: (path: string, input?: RouteInput<"PUT /projects/:project/:environment">) => Promise<{
|
|
1906
1908
|
environment: {
|
|
1907
1909
|
slug: string;
|
|
1908
1910
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as Decision, B as MemberAccess, C as ApprovalView, D as BindingPlan, E as AuthorizationView, F as DryRunResult, G as RemovedMember, H as OffboardingReport, I as IdentityRow, J as ServiceTokenRow, K as SecretKey, L as ListedReference, M as DeletionResult, N as DismissedKey, O as BindingView, P as DryRunOutcome, Q as WorkloadIds, R as Me, S as Api, T as AuthInfo, U as ProjectSummary, V as MissingKey, W as ReferenceView, X as SetResult, Y as SessionRow, Z as TokenPlan, _ as byFolder, a as Params, b as olderThan, c as RouteOutput, d as planImport, f as Unreachable, g as shownMember, h as serviceName, i as ImportAction, j as Deletion, k as ConnectedApp, l as Transport, m as apiMember, n as CoffreClient, o as RouteInput, p as unreachable, q as SecretVersion, r as CoffreError, s as RouteKey, t as ClientOptions, u as createClient, v as foldersOf, w as AuditEntryView, x as AccessValue, y as ageInDays, z as Member } from "./index-
|
|
1
|
+
import { A as Decision, B as MemberAccess, C as ApprovalView, D as BindingPlan, E as AuthorizationView, F as DryRunResult, G as RemovedMember, H as OffboardingReport, I as IdentityRow, J as ServiceTokenRow, K as SecretKey, L as ListedReference, M as DeletionResult, N as DismissedKey, O as BindingView, P as DryRunOutcome, Q as WorkloadIds, R as Me, S as Api, T as AuthInfo, U as ProjectSummary, V as MissingKey, W as ReferenceView, X as SetResult, Y as SessionRow, Z as TokenPlan, _ as byFolder, a as Params, b as olderThan, c as RouteOutput, d as planImport, f as Unreachable, g as shownMember, h as serviceName, i as ImportAction, j as Deletion, k as ConnectedApp, l as Transport, m as apiMember, n as CoffreClient, o as RouteInput, p as unreachable, q as SecretVersion, r as CoffreError, s as RouteKey, t as ClientOptions, u as createClient, v as foldersOf, w as AuditEntryView, x as AccessValue, y as ageInDays, z as Member } from "./index-M5Gp4kSA.js";
|
|
2
2
|
export { type AccessValue, type Api, type ApprovalView, type AuditEntryView, type AuthInfo, type AuthorizationView, type BindingPlan, type BindingView, ClientOptions, CoffreClient, CoffreError, type ConnectedApp, type Decision, type Deletion, type DeletionResult, type DismissedKey, type DryRunOutcome, type DryRunResult, type IdentityRow, ImportAction, type ListedReference, type Me, type Member, type MemberAccess, type MissingKey, type OffboardingReport, Params, type ProjectSummary, type ReferenceView, type RemovedMember, RouteInput, RouteKey, RouteOutput, type SecretKey, type SecretVersion, type ServiceTokenRow, type SessionRow, type SetResult, type TokenPlan, Transport, Unreachable, type WorkloadIds, ageInDays, apiMember, byFolder, createClient, foldersOf, olderThan, planImport, serviceName, shownMember, unreachable };
|
package/dist/index.js
CHANGED
|
@@ -178,7 +178,8 @@ function createClient(options) {
|
|
|
178
178
|
projects: {
|
|
179
179
|
/** With their environments. */
|
|
180
180
|
list: () => call("GET /projects", {}),
|
|
181
|
-
|
|
181
|
+
/** Its `name`, which releases before 0.6.2 show, defaults to the slug. */
|
|
182
|
+
create: (project, input = {}) => call("PUT /projects/:project", { project }, input),
|
|
182
183
|
update: (project, patch) => call("PATCH /projects/:project", { project }, patch),
|
|
183
184
|
/** What deleting an archived project would erase and revoke; changes nothing. */
|
|
184
185
|
previewDelete: (project) => {
|
|
@@ -189,7 +190,8 @@ function createClient(options) {
|
|
|
189
190
|
delete: (project) => call("DELETE /projects/:project", { project })
|
|
190
191
|
},
|
|
191
192
|
environments: {
|
|
192
|
-
|
|
193
|
+
/** As a project's: its `name` defaults to the slug. `from` forks a sibling. */
|
|
194
|
+
create: (path, input = {}) => call("PUT /projects/:project/:environment", place(path), input),
|
|
193
195
|
update: (path, patch) => call("PATCH /projects/:project/:environment", place(path), patch),
|
|
194
196
|
/** What deleting an archived environment would erase and revoke; changes nothing. */
|
|
195
197
|
previewDelete: (path) => {
|
package/dist/routes.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Params, o as RouteInput, s as RouteKey } from "./index-
|
|
1
|
+
import { a as Params, o as RouteInput, s as RouteKey } from "./index-M5Gp4kSA.js";
|
|
2
2
|
//#region src/routes.d.ts
|
|
3
3
|
export type GetKey = Extract<RouteKey, `GET ${string}`>;
|
|
4
4
|
/** Each GET route, with what to ask it. */
|
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -76,7 +76,7 @@ export type Api = {
|
|
|
76
76
|
};
|
|
77
77
|
"PUT /projects/:project": {
|
|
78
78
|
input: {
|
|
79
|
-
name
|
|
79
|
+
name?: string;
|
|
80
80
|
};
|
|
81
81
|
output: {
|
|
82
82
|
project: {
|
|
@@ -128,7 +128,7 @@ export type Api = {
|
|
|
128
128
|
};
|
|
129
129
|
"PUT /projects/:project/:environment": {
|
|
130
130
|
input: {
|
|
131
|
-
name
|
|
131
|
+
name?: string;
|
|
132
132
|
from?: string;
|
|
133
133
|
references?: boolean;
|
|
134
134
|
};
|
package/src/index.ts
CHANGED
|
@@ -173,7 +173,8 @@ export function createClient(options: ClientOptions) {
|
|
|
173
173
|
projects: {
|
|
174
174
|
/** With their environments. */
|
|
175
175
|
list: () => call('GET /projects', {}),
|
|
176
|
-
|
|
176
|
+
/** Its `name`, which releases before 0.6.2 show, defaults to the slug. */
|
|
177
|
+
create: (project: string, input: RouteInput<'PUT /projects/:project'> = {}) =>
|
|
177
178
|
call('PUT /projects/:project', { project }, input),
|
|
178
179
|
update: (project: string, patch: RouteInput<'PATCH /projects/:project'>) =>
|
|
179
180
|
call('PATCH /projects/:project', { project }, patch),
|
|
@@ -187,7 +188,8 @@ export function createClient(options: ClientOptions) {
|
|
|
187
188
|
},
|
|
188
189
|
|
|
189
190
|
environments: {
|
|
190
|
-
|
|
191
|
+
/** As a project's: its `name` defaults to the slug. `from` forks a sibling. */
|
|
192
|
+
create: (path: string, input: RouteInput<'PUT /projects/:project/:environment'> = {}) =>
|
|
191
193
|
call('PUT /projects/:project/:environment', place(path), input),
|
|
192
194
|
update: (path: string, patch: RouteInput<'PATCH /projects/:project/:environment'>) =>
|
|
193
195
|
call('PATCH /projects/:project/:environment', place(path), patch),
|