@inclouded/tmf-partyroles
v1.0.5
Published
``` npm install --save @inclouded/tmf-partyroles ```
Downloads
10
Keywords
Readme
TMF PartyRole Firestore SDK
npm install --save @inclouded/tmf-partyroles
Introduction
In the repository the Firebase Cloud Firestore SDK can be found that was made for the TMF PartyRole 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
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)
The SDK can be used in a Service in the following way:
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { AngularFirestore } from '@angular/fire/firestore';
import { PartyRolesApi } from '@inclouded/tmf-partyroles'
@Injectable()
export class PartyRolesService {
PartyRolesApi: PartyRolesApi;
constructor(private afs: AngularFirestore) {
this.PartyRolesApi = new PartyRolesApi(this.afs);
}
addPartyRole(partyrole: any, id?: string) {
return this.PartyRolesApi.add(partyrole, id);
}
getAllPartyRoles() {
return this.PartyRolesApi.getAll();
}
deletePartyRole(partyroleId: string) {
return this.PartyRolesApi.delete(partyroleId);
}
updatePartyRole(partyrole: any) {
return this.PartyRolesApi.update(partyrole);
}
getPartyRoleById(id: string) {
return this.PartyRolesApi.getById(id);
}
getPartyRolesByContactMedium(contactMedium: string, orderBy?: OrderBy, paging?: Paging) {
return this.PartyRolesApi.getPartyRolesByContactMedium(contactMedium);
}
getPartyRoleByRaletedPartyId(relatedParty: string, orderBy?: OrderBy, paging?: Paging) {
return this.PartyRolesApi.getPartyRoleByRaletedPartyId(relatedParty);
}
getPartyRolesByEngagedParty(engagedParty: string, orderBy?: OrderBy, paging?: Paging) {
return this.PartyRolesApi.getPartyRolesByEngagedParty(engagedParty);
}
getPartyRolesByNameSubStr(nameSubStr: string, orderBy?: OrderBy, paging?: Paging) {
return this.PartyRolesApi.getPartyRolesByNameSubStr(nameSubStr);
}
}
Developer: Zoltán R. Jánki ([email protected]), Gábor Simon ([email protected])