Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
659b969
update default tag
msyyc Jun 24, 2025
a7a5598
init tsp
msyyc Jun 24, 2025
9d8108a
init swagger
msyyc Jun 24, 2025
8566e0b
add suppression for warning
msyyc Jun 24, 2025
59da501
fix body name
msyyc Jun 24, 2025
96596d7
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
msyyc Jul 1, 2025
9ec86ab
fix breaking
msyyc Jul 1, 2025
dff4286
Fix for nextlink
msyyc Jul 2, 2025
ad1ea07
fix for return type name of list operations
msyyc Jul 2, 2025
090f90c
fix body name
msyyc Jul 7, 2025
ce61871
fix for azure-async-operation
msyyc Jul 7, 2025
ab70921
fix for azure-async-operation
msyyc Jul 7, 2025
578b0bf
fix for azure-async-operation
msyyc Jul 7, 2025
99cc2e2
fix for azure-async-operation
msyyc Jul 7, 2025
cc88fd1
temp files
msyyc Jul 7, 2025
9328072
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
msyyc Jul 8, 2025
645ee1d
add @clientLocation and remove @operationId
msyyc Jul 8, 2025
da42cd5
use @clientLocation to replace @operationId
msyyc Jul 8, 2025
1409802
format
msyyc Jul 8, 2025
b696007
format
msyyc Jul 9, 2025
a19f2a9
format
msyyc Jul 9, 2025
3499da9
fix Swagger ModelValidation error INVALID_FORMAT
msyyc Jul 9, 2025
0b43f3d
make value optional to keep compatibility with swagger
msyyc Jul 9, 2025
a417d0a
add tspconfig.yaml
msyyc Jul 9, 2025
757a378
Merge branches 'support-tsp-migration' and 'main' of https://github.c…
msyyc Jul 22, 2025
27988b1
customize for no body common op
msyyc Jul 22, 2025
0af7957
customize for no body common op
msyyc Jul 22, 2025
d6a4027
format
msyyc Jul 22, 2025
49482f1
fix cspell
msyyc Jul 22, 2025
802f21f
fix ci
msyyc Jul 22, 2025
f82ec3e
fix ci
msyyc Jul 22, 2025
70d938b
fix ci
msyyc Jul 22, 2025
4780d61
resolve breaking
v-jiaodi Jul 30, 2025
e99085a
Merge branch 'main' into support-tsp-migration
msyyc Aug 6, 2025
a161443
update for empty union
msyyc Aug 6, 2025
f6cbc25
fix missing final result for lro
msyyc Aug 8, 2025
cde9cd3
Merge branch 'main' into support-tsp-migration
msyyc Aug 8, 2025
810e3af
update for @pageItems
msyyc Aug 8, 2025
0a009ef
Merge branch 'main' into support-tsp-migration
msyyc Aug 12, 2025
4611ffc
Merge branch 'main' into support-tsp-migration
msyyc Aug 13, 2025
c8d94de
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
msyyc Aug 21, 2025
4e01375
fix for pattern
msyyc Aug 21, 2025
bd75919
Merge branch 'main' into support-tsp-migration
msyyc Aug 22, 2025
3331035
Merge branch 'main' into support-tsp-migration
msyyc Aug 25, 2025
8d17a36
service-name
weidongxu-microsoft Aug 28, 2025
237112e
Merge branch 'main' into support-tsp-migration
v-jiaodi Aug 28, 2025
61848f9
remove legacy operation
Aug 28, 2025
3fcbcdb
Add emit-lro-options: "all"
melina5656 Aug 28, 2025
9edc306
remove csharp config
Aug 28, 2025
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
121 changes: 121 additions & 0 deletions specification/support/Support.Management/ChatTranscriptDetails.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./SupportTicketDetails.tsp";

using TypeSpec.Rest;
using Azure.Core;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.Support;
/**
* Object that represents a Chat Transcript resource.
*/
@parentResource(SupportTicketDetails)
model ChatTranscriptDetails
is Azure.ResourceManager.ProxyResource<ChatTranscriptDetailsProperties> {
...ResourceNameParameter<
Resource = ChatTranscriptDetails,
KeyName = "chatTranscriptName",
SegmentName = "chatTranscripts",
NamePattern = ""
>;
}

/**
* [Placeholder] Description for page model
*/
model ChatTranscriptsListResult {
/**
* [Placeholder] Description for nextLink property
*/
@nextLink
nextLink?: string;

/**
* [Placeholder] Description for value property
*/
@pageItems
value?: ChatTranscriptDetails[];
}

@armResourceOperations
interface ChatTranscriptOps
extends Azure.ResourceManager.Legacy.LegacyOperations<
{
...ApiVersionParameter,
...SubscriptionIdParameter,
...Azure.ResourceManager.Legacy.Provider,
...KeysOf<ResourceNameParameter<
Resource = SupportTicketDetails,
KeyName = "supportTicketName",
SegmentName = "supportTickets",
NamePattern = ""
>>,
},
KeysOf<ResourceNameParameter<
Resource = ChatTranscriptDetails,
KeyName = "chatTranscriptName",
SegmentName = "chatTranscripts",
NamePattern = ""
>>
> {}

@armResourceOperations
interface ChatTranscripts {
/**
* Returns chatTranscript details for a support ticket under a subscription.
*/
get is ChatTranscriptOps.Read<ChatTranscriptDetails>;

/**
* Lists all chat transcripts for a support ticket under subscription
*/
list is ChatTranscriptOps.List<
ChatTranscriptDetails,
Response = ChatTranscriptsListResult
>;
}
@armResourceOperations
interface ChatTranscriptsNoSubscriptionOps
extends Azure.ResourceManager.Legacy.LegacyOperations<
{
...ApiVersionParameter,
...Azure.ResourceManager.Legacy.Provider,
...KeysOf<ResourceNameParameter<
Resource = SupportTicketDetails,
KeyName = "supportTicketName",
SegmentName = "supportTickets",
NamePattern = ""
>>,
},
KeysOf<ResourceNameParameter<
Resource = ChatTranscriptDetails,
KeyName = "chatTranscriptName",
SegmentName = "chatTranscripts",
NamePattern = ""
>>
> {}

@armResourceOperations
interface ChatTranscriptsNoSubscription {
/**
* Returns chatTranscript details for a no subscription support ticket.
*/
get is ChatTranscriptsNoSubscriptionOps.Read<ChatTranscriptDetails>;

/**
* Lists all chat transcripts for a support ticket
*/
list is ChatTranscriptsNoSubscriptionOps.List<
ChatTranscriptDetails,
Response = ChatTranscriptsListResult
>;
}

@@doc(ChatTranscriptDetails.name, "ChatTranscript name.");
@@doc(ChatTranscriptDetails.properties, "Properties of the resource.");
179 changes: 179 additions & 0 deletions specification/support/Support.Management/CommunicationDetails.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./SupportTicketDetails.tsp";

using TypeSpec.Rest;
using Azure.Core;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.Support;
/**
* Object that represents a Communication resource.
*/
@parentResource(SupportTicketDetails)
model CommunicationDetails
is Azure.ResourceManager.ProxyResource<
CommunicationDetailsProperties,
false
> {
...ResourceNameParameter<
Resource = CommunicationDetails,
KeyName = "communicationName",
SegmentName = "communications",
NamePattern = ""
>;
}

/**
* [Placeholder] Description for page model
*/
model CommunicationsListResult {
/**
* [Placeholder] Description for nextLink property
*/
@nextLink
nextLink?: string;

/**
* [Placeholder] Description for value property
*/
@pageItems
value?: CommunicationDetails[];
}

@armResourceOperations
interface CommunicationOps
extends Azure.ResourceManager.Legacy.LegacyOperations<
{
...ApiVersionParameter,
...SubscriptionIdParameter,
...Azure.ResourceManager.Legacy.Provider,
...KeysOf<ResourceNameParameter<
Resource = SupportTicketDetails,
KeyName = "supportTicketName",
SegmentName = "supportTickets",
NamePattern = ""
>>,
},
KeysOf<ResourceNameParameter<
Resource = CommunicationDetails,
KeyName = "communicationName",
SegmentName = "communications",
NamePattern = ""
>>
> {}

@armResourceOperations
interface Communications {
/**
* Returns communication details for a support ticket.
*/
get is CommunicationOps.Read<CommunicationDetails>;

/**
* Adds a new customer communication to an Azure support ticket.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "For backward compatibility"
#suppress "@azure-tools/typespec-azure-core/invalid-final-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@Azure.Core.useFinalStateVia("azure-async-operation")
create is CommunicationOps.CreateOrUpdateAsync<
CommunicationDetails,
Response = ArmResourceUpdatedResponse<CommunicationDetails> | ArmAcceptedLroResponse<LroHeaders = ArmLroLocationHeader<FinalResult = CommunicationDetails> &
Azure.Core.Foundations.RetryAfterHeader>
>;

/**
* Lists all communications (attachments not included) for a support ticket. <br/></br> You can also filter support ticket communications by _CreatedDate_ or _CommunicationType_ using the $filter parameter. The only type of communication supported today is _Web_. Output will be a paged result with _nextLink_, using which you can retrieve the next set of Communication results. <br/><br/>Support ticket data is available for 18 months after ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an error.
*/
list is CommunicationOps.List<
CommunicationDetails,
Parameters = {
/**
* The number of values to return in the collection. Default is 10 and max is 10.
*/
@query("$top")
$top?: int32;

/**
* The filter to apply on the operation. You can filter by communicationType and createdDate properties. CommunicationType supports Equals ('eq') operator and createdDate supports Greater Than ('gt') and Greater Than or Equals ('ge') operators. You may combine the CommunicationType and CreatedDate filters by Logical And ('and') operator.
*/
@query("$filter")
$filter?: string;
},
Response = CommunicationsListResult
>;
}
@armResourceOperations
interface CommunicationsNoSubscriptionOps
extends Azure.ResourceManager.Legacy.LegacyOperations<
{
...ApiVersionParameter,
...Azure.ResourceManager.Legacy.Provider,
...KeysOf<ResourceNameParameter<
Resource = SupportTicketDetails,
KeyName = "supportTicketName",
SegmentName = "supportTickets",
NamePattern = ""
>>,
},
KeysOf<ResourceNameParameter<
Resource = CommunicationDetails,
KeyName = "communicationName",
SegmentName = "communications",
NamePattern = ""
>>
> {}

#suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" "For backward compatibility"
@armResourceOperations
interface CommunicationsNoSubscription {
/**
* Returns communication details for a support ticket.
*/
get is CommunicationsNoSubscriptionOps.Read<CommunicationDetails>;

/**
* Adds a new customer communication to an Azure support ticket.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "For backward compatibility"
#suppress "@azure-tools/typespec-azure-core/invalid-final-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@Azure.Core.useFinalStateVia("azure-async-operation")
create is CommunicationsNoSubscriptionOps.CreateOrUpdateAsync<
CommunicationDetails,
Response = ArmResourceUpdatedResponse<CommunicationDetails> | ArmAcceptedLroResponse<LroHeaders = ArmLroLocationHeader<FinalResult = CommunicationDetails> &
Azure.Core.Foundations.RetryAfterHeader>
>;

/**
* Lists all communications (attachments not included) for a support ticket. <br/></br> You can also filter support ticket communications by _CreatedDate_ or _CommunicationType_ using the $filter parameter. The only type of communication supported today is _Web_. Output will be a paged result with _nextLink_, using which you can retrieve the next set of Communication results. <br/><br/>Support ticket data is available for 18 months after ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an error.
*/
list is CommunicationsNoSubscriptionOps.List<
CommunicationDetails,
Parameters = {
/**
* The number of values to return in the collection. Default is 10 and max is 10.
*/
@query("$top")
$top?: int32;

/**
* The filter to apply on the operation. You can filter by communicationType and createdDate properties. CommunicationType supports Equals ('eq') operator and createdDate supports Greater Than ('gt') and Greater Than or Equals ('ge') operators. You may combine the CommunicationType and CreatedDate filters by Logical And ('and') operator.
*/
@query("$filter")
$filter?: string;
},
Response = CommunicationsListResult
>;
}

@@doc(CommunicationDetails.name, "Communication name.");
@@doc(CommunicationDetails.properties, "Properties of the resource.");
@@doc(Communications.create::parameters.resource, "Communication object.");
@@doc(CommunicationsNoSubscription.create::parameters.resource,
"Communication object."
);
Loading
Loading