Skip to content

Commit 9478259

Browse files
committed
Updated API samples
1 parent f1a4a22 commit 9478259

480 files changed

Lines changed: 3979 additions & 2585 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

openapi-client/ada/src/client/-clients.adb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ package body .Clients is
149149
Limit : in Swagger.Nullable_Integer;
150150
Start_Date : in Swagger.Nullable_Long;
151151
End_Date : in Swagger.Nullable_Long;
152+
Replyto : in Swagger.Nullable_UString;
153+
Headerfrom : in Swagger.Nullable_UString;
152154
Result : out .Models.MailLog_Type) is
153155
URI : Swagger.Clients.URI_Type;
154156
Reply : Swagger.Value_Type;
@@ -167,6 +169,8 @@ package body .Clients is
167169
URI.Add_Param ("limit", Limit);
168170
URI.Add_Param ("startDate", Start_Date);
169171
URI.Add_Param ("endDate", End_Date);
172+
URI.Add_Param ("replyto", Replyto);
173+
URI.Add_Param ("headerfrom", Headerfrom);
170174
URI.Set_Path ("/mail/log");
171175
Client.Call (Swagger.Clients.GET, URI, Reply);
172176
.Models.Deserialize (Reply, "", Result);

openapi-client/ada/src/client/-clients.ads

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ package .Clients is
7070
Limit : in Swagger.Nullable_Integer;
7171
Start_Date : in Swagger.Nullable_Long;
7272
End_Date : in Swagger.Nullable_Long;
73+
Replyto : in Swagger.Nullable_UString;
74+
Headerfrom : in Swagger.Nullable_UString;
7375
Result : out .Models.MailLog_Type);
7476

7577
-- Sends an Email with Advanced Options

openapi-client/apex/force-app/main/default/classes/OASHistoryApi.cls

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public class OASHistoryApi {
6060
* @param r_limit maximum number of records to return (optional, default to 100)
6161
* @param startDate earliest date to get emails in unix timestamp format (optional)
6262
* @param endDate earliest date to get emails in unix timestamp format (optional)
63+
* @param replyto Reply-To Email Address (optional)
64+
* @param headerfrom Header From Email Address (optional)
6365
* @return OASMailLog
6466
* @throws OAS.ApiException if fails to make API call
6567
*/
@@ -78,6 +80,8 @@ public class OASHistoryApi {
7880
query.addAll(client.makeParam('limit', (Integer) params.get('r_limit')));
7981
query.addAll(client.makeParam('startDate', (Long) params.get('startDate')));
8082
query.addAll(client.makeParam('endDate', (Long) params.get('endDate')));
83+
query.addAll(client.makeParam('replyto', (String) params.get('replyto')));
84+
query.addAll(client.makeParam('headerfrom', (String) params.get('headerfrom')));
8185

8286
List<OAS.Param> form = new List<OAS.Param>();
8387

openapi-client/apex/force-app/main/default/classes/OASHistoryApiTest.cls

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ private class OASHistoryApiTest {
5454
'skip' => 1000,
5555
'r_limit' => 1000,
5656
'startDate' => 1641781008,
57-
'endDate' => 1673317008
57+
'endDate' => 1673317008,
58+
'replyto' => 'null',
59+
'headerfrom' => 'null'
5860
};
5961

6062
OASClient client;

openapi-client/bash/_client.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ case $state in
361361
"limit=:[QUERY] maximum number of records to return"
362362
"startDate=:[QUERY] earliest date to get emails in unix timestamp format"
363363
"endDate=:[QUERY] earliest date to get emails in unix timestamp format"
364+
"replyto=:[QUERY] Reply-To Email Address"
365+
"headerfrom=:[QUERY] Header From Email Address"
364366
)
365367
_describe -t actions 'operations' _op_arguments -S '' && ret=0
366368
;;

openapi-client/bash/client.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ operation_parameters_minimum_occurrences["viewMailLog:::skip"]=0
111111
operation_parameters_minimum_occurrences["viewMailLog:::limit"]=0
112112
operation_parameters_minimum_occurrences["viewMailLog:::startDate"]=0
113113
operation_parameters_minimum_occurrences["viewMailLog:::endDate"]=0
114+
operation_parameters_minimum_occurrences["viewMailLog:::replyto"]=0
115+
operation_parameters_minimum_occurrences["viewMailLog:::headerfrom"]=0
114116
operation_parameters_minimum_occurrences["sendAdvMail:::subject"]=1
115117
operation_parameters_minimum_occurrences["sendAdvMail:::body"]=1
116118
operation_parameters_minimum_occurrences["sendAdvMail:::from"]=1
@@ -148,6 +150,8 @@ operation_parameters_maximum_occurrences["viewMailLog:::skip"]=0
148150
operation_parameters_maximum_occurrences["viewMailLog:::limit"]=0
149151
operation_parameters_maximum_occurrences["viewMailLog:::startDate"]=0
150152
operation_parameters_maximum_occurrences["viewMailLog:::endDate"]=0
153+
operation_parameters_maximum_occurrences["viewMailLog:::replyto"]=0
154+
operation_parameters_maximum_occurrences["viewMailLog:::headerfrom"]=0
151155
operation_parameters_maximum_occurrences["sendAdvMail:::subject"]=0
152156
operation_parameters_maximum_occurrences["sendAdvMail:::body"]=0
153157
operation_parameters_maximum_occurrences["sendAdvMail:::from"]=0
@@ -182,6 +186,8 @@ operation_parameters_collection_type["viewMailLog:::skip"]=""
182186
operation_parameters_collection_type["viewMailLog:::limit"]=""
183187
operation_parameters_collection_type["viewMailLog:::startDate"]=""
184188
operation_parameters_collection_type["viewMailLog:::endDate"]=""
189+
operation_parameters_collection_type["viewMailLog:::replyto"]=""
190+
operation_parameters_collection_type["viewMailLog:::headerfrom"]=""
185191
operation_parameters_collection_type["sendAdvMail:::subject"]=""
186192
operation_parameters_collection_type["sendAdvMail:::body"]=""
187193
operation_parameters_collection_type["sendAdvMail:::from"]=""
@@ -853,6 +859,10 @@ print_viewMailLog_help() {
853859
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
854860
echo -e " * ${GREEN}endDate${OFF} ${BLUE}[integer]${OFF} ${CYAN}(default: null)${OFF} - earliest date to get emails in unix timestamp format${YELLOW} Specify as: endDate=value${OFF}" \
855861
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
862+
echo -e " * ${GREEN}replyto${OFF} ${BLUE}[string]${OFF} ${CYAN}(default: null)${OFF} - Reply-To Email Address${YELLOW} Specify as: replyto=value${OFF}" \
863+
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
864+
echo -e " * ${GREEN}headerfrom${OFF} ${BLUE}[string]${OFF} ${CYAN}(default: null)${OFF} - Header From Email Address${YELLOW} Specify as: headerfrom=value${OFF}" \
865+
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
856866
echo ""
857867
echo -e "${BOLD}${WHITE}Responses${OFF}"
858868
code=200
@@ -1325,7 +1335,7 @@ call_viewMailLog() {
13251335
local path_parameter_names=()
13261336
# ignore error about 'query_parameter_names' being unused; passed by reference
13271337
# shellcheck disable=SC2034
1328-
local query_parameter_names=(id origin mx from to subject mailid skip limit startDate endDate )
1338+
local query_parameter_names=(id origin mx from to subject mailid skip limit startDate endDate replyto headerfrom )
13291339
local path
13301340

13311341
if ! path=$(build_request_path "/mail/log" path_parameter_names query_parameter_names); then

openapi-client/bash/client.sh.bash-completion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ _()
8989
operation_parameters["getMailBlocks"]=""
9090
operation_parameters["getRules"]=""
9191
operation_parameters["getStats"]=""
92-
operation_parameters["viewMailLog"]="id= origin= mx= from= to= subject= mailid= skip= limit= startDate= endDate= "
92+
operation_parameters["viewMailLog"]="id= origin= mx= from= to= subject= mailid= skip= limit= startDate= endDate= replyto= headerfrom= "
9393
operation_parameters["sendAdvMail"]=""
9494
operation_parameters["sendMail"]=""
9595
operation_parameters["getMailOrders"]=""

openapi-client/bash/docs/HistoryApi.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Get a listing of the emails sent through this system
5050
### Example
5151

5252
```bash
53-
viewMailLog id=value origin=value mx=value from=value to=value subject=value mailid=value skip=value limit=value startDate=value endDate=value
53+
viewMailLog id=value origin=value mx=value from=value to=value subject=value mailid=value skip=value limit=value startDate=value endDate=value replyto=value headerfrom=value
5454
```
5555

5656
### Parameters
@@ -69,6 +69,8 @@ Name | Type | Description | Notes
6969
**limit** | **integer** | maximum number of records to return | [optional] [default to 100]
7070
**startDate** | **integer** | earliest date to get emails in unix timestamp format | [optional] [default to null]
7171
**endDate** | **integer** | earliest date to get emails in unix timestamp format | [optional] [default to null]
72+
**replyto** | **string** | Reply-To Email Address | [optional] [default to null]
73+
**headerfrom** | **string** | Header From Email Address | [optional] [default to null]
7274

7375
### Return type
7476

openapi-client/c/api/HistoryAPI.c

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ HistoryAPI_getStats(apiClient_t *apiClient)
9898
// Get a listing of the emails sent through this system
9999
//
100100
mail_log_t*
101-
HistoryAPI_viewMailLog(apiClient_t *apiClient, long id , char * origin , char * mx , char * from , char * to , char * subject , char * mailid , int skip , int limit , long startDate , long endDate )
101+
HistoryAPI_viewMailLog(apiClient_t *apiClient, long id , char * origin , char * mx , char * from , char * to , char * subject , char * mailid , int skip , int limit , long startDate , long endDate , char * replyto , char * headerfrom )
102102
{
103103
list_t *localVarQueryParameters = list_createList();
104104
list_t *localVarHeaderParameters = NULL;
@@ -248,6 +248,30 @@ HistoryAPI_viewMailLog(apiClient_t *apiClient, long id , char * origin , char *
248248
keyPairQuery_endDate = keyValuePair_create(keyQuery_endDate, &valueQuery_endDate);
249249
list_addElement(localVarQueryParameters,keyPairQuery_endDate);
250250
}
251+
252+
// query parameters
253+
char *keyQuery_replyto = NULL;
254+
char * valueQuery_replyto = NULL;
255+
keyValuePair_t *keyPairQuery_replyto = 0;
256+
if (replyto)
257+
{
258+
keyQuery_replyto = strdup("replyto");
259+
valueQuery_replyto = strdup((replyto));
260+
keyPairQuery_replyto = keyValuePair_create(keyQuery_replyto, valueQuery_replyto);
261+
list_addElement(localVarQueryParameters,keyPairQuery_replyto);
262+
}
263+
264+
// query parameters
265+
char *keyQuery_headerfrom = NULL;
266+
char * valueQuery_headerfrom = NULL;
267+
keyValuePair_t *keyPairQuery_headerfrom = 0;
268+
if (headerfrom)
269+
{
270+
keyQuery_headerfrom = strdup("headerfrom");
271+
valueQuery_headerfrom = strdup((headerfrom));
272+
keyPairQuery_headerfrom = keyValuePair_create(keyQuery_headerfrom, valueQuery_headerfrom);
273+
list_addElement(localVarQueryParameters,keyPairQuery_headerfrom);
274+
}
251275
list_addElement(localVarHeaderType,"application/json"); //produces
252276
apiClient_invoke(apiClient,
253277
localVarPath,
@@ -407,6 +431,30 @@ HistoryAPI_viewMailLog(apiClient_t *apiClient, long id , char * origin , char *
407431
keyValuePair_free(keyPairQuery_endDate);
408432
keyPairQuery_endDate = NULL;
409433
}
434+
if(keyQuery_replyto){
435+
free(keyQuery_replyto);
436+
keyQuery_replyto = NULL;
437+
}
438+
if(valueQuery_replyto){
439+
free(valueQuery_replyto);
440+
valueQuery_replyto = NULL;
441+
}
442+
if(keyPairQuery_replyto){
443+
keyValuePair_free(keyPairQuery_replyto);
444+
keyPairQuery_replyto = NULL;
445+
}
446+
if(keyQuery_headerfrom){
447+
free(keyQuery_headerfrom);
448+
keyQuery_headerfrom = NULL;
449+
}
450+
if(valueQuery_headerfrom){
451+
free(valueQuery_headerfrom);
452+
valueQuery_headerfrom = NULL;
453+
}
454+
if(keyPairQuery_headerfrom){
455+
keyValuePair_free(keyPairQuery_headerfrom);
456+
keyPairQuery_headerfrom = NULL;
457+
}
410458
return elementToReturn;
411459
end:
412460
free(localVarPath);

openapi-client/c/api/HistoryAPI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ HistoryAPI_getStats(apiClient_t *apiClient);
2323
// Get a listing of the emails sent through this system
2424
//
2525
mail_log_t*
26-
HistoryAPI_viewMailLog(apiClient_t *apiClient, long id , char * origin , char * mx , char * from , char * to , char * subject , char * mailid , int skip , int limit , long startDate , long endDate );
26+
HistoryAPI_viewMailLog(apiClient_t *apiClient, long id , char * origin , char * mx , char * from , char * to , char * subject , char * mailid , int skip , int limit , long startDate , long endDate , char * replyto , char * headerfrom );
2727

2828

0 commit comments

Comments
 (0)