Class SeamHttpConnectedAccounts

Constructors

Properties

client: AxiosInstance
defaults: Required<SeamHttpRequestOptions>
ltsVersion: "1.0.0" = seamApiLtsVersion
ltsVersion: string = seamApiLtsVersion

Methods

  • Parameters

    • Optionalparams: {}

      Returns SeamHttpRequest<void, undefined>

    • Parameters

      Returns SeamHttpRequest<SetNonNullable<Required<{
          connected_account: {
              account_type?: string;
              account_type_display_name: string;
              automatically_manage_new_devices: boolean;
              connected_account_id?: string;
              created_at?: string;
              custom_metadata: Record<string, string | boolean>;
              errors: (
                  | {
                      created_at: string;
                      error_code: "account_disconnected";
                      is_bridge_error?: boolean;
                      is_connected_account_error?: boolean;
                      message: string;
                  }
                  | {
                      created_at: string;
                      error_code: "invalid_credentials";
                      is_bridge_error?: boolean;
                      is_connected_account_error?: boolean;
                      message: string;
                  }
                  | {
                      created_at: string;
                      error_code: "bridge_disconnected";
                      is_bridge_error?: boolean;
                      is_connected_account_error?: boolean;
                      message: string;
                  }
                  | {
                      created_at: string;
                      error_code: "salto_ks_subscription_limit_exceeded";
                      is_bridge_error?: boolean;
                      is_connected_account_error?: boolean;
                      message: string;
                      salto_ks_metadata: {
                          sites: {
                              site_id: ...;
                              site_name: ...;
                              site_user_subscription_limit: ...;
                              subscribed_site_user_count: ...;
                          }[];
                      };
                  })[];
              user_identifier?: {
                  api_url?: string;
                  email?: string;
                  exclusive?: boolean;
                  phone?: string;
                  username?: string;
              };
              warnings: ({
                  created_at: string;
                  message: string;
                  warning_code: "scheduled_maintenance_window";
              } | {
                  created_at: string;
                  message: string;
                  warning_code: "unknown_issue_with_connected_account";
              } | {
                  created_at: string;
                  message: string;
                  salto_ks_metadata: {
                      sites: {
                          site_id: ...;
                          site_name: ...;
                          site_user_subscription_limit: ...;
                          subscribed_site_user_count: ...;
                      }[];
                  };
                  warning_code: "salto_ks_subscription_limit_almost_reached";
              })[];
          };
      }>, "connected_account">, "connected_account">

    • Parameters

      • Optionalparams: {
            custom_metadata_has?: Record<string, string | boolean>;
            customer_ids?: string[];
            limit?: number;
            page_cursor?: null | string;
            user_identifier_key?: string;
        }
        • Optionalcustom_metadata_has?: Record<string, string | boolean>

          Custom metadata pairs by which you want to filter connected accounts. Returns connected accounts with custom_metadata that contains all of the provided key:value pairs.

        • Optionalcustomer_ids?: string[]
        • Optionallimit?: number

          Maximum number of records to return per page.

        • Optionalpage_cursor?: null | string

          Identifies the specific page of results to return, obtained from the previous page's next_page_cursor.

        • Optionaluser_identifier_key?: string

          Your user ID for the user by which you want to filter connected accounts.

      Returns SeamHttpRequest<SetNonNullable<Required<{
          connected_accounts: {
              account_type?: string;
              account_type_display_name: string;
              automatically_manage_new_devices: boolean;
              connected_account_id?: string;
              created_at?: string;
              custom_metadata: Record<string, string | boolean>;
              errors: (
                  | {
                      created_at: string;
                      error_code: "account_disconnected";
                      is_bridge_error?: boolean;
                      is_connected_account_error?: boolean;
                      message: string;
                  }
                  | {
                      created_at: string;
                      error_code: "invalid_credentials";
                      is_bridge_error?: boolean;
                      is_connected_account_error?: boolean;
                      message: string;
                  }
                  | {
                      created_at: string;
                      error_code: "bridge_disconnected";
                      is_bridge_error?: boolean;
                      is_connected_account_error?: boolean;
                      message: string;
                  }
                  | {
                      created_at: string;
                      error_code: "salto_ks_subscription_limit_exceeded";
                      is_bridge_error?: boolean;
                      is_connected_account_error?: boolean;
                      message: string;
                      salto_ks_metadata: {
                          sites: (...)[];
                      };
                  })[];
              user_identifier?: {
                  api_url?: string;
                  email?: string;
                  exclusive?: boolean;
                  phone?: string;
                  username?: string;
              };
              warnings: ({
                  created_at: string;
                  message: string;
                  warning_code: "scheduled_maintenance_window";
              } | {
                  created_at: string;
                  message: string;
                  warning_code: "unknown_issue_with_connected_account";
              } | {
                  created_at: string;
                  message: string;
                  salto_ks_metadata: {
                      sites: (...)[];
                  };
                  warning_code: "salto_ks_subscription_limit_almost_reached";
              })[];
          }[];
          pagination: {
              has_next_page: boolean;
              next_page_cursor: null | string;
              next_page_url: null | string;
          };
      }>, "pagination" | "connected_accounts">, "connected_accounts">

    • Parameters

      • Optionalbody: {
            connected_account_id: string;
        }
        • connected_account_id: string

          ID of the connected account that you want to sync.

      Returns SeamHttpRequest<void, undefined>

    • Parameters

      • Optionalbody: {
            automatically_manage_new_devices?: boolean;
            connected_account_id: string;
            custom_metadata?: Record<string, null | string | boolean>;
        }
        • Optionalautomatically_manage_new_devices?: boolean

          Indicates whether newly-added devices should appear as managed devices.

        • connected_account_id: string

          ID of the connected account that you want to update.

        • Optionalcustom_metadata?: Record<string, null | string | boolean>

          Custom metadata that you want to associate with the connected account. Supports up to 50 JSON key:value pairs. Adding custom metadata to a connected account enables you to store custom information, like customer details or internal IDs from your application. Then, you can filter connected accounts by the desired metadata.

      Returns SeamHttpRequest<void, undefined>

    • Parameters

      • clientSessionToken: string

      Returns Promise<void>