@vrplatform/api 1.3.1-stage.4045 → 1.3.1-stage.40451106895

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 (107) hide show
  1. package/build/main/cache.js +10 -7
  2. package/build/main/cache.js.map +1 -1
  3. package/build/main/client.d.ts +6 -2
  4. package/build/main/client.js +18 -15
  5. package/build/main/client.js.map +1 -1
  6. package/build/main/control-plane-routing.d.ts +6 -0
  7. package/build/main/control-plane-routing.js +34 -0
  8. package/build/main/control-plane-routing.js.map +1 -0
  9. package/build/main/embed-lifecycle.d.ts +140 -0
  10. package/build/main/embed-lifecycle.js +126 -0
  11. package/build/main/embed-lifecycle.js.map +1 -0
  12. package/build/main/error.d.ts +31 -17
  13. package/build/main/error.js +55 -32
  14. package/build/main/error.js.map +1 -1
  15. package/build/main/generated/routing.d.ts +11 -0
  16. package/build/main/generated/routing.js +288 -0
  17. package/build/main/generated/routing.js.map +1 -0
  18. package/build/main/generated/v1.d.ts +4 -62741
  19. package/build/main/generated/v1.js.map +4 -1
  20. package/build/main/index.d.ts +8 -0
  21. package/build/main/index.js +8 -0
  22. package/build/main/index.js.map +1 -1
  23. package/build/main/is-test-team.d.ts +18 -0
  24. package/build/main/is-test-team.js +27 -0
  25. package/build/main/is-test-team.js.map +1 -0
  26. package/build/main/is-test-user.d.ts +4 -0
  27. package/build/main/is-test-user.js +31 -0
  28. package/build/main/is-test-user.js.map +1 -0
  29. package/build/main/is-vrp-member.d.ts +4 -0
  30. package/build/main/is-vrp-member.js +33 -0
  31. package/build/main/is-vrp-member.js.map +1 -0
  32. package/build/main/retarget-request.d.ts +7 -0
  33. package/build/main/retarget-request.js +21 -0
  34. package/build/main/retarget-request.js.map +1 -0
  35. package/build/main/routing.d.ts +24 -0
  36. package/build/main/routing.js +62 -0
  37. package/build/main/routing.js.map +1 -0
  38. package/build/main/types.d.ts +2 -0
  39. package/build/main/types.js.map +1 -1
  40. package/build/main/vrt-mcp.d.ts +214 -0
  41. package/build/main/vrt-mcp.js +194 -0
  42. package/build/main/vrt-mcp.js.map +1 -0
  43. package/build/module/cache.js +10 -7
  44. package/build/module/cache.js.map +1 -1
  45. package/build/module/client.d.ts +6 -2
  46. package/build/module/client.js +18 -15
  47. package/build/module/client.js.map +1 -1
  48. package/build/module/control-plane-routing.d.ts +6 -0
  49. package/build/module/control-plane-routing.js +30 -0
  50. package/build/module/control-plane-routing.js.map +1 -0
  51. package/build/module/embed-lifecycle.d.ts +140 -0
  52. package/build/module/embed-lifecycle.js +90 -0
  53. package/build/module/embed-lifecycle.js.map +1 -0
  54. package/build/module/error.d.ts +31 -17
  55. package/build/module/error.js +57 -31
  56. package/build/module/error.js.map +1 -1
  57. package/build/module/generated/routing.d.ts +11 -0
  58. package/build/module/generated/routing.js +285 -0
  59. package/build/module/generated/routing.js.map +1 -0
  60. package/build/module/generated/v1.d.ts +4 -62741
  61. package/build/module/generated/v1.js.map +4 -1
  62. package/build/module/index.d.ts +8 -0
  63. package/build/module/index.js +8 -0
  64. package/build/module/index.js.map +1 -1
  65. package/build/module/is-test-team.d.ts +18 -0
  66. package/build/module/is-test-team.js +22 -0
  67. package/build/module/is-test-team.js.map +1 -0
  68. package/build/module/is-test-user.d.ts +4 -0
  69. package/build/module/is-test-user.js +27 -0
  70. package/build/module/is-test-user.js.map +1 -0
  71. package/build/module/is-vrp-member.d.ts +4 -0
  72. package/build/module/is-vrp-member.js +29 -0
  73. package/build/module/is-vrp-member.js.map +1 -0
  74. package/build/module/retarget-request.d.ts +7 -0
  75. package/build/module/retarget-request.js +18 -0
  76. package/build/module/retarget-request.js.map +1 -0
  77. package/build/module/routing.d.ts +24 -0
  78. package/build/module/routing.js +58 -0
  79. package/build/module/routing.js.map +1 -0
  80. package/build/module/types.d.ts +2 -0
  81. package/build/module/types.js.map +1 -1
  82. package/build/module/vrt-mcp.d.ts +214 -0
  83. package/build/module/vrt-mcp.js +158 -0
  84. package/build/module/vrt-mcp.js.map +1 -0
  85. package/package.json +8 -7
  86. package/src/cache.ts +11 -8
  87. package/src/client.ts +20 -17
  88. package/src/control-plane-routing.ts +46 -0
  89. package/src/embed-lifecycle.ts +96 -0
  90. package/src/error.ts +103 -56
  91. package/src/generated/routing.ts +288 -0
  92. package/src/generated/v1.ts +4 -62742
  93. package/src/index.ts +8 -0
  94. package/src/is-test-team.ts +50 -0
  95. package/src/is-test-user.ts +39 -0
  96. package/src/is-vrp-member.ts +38 -0
  97. package/src/retarget-request.ts +17 -0
  98. package/src/routing.ts +89 -0
  99. package/src/types.ts +8 -0
  100. package/src/vrt-mcp.ts +185 -0
  101. package/build/main/generated/openapi-fetch.d.ts +0 -224
  102. package/build/main/generated/openapi-fetch.js +0 -14
  103. package/build/main/generated/openapi-fetch.js.map +0 -1
  104. package/build/module/generated/openapi-fetch.d.ts +0 -224
  105. package/build/module/generated/openapi-fetch.js +0 -2
  106. package/build/module/generated/openapi-fetch.js.map +0 -1
  107. package/src/generated/openapi-fetch.ts +0 -433
@@ -0,0 +1,90 @@
1
+ import * as z from 'zod';
2
+ const protocol = 'vrplatform.embed.lifecycle';
3
+ const version = 1;
4
+ const envelope = {
5
+ channelId: z.uuid(),
6
+ protocol: z.literal(protocol),
7
+ version: z.literal(version),
8
+ };
9
+ const channelRequestSchema = z
10
+ .object({
11
+ ...envelope,
12
+ requestId: z.uuid(),
13
+ type: z.literal('channel.request'),
14
+ })
15
+ .strict();
16
+ const channelConnectSchema = z
17
+ .object({
18
+ ...envelope,
19
+ replyTo: z.uuid(),
20
+ type: z.literal('channel.connect'),
21
+ })
22
+ .strict();
23
+ const iframeMessageSchema = z.discriminatedUnion('type', [
24
+ z
25
+ .object({
26
+ ...envelope,
27
+ type: z.literal('ready'),
28
+ })
29
+ .strict(),
30
+ z
31
+ .object({
32
+ ...envelope,
33
+ code: z.enum([
34
+ 'authentication_failed',
35
+ 'access_denied',
36
+ 'session_expired',
37
+ 'renewal_failed',
38
+ 'unsupported_version',
39
+ 'internal_error',
40
+ ]),
41
+ correlationId: z.string().min(1).max(128),
42
+ recoverable: z.boolean(),
43
+ replyTo: z.uuid().optional(),
44
+ type: z.literal('error'),
45
+ })
46
+ .strict(),
47
+ z
48
+ .object({
49
+ ...envelope,
50
+ expiresAt: z.iso.datetime({ offset: true }),
51
+ requestId: z.uuid(),
52
+ type: z.literal('session.expiring'),
53
+ })
54
+ .strict(),
55
+ z
56
+ .object({
57
+ ...envelope,
58
+ expiresAt: z.iso.datetime({ offset: true }),
59
+ replyTo: z.uuid(),
60
+ type: z.literal('session.renewed'),
61
+ })
62
+ .strict(),
63
+ z
64
+ .object({
65
+ ...envelope,
66
+ height: z.number().int().positive(),
67
+ type: z.literal('resize'),
68
+ })
69
+ .strict(),
70
+ ]);
71
+ const parentMessageSchema = z.discriminatedUnion('type', [
72
+ z
73
+ .object({
74
+ ...envelope,
75
+ embedUrl: z.url(),
76
+ replyTo: z.uuid(),
77
+ requestId: z.uuid(),
78
+ type: z.literal('session.renew'),
79
+ })
80
+ .strict(),
81
+ ]);
82
+ export const embedLifecycle = {
83
+ channelConnectSchema,
84
+ channelRequestSchema,
85
+ iframeMessageSchema,
86
+ parentMessageSchema,
87
+ protocol,
88
+ version,
89
+ };
90
+ //# sourceMappingURL=embed-lifecycle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed-lifecycle.js","sourceRoot":"src/","sources":["embed-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,QAAQ,GAAG,4BAA4B,CAAC;AAC9C,MAAM,OAAO,GAAG,CAAC,CAAC;AAClB,MAAM,QAAQ,GAAG;IACf,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC7B,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;CAC5B,CAAC;AACF,MAAM,oBAAoB,GAAG,CAAC;KAC3B,MAAM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OAAO,CAAC,kBAAkB,CAAC;KACpC,CAAC;SACD,MAAM,EAAE;IACX,CAAC;SACE,MAAM,CAAC;QACN,GAAG,QAAQ;QACX,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC3C,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE;QACjB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;KACnC,CAAC;SACD,MAAM,EAAE;IACX,CAAC;SACE,MAAM,CAAC;QACN,GAAG,QAAQ;QACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QACnC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;KAC1B,CAAC;SACD,MAAM,EAAE;CACZ,CAAC,CAAC;AACH,MAAM,mBAAmB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACvD,CAAC;SACE,MAAM,CAAC;QACN,GAAG,QAAQ;QACX,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE;QACjB,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE;QACjB,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE;QACnB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;KACjC,CAAC;SACD,MAAM,EAAE;CACZ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,oBAAoB;IACpB,oBAAoB;IACpB,mBAAmB;IACnB,mBAAmB;IACnB,QAAQ;IACR,OAAO;CACC,CAAC","sourcesContent":["import * as z from 'zod';\n\nconst protocol = 'vrplatform.embed.lifecycle';\nconst version = 1;\nconst envelope = {\n channelId: z.uuid(),\n protocol: z.literal(protocol),\n version: z.literal(version),\n};\nconst channelRequestSchema = z\n .object({\n ...envelope,\n requestId: z.uuid(),\n type: z.literal('channel.request'),\n })\n .strict();\nconst channelConnectSchema = z\n .object({\n ...envelope,\n replyTo: z.uuid(),\n type: z.literal('channel.connect'),\n })\n .strict();\nconst iframeMessageSchema = z.discriminatedUnion('type', [\n z\n .object({\n ...envelope,\n type: z.literal('ready'),\n })\n .strict(),\n z\n .object({\n ...envelope,\n code: z.enum([\n 'authentication_failed',\n 'access_denied',\n 'session_expired',\n 'renewal_failed',\n 'unsupported_version',\n 'internal_error',\n ]),\n correlationId: z.string().min(1).max(128),\n recoverable: z.boolean(),\n replyTo: z.uuid().optional(),\n type: z.literal('error'),\n })\n .strict(),\n z\n .object({\n ...envelope,\n expiresAt: z.iso.datetime({ offset: true }),\n requestId: z.uuid(),\n type: z.literal('session.expiring'),\n })\n .strict(),\n z\n .object({\n ...envelope,\n expiresAt: z.iso.datetime({ offset: true }),\n replyTo: z.uuid(),\n type: z.literal('session.renewed'),\n })\n .strict(),\n z\n .object({\n ...envelope,\n height: z.number().int().positive(),\n type: z.literal('resize'),\n })\n .strict(),\n]);\nconst parentMessageSchema = z.discriminatedUnion('type', [\n z\n .object({\n ...envelope,\n embedUrl: z.url(),\n replyTo: z.uuid(),\n requestId: z.uuid(),\n type: z.literal('session.renew'),\n })\n .strict(),\n]);\n\nexport const embedLifecycle = {\n channelConnectSchema,\n channelRequestSchema,\n iframeMessageSchema,\n parentMessageSchema,\n protocol,\n version,\n} as const;\n\nexport type EmbedLifecycleChannelConnect = z.infer<typeof channelConnectSchema>;\nexport type EmbedLifecycleChannelRequest = z.infer<typeof channelRequestSchema>;\nexport type EmbedLifecycleIframeMessage = z.infer<typeof iframeMessageSchema>;\nexport type EmbedLifecycleParentMessage = z.infer<typeof parentMessageSchema>;\n"]}
@@ -1,22 +1,36 @@
1
- import type { FetchResponse } from './generated/openapi-fetch';
2
- type E = {
1
+ import type { paths } from './generated/v1';
2
+ type PublicError = paths['/account-connections']['get']['responses'][400]['content']['application/json'];
3
+ type ErrorEnvelope = Omit<PublicError, 'code' | 'issues'> & {
3
4
  code: string;
4
- message: string;
5
- issues?: {
6
- message: string;
7
- }[];
8
- context?: any;
9
- stack?: any;
5
+ issues?: PublicError['issues'];
6
+ stack?: string;
7
+ };
8
+ type ApiResponse<T> = {
9
+ response: Response;
10
+ data?: T;
11
+ error?: unknown;
10
12
  };
11
13
  export declare class ApiClientError extends Error {
12
- error: E;
13
- code: string;
14
- issues: {
15
- message: string;
16
- }[];
17
- context: any;
18
- constructor(error: E);
14
+ error: ErrorEnvelope;
15
+ code: ErrorEnvelope['code'];
16
+ issues: PublicError['issues'];
17
+ context: PublicError['context'];
18
+ links: PublicError['links'];
19
+ retryable: PublicError['retryable'];
20
+ constructor(error: ErrorEnvelope);
21
+ }
22
+ export declare class ApiClientResponseError extends Error {
23
+ status: number;
24
+ readonly details: {
25
+ contentType: string | null;
26
+ requestId: string | null;
27
+ cfRay: string | null;
28
+ };
29
+ constructor(message: string, status: number, details?: {
30
+ contentType: string | null;
31
+ requestId: string | null;
32
+ cfRay: string | null;
33
+ });
19
34
  }
20
- export declare function throwIfError<T extends FetchResponse<any, any, any>>(response: T): NonNullable<T['data']>;
21
- export declare function throwIfError<T extends FetchResponse<any, any, any>>(response: Promise<T>): Promise<NonNullable<T['data']>>;
35
+ export declare function throwIfError<T extends ApiResponse<unknown> | Promise<ApiResponse<unknown>>>(response: T): T extends Promise<ApiResponse<unknown>> ? Promise<NonNullable<Awaited<T>['data']>> : NonNullable<Awaited<T>['data']>;
22
36
  export {};
@@ -1,48 +1,74 @@
1
- import { hasValue } from '@vrplatform/utils';
2
1
  export class ApiClientError extends Error {
3
2
  error;
4
3
  code;
5
4
  issues;
6
5
  context;
6
+ links;
7
+ retryable;
7
8
  constructor(error) {
8
- const message = error.message ||
9
- [
10
- error.code,
11
- error.issues
12
- ?.map((x) => [x.message, x.path?.join('->')]
13
- .filter(hasValue)
14
- .join(' on '))
15
- .join(', '),
16
- ]
17
- .filter(hasValue)
18
- .join(': ');
19
- super(message);
9
+ super(error.message);
20
10
  this.error = error;
21
11
  this.code = error.code;
22
- this.issues = error.issues || [];
23
- this.context = error.context || {};
12
+ this.issues = error.issues ?? [];
13
+ this.context = error.context;
14
+ this.links = error.links;
15
+ this.retryable = error.retryable;
24
16
  if (error.stack)
25
17
  this.stack = error.stack;
26
18
  }
27
19
  }
20
+ export class ApiClientResponseError extends Error {
21
+ status;
22
+ details;
23
+ constructor(message, status, details = { contentType: null, requestId: null, cfRay: null }) {
24
+ super(message);
25
+ this.status = status;
26
+ this.details = details;
27
+ this.name = 'ApiClientResponseError';
28
+ }
29
+ }
28
30
  export function throwIfError(response) {
29
- if (response instanceof Promise) {
30
- return response.then((response) => {
31
- if (response.response.status === 503) {
32
- throw new ApiClientError({
33
- code: 'SERVICE_UNAVAILABLE',
34
- message: 'Worker resources exceeded.',
35
- });
36
- }
37
- const error = response.error;
38
- if (error)
39
- throw new ApiClientError(error);
40
- return response.data;
41
- });
31
+ if (response instanceof Promise)
32
+ return response.then((value) => throwIfError(value));
33
+ if (response.response.ok && response.error === undefined) {
34
+ return response.data;
42
35
  }
43
36
  const error = response.error;
44
- if (error)
45
- throw new ApiClientError(error);
46
- return response.data;
37
+ if (typeof error !== 'object' ||
38
+ error === null ||
39
+ !('code' in error) ||
40
+ typeof error.code !== 'string' ||
41
+ !('message' in error) ||
42
+ typeof error.message !== 'string' ||
43
+ !('issues' in error) ||
44
+ !Array.isArray(error.issues) ||
45
+ !error.issues.every((issue) => typeof issue === 'object' &&
46
+ issue !== null &&
47
+ 'message' in issue &&
48
+ typeof issue.message === 'string' &&
49
+ (!('path' in issue) ||
50
+ issue.path === undefined ||
51
+ (Array.isArray(issue.path) &&
52
+ issue.path.every((part) => typeof part === 'string' || typeof part === 'number'))) &&
53
+ (!('schema' in issue) ||
54
+ issue.schema === undefined ||
55
+ typeof issue.schema === 'string')) ||
56
+ ('retryable' in error &&
57
+ error.retryable !== undefined &&
58
+ typeof error.retryable !== 'boolean') ||
59
+ ('links' in error &&
60
+ error.links !== undefined &&
61
+ (typeof error.links !== 'object' ||
62
+ error.links === null ||
63
+ !('docs' in error.links) ||
64
+ typeof error.links.docs !== 'string' ||
65
+ !('schema' in error.links) ||
66
+ typeof error.links.schema !== 'string')))
67
+ throw new ApiClientResponseError('API response did not contain a valid error envelope', response.response.status, {
68
+ contentType: response.response.headers.get('content-type'),
69
+ requestId: response.response.headers.get('x-request-id'),
70
+ cfRay: response.response.headers.get('cf-ray'),
71
+ });
72
+ throw new ApiClientError(error);
47
73
  }
48
74
  //# sourceMappingURL=error.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"src/","sources":["error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAY7C,MAAM,OAAO,cAAe,SAAQ,KAAK;IAMpB;IALnB,IAAI,CAAS;IACb,MAAM,CAEF;IACJ,OAAO,CAAM;IACb,YAAmB,KAAQ;QACzB,MAAM,OAAO,GACX,KAAK,CAAC,OAAO;YACb;gBACE,KAAK,CAAC,IAAI;gBACV,KAAK,CAAC,MAAM;oBACV,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACV,CAAC,CAAC,CAAC,OAAO,EAAG,CAAS,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;qBACrC,MAAM,CAAC,QAAQ,CAAC;qBAChB,IAAI,CAAC,MAAM,CAAC,CAChB;qBACA,IAAI,CAAC,IAAI,CAAC;aACd;iBACE,MAAM,CAAC,QAAQ,CAAC;iBAChB,IAAI,CAAC,IAAI,CAAC,CAAC;QAChB,KAAK,CAAC,OAAO,CAAC,CAAC;QAfE,UAAK,GAAL,KAAK,CAAG;QAiBzB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;QACnC,IAAI,KAAK,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC5C,CAAC;CACF;AAOD,MAAM,UAAU,YAAY,CAC1B,QAAwB;IAExB,IAAI,QAAQ,YAAY,OAAO,EAAE,CAAC;QAChC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YAChC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBACrC,MAAM,IAAI,cAAc,CAAC;oBACvB,IAAI,EAAE,qBAAqB;oBAC3B,OAAO,EAAE,4BAA4B;iBACtC,CAAC,CAAC;YACL,CAAC;YAED,MAAM,KAAK,GAAM,QAAQ,CAAC,KAAK,CAAC;YAEhC,IAAI,KAAK;gBAAE,MAAM,IAAI,cAAc,CAAC,KAAK,CAAC,CAAC;YAC3C,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,GAAM,QAAQ,CAAC,KAAK,CAAC;IAEhC,IAAI,KAAK;QAAE,MAAM,IAAI,cAAc,CAAC,KAAK,CAAC,CAAC;IAC3C,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC","sourcesContent":["import { hasValue } from '@vrplatform/utils';\nimport type { FetchResponse } from './generated/openapi-fetch';\n\ntype E = {\n code: string;\n message: string;\n issues?: {\n message: string;\n }[];\n context?: any;\n stack?: any;\n};\nexport class ApiClientError extends Error {\n code: string;\n issues: {\n message: string;\n }[];\n context: any;\n constructor(public error: E) {\n const message =\n error.message ||\n [\n error.code,\n error.issues\n ?.map((x) =>\n [x.message, (x as any).path?.join('->')]\n .filter(hasValue)\n .join(' on ')\n )\n .join(', '),\n ]\n .filter(hasValue)\n .join(': ');\n super(message);\n\n this.code = error.code;\n this.issues = error.issues || [];\n this.context = error.context || {};\n if (error.stack) this.stack = error.stack;\n }\n}\nexport function throwIfError<T extends FetchResponse<any, any, any>>(\n response: T\n): NonNullable<T['data']>;\nexport function throwIfError<T extends FetchResponse<any, any, any>>(\n response: Promise<T>\n): Promise<NonNullable<T['data']>>;\nexport function throwIfError<T extends FetchResponse<any, any, any>>(\n response: Promise<T> | T\n): Promise<NonNullable<T['data']>> | NonNullable<T['data']> {\n if (response instanceof Promise) {\n return response.then((response) => {\n if (response.response.status === 503) {\n throw new ApiClientError({\n code: 'SERVICE_UNAVAILABLE',\n message: 'Worker resources exceeded.',\n });\n }\n\n const error: E = response.error;\n\n if (error) throw new ApiClientError(error);\n return response.data;\n });\n }\n\n const error: E = response.error;\n\n if (error) throw new ApiClientError(error);\n return response.data;\n}\n"]}
1
+ {"version":3,"file":"error.js","sourceRoot":"src/","sources":["error.ts"],"names":[],"mappings":"AAkBA,MAAM,OAAO,cAAe,SAAQ,KAAK;IAOpB;IANnB,IAAI,CAAwB;IAC5B,MAAM,CAAwB;IAC9B,OAAO,CAAyB;IAChC,KAAK,CAAuB;IAC5B,SAAS,CAA2B;IAEpC,YAAmB,KAAoB;QACrC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QADJ,UAAK,GAAL,KAAK,CAAe;QAErC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,KAAK,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC5C,CAAC;CACF;AAED,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAGtC;IACS;IAHlB,YACE,OAAe,EACR,MAAc,EACL,UAIZ,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK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shared default envelope is emitted on every route. Preserve unfamiliar\n// server codes so an older client can still expose a newer API failure.\ntype PublicError =\n paths['/account-connections']['get']['responses'][400]['content']['application/json'];\ntype ErrorEnvelope = Omit<PublicError, 'code' | 'issues'> & {\n code: string;\n issues?: PublicError['issues'];\n stack?: string;\n};\n\ntype ApiResponse<T> = {\n response: Response;\n data?: T;\n error?: unknown;\n};\n\nexport class ApiClientError extends Error {\n code: ErrorEnvelope['code'];\n issues: PublicError['issues'];\n context: PublicError['context'];\n links: PublicError['links'];\n retryable: PublicError['retryable'];\n\n constructor(public error: ErrorEnvelope) {\n super(error.message);\n this.code = error.code;\n this.issues = error.issues ?? [];\n this.context = error.context;\n this.links = error.links;\n this.retryable = error.retryable;\n if (error.stack) this.stack = error.stack;\n }\n}\n\nexport class ApiClientResponseError extends Error {\n constructor(\n message: string,\n public status: number,\n public readonly details: {\n contentType: string | null;\n requestId: string | null;\n cfRay: string | null;\n } = { contentType: null, requestId: null, cfRay: null }\n ) {\n super(message);\n this.name = 'ApiClientResponseError';\n }\n}\n\nexport function throwIfError<\n T extends ApiResponse<unknown> | Promise<ApiResponse<unknown>>,\n>(\n response: T\n): T extends Promise<ApiResponse<unknown>>\n ? Promise<NonNullable<Awaited<T>['data']>>\n : NonNullable<Awaited<T>['data']>;\nexport function throwIfError(\n response: Promise<ApiResponse<unknown>> | ApiResponse<unknown>\n): unknown {\n if (response instanceof Promise)\n return response.then((value) => throwIfError(value));\n if (response.response.ok && response.error === undefined) {\n return response.data;\n }\n\n const error = response.error;\n if (\n typeof error !== 'object' ||\n error === null ||\n !('code' in error) ||\n typeof error.code !== 'string' ||\n !('message' in error) ||\n typeof error.message !== 'string' ||\n !('issues' in error) ||\n !Array.isArray(error.issues) ||\n !error.issues.every(\n (issue: unknown) =>\n typeof issue === 'object' &&\n issue !== null &&\n 'message' in issue &&\n typeof issue.message === 'string' &&\n (!('path' in issue) ||\n issue.path === undefined ||\n (Array.isArray(issue.path) &&\n issue.path.every(\n (part: unknown) =>\n typeof part === 'string' || typeof part === 'number'\n ))) &&\n (!('schema' in issue) ||\n issue.schema === undefined ||\n typeof issue.schema === 'string')\n ) ||\n ('retryable' in error &&\n error.retryable !== undefined &&\n typeof error.retryable !== 'boolean') ||\n ('links' in error &&\n error.links !== undefined &&\n (typeof error.links !== 'object' ||\n error.links === null ||\n !('docs' in error.links) ||\n typeof error.links.docs !== 'string' ||\n !('schema' in error.links) ||\n typeof error.links.schema !== 'string'))\n )\n throw new ApiClientResponseError(\n 'API response did not contain a valid error envelope',\n response.response.status,\n {\n contentType: response.response.headers.get('content-type'),\n requestId: response.response.headers.get('x-request-id'),\n cfRay: response.response.headers.get('cf-ray'),\n }\n );\n\n throw new ApiClientError(error as ErrorEnvelope);\n}\n"]}
@@ -0,0 +1,11 @@
1
+ export declare const controlPlaneRouting: {
2
+ readonly origins: Readonly<Record<string, string>>;
3
+ readonly routes: readonly {
4
+ method: string;
5
+ endpoint: string;
6
+ }[];
7
+ };
8
+ export declare const requestRegionRoutes: readonly {
9
+ method: string;
10
+ endpoint: string;
11
+ }[];
@@ -0,0 +1,285 @@
1
+ // Generated by packages/client/openapi.ts from API route and deployment metadata.
2
+ export const controlPlaneRouting = {
3
+ "origins": {
4
+ "https://api.vrplatform.app": "https://us.api.vrplatform.app",
5
+ "https://api.edge.vrplatform.app": "https://us.api.vrplatform.app",
6
+ "https://staging.api.vrplatform.app": "https://us.staging.api.vrplatform.app",
7
+ "https://staging.api.edge.vrplatform.app": "https://us.staging.api.vrplatform.app",
8
+ "https://us.staging.api.vrplatform.app": "https://us.staging.api.vrplatform.app",
9
+ "https://eu.staging.api.vrplatform.app": "https://us.staging.api.vrplatform.app",
10
+ "https://ap.staging.api.vrplatform.app": "https://us.staging.api.vrplatform.app",
11
+ "https://us.api.vrplatform.app": "https://us.api.vrplatform.app",
12
+ "https://eu.api.vrplatform.app": "https://us.api.vrplatform.app",
13
+ "https://ap.api.vrplatform.app": "https://us.api.vrplatform.app"
14
+ },
15
+ "routes": [
16
+ {
17
+ "method": "GET",
18
+ "endpoint": "/internal/message-overwrites"
19
+ },
20
+ {
21
+ "method": "GET",
22
+ "endpoint": "/internal/operations/accounting-integrity/definition-drafts/{id}"
23
+ },
24
+ {
25
+ "method": "GET",
26
+ "endpoint": "/internal/operations/accounting-integrity/definitions"
27
+ },
28
+ {
29
+ "method": "GET",
30
+ "endpoint": "/internal/operations/accounting-integrity/definitions/{code}"
31
+ },
32
+ {
33
+ "method": "GET",
34
+ "endpoint": "/internal/owner-portals/{hostname}"
35
+ },
36
+ {
37
+ "method": "GET",
38
+ "endpoint": "/internal/owner-portals/{hostname}/providers"
39
+ },
40
+ {
41
+ "method": "GET",
42
+ "endpoint": "/me/teams"
43
+ },
44
+ {
45
+ "method": "POST",
46
+ "endpoint": "/embed-sessions/exchange"
47
+ },
48
+ {
49
+ "method": "POST",
50
+ "endpoint": "/embed-sessions/frame-ancestor-policy"
51
+ },
52
+ {
53
+ "method": "POST",
54
+ "endpoint": "/internal/operations/accounting-integrity/definition-drafts"
55
+ },
56
+ {
57
+ "method": "POST",
58
+ "endpoint": "/internal/operations/accounting-integrity/definition-drafts/{id}/publish"
59
+ },
60
+ {
61
+ "method": "POST",
62
+ "endpoint": "/internal/operations/accounting-integrity/definition-drafts/{id}/validate"
63
+ },
64
+ {
65
+ "method": "POST",
66
+ "endpoint": "/internal/owner-portals/logo"
67
+ },
68
+ {
69
+ "method": "POST",
70
+ "endpoint": "/internal/owner-portals/{hostname}/providers"
71
+ },
72
+ {
73
+ "method": "POST",
74
+ "endpoint": "/owner-portal-previews/end"
75
+ },
76
+ {
77
+ "method": "POST",
78
+ "endpoint": "/owner-portal-previews/exchange"
79
+ },
80
+ {
81
+ "method": "PUT",
82
+ "endpoint": "/internal/operations/accounting-integrity/definition-drafts/{id}"
83
+ },
84
+ {
85
+ "method": "PUT",
86
+ "endpoint": "/internal/operations/grants/users/{userId}"
87
+ },
88
+ {
89
+ "method": "PUT",
90
+ "endpoint": "/internal/owner-portals/{hostname}"
91
+ },
92
+ {
93
+ "method": "PUT",
94
+ "endpoint": "/me/settings"
95
+ }
96
+ ]
97
+ };
98
+ // Routes the API places by `x-data-region` or path, not by `x-team-id`.
99
+ export const requestRegionRoutes = [
100
+ {
101
+ "method": "DELETE",
102
+ "endpoint": "/internal/teams/{teamId}"
103
+ },
104
+ {
105
+ "method": "GET",
106
+ "endpoint": "/internal/memberships/{membershipId}"
107
+ },
108
+ {
109
+ "method": "GET",
110
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/cases"
111
+ },
112
+ {
113
+ "method": "GET",
114
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/cases/{caseId}"
115
+ },
116
+ {
117
+ "method": "GET",
118
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/cases/{caseId}/evidence"
119
+ },
120
+ {
121
+ "method": "GET",
122
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/health"
123
+ },
124
+ {
125
+ "method": "GET",
126
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/repair-plans"
127
+ },
128
+ {
129
+ "method": "GET",
130
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}"
131
+ },
132
+ {
133
+ "method": "GET",
134
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/runs"
135
+ },
136
+ {
137
+ "method": "GET",
138
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/runs/{runId}"
139
+ },
140
+ {
141
+ "method": "GET",
142
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/work-queue"
143
+ },
144
+ {
145
+ "method": "GET",
146
+ "endpoint": "/internal/teams/billing"
147
+ },
148
+ {
149
+ "method": "GET",
150
+ "endpoint": "/internal/users"
151
+ },
152
+ {
153
+ "method": "GET",
154
+ "endpoint": "/operations"
155
+ },
156
+ {
157
+ "method": "GET",
158
+ "endpoint": "/operations/{id}"
159
+ },
160
+ {
161
+ "method": "GET",
162
+ "endpoint": "/partner/audit-events"
163
+ },
164
+ {
165
+ "method": "GET",
166
+ "endpoint": "/partner/billing"
167
+ },
168
+ {
169
+ "method": "GET",
170
+ "endpoint": "/partner/connections"
171
+ },
172
+ {
173
+ "method": "GET",
174
+ "endpoint": "/partner/listings"
175
+ },
176
+ {
177
+ "method": "GET",
178
+ "endpoint": "/partner/owner-statements"
179
+ },
180
+ {
181
+ "method": "GET",
182
+ "endpoint": "/partner/users"
183
+ },
184
+ {
185
+ "method": "GET",
186
+ "endpoint": "/partner/users/{id}"
187
+ },
188
+ {
189
+ "method": "GET",
190
+ "endpoint": "/partner/vri-to-vrt/recurring-fee-setup"
191
+ },
192
+ {
193
+ "method": "GET",
194
+ "endpoint": "/partner/vri-to-vrt/reservation-line-mappings"
195
+ },
196
+ {
197
+ "method": "GET",
198
+ "endpoint": "/partner/vri-to-vrt/statements/account-mappings"
199
+ },
200
+ {
201
+ "method": "GET",
202
+ "endpoint": "/partner/vri-to-vrt/statements/listing-mappings"
203
+ },
204
+ {
205
+ "method": "GET",
206
+ "endpoint": "/partner/vri-to-vrt/statements/payouts"
207
+ },
208
+ {
209
+ "method": "GET",
210
+ "endpoint": "/teams"
211
+ },
212
+ {
213
+ "method": "GET",
214
+ "endpoint": "/teams/issues"
215
+ },
216
+ {
217
+ "method": "GET",
218
+ "endpoint": "/teams/lookup"
219
+ },
220
+ {
221
+ "method": "POST",
222
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/cases/{caseId}/claim"
223
+ },
224
+ {
225
+ "method": "POST",
226
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/cases/{caseId}/release"
227
+ },
228
+ {
229
+ "method": "POST",
230
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/cases/{caseId}/review"
231
+ },
232
+ {
233
+ "method": "POST",
234
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/previews"
235
+ },
236
+ {
237
+ "method": "POST",
238
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/repair-plans"
239
+ },
240
+ {
241
+ "method": "POST",
242
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/cancel"
243
+ },
244
+ {
245
+ "method": "POST",
246
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/complete"
247
+ },
248
+ {
249
+ "method": "POST",
250
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/stages/{ordinal}/apply"
251
+ },
252
+ {
253
+ "method": "POST",
254
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/stages/{ordinal}/approve"
255
+ },
256
+ {
257
+ "method": "POST",
258
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/stages/{ordinal}/dry-run"
259
+ },
260
+ {
261
+ "method": "POST",
262
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/stages/{ordinal}/request-approval"
263
+ },
264
+ {
265
+ "method": "POST",
266
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/stages/{ordinal}/verify"
267
+ },
268
+ {
269
+ "method": "POST",
270
+ "endpoint": "/internal/operations/accounting-integrity/regions/{region}/shadow-runs"
271
+ },
272
+ {
273
+ "method": "POST",
274
+ "endpoint": "/partner/vri-to-vrt"
275
+ },
276
+ {
277
+ "method": "POST",
278
+ "endpoint": "/partner/vri-to-vrt/booking-channels"
279
+ },
280
+ {
281
+ "method": "POST",
282
+ "endpoint": "/partner/vri-to-vrt/statements"
283
+ }
284
+ ];
285
+ //# sourceMappingURL=routing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.js","sourceRoot":"src/","sources":["generated/routing.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,CAAC,MAAM,mBAAmB,GAG5B;IACF,SAAS,EAAE;QACT,4BAA4B,EAAE,+BAA+B;QAC7D,iCAAiC,EAAE,+BAA+B;QAClE,oCAAoC,EAAE,uCAAuC;QAC7E,yCAAyC,EAAE,uCAAuC;Q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MAAM;QAChB,UAAU,EAAE,2FAA2F;KACxG;IACD;QACE,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,yGAAyG;KACtH;IACD;QACE,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,2GAA2G;KACxH;IACD;QACE,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,2GAA2G;KACxH;IACD;QACE,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,oHAAoH;KACjI;IACD;QACE,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,0GAA0G;KACvH;IACD;QACE,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,wEAAwE;KACrF;IACD;QACE,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,qBAAqB;KAClC;IACD;QACE,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,sCAAsC;KACnD;IACD;QACE,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,gCAAgC;KAC7C;CACF,CAAC","sourcesContent":["// Generated by packages/client/openapi.ts from API route and deployment metadata.\nexport const controlPlaneRouting: {\n readonly origins: Readonly<Record<string, string>>;\n readonly routes: readonly { method: string; endpoint: string }[];\n} = {\n \"origins\": {\n \"https://api.vrplatform.app\": \"https://us.api.vrplatform.app\",\n \"https://api.edge.vrplatform.app\": \"https://us.api.vrplatform.app\",\n \"https://staging.api.vrplatform.app\": \"https://us.staging.api.vrplatform.app\",\n \"https://staging.api.edge.vrplatform.app\": \"https://us.staging.api.vrplatform.app\",\n \"https://us.staging.api.vrplatform.app\": \"https://us.staging.api.vrplatform.app\",\n \"https://eu.staging.api.vrplatform.app\": \"https://us.staging.api.vrplatform.app\",\n \"https://ap.staging.api.vrplatform.app\": \"https://us.staging.api.vrplatform.app\",\n \"https://us.api.vrplatform.app\": \"https://us.api.vrplatform.app\",\n \"https://eu.api.vrplatform.app\": \"https://us.api.vrplatform.app\",\n \"https://ap.api.vrplatform.app\": \"https://us.api.vrplatform.app\"\n },\n \"routes\": [\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/message-overwrites\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/operations/accounting-integrity/definition-drafts/{id}\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/operations/accounting-integrity/definitions\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/operations/accounting-integrity/definitions/{code}\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/owner-portals/{hostname}\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/owner-portals/{hostname}/providers\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/me/teams\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/embed-sessions/exchange\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/embed-sessions/frame-ancestor-policy\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/definition-drafts\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/definition-drafts/{id}/publish\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/definition-drafts/{id}/validate\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/owner-portals/logo\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/owner-portals/{hostname}/providers\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/owner-portal-previews/end\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/owner-portal-previews/exchange\"\n },\n {\n \"method\": \"PUT\",\n \"endpoint\": \"/internal/operations/accounting-integrity/definition-drafts/{id}\"\n },\n {\n \"method\": \"PUT\",\n \"endpoint\": \"/internal/operations/grants/users/{userId}\"\n },\n {\n \"method\": \"PUT\",\n \"endpoint\": \"/internal/owner-portals/{hostname}\"\n },\n {\n \"method\": \"PUT\",\n \"endpoint\": \"/me/settings\"\n }\n ]\n};\n\n// Routes the API places by `x-data-region` or path, not by `x-team-id`.\nexport const requestRegionRoutes: readonly { method: string; endpoint: string }[] = [\n {\n \"method\": \"DELETE\",\n \"endpoint\": \"/internal/teams/{teamId}\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/memberships/{membershipId}\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/cases\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/cases/{caseId}\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/cases/{caseId}/evidence\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/health\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/repair-plans\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/runs\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/runs/{runId}\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/work-queue\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/teams/billing\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/internal/users\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/operations\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/operations/{id}\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/partner/audit-events\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/partner/billing\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/partner/connections\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/partner/listings\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/partner/owner-statements\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/partner/users\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/partner/users/{id}\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/partner/vri-to-vrt/recurring-fee-setup\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/partner/vri-to-vrt/reservation-line-mappings\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/partner/vri-to-vrt/statements/account-mappings\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/partner/vri-to-vrt/statements/listing-mappings\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/partner/vri-to-vrt/statements/payouts\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/teams\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/teams/issues\"\n },\n {\n \"method\": \"GET\",\n \"endpoint\": \"/teams/lookup\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/cases/{caseId}/claim\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/cases/{caseId}/release\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/cases/{caseId}/review\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/previews\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/repair-plans\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/cancel\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/complete\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/stages/{ordinal}/apply\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/stages/{ordinal}/approve\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/stages/{ordinal}/dry-run\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/stages/{ordinal}/request-approval\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/repair-plans/{planId}/stages/{ordinal}/verify\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/internal/operations/accounting-integrity/regions/{region}/shadow-runs\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/partner/vri-to-vrt\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/partner/vri-to-vrt/booking-channels\"\n },\n {\n \"method\": \"POST\",\n \"endpoint\": \"/partner/vri-to-vrt/statements\"\n }\n];\n"]}