Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BaseAPI
    • DocumentsApi

Index

Constructors

constructor

  • new DocumentsApi(configuration?: Configuration): DocumentsApi
  • Parameters

    • configuration: Configuration = ...

    Returns DocumentsApi

Properties

Protected configuration

configuration: Configuration = ...

Methods

deleteDriverDocumentByIdAndDriverId

deleteDriverDocumentByIdAndDriverIdRaw

generateDocumentPdf

generateDocumentPdfRaw

getDocumentPdf

getDocumentPdfRaw

  • getDocumentPdfRaw(requestParameters: GetDocumentPdfRequest): Promise<ApiResponse<DocumentPdfQueryResponse>>

Protected request

  • request(context: RequestOpts): Promise<Response>
  • Parameters

    • context: RequestOpts

    Returns Promise<Response>

v1createDriverDocument

  • <n class="warning"> <i class="fa fa-exclamation-circle"> This endpoint is still on our legacy API. Create a driver document for the given driver. You can create a document in one of two states: "Required" or "Submitted": - Setting the document state to "Submitted" will submit the document on behalf of the driver. - Setting the document state to "Required" will create a pre-populated document for the driver to fill out in the Driver App. Populating document fields You populate a document's fields according to the document's document type. You can retrieve document types using the Fetch document types endpoint. You must populate a document's fields using the field labels and value types, and the fields must be listed in the exact same order that they appear in the document type. Omitting Field Values If you _omit a field's value_, Samsara will populate the field with a default value. (Note: you must still list the field in your request). For example, the following request omits the numberValue for the \"Number Field\". { \"documentTypeUuid\": \"79008acc-56d6-49f4-b5d2-4101ce4b497c\", \"fields\": [ { \"label\": \"Number Field\", \"valueType\": \"ValueType_Number\", } ] } Samsara will automatically populate the field with the default for number fields: 0. See the defaults for all field types below. > Note: The dateTimeValue for ValueType_DateTime fields cannot be omitted. If you'd like to populate this field with a default datetime value, you must submit \"dateTimeValue\": {} for that field. Default Field Values | Value Type | Field Name | Default value | | :--------- | :--------- | :------------ | | ValueType_Number | numberValue | 0 | | ValueType_String | stringValue | \"\" | | ValueType_Photo | photoValue | [] | | ValueType_MultipleChoice | multipleChoiceValue | [] | | ValueType_DateTime | dateTimeValue | {\"dateTimeMs\": 0} | | ValueType_Signature | signatureValue | {\"name\": \"Name\", \"signedAtMs\": 0, \"url\": \"\"} | | ValueType_Barcode | barcodeValue | [] | > Note: ValueType_ScannedDocument fields return ValueType_Photo/photoValue fields, whose default is listed above. Create a document

    Parameters

    Returns Promise<V1Document>

v1createDriverDocumentRaw

  • <n class="warning"> <i class="fa fa-exclamation-circle"> This endpoint is still on our legacy API. Create a driver document for the given driver. You can create a document in one of two states: "Required" or "Submitted": - Setting the document state to "Submitted" will submit the document on behalf of the driver. - Setting the document state to "Required" will create a pre-populated document for the driver to fill out in the Driver App. Populating document fields You populate a document's fields according to the document's document type. You can retrieve document types using the Fetch document types endpoint. You must populate a document's fields using the field labels and value types, and the fields must be listed in the exact same order that they appear in the document type. Omitting Field Values If you _omit a field's value_, Samsara will populate the field with a default value. (Note: you must still list the field in your request). For example, the following request omits the numberValue for the \"Number Field\". { \"documentTypeUuid\": \"79008acc-56d6-49f4-b5d2-4101ce4b497c\", \"fields\": [ { \"label\": \"Number Field\", \"valueType\": \"ValueType_Number\", } ] } Samsara will automatically populate the field with the default for number fields: 0. See the defaults for all field types below. > Note: The dateTimeValue for ValueType_DateTime fields cannot be omitted. If you'd like to populate this field with a default datetime value, you must submit \"dateTimeValue\": {} for that field. Default Field Values | Value Type | Field Name | Default value | | :--------- | :--------- | :------------ | | ValueType_Number | numberValue | 0 | | ValueType_String | stringValue | \"\" | | ValueType_Photo | photoValue | [] | | ValueType_MultipleChoice | multipleChoiceValue | [] | | ValueType_DateTime | dateTimeValue | {\"dateTimeMs\": 0} | | ValueType_Signature | signatureValue | {\"name\": \"Name\", \"signedAtMs\": 0, \"url\": \"\"} | | ValueType_Barcode | barcodeValue | [] | > Note: ValueType_ScannedDocument fields return ValueType_Photo/photoValue fields, whose default is listed above. Create a document

    Parameters

    Returns Promise<ApiResponse<V1Document>>

v1getDriverDocumentByIdAndDriverId

v1getDriverDocumentByIdAndDriverIdRaw

  • <n class="warning"> <i class="fa fa-exclamation-circle"> This endpoint is still on our legacy API. Fetches a single document submission by a specific driver. Fetches a document

    Parameters

    Returns Promise<ApiResponse<V1Document>>

v1getDriverDocumentTypesByOrgId

  • v1getDriverDocumentTypesByOrgId(): Promise<V1DocumentType[]>
  • <n class="warning"> <i class="fa fa-exclamation-circle"> This endpoint is still on our legacy API. Fetch all of the document types. Fetch document types

    Returns Promise<V1DocumentType[]>

v1getDriverDocumentTypesByOrgIdRaw

  • v1getDriverDocumentTypesByOrgIdRaw(): Promise<ApiResponse<V1DocumentType[]>>
  • <n class="warning"> <i class="fa fa-exclamation-circle"> This endpoint is still on our legacy API. Fetch all of the document types. Fetch document types

    Returns Promise<ApiResponse<V1DocumentType[]>>

v1getDriverDocumentsByOrgId

v1getDriverDocumentsByOrgIdRaw

  • <n class="warning"> <i class="fa fa-exclamation-circle"> This endpoint is still on our legacy API. Fetch all of the documents. Fetch all documents

    Parameters

    Returns Promise<ApiResponse<V1Documents>>

withMiddleware

  • withMiddleware<T>(...middlewares: Middleware[]): T
  • Type parameters

    • T: BaseAPI<T>

    Parameters

    • Rest ...middlewares: Middleware[]

    Returns T

withPostMiddleware

  • withPostMiddleware<T>(...postMiddlewares: ((context: ResponseContext) => Promise<void | Response>)[]): T
  • Type parameters

    • T: BaseAPI<T>

    Parameters

    • Rest ...postMiddlewares: ((context: ResponseContext) => Promise<void | Response>)[]

    Returns T

withPreMiddleware

  • withPreMiddleware<T>(...preMiddlewares: ((context: RequestContext) => Promise<void | FetchParams>)[]): T
  • Type parameters

    • T: BaseAPI<T>

    Parameters

    • Rest ...preMiddlewares: ((context: RequestContext) => Promise<void | FetchParams>)[]

    Returns T

Generated using TypeDoc