@inneropen/marvin-sdk 3.2.0-next.13 → 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 CHANGED
@@ -1796,6 +1796,68 @@ var FormsModule = class {
1796
1796
  }
1797
1797
  };
1798
1798
 
1799
+ // src/platform/secrets.ts
1800
+ var SecretsModule = class {
1801
+ constructor(http) {
1802
+ this.http = http;
1803
+ }
1804
+ http;
1805
+ /**
1806
+ * List all secrets (metadata only — no values)
1807
+ */
1808
+ async list() {
1809
+ return this.http.get("/api/groups/secrets");
1810
+ }
1811
+ /**
1812
+ * List available slugs for {{SLUG}} autocomplete
1813
+ */
1814
+ async slugs() {
1815
+ return this.http.get("/api/groups/secrets/slugs");
1816
+ }
1817
+ /**
1818
+ * Create a new secret. Value is encrypted on write and never returned.
1819
+ */
1820
+ async create(data) {
1821
+ return this.http.post("/api/groups/secrets", data);
1822
+ }
1823
+ /**
1824
+ * Update a secret's name, description, or value.
1825
+ */
1826
+ async update(id, data) {
1827
+ const validId = this.http.validatePathParam(id, "secret ID");
1828
+ return this.http.patch(`/api/groups/secrets/${validId}`, data);
1829
+ }
1830
+ /**
1831
+ * Delete a secret.
1832
+ */
1833
+ async delete(id) {
1834
+ const validId = this.http.validatePathParam(id, "secret ID");
1835
+ await this.http.delete(`/api/groups/secrets/${validId}`);
1836
+ }
1837
+ };
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
+
1799
1861
  // src/platform/client.ts
1800
1862
  function getEnv2(key) {
1801
1863
  if (typeof process !== "undefined" && process.env) {
@@ -1830,6 +1892,8 @@ var PlatformClient = class extends HttpClient {
1830
1892
  emailTemplates;
1831
1893
  scheduledTasks;
1832
1894
  forms;
1895
+ secrets;
1896
+ variables;
1833
1897
  // Admin modules
1834
1898
  adminUsers;
1835
1899
  adminSystem;
@@ -1860,6 +1924,8 @@ var PlatformClient = class extends HttpClient {
1860
1924
  this.emailTemplates = new EmailTemplatesClient(this);
1861
1925
  this.scheduledTasks = new ScheduledTasksModule(this);
1862
1926
  this.forms = new FormsModule(this);
1927
+ this.secrets = new SecretsModule(this);
1928
+ this.variables = new VariablesModule(this);
1863
1929
  this.adminUsers = new AdminUsersModule(this);
1864
1930
  this.adminSystem = new AdminSystemModule(this);
1865
1931
  this.adminMaintenance = new AdminMaintenanceModule(this);
@@ -1164,6 +1164,94 @@ declare class FormsModule {
1164
1164
  submitForm(slug: string, data: Record<string, unknown>): Promise<PlatformFormSubmission>;
1165
1165
  }
1166
1166
 
1167
+ /**
1168
+ * Workspace Secrets Module - Platform API
1169
+ *
1170
+ * Manage workspace secrets referenced by {{SLUG}} in webhook headers
1171
+ * and other integration configs. Values are write-only — never returned
1172
+ * in list or read responses (like GitHub Secrets).
1173
+ */
1174
+
1175
+ interface WorkspaceSecret {
1176
+ id: string;
1177
+ groupId: string;
1178
+ name: string;
1179
+ slug: string;
1180
+ description: string | null;
1181
+ }
1182
+ interface WorkspaceSecretCreate {
1183
+ name: string;
1184
+ slug: string;
1185
+ description?: string | null;
1186
+ value: string;
1187
+ }
1188
+ interface WorkspaceSecretUpdate {
1189
+ name?: string;
1190
+ description?: string | null;
1191
+ value?: string;
1192
+ }
1193
+ declare class SecretsModule {
1194
+ private http;
1195
+ constructor(http: HttpClient);
1196
+ /**
1197
+ * List all secrets (metadata only — no values)
1198
+ */
1199
+ list(): Promise<WorkspaceSecret[]>;
1200
+ /**
1201
+ * List available slugs for {{SLUG}} autocomplete
1202
+ */
1203
+ slugs(): Promise<string[]>;
1204
+ /**
1205
+ * Create a new secret. Value is encrypted on write and never returned.
1206
+ */
1207
+ create(data: WorkspaceSecretCreate): Promise<WorkspaceSecret>;
1208
+ /**
1209
+ * Update a secret's name, description, or value.
1210
+ */
1211
+ update(id: string, data: WorkspaceSecretUpdate): Promise<WorkspaceSecret>;
1212
+ /**
1213
+ * Delete a secret.
1214
+ */
1215
+ delete(id: string): Promise<void>;
1216
+ }
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
+
1167
1255
  /**
1168
1256
  * Platform API Client
1169
1257
  *
@@ -1196,6 +1284,8 @@ declare class PlatformClient extends HttpClient {
1196
1284
  emailTemplates: EmailTemplatesClient;
1197
1285
  scheduledTasks: ScheduledTasksModule;
1198
1286
  forms: FormsModule;
1287
+ secrets: SecretsModule;
1288
+ variables: VariablesModule;
1199
1289
  adminUsers: AdminUsersModule;
1200
1290
  adminSystem: AdminSystemModule;
1201
1291
  adminMaintenance: AdminMaintenanceModule;
@@ -1164,6 +1164,94 @@ declare class FormsModule {
1164
1164
  submitForm(slug: string, data: Record<string, unknown>): Promise<PlatformFormSubmission>;
1165
1165
  }
1166
1166
 
1167
+ /**
1168
+ * Workspace Secrets Module - Platform API
1169
+ *
1170
+ * Manage workspace secrets referenced by {{SLUG}} in webhook headers
1171
+ * and other integration configs. Values are write-only — never returned
1172
+ * in list or read responses (like GitHub Secrets).
1173
+ */
1174
+
1175
+ interface WorkspaceSecret {
1176
+ id: string;
1177
+ groupId: string;
1178
+ name: string;
1179
+ slug: string;
1180
+ description: string | null;
1181
+ }
1182
+ interface WorkspaceSecretCreate {
1183
+ name: string;
1184
+ slug: string;
1185
+ description?: string | null;
1186
+ value: string;
1187
+ }
1188
+ interface WorkspaceSecretUpdate {
1189
+ name?: string;
1190
+ description?: string | null;
1191
+ value?: string;
1192
+ }
1193
+ declare class SecretsModule {
1194
+ private http;
1195
+ constructor(http: HttpClient);
1196
+ /**
1197
+ * List all secrets (metadata only — no values)
1198
+ */
1199
+ list(): Promise<WorkspaceSecret[]>;
1200
+ /**
1201
+ * List available slugs for {{SLUG}} autocomplete
1202
+ */
1203
+ slugs(): Promise<string[]>;
1204
+ /**
1205
+ * Create a new secret. Value is encrypted on write and never returned.
1206
+ */
1207
+ create(data: WorkspaceSecretCreate): Promise<WorkspaceSecret>;
1208
+ /**
1209
+ * Update a secret's name, description, or value.
1210
+ */
1211
+ update(id: string, data: WorkspaceSecretUpdate): Promise<WorkspaceSecret>;
1212
+ /**
1213
+ * Delete a secret.
1214
+ */
1215
+ delete(id: string): Promise<void>;
1216
+ }
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
+
1167
1255
  /**
1168
1256
  * Platform API Client
1169
1257
  *
@@ -1196,6 +1284,8 @@ declare class PlatformClient extends HttpClient {
1196
1284
  emailTemplates: EmailTemplatesClient;
1197
1285
  scheduledTasks: ScheduledTasksModule;
1198
1286
  forms: FormsModule;
1287
+ secrets: SecretsModule;
1288
+ variables: VariablesModule;
1199
1289
  adminUsers: AdminUsersModule;
1200
1290
  adminSystem: AdminSystemModule;
1201
1291
  adminMaintenance: AdminMaintenanceModule;
package/dist/platform.js CHANGED
@@ -1353,6 +1353,68 @@ var FormsModule = class {
1353
1353
  }
1354
1354
  };
1355
1355
 
1356
+ // src/platform/secrets.ts
1357
+ var SecretsModule = class {
1358
+ constructor(http) {
1359
+ this.http = http;
1360
+ }
1361
+ http;
1362
+ /**
1363
+ * List all secrets (metadata only — no values)
1364
+ */
1365
+ async list() {
1366
+ return this.http.get("/api/groups/secrets");
1367
+ }
1368
+ /**
1369
+ * List available slugs for {{SLUG}} autocomplete
1370
+ */
1371
+ async slugs() {
1372
+ return this.http.get("/api/groups/secrets/slugs");
1373
+ }
1374
+ /**
1375
+ * Create a new secret. Value is encrypted on write and never returned.
1376
+ */
1377
+ async create(data) {
1378
+ return this.http.post("/api/groups/secrets", data);
1379
+ }
1380
+ /**
1381
+ * Update a secret's name, description, or value.
1382
+ */
1383
+ async update(id, data) {
1384
+ const validId = this.http.validatePathParam(id, "secret ID");
1385
+ return this.http.patch(`/api/groups/secrets/${validId}`, data);
1386
+ }
1387
+ /**
1388
+ * Delete a secret.
1389
+ */
1390
+ async delete(id) {
1391
+ const validId = this.http.validatePathParam(id, "secret ID");
1392
+ await this.http.delete(`/api/groups/secrets/${validId}`);
1393
+ }
1394
+ };
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
+
1356
1418
  // src/platform/client.ts
1357
1419
  function getEnv2(key) {
1358
1420
  if (typeof process !== "undefined" && process.env) {
@@ -1387,6 +1449,8 @@ var PlatformClient = class extends HttpClient {
1387
1449
  emailTemplates;
1388
1450
  scheduledTasks;
1389
1451
  forms;
1452
+ secrets;
1453
+ variables;
1390
1454
  // Admin modules
1391
1455
  adminUsers;
1392
1456
  adminSystem;
@@ -1417,6 +1481,8 @@ var PlatformClient = class extends HttpClient {
1417
1481
  this.emailTemplates = new EmailTemplatesClient(this);
1418
1482
  this.scheduledTasks = new ScheduledTasksModule(this);
1419
1483
  this.forms = new FormsModule(this);
1484
+ this.secrets = new SecretsModule(this);
1485
+ this.variables = new VariablesModule(this);
1420
1486
  this.adminUsers = new AdminUsersModule(this);
1421
1487
  this.adminSystem = new AdminSystemModule(this);
1422
1488
  this.adminMaintenance = new AdminMaintenanceModule(this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inneropen/marvin-sdk",
3
- "version": "3.2.0-next.13",
3
+ "version": "3.2.0-next.15",
4
4
  "description": "Official TypeScript SDK for Marvin CMS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",