Namespace: Part

Appearition.Part

Use the functions under this module to access Part records on the Appearition platPart

Namespaces

Category
Document
Manage
Manufacturer
Model
Reminder
Repairer
Supplier

Methods

Appearition.Part.GetPartDetails (requestOptions)Appearition.Part.PartDetailsViewModel static

Retrieves the list of all manufacturers, models and suppliers of parts on the server Will return the Appearition.Site.PartDetailsViewModel model

Name Type Description
requestOptions Appearition.RequestOptions

Contains the various callback methods for this request

Returns:
Type Description
Appearition.Part.PartDetailsViewModel This is returned as part of the success callback function in the requestOptions param

Appearition.Part.GetPartDocument (partDocumentId, requestOptions)object static

Retrieves the contents of a specific part file

Name Type Description
partDocumentId number

The unique identifier of the document

requestOptions Appearition.RequestOptions

Contains the various callback methods for this request

Returns:
Type Description
object File stream

Appearition.Part.GetPartSyncManifest (request, requestOptions)Appearition.Part.PartSyncManifestViewModel Deprecated : This will replaced in the future as it can become a get request and the project id request is redundant static

Retrieves a list of parts from the server. Will return the Appearition.Part.PartsSyncViewModel model

Name Type Description
request Appearition.Part.GetPartSyncManifestRequestModel

Contains the identifiers for retrieving the required records

requestOptions Appearition.RequestOptions

Contains the various callback methods for this request

Returns:
Type Description
Appearition.Part.PartSyncManifestViewModel This is returned as part of the success callback function in the requestOptions param

Type Definitions

Appearition.Part.GetPartSyncManifestRequestModel

This is a simple view model containing just Project ID. Unlike the sync manifest methods in other modules, this one does not perform a delta but rather retrieved all of the part information in whole

Properties:
Name Type Description
ProjectId number

The unique identifier of the project (aka channel)

Appearition.Part.ManufacturerModelViewModel

This view model links a model to a manufacturer and part.

Properties:
Name Type Description
Id number

Uniquely identifies the link record in the database. System allocated.

PartId number

Uniquely identifies the part

ManufacturerId number

Uniquely identifies the manufacturer

ModelNo string

The descriptive text of the model. Also a unique identifier

Appearition.Part.PartDetailsViewModel

This view model contains a list of manufacturers, models and suppliers of all parts in the system

Properties:
Name Type Description
Manufacturers Array.<Appearition.Part.PartManufacturerViewModel>

A collection of manufacturers of parts

ManufacturersModel Array.<Appearition.Part.ManufacturerModelViewModel>

A collection of models from the manufacturers of parts

Supplier Array.<Appearition.Part.SupplierViewModel>

A collection of suppliers of parts

Appearition.Part.PartDocSyncManifestViewModel

Represents a document that relates to a specific part

Properties:
Name Type Description
DocumentId number

Unique identifier of the document on the server

PartId number

Unique identifier of the part that this document relates to

VersionNo number

Identifies the specific version of this document

DocumentName string

The title given to the document. Note this will differ to the File Name

DateModified string

The date/time as UTC, that this document was last changed.

FileName string

The name of the file

IsActive boolean

During the site sync process, if the client posted a document which is not longer available on the server, then this field will be set to false and the client should immediately remove the document from any local cache

Appearition.Part.PartManufacturerViewModel

This view model links a part to a manufacturer. A manufacturer can make numerous parts and a part can be made by different manufacturers.

Properties:
Name Type Description
Id number

Uniquely identifies the link record in the database. System allocated.

PartId number

Uniquely identifies the part

ManufacturerId number

Uniquely identifies the manufacturer

ManufacturerName string

The name of the manufacturer

Models Array.<Appearition.Part.ManufacturerModelViewModel>

A collection of models made by the manufacturer

Appearition.Part.PartSummaryViewModel

Represents a Part and a few of its details

Properties:
Name Type Description
PartId number

Unique identifier of the Part. This is a system allocated value

Name string

The name of the Part

PricePerUnit number

This represents a dollar value for each unit. The context of this dollar value will vary in different applications

Docs Array.<Appearition.Part.PartDocSyncManifestViewModel>

A collection of documents that are specifically related to this Part

Appearition.Part.PartSyncManifestViewModel

This data structure holds a list of Parts

Properties:
Name Type Description
ProjectId number

The unique identifier of the project (aka channel)

Parts Array.<Appearition.Part.PartSummaryViewModel>

The collection of Part details

Appearition.Part.SupplierViewModel

This model holds the details of a supplier

Properties:
Name Type Description
Id number

Uniquely identifies the supplier in the database. System allocated.

SupplierId number

Same as Id. Exists for backward compatibility

Name string

The name of the supplier