field-service-sdk
v3.0.21
Published
TypeScript SDK for the Field Service application
Downloads
123
Maintainers
Readme
Field Service SDK
This is the TypeScript SDK for the Field Service application. It provides a type-safe way to interact with the Field Service API.
Installation
To install the SDK in your project:
npm install field-service-sdkUsage
import { FieldServiceSDK } from 'field-service-sdk';
// Initialize the SDK
const sdk = new FieldServiceSDK({
apiUrl: 'YOUR_API_URL',
// Optional: Add your authentication token
token: 'YOUR_AUTH_TOKEN'
});
// Use the SDK methods
const jobs = await sdk.getJobs();Development
Prerequisites
- Node.js (v14 or higher)
- npm
Setup
- Clone the repository
- Install dependencies:
npm install
Generating the SDK
The SDK is generated from GraphQL schema and operations. To generate a new version:
Update the schema (if needed):
npm run update-schemaGenerate TypeScript types and operations:
npm run generateBuild the SDK:
npm run build
Or run all steps at once:
npm run prepareTesting the SDK
To test the SDK locally in another project:
Build the SDK:
npm run prepareLink the SDK:
npm linkIn your project:
npm link field-service-sdk
Available Methods
The SDK provides the following main functionalities:
- Authentication
- Job Management
- User Management
- Location Services
- Media Handling
For detailed API documentation, please refer to the TypeScript types in the dist folder.
Contributing
- Make your changes
- Update tests if necessary
- Run the build process
- Submit a pull request
License
[Your License Here]
