@workbuddy/sdk-js-vnext 1.0.163 → 1.0.164

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.
Files changed (3) hide show
  1. package/index.d.ts +163 -0
  2. package/index.js +108 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -127,6 +127,8 @@ export class WorkBuddyClient {
127
127
  bills: WorkBuddyBillsResource;
128
128
  /** Purchase Orders API operations. */
129
129
  purchaseOrders: WorkBuddyPurchaseOrdersResource;
130
+ /** Reports API operations. */
131
+ reports: WorkBuddyReportsResource;
130
132
  /** Mcp API operations. */
131
133
  mcp: WorkBuddyMcpResource;
132
134
  constructor(options: WorkBuddyClientOptions);
@@ -6973,6 +6975,27 @@ export interface WorkBuddyWebhooksTasksRegisterTaskParams extends WorkBuddyReque
6973
6975
  workflow?: { platform: 'activepieces' | 'n8n' | 'zapier' | 'custom'; integrationId: string; flowId?: string };
6974
6976
  }
6975
6977
 
6978
+ export interface WorkBuddyWebhooksFormsRegisterFormParams extends WorkBuddyRequestParams {
6979
+ /**
6980
+ * Display name
6981
+ */
6982
+ name: string;
6983
+ /**
6984
+ * Webhook callback URL
6985
+ */
6986
+ url: string;
6987
+ /**
6988
+ * Event names to subscribe to
6989
+ */
6990
+ events: ('Form Submitted' | 'Form Updated')[];
6991
+
6992
+ filters?: { form?: string[] };
6993
+
6994
+ businessHours?: { enabled: boolean; timezone?: string };
6995
+
6996
+ workflow?: { platform: 'activepieces' | 'n8n' | 'zapier' | 'custom'; integrationId: string; flowId?: string };
6997
+ }
6998
+
6976
6999
  export interface WorkBuddyWebhooksRegenerateSecretRegenerateSecretParams extends WorkBuddyRequestParams {
6977
7000
  /**
6978
7001
  * Entity ID
@@ -9640,6 +9663,56 @@ export interface WorkBuddyPurchaseOrdersCancelCancelParams extends WorkBuddyRequ
9640
9663
  root?: Record<string, unknown>;
9641
9664
  }
9642
9665
 
9666
+ export interface WorkBuddyReportsListParams extends WorkBuddyRequestParams {
9667
+ /**
9668
+ * Only reports in this report category.
9669
+ */
9670
+ categoryId?: string;
9671
+ /**
9672
+ * Text matched anywhere in the report name, ignoring case.
9673
+ */
9674
+ search?: string;
9675
+
9676
+ cursor?: string;
9677
+ /**
9678
+ * Page size, from 1 to 200. Defaults to 50.
9679
+ */
9680
+ limit?: number;
9681
+ }
9682
+
9683
+ export interface WorkBuddyReportsExecuteExecuteParams extends WorkBuddyRequestParams {
9684
+ /**
9685
+ * Report ID
9686
+ */
9687
+ id: string;
9688
+ /**
9689
+ * Most rows to return. The tenant report row limit applies when absent or larger.
9690
+ */
9691
+ limit?: number;
9692
+ }
9693
+
9694
+ export interface WorkBuddyReportsExportExportParams extends WorkBuddyRequestParams {
9695
+ /**
9696
+ * Report ID
9697
+ */
9698
+ id: string;
9699
+ /**
9700
+ * Most rows to export. The tenant report row limit applies when absent or larger.
9701
+ */
9702
+ limit?: number;
9703
+ /**
9704
+ * How many of the first rows to return inline as a preview, from 0 to 100. Defaults to 20.
9705
+ */
9706
+ previewRows?: number;
9707
+ }
9708
+
9709
+ export interface WorkBuddyReportsExportsDownloadParams extends WorkBuddyRequestParams {
9710
+ /**
9711
+ * The signed token from download.url
9712
+ */
9713
+ token: string;
9714
+ }
9715
+
9643
9716
  export interface WorkBuddyMcpListParams extends WorkBuddyRequestParams {}
9644
9717
 
9645
9718
  export interface WorkBuddyMcpCreateParams extends WorkBuddyRequestParams {
@@ -20208,6 +20281,7 @@ export type WorkBuddyWebhooksQuotesRegisterQuoteResponse = unknown;
20208
20281
  export type WorkBuddyWebhooksOpportunitiesRegisterOpportunityResponse = unknown;
20209
20282
  export type WorkBuddyWebhooksLeadsRegisterLeadResponse = unknown;
20210
20283
  export type WorkBuddyWebhooksTasksRegisterTaskResponse = unknown;
20284
+ export type WorkBuddyWebhooksFormsRegisterFormResponse = unknown;
20211
20285
  export type WorkBuddyWebhooksRegenerateSecretRegenerateSecretResponse = unknown;
20212
20286
  export type WorkBuddyWebhooksTestTestResponse = unknown;
20213
20287
  export type WorkBuddyWebhooksDeliveriesListResponse = unknown;
@@ -24276,6 +24350,22 @@ export type WorkBuddyPurchaseOrdersCancelCancelResponse = {
24276
24350
  updatedAt: string;
24277
24351
  };
24278
24352
  };
24353
+ export type WorkBuddyReportsListResponse = {
24354
+ items: { id: string; name: string; category: string; columns: { key: string; label: string; type?: string }[] }[];
24355
+ pagination: { limit: number; hasMore: boolean; nextCursor: string };
24356
+ };
24357
+ export type WorkBuddyReportsExecuteExecuteResponse = string;
24358
+ export type WorkBuddyReportsExportExportResponse = {
24359
+ item: {
24360
+ reportId: string;
24361
+ rowCount: number;
24362
+ bytes: number;
24363
+ truncated: boolean;
24364
+ preview: Record<string, unknown>[];
24365
+ download: { url: string; expiresAt: string; format: string };
24366
+ };
24367
+ };
24368
+ export type WorkBuddyReportsExportsDownloadResponse = string;
24279
24369
  export type WorkBuddyMcpListResponse = unknown;
24280
24370
  export type WorkBuddyMcpCreateResponse = unknown;
24281
24371
  export type WorkBuddyMcpDeleteResponse = unknown;
@@ -26981,6 +27071,8 @@ export interface WorkBuddyWebhooksResource {
26981
27071
  leads: WorkBuddyWebhooksLeadsResource;
26982
27072
  /** Tasks API operations. */
26983
27073
  tasks: WorkBuddyWebhooksTasksResource;
27074
+ /** Forms API operations. */
27075
+ forms: WorkBuddyWebhooksFormsResource;
26984
27076
  /** Regenerate Secret API operations. */
26985
27077
  regenerateSecret: WorkBuddyWebhooksRegenerateSecretResource;
26986
27078
  /** Test API operations. */
@@ -27169,6 +27261,17 @@ export interface WorkBuddyWebhooksTasksResource {
27169
27261
  ): Promise<TResponse>;
27170
27262
  }
27171
27263
 
27264
+ export interface WorkBuddyWebhooksFormsResource {
27265
+ /**
27266
+ * Register a form webhook
27267
+ * Operation: PublicApiWebhookV2Controller_registerForm
27268
+ */
27269
+ registerForm<TResponse = WorkBuddyWebhooksFormsRegisterFormResponse>(
27270
+ params: WorkBuddyWebhooksFormsRegisterFormParams,
27271
+ options?: WorkBuddyRequestOptions
27272
+ ): Promise<TResponse>;
27273
+ }
27274
+
27172
27275
  export interface WorkBuddyWebhooksRegenerateSecretResource {
27173
27276
  /**
27174
27277
  * Regenerate the signing secret for a webhook subscription
@@ -28562,6 +28665,66 @@ export interface WorkBuddyPurchaseOrdersCancelResource {
28562
28665
  ): Promise<TResponse>;
28563
28666
  }
28564
28667
 
28668
+ export interface WorkBuddyReportsResource {
28669
+ /** Execute API operations. */
28670
+ execute: WorkBuddyReportsExecuteResource;
28671
+ /** Export API operations. */
28672
+ export: WorkBuddyReportsExportResource;
28673
+ /** Exports API operations. */
28674
+ exports: WorkBuddyReportsExportsResource;
28675
+ /**
28676
+ * Saved reports the token may see: every report for an application token; for a user token, public reports, the person's own and those shared with them (every report for a System Administrator).
28677
+ * Operation: PublicApiReportController_list
28678
+ */
28679
+ list<TResponse = WorkBuddyReportsListResponse>(
28680
+ params?: WorkBuddyReportsListParams,
28681
+ options?: WorkBuddyRequestOptions
28682
+ ): Promise<TResponse>;
28683
+ /** Iterate all items by following cursor pagination for list(). */
28684
+ all<TItem = WorkBuddyPageItem<WorkBuddyReportsListResponse>>(
28685
+ params?: WorkBuddyReportsListParams,
28686
+ options?: WorkBuddyRequestOptions
28687
+ ): AsyncIterable<TItem>;
28688
+ /** Iterate raw pages by following cursor pagination for list(). */
28689
+ pages<TPage = WorkBuddyReportsListResponse>(
28690
+ params?: WorkBuddyReportsListParams,
28691
+ options?: WorkBuddyRequestOptions
28692
+ ): AsyncIterable<TPage>;
28693
+ }
28694
+
28695
+ export interface WorkBuddyReportsExecuteResource {
28696
+ /**
28697
+ * Streams the saved report's rows as NDJSON (application/x-ndjson): one JSON object per line holding the report's columns. At most the tenant report row limit is returned. A report the token may not see answers 404, as a missing one does.
28698
+ * Operation: PublicApiReportController_execute
28699
+ */
28700
+ execute<TResponse = WorkBuddyReportsExecuteExecuteResponse>(
28701
+ params: WorkBuddyReportsExecuteExecuteParams,
28702
+ options?: WorkBuddyRequestOptions
28703
+ ): Promise<TResponse>;
28704
+ }
28705
+
28706
+ export interface WorkBuddyReportsExportResource {
28707
+ /**
28708
+ * Writes the saved report's rows to an NDJSON file and returns the row count, the first rows as a preview and a download link. GET download.url without an Authorization header to fetch the file; the link expires after 30 minutes. At most the tenant report row limit is exported. A report the token may not see answers 404, as a missing one does.
28709
+ * Operation: PublicApiReportController_export
28710
+ */
28711
+ export<TResponse = WorkBuddyReportsExportExportResponse>(
28712
+ params: WorkBuddyReportsExportExportParams,
28713
+ options?: WorkBuddyRequestOptions
28714
+ ): Promise<TResponse>;
28715
+ }
28716
+
28717
+ export interface WorkBuddyReportsExportsResource {
28718
+ /**
28719
+ * Streams a report export file as NDJSON (application/x-ndjson). The link comes from POST /reports/{id}/export and is its own credential: send no Authorization header. It expires 30 minutes after the export.
28720
+ * Operation: PublicApiReportDownloadController_download
28721
+ */
28722
+ download<TResponse = WorkBuddyReportsExportsDownloadResponse>(
28723
+ params: WorkBuddyReportsExportsDownloadParams,
28724
+ options?: WorkBuddyRequestOptions
28725
+ ): Promise<TResponse>;
28726
+ }
28727
+
28565
28728
  export interface WorkBuddyMcpResource {
28566
28729
  /**
28567
28730
  * Returns 405 — server-initiated SSE is not supported.
package/index.js CHANGED
@@ -1710,6 +1710,14 @@ Requires scope: settings:read
1710
1710
  registerTask: (params = {}, options = {}) =>
1711
1711
  this.request('PublicApiWebhookV2Controller_registerTask', params, options),
1712
1712
  },
1713
+ forms: {
1714
+ /**
1715
+ * Register a form webhook
1716
+ * Operation: PublicApiWebhookV2Controller_registerForm
1717
+ */
1718
+ registerForm: (params = {}, options = {}) =>
1719
+ this.request('PublicApiWebhookV2Controller_registerForm', params, options),
1720
+ },
1713
1721
  regenerateSecret: {
1714
1722
  /**
1715
1723
  * Regenerate the signing secret for a webhook subscription
@@ -2545,6 +2553,40 @@ Requires scope: settings:read
2545
2553
  delete: (params = {}, options = {}) => this.request('PublicPurchaseOrderController_delete', params, options),
2546
2554
  };
2547
2555
 
2556
+ this.reports = {
2557
+ execute: {
2558
+ /**
2559
+ * Streams the saved report's rows as NDJSON (application/x-ndjson): one JSON object per line holding the report's columns. At most the tenant report row limit is returned. A report the token may not see answers 404, as a missing one does.
2560
+ * Operation: PublicApiReportController_execute
2561
+ */
2562
+ execute: (params = {}, options = {}) => this.request('PublicApiReportController_execute', params, options),
2563
+ },
2564
+ export: {
2565
+ /**
2566
+ * Writes the saved report's rows to an NDJSON file and returns the row count, the first rows as a preview and a download link. GET download.url without an Authorization header to fetch the file; the link expires after 30 minutes. At most the tenant report row limit is exported. A report the token may not see answers 404, as a missing one does.
2567
+ * Operation: PublicApiReportController_export
2568
+ */
2569
+ export: (params = {}, options = {}) => this.request('PublicApiReportController_export', params, options),
2570
+ },
2571
+ exports: {
2572
+ /**
2573
+ * Streams a report export file as NDJSON (application/x-ndjson). The link comes from POST /reports/{id}/export and is its own credential: send no Authorization header. It expires 30 minutes after the export.
2574
+ * Operation: PublicApiReportDownloadController_download
2575
+ */
2576
+ download: (params = {}, options = {}) =>
2577
+ this.request('PublicApiReportDownloadController_download', params, options),
2578
+ },
2579
+ /**
2580
+ * Saved reports the token may see: every report for an application token; for a user token, public reports, the person's own and those shared with them (every report for a System Administrator).
2581
+ * Operation: PublicApiReportController_list
2582
+ */
2583
+ list: (params = {}, options = {}) => this.request('PublicApiReportController_list', params, options),
2584
+ /** Iterate all items by following cursor pagination for list(). */
2585
+ all: (params = {}, options = {}) => this.paginate('PublicApiReportController_list', params, options),
2586
+ /** Iterate raw pages by following cursor pagination for list(). */
2587
+ pages: (params = {}, options = {}) => this.paginatePages('PublicApiReportController_list', params, options),
2588
+ };
2589
+
2548
2590
  this.mcp = {
2549
2591
  /**
2550
2592
  * Returns 405 — server-initiated SSE is not supported.
@@ -5680,6 +5722,18 @@ export const operations = [
5680
5722
  queryParams: [],
5681
5723
  hasRequestBody: true,
5682
5724
  },
5725
+ {
5726
+ operationId: 'PublicApiWebhookV2Controller_registerForm',
5727
+ resourcePath: ['webhooks', 'forms'],
5728
+ actionName: 'registerForm',
5729
+ displayName: 'Register a form webhook',
5730
+ description: 'Register a form webhook',
5731
+ method: 'POST',
5732
+ path: '/webhooks/forms',
5733
+ pathParams: [],
5734
+ queryParams: [],
5735
+ hasRequestBody: true,
5736
+ },
5683
5737
  {
5684
5738
  operationId: 'PublicApiWebhookV2Controller_regenerateSecret',
5685
5739
  resourcePath: ['webhooks', 'regenerateSecret'],
@@ -7150,6 +7204,60 @@ export const operations = [
7150
7204
  queryParams: [],
7151
7205
  hasRequestBody: true,
7152
7206
  },
7207
+ {
7208
+ operationId: 'PublicApiReportController_list',
7209
+ resourcePath: ['reports'],
7210
+ actionName: 'list',
7211
+ paginatedItemsActionName: 'all',
7212
+ paginatedPagesActionName: 'pages',
7213
+ displayName: 'List reports',
7214
+ description:
7215
+ "Saved reports the token may see: every report for an application token; for a user token, public reports, the person's own and those shared with them (every report for a System Administrator).",
7216
+ method: 'GET',
7217
+ path: '/reports',
7218
+ pathParams: [],
7219
+ queryParams: ['categoryId', 'search', 'cursor', 'limit'],
7220
+ hasRequestBody: false,
7221
+ },
7222
+ {
7223
+ operationId: 'PublicApiReportController_execute',
7224
+ resourcePath: ['reports', 'execute'],
7225
+ actionName: 'execute',
7226
+ displayName: 'Run a report',
7227
+ description:
7228
+ "Streams the saved report's rows as NDJSON (application/x-ndjson): one JSON object per line holding the report's columns. At most the tenant report row limit is returned. A report the token may not see answers 404, as a missing one does.",
7229
+ method: 'POST',
7230
+ path: '/reports/{id}/execute',
7231
+ pathParams: ['id'],
7232
+ queryParams: [],
7233
+ hasRequestBody: true,
7234
+ },
7235
+ {
7236
+ operationId: 'PublicApiReportController_export',
7237
+ resourcePath: ['reports', 'export'],
7238
+ actionName: 'export',
7239
+ displayName: 'Export a report',
7240
+ description:
7241
+ "Writes the saved report's rows to an NDJSON file and returns the row count, the first rows as a preview and a download link. GET download.url without an Authorization header to fetch the file; the link expires after 30 minutes. At most the tenant report row limit is exported. A report the token may not see answers 404, as a missing one does.",
7242
+ method: 'POST',
7243
+ path: '/reports/{id}/export',
7244
+ pathParams: ['id'],
7245
+ queryParams: [],
7246
+ hasRequestBody: true,
7247
+ },
7248
+ {
7249
+ operationId: 'PublicApiReportDownloadController_download',
7250
+ resourcePath: ['reports', 'exports'],
7251
+ actionName: 'download',
7252
+ displayName: 'Download a report export',
7253
+ description:
7254
+ 'Streams a report export file as NDJSON (application/x-ndjson). The link comes from POST /reports/{id}/export and is its own credential: send no Authorization header. It expires 30 minutes after the export.',
7255
+ method: 'GET',
7256
+ path: '/reports/exports/{token}',
7257
+ pathParams: ['token'],
7258
+ queryParams: [],
7259
+ hasRequestBody: false,
7260
+ },
7153
7261
  {
7154
7262
  operationId: 'McpV3StreamableController_handleGet',
7155
7263
  resourcePath: ['mcp'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workbuddy/sdk-js-vnext",
3
- "version": "1.0.163",
3
+ "version": "1.0.164",
4
4
  "description": "WorkBuddy Public API JavaScript client",
5
5
  "license": "MIT",
6
6
  "type": "module",