Skip to content

Commit 9e49906

Browse files
committed
Update dashboard API schema
1 parent 589d9fb commit 9e49906

File tree

4 files changed

+71
-37
lines changed

4 files changed

+71
-37
lines changed

packages/dashboard-client/resources.json

+1
Original file line numberDiff line numberDiff line change
@@ -1563,6 +1563,7 @@
15631563
"attributes": [],
15641564
"relationships": ["approver_organization"]
15651565
},
1566+
"queryParamsType": "OrganizationMandateRequestCreateHrefSchema",
15661567
"queryParamsRequired": false,
15671568
"responseType": "OrganizationMandateRequestCreateTargetSchema",
15681569
"name": "create",

packages/dashboard-client/src/generated/SchemaTypes.ts

+36-25
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,17 @@ export type OrganizationMandateGivenInstancesHrefSchema = {
588588
include?: string;
589589
[k: string]: unknown;
590590
};
591+
/**
592+
* This interface was referenced by `OrganizationMandateRequest`'s JSON-Schema
593+
* via the `create.hrefSchema` link.
594+
*/
595+
export type OrganizationMandateRequestCreateHrefSchema = {
596+
/**
597+
* If the account is also part of the target organization, the request can be automatically approved
598+
*/
599+
auto_approve?: string;
600+
[k: string]: unknown;
601+
};
591602
/**
592603
* This interface was referenced by `TfaDeactivateRequest`'s JSON-Schema
593604
* via the `definition` "type".
@@ -4130,31 +4141,7 @@ export type OrganizationMandateRequestCreateSchema = {
41304141
* via the `create.targetSchema` link.
41314142
*/
41324143
export type OrganizationMandateRequestCreateTargetSchema = {
4133-
data: OrganizationMandateRequest;
4134-
};
4135-
4136-
/**
4137-
* This interface was referenced by `OrganizationMandateRequest`'s JSON-Schema
4138-
* via the `pending_instances.targetSchema` link.
4139-
*/
4140-
export type OrganizationMandateRequestPendingInstancesTargetSchema = {
4141-
data: OrganizationMandateRequest[];
4142-
};
4143-
4144-
/**
4145-
* This interface was referenced by `OrganizationMandateRequest`'s JSON-Schema
4146-
* via the `requested_instances.targetSchema` link.
4147-
*/
4148-
export type OrganizationMandateRequestRequestedInstancesTargetSchema = {
4149-
data: OrganizationMandateRequest[];
4150-
};
4151-
4152-
/**
4153-
* This interface was referenced by `OrganizationMandateRequest`'s JSON-Schema
4154-
* via the `destroy.targetSchema` link.
4155-
*/
4156-
export type OrganizationMandateRequestDestroyTargetSchema = {
4157-
data: OrganizationMandateRequest;
4144+
data: OrganizationMandateRequest | OrganizationMandate;
41584145
};
41594146

41604147
/**
@@ -4282,6 +4269,30 @@ export type OrganizationMandateDestroyTargetSchema = {
42824269
data: OrganizationMandate;
42834270
};
42844271

4272+
/**
4273+
* This interface was referenced by `OrganizationMandateRequest`'s JSON-Schema
4274+
* via the `pending_instances.targetSchema` link.
4275+
*/
4276+
export type OrganizationMandateRequestPendingInstancesTargetSchema = {
4277+
data: OrganizationMandateRequest[];
4278+
};
4279+
4280+
/**
4281+
* This interface was referenced by `OrganizationMandateRequest`'s JSON-Schema
4282+
* via the `requested_instances.targetSchema` link.
4283+
*/
4284+
export type OrganizationMandateRequestRequestedInstancesTargetSchema = {
4285+
data: OrganizationMandateRequest[];
4286+
};
4287+
4288+
/**
4289+
* This interface was referenced by `OrganizationMandateRequest`'s JSON-Schema
4290+
* via the `destroy.targetSchema` link.
4291+
*/
4292+
export type OrganizationMandateRequestDestroyTargetSchema = {
4293+
data: OrganizationMandateRequest;
4294+
};
4295+
42854296
/**
42864297
* Accounts that belong to a single organization can ask owners to deactivate their two-factor authentication
42874298
*

packages/dashboard-client/src/generated/SimpleSchemaTypes.ts

+27-11
Original file line numberDiff line numberDiff line change
@@ -719,16 +719,11 @@ export type OrganizationMandateRequestIdentity = string;
719719
export type OrganizationMandateRequestType = 'organization_mandate_request';
720720
/**
721721
* This interface was referenced by `OrganizationMandateRequest`'s JSON-Schema
722-
* via the `pending_instances.targetSchema` link.
723-
*/
724-
export type OrganizationMandateRequestPendingInstancesTargetSchema =
725-
OrganizationMandateRequest[];
726-
/**
727-
* This interface was referenced by `OrganizationMandateRequest`'s JSON-Schema
728-
* via the `requested_instances.targetSchema` link.
722+
* via the `create.targetSchema` link.
729723
*/
730-
export type OrganizationMandateRequestRequestedInstancesTargetSchema =
731-
OrganizationMandateRequest[];
724+
export type OrganizationMandateRequestCreateTargetSchema =
725+
| OrganizationMandateRequest
726+
| OrganizationMandate;
732727
/**
733728
* ID of mandate
734729
*
@@ -767,6 +762,29 @@ export type OrganizationMandateGivenInstancesHrefSchema = {
767762
include?: string;
768763
[k: string]: unknown;
769764
};
765+
/**
766+
* This interface was referenced by `OrganizationMandateRequest`'s JSON-Schema
767+
* via the `create.hrefSchema` link.
768+
*/
769+
export type OrganizationMandateRequestCreateHrefSchema = {
770+
/**
771+
* If the account is also part of the target organization, the request can be automatically approved
772+
*/
773+
auto_approve?: string;
774+
[k: string]: unknown;
775+
};
776+
/**
777+
* This interface was referenced by `OrganizationMandateRequest`'s JSON-Schema
778+
* via the `pending_instances.targetSchema` link.
779+
*/
780+
export type OrganizationMandateRequestPendingInstancesTargetSchema =
781+
OrganizationMandateRequest[];
782+
/**
783+
* This interface was referenced by `OrganizationMandateRequest`'s JSON-Schema
784+
* via the `requested_instances.targetSchema` link.
785+
*/
786+
export type OrganizationMandateRequestRequestedInstancesTargetSchema =
787+
OrganizationMandateRequest[];
770788
/**
771789
* ID of 2FA deactivate request
772790
*
@@ -3933,8 +3951,6 @@ export type OrganizationMandateRequest = {
39333951
requester_organization: OrganizationData;
39343952
meta: OrganizationMandateRequestMeta;
39353953
};
3936-
export type OrganizationMandateRequestCreateTargetSchema =
3937-
OrganizationMandateRequest;
39383954
export type OrganizationMandateRequestDestroyTargetSchema =
39393955
OrganizationMandateRequest;
39403956
/**

packages/dashboard-client/src/generated/resources/OrganizationMandateRequest.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ export default class OrganizationMandateRequest extends BaseResource {
1212
* @throws {ApiError}
1313
* @throws {TimeoutError}
1414
*/
15-
create(body: SimpleSchemaTypes.OrganizationMandateRequestCreateSchema) {
15+
create(
16+
body: SimpleSchemaTypes.OrganizationMandateRequestCreateSchema,
17+
queryParams?: SimpleSchemaTypes.OrganizationMandateRequestCreateHrefSchema,
18+
) {
1619
return this.rawCreate(
1720
Utils.serializeRequestBody<SchemaTypes.OrganizationMandateRequestCreateSchema>(
1821
body,
@@ -22,6 +25,7 @@ export default class OrganizationMandateRequest extends BaseResource {
2225
relationships: ['approver_organization'],
2326
},
2427
),
28+
queryParams,
2529
).then((body) =>
2630
Utils.deserializeResponseBody<SimpleSchemaTypes.OrganizationMandateRequestCreateTargetSchema>(
2731
body,
@@ -37,12 +41,14 @@ export default class OrganizationMandateRequest extends BaseResource {
3741
*/
3842
rawCreate(
3943
body: SchemaTypes.OrganizationMandateRequestCreateSchema,
44+
queryParams?: SchemaTypes.OrganizationMandateRequestCreateHrefSchema,
4045
): Promise<SchemaTypes.OrganizationMandateRequestCreateTargetSchema> {
4146
return this.client.request<SchemaTypes.OrganizationMandateRequestCreateTargetSchema>(
4247
{
4348
method: 'POST',
4449
url: '/organization-mandate-requests',
4550
body,
51+
queryParams,
4652
},
4753
);
4854
}

0 commit comments

Comments
 (0)