@ricsam/r5d-api 0.0.21 → 0.0.22
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/README.md +1 -0
- package/dist/cjs/index.cjs +11 -0
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/index.mjs +11 -0
- package/dist/mjs/package.json +1 -1
- package/dist/types/index.d.ts +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,6 +48,7 @@ Trusted server-side callers that authenticate through custom headers, such as a
|
|
|
48
48
|
- `projects.update(projectRef, { name?, mode? })`
|
|
49
49
|
- `projects.delete(projectRef)`
|
|
50
50
|
- `projects.branches.list/describe(projectRef, ...)`
|
|
51
|
+
- `projects.env.get/update(projectId, branchName, ...)`
|
|
51
52
|
- `projects.sessions.list(projectRef, { branch? })`
|
|
52
53
|
- `projects.sessions.create(projectRef, { branchName, name? })`
|
|
53
54
|
- `sessions.describe(sessionId)`
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -188,6 +188,17 @@ class R5dctlClient {
|
|
|
188
188
|
path: `/api/r5dctl/projects/${encodeURIComponent(projectRef)}/branches/${encodeURIComponent(branch)}`
|
|
189
189
|
})
|
|
190
190
|
},
|
|
191
|
+
env: {
|
|
192
|
+
get: (projectId, branchName) => this.request({
|
|
193
|
+
method: "GET",
|
|
194
|
+
path: `/api/projects/${encodeURIComponent(projectId)}/branches/${encodeURIComponent(branchName)}/env`
|
|
195
|
+
}),
|
|
196
|
+
update: (projectId, branchName, input) => this.request({
|
|
197
|
+
method: "PUT",
|
|
198
|
+
path: `/api/projects/${encodeURIComponent(projectId)}/branches/${encodeURIComponent(branchName)}/env`,
|
|
199
|
+
body: input
|
|
200
|
+
})
|
|
201
|
+
},
|
|
191
202
|
sessions: {
|
|
192
203
|
list: (projectRef, input) => this.request({
|
|
193
204
|
method: "GET",
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/index.mjs
CHANGED
|
@@ -164,6 +164,17 @@ class R5dctlClient {
|
|
|
164
164
|
path: `/api/r5dctl/projects/${encodeURIComponent(projectRef)}/branches/${encodeURIComponent(branch)}`
|
|
165
165
|
})
|
|
166
166
|
},
|
|
167
|
+
env: {
|
|
168
|
+
get: (projectId, branchName) => this.request({
|
|
169
|
+
method: "GET",
|
|
170
|
+
path: `/api/projects/${encodeURIComponent(projectId)}/branches/${encodeURIComponent(branchName)}/env`
|
|
171
|
+
}),
|
|
172
|
+
update: (projectId, branchName, input) => this.request({
|
|
173
|
+
method: "PUT",
|
|
174
|
+
path: `/api/projects/${encodeURIComponent(projectId)}/branches/${encodeURIComponent(branchName)}/env`,
|
|
175
|
+
body: input
|
|
176
|
+
})
|
|
177
|
+
},
|
|
167
178
|
sessions: {
|
|
168
179
|
list: (projectRef, input) => this.request({
|
|
169
180
|
method: "GET",
|
package/dist/mjs/package.json
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -151,6 +151,13 @@ export type R5dctlApiKey = {
|
|
|
151
151
|
export type R5dctlProjectUpdateInput = {
|
|
152
152
|
mode?: "greenfield" | "prod";
|
|
153
153
|
};
|
|
154
|
+
export type R5dctlEnvTarget = "backend" | "frontend";
|
|
155
|
+
export type R5dctlEnvValue = {
|
|
156
|
+
optional?: boolean;
|
|
157
|
+
description: string;
|
|
158
|
+
value: string | null;
|
|
159
|
+
};
|
|
160
|
+
export type R5dctlEnvData = Partial<Record<R5dctlEnvTarget, Record<string, R5dctlEnvValue>>>;
|
|
154
161
|
export type R5dctlSessionCreateInput = {
|
|
155
162
|
name?: string;
|
|
156
163
|
branchName: string;
|
|
@@ -231,6 +238,12 @@ export declare class R5dctlClient {
|
|
|
231
238
|
sessions: R5dctlSessionSummary[];
|
|
232
239
|
}>;
|
|
233
240
|
};
|
|
241
|
+
env: {
|
|
242
|
+
get: (projectId: string, branchName: string) => Promise<Partial<Record<R5dctlEnvTarget, Record<string, R5dctlEnvValue>>>>;
|
|
243
|
+
update: (projectId: string, branchName: string, input: R5dctlEnvData) => Promise<{
|
|
244
|
+
success: boolean;
|
|
245
|
+
}>;
|
|
246
|
+
};
|
|
234
247
|
sessions: {
|
|
235
248
|
list: (projectRef: string, input?: {
|
|
236
249
|
branch?: string;
|