repzo 1.0.198 → 1.0.200
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 +6 -0
- package/lib/index.js +8 -0
- package/lib/types/index.d.ts +42 -4
- package/package.json +1 -1
- package/src/index.ts +16 -0
- package/src/types/index.ts +41 -4
package/lib/index.d.ts
CHANGED
|
@@ -106,6 +106,7 @@ export declare const end_points: {
|
|
|
106
106
|
readonly REPORT_VIEW: "report-view";
|
|
107
107
|
readonly REPORT_VIEW_DEFAULT: "report-view-default";
|
|
108
108
|
readonly REPORT_VIEW_FAVORITE: "report-view-favorite";
|
|
109
|
+
readonly COPY_REPORT_VIEW: "copy-report-view";
|
|
109
110
|
};
|
|
110
111
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
111
112
|
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"];
|
|
@@ -223,6 +224,7 @@ export default class Repzo {
|
|
|
223
224
|
readonly REPORT_VIEW: "report-view";
|
|
224
225
|
readonly REPORT_VIEW_DEFAULT: "report-view-default";
|
|
225
226
|
readonly REPORT_VIEW_FAVORITE: "report-view-favorite";
|
|
227
|
+
readonly COPY_REPORT_VIEW: "copy-report-view";
|
|
226
228
|
};
|
|
227
229
|
private _fetch;
|
|
228
230
|
private _create;
|
|
@@ -1060,4 +1062,8 @@ export default class Repzo {
|
|
|
1060
1062
|
create: (body: Service.ReportViewDefault.Create.Body) => Promise<Service.ReportViewDefault.Create.Result>;
|
|
1061
1063
|
remove: (id: Service.ReportViewDefault.Remove.ID, params: Service.ReportViewDefault.Remove.Params) => Promise<Service.ReportViewDefault.Remove.Result>;
|
|
1062
1064
|
};
|
|
1065
|
+
copyReportView: {
|
|
1066
|
+
_path: "copy-report-view";
|
|
1067
|
+
update: (id: Service.CopyReportView.Update.ID, body: Service.CopyReportView.Update.Body) => Promise<Service.CopyReportView.Update.Result>;
|
|
1068
|
+
};
|
|
1063
1069
|
}
|
package/lib/index.js
CHANGED
|
@@ -107,6 +107,7 @@ export const end_points = {
|
|
|
107
107
|
REPORT_VIEW: "report-view",
|
|
108
108
|
REPORT_VIEW_DEFAULT: "report-view-default",
|
|
109
109
|
REPORT_VIEW_FAVORITE: "report-view-favorite",
|
|
110
|
+
COPY_REPORT_VIEW: "copy-report-view",
|
|
110
111
|
};
|
|
111
112
|
export const availableService = [
|
|
112
113
|
"client",
|
|
@@ -2180,6 +2181,13 @@ class Repzo {
|
|
|
2180
2181
|
return res;
|
|
2181
2182
|
},
|
|
2182
2183
|
};
|
|
2184
|
+
this.copyReportView = {
|
|
2185
|
+
_path: Repzo._end_points.COPY_REPORT_VIEW,
|
|
2186
|
+
update: async (id, body) => {
|
|
2187
|
+
let res = await this._update(this.svAPIEndpoint, this.copyReportView._path + `/${id}`, body);
|
|
2188
|
+
return res;
|
|
2189
|
+
},
|
|
2190
|
+
};
|
|
2183
2191
|
this.svAPIEndpoint =
|
|
2184
2192
|
!options?.env || options?.env == "production"
|
|
2185
2193
|
? "https://sv.api.repzo.me"
|
package/lib/types/index.d.ts
CHANGED
|
@@ -2452,8 +2452,13 @@ export declare namespace Service {
|
|
|
2452
2452
|
watermark_time?: boolean;
|
|
2453
2453
|
watermark_date?: boolean;
|
|
2454
2454
|
watermark_coordinates?: boolean;
|
|
2455
|
+
watermark_font_size?: number;
|
|
2455
2456
|
rep_must_end_day_after: `${number}:${number}`;
|
|
2456
2457
|
treating_invoice_as_proforma_for_etax?: boolean;
|
|
2458
|
+
disable_auto_timezone_enforcement?: boolean;
|
|
2459
|
+
disable_auto_time_date_enforcement?: boolean;
|
|
2460
|
+
start_day_specific_time_frame_start: `${number}:${number}`;
|
|
2461
|
+
start_day_specific_time_frame_end: `${number}:${number}`;
|
|
2457
2462
|
}
|
|
2458
2463
|
type JobOption = 0 | 1 | 2;
|
|
2459
2464
|
export interface RepSchema {
|
|
@@ -2507,6 +2512,9 @@ export declare namespace Service {
|
|
|
2507
2512
|
media?: string[];
|
|
2508
2513
|
cover_photo?: string;
|
|
2509
2514
|
last_login_time?: number;
|
|
2515
|
+
is_locked_device: boolean;
|
|
2516
|
+
handle_credit_limit: boolean;
|
|
2517
|
+
credit_limit?: number;
|
|
2510
2518
|
createdAt: string;
|
|
2511
2519
|
updatedAt: string;
|
|
2512
2520
|
__v: number;
|
|
@@ -2562,6 +2570,9 @@ export declare namespace Service {
|
|
|
2562
2570
|
media?: string[];
|
|
2563
2571
|
cover_photo?: string;
|
|
2564
2572
|
last_login_time?: number;
|
|
2573
|
+
is_locked_device?: boolean;
|
|
2574
|
+
handle_credit_limit?: boolean;
|
|
2575
|
+
credit_limit?: number;
|
|
2565
2576
|
}
|
|
2566
2577
|
type PopulatedKeys = "line" | "lines" | "job_category" | "teams" | "assigned_forms_v2" | "job_category" | "cover_photo" | "assigned_plan" | "assigned_retail_execution_templates" | "warehouse";
|
|
2567
2578
|
export type RepWithPopulatedKeysSchema = RepSchema & {
|
|
@@ -16590,6 +16601,7 @@ export declare namespace Service {
|
|
|
16590
16601
|
report_type: ReportType;
|
|
16591
16602
|
company_namespace: string[];
|
|
16592
16603
|
teams?: string[];
|
|
16604
|
+
copied_from?: StringId;
|
|
16593
16605
|
createdAt?: Date;
|
|
16594
16606
|
updatedAt?: Date;
|
|
16595
16607
|
}
|
|
@@ -16677,7 +16689,6 @@ export declare namespace Service {
|
|
|
16677
16689
|
}
|
|
16678
16690
|
namespace Find {
|
|
16679
16691
|
type Params = DefaultPaginationQueryParams & {
|
|
16680
|
-
_id?: StringId | StringId[];
|
|
16681
16692
|
name?: string | string[];
|
|
16682
16693
|
disabled?: boolean;
|
|
16683
16694
|
is_public?: boolean;
|
|
@@ -16686,15 +16697,33 @@ export declare namespace Service {
|
|
|
16686
16697
|
mine_views?: boolean;
|
|
16687
16698
|
teams?: StringId | StringId[];
|
|
16688
16699
|
search?: string;
|
|
16700
|
+
mine_or_public_views?: boolean;
|
|
16701
|
+
populatedKeys?: ("teams" | "copied_from")[];
|
|
16702
|
+
with_favorite?: boolean;
|
|
16703
|
+
with_default?: boolean;
|
|
16689
16704
|
};
|
|
16690
16705
|
interface Result extends DefaultPaginationResult {
|
|
16691
|
-
data: Data
|
|
16706
|
+
data: (Data & {
|
|
16707
|
+
is_favorite?: boolean;
|
|
16708
|
+
is_default?: boolean;
|
|
16709
|
+
teams_populated: Pick<Team.TeamSchema, "name" | "_id">;
|
|
16710
|
+
copied_from_populated?: ReportView.Data;
|
|
16711
|
+
})[];
|
|
16692
16712
|
}
|
|
16693
16713
|
}
|
|
16694
16714
|
namespace Get {
|
|
16695
16715
|
type ID = StringId;
|
|
16696
|
-
type Params = {
|
|
16697
|
-
|
|
16716
|
+
type Params = {
|
|
16717
|
+
populatedKeys?: ("teams" | "copied_from")[];
|
|
16718
|
+
with_favorite?: boolean;
|
|
16719
|
+
with_default?: boolean;
|
|
16720
|
+
};
|
|
16721
|
+
type Result = Data & {
|
|
16722
|
+
is_favorite?: boolean;
|
|
16723
|
+
is_default?: boolean;
|
|
16724
|
+
teams_populated: Pick<Team.TeamSchema, "name" | "_id">;
|
|
16725
|
+
copied_from_populated?: ReportView.Data;
|
|
16726
|
+
};
|
|
16698
16727
|
}
|
|
16699
16728
|
namespace Create {
|
|
16700
16729
|
type params = {
|
|
@@ -16815,6 +16844,15 @@ export declare namespace Service {
|
|
|
16815
16844
|
};
|
|
16816
16845
|
}
|
|
16817
16846
|
}
|
|
16847
|
+
namespace CopyReportView {
|
|
16848
|
+
namespace Update {
|
|
16849
|
+
type ID = StringId;
|
|
16850
|
+
type Body = {};
|
|
16851
|
+
type Result = ReportView.Data & {
|
|
16852
|
+
copied_from: StringId;
|
|
16853
|
+
};
|
|
16854
|
+
}
|
|
16855
|
+
}
|
|
16818
16856
|
}
|
|
16819
16857
|
export type StringId = string;
|
|
16820
16858
|
export type NameSpaces = string[];
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -117,6 +117,7 @@ export const end_points = {
|
|
|
117
117
|
REPORT_VIEW: "report-view",
|
|
118
118
|
REPORT_VIEW_DEFAULT: "report-view-default",
|
|
119
119
|
REPORT_VIEW_FAVORITE: "report-view-favorite",
|
|
120
|
+
COPY_REPORT_VIEW: "copy-report-view",
|
|
120
121
|
} as const;
|
|
121
122
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
122
123
|
|
|
@@ -5548,6 +5549,21 @@ export default class Repzo {
|
|
|
5548
5549
|
return res;
|
|
5549
5550
|
},
|
|
5550
5551
|
};
|
|
5552
|
+
|
|
5553
|
+
copyReportView = {
|
|
5554
|
+
_path: Repzo._end_points.COPY_REPORT_VIEW,
|
|
5555
|
+
update: async (
|
|
5556
|
+
id: Service.CopyReportView.Update.ID,
|
|
5557
|
+
body: Service.CopyReportView.Update.Body,
|
|
5558
|
+
): Promise<Service.CopyReportView.Update.Result> => {
|
|
5559
|
+
let res: Service.CopyReportView.Update.Result = await this._update(
|
|
5560
|
+
this.svAPIEndpoint,
|
|
5561
|
+
this.copyReportView._path + `/${id}`,
|
|
5562
|
+
body,
|
|
5563
|
+
);
|
|
5564
|
+
return res;
|
|
5565
|
+
},
|
|
5566
|
+
};
|
|
5551
5567
|
}
|
|
5552
5568
|
|
|
5553
5569
|
function normalizeParams(params: Params): { [key: string]: any } {
|
package/src/types/index.ts
CHANGED
|
@@ -2835,8 +2835,13 @@ export namespace Service {
|
|
|
2835
2835
|
watermark_time?: boolean;
|
|
2836
2836
|
watermark_date?: boolean;
|
|
2837
2837
|
watermark_coordinates?: boolean;
|
|
2838
|
+
watermark_font_size?: number;
|
|
2838
2839
|
rep_must_end_day_after: `${number}:${number}`;
|
|
2839
2840
|
treating_invoice_as_proforma_for_etax?: boolean;
|
|
2841
|
+
disable_auto_timezone_enforcement?: boolean;
|
|
2842
|
+
disable_auto_time_date_enforcement?: boolean;
|
|
2843
|
+
start_day_specific_time_frame_start: `${number}:${number}`;
|
|
2844
|
+
start_day_specific_time_frame_end: `${number}:${number}`;
|
|
2840
2845
|
}
|
|
2841
2846
|
type JobOption = 0 | 1 | 2;
|
|
2842
2847
|
export interface RepSchema {
|
|
@@ -2890,6 +2895,9 @@ export namespace Service {
|
|
|
2890
2895
|
media?: string[];
|
|
2891
2896
|
cover_photo?: string;
|
|
2892
2897
|
last_login_time?: number;
|
|
2898
|
+
is_locked_device: boolean;
|
|
2899
|
+
handle_credit_limit: boolean;
|
|
2900
|
+
credit_limit?: number;
|
|
2893
2901
|
createdAt: string;
|
|
2894
2902
|
updatedAt: string;
|
|
2895
2903
|
__v: number;
|
|
@@ -2945,6 +2953,9 @@ export namespace Service {
|
|
|
2945
2953
|
media?: string[];
|
|
2946
2954
|
cover_photo?: string;
|
|
2947
2955
|
last_login_time?: number;
|
|
2956
|
+
is_locked_device?: boolean;
|
|
2957
|
+
handle_credit_limit?: boolean;
|
|
2958
|
+
credit_limit?: number;
|
|
2948
2959
|
}
|
|
2949
2960
|
|
|
2950
2961
|
type PopulatedKeys =
|
|
@@ -18830,6 +18841,7 @@ export namespace Service {
|
|
|
18830
18841
|
report_type: ReportType;
|
|
18831
18842
|
company_namespace: string[];
|
|
18832
18843
|
teams?: string[];
|
|
18844
|
+
copied_from?: StringId;
|
|
18833
18845
|
createdAt?: Date;
|
|
18834
18846
|
updatedAt?: Date;
|
|
18835
18847
|
}
|
|
@@ -18920,7 +18932,6 @@ export namespace Service {
|
|
|
18920
18932
|
|
|
18921
18933
|
export namespace Find {
|
|
18922
18934
|
export type Params = DefaultPaginationQueryParams & {
|
|
18923
|
-
_id?: StringId | StringId[];
|
|
18924
18935
|
name?: string | string[];
|
|
18925
18936
|
disabled?: boolean;
|
|
18926
18937
|
is_public?: boolean;
|
|
@@ -18929,16 +18940,34 @@ export namespace Service {
|
|
|
18929
18940
|
mine_views?: boolean;
|
|
18930
18941
|
teams?: StringId | StringId[];
|
|
18931
18942
|
search?: string;
|
|
18943
|
+
mine_or_public_views?: boolean;
|
|
18944
|
+
populatedKeys?: ("teams" | "copied_from")[];
|
|
18945
|
+
with_favorite?: boolean;
|
|
18946
|
+
with_default?: boolean;
|
|
18932
18947
|
};
|
|
18933
18948
|
export interface Result extends DefaultPaginationResult {
|
|
18934
|
-
data: Data
|
|
18949
|
+
data: (Data & {
|
|
18950
|
+
is_favorite?: boolean;
|
|
18951
|
+
is_default?: boolean;
|
|
18952
|
+
teams_populated: Pick<Team.TeamSchema, "name" | "_id">;
|
|
18953
|
+
copied_from_populated?: ReportView.Data;
|
|
18954
|
+
})[];
|
|
18935
18955
|
}
|
|
18936
18956
|
}
|
|
18937
18957
|
|
|
18938
18958
|
export namespace Get {
|
|
18939
18959
|
export type ID = StringId;
|
|
18940
|
-
export type Params = {
|
|
18941
|
-
|
|
18960
|
+
export type Params = {
|
|
18961
|
+
populatedKeys?: ("teams" | "copied_from")[];
|
|
18962
|
+
with_favorite?: boolean;
|
|
18963
|
+
with_default?: boolean;
|
|
18964
|
+
};
|
|
18965
|
+
export type Result = Data & {
|
|
18966
|
+
is_favorite?: boolean;
|
|
18967
|
+
is_default?: boolean;
|
|
18968
|
+
teams_populated: Pick<Team.TeamSchema, "name" | "_id">;
|
|
18969
|
+
copied_from_populated?: ReportView.Data;
|
|
18970
|
+
};
|
|
18942
18971
|
}
|
|
18943
18972
|
|
|
18944
18973
|
export namespace Create {
|
|
@@ -19066,6 +19095,14 @@ export namespace Service {
|
|
|
19066
19095
|
};
|
|
19067
19096
|
}
|
|
19068
19097
|
}
|
|
19098
|
+
|
|
19099
|
+
export namespace CopyReportView {
|
|
19100
|
+
export namespace Update {
|
|
19101
|
+
export type ID = StringId;
|
|
19102
|
+
export type Body = {};
|
|
19103
|
+
export type Result = ReportView.Data & { copied_from: StringId };
|
|
19104
|
+
}
|
|
19105
|
+
}
|
|
19069
19106
|
}
|
|
19070
19107
|
|
|
19071
19108
|
export type StringId = string;
|