repzo 1.0.112 → 1.0.114
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 +24 -1
- package/package.json +1 -1
- package/src/index.ts +26 -0
- package/src/types/index.ts +21 -1
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
|
@@ -5216,9 +5216,11 @@ export declare namespace Service {
|
|
|
5216
5216
|
| "failed";
|
|
5217
5217
|
content?: string;
|
|
5218
5218
|
sync_id: string;
|
|
5219
|
+
createdAt: string;
|
|
5220
|
+
updatedAt: string;
|
|
5219
5221
|
}
|
|
5220
5222
|
export interface CreateBody {
|
|
5221
|
-
document_id
|
|
5223
|
+
document_id: string[];
|
|
5222
5224
|
document_type: PrintTypes;
|
|
5223
5225
|
sync_id: string;
|
|
5224
5226
|
}
|
|
@@ -12366,6 +12368,27 @@ export declare namespace Service {
|
|
|
12366
12368
|
type Result = Data;
|
|
12367
12369
|
}
|
|
12368
12370
|
}
|
|
12371
|
+
namespace MailUnsubsrcibe {
|
|
12372
|
+
interface Data {
|
|
12373
|
+
message: string;
|
|
12374
|
+
success?: boolean;
|
|
12375
|
+
}
|
|
12376
|
+
namespace Get {
|
|
12377
|
+
type ID = string;
|
|
12378
|
+
type Result = {
|
|
12379
|
+
message: string;
|
|
12380
|
+
};
|
|
12381
|
+
}
|
|
12382
|
+
namespace Create {
|
|
12383
|
+
type Params = {
|
|
12384
|
+
token: string;
|
|
12385
|
+
};
|
|
12386
|
+
type Result = {
|
|
12387
|
+
message: string;
|
|
12388
|
+
success: boolean;
|
|
12389
|
+
};
|
|
12390
|
+
}
|
|
12391
|
+
}
|
|
12369
12392
|
}
|
|
12370
12393
|
export type StringId = string;
|
|
12371
12394
|
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
|
@@ -5237,9 +5237,11 @@ export namespace Service {
|
|
|
5237
5237
|
| "failed";
|
|
5238
5238
|
content?: string;
|
|
5239
5239
|
sync_id: string;
|
|
5240
|
+
createdAt: string;
|
|
5241
|
+
updatedAt: string;
|
|
5240
5242
|
}
|
|
5241
5243
|
export interface CreateBody {
|
|
5242
|
-
document_id
|
|
5244
|
+
document_id: string[];
|
|
5243
5245
|
document_type: PrintTypes;
|
|
5244
5246
|
sync_id: string;
|
|
5245
5247
|
}
|
|
@@ -11921,6 +11923,24 @@ export namespace Service {
|
|
|
11921
11923
|
export type Result = Data;
|
|
11922
11924
|
}
|
|
11923
11925
|
}
|
|
11926
|
+
|
|
11927
|
+
export namespace MailUnsubsrcibe {
|
|
11928
|
+
export interface Data {
|
|
11929
|
+
message: string;
|
|
11930
|
+
success?: boolean;
|
|
11931
|
+
}
|
|
11932
|
+
export namespace Get {
|
|
11933
|
+
export type ID = string;
|
|
11934
|
+
export type Result = { message: string };
|
|
11935
|
+
}
|
|
11936
|
+
|
|
11937
|
+
export namespace Create {
|
|
11938
|
+
export type Params = {
|
|
11939
|
+
token: string;
|
|
11940
|
+
};
|
|
11941
|
+
export type Result = { message: string; success: boolean };
|
|
11942
|
+
}
|
|
11943
|
+
}
|
|
11924
11944
|
}
|
|
11925
11945
|
|
|
11926
11946
|
export type StringId = string;
|