@pitcher/js-api 1.22.0-beta.0 → 1.22.0-beta.1

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.
@@ -1,9 +1,13 @@
1
- import { Canvas } from '../../../types/openapi';
1
+ import { Canvas, PaginatedCanvasList } from '../../../types/openapi';
2
2
 
3
+ export type CanvasSelectionType = 'canvas' | 'canvas-template' | 'section' | 'section-template';
4
+ export type CanvasSelection = {
5
+ id: Canvas['id'];
6
+ };
3
7
  export type AppProps = {
4
8
  appName: 'impact' | 'admin';
5
9
  primaryActionText?: string;
6
- };
7
- export type CanvasSelection = {
8
- id: Canvas['id'];
10
+ listCanvases: (params: any) => Promise<PaginatedCanvasList>;
11
+ allowedSelectorTypes?: CanvasSelectionType[];
12
+ selections?: CanvasSelection[];
9
13
  };
@@ -0,0 +1,3 @@
1
+ import { CanvasSelectionType } from '@canvas-selector/appTypes';
2
+
3
+ export declare const availableSelectorTypes: CanvasSelectionType[];
@@ -0,0 +1,415 @@
1
+ import { CanvasSelectionType } from '@canvas-selector/appTypes';
2
+
3
+ declare function cleanup(): void;
4
+ export default function useApp(): {
5
+ activeSelectionType: import('vue').Ref<CanvasSelectionType | null>;
6
+ data: import('vue').Ref<{
7
+ canvases?: {
8
+ readonly id: string;
9
+ name: string;
10
+ is_draft?: boolean | undefined;
11
+ is_template?: boolean | undefined;
12
+ is_section?: boolean | undefined;
13
+ is_editable?: boolean | undefined;
14
+ is_default?: boolean | undefined;
15
+ metadata?: Record<string, any> | undefined;
16
+ tags?: Array<string> | undefined;
17
+ start_at?: (string | null) | undefined;
18
+ expires_at?: (string | null) | undefined;
19
+ access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
20
+ thumbnail_url?: (string | null) | undefined;
21
+ readonly template: {
22
+ readonly id: string;
23
+ name: string;
24
+ };
25
+ readonly shared_link: {
26
+ readonly url: string;
27
+ short_url?: (string | null) | undefined;
28
+ };
29
+ account?: {
30
+ id: string;
31
+ name: string;
32
+ } | null | undefined;
33
+ folder_id?: (string | null) | undefined;
34
+ readonly owned_by: {
35
+ readonly id: number;
36
+ readonly name: string;
37
+ email?: string | undefined;
38
+ };
39
+ readonly created_at: string;
40
+ readonly created_by: {
41
+ readonly id: number;
42
+ readonly name: string;
43
+ email?: string | undefined;
44
+ };
45
+ readonly modified_at: string;
46
+ readonly modified_by: {
47
+ readonly id: number;
48
+ readonly name: string;
49
+ email?: string | undefined;
50
+ };
51
+ }[] | undefined;
52
+ canvasTemplates?: {
53
+ readonly id: string;
54
+ name: string;
55
+ is_draft?: boolean | undefined;
56
+ is_template?: boolean | undefined;
57
+ is_section?: boolean | undefined;
58
+ is_editable?: boolean | undefined;
59
+ is_default?: boolean | undefined;
60
+ metadata?: Record<string, any> | undefined;
61
+ tags?: Array<string> | undefined;
62
+ start_at?: (string | null) | undefined;
63
+ expires_at?: (string | null) | undefined;
64
+ access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
65
+ thumbnail_url?: (string | null) | undefined;
66
+ readonly template: {
67
+ readonly id: string;
68
+ name: string;
69
+ };
70
+ readonly shared_link: {
71
+ readonly url: string;
72
+ short_url?: (string | null) | undefined;
73
+ };
74
+ account?: {
75
+ id: string;
76
+ name: string;
77
+ } | null | undefined;
78
+ folder_id?: (string | null) | undefined;
79
+ readonly owned_by: {
80
+ readonly id: number;
81
+ readonly name: string;
82
+ email?: string | undefined;
83
+ };
84
+ readonly created_at: string;
85
+ readonly created_by: {
86
+ readonly id: number;
87
+ readonly name: string;
88
+ email?: string | undefined;
89
+ };
90
+ readonly modified_at: string;
91
+ readonly modified_by: {
92
+ readonly id: number;
93
+ readonly name: string;
94
+ email?: string | undefined;
95
+ };
96
+ }[] | undefined;
97
+ sections?: {
98
+ readonly id: string;
99
+ name: string;
100
+ is_draft?: boolean | undefined;
101
+ is_template?: boolean | undefined;
102
+ is_section?: boolean | undefined;
103
+ is_editable?: boolean | undefined;
104
+ is_default?: boolean | undefined;
105
+ metadata?: Record<string, any> | undefined;
106
+ tags?: Array<string> | undefined;
107
+ start_at?: (string | null) | undefined;
108
+ expires_at?: (string | null) | undefined;
109
+ access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
110
+ thumbnail_url?: (string | null) | undefined;
111
+ readonly template: {
112
+ readonly id: string;
113
+ name: string;
114
+ };
115
+ readonly shared_link: {
116
+ readonly url: string;
117
+ short_url?: (string | null) | undefined;
118
+ };
119
+ account?: {
120
+ id: string;
121
+ name: string;
122
+ } | null | undefined;
123
+ folder_id?: (string | null) | undefined;
124
+ readonly owned_by: {
125
+ readonly id: number;
126
+ readonly name: string;
127
+ email?: string | undefined;
128
+ };
129
+ readonly created_at: string;
130
+ readonly created_by: {
131
+ readonly id: number;
132
+ readonly name: string;
133
+ email?: string | undefined;
134
+ };
135
+ readonly modified_at: string;
136
+ readonly modified_by: {
137
+ readonly id: number;
138
+ readonly name: string;
139
+ email?: string | undefined;
140
+ };
141
+ }[] | undefined;
142
+ sectionTemplates?: {
143
+ readonly id: string;
144
+ name: string;
145
+ is_draft?: boolean | undefined;
146
+ is_template?: boolean | undefined;
147
+ is_section?: boolean | undefined;
148
+ is_editable?: boolean | undefined;
149
+ is_default?: boolean | undefined;
150
+ metadata?: Record<string, any> | undefined;
151
+ tags?: Array<string> | undefined;
152
+ start_at?: (string | null) | undefined;
153
+ expires_at?: (string | null) | undefined;
154
+ access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
155
+ thumbnail_url?: (string | null) | undefined;
156
+ readonly template: {
157
+ readonly id: string;
158
+ name: string;
159
+ };
160
+ readonly shared_link: {
161
+ readonly url: string;
162
+ short_url?: (string | null) | undefined;
163
+ };
164
+ account?: {
165
+ id: string;
166
+ name: string;
167
+ } | null | undefined;
168
+ folder_id?: (string | null) | undefined;
169
+ readonly owned_by: {
170
+ readonly id: number;
171
+ readonly name: string;
172
+ email?: string | undefined;
173
+ };
174
+ readonly created_at: string;
175
+ readonly created_by: {
176
+ readonly id: number;
177
+ readonly name: string;
178
+ email?: string | undefined;
179
+ };
180
+ readonly modified_at: string;
181
+ readonly modified_by: {
182
+ readonly id: number;
183
+ readonly name: string;
184
+ email?: string | undefined;
185
+ };
186
+ }[] | undefined;
187
+ } | null>;
188
+ selectedItems: import('vue').Ref<{
189
+ readonly id: string;
190
+ name: string;
191
+ is_draft?: boolean | undefined;
192
+ is_template?: boolean | undefined;
193
+ is_section?: boolean | undefined;
194
+ is_editable?: boolean | undefined;
195
+ is_default?: boolean | undefined;
196
+ metadata?: Record<string, any> | undefined;
197
+ tags?: Array<string> | undefined;
198
+ start_at?: (string | null) | undefined;
199
+ expires_at?: (string | null) | undefined;
200
+ access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
201
+ thumbnail_url?: (string | null) | undefined;
202
+ readonly template: {
203
+ readonly id: string;
204
+ name: string;
205
+ };
206
+ readonly shared_link: {
207
+ readonly url: string;
208
+ short_url?: (string | null) | undefined;
209
+ };
210
+ account?: {
211
+ id: string;
212
+ name: string;
213
+ } | null | undefined;
214
+ folder_id?: (string | null) | undefined;
215
+ readonly owned_by: {
216
+ readonly id: number;
217
+ readonly name: string;
218
+ email?: string | undefined;
219
+ };
220
+ readonly created_at: string;
221
+ readonly created_by: {
222
+ readonly id: number;
223
+ readonly name: string;
224
+ email?: string | undefined;
225
+ };
226
+ readonly modified_at: string;
227
+ readonly modified_by: {
228
+ readonly id: number;
229
+ readonly name: string;
230
+ email?: string | undefined;
231
+ };
232
+ }[]>;
233
+ selectedCanvases: import('vue').ComputedRef<{
234
+ readonly id: string;
235
+ name: string;
236
+ is_draft?: boolean | undefined;
237
+ is_template?: boolean | undefined;
238
+ is_section?: boolean | undefined;
239
+ is_editable?: boolean | undefined;
240
+ is_default?: boolean | undefined;
241
+ metadata?: Record<string, any> | undefined;
242
+ tags?: Array<string> | undefined;
243
+ start_at?: (string | null) | undefined;
244
+ expires_at?: (string | null) | undefined;
245
+ access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
246
+ thumbnail_url?: (string | null) | undefined;
247
+ readonly template: {
248
+ readonly id: string;
249
+ name: string;
250
+ };
251
+ readonly shared_link: {
252
+ readonly url: string;
253
+ short_url?: (string | null) | undefined;
254
+ };
255
+ account?: {
256
+ id: string;
257
+ name: string;
258
+ } | null | undefined;
259
+ folder_id?: (string | null) | undefined;
260
+ readonly owned_by: {
261
+ readonly id: number;
262
+ readonly name: string;
263
+ email?: string | undefined;
264
+ };
265
+ readonly created_at: string;
266
+ readonly created_by: {
267
+ readonly id: number;
268
+ readonly name: string;
269
+ email?: string | undefined;
270
+ };
271
+ readonly modified_at: string;
272
+ readonly modified_by: {
273
+ readonly id: number;
274
+ readonly name: string;
275
+ email?: string | undefined;
276
+ };
277
+ }[]>;
278
+ selectedCanvasTemplates: import('vue').ComputedRef<{
279
+ readonly id: string;
280
+ name: string;
281
+ is_draft?: boolean | undefined;
282
+ is_template?: boolean | undefined;
283
+ is_section?: boolean | undefined;
284
+ is_editable?: boolean | undefined;
285
+ is_default?: boolean | undefined;
286
+ metadata?: Record<string, any> | undefined;
287
+ tags?: Array<string> | undefined;
288
+ start_at?: (string | null) | undefined;
289
+ expires_at?: (string | null) | undefined;
290
+ access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
291
+ thumbnail_url?: (string | null) | undefined;
292
+ readonly template: {
293
+ readonly id: string;
294
+ name: string;
295
+ };
296
+ readonly shared_link: {
297
+ readonly url: string;
298
+ short_url?: (string | null) | undefined;
299
+ };
300
+ account?: {
301
+ id: string;
302
+ name: string;
303
+ } | null | undefined;
304
+ folder_id?: (string | null) | undefined;
305
+ readonly owned_by: {
306
+ readonly id: number;
307
+ readonly name: string;
308
+ email?: string | undefined;
309
+ };
310
+ readonly created_at: string;
311
+ readonly created_by: {
312
+ readonly id: number;
313
+ readonly name: string;
314
+ email?: string | undefined;
315
+ };
316
+ readonly modified_at: string;
317
+ readonly modified_by: {
318
+ readonly id: number;
319
+ readonly name: string;
320
+ email?: string | undefined;
321
+ };
322
+ }[]>;
323
+ selectedSections: import('vue').ComputedRef<{
324
+ readonly id: string;
325
+ name: string;
326
+ is_draft?: boolean | undefined;
327
+ is_template?: boolean | undefined;
328
+ is_section?: boolean | undefined;
329
+ is_editable?: boolean | undefined;
330
+ is_default?: boolean | undefined;
331
+ metadata?: Record<string, any> | undefined;
332
+ tags?: Array<string> | undefined;
333
+ start_at?: (string | null) | undefined;
334
+ expires_at?: (string | null) | undefined;
335
+ access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
336
+ thumbnail_url?: (string | null) | undefined;
337
+ readonly template: {
338
+ readonly id: string;
339
+ name: string;
340
+ };
341
+ readonly shared_link: {
342
+ readonly url: string;
343
+ short_url?: (string | null) | undefined;
344
+ };
345
+ account?: {
346
+ id: string;
347
+ name: string;
348
+ } | null | undefined;
349
+ folder_id?: (string | null) | undefined;
350
+ readonly owned_by: {
351
+ readonly id: number;
352
+ readonly name: string;
353
+ email?: string | undefined;
354
+ };
355
+ readonly created_at: string;
356
+ readonly created_by: {
357
+ readonly id: number;
358
+ readonly name: string;
359
+ email?: string | undefined;
360
+ };
361
+ readonly modified_at: string;
362
+ readonly modified_by: {
363
+ readonly id: number;
364
+ readonly name: string;
365
+ email?: string | undefined;
366
+ };
367
+ }[]>;
368
+ selectedSectionTemplates: import('vue').ComputedRef<{
369
+ readonly id: string;
370
+ name: string;
371
+ is_draft?: boolean | undefined;
372
+ is_template?: boolean | undefined;
373
+ is_section?: boolean | undefined;
374
+ is_editable?: boolean | undefined;
375
+ is_default?: boolean | undefined;
376
+ metadata?: Record<string, any> | undefined;
377
+ tags?: Array<string> | undefined;
378
+ start_at?: (string | null) | undefined;
379
+ expires_at?: (string | null) | undefined;
380
+ access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
381
+ thumbnail_url?: (string | null) | undefined;
382
+ readonly template: {
383
+ readonly id: string;
384
+ name: string;
385
+ };
386
+ readonly shared_link: {
387
+ readonly url: string;
388
+ short_url?: (string | null) | undefined;
389
+ };
390
+ account?: {
391
+ id: string;
392
+ name: string;
393
+ } | null | undefined;
394
+ folder_id?: (string | null) | undefined;
395
+ readonly owned_by: {
396
+ readonly id: number;
397
+ readonly name: string;
398
+ email?: string | undefined;
399
+ };
400
+ readonly created_at: string;
401
+ readonly created_by: {
402
+ readonly id: number;
403
+ readonly name: string;
404
+ email?: string | undefined;
405
+ };
406
+ readonly modified_at: string;
407
+ readonly modified_by: {
408
+ readonly id: number;
409
+ readonly name: string;
410
+ email?: string | undefined;
411
+ };
412
+ }[]>;
413
+ cleanup: typeof cleanup;
414
+ };
415
+ export {};
package/lib/main.lib.d.ts CHANGED
@@ -98,6 +98,7 @@ export { type BrowserSectionType } from '@browser/stores/app';
98
98
  export { default as ContentSelector } from '@content-selector/App.vue';
99
99
  export type { SelectedPage as ContentSelectorSelectedPage, SelectedFile as ContentSelectorSelectedFile, SelectedAsset as ContentSelectorSelectedAsset, SelectedExternalLink as ContentSelectorSelectedExternalLink, ContentSelectorSelectedItem, } from '@content-selector/stores/app';
100
100
  export { default as CanvasSelector } from '@canvas-selector/App.vue';
101
+ export type { CanvasSelection } from '@canvas-selector/appTypes';
101
102
  export { default as NotesApp } from '@notes/NotesApp.vue';
102
103
  export { default as useNotesApp } from '@notes/composables/useNotesApp';
103
104
  export { default as useTheme } from './composables/useTheme';
@@ -110,7 +110,6 @@ export type AdminSelectContentResponse = {
110
110
  export type AdminSelectCanvasesRequest = {
111
111
  /** Array of selections */
112
112
  selections?: CanvasSelection[];
113
- include_content?: boolean;
114
113
  allowed_types?: ('canvas' | 'canvas-template' | 'section' | 'section-template')[];
115
114
  };
116
115
  export type AdminSelectCanvasesResponse = {
@@ -7,7 +7,7 @@ import { UiCaptureAppErrorRequest } from './types.ui';
7
7
  * try {
8
8
  * throw new Error('This is an error')
9
9
  * } catch (error) {
10
- * useUi().capture_app_error(error)
10
+ * useUi().captureAppError(error)
11
11
  * }
12
12
  *
13
13
  * @param payload error object to send to Pitcher sentry instance
@@ -53,7 +53,6 @@ export type UiSelectContentResponse = {
53
53
  export type UiSelectCanvasesRequest = {
54
54
  /** Array of selections */
55
55
  selections?: CanvasSelection[];
56
- include_content?: boolean;
57
56
  allowed_types?: ('canvas' | 'canvas-template' | 'section' | 'section-template')[];
58
57
  };
59
58
  export type UiSelectCanvasesResponse = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pitcher/js-api",
3
- "version": "1.22.0-beta.0",
3
+ "version": "1.22.0-beta.1",
4
4
  "type": "module",
5
5
  "main": "js-api.umd.min.js",
6
6
  "module": "js-api.esm.js",