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

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
@@ -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
  */
@@ -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
  */
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
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.13",
4
4
  "description": "Official TypeScript SDK for Marvin CMS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",