@tillhub/javascript-sdk 4.161.0 → 4.163.0
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/CHANGELOG.md +14 -0
- package/dist/types/v0/invoices_uod.d.ts +25 -12
- package/dist/types/v1/appointment-reminder-templates.d.ts +4 -1
- package/dist/types/v1/appointment_reminders.d.ts +16 -0
- package/dist/v0/invoices_uod.js +50 -1
- package/dist/v0/invoices_uod.js.map +1 -1
- package/dist/v1/appointment-reminder-templates.js +4 -3
- package/dist/v1/appointment-reminder-templates.js.map +1 -1
- package/dist/v1/appointment_reminders.js +38 -1
- package/dist/v1/appointment_reminders.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [4.163.0](https://github.com/tillhub/tillhub-sdk-javascript/compare/v4.162.0...v4.163.0) (2024-11-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **invoices:** just to trigger new build ([#606](https://github.com/tillhub/tillhub-sdk-javascript/issues/606)) ([f7ffbd4](https://github.com/tillhub/tillhub-sdk-javascript/commit/f7ffbd457fadc1e7f714a19e77e946060144009a))
|
|
7
|
+
|
|
8
|
+
# [4.162.0](https://github.com/tillhub/tillhub-sdk-javascript/compare/v4.161.0...v4.162.0) (2024-10-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **appointment-reminders:** add endpoint for sending test reminders ([#604](https://github.com/tillhub/tillhub-sdk-javascript/issues/604)) ([0c6deaa](https://github.com/tillhub/tillhub-sdk-javascript/commit/0c6deaa72f2e93fb8aeb5aaa85fc48bbecd60ce8))
|
|
14
|
+
|
|
1
15
|
# [4.161.0](https://github.com/tillhub/tillhub-sdk-javascript/compare/v4.160.0...v4.161.0) (2024-10-31)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -2,9 +2,10 @@ import { Client } from '../client';
|
|
|
2
2
|
import { BaseError } from '../errors';
|
|
3
3
|
import { UriHelper } from '../uri-helper';
|
|
4
4
|
import { ThBaseHandler } from '../base';
|
|
5
|
-
declare type
|
|
5
|
+
declare type StateTypes = 'Open' | 'Paid' | 'Dunning' | 'Encashment' | 'Cancellation' | 'Cancellation paid';
|
|
6
6
|
declare type DocumentTypes = 'Standard' | 'Credit Note' | 'Partial Cancellation' | 'Full Cancellation';
|
|
7
7
|
declare type OriginTypes = 'Ecom' | 'POS';
|
|
8
|
+
declare type InvoiceType = 'pdf' | 'csv';
|
|
8
9
|
export interface UodInvoicesResponse {
|
|
9
10
|
data: UodInvoicesEntity[];
|
|
10
11
|
metadata: Record<string, unknown>;
|
|
@@ -22,29 +23,35 @@ export interface UodInvoicesQueryHandler {
|
|
|
22
23
|
}
|
|
23
24
|
export interface UodInvoicesQuery extends UodInvoicesEntity {
|
|
24
25
|
active?: boolean;
|
|
25
|
-
billingPeriodStart?: Date | string;
|
|
26
|
-
billingPeriodEnd?: Date | string;
|
|
27
26
|
}
|
|
28
27
|
export interface UodInvoicesEntity {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
document: Document;
|
|
29
|
+
billingPeriodStart: Date | string;
|
|
30
|
+
billingPeriodEnd: Date | string;
|
|
31
|
+
origin?: OriginTypes;
|
|
32
|
+
state?: StateTypes;
|
|
34
33
|
type?: DocumentTypes;
|
|
35
34
|
csvUrl?: string;
|
|
36
35
|
pdfUrl?: string;
|
|
37
|
-
origin?: OriginTypes;
|
|
38
36
|
}
|
|
39
|
-
export interface
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
export interface Document {
|
|
38
|
+
id?: string;
|
|
39
|
+
documentNumber?: string;
|
|
40
|
+
createdAt?: Date | string;
|
|
41
|
+
updatedAt?: Date | string;
|
|
42
42
|
}
|
|
43
43
|
export interface ErrorObject {
|
|
44
44
|
id: string;
|
|
45
45
|
label: string;
|
|
46
46
|
errorDetails: Record<string, unknown>;
|
|
47
47
|
}
|
|
48
|
+
export interface DocumentsDownloadResponse {
|
|
49
|
+
url?: string;
|
|
50
|
+
data?: string;
|
|
51
|
+
contentType?: string;
|
|
52
|
+
filename?: string;
|
|
53
|
+
correlationId?: string;
|
|
54
|
+
}
|
|
48
55
|
export declare class UodInvoices extends ThBaseHandler {
|
|
49
56
|
static baseEndpoint: string;
|
|
50
57
|
endpoint: string;
|
|
@@ -53,10 +60,16 @@ export declare class UodInvoices extends ThBaseHandler {
|
|
|
53
60
|
uriHelper: UriHelper;
|
|
54
61
|
constructor(options: UodInvoicesOptions, http: Client);
|
|
55
62
|
getAll(query?: UodInvoicesQueryHandler | undefined): Promise<UodInvoicesResponse>;
|
|
63
|
+
download(documentId: string, type: InvoiceType): Promise<DocumentsDownloadResponse>;
|
|
56
64
|
}
|
|
57
65
|
export declare class UodInvoicesFetchFailed extends BaseError {
|
|
58
66
|
message: string;
|
|
59
67
|
name: string;
|
|
60
68
|
constructor(message?: string, properties?: Record<string, unknown>);
|
|
61
69
|
}
|
|
70
|
+
export declare class DocumentsDownloadFailed extends BaseError {
|
|
71
|
+
message: string;
|
|
72
|
+
name: string;
|
|
73
|
+
constructor(message?: string, properties?: Record<string, unknown>);
|
|
74
|
+
}
|
|
62
75
|
export {};
|
|
@@ -23,6 +23,9 @@ export interface AppointmentReminderTemplatesResponse {
|
|
|
23
23
|
};
|
|
24
24
|
msg?: string;
|
|
25
25
|
}
|
|
26
|
+
export interface AppointmentReminderTemplatesQuery {
|
|
27
|
+
language?: string;
|
|
28
|
+
}
|
|
26
29
|
export declare class AppointmentReminderTemplates extends ThBaseHandler {
|
|
27
30
|
static baseEndpoint: string;
|
|
28
31
|
endpoint: string;
|
|
@@ -30,7 +33,7 @@ export declare class AppointmentReminderTemplates extends ThBaseHandler {
|
|
|
30
33
|
options: AppointmentReminderTemplatesOptions;
|
|
31
34
|
uriHelper: UriHelper;
|
|
32
35
|
constructor(options: AppointmentReminderTemplatesOptions, http: Client);
|
|
33
|
-
getAll(): Promise<AppointmentReminderTemplatesResponse>;
|
|
36
|
+
getAll(query?: AppointmentReminderTemplatesQuery | undefined): Promise<AppointmentReminderTemplatesResponse>;
|
|
34
37
|
}
|
|
35
38
|
export declare class AppointmentReminderTemplatesFetchFailed extends BaseError {
|
|
36
39
|
message: string;
|
|
@@ -27,6 +27,16 @@ export interface AppointmentRemindersResponse {
|
|
|
27
27
|
};
|
|
28
28
|
msg?: string;
|
|
29
29
|
}
|
|
30
|
+
export interface AppointmentRemindersTestReminderPayload {
|
|
31
|
+
templateId?: string;
|
|
32
|
+
branchId?: string;
|
|
33
|
+
type?: ReminderType;
|
|
34
|
+
email?: string;
|
|
35
|
+
phoneNumber?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface AppointmentRemindersTestReminderResponse {
|
|
38
|
+
msg?: string;
|
|
39
|
+
}
|
|
30
40
|
export declare class AppointmentReminders extends ThBaseHandler {
|
|
31
41
|
static baseEndpoint: string;
|
|
32
42
|
endpoint: string;
|
|
@@ -37,6 +47,7 @@ export declare class AppointmentReminders extends ThBaseHandler {
|
|
|
37
47
|
get(): Promise<AppointmentRemindersResponse>;
|
|
38
48
|
post(appointmentReminder: AppointmentReminderEntity): Promise<AppointmentRemindersResponse>;
|
|
39
49
|
patch(id: string, appointmentReminder: AppointmentReminderEntity): Promise<AppointmentRemindersResponse>;
|
|
50
|
+
sendTestReminder(payload: AppointmentRemindersTestReminderPayload): Promise<AppointmentRemindersTestReminderResponse>;
|
|
40
51
|
templates(): AppointmentReminderTemplates;
|
|
41
52
|
}
|
|
42
53
|
export declare class AppointmentReminderPatchFailed extends BaseError {
|
|
@@ -54,3 +65,8 @@ export declare class AppointmentReminderFetchFailed extends BaseError {
|
|
|
54
65
|
name: string;
|
|
55
66
|
constructor(message?: string, properties?: Record<string, unknown>);
|
|
56
67
|
}
|
|
68
|
+
export declare class AppointmentReminderSendTestReminderFailed extends BaseError {
|
|
69
|
+
message: string;
|
|
70
|
+
name: string;
|
|
71
|
+
constructor(message?: string, properties?: Record<string, unknown>);
|
|
72
|
+
}
|
package/dist/v0/invoices_uod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UodInvoicesFetchFailed = exports.UodInvoices = void 0;
|
|
3
|
+
exports.DocumentsDownloadFailed = exports.UodInvoicesFetchFailed = exports.UodInvoices = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var errors_1 = require("../errors");
|
|
6
6
|
var uri_helper_1 = require("../uri-helper");
|
|
@@ -55,6 +55,42 @@ var UodInvoices = (function (_super) {
|
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
|
+
UodInvoices.prototype.download = function (documentId, type) {
|
|
59
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
60
|
+
var uri, response, pdfObj, error_2;
|
|
61
|
+
return tslib_1.__generator(this, function (_a) {
|
|
62
|
+
switch (_a.label) {
|
|
63
|
+
case 0:
|
|
64
|
+
_a.trys.push([0, 2, , 3]);
|
|
65
|
+
uri = this.uriHelper.generateBaseUri("/download/" + documentId + "/type/" + type);
|
|
66
|
+
return [4, this.http.getClient().get(uri)];
|
|
67
|
+
case 1:
|
|
68
|
+
response = _a.sent();
|
|
69
|
+
pdfObj = response.data.results[0];
|
|
70
|
+
if ('correlationId' in pdfObj) {
|
|
71
|
+
return [2, {
|
|
72
|
+
correlationId: pdfObj.correlationId
|
|
73
|
+
}];
|
|
74
|
+
}
|
|
75
|
+
if ('url' in pdfObj) {
|
|
76
|
+
return [2, {
|
|
77
|
+
url: pdfObj.url,
|
|
78
|
+
filename: pdfObj.fileName
|
|
79
|
+
}];
|
|
80
|
+
}
|
|
81
|
+
return [2, {
|
|
82
|
+
data: pdfObj.base64Content,
|
|
83
|
+
contentType: pdfObj.contentType,
|
|
84
|
+
filename: pdfObj.fileName
|
|
85
|
+
}];
|
|
86
|
+
case 2:
|
|
87
|
+
error_2 = _a.sent();
|
|
88
|
+
throw new DocumentsDownloadFailed(error_2.message);
|
|
89
|
+
case 3: return [2];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
};
|
|
58
94
|
UodInvoices.baseEndpoint = '/api/v0/documents/unzer-one-invoices';
|
|
59
95
|
return UodInvoices;
|
|
60
96
|
}(base_1.ThBaseHandler));
|
|
@@ -72,4 +108,17 @@ var UodInvoicesFetchFailed = (function (_super) {
|
|
|
72
108
|
return UodInvoicesFetchFailed;
|
|
73
109
|
}(errors_1.BaseError));
|
|
74
110
|
exports.UodInvoicesFetchFailed = UodInvoicesFetchFailed;
|
|
111
|
+
var DocumentsDownloadFailed = (function (_super) {
|
|
112
|
+
tslib_1.__extends(DocumentsDownloadFailed, _super);
|
|
113
|
+
function DocumentsDownloadFailed(message, properties) {
|
|
114
|
+
if (message === void 0) { message = 'Could not download file'; }
|
|
115
|
+
var _this = _super.call(this, message, properties) || this;
|
|
116
|
+
_this.message = message;
|
|
117
|
+
_this.name = 'DocumentsDownloadFailed';
|
|
118
|
+
Object.setPrototypeOf(_this, DocumentsDownloadFailed.prototype);
|
|
119
|
+
return _this;
|
|
120
|
+
}
|
|
121
|
+
return DocumentsDownloadFailed;
|
|
122
|
+
}(errors_1.BaseError));
|
|
123
|
+
exports.DocumentsDownloadFailed = DocumentsDownloadFailed;
|
|
75
124
|
//# sourceMappingURL=invoices_uod.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices_uod.js","sourceRoot":"","sources":["../../src/v0/invoices_uod.ts"],"names":[],"mappings":";;;;AACA,oCAAqC;AACrC,4CAAyC;AACzC,gCAAuC;
|
|
1
|
+
{"version":3,"file":"invoices_uod.js","sourceRoot":"","sources":["../../src/v0/invoices_uod.ts"],"names":[],"mappings":";;;;AACA,oCAAqC;AACrC,4CAAyC;AACzC,gCAAuC;AA6DvC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,EACnD,UAAoC;QAD7B,wBAAA,EAAA,oCAA4C;QADrD,YAIE,kBAAM,OAAO,EAAE,UAAU,CAAC,SAE3B;QALQ,aAAO,GAAP,OAAO,CAAqC;QAF9C,UAAI,GAAG,wBAAwB,CAAA;QAMpC,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAA;;IAC/D,CAAC;IACH,6BAAC;AAAD,CAAC,AATD,CAA4C,kBAAS,GASpD;AATY,wDAAsB;AAWnC;IAA6C,mDAAS;IAEpD,iCACS,OAA2C,EAClD,UAAoC;QAD7B,wBAAA,EAAA,mCAA2C;QADpD,YAIE,kBAAM,OAAO,EAAE,UAAU,CAAC,SAE3B;QALQ,aAAO,GAAP,OAAO,CAAoC;QAF7C,UAAI,GAAG,yBAAyB,CAAA;QAMrC,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAA;;IAChE,CAAC;IACH,8BAAC;AAAD,CAAC,AATD,CAA6C,kBAAS,GASrD;AATY,0DAAuB"}
|
|
@@ -20,13 +20,14 @@ var AppointmentReminderTemplates = (function (_super) {
|
|
|
20
20
|
_this.uriHelper = new uri_helper_1.UriHelper(_this.endpoint, _this.options);
|
|
21
21
|
return _this;
|
|
22
22
|
}
|
|
23
|
-
AppointmentReminderTemplates.prototype.getAll = function () {
|
|
23
|
+
AppointmentReminderTemplates.prototype.getAll = function (query) {
|
|
24
24
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
25
|
-
var uri, response, error_1;
|
|
25
|
+
var base, uri, response, error_1;
|
|
26
26
|
return tslib_1.__generator(this, function (_a) {
|
|
27
27
|
switch (_a.label) {
|
|
28
28
|
case 0:
|
|
29
|
-
|
|
29
|
+
base = this.uriHelper.generateBaseUri('/templates');
|
|
30
|
+
uri = this.uriHelper.generateUriWithQuery(base, query);
|
|
30
31
|
_a.label = 1;
|
|
31
32
|
case 1:
|
|
32
33
|
_a.trys.push([1, 3, , 4]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-reminder-templates.js","sourceRoot":"","sources":["../../src/v1/appointment-reminder-templates.ts"],"names":[],"mappings":";;;;AACA,4CAAyC;AACzC,gCAAuC;AACvC,oCAAqC;
|
|
1
|
+
{"version":3,"file":"appointment-reminder-templates.js","sourceRoot":"","sources":["../../src/v1/appointment-reminder-templates.ts"],"names":[],"mappings":";;;;AACA,4CAAyC;AACzC,gCAAuC;AACvC,oCAAqC;AA+BrC;IAAkD,wDAAa;IAO7D,sCAAa,OAA4C,EAAE,IAAY;;QAAvE,YACE,kBAAM,IAAI,EAAE;YACV,QAAQ,EAAE,4BAA4B,CAAC,YAAY;YACnD,IAAI,QAAE,OAAO,CAAC,IAAI,mCAAI,yBAAyB;SAChD,CAAC,SAOH;QANC,KAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAEhB,KAAI,CAAC,QAAQ,GAAG,4BAA4B,CAAC,YAAY,CAAA;QACzD,KAAI,CAAC,OAAO,CAAC,IAAI,SAAG,KAAI,CAAC,OAAO,CAAC,IAAI,mCAAI,yBAAyB,CAAA;QAClE,KAAI,CAAC,SAAS,GAAG,IAAI,sBAAS,CAAC,KAAI,CAAC,QAAQ,EAAE,KAAI,CAAC,OAAO,CAAC,CAAA;;IAC7D,CAAC;IAEK,6CAAM,GAAZ,UAAc,KAAqD;;;;;;wBAC3D,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,YAAY,CAAC,CAAA;wBACnD,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;;;;wBAGzC,WAAM,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAA;;wBAA/C,QAAQ,GAAG,SAAoC;wBAErD,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;4BAC3B,MAAM,IAAI,uCAAuC,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;yBAC1F;wBAED,WAAO;gCACL,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAkD;gCACtE,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG;gCACtB,QAAQ,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;6BAClD,EAAA;;;wBAED,MAAM,IAAI,uCAAuC,CAAC,OAAK,CAAC,OAAO,EAAE,EAAE,KAAK,SAAA,EAAE,CAAC,CAAA;;;;;KAE9E;IAtCa,yCAAY,GAAG,6CAA6C,CAAA;IAuC5E,mCAAC;CAAA,AAxCD,CAAkD,oBAAa,GAwC9D;AAxCY,oEAA4B;AA0CzC;IAA6D,mEAAS;IAEpE,iDACS,OAAmE,EAC1E,UAAoC;QAD7B,wBAAA,EAAA,2DAAmE;QAD5E,YAIE,kBAAM,OAAO,EAAE,UAAU,CAAC,SAE3B;QALQ,aAAO,GAAP,OAAO,CAA4D;QAFrE,UAAI,GAAG,yCAAyC,CAAA;QAMrD,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,uCAAuC,CAAC,SAAS,CAAC,CAAA;;IAChF,CAAC;IACH,8CAAC;AAAD,CAAC,AATD,CAA6D,kBAAS,GASrE;AATY,0FAAuC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppointmentReminderFetchFailed = exports.AppointmentReminderPostFailed = exports.AppointmentReminderPatchFailed = exports.AppointmentReminders = void 0;
|
|
3
|
+
exports.AppointmentReminderSendTestReminderFailed = exports.AppointmentReminderFetchFailed = exports.AppointmentReminderPostFailed = exports.AppointmentReminderPatchFailed = exports.AppointmentReminders = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var uri_helper_1 = require("../uri-helper");
|
|
6
6
|
var base_1 = require("../base");
|
|
@@ -100,6 +100,30 @@ var AppointmentReminders = (function (_super) {
|
|
|
100
100
|
});
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
|
+
AppointmentReminders.prototype.sendTestReminder = function (payload) {
|
|
104
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
105
|
+
var uri, response, error_4;
|
|
106
|
+
return tslib_1.__generator(this, function (_a) {
|
|
107
|
+
switch (_a.label) {
|
|
108
|
+
case 0:
|
|
109
|
+
uri = this.uriHelper.generateBaseUri('/test-reminder');
|
|
110
|
+
_a.label = 1;
|
|
111
|
+
case 1:
|
|
112
|
+
_a.trys.push([1, 3, , 4]);
|
|
113
|
+
return [4, this.http.getClient().post(uri, payload)];
|
|
114
|
+
case 2:
|
|
115
|
+
response = _a.sent();
|
|
116
|
+
return [2, {
|
|
117
|
+
msg: response.data.results[0].msg
|
|
118
|
+
}];
|
|
119
|
+
case 3:
|
|
120
|
+
error_4 = _a.sent();
|
|
121
|
+
throw new AppointmentReminderSendTestReminderFailed(error_4.message, { error: error_4 });
|
|
122
|
+
case 4: return [2];
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
};
|
|
103
127
|
AppointmentReminders.prototype.templates = function () {
|
|
104
128
|
return new appointment_reminder_templates_1.AppointmentReminderTemplates(this.options, this.http);
|
|
105
129
|
};
|
|
@@ -146,4 +170,17 @@ var AppointmentReminderFetchFailed = (function (_super) {
|
|
|
146
170
|
return AppointmentReminderFetchFailed;
|
|
147
171
|
}(errors_1.BaseError));
|
|
148
172
|
exports.AppointmentReminderFetchFailed = AppointmentReminderFetchFailed;
|
|
173
|
+
var AppointmentReminderSendTestReminderFailed = (function (_super) {
|
|
174
|
+
tslib_1.__extends(AppointmentReminderSendTestReminderFailed, _super);
|
|
175
|
+
function AppointmentReminderSendTestReminderFailed(message, properties) {
|
|
176
|
+
if (message === void 0) { message = 'Could not send test reminder.'; }
|
|
177
|
+
var _this = _super.call(this, message, properties) || this;
|
|
178
|
+
_this.message = message;
|
|
179
|
+
_this.name = 'AppointmentReminderSendTestReminderFailed';
|
|
180
|
+
Object.setPrototypeOf(_this, AppointmentReminderSendTestReminderFailed.prototype);
|
|
181
|
+
return _this;
|
|
182
|
+
}
|
|
183
|
+
return AppointmentReminderSendTestReminderFailed;
|
|
184
|
+
}(errors_1.BaseError));
|
|
185
|
+
exports.AppointmentReminderSendTestReminderFailed = AppointmentReminderSendTestReminderFailed;
|
|
149
186
|
//# sourceMappingURL=appointment_reminders.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment_reminders.js","sourceRoot":"","sources":["../../src/v1/appointment_reminders.ts"],"names":[],"mappings":";;;;AACA,4CAAyC;AACzC,gCAAuC;AACvC,oCAAqC;AACrC,mFAA+E;
|
|
1
|
+
{"version":3,"file":"appointment_reminders.js","sourceRoot":"","sources":["../../src/v1/appointment_reminders.ts"],"names":[],"mappings":";;;;AACA,4CAAyC;AACzC,gCAAuC;AACvC,oCAAqC;AACrC,mFAA+E;AA0C/E;IAA0C,gDAAa;IAOrD,8BAAa,OAAoC,EAAE,IAAY;;QAA/D,YACE,kBAAM,IAAI,EAAE;YACV,QAAQ,EAAE,oBAAoB,CAAC,YAAY;YAC3C,IAAI,QAAE,OAAO,CAAC,IAAI,mCAAI,yBAAyB;SAChD,CAAC,SAOH;QANC,KAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAEhB,KAAI,CAAC,QAAQ,GAAG,oBAAoB,CAAC,YAAY,CAAA;QACjD,KAAI,CAAC,OAAO,CAAC,IAAI,SAAG,KAAI,CAAC,OAAO,CAAC,IAAI,mCAAI,yBAAyB,CAAA;QAClE,KAAI,CAAC,SAAS,GAAG,IAAI,sBAAS,CAAC,KAAI,CAAC,QAAQ,EAAE,KAAI,CAAC,OAAO,C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