@lilaquadrat/sdk 0.0.9 → 0.0.10

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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.10](https://github.com/lilaquadrat/sdk/compare/v0.0.9...v0.0.10) (2025-04-30)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **package:** update scripts and add exports configuration ([cd9be17](https://github.com/lilaquadrat/sdk/commit/cd9be1709fa2f5145850a65b215e913d2afe8571))
11
+
5
12
  ### [0.0.9](https://github.com/lilaquadrat/sdk/compare/v0.0.8...v0.0.9) (2025-04-30)
6
13
 
7
14
 
package/lib/index.d.ts ADDED
@@ -0,0 +1,191 @@
1
+ import { AxiosResponse, AxiosRequestConfig, HttpStatusCode } from 'axios';
2
+ import { BasicData, Contact, ContactAgreement, Content, CustomerPerson, Customers, DataObject, List, ListOfModels, ListParticipants, ListPartiticpantsDetails, Location, ObjectIdString } from '@lilaquadrat/interfaces';
3
+ export type SDKResponse<T> = {
4
+ data: T;
5
+ status: HttpStatusCode;
6
+ cacheLifetime?: number;
7
+ cacheTime?: number;
8
+ isCache?: boolean;
9
+ };
10
+ export type SDKCache = {
11
+ group?: string;
12
+ action?: string;
13
+ id?: string;
14
+ cacheLifetime?: number;
15
+ cacheTime?: number;
16
+ };
17
+ export type SDKModes = 'live' | 'next' | 'custom';
18
+ export type SDKCallOptions = {
19
+ /**
20
+ * ignore the cache and always execute the call
21
+ */
22
+ bypassCache?: boolean;
23
+ group?: string;
24
+ action?: string;
25
+ /**
26
+ * if a id is given, use it as key for atomic cache flushing
27
+ *
28
+ * e.g. ``flushId(id)``
29
+ *
30
+ * instead of the whole action category
31
+ *
32
+ * e.g. ``flushCache(group, action)``
33
+ *
34
+ */
35
+ id?: string;
36
+ /**
37
+ * in milliseconds
38
+ */
39
+ cacheLifetime?: number;
40
+ };
41
+ export default class StudioSDK {
42
+ readonly endpoints: {
43
+ live: {
44
+ api: string;
45
+ media: string;
46
+ };
47
+ next: {
48
+ api: string;
49
+ media: string;
50
+ };
51
+ };
52
+ customEndpoints: {
53
+ api: string;
54
+ media: string;
55
+ };
56
+ authToken: string;
57
+ mode: 'live' | 'next' | 'custom';
58
+ company: string;
59
+ project: string;
60
+ app: string;
61
+ universalModel: string;
62
+ options: {
63
+ app: string;
64
+ company?: string;
65
+ project?: string;
66
+ authToken?: string;
67
+ mode?: SDKModes;
68
+ customEndpoints?: {
69
+ api: string;
70
+ media: string;
71
+ };
72
+ universalModel?: string;
73
+ };
74
+ constructor(options: StudioSDK['options']);
75
+ private getUrl;
76
+ private getHeaders;
77
+ static getCacheKeyMock(url: string): string;
78
+ static getCacheKey(url: string): string;
79
+ static getCache(): Record<string, SDKResponse<unknown> & SDKCache>;
80
+ static handleCall<T, D = unknown>(call: AxiosRequestConfig<D>, options?: SDKCallOptions): Promise<SDKResponse<T>>;
81
+ static cache<T>(url: string, response?: AxiosResponse<T>, options?: SDKCallOptions): (SDKResponse<T> & SDKCache) | null | undefined;
82
+ static flushCache(group?: string, action?: string): void;
83
+ static flushId(id: string): void;
84
+ public: {
85
+ content: {
86
+ fetch: (type: string, link: string, options?: {
87
+ state?: 'draft' | 'publish';
88
+ }) => Promise<SDKResponse<BasicData<Content>>>;
89
+ search: (type: string, search: string, site?: number, options?: {
90
+ state?: 'draft' | 'publish';
91
+ }) => Promise<SDKResponse<BasicData<Content>>>;
92
+ predefined: (id: string) => Promise<SDKResponse<BasicData<Content>>>;
93
+ predefinedLatest: (categories: string[]) => Promise<SDKResponse<BasicData<Content>>>;
94
+ getById: (id: string) => Promise<SDKResponse<BasicData<Content>>>;
95
+ getByFilename: (filename: string) => Promise<SDKResponse<BasicData<Content>>>;
96
+ getByInternalId: (id: string) => Promise<SDKResponse<BasicData<Content>>>;
97
+ };
98
+ lists: {
99
+ join: (listId: string, person: Contact, message: string | undefined, category: string, agreements: ContactAgreement[], structure: Record<string, string> | undefined, options: {
100
+ uuid: ObjectIdString;
101
+ parentId: string;
102
+ }) => Promise<SDKResponse<{
103
+ _id: string;
104
+ id: string;
105
+ }>>;
106
+ address: (address: string) => Promise<SDKResponse<ListOfModels<Location>>>;
107
+ state: (listId: string) => Promise<SDKResponse<ListPartiticpantsDetails>>;
108
+ };
109
+ carts: {
110
+ create: (cart?: {
111
+ attributes: Record<string, string>;
112
+ }) => Promise<SDKResponse<any>>;
113
+ update: (internalId: ObjectIdString, items: any) => Promise<SDKResponse<any>>;
114
+ getById: (internalId: ObjectIdString) => Promise<SDKResponse<any>>;
115
+ getFinishedById: (internalId: ObjectIdString) => Promise<SDKResponse<any>>;
116
+ getProduct: (id: string) => Promise<SDKResponse<any>>;
117
+ finalize: (internalId: ObjectIdString) => Promise<SDKResponse<any>>;
118
+ };
119
+ };
120
+ members: {
121
+ content: {
122
+ fetch: (type: string, link: string, options?: {
123
+ state?: 'draft' | 'publish';
124
+ }) => Promise<SDKResponse<BasicData<Content>>>;
125
+ search: (type: string, search: string, site?: number, options?: {
126
+ state?: 'draft' | 'publish';
127
+ }) => Promise<SDKResponse<BasicData<Content>>>;
128
+ getById: (id: string) => Promise<SDKResponse<BasicData<Content>>>;
129
+ getByFilename: (filename: string) => Promise<SDKResponse<BasicData<Content>>>;
130
+ getByInternalId: (id: string) => Promise<SDKResponse<BasicData<Content>>>;
131
+ };
132
+ lists: {
133
+ join: (listId: string, message: string | undefined, category: string, agreements: ContactAgreement[], structure: Record<string, string> | undefined, options: {
134
+ uuid: ObjectIdString;
135
+ parentId: string;
136
+ }) => Promise<SDKResponse<string>>;
137
+ /**
138
+ * get the state for the logged in used for a specific list
139
+ */
140
+ state: (listId: string) => Promise<SDKResponse<ListParticipants>>;
141
+ };
142
+ me: {
143
+ connect: (customerId: string) => Promise<SDKResponse<any>>;
144
+ confirmEmail: (confirmationCode: string) => Promise<SDKResponse<any>>;
145
+ get: () => Promise<SDKResponse<CustomerPerson>>;
146
+ isConnected: () => Promise<SDKResponse<any>>;
147
+ emailConfirmed: () => Promise<SDKResponse<any>>;
148
+ };
149
+ };
150
+ editor: {
151
+ getById: (id: string) => Promise<SDKResponse<Content>>;
152
+ getByInternalId: (id: string) => Promise<SDKResponse<Content>>;
153
+ settings: (data: {
154
+ company: string;
155
+ project: string;
156
+ }) => Promise<SDKResponse<Content>>;
157
+ list: (site?: number, sort?: string, order?: number, options?: {
158
+ layout?: boolean;
159
+ partial?: boolean;
160
+ active?: boolean;
161
+ search?: string;
162
+ tags?: string[];
163
+ }) => Promise<SDKResponse<ListOfModels<Content>>>;
164
+ };
165
+ health: {
166
+ health: () => Promise<SDKResponse<void>>;
167
+ };
168
+ customers: {
169
+ list: (site?: number, search?: string, tags?: string[], type?: string, sort?: number, order?: string) => Promise<SDKResponse<DataObject<Customers>>>;
170
+ single: (id: string) => Promise<SDKResponse<Customers>>;
171
+ tags: (search: string) => Promise<SDKResponse<string[]>>;
172
+ update: (id: string, data: Customers) => Promise<SDKResponse<Customers>>;
173
+ add: (data: Customers) => Promise<SDKResponse<Customers>>;
174
+ remove: (id: string) => Promise<SDKResponse<Customers>>;
175
+ };
176
+ lists: {
177
+ single: (id: string) => Promise<SDKResponse<List>>;
178
+ add: (data: List) => Promise<SDKResponse<List>>;
179
+ update: (id: string, data: List) => Promise<SDKResponse<List>>;
180
+ remove: (id: string) => Promise<SDKResponse<List>>;
181
+ getByInternalId: (id: string) => Promise<SDKResponse<List>>;
182
+ list: (site?: number, search?: string, tags?: string[], state?: string, sort?: string, order?: number) => Promise<SDKResponse<DataObject<List[]>>>;
183
+ participants: {
184
+ single: (listId: string, id: string) => Promise<SDKResponse<ListParticipants>>;
185
+ udpateState: (listId: string, id: string, state: ListParticipants['state']) => Promise<SDKResponse<ListParticipants>>;
186
+ udpateNote: (listId: string, id: string, note: ListParticipants['note']) => Promise<SDKResponse<ListParticipants>>;
187
+ remove: (listId: string, id: string) => Promise<SDKResponse<ListParticipants>>;
188
+ list: (listId: string, site?: number, search?: string, tags?: string[], state?: string[], sort?: string, order?: number) => Promise<SDKResponse<DataObject<ListParticipants>>>;
189
+ };
190
+ };
191
+ }
package/lib/index.js ADDED
@@ -0,0 +1,599 @@
1
+ import axios from 'axios';
2
+ import { hardCopy } from '@lilaquadrat/studio/lib/esm/frontend';
3
+ let cachedCalls = {};
4
+ export default class StudioSDK {
5
+ constructor(options) {
6
+ this.endpoints = {
7
+ live: {
8
+ api: 'https://api.lilaquadrat.de',
9
+ media: 'https://media.lilaquadrat.de',
10
+ },
11
+ next: {
12
+ api: 'https://next-api.lilaquadrat.de',
13
+ media: 'https://next-media.lilaquadrat.de',
14
+ },
15
+ };
16
+ this.customEndpoints = {
17
+ api: '',
18
+ media: '',
19
+ };
20
+ this.mode = 'custom';
21
+ this.options = { app: '' };
22
+ this.public = {
23
+ content: {
24
+ fetch: (type, link, options) => StudioSDK.handleCall({
25
+ method: 'GET',
26
+ url: this.getUrl('api', ['public', 'content', type, link]),
27
+ headers: this.getHeaders(),
28
+ params: options,
29
+ }),
30
+ search: (type, search, site = 1, options) => {
31
+ const params = Object.assign({ search }, options);
32
+ return StudioSDK.handleCall({
33
+ method: 'GET',
34
+ url: this.getUrl('api', ['public', 'content', type, 'search', site.toString()]),
35
+ headers: this.getHeaders(),
36
+ params,
37
+ });
38
+ },
39
+ predefined: (id) => StudioSDK.handleCall({
40
+ method: 'GET',
41
+ url: this.getUrl('api', ['public', 'content', 'lilaquadrat', 'studio', id]),
42
+ headers: this.getHeaders(),
43
+ }, {
44
+ group: 'editor',
45
+ action: 'single',
46
+ id,
47
+ }),
48
+ predefinedLatest: (categories) => StudioSDK.handleCall({
49
+ method: 'GET',
50
+ url: this.getUrl('api', ['public', 'content', 'lilaquadrat', 'studio', 'latest']),
51
+ headers: this.getHeaders(),
52
+ params: {
53
+ category: categories,
54
+ },
55
+ }, {
56
+ group: 'editor',
57
+ action: 'single',
58
+ }),
59
+ getById: (id) => StudioSDK.handleCall({
60
+ method: 'GET',
61
+ url: this.getUrl('api', ['public', 'content', this.company, this.project, id]),
62
+ headers: this.getHeaders(),
63
+ }, {
64
+ group: 'editor',
65
+ action: 'single',
66
+ id,
67
+ }),
68
+ getByFilename: (filename) => StudioSDK.handleCall({
69
+ method: 'GET',
70
+ url: this.getUrl('api', ['public', 'content', this.company, this.project, 'filename']),
71
+ headers: this.getHeaders(),
72
+ params: {
73
+ filename
74
+ }
75
+ }, {
76
+ group: 'editor',
77
+ action: 'single',
78
+ id: filename,
79
+ }),
80
+ getByInternalId: (id) => StudioSDK.handleCall({
81
+ method: 'GET',
82
+ url: this.getUrl('api', ['public', 'content', this.company, this.project, 'internal', id]),
83
+ headers: this.getHeaders(),
84
+ }, {
85
+ group: 'editor',
86
+ action: 'single',
87
+ id,
88
+ }),
89
+ },
90
+ lists: {
91
+ join: (listId, person, message, category, agreements, structure, options) => StudioSDK.handleCall({
92
+ method: 'POST',
93
+ url: this.getUrl('api', ['public', 'lists', 'participants', this.company, this.project, listId, 'join']),
94
+ headers: this.getHeaders(),
95
+ data: {
96
+ person,
97
+ agreements,
98
+ message,
99
+ category,
100
+ structure,
101
+ options,
102
+ },
103
+ }),
104
+ address: (address) => StudioSDK.handleCall({
105
+ method: 'get',
106
+ url: this.getUrl('api', ['public', 'lists', 'participants', this.company, this.project, 'address']),
107
+ headers: this.getHeaders(),
108
+ params: {
109
+ address,
110
+ },
111
+ }),
112
+ state: (listId) => StudioSDK.handleCall({
113
+ method: 'get',
114
+ url: this.getUrl('api', ['public', 'lists', this.company, this.project, listId, 'state']),
115
+ headers: this.getHeaders(),
116
+ }),
117
+ },
118
+ carts: {
119
+ create: (cart) => StudioSDK.handleCall({
120
+ method: 'POST',
121
+ url: this.getUrl('api', ['public', 'carts', this.company, this.project]),
122
+ headers: this.getHeaders(),
123
+ data: cart,
124
+ }),
125
+ update: (internalId, items) => StudioSDK.handleCall({
126
+ method: 'PUT',
127
+ url: this.getUrl('api', ['public', 'carts', this.company, this.project, internalId]),
128
+ headers: this.getHeaders(),
129
+ data: items,
130
+ }),
131
+ getById: (internalId) => StudioSDK.handleCall({
132
+ method: 'GET',
133
+ url: this.getUrl('api', ['public', 'carts', this.company, this.project, internalId]),
134
+ headers: this.getHeaders(),
135
+ }),
136
+ getFinishedById: (internalId) => StudioSDK.handleCall({
137
+ method: 'GET',
138
+ url: this.getUrl('api', ['public', 'carts', this.company, this.project, 'finished', internalId]),
139
+ headers: this.getHeaders(),
140
+ }),
141
+ getProduct: (id) => StudioSDK.handleCall({
142
+ method: 'GET',
143
+ url: this.getUrl('api', ['public', 'carts', this.company, this.project, 'product', id]),
144
+ headers: this.getHeaders(),
145
+ }),
146
+ finalize: (internalId) => StudioSDK.handleCall({
147
+ method: 'PUT',
148
+ url: this.getUrl('api', ['public', 'carts', this.company, this.project, 'finalize', internalId]),
149
+ headers: this.getHeaders(),
150
+ }),
151
+ }
152
+ };
153
+ this.members = {
154
+ content: {
155
+ fetch: (type, link, options) => StudioSDK.handleCall({
156
+ method: 'GET',
157
+ url: this.getUrl('api', ['members', 'content', type, link]),
158
+ headers: this.getHeaders(),
159
+ params: options,
160
+ }),
161
+ search: (type, search, site = 1, options) => {
162
+ const params = Object.assign({ search }, options);
163
+ return StudioSDK.handleCall({
164
+ method: 'GET',
165
+ url: this.getUrl('api', ['members', 'content', type, 'search', site.toString()]),
166
+ headers: this.getHeaders(),
167
+ params,
168
+ });
169
+ },
170
+ getById: (id) => StudioSDK.handleCall({
171
+ method: 'GET',
172
+ url: this.getUrl('api', ['members', 'content', this.company, this.project, id]),
173
+ headers: this.getHeaders(),
174
+ }, {
175
+ group: 'editor',
176
+ action: 'single',
177
+ id,
178
+ }),
179
+ getByFilename: (filename) => StudioSDK.handleCall({
180
+ method: 'GET',
181
+ url: this.getUrl('api', ['members', 'content', this.company, this.project, 'filename']),
182
+ headers: this.getHeaders(),
183
+ params: {
184
+ filename
185
+ }
186
+ }, {
187
+ group: 'editor',
188
+ action: 'single',
189
+ id: filename,
190
+ }),
191
+ getByInternalId: (id) => StudioSDK.handleCall({
192
+ method: 'GET',
193
+ url: this.getUrl('api', ['members', 'content', this.company, this.project, 'internal', id]),
194
+ headers: this.getHeaders(),
195
+ }, {
196
+ group: 'editor',
197
+ action: 'single',
198
+ id,
199
+ }),
200
+ },
201
+ lists: {
202
+ join: (listId, message, category, agreements, structure, options) => StudioSDK.handleCall({
203
+ method: 'POST',
204
+ url: this.getUrl('api', ['members', 'lists', 'participants', this.company, this.project, listId, 'join']),
205
+ headers: this.getHeaders(),
206
+ data: {
207
+ agreements,
208
+ message,
209
+ category,
210
+ structure,
211
+ options,
212
+ },
213
+ }),
214
+ /**
215
+ * get the state for the logged in used for a specific list
216
+ */
217
+ state: (listId) => StudioSDK.handleCall({
218
+ method: 'GET',
219
+ url: this.getUrl('api', ['members', 'lists', this.company, this.project, listId]),
220
+ headers: this.getHeaders(),
221
+ }, {
222
+ group: 'lists',
223
+ action: 'state',
224
+ id: listId,
225
+ }),
226
+ },
227
+ me: {
228
+ connect: (customerId) => StudioSDK.handleCall({
229
+ method: 'PUT',
230
+ url: this.getUrl('api', ['members', 'me', this.company, this.project, 'connect']),
231
+ headers: this.getHeaders(),
232
+ data: { customerId },
233
+ }),
234
+ confirmEmail: (confirmationCode) => StudioSDK.handleCall({
235
+ method: 'PUT',
236
+ url: this.getUrl('api', ['members', 'me', this.company, this.project, 'confirm']),
237
+ headers: this.getHeaders(),
238
+ data: { confirmationCode },
239
+ }),
240
+ get: () => StudioSDK.handleCall({
241
+ method: 'GET',
242
+ url: this.getUrl('api', ['members', 'me', this.company, this.project]),
243
+ headers: this.getHeaders(),
244
+ }, {
245
+ group: 'me',
246
+ action: 'get',
247
+ }),
248
+ isConnected: () => StudioSDK.handleCall({
249
+ method: 'HEAD',
250
+ url: this.getUrl('api', ['members', 'me', this.company, this.project, 'connected', this.app]),
251
+ headers: this.getHeaders(),
252
+ }),
253
+ emailConfirmed: () => StudioSDK.handleCall({
254
+ method: 'HEAD',
255
+ url: this.getUrl('api', ['members', 'me', this.company, this.project, 'emailConfirmed', this.app]),
256
+ headers: this.getHeaders(),
257
+ }),
258
+ }
259
+ };
260
+ this.editor = {
261
+ getById: (id) => StudioSDK.handleCall({
262
+ method: 'GET',
263
+ url: this.getUrl('api', ['editor', this.company, this.project, id]),
264
+ headers: this.getHeaders(),
265
+ }, {
266
+ group: 'editor',
267
+ action: 'single',
268
+ id,
269
+ }),
270
+ getByInternalId: (id) => StudioSDK.handleCall({
271
+ method: 'GET',
272
+ url: this.getUrl('api', ['editor', this.company, this.project, 'internal', id]),
273
+ headers: this.getHeaders(),
274
+ }, {
275
+ group: 'editor',
276
+ action: 'single',
277
+ id,
278
+ }),
279
+ settings: (data) => StudioSDK.handleCall({
280
+ method: 'GET',
281
+ url: this.getUrl('api', ['editor', data.company, data.project, 'settings']),
282
+ headers: this.getHeaders(),
283
+ }, {
284
+ group: 'editor',
285
+ action: 'settings',
286
+ }),
287
+ list: (site = 0, sort, order, options) => {
288
+ const params = Object.assign({ sort,
289
+ order }, (options || {}));
290
+ return StudioSDK.handleCall({
291
+ method: 'GET',
292
+ url: this.getUrl('api', ['editor', this.company, this.project, 'list', site.toString()]),
293
+ headers: this.getHeaders(),
294
+ params,
295
+ }, {
296
+ group: 'editor',
297
+ action: 'list',
298
+ });
299
+ },
300
+ };
301
+ this.health = {
302
+ health: () => StudioSDK.handleCall({
303
+ method: 'GET',
304
+ url: this.getUrl('api', ['health']),
305
+ headers: this.getHeaders(),
306
+ }),
307
+ };
308
+ this.customers = {
309
+ list: (site = 0, search, tags, type, sort, order) => StudioSDK.handleCall({
310
+ method: 'GET',
311
+ url: this.getUrl('api', ['customers', this.company, this.project, 'list', site.toString()]),
312
+ headers: this.getHeaders(),
313
+ params: {
314
+ search,
315
+ tags,
316
+ sort,
317
+ order,
318
+ type,
319
+ },
320
+ }, {
321
+ group: 'customers',
322
+ action: 'list',
323
+ }),
324
+ single: (id) => StudioSDK.handleCall({
325
+ method: 'GET',
326
+ url: this.getUrl('api', ['customers', this.company, this.project, id]),
327
+ headers: this.getHeaders(),
328
+ }, {
329
+ group: 'customers',
330
+ action: 'single',
331
+ id,
332
+ }),
333
+ tags: (search) => StudioSDK.handleCall({
334
+ method: 'GET',
335
+ url: this.getUrl('api', ['customers', this.company, this.project, 'tags', search]),
336
+ headers: this.getHeaders(),
337
+ }, {
338
+ group: 'customers',
339
+ action: 'tags',
340
+ }),
341
+ update: (id, data) => StudioSDK.handleCall({
342
+ method: 'PUT',
343
+ url: this.getUrl('api', ['customers', this.company, this.project, id]),
344
+ headers: this.getHeaders(),
345
+ data,
346
+ }),
347
+ add: (data) => StudioSDK.handleCall({
348
+ method: 'POST',
349
+ url: this.getUrl('api', ['customers', this.company, this.project]),
350
+ headers: this.getHeaders(),
351
+ data,
352
+ }),
353
+ remove: (id) => StudioSDK.handleCall({
354
+ method: 'DELETE',
355
+ url: this.getUrl('api', ['customers', this.company, this.project, id]),
356
+ headers: this.getHeaders(),
357
+ }),
358
+ };
359
+ this.lists = {
360
+ single: (id) => StudioSDK.handleCall({
361
+ method: 'GET',
362
+ url: this.getUrl('api', ['lists', this.company, this.project, id]),
363
+ headers: this.getHeaders(),
364
+ }, {
365
+ group: 'lists',
366
+ action: 'single',
367
+ id,
368
+ }),
369
+ add: (data) => StudioSDK.handleCall({
370
+ method: 'POST',
371
+ url: this.getUrl('api', ['lists', this.company, this.project]),
372
+ headers: this.getHeaders(),
373
+ data,
374
+ }),
375
+ update: (id, data) => StudioSDK.handleCall({
376
+ method: 'PUT',
377
+ url: this.getUrl('api', ['lists', this.company, this.project, id]),
378
+ headers: this.getHeaders(),
379
+ data,
380
+ }),
381
+ remove: (id) => StudioSDK.handleCall({
382
+ method: 'DELETE',
383
+ url: this.getUrl('api', ['lists', this.company, this.project, id]),
384
+ headers: this.getHeaders(),
385
+ }),
386
+ getByInternalId: (id) => StudioSDK.handleCall({
387
+ method: 'GET',
388
+ url: this.getUrl('api', ['lists', this.company, this.project, id]),
389
+ headers: this.getHeaders(),
390
+ }, {
391
+ group: 'lists',
392
+ action: 'single',
393
+ id,
394
+ }),
395
+ list: (site = 0, search, tags, state, sort, order) => StudioSDK.handleCall({
396
+ method: 'GET',
397
+ url: this.getUrl('api', ['lists', this.company, this.project, 'list', site.toString()]),
398
+ headers: this.getHeaders(),
399
+ params: {
400
+ search,
401
+ tags,
402
+ sort,
403
+ order,
404
+ state,
405
+ },
406
+ }, {
407
+ group: 'lists',
408
+ action: 'list',
409
+ }),
410
+ participants: {
411
+ single: (listId, id) => StudioSDK.handleCall({
412
+ method: 'GET',
413
+ url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, id]),
414
+ headers: this.getHeaders(),
415
+ }, {
416
+ group: 'listParticipants',
417
+ action: 'single',
418
+ id,
419
+ }),
420
+ udpateState: (listId, id, state) => StudioSDK.handleCall({
421
+ method: 'PUT',
422
+ url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, 'state', id]),
423
+ headers: this.getHeaders(),
424
+ data: { state },
425
+ }, {
426
+ group: 'listParticipants',
427
+ action: 'single',
428
+ id,
429
+ }),
430
+ udpateNote: (listId, id, note) => StudioSDK.handleCall({
431
+ method: 'PUT',
432
+ url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, 'note', id]),
433
+ headers: this.getHeaders(),
434
+ data: { note },
435
+ }, {
436
+ group: 'listParticipants',
437
+ action: 'single',
438
+ id,
439
+ }),
440
+ remove: (listId, id) => StudioSDK.handleCall({
441
+ method: 'DELETE',
442
+ url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, id]),
443
+ headers: this.getHeaders(),
444
+ }),
445
+ list: (listId, site = 0, search, tags, state, sort, order) => StudioSDK.handleCall({
446
+ method: 'GET',
447
+ url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, 'list', site.toString()]),
448
+ headers: this.getHeaders(),
449
+ params: {
450
+ search,
451
+ tags,
452
+ sort,
453
+ order,
454
+ state,
455
+ },
456
+ }, {
457
+ group: 'listParticipants',
458
+ action: 'list',
459
+ }),
460
+ },
461
+ };
462
+ if (options.authToken)
463
+ this.authToken = options.authToken;
464
+ if (options.customEndpoints)
465
+ this.customEndpoints = options.customEndpoints;
466
+ this.mode = options.customEndpoints ? 'custom' : options.mode || 'live';
467
+ if (options.company)
468
+ this.company = options.company;
469
+ if (options.project)
470
+ this.project = options.project;
471
+ this.app = options.app;
472
+ if (options.universalModel)
473
+ this.universalModel = options.universalModel;
474
+ }
475
+ getUrl(type, methodArray) {
476
+ const method = methodArray.filter((single) => single);
477
+ const urlArray = [];
478
+ let useEndpoint;
479
+ if (this.mode === 'custom') {
480
+ useEndpoint = this.customEndpoints[type];
481
+ }
482
+ else {
483
+ useEndpoint = this.endpoints[this.mode][type];
484
+ }
485
+ urlArray.push(useEndpoint);
486
+ urlArray.push(...method);
487
+ return urlArray.filter((single) => single).join('/');
488
+ }
489
+ getHeaders() {
490
+ const headers = {
491
+ 'studio-app': this.app,
492
+ };
493
+ if (this.authToken) {
494
+ headers.Authorization = `bearer ${this.authToken}`;
495
+ }
496
+ return headers;
497
+ }
498
+ static getCacheKeyMock(url) {
499
+ const key = new URL(url);
500
+ return key.pathname + key.search;
501
+ }
502
+ static getCacheKey(url) {
503
+ let key = url;
504
+ key = key.replace(/:|\/|\?|=|&/ig, '-');
505
+ return key;
506
+ }
507
+ static getCache() {
508
+ return cachedCalls;
509
+ }
510
+ static handleCall(call, options) {
511
+ // if (ISMOCK) {
512
+ // if (call.method !== 'GET') return Promise.resolve({ data: {} as T, status: 200 });
513
+ // const key = StudioSDK.getCacheKeyMock(call.url as string);
514
+ // console.group(`SDK_MOCK_CALL: [${call.method}] ${key}`);
515
+ // // if url is not in MockJs.ts, error will be thrown
516
+ // if (!mockJs[key]) {
517
+ // console.error(key);
518
+ // console.groupEnd();
519
+ // throw new Error('MOCK_DATA_MISSING');
520
+ // }
521
+ // console.log({ data: mockJs[key].data as T, status: mockJs[key].status });
522
+ // console.groupEnd();
523
+ // return Promise.resolve({ data: mockJs[key].data as T, status: mockJs[key].status });
524
+ // }
525
+ if (call.method === 'GET' && !(options === null || options === void 0 ? void 0 : options.bypassCache)) {
526
+ const cacheHit = StudioSDK.cache(axios.getUri(call), undefined, options);
527
+ if (cacheHit)
528
+ return Promise.resolve(cacheHit);
529
+ }
530
+ return axios.request(call)
531
+ .then((response) => {
532
+ if (call.method === 'GET')
533
+ StudioSDK.cache(axios.getUri(call), response, options);
534
+ return response;
535
+ })
536
+ .then((response) => ({ data: response.data, status: response.status }));
537
+ }
538
+ static cache(url, response, options) {
539
+ const key = (options === null || options === void 0 ? void 0 : options.id) ? options.id : StudioSDK.getCacheKey(url);
540
+ if (response) {
541
+ const useKey = (options === null || options === void 0 ? void 0 : options.id)
542
+ ? options.id
543
+ : key;
544
+ cachedCalls[useKey] = {
545
+ data: response.data,
546
+ status: response.status,
547
+ action: options === null || options === void 0 ? void 0 : options.action,
548
+ group: options === null || options === void 0 ? void 0 : options.group,
549
+ cacheLifetime: (options === null || options === void 0 ? void 0 : options.cacheLifetime) ? Date.now() + ((options === null || options === void 0 ? void 0 : options.cacheLifetime) || 0) : null,
550
+ cacheTime: Date.now(),
551
+ };
552
+ return undefined;
553
+ }
554
+ const useCache = cachedCalls[key];
555
+ if (!useCache)
556
+ return null;
557
+ if (useCache.cacheLifetime && useCache.cacheLifetime < Date.now()) {
558
+ console.debug('cache found but lifetime');
559
+ delete cachedCalls[key];
560
+ return null;
561
+ }
562
+ const returnCache = hardCopy(useCache);
563
+ returnCache === null || returnCache === void 0 ? true : delete returnCache.action;
564
+ returnCache === null || returnCache === void 0 ? true : delete returnCache.group;
565
+ returnCache === null || returnCache === void 0 ? true : delete returnCache.id;
566
+ returnCache.isCache = true;
567
+ return returnCache;
568
+ }
569
+ static flushCache(group, action) {
570
+ if (group || action) {
571
+ Object.keys(cachedCalls).forEach((key) => {
572
+ let flush = false;
573
+ const singleCache = cachedCalls[key];
574
+ if (group && action) {
575
+ if (singleCache.group === group && singleCache.action === action)
576
+ flush = true;
577
+ }
578
+ else if (group) {
579
+ if (singleCache.group === group)
580
+ flush = true;
581
+ }
582
+ else if (action) {
583
+ if (singleCache.action === action)
584
+ flush = true;
585
+ }
586
+ if (flush) {
587
+ delete cachedCalls[key];
588
+ }
589
+ });
590
+ }
591
+ else {
592
+ cachedCalls = {};
593
+ }
594
+ }
595
+ static flushId(id) {
596
+ delete cachedCalls[id];
597
+ }
598
+ }
599
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AA+ChE,IAAI,WAAW,GAAoD,EAAE,CAAC;AAEtE,MAAM,CAAC,OAAO,OAAO,SAAS;IAwC5B,YAAY,OAA6B;QAtChC,cAAS,GAAG;YACnB,IAAI,EAAE;gBACJ,GAAG,EAAE,4BAA4B;gBACjC,KAAK,EAAE,8BAA8B;aACtC;YACD,IAAI,EAAE;gBACJ,GAAG,EAAE,iCAAiC;gBACtC,KAAK,EAAE,mCAAmC;aAC3C;SACF,CAAC;QAEF,oBAAe,GAAG;YAChB,GAAG,EAAE,EAAE;YACP,KAAK,EAAE,EAAE;SACV,CAAC;QAIF,SAAI,GAA+B,QAAQ,CAAC;QAU5C,YAAO,GAQH,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;QA8NhB,WAAM,GAAG;YACP,OAAO,EAAE;gBAEP,KAAK,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,OAAyC,EAAE,EAAE,CAAC,SAAS,CAAC,UAAU,CACpG;oBACE,MAAM,EAAE,KAAK;oBACb,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;oBAC1D,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AErB,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,KAAc,EAAE,MAAe;QAE/C,IAAI,KAAK,IAAI,MAAM,EAAE,CAAC;YAEpB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBAEvC,IAAI,KAAK,GAAY,KAAK,CAAC;gBAC3B,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;gBAErC,IAAI,KAAK,IAAI,MAAM,EAAE,CAAC;oBAEpB,IAAI,WAAW,CAAC,KAAK,KAAK,KAAK,IAAI,WAAW,CAAC,MAAM,KAAK,MAAM;wBAAE,KAAK,GAAG,IAAI,CAAC;gBAEjF,CAAC;qBAAM,IAAI,KAAK,EAAE,CAAC;oBAEjB,IAAI,WAAW,CAAC,KAAK,KAAK,KAAK;wBAAE,KAAK,GAAG,IAAI,CAAC;gBAEhD,CAAC;qBAAM,IAAI,MAAM,EAAE,CAAC;oBAElB,IAAI,WAAW,CAAC,MAAM,KAAK,MAAM;wBAAE,KAAK,GAAG,IAAI,CAAC;gBAElD,CAAC;gBAED,IAAI,KAAK,EAAE,CAAC;oBAEV,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;gBAE1B,CAAC;YAEH,CAAC,CAAC,CAAC;QAEL,CAAC;aAAM,CAAC;YAEN,WAAW,GAAG,EAAE,CAAC;QAEnB,CAAC;IAEH,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,EAAU;QAEvB,OAAO,WAAW,CAAC,EAAE,CAAC,CAAC;IAEzB,CAAC;CAkoBF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilaquadrat/sdk",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "sdk for accessing STUDIO api",
5
5
  "type": "module",
6
6
  "author": {
@@ -14,11 +14,21 @@
14
14
  "license": "MIT",
15
15
  "scripts": {
16
16
  "build": "tsc",
17
- "prepublish": "tsc",
17
+ "prepare": "tsc",
18
18
  "release": "standard-version"
19
19
  },
20
20
  "module": "lib/index.js",
21
21
  "main": "lib/index.js",
22
+ "exports": {
23
+ ".": {
24
+ "import": "./lib/index.js",
25
+ "types": "./lib/index.d.ts"
26
+ }
27
+ },
28
+ "types": "lib/index.d.ts",
29
+ "engines": {
30
+ "node": ">=14.16"
31
+ },
22
32
  "publishConfig": {
23
33
  "access": "public"
24
34
  },
@@ -37,5 +47,6 @@
37
47
  "commitizen": {
38
48
  "path": "./node_modules/cz-conventional-changelog"
39
49
  }
40
- }
50
+ },
51
+ "packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39"
41
52
  }