diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5c56fcb1aa7c..42b12a3fb056 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -62417,6 +62417,39 @@ paths: get: description: Returns a list of org connections. operationId: ListOrgConnections + parameters: + - description: The Org ID of the sink org. + example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1 + in: query + name: sink_org_id + required: false + schema: + type: string + - description: The Org ID of the source org. + example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1 + in: query + name: source_org_id + required: false + schema: + type: string + - description: The limit of number of entries you want to return. Default is + 1000. + example: 1000 + in: query + name: limit + required: false + schema: + format: int64 + type: integer + - description: The pagination offset which you want to query from. Default is + 0. + example: 0 + in: query + name: offset + required: false + schema: + format: int64 + type: integer responses: '200': content: diff --git a/private/bdd_runner/src/support/scenarios_model_mapping.ts b/private/bdd_runner/src/support/scenarios_model_mapping.ts index 9669ea5518be..301ca12b1f72 100644 --- a/private/bdd_runner/src/support/scenarios_model_mapping.ts +++ b/private/bdd_runner/src/support/scenarios_model_mapping.ts @@ -6781,6 +6781,22 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = { operationResponseType: "{}", }, "OrgConnectionsApi.V2.ListOrgConnections": { + sinkOrgId: { + type: "string", + format: "", + }, + sourceOrgId: { + type: "string", + format: "", + }, + limit: { + type: "number", + format: "int64", + }, + offset: { + type: "number", + format: "int64", + }, operationResponseType: "OrgConnectionListResponse", }, "OrgConnectionsApi.V2.CreateOrgConnections": { diff --git a/services/org_connections/README.md b/services/org_connections/README.md index 7786d251d2bd..23f48a2d2a68 100644 --- a/services/org_connections/README.md +++ b/services/org_connections/README.md @@ -26,8 +26,9 @@ import { v2 } from "@datadog/datadog-api-client-org-connections"; const configuration = createConfiguration(); const apiInstance = new OrgConnectionsApiV2(configuration); +const params = {/* parameters */}; -apiInstance.listOrgConnections().then((data) => { +apiInstance.listOrgConnections(params).then((data) => { console.log("API called successfully. Returned data: " + JSON.stringify(data)); }).catch((error) => { console.error("Error calling API: " + error); diff --git a/services/org_connections/src/v2/OrgConnectionsApi.ts b/services/org_connections/src/v2/OrgConnectionsApi.ts index ac52cde8c785..b9aa4ae2c650 100644 --- a/services/org_connections/src/v2/OrgConnectionsApi.ts +++ b/services/org_connections/src/v2/OrgConnectionsApi.ts @@ -135,6 +135,10 @@ export class OrgConnectionsApiRequestFactory extends BaseAPIRequestFactory { } public async listOrgConnections( + sinkOrgId?: string, + sourceOrgId?: string, + limit?: number, + offset?: number, _options?: Configuration, ): Promise { const _config = _options || this.configuration; @@ -160,6 +164,36 @@ export class OrgConnectionsApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("User-Agent", this.userAgent); } + // Query Params + if (sinkOrgId !== undefined) { + requestContext.setQueryParam( + "sink_org_id", + serialize(sinkOrgId, TypingInfo, "string", ""), + "", + ); + } + if (sourceOrgId !== undefined) { + requestContext.setQueryParam( + "source_org_id", + serialize(sourceOrgId, TypingInfo, "string", ""), + "", + ); + } + if (limit !== undefined) { + requestContext.setQueryParam( + "limit", + serialize(limit, TypingInfo, "number", "int64"), + "", + ); + } + if (offset !== undefined) { + requestContext.setQueryParam( + "offset", + serialize(offset, TypingInfo, "number", "int64"), + "", + ); + } + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -482,6 +516,29 @@ export interface OrgConnectionsApiDeleteOrgConnectionsRequest { connectionId: string; } +export interface OrgConnectionsApiListOrgConnectionsRequest { + /** + * The Org ID of the sink org. + * @type string + */ + sinkOrgId?: string; + /** + * The Org ID of the source org. + * @type string + */ + sourceOrgId?: string; + /** + * The limit of number of entries you want to return. Default is 1000. + * @type number + */ + limit?: number; + /** + * The pagination offset which you want to query from. Default is 0. + * @type number + */ + offset?: number; +} + export interface OrgConnectionsApiUpdateOrgConnectionsRequest { /** * The unique identifier of the org connection. @@ -560,10 +617,16 @@ export class OrgConnectionsApi { * @param param The request object */ public listOrgConnections( + param: OrgConnectionsApiListOrgConnectionsRequest = {}, options?: Configuration, ): Promise { - const requestContextPromise = - this.requestFactory.listOrgConnections(options); + const requestContextPromise = this.requestFactory.listOrgConnections( + param.sinkOrgId, + param.sourceOrgId, + param.limit, + param.offset, + options, + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) diff --git a/services/org_connections/src/v2/index.ts b/services/org_connections/src/v2/index.ts index 96735d18ad8e..a9fb61f6b34a 100644 --- a/services/org_connections/src/v2/index.ts +++ b/services/org_connections/src/v2/index.ts @@ -1,6 +1,7 @@ export { OrgConnectionsApiCreateOrgConnectionsRequest, OrgConnectionsApiDeleteOrgConnectionsRequest, + OrgConnectionsApiListOrgConnectionsRequest, OrgConnectionsApiUpdateOrgConnectionsRequest, OrgConnectionsApi, } from "./OrgConnectionsApi";