Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: modify sms api proto #982

Merged
merged 2 commits into from
Aug 18, 2023
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
40 changes: 35 additions & 5 deletions docs/api/v1/sms.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,11 @@ <h2>Table of Contents</h2>
</li>

<li>
<a href="#spec.proto.extension.v1.sms.SendSmsWithTemplateResponse.MetadataEntry"><span class="badge">M</span>SendSmsWithTemplateResponse.MetadataEntry</a>
<a href="#spec.proto.extension.v1.sms.SendStatus"><span class="badge">M</span>SendStatus</a>
</li>

<li>
<a href="#spec.proto.extension.v1.sms.SendStatus.MetadataEntry"><span class="badge">M</span>SendStatus.MetadataEntry</a>
</li>

<li>
Expand Down Expand Up @@ -340,7 +344,7 @@ <h3 id="spec.proto.extension.v1.sms.SendSmsWithTemplateRequest.MetadataEntry">Se


<h3 id="spec.proto.extension.v1.sms.SendSmsWithTemplateResponse">SendSmsWithTemplateResponse</h3>
<p>SendSmsResponse is the reponse of the `SendSms` method.</p>
<p>SendSmsResponse is the response of the `SendSms` method.</p>


<table class="field-table">
Expand All @@ -356,6 +360,30 @@ <h3 id="spec.proto.extension.v1.sms.SendSmsWithTemplateResponse">SendSmsWithTemp
<td><p>The unique requestId. </p></td>
</tr>

<tr>
<td>results</td>
<td><a href="#spec.proto.extension.v1.sms.SendStatus">SendStatus</a></td>
<td>repeated</td>
<td><p>The status set of SMS </p></td>
</tr>

</tbody>
</table>





<h3 id="spec.proto.extension.v1.sms.SendStatus">SendStatus</h3>
<p>Status contains more information about the response</p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>code</td>
<td><a href="#string">string</a></td>
Expand All @@ -372,9 +400,11 @@ <h3 id="spec.proto.extension.v1.sms.SendSmsWithTemplateResponse">SendSmsWithTemp

<tr>
<td>metadata</td>
<td><a href="#spec.proto.extension.v1.sms.SendSmsWithTemplateResponse.MetadataEntry">SendSmsWithTemplateResponse.MetadataEntry</a></td>
<td><a href="#spec.proto.extension.v1.sms.SendStatus.MetadataEntry">SendStatus.MetadataEntry</a></td>
<td>repeated</td>
<td><p>The metadata returned from SMS service. </p></td>
<td><p>The send status metadata returned from SMS service.
Includes `PhoneNumber`.
`PhoneNumber`, is the phone number SMS send to. Supported by tencentcloud. </p></td>
</tr>

</tbody>
Expand All @@ -384,7 +414,7 @@ <h3 id="spec.proto.extension.v1.sms.SendSmsWithTemplateResponse">SendSmsWithTemp



<h3 id="spec.proto.extension.v1.sms.SendSmsWithTemplateResponse.MetadataEntry">SendSmsWithTemplateResponse.MetadataEntry</h3>
<h3 id="spec.proto.extension.v1.sms.SendStatus.MetadataEntry">SendStatus.MetadataEntry</h3>
<p></p>


Expand Down
141 changes: 105 additions & 36 deletions spec/proto/extension/v1/sms/sms.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions spec/proto/extension/v1/sms/sms.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ message SendSmsWithTemplateRequest {

// The metadata which will be sent to SMS components.
map<string, string> metadata = 6;

}

// Sms template
Expand All @@ -48,17 +49,29 @@ message Template{

}

// SendSmsResponse is the reponse of the `SendSms` method.
// SendSmsResponse is the response of the `SendSms` method.
message SendSmsWithTemplateResponse {

// The unique requestId.
string request_id = 1;

// The status set of SMS
repeated SendStatus results = 2;

}

// Status contains more information about the response
message SendStatus {

// "OK" represents success.
string code = 2;
string code = 1;

// The error message.
string message = 3;
string message = 2;

// The send status metadata returned from SMS service.
// Includes `PhoneNumber`.
// `PhoneNumber`, is the phone number SMS send to. Supported by tencentcloud.
map<string, string> metadata = 3;

// The metadata returned from SMS service.
map<string, string> metadata = 4;
}