repzo 1.0.112 → 1.0.113
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 +10 -0
- package/lib/index.js +19 -0
- package/lib/types/index.d.ts +21 -0
- package/package.json +1 -1
- package/src/index.ts +26 -0
- package/src/types/index.ts +18 -0
package/lib/index.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ export default class Repzo {
|
|
|
84
84
|
readonly OCR_INVOICE_JOB: "ocr-invoice-job";
|
|
85
85
|
readonly OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page";
|
|
86
86
|
readonly SETTINGS: "settings";
|
|
87
|
+
readonly MAIL_UNSUBSCRIBE: "mail-unsubscribe";
|
|
87
88
|
};
|
|
88
89
|
private _fetch;
|
|
89
90
|
private _create;
|
|
@@ -1306,4 +1307,13 @@ export default class Repzo {
|
|
|
1306
1307
|
body: Service.Settings.Update.Body
|
|
1307
1308
|
) => Promise<Service.Settings.Update.Result>;
|
|
1308
1309
|
};
|
|
1310
|
+
mailUnsubscribe: {
|
|
1311
|
+
_path: "mail-unsubscribe";
|
|
1312
|
+
get: (
|
|
1313
|
+
id: Service.MailUnsubsrcibe.Get.ID
|
|
1314
|
+
) => Promise<Service.MailUnsubsrcibe.Get.Result>;
|
|
1315
|
+
create: (
|
|
1316
|
+
params: Service.MailUnsubsrcibe.Create.Params
|
|
1317
|
+
) => Promise<Service.MailUnsubsrcibe.Create.Result>;
|
|
1318
|
+
};
|
|
1309
1319
|
}
|
package/lib/index.js
CHANGED
|
@@ -73,6 +73,7 @@ export default class Repzo {
|
|
|
73
73
|
OCR_INVOICE_JOB: "ocr-invoice-job",
|
|
74
74
|
OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page",
|
|
75
75
|
SETTINGS: "settings",
|
|
76
|
+
MAIL_UNSUBSCRIBE: "mail-unsubscribe",
|
|
76
77
|
};
|
|
77
78
|
this.END_POINTS = this._end_points;
|
|
78
79
|
this.client = {
|
|
@@ -2405,6 +2406,24 @@ export default class Repzo {
|
|
|
2405
2406
|
return res;
|
|
2406
2407
|
},
|
|
2407
2408
|
};
|
|
2409
|
+
this.mailUnsubscribe = {
|
|
2410
|
+
_path: this._end_points.MAIL_UNSUBSCRIBE,
|
|
2411
|
+
get: async (id) => {
|
|
2412
|
+
return await this._fetch(
|
|
2413
|
+
this.svAPIEndpoint,
|
|
2414
|
+
this.ocrInvoiceJobPage._path + `/${id}`
|
|
2415
|
+
);
|
|
2416
|
+
},
|
|
2417
|
+
create: async (params) => {
|
|
2418
|
+
let res = await this._create(
|
|
2419
|
+
this.svAPIEndpoint,
|
|
2420
|
+
this.activityAiSalesOrder._path,
|
|
2421
|
+
{},
|
|
2422
|
+
params
|
|
2423
|
+
);
|
|
2424
|
+
return res;
|
|
2425
|
+
},
|
|
2426
|
+
};
|
|
2408
2427
|
this.svAPIEndpoint =
|
|
2409
2428
|
!options?.env || options?.env == "production"
|
|
2410
2429
|
? "https://sv.api.repzo.me"
|
package/lib/types/index.d.ts
CHANGED
|
@@ -12366,6 +12366,27 @@ export declare namespace Service {
|
|
|
12366
12366
|
type Result = Data;
|
|
12367
12367
|
}
|
|
12368
12368
|
}
|
|
12369
|
+
namespace MailUnsubsrcibe {
|
|
12370
|
+
interface Data {
|
|
12371
|
+
message: string;
|
|
12372
|
+
success?: boolean;
|
|
12373
|
+
}
|
|
12374
|
+
namespace Get {
|
|
12375
|
+
type ID = string;
|
|
12376
|
+
type Result = {
|
|
12377
|
+
message: string;
|
|
12378
|
+
};
|
|
12379
|
+
}
|
|
12380
|
+
namespace Create {
|
|
12381
|
+
type Params = {
|
|
12382
|
+
token: string;
|
|
12383
|
+
};
|
|
12384
|
+
type Result = {
|
|
12385
|
+
message: string;
|
|
12386
|
+
success: boolean;
|
|
12387
|
+
};
|
|
12388
|
+
}
|
|
12389
|
+
}
|
|
12369
12390
|
}
|
|
12370
12391
|
export type StringId = string;
|
|
12371
12392
|
export type NameSpaces = string[];
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -108,6 +108,7 @@ export default class Repzo {
|
|
|
108
108
|
OCR_INVOICE_JOB: "ocr-invoice-job",
|
|
109
109
|
OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page",
|
|
110
110
|
SETTINGS: "settings",
|
|
111
|
+
MAIL_UNSUBSCRIBE: "mail-unsubscribe",
|
|
111
112
|
} as const;
|
|
112
113
|
public END_POINTS = this._end_points;
|
|
113
114
|
private async _fetch(baseUrl: string, path: string, params?: Params) {
|
|
@@ -3715,6 +3716,31 @@ export default class Repzo {
|
|
|
3715
3716
|
return res;
|
|
3716
3717
|
},
|
|
3717
3718
|
};
|
|
3719
|
+
|
|
3720
|
+
mailUnsubscribe = {
|
|
3721
|
+
_path: this._end_points.MAIL_UNSUBSCRIBE,
|
|
3722
|
+
|
|
3723
|
+
get: async (
|
|
3724
|
+
id: Service.MailUnsubsrcibe.Get.ID
|
|
3725
|
+
): Promise<Service.MailUnsubsrcibe.Get.Result> => {
|
|
3726
|
+
return await this._fetch(
|
|
3727
|
+
this.svAPIEndpoint,
|
|
3728
|
+
this.ocrInvoiceJobPage._path + `/${id}`
|
|
3729
|
+
);
|
|
3730
|
+
},
|
|
3731
|
+
|
|
3732
|
+
create: async (
|
|
3733
|
+
params: Service.MailUnsubsrcibe.Create.Params
|
|
3734
|
+
): Promise<Service.MailUnsubsrcibe.Create.Result> => {
|
|
3735
|
+
let res = await this._create(
|
|
3736
|
+
this.svAPIEndpoint,
|
|
3737
|
+
this.activityAiSalesOrder._path,
|
|
3738
|
+
{},
|
|
3739
|
+
params
|
|
3740
|
+
);
|
|
3741
|
+
return res;
|
|
3742
|
+
},
|
|
3743
|
+
};
|
|
3718
3744
|
}
|
|
3719
3745
|
|
|
3720
3746
|
function normalizeParams(params: Params): { [key: string]: any } {
|
package/src/types/index.ts
CHANGED
|
@@ -11921,6 +11921,24 @@ export namespace Service {
|
|
|
11921
11921
|
export type Result = Data;
|
|
11922
11922
|
}
|
|
11923
11923
|
}
|
|
11924
|
+
|
|
11925
|
+
export namespace MailUnsubsrcibe {
|
|
11926
|
+
export interface Data {
|
|
11927
|
+
message: string;
|
|
11928
|
+
success?: boolean;
|
|
11929
|
+
}
|
|
11930
|
+
export namespace Get {
|
|
11931
|
+
export type ID = string;
|
|
11932
|
+
export type Result = { message: string };
|
|
11933
|
+
}
|
|
11934
|
+
|
|
11935
|
+
export namespace Create {
|
|
11936
|
+
export type Params = {
|
|
11937
|
+
token: string;
|
|
11938
|
+
};
|
|
11939
|
+
export type Result = { message: string; success: boolean };
|
|
11940
|
+
}
|
|
11941
|
+
}
|
|
11924
11942
|
}
|
|
11925
11943
|
|
|
11926
11944
|
export type StringId = string;
|