Skip to content

Commit

Permalink
CodeGen from PR 29483 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge b0eecac9660020b988983448b6a8ff9fbc2e47ff into 2b6c728b10f0d8eca8bad4e7f009e38334ea7f1c
  • Loading branch information
SDKAuto committed Jun 26, 2024
1 parent e1702ea commit 3a15470
Show file tree
Hide file tree
Showing 20 changed files with 173 additions and 268 deletions.
25 changes: 19 additions & 6 deletions sdk/communication/communication-messages-rest/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./types/src/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/communication-messages.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
}
5 changes: 2 additions & 3 deletions sdk/communication/communication-messages-rest/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,11 @@ module.exports = function (config) {

envPreprocessor: [
"TEST_MODE",
"ENDPOINT",
"AZURE_CLIENT_SECRET",
"AZURE_CLIENT_ID",
"AZURE_TENANT_ID",
"CHANNEL_ID",
"RECIPIENT_PHONE_NUMBER",
"COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING",
"SUBSCRIPTION_ID",
"RECORDINGS_RELATIVE_PATH",
],

Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-messages-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@
"azure-communication-services"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ import { StreamableMethod } from '@azure-rest/core-client';
import { TokenCredential } from '@azure/core-auth';

// @public
export interface ClientRequestIdHeaderOutput {
}
export type CommunicationMessageKind = string | "text" | "image" | "template";

// @public
function createClient(connectionString: string, options?: ClientOptions): MessagesServiceClient;
export type CommunicationMessagesChannelOutput = string | "whatsApp";

// @public
function createClient(endpoint: string, credential: KeyCredential | TokenCredential, options?: ClientOptions): MessagesServiceClient;
function createClient(endpointParam: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): MessagesServiceClient;
export default createClient;

// @public
Expand Down Expand Up @@ -184,10 +183,13 @@ export interface MessageTemplate {
// @public
export type MessageTemplateBindings = MessageTemplateBindingsParent | WhatsAppMessageTemplateBindings;

// @public
export type MessageTemplateBindingsKind = string | "whatsApp";

// @public
export interface MessageTemplateBindingsParent {
// (undocumented)
kind: string;
kind: MessageTemplateBindingsKind;
}

// @public
Expand All @@ -212,10 +214,10 @@ export type MessageTemplateItemOutput = MessageTemplateItemOutputParent | WhatsA
// @public
export interface MessageTemplateItemOutputParent {
// (undocumented)
kind: string;
kind: CommunicationMessagesChannelOutput;
language: string;
readonly name: string;
status: string;
status: MessageTemplateStatusOutput;
}

// @public
Expand All @@ -234,6 +236,9 @@ export interface MessageTemplateQuickAction extends MessageTemplateValueParent {
text?: string;
}

// @public
export type MessageTemplateStatusOutput = string | "approved" | "rejected" | "pending" | "paused";

// @public
export interface MessageTemplateText extends MessageTemplateValueParent {
kind: "text";
Expand All @@ -243,10 +248,13 @@ export interface MessageTemplateText extends MessageTemplateValueParent {
// @public
export type MessageTemplateValue = MessageTemplateValueParent | MessageTemplateText | MessageTemplateImage | MessageTemplateDocument | MessageTemplateVideo | MessageTemplateLocation | MessageTemplateQuickAction;

// @public
export type MessageTemplateValueKind = string | "text" | "image" | "document" | "video" | "location" | "quickAction";

// @public
export interface MessageTemplateValueParent {
// (undocumented)
kind: string;
kind: MessageTemplateValueKind;
name: string;
}

Expand All @@ -265,7 +273,7 @@ export type NotificationContent = NotificationContentParent | TextNotificationCo
export interface NotificationContentParent {
channelRegistrationId: string;
// (undocumented)
kind: string;
kind: CommunicationMessageKind;
to: string[];
}

Expand All @@ -287,14 +295,6 @@ export interface PagingOptions<TResponse> {
customGetPage?: GetPage<PaginateReturn<TResponse>[]>;
}

// @public
export interface RepeatabilityRequestHeadersOutput {
}

// @public
export interface RepeatabilityResponseHeadersOutput {
}

// @public
export type RepeatabilityResultOutput = "accepted" | "rejected";

Expand All @@ -307,7 +307,7 @@ export interface Routes {

// @public (undocumented)
export interface Send {
post(options?: SendParameters): StreamableMethod<Send202Response | SendDefaultResponse>;
post(options: SendParameters): StreamableMethod<Send202Response | SendDefaultResponse>;
}

// @public (undocumented)
Expand All @@ -328,8 +328,7 @@ export interface Send202Response extends HttpResponse {

// @public (undocumented)
export interface SendBodyParam {
// (undocumented)
body?: NotificationContent;
body: NotificationContent;
}

// @public (undocumented)
Expand Down Expand Up @@ -380,6 +379,9 @@ export interface TextNotificationContent extends NotificationContentParent {
kind: "text";
}

// @public
export type WhatsAppMessageButtonSubType = string | "quickReply" | "url";

// @public
export interface WhatsAppMessageTemplateBindings extends MessageTemplateBindingsParent {
body?: Array<WhatsAppMessageTemplateBindingsComponent>;
Expand All @@ -392,7 +394,7 @@ export interface WhatsAppMessageTemplateBindings extends MessageTemplateBindings
// @public
export interface WhatsAppMessageTemplateBindingsButton {
refValue: string;
subType: string;
subType: WhatsAppMessageButtonSubType;
}

// @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import {
GetMediaParameters,
SendParameters,
ListTemplatesParameters,
} from "./parameters";
} from "./parameters.js";
import {
GetMedia200Response,
GetMediaDefaultResponse,
Send202Response,
SendDefaultResponse,
ListTemplates200Response,
ListTemplatesDefaultResponse,
} from "./responses";
} from "./responses.js";
import { Client, StreamableMethod } from "@azure-rest/core-client";

export interface GetMedia {
Expand All @@ -26,7 +26,7 @@ export interface GetMedia {
export interface Send {
/** Sends a notification message from Business to User. */
post(
options?: SendParameters,
options: SendParameters,
): StreamableMethod<Send202Response | SendDefaultResponse>;
}

Expand Down

This file was deleted.

This file was deleted.

20 changes: 11 additions & 9 deletions sdk/communication/communication-messages-rest/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import MessagesServiceClient from "./messagesServiceClient";
export * from "./generated/src/messagesServiceClient";
export * from "./generated/src/parameters";
export * from "./generated/src/responses";
export * from "./generated/src/clientDefinitions";
export * from "./generated/src/isUnexpected";
export * from "./generated/src/models";
export * from "./generated/src/outputModels";
export * from "./generated/src/paginateHelper";
import MessagesServiceClient from "./messagesServiceClient.js";

export * from "./messagesServiceClient.js";
export * from "./parameters.js";
export * from "./responses.js";
export * from "./clientDefinitions.js";
export * from "./isUnexpected.js";
export * from "./models.js";
export * from "./outputModels.js";
export * from "./paginateHelper.js";

export default MessagesServiceClient;
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
SendDefaultResponse,
ListTemplates200Response,
ListTemplatesDefaultResponse,
} from "./responses";
} from "./responses.js";

const responseMap: Record<string, string[]> = {
"GET /messages/streams/{id}": ["200"],
Expand Down
Loading

0 comments on commit 3a15470

Please sign in to comment.