Skip to content

Commit 0afc646

Browse files
authored
Add Support For Extensibility as Custom Provider in BrandingManager (#1079)
2 parents 295a382 + bc20329 commit 0afc646

File tree

4 files changed

+740
-3
lines changed

4 files changed

+740
-3
lines changed

src/management/__generated/managers/branding-manager.ts

+156
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
import * as runtime from '../../../lib/runtime.js';
22
import type { InitOverride, ApiResponse } from '../../../lib/runtime.js';
33
import type {
4+
CreatePhoneProviderRequest,
45
GetBranding200Response,
6+
GetBrandingPhoneProviders200Response,
7+
GetBrandingPhoneProviders200ResponseProvidersInner,
58
GetUniversalLogin200Response,
69
PatchBrandingRequest,
710
PostBrandingTheme200Response,
811
PostBrandingThemeRequest,
912
PutUniversalLoginRequest,
13+
UpdatePhoneProviderRequest,
1014
DeleteBrandingThemeRequest,
15+
DeletePhoneProviderRequest,
16+
GetBrandingPhoneProvidersRequest,
1117
GetBrandingThemeRequest,
18+
GetPhoneProviderRequest,
1219
PatchBrandingThemeRequest,
20+
UpdatePhoneProviderOperationRequest,
1321
} from '../models/index.js';
1422

1523
const { BaseAPI } = runtime;
@@ -18,6 +26,35 @@ const { BaseAPI } = runtime;
1826
*
1927
*/
2028
export class BrandingManager extends BaseAPI {
29+
/**
30+
* Create an <a href="https://auth0.com/docs/phone/providers">phone provider</a>.
31+
* The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property).
32+
*
33+
* Configure the phone provider
34+
*
35+
* @throws {RequiredError}
36+
*/
37+
async configurePhoneProvider(
38+
bodyParameters: CreatePhoneProviderRequest,
39+
initOverrides?: InitOverride
40+
): Promise<ApiResponse<GetBrandingPhoneProviders200ResponseProvidersInner>> {
41+
const headerParameters: runtime.HTTPHeaders = {};
42+
43+
headerParameters['Content-Type'] = 'application/json';
44+
45+
const response = await this.request(
46+
{
47+
path: `/branding/phone/providers`,
48+
method: 'POST',
49+
headers: headerParameters,
50+
body: bodyParameters,
51+
},
52+
initOverrides
53+
);
54+
55+
return runtime.JSONApiResponse.fromResponse(response);
56+
}
57+
2158
/**
2259
* Delete branding theme.
2360
* Delete branding theme
@@ -44,6 +81,33 @@ export class BrandingManager extends BaseAPI {
4481
return runtime.VoidApiResponse.fromResponse(response);
4582
}
4683

84+
/**
85+
* Delete the configured phone provider.
86+
*
87+
* Deletes a Phone Provider
88+
*
89+
* @throws {RequiredError}
90+
*/
91+
async deletePhoneProvider(
92+
requestParameters: DeletePhoneProviderRequest,
93+
initOverrides?: InitOverride
94+
): Promise<ApiResponse<void>> {
95+
runtime.validateRequiredRequestParams(requestParameters, ['id']);
96+
97+
const response = await this.request(
98+
{
99+
path: `/branding/phone/providers/{id}`.replace(
100+
'{id}',
101+
encodeURIComponent(String(requestParameters.id))
102+
),
103+
method: 'DELETE',
104+
},
105+
initOverrides
106+
);
107+
108+
return runtime.VoidApiResponse.fromResponse(response);
109+
}
110+
47111
/**
48112
* Delete template for New Universal Login Experience
49113
*
@@ -79,6 +143,36 @@ export class BrandingManager extends BaseAPI {
79143
return runtime.JSONApiResponse.fromResponse(response);
80144
}
81145

146+
/**
147+
* Retrieve a list of<a href="https://auth0.com/docs/phone/providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified.
148+
*
149+
* Get the phone providers set for a Tenant
150+
*
151+
* @throws {RequiredError}
152+
*/
153+
async getAllPhoneProviders(
154+
requestParameters: GetBrandingPhoneProvidersRequest = {},
155+
initOverrides?: InitOverride
156+
): Promise<ApiResponse<GetBrandingPhoneProviders200Response>> {
157+
const queryParameters = runtime.applyQueryParams(requestParameters, [
158+
{
159+
key: 'disabled',
160+
config: {},
161+
},
162+
]);
163+
164+
const response = await this.request(
165+
{
166+
path: `/branding/phone/providers`,
167+
method: 'GET',
168+
query: queryParameters,
169+
},
170+
initOverrides
171+
);
172+
173+
return runtime.JSONApiResponse.fromResponse(response);
174+
}
175+
82176
/**
83177
* Retrieve branding theme.
84178
* Get branding theme
@@ -125,6 +219,33 @@ export class BrandingManager extends BaseAPI {
125219
return runtime.JSONApiResponse.fromResponse(response);
126220
}
127221

222+
/**
223+
* Retrieve <a href="https://auth0.com/docs/phone/providers">phone provider</a> details. A list of fields to include or exclude may also be specified.
224+
*
225+
* Get the phone provider
226+
*
227+
* @throws {RequiredError}
228+
*/
229+
async getPhoneProvider(
230+
requestParameters: GetPhoneProviderRequest,
231+
initOverrides?: InitOverride
232+
): Promise<ApiResponse<GetBrandingPhoneProviders200ResponseProvidersInner>> {
233+
runtime.validateRequiredRequestParams(requestParameters, ['id']);
234+
235+
const response = await this.request(
236+
{
237+
path: `/branding/phone/providers/{id}`.replace(
238+
'{id}',
239+
encodeURIComponent(String(requestParameters.id))
240+
),
241+
method: 'GET',
242+
},
243+
initOverrides
244+
);
245+
246+
return runtime.JSONApiResponse.fromResponse(response);
247+
}
248+
128249
/**
129250
* Get template for New Universal Login Experience
130251
*
@@ -282,4 +403,39 @@ export class BrandingManager extends BaseAPI {
282403

283404
return runtime.VoidApiResponse.fromResponse(response);
284405
}
406+
407+
/**
408+
* Update an <a href="https://auth0.com/docs/phone/providers">phone provider</a>.
409+
* The <code>credentials</code> object requires different properties depending on the email provider (which is specified using the <code>name</code> property).
410+
*
411+
* Update the phone provider
412+
*
413+
* @throws {RequiredError}
414+
*/
415+
async updatePhoneProvider(
416+
requestParameters: UpdatePhoneProviderOperationRequest,
417+
bodyParameters: UpdatePhoneProviderRequest,
418+
initOverrides?: InitOverride
419+
): Promise<ApiResponse<GetBrandingPhoneProviders200ResponseProvidersInner>> {
420+
runtime.validateRequiredRequestParams(requestParameters, ['id']);
421+
422+
const headerParameters: runtime.HTTPHeaders = {};
423+
424+
headerParameters['Content-Type'] = 'application/json';
425+
426+
const response = await this.request(
427+
{
428+
path: `/branding/phone/providers/{id}`.replace(
429+
'{id}',
430+
encodeURIComponent(String(requestParameters.id))
431+
),
432+
method: 'PATCH',
433+
headers: headerParameters,
434+
body: bodyParameters,
435+
},
436+
initOverrides
437+
);
438+
439+
return runtime.JSONApiResponse.fromResponse(response);
440+
}
285441
}

src/management/__generated/managers/clients-manager.ts

+4
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ export class ClientsManager extends BaseAPI {
170170
key: 'app_type',
171171
config: {},
172172
},
173+
{
174+
key: 'client_ids',
175+
config: {},
176+
},
173177
{
174178
key: 'q',
175179
config: {},

0 commit comments

Comments
 (0)