@arbidocs/client 0.3.63 → 0.3.65

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/index.d.cts CHANGED
@@ -210,8 +210,21 @@ interface paths {
210
210
  /**
211
211
  * Get User Contacts
212
212
  * @description Get all contacts created by the current user.
213
- * Uses RLS to enforce that users can only see their own contacts.
214
- * Includes registered user info when available.
213
+ *
214
+ * The contacts RLS policy uses ``is_self_or_own_agent(created_by)``, which
215
+ * intentionally lets a user's auto-provisioned agents read their own
216
+ * contact rows when *they* are the caller. For the human-facing list
217
+ * endpoint we narrow that down explicitly to ``created_by = current_user``,
218
+ * so the user only sees contacts they themselves added. Includes
219
+ * registered user info when available.
220
+ *
221
+ * Agent contacts (``contact_user.external_id`` starting with ``agt-``) are
222
+ * also filtered out — those are auto-provisioned helpers surfaced through
223
+ * a dedicated UI panel, not the human contact list. We can't filter that
224
+ * in SQL via a join: ``users`` RLS hides cross-owner-group rows, so a
225
+ * left join would NULL out the human contact's user row and ``NULL LIKE
226
+ * 'agt-%'`` evaluates to NULL — which silently drops the contact. The
227
+ * agent check lives below, after the security-definer user lookup.
215
228
  */
216
229
  get: operations['get_user_contacts'];
217
230
  put?: never;
@@ -639,46 +652,6 @@ interface paths {
639
652
  patch: operations['update_user_settings'];
640
653
  trace?: never;
641
654
  };
642
- '/v1/user/request-deletion': {
643
- parameters: {
644
- query?: never;
645
- header?: never;
646
- path?: never;
647
- cookie?: never;
648
- };
649
- get?: never;
650
- put?: never;
651
- /**
652
- * Request Account Deletion
653
- * @description Schedule account deletion after a 30-day grace period.
654
- */
655
- post: operations['request_account_deletion'];
656
- delete?: never;
657
- options?: never;
658
- head?: never;
659
- patch?: never;
660
- trace?: never;
661
- };
662
- '/v1/user/cancel-deletion': {
663
- parameters: {
664
- query?: never;
665
- header?: never;
666
- path?: never;
667
- cookie?: never;
668
- };
669
- get?: never;
670
- put?: never;
671
- /**
672
- * Cancel Account Deletion
673
- * @description Cancel a pending account deletion, restoring full access.
674
- */
675
- post: operations['cancel_account_deletion'];
676
- delete?: never;
677
- options?: never;
678
- head?: never;
679
- patch?: never;
680
- trace?: never;
681
- };
682
655
  '/v1/user/me': {
683
656
  parameters: {
684
657
  query?: never;
@@ -1928,6 +1901,29 @@ interface paths {
1928
1901
  patch?: never;
1929
1902
  trace?: never;
1930
1903
  };
1904
+ '/v1/oauth/create_code': {
1905
+ parameters: {
1906
+ query?: never;
1907
+ header?: never;
1908
+ path?: never;
1909
+ cookie?: never;
1910
+ };
1911
+ get?: never;
1912
+ put?: never;
1913
+ /**
1914
+ * Create Oauth Code
1915
+ * @description Create an OAuth authorization code after user consent.
1916
+ *
1917
+ * Called by the /mcp-connect frontend page when the user clicks Allow.
1918
+ * Requires the user's active browser session JWT as the Bearer token.
1919
+ */
1920
+ post: operations['create_oauth_code_v1_oauth_create_code_post'];
1921
+ delete?: never;
1922
+ options?: never;
1923
+ head?: never;
1924
+ patch?: never;
1925
+ trace?: never;
1926
+ };
1931
1927
  '/v1/responses': {
1932
1928
  parameters: {
1933
1929
  query?: never;
@@ -3209,25 +3205,6 @@ interface components {
3209
3205
  /** Email */
3210
3206
  email: string;
3211
3207
  };
3212
- /**
3213
- * RequestDeletionResponse
3214
- * @description Response returned when a user requests account deletion.
3215
- */
3216
- RequestDeletionResponse: {
3217
- /**
3218
- * Deletion Scheduled At
3219
- * Format: date-time
3220
- */
3221
- deletion_scheduled_at: string;
3222
- };
3223
- /**
3224
- * CancelDeletionResponse
3225
- * @description Response returned when a user cancels account deletion.
3226
- */
3227
- CancelDeletionResponse: {
3228
- /** Detail */
3229
- detail: string;
3230
- };
3231
3208
  /**
3232
3209
  * ConnectionClosedMessage
3233
3210
  * @description Sent when connection is closed (e.g., another tab opened).
@@ -3436,6 +3413,33 @@ interface components {
3436
3413
  */
3437
3414
  mode: string;
3438
3415
  };
3416
+ /** CreateCodeRequest */
3417
+ CreateCodeRequest: {
3418
+ /** Client Id */
3419
+ client_id: string;
3420
+ /** Redirect Uri */
3421
+ redirect_uri: string;
3422
+ /** State */
3423
+ state: string;
3424
+ /** Code Challenge */
3425
+ code_challenge?: string | null;
3426
+ /** Code Challenge Method */
3427
+ code_challenge_method?: string | null;
3428
+ /**
3429
+ * Scopes
3430
+ * @default []
3431
+ */
3432
+ scopes: string[];
3433
+ };
3434
+ /** CreateCodeResponse */
3435
+ CreateCodeResponse: {
3436
+ /** Code */
3437
+ code: string;
3438
+ /** Redirect Uri */
3439
+ redirect_uri: string;
3440
+ /** State */
3441
+ state: string;
3442
+ };
3439
3443
  /**
3440
3444
  * CreateDocTagRequest
3441
3445
  * @description Apply a tag to one or more documents.
@@ -7551,11 +7555,6 @@ interface components {
7551
7555
  premium_model?: string | null;
7552
7556
  /** Picture */
7553
7557
  picture?: string | null;
7554
- /**
7555
- * Deletion Requested At
7556
- * Format: date-time
7557
- */
7558
- deletion_requested_at?: string | null;
7559
7558
  } & {
7560
7559
  [key: string]: unknown;
7561
7560
  };
@@ -8914,64 +8913,6 @@ interface operations {
8914
8913
  };
8915
8914
  };
8916
8915
  };
8917
- request_account_deletion: {
8918
- parameters: {
8919
- query?: never;
8920
- header?: never;
8921
- path?: never;
8922
- cookie?: never;
8923
- };
8924
- requestBody?: never;
8925
- responses: {
8926
- /** @description Successful Response */
8927
- 200: {
8928
- headers: {
8929
- [name: string]: unknown;
8930
- };
8931
- content: {
8932
- 'application/json': components['schemas']['RequestDeletionResponse'];
8933
- };
8934
- };
8935
- /** @description Validation Error */
8936
- 422: {
8937
- headers: {
8938
- [name: string]: unknown;
8939
- };
8940
- content: {
8941
- 'application/json': components['schemas']['HTTPValidationError'];
8942
- };
8943
- };
8944
- };
8945
- };
8946
- cancel_account_deletion: {
8947
- parameters: {
8948
- query?: never;
8949
- header?: never;
8950
- path?: never;
8951
- cookie?: never;
8952
- };
8953
- requestBody?: never;
8954
- responses: {
8955
- /** @description Successful Response */
8956
- 200: {
8957
- headers: {
8958
- [name: string]: unknown;
8959
- };
8960
- content: {
8961
- 'application/json': components['schemas']['CancelDeletionResponse'];
8962
- };
8963
- };
8964
- /** @description Validation Error */
8965
- 422: {
8966
- headers: {
8967
- [name: string]: unknown;
8968
- };
8969
- content: {
8970
- 'application/json': components['schemas']['HTTPValidationError'];
8971
- };
8972
- };
8973
- };
8974
- };
8975
8916
  list_test_accounts: {
8976
8917
  parameters: {
8977
8918
  query?: never;
@@ -10931,6 +10872,39 @@ interface operations {
10931
10872
  };
10932
10873
  };
10933
10874
  };
10875
+ create_oauth_code_v1_oauth_create_code_post: {
10876
+ parameters: {
10877
+ query?: never;
10878
+ header?: never;
10879
+ path?: never;
10880
+ cookie?: never;
10881
+ };
10882
+ requestBody: {
10883
+ content: {
10884
+ 'application/json': components['schemas']['CreateCodeRequest'];
10885
+ };
10886
+ };
10887
+ responses: {
10888
+ /** @description Successful Response */
10889
+ 200: {
10890
+ headers: {
10891
+ [name: string]: unknown;
10892
+ };
10893
+ content: {
10894
+ 'application/json': components['schemas']['CreateCodeResponse'];
10895
+ };
10896
+ };
10897
+ /** @description Validation Error */
10898
+ 422: {
10899
+ headers: {
10900
+ [name: string]: unknown;
10901
+ };
10902
+ content: {
10903
+ 'application/json': components['schemas']['HTTPValidationError'];
10904
+ };
10905
+ };
10906
+ };
10907
+ };
10934
10908
  create_response: {
10935
10909
  parameters: {
10936
10910
  query?: never;
package/dist/index.d.ts CHANGED
@@ -210,8 +210,21 @@ interface paths {
210
210
  /**
211
211
  * Get User Contacts
212
212
  * @description Get all contacts created by the current user.
213
- * Uses RLS to enforce that users can only see their own contacts.
214
- * Includes registered user info when available.
213
+ *
214
+ * The contacts RLS policy uses ``is_self_or_own_agent(created_by)``, which
215
+ * intentionally lets a user's auto-provisioned agents read their own
216
+ * contact rows when *they* are the caller. For the human-facing list
217
+ * endpoint we narrow that down explicitly to ``created_by = current_user``,
218
+ * so the user only sees contacts they themselves added. Includes
219
+ * registered user info when available.
220
+ *
221
+ * Agent contacts (``contact_user.external_id`` starting with ``agt-``) are
222
+ * also filtered out — those are auto-provisioned helpers surfaced through
223
+ * a dedicated UI panel, not the human contact list. We can't filter that
224
+ * in SQL via a join: ``users`` RLS hides cross-owner-group rows, so a
225
+ * left join would NULL out the human contact's user row and ``NULL LIKE
226
+ * 'agt-%'`` evaluates to NULL — which silently drops the contact. The
227
+ * agent check lives below, after the security-definer user lookup.
215
228
  */
216
229
  get: operations['get_user_contacts'];
217
230
  put?: never;
@@ -639,46 +652,6 @@ interface paths {
639
652
  patch: operations['update_user_settings'];
640
653
  trace?: never;
641
654
  };
642
- '/v1/user/request-deletion': {
643
- parameters: {
644
- query?: never;
645
- header?: never;
646
- path?: never;
647
- cookie?: never;
648
- };
649
- get?: never;
650
- put?: never;
651
- /**
652
- * Request Account Deletion
653
- * @description Schedule account deletion after a 30-day grace period.
654
- */
655
- post: operations['request_account_deletion'];
656
- delete?: never;
657
- options?: never;
658
- head?: never;
659
- patch?: never;
660
- trace?: never;
661
- };
662
- '/v1/user/cancel-deletion': {
663
- parameters: {
664
- query?: never;
665
- header?: never;
666
- path?: never;
667
- cookie?: never;
668
- };
669
- get?: never;
670
- put?: never;
671
- /**
672
- * Cancel Account Deletion
673
- * @description Cancel a pending account deletion, restoring full access.
674
- */
675
- post: operations['cancel_account_deletion'];
676
- delete?: never;
677
- options?: never;
678
- head?: never;
679
- patch?: never;
680
- trace?: never;
681
- };
682
655
  '/v1/user/me': {
683
656
  parameters: {
684
657
  query?: never;
@@ -1928,6 +1901,29 @@ interface paths {
1928
1901
  patch?: never;
1929
1902
  trace?: never;
1930
1903
  };
1904
+ '/v1/oauth/create_code': {
1905
+ parameters: {
1906
+ query?: never;
1907
+ header?: never;
1908
+ path?: never;
1909
+ cookie?: never;
1910
+ };
1911
+ get?: never;
1912
+ put?: never;
1913
+ /**
1914
+ * Create Oauth Code
1915
+ * @description Create an OAuth authorization code after user consent.
1916
+ *
1917
+ * Called by the /mcp-connect frontend page when the user clicks Allow.
1918
+ * Requires the user's active browser session JWT as the Bearer token.
1919
+ */
1920
+ post: operations['create_oauth_code_v1_oauth_create_code_post'];
1921
+ delete?: never;
1922
+ options?: never;
1923
+ head?: never;
1924
+ patch?: never;
1925
+ trace?: never;
1926
+ };
1931
1927
  '/v1/responses': {
1932
1928
  parameters: {
1933
1929
  query?: never;
@@ -3209,25 +3205,6 @@ interface components {
3209
3205
  /** Email */
3210
3206
  email: string;
3211
3207
  };
3212
- /**
3213
- * RequestDeletionResponse
3214
- * @description Response returned when a user requests account deletion.
3215
- */
3216
- RequestDeletionResponse: {
3217
- /**
3218
- * Deletion Scheduled At
3219
- * Format: date-time
3220
- */
3221
- deletion_scheduled_at: string;
3222
- };
3223
- /**
3224
- * CancelDeletionResponse
3225
- * @description Response returned when a user cancels account deletion.
3226
- */
3227
- CancelDeletionResponse: {
3228
- /** Detail */
3229
- detail: string;
3230
- };
3231
3208
  /**
3232
3209
  * ConnectionClosedMessage
3233
3210
  * @description Sent when connection is closed (e.g., another tab opened).
@@ -3436,6 +3413,33 @@ interface components {
3436
3413
  */
3437
3414
  mode: string;
3438
3415
  };
3416
+ /** CreateCodeRequest */
3417
+ CreateCodeRequest: {
3418
+ /** Client Id */
3419
+ client_id: string;
3420
+ /** Redirect Uri */
3421
+ redirect_uri: string;
3422
+ /** State */
3423
+ state: string;
3424
+ /** Code Challenge */
3425
+ code_challenge?: string | null;
3426
+ /** Code Challenge Method */
3427
+ code_challenge_method?: string | null;
3428
+ /**
3429
+ * Scopes
3430
+ * @default []
3431
+ */
3432
+ scopes: string[];
3433
+ };
3434
+ /** CreateCodeResponse */
3435
+ CreateCodeResponse: {
3436
+ /** Code */
3437
+ code: string;
3438
+ /** Redirect Uri */
3439
+ redirect_uri: string;
3440
+ /** State */
3441
+ state: string;
3442
+ };
3439
3443
  /**
3440
3444
  * CreateDocTagRequest
3441
3445
  * @description Apply a tag to one or more documents.
@@ -7551,11 +7555,6 @@ interface components {
7551
7555
  premium_model?: string | null;
7552
7556
  /** Picture */
7553
7557
  picture?: string | null;
7554
- /**
7555
- * Deletion Requested At
7556
- * Format: date-time
7557
- */
7558
- deletion_requested_at?: string | null;
7559
7558
  } & {
7560
7559
  [key: string]: unknown;
7561
7560
  };
@@ -8914,64 +8913,6 @@ interface operations {
8914
8913
  };
8915
8914
  };
8916
8915
  };
8917
- request_account_deletion: {
8918
- parameters: {
8919
- query?: never;
8920
- header?: never;
8921
- path?: never;
8922
- cookie?: never;
8923
- };
8924
- requestBody?: never;
8925
- responses: {
8926
- /** @description Successful Response */
8927
- 200: {
8928
- headers: {
8929
- [name: string]: unknown;
8930
- };
8931
- content: {
8932
- 'application/json': components['schemas']['RequestDeletionResponse'];
8933
- };
8934
- };
8935
- /** @description Validation Error */
8936
- 422: {
8937
- headers: {
8938
- [name: string]: unknown;
8939
- };
8940
- content: {
8941
- 'application/json': components['schemas']['HTTPValidationError'];
8942
- };
8943
- };
8944
- };
8945
- };
8946
- cancel_account_deletion: {
8947
- parameters: {
8948
- query?: never;
8949
- header?: never;
8950
- path?: never;
8951
- cookie?: never;
8952
- };
8953
- requestBody?: never;
8954
- responses: {
8955
- /** @description Successful Response */
8956
- 200: {
8957
- headers: {
8958
- [name: string]: unknown;
8959
- };
8960
- content: {
8961
- 'application/json': components['schemas']['CancelDeletionResponse'];
8962
- };
8963
- };
8964
- /** @description Validation Error */
8965
- 422: {
8966
- headers: {
8967
- [name: string]: unknown;
8968
- };
8969
- content: {
8970
- 'application/json': components['schemas']['HTTPValidationError'];
8971
- };
8972
- };
8973
- };
8974
- };
8975
8916
  list_test_accounts: {
8976
8917
  parameters: {
8977
8918
  query?: never;
@@ -10931,6 +10872,39 @@ interface operations {
10931
10872
  };
10932
10873
  };
10933
10874
  };
10875
+ create_oauth_code_v1_oauth_create_code_post: {
10876
+ parameters: {
10877
+ query?: never;
10878
+ header?: never;
10879
+ path?: never;
10880
+ cookie?: never;
10881
+ };
10882
+ requestBody: {
10883
+ content: {
10884
+ 'application/json': components['schemas']['CreateCodeRequest'];
10885
+ };
10886
+ };
10887
+ responses: {
10888
+ /** @description Successful Response */
10889
+ 200: {
10890
+ headers: {
10891
+ [name: string]: unknown;
10892
+ };
10893
+ content: {
10894
+ 'application/json': components['schemas']['CreateCodeResponse'];
10895
+ };
10896
+ };
10897
+ /** @description Validation Error */
10898
+ 422: {
10899
+ headers: {
10900
+ [name: string]: unknown;
10901
+ };
10902
+ content: {
10903
+ 'application/json': components['schemas']['HTTPValidationError'];
10904
+ };
10905
+ };
10906
+ };
10907
+ };
10934
10908
  create_response: {
10935
10909
  parameters: {
10936
10910
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/client",
3
- "version": "0.3.63",
3
+ "version": "0.3.65",
4
4
  "description": "TypeScript SDK for the ARBI API — zero-knowledge auth, E2E encryption, and type-safe REST client",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",