@compassdigital/sdk.typescript 4.91.0 → 4.93.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/lib/index.d.ts +11 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/announcement.d.ts +89 -26
- package/lib/interface/announcement.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +26 -2
- package/src/interface/announcement.ts +134 -33
|
@@ -13,45 +13,105 @@ export interface Success {
|
|
|
13
13
|
success?: boolean;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export interface
|
|
17
|
-
//
|
|
18
|
-
|
|
16
|
+
export interface AnnouncementPostRequestBody {
|
|
17
|
+
// Name of Announcement
|
|
18
|
+
name: string;
|
|
19
|
+
// Announcement Type
|
|
20
|
+
type: string;
|
|
21
|
+
// App name
|
|
22
|
+
app: 'Boost' | 'Thrive' | 'Nourish' | 'JJKitchen' | 'Rogers';
|
|
23
|
+
// True if all the sites are linked
|
|
24
|
+
is_global?: boolean;
|
|
25
|
+
allowed_resources?: string[];
|
|
26
|
+
position: number;
|
|
27
|
+
//@deprecated
|
|
28
|
+
active?: boolean;
|
|
29
|
+
// Status of the announcement
|
|
30
|
+
status?: 'draft' | 'active' | 'disabled';
|
|
31
|
+
// Announcement Properties
|
|
32
|
+
info?: {
|
|
33
|
+
en?: AnnouncementInfo;
|
|
34
|
+
fr?: AnnouncementInfo;
|
|
35
|
+
};
|
|
36
|
+
schedule?: Schedule;
|
|
37
|
+
[index: string]: any;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface AnnouncementPutRequestBody {
|
|
41
|
+
// Name of Announcement
|
|
42
|
+
name: string;
|
|
43
|
+
// Announcement Type
|
|
44
|
+
type: string;
|
|
45
|
+
// True if all the sites are linked
|
|
46
|
+
is_global?: boolean;
|
|
47
|
+
allowed_resources?: string[];
|
|
48
|
+
position: number;
|
|
49
|
+
//@deprecated
|
|
50
|
+
active?: boolean;
|
|
51
|
+
// Status of the announcement
|
|
52
|
+
status?: 'draft' | 'active' | 'disabled';
|
|
53
|
+
// Announcement Properties
|
|
54
|
+
info?: {
|
|
55
|
+
en?: AnnouncementInfo;
|
|
56
|
+
fr?: AnnouncementInfo;
|
|
57
|
+
};
|
|
58
|
+
schedule?: Schedule;
|
|
59
|
+
[index: string]: any;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface AnnouncementPatchRequestBody {
|
|
19
63
|
// Name of Announcement
|
|
20
64
|
name?: string;
|
|
21
|
-
// Date created
|
|
22
|
-
created_at?: string;
|
|
23
|
-
// Date modified
|
|
24
|
-
last_modified?: string;
|
|
25
65
|
// Announcement Type
|
|
26
66
|
type?: string;
|
|
27
|
-
key?: string;
|
|
28
|
-
// App name
|
|
29
|
-
app?: string;
|
|
30
67
|
// True if all the sites are linked
|
|
31
68
|
is_global?: boolean;
|
|
32
69
|
allowed_resources?: string[];
|
|
33
70
|
position?: number;
|
|
71
|
+
//@deprecated
|
|
34
72
|
active?: boolean;
|
|
73
|
+
// Status of the announcement
|
|
74
|
+
status?: 'draft' | 'active' | 'disabled';
|
|
35
75
|
// Announcement Properties
|
|
36
76
|
info?: {
|
|
37
|
-
en?:
|
|
38
|
-
fr?:
|
|
77
|
+
en?: AnnouncementInfo;
|
|
78
|
+
fr?: AnnouncementInfo;
|
|
39
79
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
80
|
+
schedule?: Schedule;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface Announcement {
|
|
84
|
+
// announcement
|
|
85
|
+
id: string;
|
|
86
|
+
// Name of Announcement
|
|
87
|
+
name: string;
|
|
88
|
+
// Announcement Type
|
|
89
|
+
type: string;
|
|
90
|
+
key: string;
|
|
91
|
+
// App name
|
|
92
|
+
app: 'Boost' | 'Thrive' | 'Nourish' | 'JJKitchen' | 'Rogers';
|
|
93
|
+
// True if all the sites are linked
|
|
94
|
+
is_global: boolean;
|
|
95
|
+
allowed_resources: string[];
|
|
96
|
+
//@deprecated
|
|
97
|
+
active: boolean;
|
|
98
|
+
// Status of the announcement
|
|
99
|
+
status?: 'draft' | 'active' | 'disabled';
|
|
100
|
+
schedule: Schedule;
|
|
101
|
+
// Date created
|
|
102
|
+
created_at: string;
|
|
103
|
+
// Date modified
|
|
104
|
+
last_modified: string;
|
|
105
|
+
position?: number;
|
|
106
|
+
// Announcement Properties
|
|
107
|
+
info?: {
|
|
108
|
+
en?: AnnouncementInfo;
|
|
109
|
+
fr?: AnnouncementInfo;
|
|
52
110
|
};
|
|
111
|
+
//@deprecated
|
|
53
112
|
date?: Record<string, any>;
|
|
54
|
-
author?:
|
|
113
|
+
author?: User;
|
|
114
|
+
edit_history?: EditHistory[];
|
|
55
115
|
[index: string]: any;
|
|
56
116
|
}
|
|
57
117
|
|
|
@@ -59,15 +119,15 @@ export interface Announcements {
|
|
|
59
119
|
announcements?: Announcement[];
|
|
60
120
|
}
|
|
61
121
|
|
|
62
|
-
export interface
|
|
122
|
+
export interface AnnouncementInfo {
|
|
63
123
|
image_url?: string;
|
|
64
|
-
title
|
|
65
|
-
description
|
|
66
|
-
sub_text
|
|
124
|
+
title: string;
|
|
125
|
+
description: string;
|
|
126
|
+
sub_text: string;
|
|
67
127
|
button_text?: string;
|
|
68
128
|
}
|
|
69
129
|
|
|
70
|
-
export interface
|
|
130
|
+
export interface User {
|
|
71
131
|
id: string;
|
|
72
132
|
name: {
|
|
73
133
|
first?: string;
|
|
@@ -75,9 +135,29 @@ export interface Author {
|
|
|
75
135
|
};
|
|
76
136
|
}
|
|
77
137
|
|
|
138
|
+
export interface EditHistory {
|
|
139
|
+
date?: string;
|
|
140
|
+
user?: User;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface Schedule {
|
|
144
|
+
// If true, refer to `sites`, if false, refer to start/end times below
|
|
145
|
+
variable: boolean;
|
|
146
|
+
start_datetime?: string;
|
|
147
|
+
// Maximum 1 year from today
|
|
148
|
+
end_datetime?: string;
|
|
149
|
+
sites?: {
|
|
150
|
+
// group
|
|
151
|
+
id: string;
|
|
152
|
+
start_datetime: string;
|
|
153
|
+
// Maximum 1 year from today
|
|
154
|
+
end_datetime: string;
|
|
155
|
+
}[];
|
|
156
|
+
}
|
|
157
|
+
|
|
78
158
|
// POST /announcement - Create Announcement
|
|
79
159
|
|
|
80
|
-
export type PostAnnouncementBody =
|
|
160
|
+
export type PostAnnouncementBody = AnnouncementPostRequestBody;
|
|
81
161
|
|
|
82
162
|
export type PostAnnouncementResponse = Announcement;
|
|
83
163
|
|
|
@@ -93,7 +173,7 @@ export interface GetAnnouncementsQuery {
|
|
|
93
173
|
// Filter by latest creation date
|
|
94
174
|
created_at_end?: string;
|
|
95
175
|
// Filter by earliest modified date
|
|
96
|
-
last_modified_start
|
|
176
|
+
last_modified_start?: string;
|
|
97
177
|
// Filter by latest modified date
|
|
98
178
|
last_modified_end?: string;
|
|
99
179
|
// Filter by earliest start date
|
|
@@ -113,6 +193,12 @@ export interface GetAnnouncementsQuery {
|
|
|
113
193
|
enabled?: boolean;
|
|
114
194
|
// Filter by announcement purpose
|
|
115
195
|
purpose?: string;
|
|
196
|
+
// Filter by author name
|
|
197
|
+
author?: string;
|
|
198
|
+
// Field to sort by
|
|
199
|
+
sort_by?: string;
|
|
200
|
+
// Sort order (ASC or DESC)
|
|
201
|
+
sort_order?: string;
|
|
116
202
|
// Graphql query string
|
|
117
203
|
_query?: string;
|
|
118
204
|
}
|
|
@@ -147,7 +233,7 @@ export interface PutAnnouncementPath {
|
|
|
147
233
|
id: string;
|
|
148
234
|
}
|
|
149
235
|
|
|
150
|
-
export type PutAnnouncementBody =
|
|
236
|
+
export type PutAnnouncementBody = AnnouncementPutRequestBody;
|
|
151
237
|
|
|
152
238
|
export type PutAnnouncementResponse = Announcement;
|
|
153
239
|
|
|
@@ -155,6 +241,21 @@ export interface PutAnnouncementRequest extends BaseRequest, PutAnnouncementPath
|
|
|
155
241
|
body: PutAnnouncementBody;
|
|
156
242
|
}
|
|
157
243
|
|
|
244
|
+
// PATCH /announcement/{id} - Update Announcement
|
|
245
|
+
|
|
246
|
+
export interface PatchAnnouncementPath {
|
|
247
|
+
// ID of the announcement to update
|
|
248
|
+
id: string;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export type PatchAnnouncementBody = AnnouncementPatchRequestBody;
|
|
252
|
+
|
|
253
|
+
export type PatchAnnouncementResponse = Announcement;
|
|
254
|
+
|
|
255
|
+
export interface PatchAnnouncementRequest extends BaseRequest, PatchAnnouncementPath {
|
|
256
|
+
body: PatchAnnouncementBody;
|
|
257
|
+
}
|
|
258
|
+
|
|
158
259
|
// DELETE /announcement/{id} - Delete announcement item
|
|
159
260
|
|
|
160
261
|
export interface DeleteAnnouncementPath {
|