Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More API of feature of Purchasing #72

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions famis_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ import {
PostUdfForWoRequest,
PostWorkOrderRequest,
PurchaseRequisitionCreateRequest,
PurchaseRequisitionLineCreateRequest,
PurchaseRequisitionLineCreateRequest, PurchaseRequisitionUpdateRequest,
SearchUsersRequest,
ShoppingCartCreateRequest,
ShoppingCartItemCreateRequest,
Expand Down Expand Up @@ -1269,11 +1269,16 @@ export class FamisClient {
return this.getAll<PurchaseRequisitionLine>(context, 'purchaserequisitionlines');
}

async createPurchaseRequisitionHeader(postRequest: PurchaseRequisitionCreateRequest, userId: number): Promise<PurchaseRequisitionHeader> {
async createPurchaseRequisitionHeader(postRequest: PurchaseRequisitionCreateRequest): Promise<PurchaseRequisitionHeader> {
return this.createObject<PurchaseRequisitionCreateRequest, PurchaseRequisitionHeader>(postRequest, 'purchaserequisitionheaders');
}

async createPurchaseRequisitionLine(postRequest: PurchaseRequisitionLineCreateRequest, userId: number): Promise<PurchaseRequisitionLine> {
async updatePurchaseRequisitionHeader(postRequest: PurchaseRequisitionUpdateRequest, prId: number): Promise<PurchaseRequisitionHeader> {
const entity = `purchaserequisitionheaders(${prId})`;
return this.patchObject<PurchaseRequisitionUpdateRequest, PurchaseRequisitionHeader>(postRequest, entity);
}

async createPurchaseRequisitionLine(postRequest: PurchaseRequisitionLineCreateRequest): Promise<PurchaseRequisitionLine> {
return this.createObject<PurchaseRequisitionLineCreateRequest, PurchaseRequisitionLine>(postRequest, 'purchaserequisitionlines');
}

Expand Down
11 changes: 6 additions & 5 deletions model/famis_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1230,11 +1230,11 @@ export interface AssetType {
TabOrder: number;
}

export interface AssetAttachmentType{
Id?:number;
Name?:string;
ActiveFlag?:boolean;
ImageFlag?:boolean
export interface AssetAttachmentType {
Id?: number;
Name?: string;
ActiveFlag?: boolean;
ImageFlag?: boolean;
}

export interface CreateAssetAttachment {
Expand Down Expand Up @@ -2944,6 +2944,7 @@ export interface PurchaseRequisitionHeader {

export interface PurchaseRequisitionLine {
Id: number;
PRId: number;
Number: string;
RequestorName: string;
RequestorEmail: string;
Expand Down
16 changes: 15 additions & 1 deletion model/request_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,20 @@ export interface PurchaseRequisitionCreateRequest {
AttentionTo?: string;
}

export interface PurchaseRequisitionUpdateRequest {
RequestorName?: string;
RequestorEmail?: string;
RequestorPhone?: string;
Description?: string;
TypeId?: number;
StatusId?: number;
PropertyId?: number;
ShipToAddress?: string;
RequestId?: number;
NTE?: number;
AttentionTo?: string;
}

export interface PurchaseRequisitionLineCreateRequest {
PRId: number;
RequiredDate?: string;
Expand All @@ -997,7 +1011,7 @@ export interface PurchaseRequisitionLineCreateRequest {
VendorExternalId?: string;
WarehouseId?: number;
WarehouseExternalId?: string;
MaterialItemId: number;
MaterialItemId?: number;
MaterialItemExternalId?: string;
Description?: string;
UnitOfMeasureId?: number;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "facility360",
"version": "1.0.9",
"version": "1.0.10",
"description": "A Node based 360Facility client SDK",
"main": "dist/index.js",
"scripts": {
Expand Down
Loading