@vrplatform/api 1.3.1-stage.4135 → 1.3.1-stage.4143

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.
@@ -296,6 +296,23 @@ export interface paths {
296
296
  patch?: never;
297
297
  trace?: never;
298
298
  };
299
+ "/auth/embed/session": {
300
+ parameters: {
301
+ query?: never;
302
+ header?: never;
303
+ path?: never;
304
+ cookie?: never;
305
+ };
306
+ get?: never;
307
+ put?: never;
308
+ /** @description Issue a short-lived embedded session for a provider user. */
309
+ post: operations["postAuthEmbedSession"];
310
+ delete?: never;
311
+ options?: never;
312
+ head?: never;
313
+ patch?: never;
314
+ trace?: never;
315
+ };
299
316
  "/bank-accounts": {
300
317
  parameters: {
301
318
  query?: never;
@@ -3919,6 +3936,40 @@ export interface paths {
3919
3936
  patch?: never;
3920
3937
  trace?: never;
3921
3938
  };
3939
+ "/users": {
3940
+ parameters: {
3941
+ query?: never;
3942
+ header?: never;
3943
+ path?: never;
3944
+ cookie?: never;
3945
+ };
3946
+ get?: never;
3947
+ put?: never;
3948
+ /** @description Create or update a platform user by email, optionally granting an initial team membership. Admin access only; used by the identity provider signup hooks. */
3949
+ post: operations["postUsers"];
3950
+ delete?: never;
3951
+ options?: never;
3952
+ head?: never;
3953
+ patch?: never;
3954
+ trace?: never;
3955
+ };
3956
+ "/users/{id}": {
3957
+ parameters: {
3958
+ query?: never;
3959
+ header?: never;
3960
+ path?: never;
3961
+ cookie?: never;
3962
+ };
3963
+ get?: never;
3964
+ /** @description Update a platform user by id. Admin access only; used by the identity provider profile-update hooks. */
3965
+ put: operations["putUsersById"];
3966
+ post?: never;
3967
+ delete?: never;
3968
+ options?: never;
3969
+ head?: never;
3970
+ patch?: never;
3971
+ trace?: never;
3972
+ };
3922
3973
  }
3923
3974
  export type webhooks = Record<string, never>;
3924
3975
  export interface components {
@@ -8350,6 +8401,154 @@ export interface operations {
8350
8401
  };
8351
8402
  };
8352
8403
  };
8404
+ postAuthEmbedSession: {
8405
+ parameters: {
8406
+ query?: {
8407
+ autoProvision?: boolean;
8408
+ };
8409
+ header?: never;
8410
+ path?: never;
8411
+ cookie?: never;
8412
+ };
8413
+ requestBody?: {
8414
+ content: {
8415
+ "application/json": {
8416
+ sub: string;
8417
+ /** Format: uuid */
8418
+ tenantId: string;
8419
+ ttlMinutes?: number;
8420
+ };
8421
+ };
8422
+ };
8423
+ responses: {
8424
+ /** @description Successful response */
8425
+ 200: {
8426
+ headers: {
8427
+ [name: string]: unknown;
8428
+ };
8429
+ content: {
8430
+ "application/json": {
8431
+ accessToken: string;
8432
+ expiresAt: string;
8433
+ /** Format: uuid */
8434
+ tenantId: string;
8435
+ /** Format: uuid */
8436
+ userId: string;
8437
+ };
8438
+ };
8439
+ };
8440
+ /** @description Bad request */
8441
+ 400: {
8442
+ headers: {
8443
+ [name: string]: unknown;
8444
+ };
8445
+ content: {
8446
+ "application/json": {
8447
+ code: string;
8448
+ message: string;
8449
+ links?: {
8450
+ docs: string;
8451
+ schema: string;
8452
+ };
8453
+ issues?: {
8454
+ message: string;
8455
+ path?: (string | number)[];
8456
+ schema?: string;
8457
+ }[];
8458
+ context?: unknown;
8459
+ };
8460
+ };
8461
+ };
8462
+ /** @description Unauthorized */
8463
+ 401: {
8464
+ headers: {
8465
+ [name: string]: unknown;
8466
+ };
8467
+ content: {
8468
+ "application/json": {
8469
+ code: string;
8470
+ message: string;
8471
+ links?: {
8472
+ docs: string;
8473
+ schema: string;
8474
+ };
8475
+ issues?: {
8476
+ message: string;
8477
+ path?: (string | number)[];
8478
+ schema?: string;
8479
+ }[];
8480
+ context?: unknown;
8481
+ };
8482
+ };
8483
+ };
8484
+ /** @description Forbidden */
8485
+ 403: {
8486
+ headers: {
8487
+ [name: string]: unknown;
8488
+ };
8489
+ content: {
8490
+ "application/json": {
8491
+ code: string;
8492
+ message: string;
8493
+ links?: {
8494
+ docs: string;
8495
+ schema: string;
8496
+ };
8497
+ issues?: {
8498
+ message: string;
8499
+ path?: (string | number)[];
8500
+ schema?: string;
8501
+ }[];
8502
+ context?: unknown;
8503
+ };
8504
+ };
8505
+ };
8506
+ /** @description Not found */
8507
+ 404: {
8508
+ headers: {
8509
+ [name: string]: unknown;
8510
+ };
8511
+ content: {
8512
+ "application/json": {
8513
+ code: string;
8514
+ message: string;
8515
+ links?: {
8516
+ docs: string;
8517
+ schema: string;
8518
+ };
8519
+ issues?: {
8520
+ message: string;
8521
+ path?: (string | number)[];
8522
+ schema?: string;
8523
+ }[];
8524
+ context?: unknown;
8525
+ };
8526
+ };
8527
+ };
8528
+ /** @description Internal server error */
8529
+ 500: {
8530
+ headers: {
8531
+ [name: string]: unknown;
8532
+ };
8533
+ content: {
8534
+ "application/json": {
8535
+ code: string;
8536
+ message: string;
8537
+ links?: {
8538
+ docs: string;
8539
+ schema: string;
8540
+ };
8541
+ issues?: {
8542
+ message: string;
8543
+ path?: (string | number)[];
8544
+ schema?: string;
8545
+ }[];
8546
+ context?: unknown;
8547
+ };
8548
+ };
8549
+ };
8550
+ };
8551
+ };
8353
8552
  getBankAccounts: {
8354
8553
  parameters: {
8355
8554
  query?: {
@@ -59134,7 +59333,7 @@ export interface operations {
59134
59333
  /** Format: uuid */
59135
59334
  id: string;
59136
59335
  /** @enum {string} */
59137
- dataRegion: "eu" | "us" | "ap";
59336
+ dataRegion: "ap" | "crunchy" | "eu" | "us";
59138
59337
  /** @enum {string} */
59139
59338
  storageRealm: "vrintegration" | "vrtrust";
59140
59339
  defaultCurrency?: string | null;
@@ -59419,7 +59618,7 @@ export interface operations {
59419
59618
  content: {
59420
59619
  "application/json": {
59421
59620
  /** @enum {string} */
59422
- dataRegion?: "eu" | "us" | "ap";
59621
+ dataRegion?: "ap" | "crunchy" | "eu" | "us";
59423
59622
  defaultCurrency?: string | null;
59424
59623
  longTermStayNights?: number | null;
59425
59624
  defaultRevenueRecognition?: ("checkIn" | "checkOut" | "proRata") | null;
@@ -59494,7 +59693,7 @@ export interface operations {
59494
59693
  /** Format: uuid */
59495
59694
  id: string;
59496
59695
  /** @enum {string} */
59497
- dataRegion: "eu" | "us" | "ap";
59696
+ dataRegion: "ap" | "crunchy" | "eu" | "us";
59498
59697
  /** @enum {string} */
59499
59698
  storageRealm: "vrintegration" | "vrtrust";
59500
59699
  defaultCurrency?: string | null;
@@ -60555,7 +60754,7 @@ export interface operations {
60555
60754
  /** Format: uuid */
60556
60755
  id: string;
60557
60756
  /** @enum {string} */
60558
- dataRegion: "eu" | "us" | "ap";
60757
+ dataRegion: "ap" | "crunchy" | "eu" | "us";
60559
60758
  /** @enum {string} */
60560
60759
  storageRealm: "vrintegration" | "vrtrust";
60561
60760
  defaultCurrency?: string | null;
@@ -60859,7 +61058,7 @@ export interface operations {
60859
61058
  /** Format: uuid */
60860
61059
  id: string;
60861
61060
  /** @enum {string} */
60862
- dataRegion: "eu" | "us" | "ap";
61061
+ dataRegion: "ap" | "crunchy" | "eu" | "us";
60863
61062
  /** @enum {string} */
60864
61063
  storageRealm: "vrintegration" | "vrtrust";
60865
61064
  defaultCurrency?: string | null;
@@ -61161,7 +61360,7 @@ export interface operations {
61161
61360
  /** Format: uuid */
61162
61361
  id: string;
61163
61362
  /** @enum {string} */
61164
- dataRegion: "eu" | "us" | "ap";
61363
+ dataRegion: "ap" | "crunchy" | "eu" | "us";
61165
61364
  /** @enum {string} */
61166
61365
  storageRealm: "vrintegration" | "vrtrust";
61167
61366
  defaultCurrency?: string | null;
@@ -63484,7 +63683,7 @@ export interface operations {
63484
63683
  /** Format: uuid */
63485
63684
  id: string;
63486
63685
  /** @enum {string} */
63487
- dataRegion: "eu" | "us" | "ap";
63686
+ dataRegion: "ap" | "crunchy" | "eu" | "us";
63488
63687
  /** @enum {string} */
63489
63688
  storageRealm: "vrintegration" | "vrtrust";
63490
63689
  defaultCurrency?: string | null;
@@ -63771,7 +63970,7 @@ export interface operations {
63771
63970
  /** Format: uuid */
63772
63971
  id: string;
63773
63972
  /** @enum {string} */
63774
- dataRegion: "eu" | "us" | "ap";
63973
+ dataRegion: "ap" | "crunchy" | "eu" | "us";
63775
63974
  /** @enum {string} */
63776
63975
  storageRealm: "vrintegration" | "vrtrust";
63777
63976
  defaultCurrency?: string | null;
@@ -64135,7 +64334,7 @@ export interface operations {
64135
64334
  /** Format: uuid */
64136
64335
  id: string;
64137
64336
  /** @enum {string} */
64138
- dataRegion: "eu" | "us" | "ap";
64337
+ dataRegion: "ap" | "crunchy" | "eu" | "us";
64139
64338
  /** @enum {string} */
64140
64339
  storageRealm: "vrintegration" | "vrtrust";
64141
64340
  defaultCurrency?: string | null;
@@ -64994,7 +65193,7 @@ export interface operations {
64994
65193
  /** Format: uuid */
64995
65194
  id: string;
64996
65195
  /** @enum {string} */
64997
- dataRegion: "eu" | "us" | "ap";
65196
+ dataRegion: "ap" | "crunchy" | "eu" | "us";
64998
65197
  /** @enum {string} */
64999
65198
  storageRealm: "vrintegration" | "vrtrust";
65000
65199
  defaultCurrency?: string | null;
@@ -72527,4 +72726,336 @@ export interface operations {
72527
72726
  };
72528
72727
  };
72529
72728
  };
72729
+ postUsers: {
72730
+ parameters: {
72731
+ query?: never;
72732
+ header?: never;
72733
+ path?: never;
72734
+ cookie?: never;
72735
+ };
72736
+ requestBody?: {
72737
+ content: {
72738
+ "application/json": {
72739
+ /** Format: uuid */
72740
+ id?: string;
72741
+ email: string;
72742
+ firstName?: string | null;
72743
+ lastName?: string | null;
72744
+ name?: string | null;
72745
+ /**
72746
+ * @default active
72747
+ * @enum {string}
72748
+ */
72749
+ status?: "active" | "inactive" | "archived" | "unconfirmed";
72750
+ partnerId?: string | null;
72751
+ secondaryEmails?: string[];
72752
+ membership?: {
72753
+ /** Format: uuid */
72754
+ tenantId: string;
72755
+ /**
72756
+ * @default user
72757
+ * @enum {string}
72758
+ */
72759
+ role?: "admin" | "user" | "owner";
72760
+ };
72761
+ };
72762
+ };
72763
+ };
72764
+ responses: {
72765
+ /** @description Successful response */
72766
+ 200: {
72767
+ headers: {
72768
+ [name: string]: unknown;
72769
+ };
72770
+ content: {
72771
+ "application/json": {
72772
+ /** Format: uuid */
72773
+ id: string;
72774
+ isAdmin: boolean;
72775
+ memberships: {
72776
+ /** Format: uuid */
72777
+ tenantId: string;
72778
+ role: string | null;
72779
+ }[];
72780
+ };
72781
+ };
72782
+ };
72783
+ /** @description Bad request */
72784
+ 400: {
72785
+ headers: {
72786
+ [name: string]: unknown;
72787
+ };
72788
+ content: {
72789
+ "application/json": {
72790
+ code: string;
72791
+ message: string;
72792
+ links?: {
72793
+ docs: string;
72794
+ schema: string;
72795
+ };
72796
+ issues?: {
72797
+ message: string;
72798
+ path?: (string | number)[];
72799
+ schema?: string;
72800
+ }[];
72801
+ context?: unknown;
72802
+ };
72803
+ };
72804
+ };
72805
+ /** @description Unauthorized */
72806
+ 401: {
72807
+ headers: {
72808
+ [name: string]: unknown;
72809
+ };
72810
+ content: {
72811
+ "application/json": {
72812
+ code: string;
72813
+ message: string;
72814
+ links?: {
72815
+ docs: string;
72816
+ schema: string;
72817
+ };
72818
+ issues?: {
72819
+ message: string;
72820
+ path?: (string | number)[];
72821
+ schema?: string;
72822
+ }[];
72823
+ context?: unknown;
72824
+ };
72825
+ };
72826
+ };
72827
+ /** @description Forbidden */
72828
+ 403: {
72829
+ headers: {
72830
+ [name: string]: unknown;
72831
+ };
72832
+ content: {
72833
+ "application/json": {
72834
+ code: string;
72835
+ message: string;
72836
+ links?: {
72837
+ docs: string;
72838
+ schema: string;
72839
+ };
72840
+ issues?: {
72841
+ message: string;
72842
+ path?: (string | number)[];
72843
+ schema?: string;
72844
+ }[];
72845
+ context?: unknown;
72846
+ };
72847
+ };
72848
+ };
72849
+ /** @description Not found */
72850
+ 404: {
72851
+ headers: {
72852
+ [name: string]: unknown;
72853
+ };
72854
+ content: {
72855
+ "application/json": {
72856
+ code: string;
72857
+ message: string;
72858
+ links?: {
72859
+ docs: string;
72860
+ schema: string;
72861
+ };
72862
+ issues?: {
72863
+ message: string;
72864
+ path?: (string | number)[];
72865
+ schema?: string;
72866
+ }[];
72867
+ context?: unknown;
72868
+ };
72869
+ };
72870
+ };
72871
+ /** @description Internal server error */
72872
+ 500: {
72873
+ headers: {
72874
+ [name: string]: unknown;
72875
+ };
72876
+ content: {
72877
+ "application/json": {
72878
+ code: string;
72879
+ message: string;
72880
+ links?: {
72881
+ docs: string;
72882
+ schema: string;
72883
+ };
72884
+ issues?: {
72885
+ message: string;
72886
+ path?: (string | number)[];
72887
+ schema?: string;
72888
+ }[];
72889
+ context?: unknown;
72890
+ };
72891
+ };
72892
+ };
72893
+ };
72894
+ };
72895
+ putUsersById: {
72896
+ parameters: {
72897
+ query?: never;
72898
+ header?: never;
72899
+ path: {
72900
+ id: string;
72901
+ };
72902
+ cookie?: never;
72903
+ };
72904
+ requestBody?: {
72905
+ content: {
72906
+ "application/json": {
72907
+ email: string;
72908
+ firstName?: string | null;
72909
+ lastName?: string | null;
72910
+ name?: string | null;
72911
+ /**
72912
+ * @default active
72913
+ * @enum {string}
72914
+ */
72915
+ status?: "active" | "inactive" | "archived" | "unconfirmed";
72916
+ partnerId?: string | null;
72917
+ secondaryEmails?: string[];
72918
+ membership?: {
72919
+ /** Format: uuid */
72920
+ tenantId: string;
72921
+ /**
72922
+ * @default user
72923
+ * @enum {string}
72924
+ */
72925
+ role?: "admin" | "user" | "owner";
72926
+ };
72927
+ };
72928
+ };
72929
+ };
72930
+ responses: {
72931
+ /** @description Successful response */
72932
+ 200: {
72933
+ headers: {
72934
+ [name: string]: unknown;
72935
+ };
72936
+ content: {
72937
+ "application/json": {
72938
+ /** Format: uuid */
72939
+ id: string;
72940
+ isAdmin: boolean;
72941
+ memberships: {
72942
+ /** Format: uuid */
72943
+ tenantId: string;
72944
+ role: string | null;
72945
+ }[];
72946
+ };
72947
+ };
72948
+ };
72949
+ /** @description Bad request */
72950
+ 400: {
72951
+ headers: {
72952
+ [name: string]: unknown;
72953
+ };
72954
+ content: {
72955
+ "application/json": {
72956
+ code: string;
72957
+ message: string;
72958
+ links?: {
72959
+ docs: string;
72960
+ schema: string;
72961
+ };
72962
+ issues?: {
72963
+ message: string;
72964
+ path?: (string | number)[];
72965
+ schema?: string;
72966
+ }[];
72967
+ context?: unknown;
72968
+ };
72969
+ };
72970
+ };
72971
+ /** @description Unauthorized */
72972
+ 401: {
72973
+ headers: {
72974
+ [name: string]: unknown;
72975
+ };
72976
+ content: {
72977
+ "application/json": {
72978
+ code: string;
72979
+ message: string;
72980
+ links?: {
72981
+ docs: string;
72982
+ schema: string;
72983
+ };
72984
+ issues?: {
72985
+ message: string;
72986
+ path?: (string | number)[];
72987
+ schema?: string;
72988
+ }[];
72989
+ context?: unknown;
72990
+ };
72991
+ };
72992
+ };
72993
+ /** @description Forbidden */
72994
+ 403: {
72995
+ headers: {
72996
+ [name: string]: unknown;
72997
+ };
72998
+ content: {
72999
+ "application/json": {
73000
+ code: string;
73001
+ message: string;
73002
+ links?: {
73003
+ docs: string;
73004
+ schema: string;
73005
+ };
73006
+ issues?: {
73007
+ message: string;
73008
+ path?: (string | number)[];
73009
+ schema?: string;
73010
+ }[];
73011
+ context?: unknown;
73012
+ };
73013
+ };
73014
+ };
73015
+ /** @description Not found */
73016
+ 404: {
73017
+ headers: {
73018
+ [name: string]: unknown;
73019
+ };
73020
+ content: {
73021
+ "application/json": {
73022
+ code: string;
73023
+ message: string;
73024
+ links?: {
73025
+ docs: string;
73026
+ schema: string;
73027
+ };
73028
+ issues?: {
73029
+ message: string;
73030
+ path?: (string | number)[];
73031
+ schema?: string;
73032
+ }[];
73033
+ context?: unknown;
73034
+ };
73035
+ };
73036
+ };
73037
+ /** @description Internal server error */
73038
+ 500: {
73039
+ headers: {
73040
+ [name: string]: unknown;
73041
+ };
73042
+ content: {
73043
+ "application/json": {
73044
+ code: string;
73045
+ message: string;
73046
+ links?: {
73047
+ docs: string;
73048
+ schema: string;
73049
+ };
73050
+ issues?: {
73051
+ message: string;
73052
+ path?: (string | number)[];
73053
+ schema?: string;
73054
+ }[];
73055
+ context?: unknown;
73056
+ };
73057
+ };
73058
+ };
73059
+ };
73060
+ };
72530
73061
  }
package/src/routing.ts CHANGED
@@ -9,6 +9,13 @@ export type TenantRouting = Pick<
9
9
 
10
10
  type ApiClientOptions = Parameters<typeof useApiClient>[0];
11
11
 
12
+ /**
13
+ * Resolve a tenant's region and regional `apiBaseUrl` from a connection id,
14
+ * slug, or tenant id — the client entry point for non-API runtimes that need
15
+ * to reach a tenant's home region. Each call is a `/teams/resolve` round trip;
16
+ * hot-loop callers should cache the result (placement changes only on an
17
+ * explicit tenant migration).
18
+ */
12
19
  export async function resolveTenantRouting({
13
20
  connectionId,
14
21
  slug,