@inneropen/marvin-sdk 3.2.0-next.14 → 3.2.0-next.15
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/platform.cjs +24 -0
- package/dist/platform.d.cts +38 -0
- package/dist/platform.d.ts +38 -0
- package/dist/platform.js +24 -0
- package/package.json +1 -1
package/dist/platform.cjs
CHANGED
|
@@ -1836,6 +1836,28 @@ var SecretsModule = class {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
};
|
|
1838
1838
|
|
|
1839
|
+
// src/platform/variables.ts
|
|
1840
|
+
var VariablesModule = class {
|
|
1841
|
+
constructor(http) {
|
|
1842
|
+
this.http = http;
|
|
1843
|
+
}
|
|
1844
|
+
http;
|
|
1845
|
+
async list() {
|
|
1846
|
+
return this.http.get("/api/groups/variables");
|
|
1847
|
+
}
|
|
1848
|
+
async create(data) {
|
|
1849
|
+
return this.http.post("/api/groups/variables", data);
|
|
1850
|
+
}
|
|
1851
|
+
async update(id, data) {
|
|
1852
|
+
const validId = this.http.validatePathParam(id, "variable ID");
|
|
1853
|
+
return this.http.patch(`/api/groups/variables/${validId}`, data);
|
|
1854
|
+
}
|
|
1855
|
+
async delete(id) {
|
|
1856
|
+
const validId = this.http.validatePathParam(id, "variable ID");
|
|
1857
|
+
await this.http.delete(`/api/groups/variables/${validId}`);
|
|
1858
|
+
}
|
|
1859
|
+
};
|
|
1860
|
+
|
|
1839
1861
|
// src/platform/client.ts
|
|
1840
1862
|
function getEnv2(key) {
|
|
1841
1863
|
if (typeof process !== "undefined" && process.env) {
|
|
@@ -1871,6 +1893,7 @@ var PlatformClient = class extends HttpClient {
|
|
|
1871
1893
|
scheduledTasks;
|
|
1872
1894
|
forms;
|
|
1873
1895
|
secrets;
|
|
1896
|
+
variables;
|
|
1874
1897
|
// Admin modules
|
|
1875
1898
|
adminUsers;
|
|
1876
1899
|
adminSystem;
|
|
@@ -1902,6 +1925,7 @@ var PlatformClient = class extends HttpClient {
|
|
|
1902
1925
|
this.scheduledTasks = new ScheduledTasksModule(this);
|
|
1903
1926
|
this.forms = new FormsModule(this);
|
|
1904
1927
|
this.secrets = new SecretsModule(this);
|
|
1928
|
+
this.variables = new VariablesModule(this);
|
|
1905
1929
|
this.adminUsers = new AdminUsersModule(this);
|
|
1906
1930
|
this.adminSystem = new AdminSystemModule(this);
|
|
1907
1931
|
this.adminMaintenance = new AdminMaintenanceModule(this);
|
package/dist/platform.d.cts
CHANGED
|
@@ -1215,6 +1215,43 @@ declare class SecretsModule {
|
|
|
1215
1215
|
delete(id: string): Promise<void>;
|
|
1216
1216
|
}
|
|
1217
1217
|
|
|
1218
|
+
/**
|
|
1219
|
+
* Workspace Variables Module - Platform API
|
|
1220
|
+
*
|
|
1221
|
+
* Plain-text key-value config scoped to a workspace. Values are visible
|
|
1222
|
+
* in API responses (unlike Secrets which are write-only).
|
|
1223
|
+
* Referenced in webhook headers, email templates, and other configs
|
|
1224
|
+
* via {{SLUG}} syntax. Secrets take priority on slug collision.
|
|
1225
|
+
*/
|
|
1226
|
+
|
|
1227
|
+
interface WorkspaceVariable {
|
|
1228
|
+
id: string;
|
|
1229
|
+
groupId: string;
|
|
1230
|
+
name: string;
|
|
1231
|
+
slug: string;
|
|
1232
|
+
description: string | null;
|
|
1233
|
+
value: string;
|
|
1234
|
+
}
|
|
1235
|
+
interface WorkspaceVariableCreate {
|
|
1236
|
+
name: string;
|
|
1237
|
+
slug: string;
|
|
1238
|
+
description?: string | null;
|
|
1239
|
+
value: string;
|
|
1240
|
+
}
|
|
1241
|
+
interface WorkspaceVariableUpdate {
|
|
1242
|
+
name?: string;
|
|
1243
|
+
description?: string | null;
|
|
1244
|
+
value?: string;
|
|
1245
|
+
}
|
|
1246
|
+
declare class VariablesModule {
|
|
1247
|
+
private http;
|
|
1248
|
+
constructor(http: HttpClient);
|
|
1249
|
+
list(): Promise<WorkspaceVariable[]>;
|
|
1250
|
+
create(data: WorkspaceVariableCreate): Promise<WorkspaceVariable>;
|
|
1251
|
+
update(id: string, data: WorkspaceVariableUpdate): Promise<WorkspaceVariable>;
|
|
1252
|
+
delete(id: string): Promise<void>;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1218
1255
|
/**
|
|
1219
1256
|
* Platform API Client
|
|
1220
1257
|
*
|
|
@@ -1248,6 +1285,7 @@ declare class PlatformClient extends HttpClient {
|
|
|
1248
1285
|
scheduledTasks: ScheduledTasksModule;
|
|
1249
1286
|
forms: FormsModule;
|
|
1250
1287
|
secrets: SecretsModule;
|
|
1288
|
+
variables: VariablesModule;
|
|
1251
1289
|
adminUsers: AdminUsersModule;
|
|
1252
1290
|
adminSystem: AdminSystemModule;
|
|
1253
1291
|
adminMaintenance: AdminMaintenanceModule;
|
package/dist/platform.d.ts
CHANGED
|
@@ -1215,6 +1215,43 @@ declare class SecretsModule {
|
|
|
1215
1215
|
delete(id: string): Promise<void>;
|
|
1216
1216
|
}
|
|
1217
1217
|
|
|
1218
|
+
/**
|
|
1219
|
+
* Workspace Variables Module - Platform API
|
|
1220
|
+
*
|
|
1221
|
+
* Plain-text key-value config scoped to a workspace. Values are visible
|
|
1222
|
+
* in API responses (unlike Secrets which are write-only).
|
|
1223
|
+
* Referenced in webhook headers, email templates, and other configs
|
|
1224
|
+
* via {{SLUG}} syntax. Secrets take priority on slug collision.
|
|
1225
|
+
*/
|
|
1226
|
+
|
|
1227
|
+
interface WorkspaceVariable {
|
|
1228
|
+
id: string;
|
|
1229
|
+
groupId: string;
|
|
1230
|
+
name: string;
|
|
1231
|
+
slug: string;
|
|
1232
|
+
description: string | null;
|
|
1233
|
+
value: string;
|
|
1234
|
+
}
|
|
1235
|
+
interface WorkspaceVariableCreate {
|
|
1236
|
+
name: string;
|
|
1237
|
+
slug: string;
|
|
1238
|
+
description?: string | null;
|
|
1239
|
+
value: string;
|
|
1240
|
+
}
|
|
1241
|
+
interface WorkspaceVariableUpdate {
|
|
1242
|
+
name?: string;
|
|
1243
|
+
description?: string | null;
|
|
1244
|
+
value?: string;
|
|
1245
|
+
}
|
|
1246
|
+
declare class VariablesModule {
|
|
1247
|
+
private http;
|
|
1248
|
+
constructor(http: HttpClient);
|
|
1249
|
+
list(): Promise<WorkspaceVariable[]>;
|
|
1250
|
+
create(data: WorkspaceVariableCreate): Promise<WorkspaceVariable>;
|
|
1251
|
+
update(id: string, data: WorkspaceVariableUpdate): Promise<WorkspaceVariable>;
|
|
1252
|
+
delete(id: string): Promise<void>;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1218
1255
|
/**
|
|
1219
1256
|
* Platform API Client
|
|
1220
1257
|
*
|
|
@@ -1248,6 +1285,7 @@ declare class PlatformClient extends HttpClient {
|
|
|
1248
1285
|
scheduledTasks: ScheduledTasksModule;
|
|
1249
1286
|
forms: FormsModule;
|
|
1250
1287
|
secrets: SecretsModule;
|
|
1288
|
+
variables: VariablesModule;
|
|
1251
1289
|
adminUsers: AdminUsersModule;
|
|
1252
1290
|
adminSystem: AdminSystemModule;
|
|
1253
1291
|
adminMaintenance: AdminMaintenanceModule;
|
package/dist/platform.js
CHANGED
|
@@ -1393,6 +1393,28 @@ var SecretsModule = class {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
};
|
|
1395
1395
|
|
|
1396
|
+
// src/platform/variables.ts
|
|
1397
|
+
var VariablesModule = class {
|
|
1398
|
+
constructor(http) {
|
|
1399
|
+
this.http = http;
|
|
1400
|
+
}
|
|
1401
|
+
http;
|
|
1402
|
+
async list() {
|
|
1403
|
+
return this.http.get("/api/groups/variables");
|
|
1404
|
+
}
|
|
1405
|
+
async create(data) {
|
|
1406
|
+
return this.http.post("/api/groups/variables", data);
|
|
1407
|
+
}
|
|
1408
|
+
async update(id, data) {
|
|
1409
|
+
const validId = this.http.validatePathParam(id, "variable ID");
|
|
1410
|
+
return this.http.patch(`/api/groups/variables/${validId}`, data);
|
|
1411
|
+
}
|
|
1412
|
+
async delete(id) {
|
|
1413
|
+
const validId = this.http.validatePathParam(id, "variable ID");
|
|
1414
|
+
await this.http.delete(`/api/groups/variables/${validId}`);
|
|
1415
|
+
}
|
|
1416
|
+
};
|
|
1417
|
+
|
|
1396
1418
|
// src/platform/client.ts
|
|
1397
1419
|
function getEnv2(key) {
|
|
1398
1420
|
if (typeof process !== "undefined" && process.env) {
|
|
@@ -1428,6 +1450,7 @@ var PlatformClient = class extends HttpClient {
|
|
|
1428
1450
|
scheduledTasks;
|
|
1429
1451
|
forms;
|
|
1430
1452
|
secrets;
|
|
1453
|
+
variables;
|
|
1431
1454
|
// Admin modules
|
|
1432
1455
|
adminUsers;
|
|
1433
1456
|
adminSystem;
|
|
@@ -1459,6 +1482,7 @@ var PlatformClient = class extends HttpClient {
|
|
|
1459
1482
|
this.scheduledTasks = new ScheduledTasksModule(this);
|
|
1460
1483
|
this.forms = new FormsModule(this);
|
|
1461
1484
|
this.secrets = new SecretsModule(this);
|
|
1485
|
+
this.variables = new VariablesModule(this);
|
|
1462
1486
|
this.adminUsers = new AdminUsersModule(this);
|
|
1463
1487
|
this.adminSystem = new AdminSystemModule(this);
|
|
1464
1488
|
this.adminMaintenance = new AdminMaintenanceModule(this);
|