@objectstack/client 3.0.8 → 3.0.10

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @objectstack/client@3.0.8 build /home/runner/work/spec/spec/packages/client
2
+ > @objectstack/client@3.0.10 build /home/runner/work/spec/spec/packages/client
3
3
  > tsup --config ../../tsup.config.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- ESM dist/index.mjs 38.90 KB
14
- ESM dist/index.mjs.map 78.68 KB
15
- ESM ⚡️ Build success in 54ms
16
- CJS dist/index.js 40.06 KB
17
- CJS dist/index.js.map 78.74 KB
18
- CJS ⚡️ Build success in 59ms
13
+ ESM dist/index.mjs 52.00 KB
14
+ ESM dist/index.mjs.map 104.19 KB
15
+ ESM ⚡️ Build success in 60ms
16
+ CJS dist/index.js 53.17 KB
17
+ CJS dist/index.js.map 104.24 KB
18
+ CJS ⚡️ Build success in 60ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 5021ms
21
- DTS dist/index.d.mts 22.83 KB
22
- DTS dist/index.d.ts 22.83 KB
20
+ DTS ⚡️ Build success in 5490ms
21
+ DTS dist/index.d.mts 30.61 KB
22
+ DTS dist/index.d.ts 30.61 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @objectstack/client
2
2
 
3
+ ## 3.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d1e5d31]
8
+ - @objectstack/spec@3.0.10
9
+ - @objectstack/core@3.0.10
10
+
11
+ ## 3.0.9
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [15e0df6]
16
+ - @objectstack/spec@3.0.9
17
+ - @objectstack/core@3.0.9
18
+
3
19
  ## 3.0.8
4
20
 
5
21
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { FilterCondition, QueryAST, SortNode, AggregationNode } from '@objectstack/spec/data';
2
- import { GetDiscoveryResponse, StandardErrorCode, ErrorCategory, GetMetaTypesResponse, GetMetaItemsResponse, MetadataCacheRequest, MetadataCacheResponse, LoginRequest, SessionResponse, RegisterRequest, FileUploadResponse, CheckPermissionRequest, CheckPermissionResponse, GetObjectPermissionsResponse, GetEffectivePermissionsResponse, RealtimeConnectRequest, RealtimeConnectResponse, RealtimeSubscribeRequest, RealtimeSubscribeResponse, SetPresenceRequest, GetPresenceResponse, GetWorkflowConfigResponse, GetWorkflowStateResponse, WorkflowTransitionRequest, WorkflowTransitionResponse, WorkflowApproveRequest, WorkflowApproveResponse, WorkflowRejectRequest, WorkflowRejectResponse, ListViewsResponse, GetViewResponse, CreateViewRequest, CreateViewResponse, UpdateViewRequest, UpdateViewResponse, DeleteViewResponse, RegisterDeviceRequest, RegisterDeviceResponse, UnregisterDeviceResponse, GetNotificationPreferencesResponse, UpdateNotificationPreferencesRequest, UpdateNotificationPreferencesResponse, ListNotificationsResponse, MarkNotificationsReadResponse, MarkAllNotificationsReadResponse, AiNlqRequest, AiNlqResponse, AiChatRequest, AiChatResponse, AiSuggestRequest, AiSuggestResponse, AiInsightsRequest, AiInsightsResponse, GetLocalesResponse, GetTranslationsResponse, GetFieldLabelsResponse, BatchUpdateRequest, BatchUpdateResponse, BatchOptions } from '@objectstack/spec/api';
3
- export { AiChatRequest, AiChatResponse, AiInsightsRequest, AiInsightsResponse, AiNlqRequest, AiNlqResponse, AiSuggestRequest, AiSuggestResponse, BatchOperationResult, BatchOptions, BatchRecord, BatchUpdateRequest, BatchUpdateResponse, CheckPermissionRequest, CheckPermissionResponse, CreateViewResponse, DeleteManyRequest, DeleteViewResponse, ErrorCategory, GetDiscoveryResponse, GetEffectivePermissionsResponse, GetFieldLabelsResponse, GetLocalesResponse, GetMetaItemsResponse, GetMetaTypesResponse, GetObjectPermissionsResponse, GetPresenceResponse, GetTranslationsResponse, GetViewResponse, GetWorkflowConfigResponse, GetWorkflowStateResponse, ListNotificationsResponse, ListViewsResponse, MetadataCacheRequest, MetadataCacheResponse, RealtimeConnectRequest, RealtimeConnectResponse, RealtimeSubscribeRequest, RealtimeSubscribeResponse, RefreshTokenRequest, RegisterDeviceRequest, RegisterDeviceResponse, RegisterRequest, StandardErrorCode, UpdateManyRequest, UpdateViewResponse, WorkflowApproveRequest, WorkflowApproveResponse, WorkflowRejectRequest, WorkflowRejectResponse, WorkflowTransitionRequest, WorkflowTransitionResponse } from '@objectstack/spec/api';
2
+ import { GetDiscoveryResponse, StandardErrorCode, ErrorCategory, WellKnownCapabilities, GetMetaTypesResponse, GetMetaItemsResponse, MetadataCacheRequest, MetadataCacheResponse, LoginRequest, SessionResponse, RegisterRequest, FileUploadResponse, GetPresignedUrlRequest, PresignedUrlResponse, InitiateChunkedUploadRequest, InitiateChunkedUploadResponse, UploadChunkResponse, CompleteChunkedUploadRequest, CompleteChunkedUploadResponse, CheckPermissionRequest, CheckPermissionResponse, GetObjectPermissionsResponse, GetEffectivePermissionsResponse, RealtimeConnectRequest, RealtimeConnectResponse, RealtimeSubscribeRequest, RealtimeSubscribeResponse, SetPresenceRequest, GetPresenceResponse, GetWorkflowConfigResponse, GetWorkflowStateResponse, WorkflowTransitionRequest, WorkflowTransitionResponse, WorkflowApproveRequest, WorkflowApproveResponse, WorkflowRejectRequest, WorkflowRejectResponse, ListViewsResponse, GetViewResponse, CreateViewRequest, CreateViewResponse, UpdateViewRequest, UpdateViewResponse, DeleteViewResponse, RegisterDeviceRequest, RegisterDeviceResponse, UnregisterDeviceResponse, GetNotificationPreferencesResponse, UpdateNotificationPreferencesRequest, UpdateNotificationPreferencesResponse, ListNotificationsResponse, MarkNotificationsReadResponse, MarkAllNotificationsReadResponse, AiNlqRequest, AiNlqResponse, AiChatRequest, AiChatResponse, AiSuggestRequest, AiSuggestResponse, AiInsightsRequest, AiInsightsResponse, GetLocalesResponse, GetTranslationsResponse, GetFieldLabelsResponse, GetFeedResponse, CreateFeedItemResponse, UpdateFeedItemResponse, DeleteFeedItemResponse, AddReactionResponse, RemoveReactionResponse, PinFeedItemResponse, UnpinFeedItemResponse, StarFeedItemResponse, UnstarFeedItemResponse, SearchFeedResponse, GetChangelogResponse, SubscribeResponse, UnsubscribeResponse, BatchUpdateRequest, BatchUpdateResponse, BatchOptions } from '@objectstack/spec/api';
3
+ export { AddReactionResponse, AiChatRequest, AiChatResponse, AiInsightsRequest, AiInsightsResponse, AiNlqRequest, AiNlqResponse, AiSuggestRequest, AiSuggestResponse, BatchOperationResult, BatchOptions, BatchRecord, BatchUpdateRequest, BatchUpdateResponse, CheckPermissionRequest, CheckPermissionResponse, CreateFeedItemResponse, CreateViewResponse, DeleteFeedItemResponse, DeleteManyRequest, DeleteViewResponse, ErrorCategory, GetChangelogResponse, GetDiscoveryResponse, GetEffectivePermissionsResponse, GetFeedResponse, GetFieldLabelsResponse, GetLocalesResponse, GetMetaItemsResponse, GetMetaTypesResponse, GetObjectPermissionsResponse, GetPresenceResponse, GetTranslationsResponse, GetViewResponse, GetWorkflowConfigResponse, GetWorkflowStateResponse, ListNotificationsResponse, ListViewsResponse, MetadataCacheRequest, MetadataCacheResponse, PinFeedItemResponse, RealtimeConnectRequest, RealtimeConnectResponse, RealtimeSubscribeRequest, RealtimeSubscribeResponse, RefreshTokenRequest, RegisterDeviceRequest, RegisterDeviceResponse, RegisterRequest, RemoveReactionResponse, SearchFeedResponse, StandardErrorCode, StarFeedItemResponse, SubscribeResponse, UnpinFeedItemResponse, UnstarFeedItemResponse, UnsubscribeResponse, UpdateFeedItemResponse, UpdateManyRequest, UpdateViewResponse, WellKnownCapabilities, WorkflowApproveRequest, WorkflowApproveResponse, WorkflowRejectRequest, WorkflowRejectResponse, WorkflowTransitionRequest, WorkflowTransitionResponse } from '@objectstack/spec/api';
4
4
  import { Logger } from '@objectstack/core';
5
5
 
6
6
  /**
@@ -190,7 +190,10 @@ interface ClientConfig {
190
190
  type DiscoveryResult = GetDiscoveryResponse;
191
191
  interface QueryOptions {
192
192
  select?: string[];
193
- filters?: Record<string, any>;
193
+ /** @canonical Preferred filter parameter (singular). */
194
+ filter?: Record<string, any> | unknown[];
195
+ /** @deprecated Use `filter` (singular). Kept for backward compatibility. */
196
+ filters?: Record<string, any> | unknown[];
194
197
  sort?: string | string[] | SortNode[];
195
198
  top?: number;
196
199
  skip?: number;
@@ -273,9 +276,31 @@ declare class ObjectStackClient {
273
276
  status: "degraded" | "stub" | "available" | "unavailable";
274
277
  route?: string | undefined;
275
278
  provider?: string | undefined;
279
+ version?: string | undefined;
276
280
  message?: string | undefined;
281
+ rateLimit?: {
282
+ requestsPerMinute?: number | undefined;
283
+ requestsPerHour?: number | undefined;
284
+ burstLimit?: number | undefined;
285
+ retryAfterMs?: number | undefined;
286
+ } | undefined;
277
287
  }> | undefined;
288
+ capabilities?: {
289
+ feed: boolean;
290
+ comments: boolean;
291
+ automation: boolean;
292
+ cron: boolean;
293
+ search: boolean;
294
+ export: boolean;
295
+ chunkedUpload: boolean;
296
+ } | undefined;
278
297
  }>;
298
+ /**
299
+ * Well-known capability flags discovered from the server.
300
+ * Returns undefined if the client has not yet connected or the server
301
+ * did not include capabilities in its discovery response.
302
+ */
303
+ get capabilities(): WellKnownCapabilities | undefined;
279
304
  /**
280
305
  * Metadata Operations
281
306
  */
@@ -425,12 +450,89 @@ declare class ObjectStackClient {
425
450
  storage: {
426
451
  upload: (file: any, scope?: string) => Promise<FileUploadResponse>;
427
452
  getDownloadUrl: (fileId: string) => Promise<string>;
453
+ /**
454
+ * Get a presigned URL for direct-to-cloud upload
455
+ */
456
+ getPresignedUrl: (req: GetPresignedUrlRequest) => Promise<PresignedUrlResponse>;
457
+ /**
458
+ * Initiate a chunked (multipart) upload session
459
+ */
460
+ initChunkedUpload: (req: InitiateChunkedUploadRequest) => Promise<InitiateChunkedUploadResponse>;
461
+ /**
462
+ * Upload a single chunk/part of a multipart upload
463
+ */
464
+ uploadPart: (uploadId: string, chunkIndex: number, resumeToken: string, data: Blob | Buffer) => Promise<UploadChunkResponse>;
465
+ /**
466
+ * Complete a chunked upload by assembling all parts
467
+ */
468
+ completeChunkedUpload: (req: CompleteChunkedUploadRequest) => Promise<CompleteChunkedUploadResponse>;
469
+ /**
470
+ * Resume an interrupted chunked upload.
471
+ * Fetches current progress, then uploads remaining chunks and completes.
472
+ */
473
+ resumeUpload: (uploadId: string, file: Blob | ArrayBuffer, chunkSize: number, resumeToken: string) => Promise<CompleteChunkedUploadResponse>;
428
474
  };
429
475
  /**
430
476
  * Automation Services
431
477
  */
432
478
  automation: {
479
+ /**
480
+ * Trigger a named automation flow (legacy endpoint)
481
+ */
433
482
  trigger: (triggerName: string, payload: any) => Promise<any>;
483
+ /**
484
+ * List all registered automation flows
485
+ */
486
+ list: () => Promise<{
487
+ flows: string[];
488
+ total: number;
489
+ hasMore: boolean;
490
+ }>;
491
+ /**
492
+ * Get a flow definition by name
493
+ */
494
+ get: (name: string) => Promise<any>;
495
+ /**
496
+ * Create (register) a new flow
497
+ */
498
+ create: (name: string, definition: any) => Promise<any>;
499
+ /**
500
+ * Update an existing flow
501
+ */
502
+ update: (name: string, definition: any) => Promise<any>;
503
+ /**
504
+ * Delete (unregister) a flow
505
+ */
506
+ delete: (name: string) => Promise<{
507
+ name: string;
508
+ deleted: boolean;
509
+ }>;
510
+ /**
511
+ * Enable or disable a flow
512
+ */
513
+ toggle: (name: string, enabled: boolean) => Promise<{
514
+ name: string;
515
+ enabled: boolean;
516
+ }>;
517
+ /**
518
+ * Execution run history
519
+ */
520
+ runs: {
521
+ /**
522
+ * List execution runs for a flow
523
+ */
524
+ list: (flowName: string, options?: {
525
+ limit?: number;
526
+ cursor?: string;
527
+ }) => Promise<{
528
+ runs: any[];
529
+ hasMore: boolean;
530
+ }>;
531
+ /**
532
+ * Get a single execution run
533
+ */
534
+ get: (flowName: string, runId: string) => Promise<any>;
535
+ };
434
536
  };
435
537
  /**
436
538
  * Permissions Services
@@ -607,6 +709,102 @@ declare class ObjectStackClient {
607
709
  */
608
710
  getFieldLabels: (object: string, locale: string) => Promise<GetFieldLabelsResponse>;
609
711
  };
712
+ /**
713
+ * Feed / Chatter Services
714
+ *
715
+ * Provides access to the activity timeline (comments, field changes, tasks),
716
+ * emoji reactions, pin/star, search, changelog, and record subscriptions.
717
+ * Base path: /api/data/{object}/{recordId}/feed
718
+ */
719
+ feed: {
720
+ /**
721
+ * List feed items for a record
722
+ */
723
+ list: (object: string, recordId: string, options?: {
724
+ type?: string;
725
+ limit?: number;
726
+ cursor?: string;
727
+ }) => Promise<GetFeedResponse>;
728
+ /**
729
+ * Create a new feed item (comment, note, task, etc.)
730
+ */
731
+ create: (object: string, recordId: string, data: {
732
+ type: string;
733
+ body?: string;
734
+ mentions?: any[];
735
+ parentId?: string;
736
+ visibility?: string;
737
+ }) => Promise<CreateFeedItemResponse>;
738
+ /**
739
+ * Update an existing feed item
740
+ */
741
+ update: (object: string, recordId: string, feedId: string, data: {
742
+ body?: string;
743
+ mentions?: any[];
744
+ visibility?: string;
745
+ }) => Promise<UpdateFeedItemResponse>;
746
+ /**
747
+ * Delete a feed item
748
+ */
749
+ delete: (object: string, recordId: string, feedId: string) => Promise<DeleteFeedItemResponse>;
750
+ /**
751
+ * Add an emoji reaction to a feed item
752
+ */
753
+ addReaction: (object: string, recordId: string, feedId: string, emoji: string) => Promise<AddReactionResponse>;
754
+ /**
755
+ * Remove an emoji reaction from a feed item
756
+ */
757
+ removeReaction: (object: string, recordId: string, feedId: string, emoji: string) => Promise<RemoveReactionResponse>;
758
+ /**
759
+ * Pin a feed item to the top of the timeline
760
+ */
761
+ pin: (object: string, recordId: string, feedId: string) => Promise<PinFeedItemResponse>;
762
+ /**
763
+ * Unpin a feed item
764
+ */
765
+ unpin: (object: string, recordId: string, feedId: string) => Promise<UnpinFeedItemResponse>;
766
+ /**
767
+ * Star (bookmark) a feed item
768
+ */
769
+ star: (object: string, recordId: string, feedId: string) => Promise<StarFeedItemResponse>;
770
+ /**
771
+ * Unstar a feed item
772
+ */
773
+ unstar: (object: string, recordId: string, feedId: string) => Promise<UnstarFeedItemResponse>;
774
+ /**
775
+ * Search feed items
776
+ */
777
+ search: (object: string, recordId: string, query: string, options?: {
778
+ type?: string;
779
+ actorId?: string;
780
+ dateFrom?: string;
781
+ dateTo?: string;
782
+ limit?: number;
783
+ cursor?: string;
784
+ }) => Promise<SearchFeedResponse>;
785
+ /**
786
+ * Get field-level changelog for a record
787
+ */
788
+ getChangelog: (object: string, recordId: string, options?: {
789
+ field?: string;
790
+ actorId?: string;
791
+ dateFrom?: string;
792
+ dateTo?: string;
793
+ limit?: number;
794
+ cursor?: string;
795
+ }) => Promise<GetChangelogResponse>;
796
+ /**
797
+ * Subscribe to record notifications
798
+ */
799
+ subscribe: (object: string, recordId: string, options?: {
800
+ events?: string[];
801
+ channels?: string[];
802
+ }) => Promise<SubscribeResponse>;
803
+ /**
804
+ * Unsubscribe from record notifications
805
+ */
806
+ unsubscribe: (object: string, recordId: string) => Promise<UnsubscribeResponse>;
807
+ };
610
808
  /**
611
809
  * Data Operations
612
810
  */
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { FilterCondition, QueryAST, SortNode, AggregationNode } from '@objectstack/spec/data';
2
- import { GetDiscoveryResponse, StandardErrorCode, ErrorCategory, GetMetaTypesResponse, GetMetaItemsResponse, MetadataCacheRequest, MetadataCacheResponse, LoginRequest, SessionResponse, RegisterRequest, FileUploadResponse, CheckPermissionRequest, CheckPermissionResponse, GetObjectPermissionsResponse, GetEffectivePermissionsResponse, RealtimeConnectRequest, RealtimeConnectResponse, RealtimeSubscribeRequest, RealtimeSubscribeResponse, SetPresenceRequest, GetPresenceResponse, GetWorkflowConfigResponse, GetWorkflowStateResponse, WorkflowTransitionRequest, WorkflowTransitionResponse, WorkflowApproveRequest, WorkflowApproveResponse, WorkflowRejectRequest, WorkflowRejectResponse, ListViewsResponse, GetViewResponse, CreateViewRequest, CreateViewResponse, UpdateViewRequest, UpdateViewResponse, DeleteViewResponse, RegisterDeviceRequest, RegisterDeviceResponse, UnregisterDeviceResponse, GetNotificationPreferencesResponse, UpdateNotificationPreferencesRequest, UpdateNotificationPreferencesResponse, ListNotificationsResponse, MarkNotificationsReadResponse, MarkAllNotificationsReadResponse, AiNlqRequest, AiNlqResponse, AiChatRequest, AiChatResponse, AiSuggestRequest, AiSuggestResponse, AiInsightsRequest, AiInsightsResponse, GetLocalesResponse, GetTranslationsResponse, GetFieldLabelsResponse, BatchUpdateRequest, BatchUpdateResponse, BatchOptions } from '@objectstack/spec/api';
3
- export { AiChatRequest, AiChatResponse, AiInsightsRequest, AiInsightsResponse, AiNlqRequest, AiNlqResponse, AiSuggestRequest, AiSuggestResponse, BatchOperationResult, BatchOptions, BatchRecord, BatchUpdateRequest, BatchUpdateResponse, CheckPermissionRequest, CheckPermissionResponse, CreateViewResponse, DeleteManyRequest, DeleteViewResponse, ErrorCategory, GetDiscoveryResponse, GetEffectivePermissionsResponse, GetFieldLabelsResponse, GetLocalesResponse, GetMetaItemsResponse, GetMetaTypesResponse, GetObjectPermissionsResponse, GetPresenceResponse, GetTranslationsResponse, GetViewResponse, GetWorkflowConfigResponse, GetWorkflowStateResponse, ListNotificationsResponse, ListViewsResponse, MetadataCacheRequest, MetadataCacheResponse, RealtimeConnectRequest, RealtimeConnectResponse, RealtimeSubscribeRequest, RealtimeSubscribeResponse, RefreshTokenRequest, RegisterDeviceRequest, RegisterDeviceResponse, RegisterRequest, StandardErrorCode, UpdateManyRequest, UpdateViewResponse, WorkflowApproveRequest, WorkflowApproveResponse, WorkflowRejectRequest, WorkflowRejectResponse, WorkflowTransitionRequest, WorkflowTransitionResponse } from '@objectstack/spec/api';
2
+ import { GetDiscoveryResponse, StandardErrorCode, ErrorCategory, WellKnownCapabilities, GetMetaTypesResponse, GetMetaItemsResponse, MetadataCacheRequest, MetadataCacheResponse, LoginRequest, SessionResponse, RegisterRequest, FileUploadResponse, GetPresignedUrlRequest, PresignedUrlResponse, InitiateChunkedUploadRequest, InitiateChunkedUploadResponse, UploadChunkResponse, CompleteChunkedUploadRequest, CompleteChunkedUploadResponse, CheckPermissionRequest, CheckPermissionResponse, GetObjectPermissionsResponse, GetEffectivePermissionsResponse, RealtimeConnectRequest, RealtimeConnectResponse, RealtimeSubscribeRequest, RealtimeSubscribeResponse, SetPresenceRequest, GetPresenceResponse, GetWorkflowConfigResponse, GetWorkflowStateResponse, WorkflowTransitionRequest, WorkflowTransitionResponse, WorkflowApproveRequest, WorkflowApproveResponse, WorkflowRejectRequest, WorkflowRejectResponse, ListViewsResponse, GetViewResponse, CreateViewRequest, CreateViewResponse, UpdateViewRequest, UpdateViewResponse, DeleteViewResponse, RegisterDeviceRequest, RegisterDeviceResponse, UnregisterDeviceResponse, GetNotificationPreferencesResponse, UpdateNotificationPreferencesRequest, UpdateNotificationPreferencesResponse, ListNotificationsResponse, MarkNotificationsReadResponse, MarkAllNotificationsReadResponse, AiNlqRequest, AiNlqResponse, AiChatRequest, AiChatResponse, AiSuggestRequest, AiSuggestResponse, AiInsightsRequest, AiInsightsResponse, GetLocalesResponse, GetTranslationsResponse, GetFieldLabelsResponse, GetFeedResponse, CreateFeedItemResponse, UpdateFeedItemResponse, DeleteFeedItemResponse, AddReactionResponse, RemoveReactionResponse, PinFeedItemResponse, UnpinFeedItemResponse, StarFeedItemResponse, UnstarFeedItemResponse, SearchFeedResponse, GetChangelogResponse, SubscribeResponse, UnsubscribeResponse, BatchUpdateRequest, BatchUpdateResponse, BatchOptions } from '@objectstack/spec/api';
3
+ export { AddReactionResponse, AiChatRequest, AiChatResponse, AiInsightsRequest, AiInsightsResponse, AiNlqRequest, AiNlqResponse, AiSuggestRequest, AiSuggestResponse, BatchOperationResult, BatchOptions, BatchRecord, BatchUpdateRequest, BatchUpdateResponse, CheckPermissionRequest, CheckPermissionResponse, CreateFeedItemResponse, CreateViewResponse, DeleteFeedItemResponse, DeleteManyRequest, DeleteViewResponse, ErrorCategory, GetChangelogResponse, GetDiscoveryResponse, GetEffectivePermissionsResponse, GetFeedResponse, GetFieldLabelsResponse, GetLocalesResponse, GetMetaItemsResponse, GetMetaTypesResponse, GetObjectPermissionsResponse, GetPresenceResponse, GetTranslationsResponse, GetViewResponse, GetWorkflowConfigResponse, GetWorkflowStateResponse, ListNotificationsResponse, ListViewsResponse, MetadataCacheRequest, MetadataCacheResponse, PinFeedItemResponse, RealtimeConnectRequest, RealtimeConnectResponse, RealtimeSubscribeRequest, RealtimeSubscribeResponse, RefreshTokenRequest, RegisterDeviceRequest, RegisterDeviceResponse, RegisterRequest, RemoveReactionResponse, SearchFeedResponse, StandardErrorCode, StarFeedItemResponse, SubscribeResponse, UnpinFeedItemResponse, UnstarFeedItemResponse, UnsubscribeResponse, UpdateFeedItemResponse, UpdateManyRequest, UpdateViewResponse, WellKnownCapabilities, WorkflowApproveRequest, WorkflowApproveResponse, WorkflowRejectRequest, WorkflowRejectResponse, WorkflowTransitionRequest, WorkflowTransitionResponse } from '@objectstack/spec/api';
4
4
  import { Logger } from '@objectstack/core';
5
5
 
6
6
  /**
@@ -190,7 +190,10 @@ interface ClientConfig {
190
190
  type DiscoveryResult = GetDiscoveryResponse;
191
191
  interface QueryOptions {
192
192
  select?: string[];
193
- filters?: Record<string, any>;
193
+ /** @canonical Preferred filter parameter (singular). */
194
+ filter?: Record<string, any> | unknown[];
195
+ /** @deprecated Use `filter` (singular). Kept for backward compatibility. */
196
+ filters?: Record<string, any> | unknown[];
194
197
  sort?: string | string[] | SortNode[];
195
198
  top?: number;
196
199
  skip?: number;
@@ -273,9 +276,31 @@ declare class ObjectStackClient {
273
276
  status: "degraded" | "stub" | "available" | "unavailable";
274
277
  route?: string | undefined;
275
278
  provider?: string | undefined;
279
+ version?: string | undefined;
276
280
  message?: string | undefined;
281
+ rateLimit?: {
282
+ requestsPerMinute?: number | undefined;
283
+ requestsPerHour?: number | undefined;
284
+ burstLimit?: number | undefined;
285
+ retryAfterMs?: number | undefined;
286
+ } | undefined;
277
287
  }> | undefined;
288
+ capabilities?: {
289
+ feed: boolean;
290
+ comments: boolean;
291
+ automation: boolean;
292
+ cron: boolean;
293
+ search: boolean;
294
+ export: boolean;
295
+ chunkedUpload: boolean;
296
+ } | undefined;
278
297
  }>;
298
+ /**
299
+ * Well-known capability flags discovered from the server.
300
+ * Returns undefined if the client has not yet connected or the server
301
+ * did not include capabilities in its discovery response.
302
+ */
303
+ get capabilities(): WellKnownCapabilities | undefined;
279
304
  /**
280
305
  * Metadata Operations
281
306
  */
@@ -425,12 +450,89 @@ declare class ObjectStackClient {
425
450
  storage: {
426
451
  upload: (file: any, scope?: string) => Promise<FileUploadResponse>;
427
452
  getDownloadUrl: (fileId: string) => Promise<string>;
453
+ /**
454
+ * Get a presigned URL for direct-to-cloud upload
455
+ */
456
+ getPresignedUrl: (req: GetPresignedUrlRequest) => Promise<PresignedUrlResponse>;
457
+ /**
458
+ * Initiate a chunked (multipart) upload session
459
+ */
460
+ initChunkedUpload: (req: InitiateChunkedUploadRequest) => Promise<InitiateChunkedUploadResponse>;
461
+ /**
462
+ * Upload a single chunk/part of a multipart upload
463
+ */
464
+ uploadPart: (uploadId: string, chunkIndex: number, resumeToken: string, data: Blob | Buffer) => Promise<UploadChunkResponse>;
465
+ /**
466
+ * Complete a chunked upload by assembling all parts
467
+ */
468
+ completeChunkedUpload: (req: CompleteChunkedUploadRequest) => Promise<CompleteChunkedUploadResponse>;
469
+ /**
470
+ * Resume an interrupted chunked upload.
471
+ * Fetches current progress, then uploads remaining chunks and completes.
472
+ */
473
+ resumeUpload: (uploadId: string, file: Blob | ArrayBuffer, chunkSize: number, resumeToken: string) => Promise<CompleteChunkedUploadResponse>;
428
474
  };
429
475
  /**
430
476
  * Automation Services
431
477
  */
432
478
  automation: {
479
+ /**
480
+ * Trigger a named automation flow (legacy endpoint)
481
+ */
433
482
  trigger: (triggerName: string, payload: any) => Promise<any>;
483
+ /**
484
+ * List all registered automation flows
485
+ */
486
+ list: () => Promise<{
487
+ flows: string[];
488
+ total: number;
489
+ hasMore: boolean;
490
+ }>;
491
+ /**
492
+ * Get a flow definition by name
493
+ */
494
+ get: (name: string) => Promise<any>;
495
+ /**
496
+ * Create (register) a new flow
497
+ */
498
+ create: (name: string, definition: any) => Promise<any>;
499
+ /**
500
+ * Update an existing flow
501
+ */
502
+ update: (name: string, definition: any) => Promise<any>;
503
+ /**
504
+ * Delete (unregister) a flow
505
+ */
506
+ delete: (name: string) => Promise<{
507
+ name: string;
508
+ deleted: boolean;
509
+ }>;
510
+ /**
511
+ * Enable or disable a flow
512
+ */
513
+ toggle: (name: string, enabled: boolean) => Promise<{
514
+ name: string;
515
+ enabled: boolean;
516
+ }>;
517
+ /**
518
+ * Execution run history
519
+ */
520
+ runs: {
521
+ /**
522
+ * List execution runs for a flow
523
+ */
524
+ list: (flowName: string, options?: {
525
+ limit?: number;
526
+ cursor?: string;
527
+ }) => Promise<{
528
+ runs: any[];
529
+ hasMore: boolean;
530
+ }>;
531
+ /**
532
+ * Get a single execution run
533
+ */
534
+ get: (flowName: string, runId: string) => Promise<any>;
535
+ };
434
536
  };
435
537
  /**
436
538
  * Permissions Services
@@ -607,6 +709,102 @@ declare class ObjectStackClient {
607
709
  */
608
710
  getFieldLabels: (object: string, locale: string) => Promise<GetFieldLabelsResponse>;
609
711
  };
712
+ /**
713
+ * Feed / Chatter Services
714
+ *
715
+ * Provides access to the activity timeline (comments, field changes, tasks),
716
+ * emoji reactions, pin/star, search, changelog, and record subscriptions.
717
+ * Base path: /api/data/{object}/{recordId}/feed
718
+ */
719
+ feed: {
720
+ /**
721
+ * List feed items for a record
722
+ */
723
+ list: (object: string, recordId: string, options?: {
724
+ type?: string;
725
+ limit?: number;
726
+ cursor?: string;
727
+ }) => Promise<GetFeedResponse>;
728
+ /**
729
+ * Create a new feed item (comment, note, task, etc.)
730
+ */
731
+ create: (object: string, recordId: string, data: {
732
+ type: string;
733
+ body?: string;
734
+ mentions?: any[];
735
+ parentId?: string;
736
+ visibility?: string;
737
+ }) => Promise<CreateFeedItemResponse>;
738
+ /**
739
+ * Update an existing feed item
740
+ */
741
+ update: (object: string, recordId: string, feedId: string, data: {
742
+ body?: string;
743
+ mentions?: any[];
744
+ visibility?: string;
745
+ }) => Promise<UpdateFeedItemResponse>;
746
+ /**
747
+ * Delete a feed item
748
+ */
749
+ delete: (object: string, recordId: string, feedId: string) => Promise<DeleteFeedItemResponse>;
750
+ /**
751
+ * Add an emoji reaction to a feed item
752
+ */
753
+ addReaction: (object: string, recordId: string, feedId: string, emoji: string) => Promise<AddReactionResponse>;
754
+ /**
755
+ * Remove an emoji reaction from a feed item
756
+ */
757
+ removeReaction: (object: string, recordId: string, feedId: string, emoji: string) => Promise<RemoveReactionResponse>;
758
+ /**
759
+ * Pin a feed item to the top of the timeline
760
+ */
761
+ pin: (object: string, recordId: string, feedId: string) => Promise<PinFeedItemResponse>;
762
+ /**
763
+ * Unpin a feed item
764
+ */
765
+ unpin: (object: string, recordId: string, feedId: string) => Promise<UnpinFeedItemResponse>;
766
+ /**
767
+ * Star (bookmark) a feed item
768
+ */
769
+ star: (object: string, recordId: string, feedId: string) => Promise<StarFeedItemResponse>;
770
+ /**
771
+ * Unstar a feed item
772
+ */
773
+ unstar: (object: string, recordId: string, feedId: string) => Promise<UnstarFeedItemResponse>;
774
+ /**
775
+ * Search feed items
776
+ */
777
+ search: (object: string, recordId: string, query: string, options?: {
778
+ type?: string;
779
+ actorId?: string;
780
+ dateFrom?: string;
781
+ dateTo?: string;
782
+ limit?: number;
783
+ cursor?: string;
784
+ }) => Promise<SearchFeedResponse>;
785
+ /**
786
+ * Get field-level changelog for a record
787
+ */
788
+ getChangelog: (object: string, recordId: string, options?: {
789
+ field?: string;
790
+ actorId?: string;
791
+ dateFrom?: string;
792
+ dateTo?: string;
793
+ limit?: number;
794
+ cursor?: string;
795
+ }) => Promise<GetChangelogResponse>;
796
+ /**
797
+ * Subscribe to record notifications
798
+ */
799
+ subscribe: (object: string, recordId: string, options?: {
800
+ events?: string[];
801
+ channels?: string[];
802
+ }) => Promise<SubscribeResponse>;
803
+ /**
804
+ * Unsubscribe from record notifications
805
+ */
806
+ unsubscribe: (object: string, recordId: string) => Promise<UnsubscribeResponse>;
807
+ };
610
808
  /**
611
809
  * Data Operations
612
810
  */