Skip to content
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
2 changes: 1 addition & 1 deletion .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"skip_formatting": false,
"enable_wire_tests": true
},
"sdkVersion": "13.1.0"
"sdkVersion": "13.2.0"
}
10 changes: 10 additions & 0 deletions .fern/replay.lock

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

3 changes: 3 additions & 0 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ README.md
src/samsara/utils/webhooks_helper.py
tests/utils/test_webhooks_helper.py
changelog.md
.fern/replay.lock
.fern/replay.yml
.gitattributes
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.fern/replay.lock linguist-generated=true
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "samsara-api"
version = "13.1.0"
version = "13.2.0"
description = ""
readme = "README.md"
authors = []
Expand Down
45 changes: 43 additions & 2 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -8665,7 +8665,6 @@ client.beta_ap_is.patch_safety_events_v_2_batch(
safety_event_ids=[
"bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590",
"bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590",
"bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590",
],
)

Expand Down Expand Up @@ -26631,6 +26630,14 @@ client.issues.patch_issue(
<dl>
<dd>

**description:** `typing.Optional[str]` — Description of the issue. Requires the `issue-api-media-attachment-endpoints` feature.

</dd>
</dl>

<dl>
<dd>

**due_date:** `typing.Optional[dt.datetime]` — Due date of the issue. UTC timestamp in RFC 3339 format.

</dd>
Expand All @@ -26647,6 +26654,24 @@ client.issues.patch_issue(
<dl>
<dd>

**media:** `typing.Optional[
typing.Sequence[FormSubmissionRequestMediaItemObjectRequestBody]
]` — Media items to append to the issue. Requires the `issue-api-media-attachment-endpoints` feature.

</dd>
</dl>

<dl>
<dd>

**priority:** `typing.Optional[IssuesPatchIssueRequestBodyPriority]` — Priority of the issue. Requires the `issue-api-media-attachment-endpoints` feature. Valid values: `low`, `medium`, `high`

</dd>
</dl>

<dl>
<dd>

**status:** `typing.Optional[IssuesPatchIssueRequestBodyStatus]` — Status of the issue. Valid values: `open`, `inProgress`, `resolved`, `dismissed`

</dd>
Expand All @@ -26655,6 +26680,14 @@ client.issues.patch_issue(
<dl>
<dd>

**title:** `typing.Optional[str]` — Title of the issue. Requires the `issue-api-media-attachment-endpoints` feature.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
Expand Down Expand Up @@ -26756,7 +26789,15 @@ client.issues.get_issues_stream(
<dl>
<dd>

**asset_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — A comma-separated list containing up to 50 asset IDs to filter issues on. Issues with untracked assets can also be included by passing the value: 'untracked'.
**asset_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — A comma-separated list containing up to 50 asset IDs to filter issues on. Each value can be a Samsara asset ID, an [external ID](https://developers.samsara.com/docs/external-ids) (`key:value` format), or the literal `untracked` to include issues with untracked assets.

</dd>
</dl>

<dl>
<dd>

**asset_external_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — A comma-separated list containing up to 50 asset [external IDs](https://developers.samsara.com/docs/external-ids) (`key:value` format) to filter issues on.

</dd>
</dl>
Expand Down
4 changes: 3 additions & 1 deletion src/samsara/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3888,7 +3888,7 @@
GetIftaVehicleReportsRequestMonth,
GetIftaVehicleReportsRequestQuarter,
)
from .issues import IssuesPatchIssueRequestBodyStatus
from .issues import IssuesPatchIssueRequestBodyPriority, IssuesPatchIssueRequestBodyStatus
from .legacy_ap_is import GetDriversVehicleAssignmentsRequestDriverActivationStatus
from .live_sharing_links import GetLiveSharingLinksRequestType, LiveSharingLinksCreateLiveSharingLinkRequestBodyType
from .maintenance import CreateDvirRequestSafetyStatus, CreateDvirRequestType
Expand Down Expand Up @@ -5759,6 +5759,7 @@
"IssuesPatchIssueMethodNotAllowedErrorResponseBody": ".types",
"IssuesPatchIssueNotFoundErrorResponseBody": ".types",
"IssuesPatchIssueNotImplementedErrorResponseBody": ".types",
"IssuesPatchIssueRequestBodyPriority": ".issues",
"IssuesPatchIssueRequestBodyStatus": ".issues",
"IssuesPatchIssueResponseBody": ".types",
"IssuesPatchIssueServiceUnavailableErrorResponseBody": ".types",
Expand Down Expand Up @@ -9693,6 +9694,7 @@ def __dir__():
"IssuesPatchIssueMethodNotAllowedErrorResponseBody",
"IssuesPatchIssueNotFoundErrorResponseBody",
"IssuesPatchIssueNotImplementedErrorResponseBody",
"IssuesPatchIssueRequestBodyPriority",
"IssuesPatchIssueRequestBodyStatus",
"IssuesPatchIssueResponseBody",
"IssuesPatchIssueServiceUnavailableErrorResponseBody",
Expand Down
2 changes: 0 additions & 2 deletions src/samsara/beta_ap_is/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3881,7 +3881,6 @@ def patch_safety_events_v_2_batch(
safety_event_ids=[
"bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590",
"bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590",
"bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590",
],
)
"""
Expand Down Expand Up @@ -8134,7 +8133,6 @@ async def main() -> None:
safety_event_ids=[
"bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590",
"bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590",
"bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590",
],
)

Expand Down
4 changes: 2 additions & 2 deletions src/samsara/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "samsara-api/13.1.0",
"User-Agent": "samsara-api/13.2.0",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
"X-Fern-SDK-Name": "samsara-api",
"X-Fern-SDK-Version": "13.1.0",
"X-Fern-SDK-Version": "13.2.0",
**(self.get_custom_headers() or {}),
}
headers["Authorization"] = f"Bearer {self._get_token()}"
Expand Down
9 changes: 6 additions & 3 deletions src/samsara/issues/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
from importlib import import_module

if typing.TYPE_CHECKING:
from .types import IssuesPatchIssueRequestBodyStatus
_dynamic_imports: typing.Dict[str, str] = {"IssuesPatchIssueRequestBodyStatus": ".types"}
from .types import IssuesPatchIssueRequestBodyPriority, IssuesPatchIssueRequestBodyStatus
_dynamic_imports: typing.Dict[str, str] = {
"IssuesPatchIssueRequestBodyPriority": ".types",
"IssuesPatchIssueRequestBodyStatus": ".types",
}


def __getattr__(attr_name: str) -> typing.Any:
Expand All @@ -31,4 +34,4 @@ def __dir__():
return sorted(lazy_attrs)


__all__ = ["IssuesPatchIssueRequestBodyStatus"]
__all__ = ["IssuesPatchIssueRequestBodyPriority", "IssuesPatchIssueRequestBodyStatus"]
58 changes: 56 additions & 2 deletions src/samsara/issues/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.form_submission_request_media_item_object_request_body import (
FormSubmissionRequestMediaItemObjectRequestBody,
)
from ..types.issues_get_issues_response_body import IssuesGetIssuesResponseBody
from ..types.issues_get_issues_stream_response_body import IssuesGetIssuesStreamResponseBody
from ..types.issues_patch_issue_response_body import IssuesPatchIssueResponseBody
from ..types.patch_issue_request_body_assigned_to_request_body import PatchIssueRequestBodyAssignedToRequestBody
from .raw_client import AsyncRawIssuesClient, RawIssuesClient
from .types.issues_patch_issue_request_body_priority import IssuesPatchIssueRequestBodyPriority
from .types.issues_patch_issue_request_body_status import IssuesPatchIssueRequestBodyStatus

# this is used as the default value for optional parameters
Expand Down Expand Up @@ -81,9 +85,13 @@ def patch_issue(
*,
id: str,
assigned_to: typing.Optional[PatchIssueRequestBodyAssignedToRequestBody] = OMIT,
description: typing.Optional[str] = OMIT,
due_date: typing.Optional[dt.datetime] = OMIT,
external_ids: typing.Optional[typing.Dict[str, str]] = OMIT,
media: typing.Optional[typing.Sequence[FormSubmissionRequestMediaItemObjectRequestBody]] = OMIT,
priority: typing.Optional[IssuesPatchIssueRequestBodyPriority] = OMIT,
status: typing.Optional[IssuesPatchIssueRequestBodyStatus] = OMIT,
title: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> IssuesPatchIssueResponseBody:
"""
Expand All @@ -103,15 +111,27 @@ def patch_issue(

assigned_to : typing.Optional[PatchIssueRequestBodyAssignedToRequestBody]

description : typing.Optional[str]
Description of the issue. Requires the `issue-api-media-attachment-endpoints` feature.

due_date : typing.Optional[dt.datetime]
Due date of the issue. UTC timestamp in RFC 3339 format.

external_ids : typing.Optional[typing.Dict[str, str]]
A map of external ids

media : typing.Optional[typing.Sequence[FormSubmissionRequestMediaItemObjectRequestBody]]
Media items to append to the issue. Requires the `issue-api-media-attachment-endpoints` feature.

priority : typing.Optional[IssuesPatchIssueRequestBodyPriority]
Priority of the issue. Requires the `issue-api-media-attachment-endpoints` feature. Valid values: `low`, `medium`, `high`

status : typing.Optional[IssuesPatchIssueRequestBodyStatus]
Status of the issue. Valid values: `open`, `inProgress`, `resolved`, `dismissed`

title : typing.Optional[str]
Title of the issue. Requires the `issue-api-media-attachment-endpoints` feature.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -134,9 +154,13 @@ def patch_issue(
_response = self._raw_client.patch_issue(
id=id,
assigned_to=assigned_to,
description=description,
due_date=due_date,
external_ids=external_ids,
media=media,
priority=priority,
status=status,
title=title,
request_options=request_options,
)
return _response.data
Expand All @@ -149,6 +173,7 @@ def get_issues_stream(
after: typing.Optional[str] = None,
status: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
asset_external_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
include: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
assigned_to_route_stop_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
request_options: typing.Optional[RequestOptions] = None,
Expand Down Expand Up @@ -178,7 +203,10 @@ def get_issues_stream(
A comma-separated list containing status values to filter issues on. Valid values: `open`, `inProgress`, `resolved`, `dismissed`

asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
A comma-separated list containing up to 50 asset IDs to filter issues on. Issues with untracked assets can also be included by passing the value: 'untracked'.
A comma-separated list containing up to 50 asset IDs to filter issues on. Each value can be a Samsara asset ID, an [external ID](https://developers.samsara.com/docs/external-ids) (`key:value` format), or the literal `untracked` to include issues with untracked assets.

asset_external_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
A comma-separated list containing up to 50 asset [external IDs](https://developers.samsara.com/docs/external-ids) (`key:value` format) to filter issues on.

include : typing.Optional[typing.Union[str, typing.Sequence[str]]]
A comma separated list of additional fields to include on requested objects. Valid values: `externalIds`
Expand Down Expand Up @@ -211,6 +239,7 @@ def get_issues_stream(
after=after,
status=status,
asset_ids=asset_ids,
asset_external_ids=asset_external_ids,
include=include,
assigned_to_route_stop_ids=assigned_to_route_stop_ids,
request_options=request_options,
Expand Down Expand Up @@ -291,9 +320,13 @@ async def patch_issue(
*,
id: str,
assigned_to: typing.Optional[PatchIssueRequestBodyAssignedToRequestBody] = OMIT,
description: typing.Optional[str] = OMIT,
due_date: typing.Optional[dt.datetime] = OMIT,
external_ids: typing.Optional[typing.Dict[str, str]] = OMIT,
media: typing.Optional[typing.Sequence[FormSubmissionRequestMediaItemObjectRequestBody]] = OMIT,
priority: typing.Optional[IssuesPatchIssueRequestBodyPriority] = OMIT,
status: typing.Optional[IssuesPatchIssueRequestBodyStatus] = OMIT,
title: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> IssuesPatchIssueResponseBody:
"""
Expand All @@ -313,15 +346,27 @@ async def patch_issue(

assigned_to : typing.Optional[PatchIssueRequestBodyAssignedToRequestBody]

description : typing.Optional[str]
Description of the issue. Requires the `issue-api-media-attachment-endpoints` feature.

due_date : typing.Optional[dt.datetime]
Due date of the issue. UTC timestamp in RFC 3339 format.

external_ids : typing.Optional[typing.Dict[str, str]]
A map of external ids

media : typing.Optional[typing.Sequence[FormSubmissionRequestMediaItemObjectRequestBody]]
Media items to append to the issue. Requires the `issue-api-media-attachment-endpoints` feature.

priority : typing.Optional[IssuesPatchIssueRequestBodyPriority]
Priority of the issue. Requires the `issue-api-media-attachment-endpoints` feature. Valid values: `low`, `medium`, `high`

status : typing.Optional[IssuesPatchIssueRequestBodyStatus]
Status of the issue. Valid values: `open`, `inProgress`, `resolved`, `dismissed`

title : typing.Optional[str]
Title of the issue. Requires the `issue-api-media-attachment-endpoints` feature.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -352,9 +397,13 @@ async def main() -> None:
_response = await self._raw_client.patch_issue(
id=id,
assigned_to=assigned_to,
description=description,
due_date=due_date,
external_ids=external_ids,
media=media,
priority=priority,
status=status,
title=title,
request_options=request_options,
)
return _response.data
Expand All @@ -367,6 +416,7 @@ async def get_issues_stream(
after: typing.Optional[str] = None,
status: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
asset_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
asset_external_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
include: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
assigned_to_route_stop_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
request_options: typing.Optional[RequestOptions] = None,
Expand Down Expand Up @@ -396,7 +446,10 @@ async def get_issues_stream(
A comma-separated list containing status values to filter issues on. Valid values: `open`, `inProgress`, `resolved`, `dismissed`

asset_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
A comma-separated list containing up to 50 asset IDs to filter issues on. Issues with untracked assets can also be included by passing the value: 'untracked'.
A comma-separated list containing up to 50 asset IDs to filter issues on. Each value can be a Samsara asset ID, an [external ID](https://developers.samsara.com/docs/external-ids) (`key:value` format), or the literal `untracked` to include issues with untracked assets.

asset_external_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
A comma-separated list containing up to 50 asset [external IDs](https://developers.samsara.com/docs/external-ids) (`key:value` format) to filter issues on.

include : typing.Optional[typing.Union[str, typing.Sequence[str]]]
A comma separated list of additional fields to include on requested objects. Valid values: `externalIds`
Expand Down Expand Up @@ -437,6 +490,7 @@ async def main() -> None:
after=after,
status=status,
asset_ids=asset_ids,
asset_external_ids=asset_external_ids,
include=include,
assigned_to_route_stop_ids=assigned_to_route_stop_ids,
request_options=request_options,
Expand Down
Loading
Loading