Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Apr 3, 2024
1 parent 4760dd2 commit fdf44c7
Show file tree
Hide file tree
Showing 15 changed files with 800 additions and 68 deletions.
17 changes: 9 additions & 8 deletions acs/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ type CredentialsAssignRequest struct {
}

type CredentialsCreateRequest struct {
AcsUserId string `json:"acs_user_id" url:"acs_user_id"`
AccessMethod CredentialsCreateRequestAccessMethod `json:"access_method,omitempty" url:"access_method,omitempty"`
Code *string `json:"code,omitempty" url:"code,omitempty"`
IsMultiPhoneSyncCredential *bool `json:"is_multi_phone_sync_credential,omitempty" url:"is_multi_phone_sync_credential,omitempty"`
ExternalType *string `json:"external_type,omitempty" url:"external_type,omitempty"`
VisionlineMetadata *CredentialsCreateRequestVisionlineMetadata `json:"visionline_metadata,omitempty" url:"visionline_metadata,omitempty"`
StartsAt *time.Time `json:"starts_at,omitempty" url:"starts_at,omitempty"`
EndsAt *time.Time `json:"ends_at,omitempty" url:"ends_at,omitempty"`
CredentialManagerAcsSystemId *string `json:"credential_manager_acs_system_id,omitempty" url:"credential_manager_acs_system_id,omitempty"`
AcsUserId string `json:"acs_user_id" url:"acs_user_id"`
AccessMethod CredentialsCreateRequestAccessMethod `json:"access_method,omitempty" url:"access_method,omitempty"`
Code *string `json:"code,omitempty" url:"code,omitempty"`
IsMultiPhoneSyncCredential *bool `json:"is_multi_phone_sync_credential,omitempty" url:"is_multi_phone_sync_credential,omitempty"`
AllowedAcsEntranceIds []string `json:"allowed_acs_entrance_ids,omitempty" url:"allowed_acs_entrance_ids,omitempty"`
VisionlineMetadata *CredentialsCreateRequestVisionlineMetadata `json:"visionline_metadata,omitempty" url:"visionline_metadata,omitempty"`
StartsAt *time.Time `json:"starts_at,omitempty" url:"starts_at,omitempty"`
EndsAt *time.Time `json:"ends_at,omitempty" url:"ends_at,omitempty"`
}

func (c *CredentialsCreateRequest) UnmarshalJSON(data []byte) error {
Expand Down
99 changes: 99 additions & 0 deletions acs/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,7 @@ type EntrancesGetResponseAcsEntrance struct {
DisplayName string `json:"display_name" url:"display_name"`
AcsSystemId string `json:"acs_system_id" url:"acs_system_id"`
CreatedAt time.Time `json:"created_at" url:"created_at"`
LatchMetadata *EntrancesGetResponseAcsEntranceLatchMetadata `json:"latch_metadata,omitempty" url:"latch_metadata,omitempty"`
VisionlineMetadata *EntrancesGetResponseAcsEntranceVisionlineMetadata `json:"visionline_metadata,omitempty" url:"visionline_metadata,omitempty"`

_rawJSON json.RawMessage
Expand Down Expand Up @@ -1441,6 +1442,38 @@ func (e *EntrancesGetResponseAcsEntrance) String() string {
return fmt.Sprintf("%#v", e)
}

type EntrancesGetResponseAcsEntranceLatchMetadata struct {
AccessibilityType string `json:"accessibility_type" url:"accessibility_type"`
Name string `json:"name" url:"name"`
Type string `json:"type" url:"type"`
IsConnected bool `json:"is_connected" url:"is_connected"`

_rawJSON json.RawMessage
}

func (e *EntrancesGetResponseAcsEntranceLatchMetadata) UnmarshalJSON(data []byte) error {
type unmarshaler EntrancesGetResponseAcsEntranceLatchMetadata
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*e = EntrancesGetResponseAcsEntranceLatchMetadata(value)
e._rawJSON = json.RawMessage(data)
return nil
}

func (e *EntrancesGetResponseAcsEntranceLatchMetadata) String() string {
if len(e._rawJSON) > 0 {
if value, err := core.StringifyJSON(e._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(e); err == nil {
return value
}
return fmt.Sprintf("%#v", e)
}

type EntrancesGetResponseAcsEntranceVisionlineMetadata struct {
DoorName string `json:"door_name" url:"door_name"`
DoorCategory EntrancesGetResponseAcsEntranceVisionlineMetadataDoorCategory `json:"door_category,omitempty" url:"door_category,omitempty"`
Expand Down Expand Up @@ -1771,6 +1804,7 @@ type EntrancesListResponseAcsEntrancesItem struct {
DisplayName string `json:"display_name" url:"display_name"`
AcsSystemId string `json:"acs_system_id" url:"acs_system_id"`
CreatedAt time.Time `json:"created_at" url:"created_at"`
LatchMetadata *EntrancesListResponseAcsEntrancesItemLatchMetadata `json:"latch_metadata,omitempty" url:"latch_metadata,omitempty"`
VisionlineMetadata *EntrancesListResponseAcsEntrancesItemVisionlineMetadata `json:"visionline_metadata,omitempty" url:"visionline_metadata,omitempty"`

_rawJSON json.RawMessage
Expand Down Expand Up @@ -1817,6 +1851,38 @@ func (e *EntrancesListResponseAcsEntrancesItem) String() string {
return fmt.Sprintf("%#v", e)
}

type EntrancesListResponseAcsEntrancesItemLatchMetadata struct {
AccessibilityType string `json:"accessibility_type" url:"accessibility_type"`
Name string `json:"name" url:"name"`
Type string `json:"type" url:"type"`
IsConnected bool `json:"is_connected" url:"is_connected"`

_rawJSON json.RawMessage
}

func (e *EntrancesListResponseAcsEntrancesItemLatchMetadata) UnmarshalJSON(data []byte) error {
type unmarshaler EntrancesListResponseAcsEntrancesItemLatchMetadata
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*e = EntrancesListResponseAcsEntrancesItemLatchMetadata(value)
e._rawJSON = json.RawMessage(data)
return nil
}

func (e *EntrancesListResponseAcsEntrancesItemLatchMetadata) String() string {
if len(e._rawJSON) > 0 {
if value, err := core.StringifyJSON(e._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(e); err == nil {
return value
}
return fmt.Sprintf("%#v", e)
}

type EntrancesListResponseAcsEntrancesItemVisionlineMetadata struct {
DoorName string `json:"door_name" url:"door_name"`
DoorCategory EntrancesListResponseAcsEntrancesItemVisionlineMetadataDoorCategory `json:"door_category,omitempty" url:"door_category,omitempty"`
Expand Down Expand Up @@ -1939,6 +2005,7 @@ type UsersListAccessibleEntrancesResponseAcsEntrancesItem struct {
DisplayName string `json:"display_name" url:"display_name"`
AcsSystemId string `json:"acs_system_id" url:"acs_system_id"`
CreatedAt time.Time `json:"created_at" url:"created_at"`
LatchMetadata *UsersListAccessibleEntrancesResponseAcsEntrancesItemLatchMetadata `json:"latch_metadata,omitempty" url:"latch_metadata,omitempty"`
VisionlineMetadata *UsersListAccessibleEntrancesResponseAcsEntrancesItemVisionlineMetadata `json:"visionline_metadata,omitempty" url:"visionline_metadata,omitempty"`

_rawJSON json.RawMessage
Expand Down Expand Up @@ -1985,6 +2052,38 @@ func (u *UsersListAccessibleEntrancesResponseAcsEntrancesItem) String() string {
return fmt.Sprintf("%#v", u)
}

type UsersListAccessibleEntrancesResponseAcsEntrancesItemLatchMetadata struct {
AccessibilityType string `json:"accessibility_type" url:"accessibility_type"`
Name string `json:"name" url:"name"`
Type string `json:"type" url:"type"`
IsConnected bool `json:"is_connected" url:"is_connected"`

_rawJSON json.RawMessage
}

func (u *UsersListAccessibleEntrancesResponseAcsEntrancesItemLatchMetadata) UnmarshalJSON(data []byte) error {
type unmarshaler UsersListAccessibleEntrancesResponseAcsEntrancesItemLatchMetadata
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*u = UsersListAccessibleEntrancesResponseAcsEntrancesItemLatchMetadata(value)
u._rawJSON = json.RawMessage(data)
return nil
}

func (u *UsersListAccessibleEntrancesResponseAcsEntrancesItemLatchMetadata) String() string {
if len(u._rawJSON) > 0 {
if value, err := core.StringifyJSON(u._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(u); err == nil {
return value
}
return fmt.Sprintf("%#v", u)
}

type UsersListAccessibleEntrancesResponseAcsEntrancesItemVisionlineMetadata struct {
DoorName string `json:"door_name" url:"door_name"`
DoorCategory UsersListAccessibleEntrancesResponseAcsEntrancesItemVisionlineMetadataDoorCategory `json:"door_category,omitempty" url:"door_category,omitempty"`
Expand Down
8 changes: 6 additions & 2 deletions acs/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ type UsersCreateRequest struct {
UserIdentityId *string `json:"user_identity_id,omitempty" url:"user_identity_id,omitempty"`
AccessSchedule *UsersCreateRequestAccessSchedule `json:"access_schedule,omitempty" url:"access_schedule,omitempty"`
FullName *string `json:"full_name,omitempty" url:"full_name,omitempty"`
// Deprecated: use email_address.
// ---
// deprecated: use email_address.
// ---
Email *string `json:"email,omitempty" url:"email,omitempty"`
PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"`
Expand Down Expand Up @@ -494,7 +496,9 @@ type UsersUpdateRequest struct {
AccessSchedule *UsersUpdateRequestAccessSchedule `json:"access_schedule,omitempty" url:"access_schedule,omitempty"`
AcsUserId string `json:"acs_user_id" url:"acs_user_id"`
FullName *string `json:"full_name,omitempty" url:"full_name,omitempty"`
// Deprecated: use email_address.
// ---
// deprecated: use email_address.
// ---
Email *string `json:"email,omitempty" url:"email,omitempty"`
PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"`
Expand Down
9 changes: 6 additions & 3 deletions connect_webviews.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ const (
AcceptedProviderAssaAbloyCredentialService AcceptedProvider = "assa_abloy_credential_service"
AcceptedProviderSeamBridge AcceptedProvider = "seam_bridge"
AcceptedProviderTedee AcceptedProvider = "tedee"
AcceptedProviderHoneywell AcceptedProvider = "honeywell"
AcceptedProviderHoneywellResideo AcceptedProvider = "honeywell_resideo"
AcceptedProviderLatch AcceptedProvider = "latch"
AcceptedProviderYaleAccess AcceptedProvider = "yale_access"
AcceptedProviderHidCm AcceptedProvider = "hid_cm"
AcceptedProviderGoogleNest AcceptedProvider = "google_nest"
Expand Down Expand Up @@ -149,8 +150,10 @@ func NewAcceptedProviderFromString(s string) (AcceptedProvider, error) {
return AcceptedProviderSeamBridge, nil
case "tedee":
return AcceptedProviderTedee, nil
case "honeywell":
return AcceptedProviderHoneywell, nil
case "honeywell_resideo":
return AcceptedProviderHoneywellResideo, nil
case "latch":
return AcceptedProviderLatch, nil
case "yale_access":
return AcceptedProviderYaleAccess, nil
case "hid_cm":
Expand Down
2 changes: 1 addition & 1 deletion core/request_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (r *RequestOptions) cloneHeader() http.Header {
headers := r.HTTPHeader.Clone()
headers.Set("X-Fern-Language", "Go")
headers.Set("X-Fern-SDK-Name", "github.com/seamapi/go")
headers.Set("X-Fern-SDK-Version", "v0.2.16")
headers.Set("X-Fern-SDK-Version", "v0.3.0")
return headers
}

Expand Down
58 changes: 58 additions & 0 deletions devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ type DevicesListRequest struct {
CreatedBefore *time.Time `json:"created_before,omitempty" url:"created_before,omitempty"`
UserIdentifierKey *string `json:"user_identifier_key,omitempty" url:"user_identifier_key,omitempty"`
CustomMetadataHas map[string]*DevicesListRequestCustomMetadataHasValue `json:"custom_metadata_has,omitempty" url:"custom_metadata_has,omitempty"`
IncludeIf []DevicesListRequestIncludeIfItem `json:"include_if,omitempty" url:"include_if,omitempty"`
ExcludeIf []DevicesListRequestExcludeIfItem `json:"exclude_if,omitempty" url:"exclude_if,omitempty"`
}

func (d *DevicesListRequest) UnmarshalJSON(data []byte) error {
Expand Down Expand Up @@ -221,6 +223,62 @@ func (d *DevicesListRequestCustomMetadataHasValue) Accept(visitor DevicesListReq
}
}

type DevicesListRequestExcludeIfItem string

const (
DevicesListRequestExcludeIfItemCanRemotelyUnlock DevicesListRequestExcludeIfItem = "can_remotely_unlock"
DevicesListRequestExcludeIfItemCanRemotelyLock DevicesListRequestExcludeIfItem = "can_remotely_lock"
DevicesListRequestExcludeIfItemCanProgramOnlineAccessCodes DevicesListRequestExcludeIfItem = "can_program_online_access_codes"
DevicesListRequestExcludeIfItemCanSimulateRemoval DevicesListRequestExcludeIfItem = "can_simulate_removal"
)

func NewDevicesListRequestExcludeIfItemFromString(s string) (DevicesListRequestExcludeIfItem, error) {
switch s {
case "can_remotely_unlock":
return DevicesListRequestExcludeIfItemCanRemotelyUnlock, nil
case "can_remotely_lock":
return DevicesListRequestExcludeIfItemCanRemotelyLock, nil
case "can_program_online_access_codes":
return DevicesListRequestExcludeIfItemCanProgramOnlineAccessCodes, nil
case "can_simulate_removal":
return DevicesListRequestExcludeIfItemCanSimulateRemoval, nil
}
var t DevicesListRequestExcludeIfItem
return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (d DevicesListRequestExcludeIfItem) Ptr() *DevicesListRequestExcludeIfItem {
return &d
}

type DevicesListRequestIncludeIfItem string

const (
DevicesListRequestIncludeIfItemCanRemotelyUnlock DevicesListRequestIncludeIfItem = "can_remotely_unlock"
DevicesListRequestIncludeIfItemCanRemotelyLock DevicesListRequestIncludeIfItem = "can_remotely_lock"
DevicesListRequestIncludeIfItemCanProgramOnlineAccessCodes DevicesListRequestIncludeIfItem = "can_program_online_access_codes"
DevicesListRequestIncludeIfItemCanSimulateRemoval DevicesListRequestIncludeIfItem = "can_simulate_removal"
)

func NewDevicesListRequestIncludeIfItemFromString(s string) (DevicesListRequestIncludeIfItem, error) {
switch s {
case "can_remotely_unlock":
return DevicesListRequestIncludeIfItemCanRemotelyUnlock, nil
case "can_remotely_lock":
return DevicesListRequestIncludeIfItemCanRemotelyLock, nil
case "can_program_online_access_codes":
return DevicesListRequestIncludeIfItemCanProgramOnlineAccessCodes, nil
case "can_simulate_removal":
return DevicesListRequestIncludeIfItemCanSimulateRemoval, nil
}
var t DevicesListRequestIncludeIfItem
return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (d DevicesListRequestIncludeIfItem) Ptr() *DevicesListRequestIncludeIfItem {
return &d
}

type DevicesListResponse struct {
Devices []*Device `json:"devices,omitempty" url:"devices,omitempty"`
Ok bool `json:"ok" url:"ok"`
Expand Down
3 changes: 3 additions & 0 deletions devices/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
errors "errors"
seamapigo "github.com/seamapi/go"
core "github.com/seamapi/go/core"
simulate "github.com/seamapi/go/devices/simulate"
unmanaged "github.com/seamapi/go/devices/unmanaged"
option "github.com/seamapi/go/option"
io "io"
Expand All @@ -20,6 +21,7 @@ type Client struct {
caller *core.Caller
header http.Header

Simulate *simulate.Client
Unmanaged *unmanaged.Client
}

Expand All @@ -34,6 +36,7 @@ func NewClient(opts ...option.RequestOption) *Client {
},
),
header: options.ToHeader(),
Simulate: simulate.NewClient(opts...),
Unmanaged: unmanaged.NewClient(opts...),
}
}
Expand Down
42 changes: 42 additions & 0 deletions devices/simulate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// This file was auto-generated by Fern from our API Definition.

package devices

import (
json "encoding/json"
fmt "fmt"
core "github.com/seamapi/go/core"
)

type SimulateRemoveRequest struct {
DeviceId string `json:"device_id" url:"device_id"`
}

type SimulateRemoveResponse struct {
Ok bool `json:"ok" url:"ok"`

_rawJSON json.RawMessage
}

func (s *SimulateRemoveResponse) UnmarshalJSON(data []byte) error {
type unmarshaler SimulateRemoveResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*s = SimulateRemoveResponse(value)
s._rawJSON = json.RawMessage(data)
return nil
}

func (s *SimulateRemoveResponse) String() string {
if len(s._rawJSON) > 0 {
if value, err := core.StringifyJSON(s._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(s); err == nil {
return value
}
return fmt.Sprintf("%#v", s)
}
Loading

0 comments on commit fdf44c7

Please sign in to comment.