npm package: @inclouded/tmf-individuals
Description: ``` npm install --save @inclouded/tmf-individuals ```
Latest version: 1.0.8

# TMF Individual Firestore SDK

```
npm install --save @inclouded/tmf-individuals
```

## Introduction

In the repository the Firebase Cloud Firestore SDK can be found that was made for the TMF Individual resource in an installable Angular folder form. The SDK can be installed for every Angular 2+ project. The SDK accomplishes the necessary CRUD operations.

## Usage

1. For using the SDK an Angular 2+ project is needed, in which we can establish a connection to a Firestore database instance. (configured in environments.ts)

2. The SDK can be used in a Service in the following way:

```javascript
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { AngularFirestore } from '@angular/fire/firestore';
import { IndividualsApi } from '@inclouded/tmf-individuals'

@Injectable()
export class IndividualsService {

    IndividualsApi: IndividualsApi;
    constructor(private afs: AngularFirestore) {
        this.IndividualsApi = new IndividualsApi(this.afs);
    }

    addIndividual(individual: any, id?: string) {
        return this.IndividualsApi.add(individual, id);
    }

    getAllIndividuals() {
        return this.IndividualsApi.getAll();
    }

    deleteIndividual(individualId: string) {
        return this.IndividualsApi.delete(individualId);
    }

    updateIndividual(individual: any) {
        return this.IndividualsApi.update(individual);
    }

    getIndividualById(id: string) {
        return this.IndividualsApi.getById(id);
    }

    getIndividualsByIndividualIdentification(individualIdentification: string, orderBy?: OrderBy, paging?: Paging) {
        return this.IndividualsApi.getIndividualsByIndividualIdentification(individualIdentification);
    }

    getIndividualsByContactMedium(contactMedium: string, orderBy?: OrderBy, paging?: Paging) {
        return this.IndividualsApi.getIndividualsByContactMedium(contactMedium);
    }

    getOrgParyByEmployerId(relatedParty: string, orderBy?: OrderBy, paging?: Paging) {
        return this.IndividualsApi.getOrgParyByEmployerId(relatedParty);
    }

    getIndividualsByLanguageAbility(languageAbility: string, orderBy?: OrderBy, paging?: Paging) {
        return this.IndividualsApi.getIndividualsByLanguageAbility(languageAbility);
    }

    getIndividualsByNameSubStr(nameSubStr: string, orderBy?: OrderBy, paging?: Paging) {
        return this.IndividualsApi.getIndividualsByNameSubStr(nameSubStr);
    }

    getIndividualsByAmSmartAccId(amSmartAccId: string, orderBy?: OrderBy, paging?: Paging) {
        return this.IndividualsApi.getIndividualsByAmSmartAccId(amSmartAccId);
    }

    getIndividualsByDistributorAccId(distributorAccId: string, orderBy?: OrderBy, paging?: Paging) {
        return this.IndividualsApi.getIndividualsByDistributorAccId(distributorAccId);
    }

    getIndividualsByUniqueId(uniqueId: string, orderBy?: OrderBy, paging?: Paging) {
        return this.IndividualsApi.getIndividualsByUniqueId(uniqueId);
    }
}

```

Developer: Zoltán R. Jánki (jankiz@inf.u-szeged.hu), Gábor Simon (simonovszkij@gmail.com)