Skip to content

Commit 8af164c

Browse files
committed
[Librarian] Regenerated @ 8ae16b2605675c91c569564ff1a79295c8ded36c
1 parent 010b559 commit 8af164c

File tree

58 files changed

+2489
-0
lines changed

Some content is hidden

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

58 files changed

+2489
-0
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
[2025-05-29] Version 7.0.0-rc.8
5+
-------------------------------
6+
**Domain authentication**
7+
- Add information about: Subdomain also refers to custom return path
8+
9+
**Suppressions**
10+
- Update `on-behalf-of` header to mention using the appropriate URL for the region of the subuser
11+
12+
413
[2025-05-13] Version 7.0.0-rc.7
514
-------------------------------
615
**Lmc contactdb v3**
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# TODO
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
"""
2+
This code was generated by
3+
4+
SENDGRID-OAI-GENERATOR
5+
6+
Twilio SendGrid Templates API
7+
The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts.
8+
9+
NOTE: This class is auto generated by OpenAPI Generator.
10+
https://openapi-generator.tech
11+
Do not edit the class manually.
12+
"""
13+
14+
import json
15+
import warnings
16+
from typing import Any, Dict, List, Optional, Tuple, Union
17+
from typing_extensions import Annotated
18+
from sendgrid.base import values
19+
from sendgrid.exceptions import ApiException
20+
from sendgrid.http.request import Request
21+
from sendgrid.http.response import ApiResponse
22+
23+
from pydantic import Field, StrictStr
24+
from typing import Optional
25+
from typing_extensions import Annotated
26+
from sendgrid.rest.api.templates.v3.models.transactional_template_version_output import TransactionalTemplateVersionOutput
27+
28+
class ActivateTemplateVersion:
29+
def __init__(self, client) -> None:
30+
self.client = client
31+
32+
def send(
33+
self,
34+
template_id: str,
35+
version_id: str,
36+
on_behalf_of: Optional[str] = None,
37+
38+
):
39+
path='/v3/templates/{template_id}/versions/{version_id}/activate'
40+
path = path.format(
41+
template_id=template_id,
42+
version_id=version_id,
43+
)
44+
45+
headers = values.of(
46+
{
47+
'on-behalf-of': on_behalf_of,
48+
})
49+
data = None
50+
request = Request(
51+
method='POST',
52+
url=path,
53+
data=data,
54+
headers=headers
55+
)
56+
response=self.client.send(request)
57+
if response is None:
58+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
59+
60+
if response.text:
61+
text = json.loads(response.text)
62+
else:
63+
text = ""
64+
if response.is_success():
65+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
66+
else:
67+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
"""
2+
This code was generated by
3+
4+
SENDGRID-OAI-GENERATOR
5+
6+
Twilio SendGrid Templates API
7+
The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts.
8+
9+
NOTE: This class is auto generated by OpenAPI Generator.
10+
https://openapi-generator.tech
11+
Do not edit the class manually.
12+
"""
13+
14+
import json
15+
import warnings
16+
from typing import Any, Dict, List, Optional, Tuple, Union
17+
from typing_extensions import Annotated
18+
from sendgrid.base import values
19+
from sendgrid.exceptions import ApiException
20+
from sendgrid.http.request import Request
21+
from sendgrid.http.response import ApiResponse
22+
23+
from pydantic import Field, StrictStr
24+
from typing import Optional
25+
from typing_extensions import Annotated
26+
from sendgrid.rest.api.templates.v3.models.create_template_request import CreateTemplateRequest
27+
from sendgrid.rest.api.templates.v3.models.transactional_template import TransactionalTemplate
28+
29+
class CreateTemplate:
30+
def __init__(self, client) -> None:
31+
self.client = client
32+
33+
def send(
34+
self,
35+
on_behalf_of: Optional[str] = None,
36+
create_template_request: Optional[CreateTemplateRequest] = None,
37+
38+
):
39+
path='/v3/templates'
40+
41+
headers = values.of(
42+
{
43+
'on-behalf-of': on_behalf_of,
44+
})
45+
headers["Content-Type"] = "application/json"
46+
data = None
47+
if create_template_request:
48+
data = create_template_request.to_dict()
49+
request = Request(
50+
method='POST',
51+
url=path,
52+
data=data,
53+
headers=headers
54+
)
55+
response=self.client.send(request)
56+
if response is None:
57+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
58+
59+
if response.text:
60+
text = json.loads(response.text)
61+
else:
62+
text = ""
63+
if response.is_success():
64+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
65+
else:
66+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
"""
2+
This code was generated by
3+
4+
SENDGRID-OAI-GENERATOR
5+
6+
Twilio SendGrid Templates API
7+
The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts.
8+
9+
NOTE: This class is auto generated by OpenAPI Generator.
10+
https://openapi-generator.tech
11+
Do not edit the class manually.
12+
"""
13+
14+
import json
15+
import warnings
16+
from typing import Any, Dict, List, Optional, Tuple, Union
17+
from typing_extensions import Annotated
18+
from sendgrid.base import values
19+
from sendgrid.exceptions import ApiException
20+
from sendgrid.http.request import Request
21+
from sendgrid.http.response import ApiResponse
22+
23+
from pydantic import Field, StrictStr
24+
from typing import Optional
25+
from typing_extensions import Annotated
26+
from sendgrid.rest.api.templates.v3.models.transactional_template_version_create import TransactionalTemplateVersionCreate
27+
from sendgrid.rest.api.templates.v3.models.transactional_template_version_output import TransactionalTemplateVersionOutput
28+
29+
class CreateTemplateVersion:
30+
def __init__(self, client) -> None:
31+
self.client = client
32+
33+
def send(
34+
self,
35+
template_id: str,
36+
on_behalf_of: Optional[str] = None,
37+
transactional_template_version_create: Optional[TransactionalTemplateVersionCreate] = None,
38+
39+
):
40+
path='/v3/templates/{template_id}/versions'
41+
path = path.format(
42+
template_id=template_id,
43+
)
44+
45+
headers = values.of(
46+
{
47+
'on-behalf-of': on_behalf_of,
48+
})
49+
headers["Content-Type"] = "application/json"
50+
data = None
51+
if transactional_template_version_create:
52+
data = transactional_template_version_create.to_dict()
53+
request = Request(
54+
method='POST',
55+
url=path,
56+
data=data,
57+
headers=headers
58+
)
59+
response=self.client.send(request)
60+
if response is None:
61+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
62+
63+
if response.text:
64+
text = json.loads(response.text)
65+
else:
66+
text = ""
67+
if response.is_success():
68+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
69+
else:
70+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
"""
2+
This code was generated by
3+
4+
SENDGRID-OAI-GENERATOR
5+
6+
Twilio SendGrid Templates API
7+
The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts.
8+
9+
NOTE: This class is auto generated by OpenAPI Generator.
10+
https://openapi-generator.tech
11+
Do not edit the class manually.
12+
"""
13+
14+
import json
15+
import warnings
16+
from typing import Any, Dict, List, Optional, Tuple, Union
17+
from typing_extensions import Annotated
18+
from sendgrid.base import values
19+
from sendgrid.exceptions import ApiException
20+
from sendgrid.http.request import Request
21+
from sendgrid.http.response import ApiResponse
22+
23+
from pydantic import Field, StrictStr
24+
from typing import Optional
25+
from typing_extensions import Annotated
26+
27+
class DeleteTemplate:
28+
def __init__(self, client) -> None:
29+
self.client = client
30+
31+
def send(
32+
self,
33+
template_id: str,
34+
on_behalf_of: Optional[str] = None,
35+
36+
):
37+
path='/v3/templates/{template_id}'
38+
path = path.format(
39+
template_id=template_id,
40+
)
41+
42+
headers = values.of(
43+
{
44+
'on-behalf-of': on_behalf_of,
45+
})
46+
data = None
47+
request = Request(
48+
method='DELETE',
49+
url=path,
50+
data=data,
51+
headers=headers
52+
)
53+
response=self.client.send(request)
54+
if response is None:
55+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
56+
57+
if response.text:
58+
text = json.loads(response.text)
59+
else:
60+
text = ""
61+
if response.is_success():
62+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
63+
else:
64+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
"""
2+
This code was generated by
3+
4+
SENDGRID-OAI-GENERATOR
5+
6+
Twilio SendGrid Templates API
7+
The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts.
8+
9+
NOTE: This class is auto generated by OpenAPI Generator.
10+
https://openapi-generator.tech
11+
Do not edit the class manually.
12+
"""
13+
14+
import json
15+
import warnings
16+
from typing import Any, Dict, List, Optional, Tuple, Union
17+
from typing_extensions import Annotated
18+
from sendgrid.base import values
19+
from sendgrid.exceptions import ApiException
20+
from sendgrid.http.request import Request
21+
from sendgrid.http.response import ApiResponse
22+
23+
from pydantic import Field, StrictStr
24+
from typing import Optional
25+
from typing_extensions import Annotated
26+
27+
class DeleteTemplateVersion:
28+
def __init__(self, client) -> None:
29+
self.client = client
30+
31+
def send(
32+
self,
33+
template_id: str,
34+
version_id: str,
35+
on_behalf_of: Optional[str] = None,
36+
37+
):
38+
path='/v3/templates/{template_id}/versions/{version_id}'
39+
path = path.format(
40+
template_id=template_id,
41+
version_id=version_id,
42+
)
43+
44+
headers = values.of(
45+
{
46+
'on-behalf-of': on_behalf_of,
47+
})
48+
data = None
49+
request = Request(
50+
method='DELETE',
51+
url=path,
52+
data=data,
53+
headers=headers
54+
)
55+
response=self.client.send(request)
56+
if response is None:
57+
raise ApiException(error="CreateAlert creation failed: Unable to connect to server")
58+
59+
if response.text:
60+
text = json.loads(response.text)
61+
else:
62+
text = ""
63+
if response.is_success():
64+
return ApiResponse(status_code=response.status_code, model=text, headers=response.headers)
65+
else:
66+
raise ApiException(status_code=response.status_code, error=text, headers=response.headers)

0 commit comments

Comments
 (0)