agentphone 1.0.11 → 1.0.12

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 (92) hide show
  1. package/README.md +10 -10
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +3 -6
  4. package/dist/cjs/Client.js +25 -30
  5. package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.d.ts +69 -0
  6. package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.js +66 -0
  7. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +69 -0
  8. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.js +66 -0
  9. package/dist/cjs/api/resources/index.d.ts +2 -4
  10. package/dist/cjs/api/resources/index.js +3 -5
  11. package/dist/cjs/api/resources/registration/client/Client.d.ts +61 -0
  12. package/dist/cjs/api/resources/{agentSignup → registration}/client/Client.js +44 -69
  13. package/dist/cjs/api/resources/registration/client/requests/RegistrationRequest.d.ts +61 -0
  14. package/dist/cjs/api/resources/registration/client/requests/index.d.ts +1 -0
  15. package/dist/cjs/api/types/AgentResponse.d.ts +2 -0
  16. package/dist/cjs/api/{resources/agentSignup/client/requests → types}/AgentSignUpRequest.d.ts +0 -6
  17. package/dist/cjs/api/types/AgentVerifyRequest.d.ts +4 -0
  18. package/dist/cjs/api/types/FieldWarning.d.ts +6 -0
  19. package/dist/cjs/api/types/FieldWarning.js +3 -0
  20. package/dist/cjs/api/types/RegistrationResponse.d.ts +8 -0
  21. package/dist/cjs/api/types/RegistrationResponse.js +3 -0
  22. package/dist/cjs/api/types/index.d.ts +4 -0
  23. package/dist/cjs/api/types/index.js +4 -0
  24. package/dist/cjs/version.d.ts +1 -1
  25. package/dist/cjs/version.js +1 -1
  26. package/dist/esm/BaseClient.mjs +2 -2
  27. package/dist/esm/Client.d.mts +3 -6
  28. package/dist/esm/Client.mjs +5 -10
  29. package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.d.mts +69 -0
  30. package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.mjs +66 -0
  31. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +69 -0
  32. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.mjs +66 -0
  33. package/dist/esm/api/resources/index.d.mts +2 -4
  34. package/dist/esm/api/resources/index.mjs +2 -4
  35. package/dist/esm/api/resources/registration/client/Client.d.mts +61 -0
  36. package/dist/esm/api/resources/registration/client/Client.mjs +108 -0
  37. package/dist/esm/api/resources/registration/client/requests/RegistrationRequest.d.mts +61 -0
  38. package/dist/esm/api/resources/registration/client/requests/index.d.mts +1 -0
  39. package/dist/esm/api/types/AgentResponse.d.mts +2 -0
  40. package/dist/esm/api/{resources/agentSignup/client/requests → types}/AgentSignUpRequest.d.mts +0 -6
  41. package/dist/esm/api/types/AgentVerifyRequest.d.mts +4 -0
  42. package/dist/esm/api/types/FieldWarning.d.mts +6 -0
  43. package/dist/esm/api/types/FieldWarning.mjs +2 -0
  44. package/dist/esm/api/types/RegistrationResponse.d.mts +8 -0
  45. package/dist/esm/api/types/RegistrationResponse.mjs +2 -0
  46. package/dist/esm/api/types/index.d.mts +4 -0
  47. package/dist/esm/api/types/index.mjs +4 -0
  48. package/dist/esm/version.d.mts +1 -1
  49. package/dist/esm/version.mjs +1 -1
  50. package/package.json +1 -1
  51. package/reference.md +83 -380
  52. package/dist/cjs/api/resources/agentSignup/client/Client.d.ts +0 -50
  53. package/dist/cjs/api/resources/agentSignup/client/requests/AgentVerifyRequest.d.ts +0 -11
  54. package/dist/cjs/api/resources/agentSignup/client/requests/index.d.ts +0 -2
  55. package/dist/cjs/api/resources/integrations/client/Client.d.ts +0 -64
  56. package/dist/cjs/api/resources/integrations/client/Client.js +0 -268
  57. package/dist/cjs/api/resources/integrations/client/index.d.ts +0 -1
  58. package/dist/cjs/api/resources/integrations/client/index.js +0 -17
  59. package/dist/cjs/api/resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.d.ts +0 -9
  60. package/dist/cjs/api/resources/integrations/client/requests/index.d.ts +0 -1
  61. package/dist/cjs/api/resources/integrations/client/requests/index.js +0 -2
  62. package/dist/cjs/api/resources/integrations/index.d.ts +0 -1
  63. package/dist/cjs/api/resources/integrations/index.js +0 -17
  64. package/dist/esm/api/resources/agentSignup/client/Client.d.mts +0 -50
  65. package/dist/esm/api/resources/agentSignup/client/Client.mjs +0 -133
  66. package/dist/esm/api/resources/agentSignup/client/requests/AgentVerifyRequest.d.mts +0 -11
  67. package/dist/esm/api/resources/agentSignup/client/requests/index.d.mts +0 -2
  68. package/dist/esm/api/resources/integrations/client/Client.d.mts +0 -64
  69. package/dist/esm/api/resources/integrations/client/Client.mjs +0 -231
  70. package/dist/esm/api/resources/integrations/client/index.d.mts +0 -1
  71. package/dist/esm/api/resources/integrations/client/index.mjs +0 -1
  72. package/dist/esm/api/resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.d.mts +0 -9
  73. package/dist/esm/api/resources/integrations/client/requests/index.d.mts +0 -1
  74. package/dist/esm/api/resources/integrations/client/requests/index.mjs +0 -1
  75. package/dist/esm/api/resources/integrations/index.d.mts +0 -1
  76. package/dist/esm/api/resources/integrations/index.mjs +0 -1
  77. /package/dist/cjs/api/resources/{agentSignup → registration}/client/index.d.ts +0 -0
  78. /package/dist/cjs/api/resources/{agentSignup → registration}/client/index.js +0 -0
  79. /package/dist/cjs/api/resources/{agentSignup/client/requests/AgentSignUpRequest.js → registration/client/requests/RegistrationRequest.js} +0 -0
  80. /package/dist/cjs/api/resources/{agentSignup → registration}/client/requests/index.js +0 -0
  81. /package/dist/cjs/api/resources/{agentSignup → registration}/index.d.ts +0 -0
  82. /package/dist/cjs/api/resources/{agentSignup → registration}/index.js +0 -0
  83. /package/dist/cjs/api/{resources/agentSignup/client/requests/AgentVerifyRequest.js → types/AgentSignUpRequest.js} +0 -0
  84. /package/dist/cjs/api/{resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.js → types/AgentVerifyRequest.js} +0 -0
  85. /package/dist/esm/api/resources/{agentSignup → registration}/client/index.d.mts +0 -0
  86. /package/dist/esm/api/resources/{agentSignup → registration}/client/index.mjs +0 -0
  87. /package/dist/esm/api/resources/{agentSignup/client/requests/AgentSignUpRequest.mjs → registration/client/requests/RegistrationRequest.mjs} +0 -0
  88. /package/dist/esm/api/resources/{agentSignup → registration}/client/requests/index.mjs +0 -0
  89. /package/dist/esm/api/resources/{agentSignup → registration}/index.d.mts +0 -0
  90. /package/dist/esm/api/resources/{agentSignup → registration}/index.mjs +0 -0
  91. /package/dist/esm/api/{resources/agentSignup/client/requests/AgentVerifyRequest.mjs → types/AgentSignUpRequest.mjs} +0 -0
  92. /package/dist/esm/api/{resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.mjs → types/AgentVerifyRequest.mjs} +0 -0
@@ -1,11 +0,0 @@
1
- /**
2
- * @example
3
- * {
4
- * verification_id: "verification_id",
5
- * otp_code: "otp_code"
6
- * }
7
- */
8
- export interface AgentVerifyRequest {
9
- verification_id: string;
10
- otp_code: string;
11
- }
@@ -1,2 +0,0 @@
1
- export type { AgentSignUpRequest } from "./AgentSignUpRequest.mjs";
2
- export type { AgentVerifyRequest } from "./AgentVerifyRequest.mjs";
@@ -1,64 +0,0 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
- import * as core from "../../../../core/index.mjs";
4
- import * as AgentPhone from "../../../index.mjs";
5
- export declare namespace IntegrationsClient {
6
- type Options = BaseClientOptions;
7
- interface RequestOptions extends BaseRequestOptions {
8
- }
9
- }
10
- export declare class IntegrationsClient {
11
- protected readonly _options: NormalizedClientOptionsWithAuth<IntegrationsClient.Options>;
12
- constructor(options?: IntegrationsClient.Options);
13
- /**
14
- * Exchange a one-time connect code and redirect to Supabase OAuth.
15
- *
16
- * @param {AgentPhone.SupabaseConnectIntegrationsSupabaseConnectGetRequest} request
17
- * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
18
- *
19
- * @throws {@link AgentPhone.UnprocessableEntityError}
20
- *
21
- * @example
22
- * await client.integrations.supabaseConnect({
23
- * code: "code"
24
- * })
25
- */
26
- supabaseConnect(request: AgentPhone.SupabaseConnectIntegrationsSupabaseConnectGetRequest, requestOptions?: IntegrationsClient.RequestOptions): core.HttpResponsePromise<unknown>;
27
- private __supabaseConnect;
28
- /**
29
- * Create a short-lived one-time code for initiating the Supabase OAuth flow.
30
- *
31
- * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
32
- *
33
- * @example
34
- * await client.integrations.supabaseConnectCode()
35
- */
36
- supabaseConnectCode(requestOptions?: IntegrationsClient.RequestOptions): core.HttpResponsePromise<unknown>;
37
- private __supabaseConnectCode;
38
- /**
39
- * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
40
- *
41
- * @example
42
- * await client.integrations.supabaseStatus()
43
- */
44
- supabaseStatus(requestOptions?: IntegrationsClient.RequestOptions): core.HttpResponsePromise<unknown>;
45
- private __supabaseStatus;
46
- /**
47
- * Get a valid Supabase access token, auto-refreshing if expired.
48
- *
49
- * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
50
- *
51
- * @example
52
- * await client.integrations.supabaseToken()
53
- */
54
- supabaseToken(requestOptions?: IntegrationsClient.RequestOptions): core.HttpResponsePromise<unknown>;
55
- private __supabaseToken;
56
- /**
57
- * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
58
- *
59
- * @example
60
- * await client.integrations.supabaseDisconnect()
61
- */
62
- supabaseDisconnect(requestOptions?: IntegrationsClient.RequestOptions): core.HttpResponsePromise<unknown>;
63
- private __supabaseDisconnect;
64
- }
@@ -1,231 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
- import { mergeHeaders } from "../../../../core/headers.mjs";
13
- import * as core from "../../../../core/index.mjs";
14
- import * as environments from "../../../../environments.mjs";
15
- import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
- import * as errors from "../../../../errors/index.mjs";
17
- import * as AgentPhone from "../../../index.mjs";
18
- export class IntegrationsClient {
19
- constructor(options = {}) {
20
- this._options = normalizeClientOptionsWithAuth(options);
21
- }
22
- /**
23
- * Exchange a one-time connect code and redirect to Supabase OAuth.
24
- *
25
- * @param {AgentPhone.SupabaseConnectIntegrationsSupabaseConnectGetRequest} request
26
- * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
27
- *
28
- * @throws {@link AgentPhone.UnprocessableEntityError}
29
- *
30
- * @example
31
- * await client.integrations.supabaseConnect({
32
- * code: "code"
33
- * })
34
- */
35
- supabaseConnect(request, requestOptions) {
36
- return core.HttpResponsePromise.fromPromise(this.__supabaseConnect(request, requestOptions));
37
- }
38
- __supabaseConnect(request, requestOptions) {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41
- const { code } = request;
42
- const _queryParams = {
43
- code,
44
- };
45
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
46
- const _response = yield core.fetcher({
47
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "integrations/supabase/connect"),
48
- method: "GET",
49
- headers: _headers,
50
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
51
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
52
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
53
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
54
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
55
- logging: this._options.logging,
56
- });
57
- if (_response.ok) {
58
- return { data: _response.body, rawResponse: _response.rawResponse };
59
- }
60
- if (_response.error.reason === "status-code") {
61
- switch (_response.error.statusCode) {
62
- case 422:
63
- throw new AgentPhone.UnprocessableEntityError(_response.error.body, _response.rawResponse);
64
- default:
65
- throw new errors.AgentPhoneError({
66
- statusCode: _response.error.statusCode,
67
- body: _response.error.body,
68
- rawResponse: _response.rawResponse,
69
- });
70
- }
71
- }
72
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/integrations/supabase/connect");
73
- });
74
- }
75
- /**
76
- * Create a short-lived one-time code for initiating the Supabase OAuth flow.
77
- *
78
- * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
79
- *
80
- * @example
81
- * await client.integrations.supabaseConnectCode()
82
- */
83
- supabaseConnectCode(requestOptions) {
84
- return core.HttpResponsePromise.fromPromise(this.__supabaseConnectCode(requestOptions));
85
- }
86
- __supabaseConnectCode(requestOptions) {
87
- return __awaiter(this, void 0, void 0, function* () {
88
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
89
- const _authRequest = yield this._options.authProvider.getAuthRequest();
90
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
91
- const _response = yield core.fetcher({
92
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "integrations/supabase/connect"),
93
- method: "POST",
94
- headers: _headers,
95
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
96
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
97
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
98
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
99
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
100
- logging: this._options.logging,
101
- });
102
- if (_response.ok) {
103
- return { data: _response.body, rawResponse: _response.rawResponse };
104
- }
105
- if (_response.error.reason === "status-code") {
106
- throw new errors.AgentPhoneError({
107
- statusCode: _response.error.statusCode,
108
- body: _response.error.body,
109
- rawResponse: _response.rawResponse,
110
- });
111
- }
112
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/integrations/supabase/connect");
113
- });
114
- }
115
- /**
116
- * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
117
- *
118
- * @example
119
- * await client.integrations.supabaseStatus()
120
- */
121
- supabaseStatus(requestOptions) {
122
- return core.HttpResponsePromise.fromPromise(this.__supabaseStatus(requestOptions));
123
- }
124
- __supabaseStatus(requestOptions) {
125
- return __awaiter(this, void 0, void 0, function* () {
126
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
127
- const _authRequest = yield this._options.authProvider.getAuthRequest();
128
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
129
- const _response = yield core.fetcher({
130
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "integrations/supabase/status"),
131
- method: "GET",
132
- headers: _headers,
133
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
134
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
135
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
136
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
137
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
138
- logging: this._options.logging,
139
- });
140
- if (_response.ok) {
141
- return { data: _response.body, rawResponse: _response.rawResponse };
142
- }
143
- if (_response.error.reason === "status-code") {
144
- throw new errors.AgentPhoneError({
145
- statusCode: _response.error.statusCode,
146
- body: _response.error.body,
147
- rawResponse: _response.rawResponse,
148
- });
149
- }
150
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/integrations/supabase/status");
151
- });
152
- }
153
- /**
154
- * Get a valid Supabase access token, auto-refreshing if expired.
155
- *
156
- * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
157
- *
158
- * @example
159
- * await client.integrations.supabaseToken()
160
- */
161
- supabaseToken(requestOptions) {
162
- return core.HttpResponsePromise.fromPromise(this.__supabaseToken(requestOptions));
163
- }
164
- __supabaseToken(requestOptions) {
165
- return __awaiter(this, void 0, void 0, function* () {
166
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
167
- const _authRequest = yield this._options.authProvider.getAuthRequest();
168
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
169
- const _response = yield core.fetcher({
170
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "integrations/supabase/token"),
171
- method: "GET",
172
- headers: _headers,
173
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
174
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
175
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
176
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
177
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
178
- logging: this._options.logging,
179
- });
180
- if (_response.ok) {
181
- return { data: _response.body, rawResponse: _response.rawResponse };
182
- }
183
- if (_response.error.reason === "status-code") {
184
- throw new errors.AgentPhoneError({
185
- statusCode: _response.error.statusCode,
186
- body: _response.error.body,
187
- rawResponse: _response.rawResponse,
188
- });
189
- }
190
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/integrations/supabase/token");
191
- });
192
- }
193
- /**
194
- * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
195
- *
196
- * @example
197
- * await client.integrations.supabaseDisconnect()
198
- */
199
- supabaseDisconnect(requestOptions) {
200
- return core.HttpResponsePromise.fromPromise(this.__supabaseDisconnect(requestOptions));
201
- }
202
- __supabaseDisconnect(requestOptions) {
203
- return __awaiter(this, void 0, void 0, function* () {
204
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
205
- const _authRequest = yield this._options.authProvider.getAuthRequest();
206
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
207
- const _response = yield core.fetcher({
208
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "integrations/supabase"),
209
- method: "DELETE",
210
- headers: _headers,
211
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
212
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
213
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
214
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
215
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
216
- logging: this._options.logging,
217
- });
218
- if (_response.ok) {
219
- return { data: _response.body, rawResponse: _response.rawResponse };
220
- }
221
- if (_response.error.reason === "status-code") {
222
- throw new errors.AgentPhoneError({
223
- statusCode: _response.error.statusCode,
224
- body: _response.error.body,
225
- rawResponse: _response.rawResponse,
226
- });
227
- }
228
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/integrations/supabase");
229
- });
230
- }
231
- }
@@ -1 +0,0 @@
1
- export * from "./requests/index.mjs";
@@ -1 +0,0 @@
1
- export * from "./requests/index.mjs";
@@ -1,9 +0,0 @@
1
- /**
2
- * @example
3
- * {
4
- * code: "code"
5
- * }
6
- */
7
- export interface SupabaseConnectIntegrationsSupabaseConnectGetRequest {
8
- code: string;
9
- }
@@ -1 +0,0 @@
1
- export type { SupabaseConnectIntegrationsSupabaseConnectGetRequest } from "./SupabaseConnectIntegrationsSupabaseConnectGetRequest.mjs";
@@ -1 +0,0 @@
1
- export * from "./client/index.mjs";
@@ -1 +0,0 @@
1
- export * from "./client/index.mjs";