Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions codegen/crm/lists/apis/FoldersApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ export class FoldersApiRequestFactory extends BaseAPIRequestFactory {
/**
* This moves the folder from its current location to a new location. It updates the parent of this folder to the new Id given.
* Moves a folder
* @param folderId
* @param newParentFolderId
* @param folderId The ID of the folder to move
* @param newParentFolderId The ID for the target parent folder.
*/
public async move(folderId: string, newParentFolderId: string, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
Expand Down Expand Up @@ -200,7 +200,7 @@ export class FoldersApiRequestFactory extends BaseAPIRequestFactory {
/**
* Deletes the folder with the given Id.
* Deletes a folder
* @param folderId
* @param folderId The ID of the folder to delete
*/
public async remove(folderId: string, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
Expand Down Expand Up @@ -238,8 +238,8 @@ export class FoldersApiRequestFactory extends BaseAPIRequestFactory {
/**
* Renames the given folderId with a new name.
* Rename a folder
* @param folderId
* @param newFolderName
* @param folderId The ID of the folder to rename
* @param newFolderName The new name of the folder.
*/
public async rename(folderId: string, newFolderName?: string, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
Expand Down
240 changes: 239 additions & 1 deletion codegen/crm/lists/apis/ListsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,52 @@ import { ListSearchRequest } from '../models/ListSearchRequest';
import { ListSearchResponse } from '../models/ListSearchResponse';
import { ListUpdateResponse } from '../models/ListUpdateResponse';
import { ListsByIdResponse } from '../models/ListsByIdResponse';
import { PublicListConversionResponse } from '../models/PublicListConversionResponse';
import { PublicListConversionTime } from '../models/PublicListConversionTime';

/**
* no description
*/
export class ListsApiRequestFactory extends BaseAPIRequestFactory {

/**
* Delete an existing scheduled conversion for a list.
* Cancel the conversion of a list
* @param listId The ID of the list that you want to cancel the conversion for.
*/
public async cancelConversion(listId: string, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;

// verify required parameter 'listId' is not null or undefined
if (listId === null || listId === undefined) {
throw new RequiredError("ListsApi", "cancelConversion", "listId");
}


// Path Params
const localVarPath = '/crm/v3/lists/{listId}/schedule-conversion'
.replace('{' + 'listId' + '}', encodeURIComponent(String(listId)));

// Make Request Context
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")


let authMethod: SecurityAuthentication | undefined;
// Apply auth methods
authMethod = _config.authMethods["oauth2"]
if (authMethod?.applySecurityAuthentication) {
await authMethod?.applySecurityAuthentication(requestContext);
}

const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
if (defaultAuth?.applySecurityAuthentication) {
await defaultAuth?.applySecurityAuthentication(requestContext);
}

return requestContext;
}

/**
* Create a new list with the provided object list definition.
* Create List
Expand Down Expand Up @@ -73,7 +113,7 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory {
/**
* Search lists by list name or page through all lists by providing an empty `query` value.
* Search Lists
* @param listSearchRequest
* @param listSearchRequest The IDs of the records to add and/or remove from the list.
*/
public async doSearch(listSearchRequest: ListSearchRequest, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
Expand Down Expand Up @@ -263,6 +303,44 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory {
return requestContext;
}

/**
* Retrieve the conversion details for a list. This can be used to check for an upcoming conversion, or to get the details of when a list was already converted.
* Retrieve the conversion details for a list
* @param listId The ID of the list to schedule the conversion for.
*/
public async getConversionDetails(listId: string, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;

// verify required parameter 'listId' is not null or undefined
if (listId === null || listId === undefined) {
throw new RequiredError("ListsApi", "getConversionDetails", "listId");
}


// Path Params
const localVarPath = '/crm/v3/lists/{listId}/schedule-conversion'
.replace('{' + 'listId' + '}', encodeURIComponent(String(listId)));

// Make Request Context
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")


let authMethod: SecurityAuthentication | undefined;
// Apply auth methods
authMethod = _config.authMethods["oauth2"]
if (authMethod?.applySecurityAuthentication) {
await authMethod?.applySecurityAuthentication(requestContext);
}

const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
if (defaultAuth?.applySecurityAuthentication) {
await defaultAuth?.applySecurityAuthentication(requestContext);
}

return requestContext;
}

/**
* Delete a list by **ILS list ID**. Lists deleted through this endpoint can be restored up to 90-days following the delete. After 90-days, the list is purged and can no longer be restored.
* Delete a List
Expand Down Expand Up @@ -339,6 +417,62 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory {
return requestContext;
}

/**
* Schedule the conversion of an active list into a static list, or update the already scheduled conversion. This can be scheduled for a specific date or based on activity.
* Schedule or update the conversion of a list to static
* @param listId The ID of the list to schedule the conversion for.
* @param publicListConversionTime
*/
public async scheduleOrUpdateConversion(listId: string, publicListConversionTime: PublicListConversionTime, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;

// verify required parameter 'listId' is not null or undefined
if (listId === null || listId === undefined) {
throw new RequiredError("ListsApi", "scheduleOrUpdateConversion", "listId");
}


// verify required parameter 'publicListConversionTime' is not null or undefined
if (publicListConversionTime === null || publicListConversionTime === undefined) {
throw new RequiredError("ListsApi", "scheduleOrUpdateConversion", "publicListConversionTime");
}


// Path Params
const localVarPath = '/crm/v3/lists/{listId}/schedule-conversion'
.replace('{' + 'listId' + '}', encodeURIComponent(String(listId)));

// Make Request Context
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")


// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
"application/json"
]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(publicListConversionTime, "PublicListConversionTime", ""),
contentType
);
requestContext.setBody(serializedBody);

let authMethod: SecurityAuthentication | undefined;
// Apply auth methods
authMethod = _config.authMethods["oauth2"]
if (authMethod?.applySecurityAuthentication) {
await authMethod?.applySecurityAuthentication(requestContext);
}

const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
if (defaultAuth?.applySecurityAuthentication) {
await defaultAuth?.applySecurityAuthentication(requestContext);
}

return requestContext;
}

/**
* Update the filter branch definition of a `DYNAMIC` list. Once updated, the list memberships will be re-evaluated and updated to match the new definition.
* Update List Filter Definition
Expand Down Expand Up @@ -458,6 +592,38 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory {

export class ListsApiResponseProcessor {

/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to cancelConversion
* @throws ApiException if the response code was not in [200, 299]
*/
public async cancelConversionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void >> {
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (isCodeInRange("204", response.httpStatusCode)) {
return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
}
if (isCodeInRange("0", response.httpStatusCode)) {
const body: Error = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Error", ""
) as Error;
throw new ApiException<Error>(response.httpStatusCode, "An error occurred.", body, response.headers);
}

// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: void = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"void", ""
) as void;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}

throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}

/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
Expand Down Expand Up @@ -638,6 +804,42 @@ export class ListsApiResponseProcessor {
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}

/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to getConversionDetails
* @throws ApiException if the response code was not in [200, 299]
*/
public async getConversionDetailsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PublicListConversionResponse >> {
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (isCodeInRange("200", response.httpStatusCode)) {
const body: PublicListConversionResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"PublicListConversionResponse", ""
) as PublicListConversionResponse;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
if (isCodeInRange("0", response.httpStatusCode)) {
const body: Error = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Error", ""
) as Error;
throw new ApiException<Error>(response.httpStatusCode, "An error occurred.", body, response.headers);
}

// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: PublicListConversionResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"PublicListConversionResponse", ""
) as PublicListConversionResponse;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}

throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}

/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
Expand Down Expand Up @@ -702,6 +904,42 @@ export class ListsApiResponseProcessor {
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}

/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to scheduleOrUpdateConversion
* @throws ApiException if the response code was not in [200, 299]
*/
public async scheduleOrUpdateConversionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PublicListConversionResponse >> {
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (isCodeInRange("200", response.httpStatusCode)) {
const body: PublicListConversionResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"PublicListConversionResponse", ""
) as PublicListConversionResponse;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
if (isCodeInRange("0", response.httpStatusCode)) {
const body: Error = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Error", ""
) as Error;
throw new ApiException<Error>(response.httpStatusCode, "An error occurred.", body, response.headers);
}

// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: PublicListConversionResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"PublicListConversionResponse", ""
) as PublicListConversionResponse;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}

throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}

/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
Expand Down
6 changes: 3 additions & 3 deletions codegen/crm/lists/apis/MembershipsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory {
* Add the records provided to the list. Records that do not exist or that are already members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`.
* Add Records to a List
* @param listId The **ILS ID** of the &#x60;MANUAL&#x60; or &#x60;SNAPSHOT&#x60; list.
* @param requestBody
* @param requestBody The IDs of the records to add to the list.
*/
public async add(listId: string, requestBody: Array<string>, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
Expand Down Expand Up @@ -124,7 +124,7 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory {
* Add and/or remove records that have already been created in the system to and/or from a list. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`.
* Add and/or Remove Records from a List
* @param listId The **ILS ID** of the &#x60;MANUAL&#x60; or &#x60;SNAPSHOT&#x60; list.
* @param membershipChangeRequest
* @param membershipChangeRequest The IDs of the records to add and/or remove from the list.
*/
public async addAndRemove(listId: string, membershipChangeRequest: MembershipChangeRequest, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
Expand Down Expand Up @@ -344,7 +344,7 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory {
* Remove the records provided from the list. Records that do not exist or that are not members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`.
* Remove Records from a List
* @param listId The **ILS ID** of the &#x60;MANUAL&#x60; or &#x60;SNAPSHOT&#x60; list.
* @param requestBody
* @param requestBody The IDs of the records to remove from the list.
*/
public async remove(listId: string, requestBody: Array<string>, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Lists
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
* CRM Lists
* CRUD operations to manage lists and list memberships
*
* OpenAPI spec version: v3
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Lists
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
* CRM Lists
* CRUD operations to manage lists and list memberships
*
* OpenAPI spec version: v3
*
Expand Down
4 changes: 2 additions & 2 deletions codegen/crm/lists/models/ErrorDetail.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Lists
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
* CRM Lists
* CRUD operations to manage lists and list memberships
*
* OpenAPI spec version: v3
*
Expand Down
4 changes: 2 additions & 2 deletions codegen/crm/lists/models/JoinTimeAndRecordId.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Lists
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
* CRM Lists
* CRUD operations to manage lists and list memberships
*
* OpenAPI spec version: v3
*
Expand Down
Loading