repzo 1.0.164 → 1.0.165
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/docs/generated/cart-bundled.yaml +1338 -0
- package/docs/generated/cart.html +2312 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.js +32 -0
- package/lib/types/index.d.ts +192 -0
- package/package.json +1 -1
- package/src/index.ts +77 -0
- package/src/oas/cart.yaml +1338 -0
- package/src/oas/workorder-agenda.yaml +260 -0
- package/src/types/index.ts +207 -0
package/lib/index.d.ts
CHANGED
|
@@ -93,6 +93,8 @@ export declare const end_points: {
|
|
|
93
93
|
readonly RESET_COMPANY_NAMESPACE: "reset-company-namespace";
|
|
94
94
|
readonly TEST_RESET_COMPANY_NAMESPACE: "test-reset-company-namespace";
|
|
95
95
|
readonly TIMELINE_TIME_LIST: "timeline-time-list";
|
|
96
|
+
readonly WORKORDER_AGENDA: "workorder-agenda";
|
|
97
|
+
readonly MODULE_CUSTOM_VALIDATOR: "module-custom-validator";
|
|
96
98
|
};
|
|
97
99
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
98
100
|
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"];
|
|
@@ -197,6 +199,8 @@ export default class Repzo {
|
|
|
197
199
|
readonly RESET_COMPANY_NAMESPACE: "reset-company-namespace";
|
|
198
200
|
readonly TEST_RESET_COMPANY_NAMESPACE: "test-reset-company-namespace";
|
|
199
201
|
readonly TIMELINE_TIME_LIST: "timeline-time-list";
|
|
202
|
+
readonly WORKORDER_AGENDA: "workorder-agenda";
|
|
203
|
+
readonly MODULE_CUSTOM_VALIDATOR: "module-custom-validator";
|
|
200
204
|
};
|
|
201
205
|
private _fetch;
|
|
202
206
|
private _create;
|
|
@@ -936,4 +940,16 @@ export default class Repzo {
|
|
|
936
940
|
_path: "timeline-time-list";
|
|
937
941
|
find: (params?: Service.TimelineTimeList.Find.Params) => Promise<Service.TimelineTimeList.Find.Result>;
|
|
938
942
|
};
|
|
943
|
+
workorderAgenda: {
|
|
944
|
+
_path: "workorder-agenda";
|
|
945
|
+
find: (params: Service.WorkorderAgenda.Find.Params) => Promise<Service.WorkorderAgenda.Find.Result>;
|
|
946
|
+
};
|
|
947
|
+
moduleCustomValidator: {
|
|
948
|
+
_path: "module-custom-validator";
|
|
949
|
+
find: (params: Service.ModuleCustomValidator.Find.Params) => Promise<Service.ModuleCustomValidator.Find.Result>;
|
|
950
|
+
get: (id: Service.ModuleCustomValidator.Get.ID, params: Service.ModuleCustomValidator.Find.Params) => Promise<Service.ModuleCustomValidator.Find.Result>;
|
|
951
|
+
create: (body: Service.ModuleCustomValidator.Create.Body) => Promise<Service.ModuleCustomValidator.Create.Result>;
|
|
952
|
+
update: (id: Service.ModuleCustomValidator.Update.ID, body: Service.ModuleCustomValidator.Update.Body) => Promise<Service.ModuleCustomValidator.Update.Result>;
|
|
953
|
+
remove: (id: Service.ModuleCustomValidator.Remove.ID, params: Service.ModuleCustomValidator.Remove.Params) => Promise<Service.ModuleCustomValidator.Remove.Result>;
|
|
954
|
+
};
|
|
939
955
|
}
|
package/lib/index.js
CHANGED
|
@@ -94,6 +94,8 @@ export const end_points = {
|
|
|
94
94
|
RESET_COMPANY_NAMESPACE: "reset-company-namespace",
|
|
95
95
|
TEST_RESET_COMPANY_NAMESPACE: "test-reset-company-namespace",
|
|
96
96
|
TIMELINE_TIME_LIST: "timeline-time-list",
|
|
97
|
+
WORKORDER_AGENDA: "workorder-agenda",
|
|
98
|
+
MODULE_CUSTOM_VALIDATOR: "module-custom-validator",
|
|
97
99
|
};
|
|
98
100
|
export const availableService = [
|
|
99
101
|
"client",
|
|
@@ -1897,6 +1899,36 @@ class Repzo {
|
|
|
1897
1899
|
return res;
|
|
1898
1900
|
},
|
|
1899
1901
|
};
|
|
1902
|
+
this.workorderAgenda = {
|
|
1903
|
+
_path: Repzo._end_points.WORKORDER_AGENDA,
|
|
1904
|
+
find: async (params) => {
|
|
1905
|
+
let res = await this._fetch(this.svAPIEndpoint, this.workorderAgenda._path, params);
|
|
1906
|
+
return res;
|
|
1907
|
+
},
|
|
1908
|
+
};
|
|
1909
|
+
this.moduleCustomValidator = {
|
|
1910
|
+
_path: Repzo._end_points.MODULE_CUSTOM_VALIDATOR,
|
|
1911
|
+
find: async (params) => {
|
|
1912
|
+
let res = await this._fetch(this.svAPIEndpoint, this.moduleCustomValidator._path, params);
|
|
1913
|
+
return res;
|
|
1914
|
+
},
|
|
1915
|
+
get: async (id, params) => {
|
|
1916
|
+
let res = await this._fetch(this.svAPIEndpoint, this.moduleCustomValidator._path + `/${id}`, params);
|
|
1917
|
+
return res;
|
|
1918
|
+
},
|
|
1919
|
+
create: async (body) => {
|
|
1920
|
+
let res = await this._create(this.svAPIEndpoint, this.moduleCustomValidator._path, body);
|
|
1921
|
+
return res;
|
|
1922
|
+
},
|
|
1923
|
+
update: async (id, body) => {
|
|
1924
|
+
let res = await this._update(this.svAPIEndpoint, this.moduleCustomValidator._path + `/${id}`, body);
|
|
1925
|
+
return res;
|
|
1926
|
+
},
|
|
1927
|
+
remove: async (id, params) => {
|
|
1928
|
+
let res = await this._delete(this.svAPIEndpoint, this.moduleCustomValidator._path + `/${id}`, params);
|
|
1929
|
+
return res;
|
|
1930
|
+
},
|
|
1931
|
+
};
|
|
1900
1932
|
this.svAPIEndpoint =
|
|
1901
1933
|
!options?.env || options?.env == "production"
|
|
1902
1934
|
? "https://sv.api.repzo.me"
|
package/lib/types/index.d.ts
CHANGED
|
@@ -170,6 +170,12 @@ export interface DefaultPaginationResult {
|
|
|
170
170
|
path: string;
|
|
171
171
|
data: any[];
|
|
172
172
|
}
|
|
173
|
+
export interface AgendaPaginationResult extends DefaultPaginationResult {
|
|
174
|
+
meta?: {
|
|
175
|
+
day_current_page: number;
|
|
176
|
+
day_per_page: number;
|
|
177
|
+
};
|
|
178
|
+
}
|
|
173
179
|
export interface List {
|
|
174
180
|
client: string | {
|
|
175
181
|
_id: string;
|
|
@@ -10596,6 +10602,8 @@ export declare namespace Service {
|
|
|
10596
10602
|
returned_to?: string;
|
|
10597
10603
|
returned_from_serial_number?: SerialNumber;
|
|
10598
10604
|
returned_to_serial_number?: SerialNumber;
|
|
10605
|
+
partiall_returned_from?: string;
|
|
10606
|
+
partiall_returned_from_serial_number?: SerialNumber;
|
|
10599
10607
|
due_date?: string;
|
|
10600
10608
|
return_serial_number?: SerialNumber;
|
|
10601
10609
|
origin_warehouse?: string;
|
|
@@ -10798,6 +10806,8 @@ export declare namespace Service {
|
|
|
10798
10806
|
returned_to?: string;
|
|
10799
10807
|
returned_from_serial_number?: SerialNumber;
|
|
10800
10808
|
returned_to_serial_number?: SerialNumber;
|
|
10809
|
+
partiall_returned_from?: string;
|
|
10810
|
+
partiall_returned_from_serial_number?: SerialNumber;
|
|
10801
10811
|
due_date?: string;
|
|
10802
10812
|
return_serial_number?: SerialNumber;
|
|
10803
10813
|
origin_warehouse?: string;
|
|
@@ -15625,6 +15635,188 @@ export declare namespace Service {
|
|
|
15625
15635
|
}
|
|
15626
15636
|
export {};
|
|
15627
15637
|
}
|
|
15638
|
+
namespace WorkorderAgenda {
|
|
15639
|
+
interface Workorder {
|
|
15640
|
+
name: string;
|
|
15641
|
+
client: string;
|
|
15642
|
+
client_populated: {
|
|
15643
|
+
_id: string;
|
|
15644
|
+
name: string;
|
|
15645
|
+
local_name: string;
|
|
15646
|
+
client_code: string;
|
|
15647
|
+
};
|
|
15648
|
+
createdAt: Date;
|
|
15649
|
+
}
|
|
15650
|
+
interface PlanedWorkorder extends Workorder {
|
|
15651
|
+
_id: null;
|
|
15652
|
+
status: null;
|
|
15653
|
+
is_planed: true;
|
|
15654
|
+
due_date: null;
|
|
15655
|
+
start_date: null;
|
|
15656
|
+
parent_workorder: string;
|
|
15657
|
+
}
|
|
15658
|
+
interface OriginWorkorder extends Workorder {
|
|
15659
|
+
_id: string;
|
|
15660
|
+
status: Workorder.Data["status"];
|
|
15661
|
+
is_planed: false;
|
|
15662
|
+
due_date: number;
|
|
15663
|
+
start_date: number;
|
|
15664
|
+
parent_workorder: null;
|
|
15665
|
+
}
|
|
15666
|
+
interface Data {
|
|
15667
|
+
day: string;
|
|
15668
|
+
day_total_result: number;
|
|
15669
|
+
day_current_count: number;
|
|
15670
|
+
day_total_pages: number;
|
|
15671
|
+
workorders: (OriginWorkorder | PlanedWorkorder)[];
|
|
15672
|
+
}
|
|
15673
|
+
namespace Find {
|
|
15674
|
+
type Params = DefaultPaginationQueryParams & {
|
|
15675
|
+
from_due_date: number;
|
|
15676
|
+
to_due_date: number;
|
|
15677
|
+
client?: StringId[];
|
|
15678
|
+
disabled: boolean;
|
|
15679
|
+
day_per_page?: number;
|
|
15680
|
+
day_page?: number;
|
|
15681
|
+
day?: string;
|
|
15682
|
+
client_location?: StringId[];
|
|
15683
|
+
workorder_categories?: StringId[];
|
|
15684
|
+
status?: Workorder.Data["status"] | Workorder.Data["status"][];
|
|
15685
|
+
priority_human?: Workorder.Data["priority_human"] | Workorder.Data["priority_human"][];
|
|
15686
|
+
assets?: StringId[];
|
|
15687
|
+
asset_units?: StringId[];
|
|
15688
|
+
contract?: StringId[];
|
|
15689
|
+
assigned_to?: StringId[];
|
|
15690
|
+
from_createdAt?: number;
|
|
15691
|
+
to_createdAt?: number;
|
|
15692
|
+
_id: StringId | StringId[];
|
|
15693
|
+
};
|
|
15694
|
+
interface Result extends AgendaPaginationResult {
|
|
15695
|
+
data: Data[];
|
|
15696
|
+
}
|
|
15697
|
+
}
|
|
15698
|
+
}
|
|
15699
|
+
namespace ModuleCustomValidator {
|
|
15700
|
+
export interface NumberValidation {
|
|
15701
|
+
data_type?: "number";
|
|
15702
|
+
regex?: string;
|
|
15703
|
+
required?: boolean;
|
|
15704
|
+
min?: number;
|
|
15705
|
+
max?: number;
|
|
15706
|
+
precision?: number;
|
|
15707
|
+
enum?: number[];
|
|
15708
|
+
division_factor?: number;
|
|
15709
|
+
multiply_factor?: number;
|
|
15710
|
+
none_zero?: boolean;
|
|
15711
|
+
is_timestamp?: boolean;
|
|
15712
|
+
}
|
|
15713
|
+
export interface ReferenceValidation {
|
|
15714
|
+
data_type?: "reference";
|
|
15715
|
+
is_array?: false;
|
|
15716
|
+
required?: boolean;
|
|
15717
|
+
}
|
|
15718
|
+
export interface ArrayReferenceValidation {
|
|
15719
|
+
data_type?: "reference";
|
|
15720
|
+
is_array?: true;
|
|
15721
|
+
required?: boolean;
|
|
15722
|
+
array_min_length?: number;
|
|
15723
|
+
array_max_length?: number;
|
|
15724
|
+
}
|
|
15725
|
+
export interface TextValidation {
|
|
15726
|
+
data_type?: "text";
|
|
15727
|
+
regex?: string;
|
|
15728
|
+
required?: boolean;
|
|
15729
|
+
min?: number;
|
|
15730
|
+
max?: number;
|
|
15731
|
+
enum?: string[];
|
|
15732
|
+
}
|
|
15733
|
+
interface BasicData {
|
|
15734
|
+
creator: AdminCreator;
|
|
15735
|
+
editor?: AdminCreator;
|
|
15736
|
+
_id?: string;
|
|
15737
|
+
module: Model;
|
|
15738
|
+
key: string;
|
|
15739
|
+
origin_type: "system_field" | "custom_field";
|
|
15740
|
+
disabled: boolean;
|
|
15741
|
+
scope: "all" | "rep" | "admin";
|
|
15742
|
+
ai_custom_error?: string;
|
|
15743
|
+
custom_error?: string;
|
|
15744
|
+
teams?: string[];
|
|
15745
|
+
full_key_path?: string;
|
|
15746
|
+
company_namespace: string[];
|
|
15747
|
+
}
|
|
15748
|
+
type NumberData = BasicData & {
|
|
15749
|
+
data_type: "number";
|
|
15750
|
+
validation: NumberValidation;
|
|
15751
|
+
};
|
|
15752
|
+
type TextData = BasicData & {
|
|
15753
|
+
data_type: "text";
|
|
15754
|
+
validation: TextValidation;
|
|
15755
|
+
};
|
|
15756
|
+
type ReferenceData = BasicData & {
|
|
15757
|
+
data_type: "reference";
|
|
15758
|
+
reference_module: string;
|
|
15759
|
+
validation: ArrayReferenceValidation | ReferenceValidation;
|
|
15760
|
+
};
|
|
15761
|
+
export type Data = ReferenceData | NumberData | TextData;
|
|
15762
|
+
export interface BasicCreateBody {
|
|
15763
|
+
creator: AdminCreator;
|
|
15764
|
+
module: Model;
|
|
15765
|
+
key: string;
|
|
15766
|
+
origin_type: "system_field" | "custom_field";
|
|
15767
|
+
scope: "all" | "rep" | "admin";
|
|
15768
|
+
ai_custom_error?: string;
|
|
15769
|
+
custom_error?: string;
|
|
15770
|
+
teams?: string[];
|
|
15771
|
+
}
|
|
15772
|
+
export type CreateBody = BasicCreateBody & (ReferenceData | NumberData | TextData);
|
|
15773
|
+
export interface BasicUpdateBody {
|
|
15774
|
+
editor?: AdminCreator;
|
|
15775
|
+
module?: Model;
|
|
15776
|
+
key?: string;
|
|
15777
|
+
origin_type?: "system_field" | "custom_field";
|
|
15778
|
+
scope?: "all" | "rep" | "admin";
|
|
15779
|
+
ai_custom_error?: string;
|
|
15780
|
+
custom_error?: string;
|
|
15781
|
+
teams?: string[];
|
|
15782
|
+
}
|
|
15783
|
+
export type UpdateBody = BasicCreateBody & (ReferenceData | NumberData | TextData);
|
|
15784
|
+
export namespace Find {
|
|
15785
|
+
type Params = DefaultPaginationQueryParams & {
|
|
15786
|
+
module?: RepzoModel | RepzoModel[];
|
|
15787
|
+
key?: string | string[];
|
|
15788
|
+
data_type?: Data["data_type"] | Data["data_type"][];
|
|
15789
|
+
origin_type?: Data["origin_type"] | Data["origin_type"][];
|
|
15790
|
+
scope?: Data["scope"] | Data["scope"][];
|
|
15791
|
+
disabled?: boolean;
|
|
15792
|
+
_id?: StringId | StringId[];
|
|
15793
|
+
teams?: StringId | StringId[];
|
|
15794
|
+
reference_module?: RepzoModel | RepzoModel[];
|
|
15795
|
+
};
|
|
15796
|
+
interface Result extends DefaultPaginationResult {
|
|
15797
|
+
data: Data[];
|
|
15798
|
+
}
|
|
15799
|
+
}
|
|
15800
|
+
export namespace Get {
|
|
15801
|
+
type ID = string;
|
|
15802
|
+
type Result = Data;
|
|
15803
|
+
}
|
|
15804
|
+
export namespace Create {
|
|
15805
|
+
type Body = CreateBody;
|
|
15806
|
+
type Result = Data;
|
|
15807
|
+
}
|
|
15808
|
+
export namespace Update {
|
|
15809
|
+
type ID = string;
|
|
15810
|
+
type Body = UpdateBody;
|
|
15811
|
+
type Result = Data;
|
|
15812
|
+
}
|
|
15813
|
+
export namespace Remove {
|
|
15814
|
+
type ID = string;
|
|
15815
|
+
type Params = {};
|
|
15816
|
+
type Result = Data;
|
|
15817
|
+
}
|
|
15818
|
+
export {};
|
|
15819
|
+
}
|
|
15628
15820
|
}
|
|
15629
15821
|
export type StringId = string;
|
|
15630
15822
|
export type NameSpaces = string[];
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -104,6 +104,8 @@ export const end_points = {
|
|
|
104
104
|
RESET_COMPANY_NAMESPACE: "reset-company-namespace",
|
|
105
105
|
TEST_RESET_COMPANY_NAMESPACE: "test-reset-company-namespace",
|
|
106
106
|
TIMELINE_TIME_LIST: "timeline-time-list",
|
|
107
|
+
WORKORDER_AGENDA: "workorder-agenda",
|
|
108
|
+
MODULE_CUSTOM_VALIDATOR: "module-custom-validator",
|
|
107
109
|
} as const;
|
|
108
110
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
109
111
|
|
|
@@ -4880,6 +4882,81 @@ export default class Repzo {
|
|
|
4880
4882
|
return res;
|
|
4881
4883
|
},
|
|
4882
4884
|
};
|
|
4885
|
+
|
|
4886
|
+
workorderAgenda = {
|
|
4887
|
+
_path: Repzo._end_points.WORKORDER_AGENDA,
|
|
4888
|
+
find: async (
|
|
4889
|
+
params: Service.WorkorderAgenda.Find.Params,
|
|
4890
|
+
): Promise<Service.WorkorderAgenda.Find.Result> => {
|
|
4891
|
+
let res: Service.WorkorderAgenda.Find.Result = await this._fetch(
|
|
4892
|
+
this.svAPIEndpoint,
|
|
4893
|
+
this.workorderAgenda._path,
|
|
4894
|
+
params,
|
|
4895
|
+
);
|
|
4896
|
+
return res;
|
|
4897
|
+
},
|
|
4898
|
+
};
|
|
4899
|
+
|
|
4900
|
+
moduleCustomValidator = {
|
|
4901
|
+
_path: Repzo._end_points.MODULE_CUSTOM_VALIDATOR,
|
|
4902
|
+
find: async (
|
|
4903
|
+
params: Service.ModuleCustomValidator.Find.Params,
|
|
4904
|
+
): Promise<Service.ModuleCustomValidator.Find.Result> => {
|
|
4905
|
+
let res: Service.ModuleCustomValidator.Find.Result = await this._fetch(
|
|
4906
|
+
this.svAPIEndpoint,
|
|
4907
|
+
this.moduleCustomValidator._path,
|
|
4908
|
+
params,
|
|
4909
|
+
);
|
|
4910
|
+
return res;
|
|
4911
|
+
},
|
|
4912
|
+
|
|
4913
|
+
get: async (
|
|
4914
|
+
id: Service.ModuleCustomValidator.Get.ID,
|
|
4915
|
+
params: Service.ModuleCustomValidator.Find.Params,
|
|
4916
|
+
): Promise<Service.ModuleCustomValidator.Find.Result> => {
|
|
4917
|
+
let res: Service.ModuleCustomValidator.Find.Result = await this._fetch(
|
|
4918
|
+
this.svAPIEndpoint,
|
|
4919
|
+
this.moduleCustomValidator._path + `/${id}`,
|
|
4920
|
+
params,
|
|
4921
|
+
);
|
|
4922
|
+
return res;
|
|
4923
|
+
},
|
|
4924
|
+
|
|
4925
|
+
create: async (
|
|
4926
|
+
body: Service.ModuleCustomValidator.Create.Body,
|
|
4927
|
+
): Promise<Service.ModuleCustomValidator.Create.Result> => {
|
|
4928
|
+
let res = await this._create(
|
|
4929
|
+
this.svAPIEndpoint,
|
|
4930
|
+
this.moduleCustomValidator._path,
|
|
4931
|
+
body,
|
|
4932
|
+
);
|
|
4933
|
+
return res;
|
|
4934
|
+
},
|
|
4935
|
+
|
|
4936
|
+
update: async (
|
|
4937
|
+
id: Service.ModuleCustomValidator.Update.ID,
|
|
4938
|
+
body: Service.ModuleCustomValidator.Update.Body,
|
|
4939
|
+
): Promise<Service.ModuleCustomValidator.Update.Result> => {
|
|
4940
|
+
let res: Service.ModuleCustomValidator.Update.Result = await this._update(
|
|
4941
|
+
this.svAPIEndpoint,
|
|
4942
|
+
this.moduleCustomValidator._path + `/${id}`,
|
|
4943
|
+
body,
|
|
4944
|
+
);
|
|
4945
|
+
return res;
|
|
4946
|
+
},
|
|
4947
|
+
|
|
4948
|
+
remove: async (
|
|
4949
|
+
id: Service.ModuleCustomValidator.Remove.ID,
|
|
4950
|
+
params: Service.ModuleCustomValidator.Remove.Params,
|
|
4951
|
+
): Promise<Service.ModuleCustomValidator.Remove.Result> => {
|
|
4952
|
+
let res: Service.ModuleCustomValidator.Remove.Result = await this._delete(
|
|
4953
|
+
this.svAPIEndpoint,
|
|
4954
|
+
this.moduleCustomValidator._path + `/${id}`,
|
|
4955
|
+
params,
|
|
4956
|
+
);
|
|
4957
|
+
return res;
|
|
4958
|
+
},
|
|
4959
|
+
};
|
|
4883
4960
|
}
|
|
4884
4961
|
|
|
4885
4962
|
function normalizeParams(params: Params): { [key: string]: any } {
|