Skip to content

Commit

Permalink
feat(client-connectcases): This release adds the ability to assign a …
Browse files Browse the repository at this point in the history
…case to a queue or user.
  • Loading branch information
awstools committed Jul 20, 2023
1 parent 9e7552a commit f47d6f4
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export interface CreateCaseCommandOutput extends CreateCaseResponse, __MetadataB
* stringValue: "STRING_VALUE",
* doubleValue: Number("double"),
* booleanValue: true || false,
* emptyValue: {},
* },
* },
* ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface CreateDomainCommandOutput extends CreateDomainResponse, __Metad
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_CreateIntegrationAssociation.html">CreateIntegrationAssociation</a> API. You need specific IAM
* permissions to successfully associate the Cases domain. For more information, see
* <a href="https://docs.aws.amazon.com/connect/latest/adminguide/required-permissions-iam-cases.html#onboard-cases-iam">Onboard to Cases</a>.</p>
*
* </important>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ export interface DeleteDomainCommandOutput extends DeleteDomainResponse, __Metad

/**
* @public
* <p>Deletes a domain.</p>
* <p>Deletes a Cases domain.</p>
*
*
* <note>
* <p>After deleting your domain you must disassociate the deleted domain from your Amazon Connect instance with another API call before being able to use Cases again with this
* Amazon Connect instance. See <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteIntegrationAssociation.html">DeleteIntegrationAssociation</a>.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
1 change: 1 addition & 0 deletions clients/client-connectcases/src/commands/GetCaseCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export interface GetCaseCommandOutput extends GetCaseResponse, __MetadataBearer
* // stringValue: "STRING_VALUE",
* // doubleValue: Number("double"),
* // booleanValue: true || false,
* // emptyValue: {},
* // },
* // },
* // ],
Expand Down
12 changes: 12 additions & 0 deletions clients/client-connectcases/src/commands/SearchCasesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface SearchCasesCommandOutput extends SearchCasesResponse, __Metadat
* stringValue: "STRING_VALUE",
* doubleValue: Number("double"),
* booleanValue: true || false,
* emptyValue: {},
* },
* },
* contains: {
Expand All @@ -70,6 +71,7 @@ export interface SearchCasesCommandOutput extends SearchCasesResponse, __Metadat
* stringValue: "STRING_VALUE",
* doubleValue: Number("double"),
* booleanValue: true || false,
* emptyValue: {},
* },
* },
* greaterThan: {
Expand All @@ -78,6 +80,7 @@ export interface SearchCasesCommandOutput extends SearchCasesResponse, __Metadat
* stringValue: "STRING_VALUE",
* doubleValue: Number("double"),
* booleanValue: true || false,
* emptyValue: {},
* },
* },
* greaterThanOrEqualTo: {
Expand All @@ -86,6 +89,7 @@ export interface SearchCasesCommandOutput extends SearchCasesResponse, __Metadat
* stringValue: "STRING_VALUE",
* doubleValue: Number("double"),
* booleanValue: true || false,
* emptyValue: {},
* },
* },
* lessThan: {
Expand All @@ -94,6 +98,7 @@ export interface SearchCasesCommandOutput extends SearchCasesResponse, __Metadat
* stringValue: "STRING_VALUE",
* doubleValue: Number("double"),
* booleanValue: true || false,
* emptyValue: {},
* },
* },
* lessThanOrEqualTo: "<FieldValue>",
Expand All @@ -111,10 +116,16 @@ export interface SearchCasesCommandOutput extends SearchCasesResponse, __Metadat
* andAll: [ // CaseFilterList
* "<CaseFilter>",
* ],
* orAll: [
* "<CaseFilter>",
* ],
* },
* andAll: [
* "<CaseFilter>",
* ],
* orAll: [
* "<CaseFilter>",
* ],
* },
* sorts: [ // SortList
* { // Sort
Expand Down Expand Up @@ -143,6 +154,7 @@ export interface SearchCasesCommandOutput extends SearchCasesResponse, __Metadat
* // stringValue: "STRING_VALUE",
* // doubleValue: Number("double"),
* // booleanValue: true || false,
* // emptyValue: {},
* // },
* // },
* // ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export interface UpdateCaseCommandOutput extends UpdateCaseResponse, __MetadataB
* stringValue: "STRING_VALUE",
* doubleValue: Number("double"),
* booleanValue: true || false,
* emptyValue: {},
* },
* },
* ],
Expand Down
43 changes: 43 additions & 0 deletions clients/client-connectcases/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,21 @@ export class ConflictException extends __BaseException {
}
}

/**
* @public
* <p>An empty value. You cannot set <code>EmptyFieldValue</code> on a field that is required on a case template.</p>
* <p>This structure will never have any data members. It signifies an empty value on a case field.</p>
*/
export interface EmptyFieldValue {}

/**
* @public
* <p>Object to store union of Field values.</p>
*/
export type FieldValueUnion =
| FieldValueUnion.BooleanValueMember
| FieldValueUnion.DoubleValueMember
| FieldValueUnion.EmptyValueMember
| FieldValueUnion.StringValueMember
| FieldValueUnion.$UnknownMember;

Expand All @@ -66,6 +74,7 @@ export namespace FieldValueUnion {
stringValue: string;
doubleValue?: never;
booleanValue?: never;
emptyValue?: never;
$unknown?: never;
}

Expand All @@ -77,6 +86,7 @@ export namespace FieldValueUnion {
stringValue?: never;
doubleValue: number;
booleanValue?: never;
emptyValue?: never;
$unknown?: never;
}

Expand All @@ -87,27 +97,42 @@ export namespace FieldValueUnion {
stringValue?: never;
doubleValue?: never;
booleanValue: boolean;
emptyValue?: never;
$unknown?: never;
}

/**
* <p>An empty value.</p>
*/
export interface EmptyValueMember {
stringValue?: never;
doubleValue?: never;
booleanValue?: never;
emptyValue: EmptyFieldValue;
$unknown?: never;
}

export interface $UnknownMember {
stringValue?: never;
doubleValue?: never;
booleanValue?: never;
emptyValue?: never;
$unknown: [string, any];
}

export interface Visitor<T> {
stringValue: (value: string) => T;
doubleValue: (value: number) => T;
booleanValue: (value: boolean) => T;
emptyValue: (value: EmptyFieldValue) => T;
_: (name: string, value: any) => T;
}

export const visit = <T>(value: FieldValueUnion, visitor: Visitor<T>): T => {
if (value.stringValue !== undefined) return visitor.stringValue(value.stringValue);
if (value.doubleValue !== undefined) return visitor.doubleValue(value.doubleValue);
if (value.booleanValue !== undefined) return visitor.booleanValue(value.booleanValue);
if (value.emptyValue !== undefined) return visitor.emptyValue(value.emptyValue);
return visitor._(value.$unknown[0], value.$unknown[1]);
};
}
Expand Down Expand Up @@ -2257,6 +2282,7 @@ export type CaseFilter =
| CaseFilter.AndAllMember
| CaseFilter.FieldMember
| CaseFilter.NotMember
| CaseFilter.OrAllMember
| CaseFilter.$UnknownMember;

/**
Expand All @@ -2270,6 +2296,7 @@ export namespace CaseFilter {
field: FieldFilter;
not?: never;
andAll?: never;
orAll?: never;
$unknown?: never;
}

Expand All @@ -2280,6 +2307,7 @@ export namespace CaseFilter {
field?: never;
not: CaseFilter;
andAll?: never;
orAll?: never;
$unknown?: never;
}

Expand All @@ -2290,27 +2318,42 @@ export namespace CaseFilter {
field?: never;
not?: never;
andAll: CaseFilter[];
orAll?: never;
$unknown?: never;
}

/**
* <p>Provides "or all" filtering.</p>
*/
export interface OrAllMember {
field?: never;
not?: never;
andAll?: never;
orAll: CaseFilter[];
$unknown?: never;
}

export interface $UnknownMember {
field?: never;
not?: never;
andAll?: never;
orAll?: never;
$unknown: [string, any];
}

export interface Visitor<T> {
field: (value: FieldFilter) => T;
not: (value: CaseFilter) => T;
andAll: (value: CaseFilter[]) => T;
orAll: (value: CaseFilter[]) => T;
_: (name: string, value: any) => T;
}

export const visit = <T>(value: CaseFilter, visitor: Visitor<T>): T => {
if (value.field !== undefined) return visitor.field(value.field);
if (value.not !== undefined) return visitor.not(value.not);
if (value.andAll !== undefined) return visitor.andAll(value.andAll);
if (value.orAll !== undefined) return visitor.orAll(value.orAll);
return visitor._(value.$unknown[0], value.$unknown[1]);
};
}
Expand Down
12 changes: 12 additions & 0 deletions clients/client-connectcases/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ import {
Contact,
ContactContent,
ContactFilter,
EmptyFieldValue,
EventBridgeConfiguration,
EventIncludedData,
FieldFilter,
Expand Down Expand Up @@ -2997,6 +2998,7 @@ const se_CaseFilter = (input: CaseFilter, context: __SerdeContext): any => {
andAll: (value) => ({ andAll: se_CaseFilterList(value, context) }),
field: (value) => ({ field: se_FieldFilter(value, context) }),
not: (value) => ({ not: se_CaseFilter(value, context) }),
orAll: (value) => ({ orAll: se_CaseFilterList(value, context) }),
_: (name, value) => ({ name: value } as any),
});
};
Expand All @@ -3022,6 +3024,8 @@ const se_CaseFilterList = (input: CaseFilter[], context: __SerdeContext): any =>

// se_ContactFilter omitted.

// se_EmptyFieldValue omitted.

// se_EventBridgeConfiguration omitted.

// se_EventIncludedData omitted.
Expand Down Expand Up @@ -3083,6 +3087,7 @@ const se_FieldValueUnion = (input: FieldValueUnion, context: __SerdeContext): an
return FieldValueUnion.visit(input, {
booleanValue: (value) => ({ booleanValue: value }),
doubleValue: (value) => ({ doubleValue: __serializeFloat(value) }),
emptyValue: (value) => ({ emptyValue: _json(value) }),
stringValue: (value) => ({ stringValue: value }),
_: (name, value) => ({ name: value } as any),
});
Expand Down Expand Up @@ -3167,6 +3172,8 @@ const de_ContactContent = (output: any, context: __SerdeContext): ContactContent

// de_DomainSummaryList omitted.

// de_EmptyFieldValue omitted.

// de_EventBridgeConfiguration omitted.

// de_EventIncludedData omitted.
Expand Down Expand Up @@ -3227,6 +3234,11 @@ const de_FieldValueUnion = (output: any, context: __SerdeContext): FieldValueUni
if (__limitedParseDouble(output.doubleValue) !== undefined) {
return { doubleValue: __limitedParseDouble(output.doubleValue) as any };
}
if (output.emptyValue != null) {
return {
emptyValue: _json(output.emptyValue),
};
}
if (__expectString(output.stringValue) !== undefined) {
return { stringValue: __expectString(output.stringValue) as any };
}
Expand Down
26 changes: 24 additions & 2 deletions codegen/sdk-codegen/aws-models/connectcases.json
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,15 @@
"max": 10
}
}
},
"orAll": {
"target": "com.amazonaws.connectcases#CaseFilterList",
"traits": {
"smithy.api#documentation": "<p>Provides \"or all\" filtering.</p>",
"smithy.api#length": {
"max": 10
}
}
}
},
"traits": {
Expand Down Expand Up @@ -1364,7 +1373,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Creates a domain, which is a container for all case data, such as cases, fields, templates\n and layouts. Each Amazon Connect instance can be associated with only one Cases\n domain.</p>\n <important>\n <p>This will not associate your connect instance to Cases domain. Instead, use the\n Amazon Connect\n <a href=\"https://docs.aws.amazon.com/connect/latest/APIReference/API_CreateIntegrationAssociation.html\">CreateIntegrationAssociation</a> API. You need specific IAM\n permissions to successfully associate the Cases domain. For more information, see\n <a href=\"https://docs.aws.amazon.com/connect/latest/adminguide/required-permissions-iam-cases.html#onboard-cases-iam\">Onboard to Cases</a>.</p>\n </important>",
"smithy.api#documentation": "<p>Creates a domain, which is a container for all case data, such as cases, fields, templates\n and layouts. Each Amazon Connect instance can be associated with only one Cases\n domain.</p>\n <important>\n <p>This will not associate your connect instance to Cases domain. Instead, use the\n Amazon Connect\n <a href=\"https://docs.aws.amazon.com/connect/latest/APIReference/API_CreateIntegrationAssociation.html\">CreateIntegrationAssociation</a> API. You need specific IAM\n permissions to successfully associate the Cases domain. For more information, see\n <a href=\"https://docs.aws.amazon.com/connect/latest/adminguide/required-permissions-iam-cases.html#onboard-cases-iam\">Onboard to Cases</a>.</p>\n \n </important>",
"smithy.api#http": {
"uri": "/domains",
"method": "POST"
Expand Down Expand Up @@ -1816,7 +1825,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Deletes a domain.</p>",
"smithy.api#documentation": "<p>Deletes a Cases domain.</p>\n \n \n <note>\n <p>After deleting your domain you must disassociate the deleted domain from your Amazon Connect instance with another API call before being able to use Cases again with this\n Amazon Connect instance. See <a href=\"https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteIntegrationAssociation.html\">DeleteIntegrationAssociation</a>.</p>\n </note>",
"smithy.api#http": {
"uri": "/domains/{domainId}",
"method": "DELETE"
Expand Down Expand Up @@ -1956,6 +1965,13 @@
"target": "com.amazonaws.connectcases#DomainSummary"
}
},
"com.amazonaws.connectcases#EmptyFieldValue": {
"type": "structure",
"members": {},
"traits": {
"smithy.api#documentation": "<p>An empty value. You cannot set <code>EmptyFieldValue</code> on a field that is required on a case template.</p>\n <p>This structure will never have any data members. It signifies an empty value on a case field.</p>"
}
},
"com.amazonaws.connectcases#EventBridgeConfiguration": {
"type": "structure",
"members": {
Expand Down Expand Up @@ -2448,6 +2464,12 @@
"traits": {
"smithy.api#documentation": "<p>Can be either null, or have a Boolean value type. Only one value can be provided.</p>"
}
},
"emptyValue": {
"target": "com.amazonaws.connectcases#EmptyFieldValue",
"traits": {
"smithy.api#documentation": "<p>An empty value.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit f47d6f4

Please sign in to comment.