repzo 1.0.185 → 1.0.186
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +8 -2
- package/lib/index.js +8 -0
- package/lib/types/index.d.ts +37 -10
- package/package.json +1 -1
- package/src/index.ts +15 -0
- package/src/types/index.ts +23 -0
package/lib/index.d.ts
CHANGED
|
@@ -101,10 +101,11 @@ export declare const end_points: {
|
|
|
101
101
|
readonly REPORT_COLUMN: "report-column";
|
|
102
102
|
readonly REPORT_SORT: "report-sort";
|
|
103
103
|
readonly REPORT_FILTER: "report-filter";
|
|
104
|
+
readonly SAFE_CRUD: "safe-crud";
|
|
104
105
|
};
|
|
105
|
-
export type EndPoints =
|
|
106
|
+
export type EndPoints = typeof end_points[keyof typeof end_points];
|
|
106
107
|
export declare const availableService: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport"];
|
|
107
|
-
export type AvailableService =
|
|
108
|
+
export type AvailableService = typeof availableService[number];
|
|
108
109
|
export default class Repzo {
|
|
109
110
|
private svAPIEndpoint;
|
|
110
111
|
headers: Headers;
|
|
@@ -213,6 +214,7 @@ export default class Repzo {
|
|
|
213
214
|
readonly REPORT_COLUMN: "report-column";
|
|
214
215
|
readonly REPORT_SORT: "report-sort";
|
|
215
216
|
readonly REPORT_FILTER: "report-filter";
|
|
217
|
+
readonly SAFE_CRUD: "safe-crud";
|
|
216
218
|
};
|
|
217
219
|
private _fetch;
|
|
218
220
|
private _create;
|
|
@@ -1016,4 +1018,8 @@ export default class Repzo {
|
|
|
1016
1018
|
create: (body: Service.ReportFilter.Create.Body) => Promise<Service.ReportFilter.Create.Result>;
|
|
1017
1019
|
update: (id: Service.ReportFilter.Update.ID, body: Service.ReportFilter.Update.Body) => Promise<Service.ReportFilter.Update.Result>;
|
|
1018
1020
|
};
|
|
1021
|
+
safeCrud: {
|
|
1022
|
+
_path: "safe-crud";
|
|
1023
|
+
create: (body: Service.SafeCrud.Create.Body) => Promise<Service.SafeCrud.Create.Result>;
|
|
1024
|
+
};
|
|
1019
1025
|
}
|
package/lib/index.js
CHANGED
|
@@ -102,6 +102,7 @@ export const end_points = {
|
|
|
102
102
|
REPORT_COLUMN: "report-column",
|
|
103
103
|
REPORT_SORT: "report-sort",
|
|
104
104
|
REPORT_FILTER: "report-filter",
|
|
105
|
+
SAFE_CRUD: "safe-crud",
|
|
105
106
|
};
|
|
106
107
|
export const availableService = [
|
|
107
108
|
"client",
|
|
@@ -2088,6 +2089,13 @@ class Repzo {
|
|
|
2088
2089
|
return res;
|
|
2089
2090
|
},
|
|
2090
2091
|
};
|
|
2092
|
+
this.safeCrud = {
|
|
2093
|
+
_path: Repzo._end_points.SAFE_CRUD,
|
|
2094
|
+
create: async (body) => {
|
|
2095
|
+
let res = await this._create(this.svAPIEndpoint, this.safeCrud._path, body);
|
|
2096
|
+
return res;
|
|
2097
|
+
},
|
|
2098
|
+
};
|
|
2091
2099
|
this.svAPIEndpoint =
|
|
2092
2100
|
!options?.env || options?.env == "production"
|
|
2093
2101
|
? "https://sv.api.repzo.me"
|
package/lib/types/index.d.ts
CHANGED
|
@@ -14072,7 +14072,7 @@ export declare namespace Service {
|
|
|
14072
14072
|
}[];
|
|
14073
14073
|
}
|
|
14074
14074
|
export const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
|
|
14075
|
-
export type FormV2FieldType =
|
|
14075
|
+
export type FormV2FieldType = typeof fieldType_enums[number];
|
|
14076
14076
|
interface FieldPrintSettings {
|
|
14077
14077
|
three_inch: {
|
|
14078
14078
|
grid_column?: 1 | 2;
|
|
@@ -14214,7 +14214,7 @@ export declare namespace Service {
|
|
|
14214
14214
|
}
|
|
14215
14215
|
namespace ActivityFormV2Result {
|
|
14216
14216
|
const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
|
|
14217
|
-
type FormV2FieldType =
|
|
14217
|
+
type FormV2FieldType = typeof fieldType_enums[number];
|
|
14218
14218
|
interface FieldResult {
|
|
14219
14219
|
_id?: string;
|
|
14220
14220
|
field_id: string;
|
|
@@ -14489,7 +14489,7 @@ export declare namespace Service {
|
|
|
14489
14489
|
}
|
|
14490
14490
|
namespace TimelineReport {
|
|
14491
14491
|
export const activity_types: readonly ["day", "client", "visit", "payment", "activity-photo", "activity-audit", "activity-availability", "activity-checkout-display", "activity-feedback", "activity-form-result", "activity-form-v2-result", "activity-item-status", "activity-note", "activity-planogram", "activity-secondary-display", "activity-shelfshare", "activity-storecheck", "activity-task", "approval-request", "asset-part-receival", "asset-part-transfer", "asset", "asset-part", "asset-unit", "reminders", "return-asset-part-unit", "store-asset-part-unit", "refund", "settlement", "convert-proforma", "transfer", "proforma", "receiving-material", "void-invoice", "fullinvoices", "workorder", "workorder-request", "return-whole-invoice", "cycle"];
|
|
14492
|
-
type ActivityType =
|
|
14492
|
+
type ActivityType = typeof activity_types[number];
|
|
14493
14493
|
export interface Data {
|
|
14494
14494
|
_id: StringId;
|
|
14495
14495
|
company_namespace: string[];
|
|
@@ -15195,7 +15195,7 @@ export declare namespace Service {
|
|
|
15195
15195
|
}
|
|
15196
15196
|
namespace TimelineTimeList {
|
|
15197
15197
|
export const activity_types: readonly ["day", "client", "visit", "payment", "activity-photo", "activity-audit", "activity-availability", "activity-checkout-display", "activity-feedback", "activity-form-result", "activity-form-v2-result", "activity-item-status", "activity-note", "activity-planogram", "activity-secondary-display", "activity-shelfshare", "activity-storecheck", "activity-task", "approval-request", "asset-part-receival", "asset-part-transfer", "asset", "asset-part", "asset-unit", "reminders", "return-asset-part-unit", "store-asset-part-unit", "refund", "settlement", "convert-proforma", "transfer", "proforma", "receiving-material", "void-invoice", "fullinvoices", "workorder", "workorder-request", "return-whole-invoice", "cycle"];
|
|
15198
|
-
type ActivityType =
|
|
15198
|
+
type ActivityType = typeof activity_types[number];
|
|
15199
15199
|
export interface Data {
|
|
15200
15200
|
_id: StringId;
|
|
15201
15201
|
company_namespace: string[];
|
|
@@ -15656,17 +15656,17 @@ export declare namespace Service {
|
|
|
15656
15656
|
}
|
|
15657
15657
|
namespace SalesAnalyticsReport {
|
|
15658
15658
|
const groupBy_options: readonly ["client", "rep", "issue_date", "due_date", "serial_number", "product", "variant", "brand", "category", "status", "promotion_type", "class", "measureunit", "promotion", "chain", "channel", "city", "region", "country", "route", "teams"];
|
|
15659
|
-
type GroupByOption =
|
|
15659
|
+
type GroupByOption = typeof groupBy_options[number];
|
|
15660
15660
|
const promotion_type_options: readonly ["get", "buy"];
|
|
15661
|
-
type PromotionTypeOption =
|
|
15661
|
+
type PromotionTypeOption = typeof promotion_type_options[number];
|
|
15662
15662
|
const class_options: readonly ["invoice", "return"];
|
|
15663
|
-
type ClassOption =
|
|
15663
|
+
type ClassOption = typeof class_options[number];
|
|
15664
15664
|
const status_options: readonly ["unpaid", "partially_paid", "paid"];
|
|
15665
|
-
type StatusOption =
|
|
15665
|
+
type StatusOption = typeof status_options[number];
|
|
15666
15666
|
const sortBy_field_options: readonly ["_id", "time"];
|
|
15667
|
-
type SortByFieldOption =
|
|
15667
|
+
type SortByFieldOption = typeof sortBy_field_options[number];
|
|
15668
15668
|
const sortBy_type_options: readonly ["asc", "desc"];
|
|
15669
|
-
type SortByTypeOption =
|
|
15669
|
+
type SortByTypeOption = typeof sortBy_type_options[number];
|
|
15670
15670
|
interface SortByOption {
|
|
15671
15671
|
field: SortByFieldOption;
|
|
15672
15672
|
type: SortByTypeOption;
|
|
@@ -16376,6 +16376,33 @@ export declare namespace Service {
|
|
|
16376
16376
|
type Result = Data;
|
|
16377
16377
|
}
|
|
16378
16378
|
}
|
|
16379
|
+
namespace SafeCrud {
|
|
16380
|
+
interface Body {
|
|
16381
|
+
collection: "company";
|
|
16382
|
+
filters?: {
|
|
16383
|
+
[key: string]: any;
|
|
16384
|
+
};
|
|
16385
|
+
}
|
|
16386
|
+
interface CompanyBody extends Body {
|
|
16387
|
+
collection: "company";
|
|
16388
|
+
filters?: {
|
|
16389
|
+
name_space?: string | string[];
|
|
16390
|
+
};
|
|
16391
|
+
}
|
|
16392
|
+
interface CompanyResult {
|
|
16393
|
+
_id: StringId;
|
|
16394
|
+
name_space: string;
|
|
16395
|
+
allow_treating_invoice_as_proforma_for_etax?: boolean;
|
|
16396
|
+
}
|
|
16397
|
+
type Data = CompanyResult;
|
|
16398
|
+
export namespace Create {
|
|
16399
|
+
type Body = CompanyBody;
|
|
16400
|
+
interface Result extends DefaultPaginationResult {
|
|
16401
|
+
data: Data[];
|
|
16402
|
+
}
|
|
16403
|
+
}
|
|
16404
|
+
export {};
|
|
16405
|
+
}
|
|
16379
16406
|
}
|
|
16380
16407
|
export type StringId = string;
|
|
16381
16408
|
export type NameSpaces = string[];
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -112,6 +112,7 @@ export const end_points = {
|
|
|
112
112
|
REPORT_COLUMN: "report-column",
|
|
113
113
|
REPORT_SORT: "report-sort",
|
|
114
114
|
REPORT_FILTER: "report-filter",
|
|
115
|
+
SAFE_CRUD: "safe-crud",
|
|
115
116
|
} as const;
|
|
116
117
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
117
118
|
|
|
@@ -5327,6 +5328,20 @@ export default class Repzo {
|
|
|
5327
5328
|
return res;
|
|
5328
5329
|
},
|
|
5329
5330
|
};
|
|
5331
|
+
|
|
5332
|
+
safeCrud = {
|
|
5333
|
+
_path: Repzo._end_points.SAFE_CRUD,
|
|
5334
|
+
create: async (
|
|
5335
|
+
body: Service.SafeCrud.Create.Body,
|
|
5336
|
+
): Promise<Service.SafeCrud.Create.Result> => {
|
|
5337
|
+
let res = await this._create(
|
|
5338
|
+
this.svAPIEndpoint,
|
|
5339
|
+
this.safeCrud._path,
|
|
5340
|
+
body,
|
|
5341
|
+
);
|
|
5342
|
+
return res;
|
|
5343
|
+
},
|
|
5344
|
+
};
|
|
5330
5345
|
}
|
|
5331
5346
|
|
|
5332
5347
|
function normalizeParams(params: Params): { [key: string]: any } {
|
package/src/types/index.ts
CHANGED
|
@@ -18541,6 +18541,29 @@ export namespace Service {
|
|
|
18541
18541
|
export type Result = Data;
|
|
18542
18542
|
}
|
|
18543
18543
|
}
|
|
18544
|
+
|
|
18545
|
+
export namespace SafeCrud {
|
|
18546
|
+
interface Body {
|
|
18547
|
+
collection: "company";
|
|
18548
|
+
filters?: { [key: string]: any };
|
|
18549
|
+
}
|
|
18550
|
+
interface CompanyBody extends Body {
|
|
18551
|
+
collection: "company";
|
|
18552
|
+
filters?: { name_space?: string | string[] };
|
|
18553
|
+
}
|
|
18554
|
+
interface CompanyResult {
|
|
18555
|
+
_id: StringId;
|
|
18556
|
+
name_space: string;
|
|
18557
|
+
allow_treating_invoice_as_proforma_for_etax?: boolean;
|
|
18558
|
+
}
|
|
18559
|
+
type Data = CompanyResult;
|
|
18560
|
+
export namespace Create {
|
|
18561
|
+
export type Body = CompanyBody;
|
|
18562
|
+
export interface Result extends DefaultPaginationResult {
|
|
18563
|
+
data: Data[];
|
|
18564
|
+
}
|
|
18565
|
+
}
|
|
18566
|
+
}
|
|
18544
18567
|
}
|
|
18545
18568
|
|
|
18546
18569
|
export type StringId = string;
|