@compassdigital/sdk.typescript 3.0.0-beta.14 → 3.0.0-beta.16
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/README.md +2 -2
- package/gen.ts +2 -3
- package/lib/base.d.ts.map +1 -1
- package/lib/base.js.map +1 -1
- package/lib/index.d.ts +43 -25
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -4
- package/lib/index.js.map +1 -1
- package/lib/interface/kds.d.ts +1 -0
- package/lib/interface/kds.d.ts.map +1 -1
- package/lib/interface/payment.d.ts +1 -0
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/user.d.ts +2 -0
- package/lib/interface/user.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/{client/index.ts → index.ts} +28 -25
- package/src/interface/kds.ts +2 -0
- package/src/interface/payment.ts +2 -0
- package/src/interface/user.ts +5 -1
- package/test/client.test.ts +1 -1
- package/lib/announcement.d.ts +0 -76
- package/lib/announcement.d.ts.map +0 -1
- package/lib/announcement.js +0 -4
- package/lib/announcement.js.map +0 -1
- package/lib/brand.d.ts +0 -16
- package/lib/brand.d.ts.map +0 -1
- package/lib/brand.js +0 -4
- package/lib/brand.js.map +0 -1
- package/lib/calendar.d.ts +0 -85
- package/lib/calendar.d.ts.map +0 -1
- package/lib/calendar.js +0 -4
- package/lib/calendar.js.map +0 -1
- package/lib/client/base.d.ts +0 -157
- package/lib/client/base.d.ts.map +0 -1
- package/lib/client/base.js +0 -392
- package/lib/client/base.js.map +0 -1
- package/lib/client/index.d.ts +0 -1877
- package/lib/client/index.d.ts.map +0 -1
- package/lib/client/index.js +0 -2208
- package/lib/client/index.js.map +0 -1
- package/lib/config.d.ts +0 -68
- package/lib/config.d.ts.map +0 -1
- package/lib/config.js +0 -4
- package/lib/config.js.map +0 -1
- package/lib/datalake.d.ts +0 -19
- package/lib/datalake.d.ts.map +0 -1
- package/lib/datalake.js +0 -4
- package/lib/datalake.js.map +0 -1
- package/lib/delivery.d.ts +0 -34
- package/lib/delivery.d.ts.map +0 -1
- package/lib/delivery.js +0 -4
- package/lib/delivery.js.map +0 -1
- package/lib/dh.d.ts +0 -9
- package/lib/dh.d.ts.map +0 -1
- package/lib/dh.js +0 -4
- package/lib/dh.js.map +0 -1
- package/lib/email.d.ts +0 -5
- package/lib/email.d.ts.map +0 -1
- package/lib/email.js +0 -4
- package/lib/email.js.map +0 -1
- package/lib/file.d.ts +0 -17
- package/lib/file.d.ts.map +0 -1
- package/lib/file.js +0 -4
- package/lib/file.js.map +0 -1
- package/lib/kds.d.ts +0 -58
- package/lib/kds.d.ts.map +0 -1
- package/lib/kds.js +0 -4
- package/lib/kds.js.map +0 -1
- package/lib/location.d.ts +0 -747
- package/lib/location.d.ts.map +0 -1
- package/lib/location.js +0 -4
- package/lib/location.js.map +0 -1
- package/lib/logger.d.ts +0 -29
- package/lib/logger.d.ts.map +0 -1
- package/lib/logger.js +0 -4
- package/lib/logger.js.map +0 -1
- package/lib/loyalty.d.ts +0 -350
- package/lib/loyalty.d.ts.map +0 -1
- package/lib/loyalty.js +0 -4
- package/lib/loyalty.js.map +0 -1
- package/lib/mealplan.d.ts +0 -177
- package/lib/mealplan.d.ts.map +0 -1
- package/lib/mealplan.js +0 -4
- package/lib/mealplan.js.map +0 -1
- package/lib/message.d.ts +0 -38
- package/lib/message.d.ts.map +0 -1
- package/lib/message.js +0 -4
- package/lib/message.js.map +0 -1
- package/lib/order.d.ts +0 -303
- package/lib/order.d.ts.map +0 -1
- package/lib/order.js +0 -4
- package/lib/order.js.map +0 -1
- package/lib/partner.d.ts +0 -402
- package/lib/partner.d.ts.map +0 -1
- package/lib/partner.js +0 -4
- package/lib/partner.js.map +0 -1
- package/lib/payment.d.ts +0 -250
- package/lib/payment.d.ts.map +0 -1
- package/lib/payment.js +0 -4
- package/lib/payment.js.map +0 -1
- package/lib/promo.d.ts +0 -312
- package/lib/promo.d.ts.map +0 -1
- package/lib/promo.js +0 -4
- package/lib/promo.js.map +0 -1
- package/lib/report.d.ts +0 -376
- package/lib/report.d.ts.map +0 -1
- package/lib/report.js +0 -4
- package/lib/report.js.map +0 -1
- package/lib/schedule.d.ts +0 -95
- package/lib/schedule.d.ts.map +0 -1
- package/lib/schedule.js +0 -4
- package/lib/schedule.js.map +0 -1
- package/lib/shoppingcart.d.ts +0 -279
- package/lib/shoppingcart.d.ts.map +0 -1
- package/lib/shoppingcart.js +0 -4
- package/lib/shoppingcart.js.map +0 -1
- package/lib/task.d.ts +0 -171
- package/lib/task.d.ts.map +0 -1
- package/lib/task.js +0 -4
- package/lib/task.js.map +0 -1
- package/lib/user.d.ts +0 -359
- package/lib/user.d.ts.map +0 -1
- package/lib/user.js +0 -4
- package/lib/user.js.map +0 -1
- package/lib/vote.d.ts +0 -52
- package/lib/vote.d.ts.map +0 -1
- package/lib/vote.js +0 -4
- package/lib/vote.js.map +0 -1
- /package/src/{client/base.ts → base.ts} +0 -0
package/lib/announcement.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
export interface Error {
|
|
2
|
-
code?: number;
|
|
3
|
-
message?: string;
|
|
4
|
-
}
|
|
5
|
-
export interface Success {
|
|
6
|
-
success?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface Announcement {
|
|
9
|
-
id?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
type?: string;
|
|
12
|
-
key?: string;
|
|
13
|
-
app?: string;
|
|
14
|
-
is_global?: boolean;
|
|
15
|
-
allowed_resources?: string[];
|
|
16
|
-
position?: number;
|
|
17
|
-
active?: boolean;
|
|
18
|
-
info?: {
|
|
19
|
-
en?: Announcement_info;
|
|
20
|
-
fr?: Announcement_info;
|
|
21
|
-
};
|
|
22
|
-
date?: any;
|
|
23
|
-
[index: string]: any;
|
|
24
|
-
}
|
|
25
|
-
export interface Announcements {
|
|
26
|
-
announcements?: Announcement[];
|
|
27
|
-
}
|
|
28
|
-
export interface Announcement_info {
|
|
29
|
-
image_url?: string;
|
|
30
|
-
title?: string;
|
|
31
|
-
description?: string;
|
|
32
|
-
sub_text?: string;
|
|
33
|
-
button_text?: string;
|
|
34
|
-
}
|
|
35
|
-
export declare type PostAnnouncementBody = Announcement;
|
|
36
|
-
export declare type PostAnnouncementResponse = Announcement;
|
|
37
|
-
export interface PostAnnouncementRequest {
|
|
38
|
-
body: PostAnnouncementBody;
|
|
39
|
-
}
|
|
40
|
-
export interface GetAnnouncementResourcePath {
|
|
41
|
-
id: string;
|
|
42
|
-
}
|
|
43
|
-
export interface GetAnnouncementResourceQuery {
|
|
44
|
-
allowed_resource_id?: string;
|
|
45
|
-
disabled?: boolean;
|
|
46
|
-
}
|
|
47
|
-
export declare type GetAnnouncementResourceResponse = Announcements;
|
|
48
|
-
export interface GetAnnouncementResourceRequest extends GetAnnouncementResourceQuery, GetAnnouncementResourcePath {
|
|
49
|
-
}
|
|
50
|
-
export interface GetAnnouncementResourcesQuery {
|
|
51
|
-
disabled?: boolean;
|
|
52
|
-
}
|
|
53
|
-
export declare type GetAnnouncementResourcesResponse = Announcements;
|
|
54
|
-
export interface GetAnnouncementResourcesRequest extends GetAnnouncementResourcesQuery {
|
|
55
|
-
}
|
|
56
|
-
export interface GetAnnouncementPath {
|
|
57
|
-
id: string;
|
|
58
|
-
}
|
|
59
|
-
export declare type GetAnnouncementResponse = Announcement;
|
|
60
|
-
export interface GetAnnouncementRequest extends GetAnnouncementPath {
|
|
61
|
-
}
|
|
62
|
-
export interface PutAnnouncementPath {
|
|
63
|
-
id: string;
|
|
64
|
-
}
|
|
65
|
-
export declare type PutAnnouncementBody = Announcement;
|
|
66
|
-
export declare type PutAnnouncementResponse = Announcement;
|
|
67
|
-
export interface PutAnnouncementRequest extends PutAnnouncementPath {
|
|
68
|
-
body: PutAnnouncementBody;
|
|
69
|
-
}
|
|
70
|
-
export interface DeleteAnnouncementPath {
|
|
71
|
-
id: string;
|
|
72
|
-
}
|
|
73
|
-
export declare type DeleteAnnouncementResponse = Success;
|
|
74
|
-
export interface DeleteAnnouncementRequest extends DeleteAnnouncementPath {
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=announcement.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"announcement.d.ts","sourceRoot":"","sources":["../src/announcement.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,KAAK;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAE3B,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,IAAI,CAAC,EAAE;QACL,EAAE,CAAC,EAAE,iBAAiB,CAAC;QACvB,EAAE,CAAC,EAAE,iBAAiB,CAAC;KACxB,CAAC;IACF,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAID,oBAAY,oBAAoB,GAAG,YAAY,CAAC;AAEhD,oBAAY,wBAAwB,GAAG,YAAY,CAAC;AAEpD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAID,MAAM,WAAW,2BAA2B;IAE1C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,4BAA4B;IAE3C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,oBAAY,+BAA+B,GAAG,aAAa,CAAC;AAE5D,MAAM,WAAW,8BACf,SAAQ,4BAA4B,EAClC,2BAA2B;CAAG;AAIlC,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,oBAAY,gCAAgC,GAAG,aAAa,CAAC;AAE7D,MAAM,WAAW,+BAAgC,SAAQ,6BAA6B;CAAG;AAIzF,MAAM,WAAW,mBAAmB;IAElC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,oBAAY,uBAAuB,GAAG,YAAY,CAAC;AAEnD,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;CAAG;AAItE,MAAM,WAAW,mBAAmB;IAElC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,oBAAY,mBAAmB,GAAG,YAAY,CAAC;AAE/C,oBAAY,uBAAuB,GAAG,YAAY,CAAC;AAEnD,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAID,MAAM,WAAW,sBAAsB;IAErC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,oBAAY,0BAA0B,GAAG,OAAO,CAAC;AAEjD,MAAM,WAAW,yBAA0B,SAAQ,sBAAsB;CAAG"}
|
package/lib/announcement.js
DELETED
package/lib/announcement.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"announcement.js","sourceRoot":"","sources":["../src/announcement.ts"],"names":[],"mappings":";AAAA,sDAAsD"}
|
package/lib/brand.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface Brand {
|
|
2
|
-
id?: string;
|
|
3
|
-
name?: string;
|
|
4
|
-
style?: any;
|
|
5
|
-
}
|
|
6
|
-
export interface GetBrandPath {
|
|
7
|
-
id: string;
|
|
8
|
-
}
|
|
9
|
-
export declare type GetBrandResponse = Brand;
|
|
10
|
-
export interface GetBrandRequest extends GetBrandPath {
|
|
11
|
-
}
|
|
12
|
-
export interface GetBrandsResponse {
|
|
13
|
-
brands?: Brand[];
|
|
14
|
-
}
|
|
15
|
-
export declare type GetBrandsRequest = {};
|
|
16
|
-
//# sourceMappingURL=brand.d.ts.map
|
package/lib/brand.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../src/brand.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,KAAK;IAEpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAID,MAAM,WAAW,YAAY;IAE3B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,oBAAY,gBAAgB,GAAG,KAAK,CAAC;AAErC,MAAM,WAAW,eAAgB,SAAQ,YAAY;CAAG;AAIxD,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB;AAED,oBAAY,gBAAgB,GAAG,EAAE,CAAC"}
|
package/lib/brand.js
DELETED
package/lib/brand.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand.js","sourceRoot":"","sources":["../src/brand.ts"],"names":[],"mappings":";AAAA,sDAAsD"}
|
package/lib/calendar.d.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
export interface Error {
|
|
2
|
-
message?: string;
|
|
3
|
-
code?: number;
|
|
4
|
-
}
|
|
5
|
-
export interface Event {
|
|
6
|
-
data?: {
|
|
7
|
-
title?: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
color?: string;
|
|
10
|
-
forecolor?: string;
|
|
11
|
-
icon?: string;
|
|
12
|
-
busy?: boolean;
|
|
13
|
-
calendar?: string;
|
|
14
|
-
location?: string;
|
|
15
|
-
id?: string;
|
|
16
|
-
[index: string]: any;
|
|
17
|
-
};
|
|
18
|
-
schedule?: {
|
|
19
|
-
duration?: number;
|
|
20
|
-
times?: string[];
|
|
21
|
-
dayOfWeek?: number[];
|
|
22
|
-
[index: string]: any;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export interface Calendar {
|
|
26
|
-
id?: string;
|
|
27
|
-
timezone?: string;
|
|
28
|
-
events?: Event[];
|
|
29
|
-
date?: {
|
|
30
|
-
last_sync?: number;
|
|
31
|
-
last_sync_error?: number;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export interface CDLCalendar {
|
|
35
|
-
id?: string;
|
|
36
|
-
business?: {
|
|
37
|
-
[index: string]: any;
|
|
38
|
-
}[];
|
|
39
|
-
delivery?: {
|
|
40
|
-
[index: string]: any;
|
|
41
|
-
}[];
|
|
42
|
-
menus?: {
|
|
43
|
-
[index: string]: any;
|
|
44
|
-
}[];
|
|
45
|
-
}
|
|
46
|
-
export interface UpdatedCalendar {
|
|
47
|
-
events?: Event[];
|
|
48
|
-
}
|
|
49
|
-
export interface Success {
|
|
50
|
-
success?: boolean;
|
|
51
|
-
}
|
|
52
|
-
export interface GetCalendarPath {
|
|
53
|
-
id: string;
|
|
54
|
-
}
|
|
55
|
-
export declare type GetCalendarResponse = Calendar;
|
|
56
|
-
export interface GetCalendarRequest extends GetCalendarPath {
|
|
57
|
-
}
|
|
58
|
-
export interface PutCalendarPath {
|
|
59
|
-
id: string;
|
|
60
|
-
}
|
|
61
|
-
export declare type PutCalendarBody = UpdatedCalendar;
|
|
62
|
-
export declare type PutCalendarResponse = Calendar;
|
|
63
|
-
export interface PutCalendarRequest extends PutCalendarPath {
|
|
64
|
-
body: PutCalendarBody;
|
|
65
|
-
}
|
|
66
|
-
export interface GetCalendarCdlPath {
|
|
67
|
-
id: string;
|
|
68
|
-
}
|
|
69
|
-
export interface GetCalendarCdlQuery {
|
|
70
|
-
start_date?: number;
|
|
71
|
-
}
|
|
72
|
-
export declare type GetCalendarCdlResponse = CDLCalendar;
|
|
73
|
-
export interface GetCalendarCdlRequest extends GetCalendarCdlQuery, GetCalendarCdlPath {
|
|
74
|
-
}
|
|
75
|
-
export interface GetCalendarSwaggerResponse {
|
|
76
|
-
[index: string]: any;
|
|
77
|
-
}
|
|
78
|
-
export declare type GetCalendarSwaggerRequest = {};
|
|
79
|
-
export interface PostCalendarSyncPath {
|
|
80
|
-
id: string;
|
|
81
|
-
}
|
|
82
|
-
export declare type PostCalendarSyncResponse = Success;
|
|
83
|
-
export interface PostCalendarSyncRequest extends PostCalendarSyncPath {
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=calendar.d.ts.map
|
package/lib/calendar.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../src/calendar.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,KAAK;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,CA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AAE9C,oBAAY,mBAAmB,GAAG,QAAQ,CAAC;AAE3C,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,IAAI,EAAE,eAAe,CAAC;CACvB;AAID,MAAM,WAAW,kBAAkB;IAEjC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,mBAAmB;IAElC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,oBAAY,sBAAsB,GAAG,WAAW,CAAC;AAEjD,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB,EAAE,kBAAkB;CAAG;AAIzF,MAAM,WAAW,0BAA0B;IACzC,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,oBAAY,yBAAyB,GAAG,EAAE,CAAC;AAI3C,MAAM,WAAW,oBAAoB;IAEnC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,oBAAY,wBAAwB,GAAG,OAAO,CAAC;AAE/C,MAAM,WAAW,uBAAwB,SAAQ,oBAAoB;CAAG"}
|
package/lib/calendar.js
DELETED
package/lib/calendar.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../src/calendar.ts"],"names":[],"mappings":";AAAA,sDAAsD"}
|
package/lib/client/base.d.ts
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
export interface RequestOptions {
|
|
2
|
-
stage?: string;
|
|
3
|
-
token?: string;
|
|
4
|
-
headers?: Record<string, string>;
|
|
5
|
-
debug?: boolean;
|
|
6
|
-
retry?: number;
|
|
7
|
-
base_url?: string;
|
|
8
|
-
intercept?: InterceptFn;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* The request data provided to intercept
|
|
12
|
-
* functions.
|
|
13
|
-
*/
|
|
14
|
-
export interface RequestData {
|
|
15
|
-
name: string;
|
|
16
|
-
service: string;
|
|
17
|
-
url: string;
|
|
18
|
-
method: string;
|
|
19
|
-
headers: Record<string, string>;
|
|
20
|
-
body?: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The response data expected from
|
|
24
|
-
* intercept functions.
|
|
25
|
-
*/
|
|
26
|
-
export interface ResponseData {
|
|
27
|
-
ok: boolean;
|
|
28
|
-
status: number;
|
|
29
|
-
body: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* A function that performs an https request.
|
|
33
|
-
*/
|
|
34
|
-
export declare type FetchFn = (req: RequestData) => Promise<ResponseData>;
|
|
35
|
-
/**
|
|
36
|
-
* A function that intercepts an http request and returns a response.
|
|
37
|
-
*/
|
|
38
|
-
export declare type InterceptFn = (req: RequestData, fetch: FetchFn) => Promise<ResponseData>;
|
|
39
|
-
/**
|
|
40
|
-
* We have to re-implement the promise methods instead of just existing
|
|
41
|
-
* the existing Promise class due to: https://github.com/microsoft/TypeScript/issues/15202
|
|
42
|
-
*/
|
|
43
|
-
export declare class ResponsePromise<T> implements Promise<T> {
|
|
44
|
-
private promise;
|
|
45
|
-
/**
|
|
46
|
-
* Implements Promise interface.
|
|
47
|
-
*/
|
|
48
|
-
[Symbol.toStringTag]: string;
|
|
49
|
-
constructor(promise: Promise<T>);
|
|
50
|
-
/**
|
|
51
|
-
* Implements Promise interface.
|
|
52
|
-
*/
|
|
53
|
-
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): ResponsePromise<TResult1 | TResult2>;
|
|
54
|
-
/**
|
|
55
|
-
* Implements Promise interface.
|
|
56
|
-
*/
|
|
57
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): ResponsePromise<T | TResult>;
|
|
58
|
-
/**
|
|
59
|
-
* Implements Promise interface.
|
|
60
|
-
*/
|
|
61
|
-
finally(onfinally?: (() => void) | null): ResponsePromise<T>;
|
|
62
|
-
/**
|
|
63
|
-
* Returns a promise that resolves to null if http status code
|
|
64
|
-
* or service error code matches one of the provided codes.
|
|
65
|
-
* If no codes are specified, all codes are ignored.
|
|
66
|
-
*/
|
|
67
|
-
ignore(...codes: number[]): ResponsePromise<T | null>;
|
|
68
|
-
/**
|
|
69
|
-
* Returns a promise that resolves to either the response body
|
|
70
|
-
* or a ServiceError.
|
|
71
|
-
*/
|
|
72
|
-
combine(...codes: number[]): Promise<EitherResponse<T>>;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Either a response body or a service error.
|
|
76
|
-
*/
|
|
77
|
-
declare type EitherResponse<T> = {
|
|
78
|
-
ok: true;
|
|
79
|
-
data: T;
|
|
80
|
-
err: null;
|
|
81
|
-
} | {
|
|
82
|
-
ok: false;
|
|
83
|
-
data: null;
|
|
84
|
-
err: ServiceError;
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* An error returned from an api service.
|
|
88
|
-
*/
|
|
89
|
-
export declare class ServiceError extends Error {
|
|
90
|
-
status: number;
|
|
91
|
-
code: number;
|
|
92
|
-
constructor(status: number, // http status
|
|
93
|
-
code: number, // service error code
|
|
94
|
-
message: string);
|
|
95
|
-
/**
|
|
96
|
-
* Returns the http status code from err.
|
|
97
|
-
* If err isn't an instance of ServiceError, -1 is returned.
|
|
98
|
-
*/
|
|
99
|
-
static status(err: any): number;
|
|
100
|
-
/**
|
|
101
|
-
* Returns the service error code from err.
|
|
102
|
-
* If err isn't an instance of ServiceError, -1 is returned.
|
|
103
|
-
*/
|
|
104
|
-
static code(err: any): number;
|
|
105
|
-
/**
|
|
106
|
-
* Returns a promise that resolves to null if http status code
|
|
107
|
-
* or service error code matches one of the provided codes.
|
|
108
|
-
* If no codes are specified, all codes are ignored.
|
|
109
|
-
*/
|
|
110
|
-
static ignore<T>(codes: number[], response: Promise<T>): Promise<T | null>;
|
|
111
|
-
/**
|
|
112
|
-
* Returns a promise that resolves to either T or a ServiceError.
|
|
113
|
-
*/
|
|
114
|
-
static combine<T>(codes: number[], response: Promise<T>): Promise<EitherResponse<T>>;
|
|
115
|
-
/**
|
|
116
|
-
* Constructs a ServiceError from the provided response data.
|
|
117
|
-
*/
|
|
118
|
-
static from_res(res: ResponseData): ServiceError;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* BaseServiceClient contains the logic for executing http requests.
|
|
122
|
-
* This class is meant to be extended by the generated code.
|
|
123
|
-
*/
|
|
124
|
-
export declare abstract class BaseServiceClient {
|
|
125
|
-
private options;
|
|
126
|
-
constructor(options?: RequestOptions);
|
|
127
|
-
/**
|
|
128
|
-
* Combine the route and query parameters into a full url.
|
|
129
|
-
*/
|
|
130
|
-
private build_url;
|
|
131
|
-
/**
|
|
132
|
-
* Perform the http request or pass it to the intercept function
|
|
133
|
-
* if one was configured.
|
|
134
|
-
*/
|
|
135
|
-
private fetch;
|
|
136
|
-
/**
|
|
137
|
-
* Returns true if the response status was a 4xx error.
|
|
138
|
-
*/
|
|
139
|
-
private is_4xx;
|
|
140
|
-
/**
|
|
141
|
-
* Returns the merged options.
|
|
142
|
-
*/
|
|
143
|
-
private get_options;
|
|
144
|
-
/**
|
|
145
|
-
* A delegate to _request that wraps the response in a ResponsePromise.
|
|
146
|
-
*/
|
|
147
|
-
protected request(service: string, name: string, method: string, route: string, body: any, options?: {
|
|
148
|
-
query?: any;
|
|
149
|
-
} & RequestOptions): ResponsePromise<any>;
|
|
150
|
-
/**
|
|
151
|
-
* The main logic for fulfilling a request as perscribed by
|
|
152
|
-
* the request options.
|
|
153
|
-
*/
|
|
154
|
-
private _request;
|
|
155
|
-
}
|
|
156
|
-
export {};
|
|
157
|
-
//# sourceMappingURL=base.d.ts.map
|
package/lib/client/base.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/client/base.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAE7B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,MAAM,CAA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