@inneropen/marvin-sdk 3.2.0-next.12 → 3.2.0-next.14

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
@@ -1191,11 +1191,26 @@ var WebhooksModule = class {
1191
1191
  await this.http.delete(`/api/groups/webhooks/${validId}`);
1192
1192
  }
1193
1193
  /**
1194
- * Test a webhook
1194
+ * Test a webhook — fires a test request in the background
1195
1195
  */
1196
1196
  async test(id) {
1197
1197
  const validId = this.http.validatePathParam(id, "webhook ID");
1198
- return this.http.post(`/api/groups/webhooks/${validId}/test`, {});
1198
+ return this.http.get(`/api/groups/webhooks/${validId}/test`);
1199
+ }
1200
+ /**
1201
+ * Get execution logs for a specific webhook
1202
+ */
1203
+ async logs(id, options) {
1204
+ const validId = this.http.validatePathParam(id, "webhook ID");
1205
+ const params = options?.limit ? `?limit=${options.limit}` : "";
1206
+ return this.http.get(`/api/groups/webhooks/${validId}/logs${params}`);
1207
+ }
1208
+ /**
1209
+ * Get workspace-wide webhook execution log
1210
+ */
1211
+ async log(options) {
1212
+ const params = options?.limit ? `?limit=${options.limit}` : "";
1213
+ return this.http.get(`/api/groups/webhooks/log${params}`);
1199
1214
  }
1200
1215
  /**
1201
1216
  * Rerun failed webhooks
@@ -1781,6 +1796,46 @@ var FormsModule = class {
1781
1796
  }
1782
1797
  };
1783
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
+
1784
1839
  // src/platform/client.ts
1785
1840
  function getEnv2(key) {
1786
1841
  if (typeof process !== "undefined" && process.env) {
@@ -1815,6 +1870,7 @@ var PlatformClient = class extends HttpClient {
1815
1870
  emailTemplates;
1816
1871
  scheduledTasks;
1817
1872
  forms;
1873
+ secrets;
1818
1874
  // Admin modules
1819
1875
  adminUsers;
1820
1876
  adminSystem;
@@ -1845,6 +1901,7 @@ var PlatformClient = class extends HttpClient {
1845
1901
  this.emailTemplates = new EmailTemplatesClient(this);
1846
1902
  this.scheduledTasks = new ScheduledTasksModule(this);
1847
1903
  this.forms = new FormsModule(this);
1904
+ this.secrets = new SecretsModule(this);
1848
1905
  this.adminUsers = new AdminUsersModule(this);
1849
1906
  this.adminSystem = new AdminSystemModule(this);
1850
1907
  this.adminMaintenance = new AdminMaintenanceModule(this);
@@ -563,13 +563,23 @@ declare class WebhooksModule {
563
563
  */
564
564
  delete(id: string): Promise<void>;
565
565
  /**
566
- * Test a webhook
566
+ * Test a webhook — fires a test request in the background
567
567
  */
568
568
  test(id: string): Promise<{
569
- success: boolean;
570
- message?: string;
571
- statusCode?: number;
569
+ message: string;
572
570
  }>;
571
+ /**
572
+ * Get execution logs for a specific webhook
573
+ */
574
+ logs(id: string, options?: {
575
+ limit?: number;
576
+ }): Promise<any[]>;
577
+ /**
578
+ * Get workspace-wide webhook execution log
579
+ */
580
+ log(options?: {
581
+ limit?: number;
582
+ }): Promise<any[]>;
573
583
  /**
574
584
  * Rerun failed webhooks
575
585
  */
@@ -1154,6 +1164,57 @@ declare class FormsModule {
1154
1164
  submitForm(slug: string, data: Record<string, unknown>): Promise<PlatformFormSubmission>;
1155
1165
  }
1156
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
+
1157
1218
  /**
1158
1219
  * Platform API Client
1159
1220
  *
@@ -1186,6 +1247,7 @@ declare class PlatformClient extends HttpClient {
1186
1247
  emailTemplates: EmailTemplatesClient;
1187
1248
  scheduledTasks: ScheduledTasksModule;
1188
1249
  forms: FormsModule;
1250
+ secrets: SecretsModule;
1189
1251
  adminUsers: AdminUsersModule;
1190
1252
  adminSystem: AdminSystemModule;
1191
1253
  adminMaintenance: AdminMaintenanceModule;
@@ -563,13 +563,23 @@ declare class WebhooksModule {
563
563
  */
564
564
  delete(id: string): Promise<void>;
565
565
  /**
566
- * Test a webhook
566
+ * Test a webhook — fires a test request in the background
567
567
  */
568
568
  test(id: string): Promise<{
569
- success: boolean;
570
- message?: string;
571
- statusCode?: number;
569
+ message: string;
572
570
  }>;
571
+ /**
572
+ * Get execution logs for a specific webhook
573
+ */
574
+ logs(id: string, options?: {
575
+ limit?: number;
576
+ }): Promise<any[]>;
577
+ /**
578
+ * Get workspace-wide webhook execution log
579
+ */
580
+ log(options?: {
581
+ limit?: number;
582
+ }): Promise<any[]>;
573
583
  /**
574
584
  * Rerun failed webhooks
575
585
  */
@@ -1154,6 +1164,57 @@ declare class FormsModule {
1154
1164
  submitForm(slug: string, data: Record<string, unknown>): Promise<PlatformFormSubmission>;
1155
1165
  }
1156
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
+
1157
1218
  /**
1158
1219
  * Platform API Client
1159
1220
  *
@@ -1186,6 +1247,7 @@ declare class PlatformClient extends HttpClient {
1186
1247
  emailTemplates: EmailTemplatesClient;
1187
1248
  scheduledTasks: ScheduledTasksModule;
1188
1249
  forms: FormsModule;
1250
+ secrets: SecretsModule;
1189
1251
  adminUsers: AdminUsersModule;
1190
1252
  adminSystem: AdminSystemModule;
1191
1253
  adminMaintenance: AdminMaintenanceModule;
package/dist/platform.js CHANGED
@@ -747,11 +747,26 @@ var WebhooksModule = class {
747
747
  await this.http.delete(`/api/groups/webhooks/${validId}`);
748
748
  }
749
749
  /**
750
- * Test a webhook
750
+ * Test a webhook — fires a test request in the background
751
751
  */
752
752
  async test(id) {
753
753
  const validId = this.http.validatePathParam(id, "webhook ID");
754
- return this.http.post(`/api/groups/webhooks/${validId}/test`, {});
754
+ return this.http.get(`/api/groups/webhooks/${validId}/test`);
755
+ }
756
+ /**
757
+ * Get execution logs for a specific webhook
758
+ */
759
+ async logs(id, options) {
760
+ const validId = this.http.validatePathParam(id, "webhook ID");
761
+ const params = options?.limit ? `?limit=${options.limit}` : "";
762
+ return this.http.get(`/api/groups/webhooks/${validId}/logs${params}`);
763
+ }
764
+ /**
765
+ * Get workspace-wide webhook execution log
766
+ */
767
+ async log(options) {
768
+ const params = options?.limit ? `?limit=${options.limit}` : "";
769
+ return this.http.get(`/api/groups/webhooks/log${params}`);
755
770
  }
756
771
  /**
757
772
  * Rerun failed webhooks
@@ -1338,6 +1353,46 @@ var FormsModule = class {
1338
1353
  }
1339
1354
  };
1340
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
+
1341
1396
  // src/platform/client.ts
1342
1397
  function getEnv2(key) {
1343
1398
  if (typeof process !== "undefined" && process.env) {
@@ -1372,6 +1427,7 @@ var PlatformClient = class extends HttpClient {
1372
1427
  emailTemplates;
1373
1428
  scheduledTasks;
1374
1429
  forms;
1430
+ secrets;
1375
1431
  // Admin modules
1376
1432
  adminUsers;
1377
1433
  adminSystem;
@@ -1402,6 +1458,7 @@ var PlatformClient = class extends HttpClient {
1402
1458
  this.emailTemplates = new EmailTemplatesClient(this);
1403
1459
  this.scheduledTasks = new ScheduledTasksModule(this);
1404
1460
  this.forms = new FormsModule(this);
1461
+ this.secrets = new SecretsModule(this);
1405
1462
  this.adminUsers = new AdminUsersModule(this);
1406
1463
  this.adminSystem = new AdminSystemModule(this);
1407
1464
  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.12",
3
+ "version": "3.2.0-next.14",
4
4
  "description": "Official TypeScript SDK for Marvin CMS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",