@lilaquadrat/sdk 0.0.9 → 0.0.11

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,20 @@
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.11](https://github.com/lilaquadrat/sdk/compare/v0.0.10...v0.0.11) (2026-02-09)
6
+
7
+
8
+ ### Features
9
+
10
+ * **resendconfirmationmail:** added resendConfirmationMail call ([f37e94c](https://github.com/lilaquadrat/sdk/commit/f37e94c599ee55f9874528e36acbebe2a101b7ca))
11
+
12
+ ### [0.0.10](https://github.com/lilaquadrat/sdk/compare/v0.0.9...v0.0.10) (2025-04-30)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **package:** update scripts and add exports configuration ([cd9be17](https://github.com/lilaquadrat/sdk/commit/cd9be1709fa2f5145850a65b215e913d2afe8571))
18
+
5
19
  ### [0.0.9](https://github.com/lilaquadrat/sdk/compare/v0.0.8...v0.0.9) (2025-04-30)
6
20
 
7
21
 
package/index.ts CHANGED
@@ -619,6 +619,14 @@ export default class StudioSDK {
619
619
  },
620
620
  ),
621
621
 
622
+ resendConfirmationMail: () => StudioSDK.handleCall<any>(
623
+ {
624
+ method: 'POST',
625
+ url: this.getUrl('api', ['members', 'me', this.company, this.project, 'resendConfirmationMail']),
626
+ headers: this.getHeaders(),
627
+ },
628
+ ),
629
+
622
630
  get: () => StudioSDK.handleCall<CustomerPerson>(
623
631
  {
624
632
  method: 'GET',
package/lib/index.d.ts ADDED
@@ -0,0 +1,192 @@
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
+ resendConfirmationMail: () => Promise<SDKResponse<any>>;
146
+ get: () => Promise<SDKResponse<CustomerPerson>>;
147
+ isConnected: () => Promise<SDKResponse<any>>;
148
+ emailConfirmed: () => Promise<SDKResponse<any>>;
149
+ };
150
+ };
151
+ editor: {
152
+ getById: (id: string) => Promise<SDKResponse<Content>>;
153
+ getByInternalId: (id: string) => Promise<SDKResponse<Content>>;
154
+ settings: (data: {
155
+ company: string;
156
+ project: string;
157
+ }) => Promise<SDKResponse<Content>>;
158
+ list: (site?: number, sort?: string, order?: number, options?: {
159
+ layout?: boolean;
160
+ partial?: boolean;
161
+ active?: boolean;
162
+ search?: string;
163
+ tags?: string[];
164
+ }) => Promise<SDKResponse<ListOfModels<Content>>>;
165
+ };
166
+ health: {
167
+ health: () => Promise<SDKResponse<void>>;
168
+ };
169
+ customers: {
170
+ list: (site?: number, search?: string, tags?: string[], type?: string, sort?: number, order?: string) => Promise<SDKResponse<DataObject<Customers>>>;
171
+ single: (id: string) => Promise<SDKResponse<Customers>>;
172
+ tags: (search: string) => Promise<SDKResponse<string[]>>;
173
+ update: (id: string, data: Customers) => Promise<SDKResponse<Customers>>;
174
+ add: (data: Customers) => Promise<SDKResponse<Customers>>;
175
+ remove: (id: string) => Promise<SDKResponse<Customers>>;
176
+ };
177
+ lists: {
178
+ single: (id: string) => Promise<SDKResponse<List>>;
179
+ add: (data: List) => Promise<SDKResponse<List>>;
180
+ update: (id: string, data: List) => Promise<SDKResponse<List>>;
181
+ remove: (id: string) => Promise<SDKResponse<List>>;
182
+ getByInternalId: (id: string) => Promise<SDKResponse<List>>;
183
+ list: (site?: number, search?: string, tags?: string[], state?: string, sort?: string, order?: number) => Promise<SDKResponse<DataObject<List[]>>>;
184
+ participants: {
185
+ single: (listId: string, id: string) => Promise<SDKResponse<ListParticipants>>;
186
+ udpateState: (listId: string, id: string, state: ListParticipants["state"]) => Promise<SDKResponse<ListParticipants>>;
187
+ udpateNote: (listId: string, id: string, note: ListParticipants["note"]) => Promise<SDKResponse<ListParticipants>>;
188
+ remove: (listId: string, id: string) => Promise<SDKResponse<ListParticipants>>;
189
+ list: (listId: string, site?: number, search?: string, tags?: string[], state?: string[], sort?: string, order?: number) => Promise<SDKResponse<DataObject<ListParticipants>>>;
190
+ };
191
+ };
192
+ }
package/lib/index.js ADDED
@@ -0,0 +1,604 @@
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
+ resendConfirmationMail: () => StudioSDK.handleCall({
241
+ method: 'POST',
242
+ url: this.getUrl('api', ['members', 'me', this.company, this.project, 'resendConfirmationMail']),
243
+ headers: this.getHeaders(),
244
+ }),
245
+ get: () => StudioSDK.handleCall({
246
+ method: 'GET',
247
+ url: this.getUrl('api', ['members', 'me', this.company, this.project]),
248
+ headers: this.getHeaders(),
249
+ }, {
250
+ group: 'me',
251
+ action: 'get',
252
+ }),
253
+ isConnected: () => StudioSDK.handleCall({
254
+ method: 'HEAD',
255
+ url: this.getUrl('api', ['members', 'me', this.company, this.project, 'connected', this.app]),
256
+ headers: this.getHeaders(),
257
+ }),
258
+ emailConfirmed: () => StudioSDK.handleCall({
259
+ method: 'HEAD',
260
+ url: this.getUrl('api', ['members', 'me', this.company, this.project, 'emailConfirmed', this.app]),
261
+ headers: this.getHeaders(),
262
+ }),
263
+ }
264
+ };
265
+ this.editor = {
266
+ getById: (id) => StudioSDK.handleCall({
267
+ method: 'GET',
268
+ url: this.getUrl('api', ['editor', this.company, this.project, id]),
269
+ headers: this.getHeaders(),
270
+ }, {
271
+ group: 'editor',
272
+ action: 'single',
273
+ id,
274
+ }),
275
+ getByInternalId: (id) => StudioSDK.handleCall({
276
+ method: 'GET',
277
+ url: this.getUrl('api', ['editor', this.company, this.project, 'internal', id]),
278
+ headers: this.getHeaders(),
279
+ }, {
280
+ group: 'editor',
281
+ action: 'single',
282
+ id,
283
+ }),
284
+ settings: (data) => StudioSDK.handleCall({
285
+ method: 'GET',
286
+ url: this.getUrl('api', ['editor', data.company, data.project, 'settings']),
287
+ headers: this.getHeaders(),
288
+ }, {
289
+ group: 'editor',
290
+ action: 'settings',
291
+ }),
292
+ list: (site = 0, sort, order, options) => {
293
+ const params = Object.assign({ sort,
294
+ order }, (options || {}));
295
+ return StudioSDK.handleCall({
296
+ method: 'GET',
297
+ url: this.getUrl('api', ['editor', this.company, this.project, 'list', site.toString()]),
298
+ headers: this.getHeaders(),
299
+ params,
300
+ }, {
301
+ group: 'editor',
302
+ action: 'list',
303
+ });
304
+ },
305
+ };
306
+ this.health = {
307
+ health: () => StudioSDK.handleCall({
308
+ method: 'GET',
309
+ url: this.getUrl('api', ['health']),
310
+ headers: this.getHeaders(),
311
+ }),
312
+ };
313
+ this.customers = {
314
+ list: (site = 0, search, tags, type, sort, order) => StudioSDK.handleCall({
315
+ method: 'GET',
316
+ url: this.getUrl('api', ['customers', this.company, this.project, 'list', site.toString()]),
317
+ headers: this.getHeaders(),
318
+ params: {
319
+ search,
320
+ tags,
321
+ sort,
322
+ order,
323
+ type,
324
+ },
325
+ }, {
326
+ group: 'customers',
327
+ action: 'list',
328
+ }),
329
+ single: (id) => StudioSDK.handleCall({
330
+ method: 'GET',
331
+ url: this.getUrl('api', ['customers', this.company, this.project, id]),
332
+ headers: this.getHeaders(),
333
+ }, {
334
+ group: 'customers',
335
+ action: 'single',
336
+ id,
337
+ }),
338
+ tags: (search) => StudioSDK.handleCall({
339
+ method: 'GET',
340
+ url: this.getUrl('api', ['customers', this.company, this.project, 'tags', search]),
341
+ headers: this.getHeaders(),
342
+ }, {
343
+ group: 'customers',
344
+ action: 'tags',
345
+ }),
346
+ update: (id, data) => StudioSDK.handleCall({
347
+ method: 'PUT',
348
+ url: this.getUrl('api', ['customers', this.company, this.project, id]),
349
+ headers: this.getHeaders(),
350
+ data,
351
+ }),
352
+ add: (data) => StudioSDK.handleCall({
353
+ method: 'POST',
354
+ url: this.getUrl('api', ['customers', this.company, this.project]),
355
+ headers: this.getHeaders(),
356
+ data,
357
+ }),
358
+ remove: (id) => StudioSDK.handleCall({
359
+ method: 'DELETE',
360
+ url: this.getUrl('api', ['customers', this.company, this.project, id]),
361
+ headers: this.getHeaders(),
362
+ }),
363
+ };
364
+ this.lists = {
365
+ single: (id) => StudioSDK.handleCall({
366
+ method: 'GET',
367
+ url: this.getUrl('api', ['lists', this.company, this.project, id]),
368
+ headers: this.getHeaders(),
369
+ }, {
370
+ group: 'lists',
371
+ action: 'single',
372
+ id,
373
+ }),
374
+ add: (data) => StudioSDK.handleCall({
375
+ method: 'POST',
376
+ url: this.getUrl('api', ['lists', this.company, this.project]),
377
+ headers: this.getHeaders(),
378
+ data,
379
+ }),
380
+ update: (id, data) => StudioSDK.handleCall({
381
+ method: 'PUT',
382
+ url: this.getUrl('api', ['lists', this.company, this.project, id]),
383
+ headers: this.getHeaders(),
384
+ data,
385
+ }),
386
+ remove: (id) => StudioSDK.handleCall({
387
+ method: 'DELETE',
388
+ url: this.getUrl('api', ['lists', this.company, this.project, id]),
389
+ headers: this.getHeaders(),
390
+ }),
391
+ getByInternalId: (id) => StudioSDK.handleCall({
392
+ method: 'GET',
393
+ url: this.getUrl('api', ['lists', this.company, this.project, id]),
394
+ headers: this.getHeaders(),
395
+ }, {
396
+ group: 'lists',
397
+ action: 'single',
398
+ id,
399
+ }),
400
+ list: (site = 0, search, tags, state, sort, order) => StudioSDK.handleCall({
401
+ method: 'GET',
402
+ url: this.getUrl('api', ['lists', this.company, this.project, 'list', site.toString()]),
403
+ headers: this.getHeaders(),
404
+ params: {
405
+ search,
406
+ tags,
407
+ sort,
408
+ order,
409
+ state,
410
+ },
411
+ }, {
412
+ group: 'lists',
413
+ action: 'list',
414
+ }),
415
+ participants: {
416
+ single: (listId, id) => StudioSDK.handleCall({
417
+ method: 'GET',
418
+ url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, id]),
419
+ headers: this.getHeaders(),
420
+ }, {
421
+ group: 'listParticipants',
422
+ action: 'single',
423
+ id,
424
+ }),
425
+ udpateState: (listId, id, state) => StudioSDK.handleCall({
426
+ method: 'PUT',
427
+ url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, 'state', id]),
428
+ headers: this.getHeaders(),
429
+ data: { state },
430
+ }, {
431
+ group: 'listParticipants',
432
+ action: 'single',
433
+ id,
434
+ }),
435
+ udpateNote: (listId, id, note) => StudioSDK.handleCall({
436
+ method: 'PUT',
437
+ url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, 'note', id]),
438
+ headers: this.getHeaders(),
439
+ data: { note },
440
+ }, {
441
+ group: 'listParticipants',
442
+ action: 'single',
443
+ id,
444
+ }),
445
+ remove: (listId, id) => StudioSDK.handleCall({
446
+ method: 'DELETE',
447
+ url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, id]),
448
+ headers: this.getHeaders(),
449
+ }),
450
+ list: (listId, site = 0, search, tags, state, sort, order) => StudioSDK.handleCall({
451
+ method: 'GET',
452
+ url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, 'list', site.toString()]),
453
+ headers: this.getHeaders(),
454
+ params: {
455
+ search,
456
+ tags,
457
+ sort,
458
+ order,
459
+ state,
460
+ },
461
+ }, {
462
+ group: 'listParticipants',
463
+ action: 'list',
464
+ }),
465
+ },
466
+ };
467
+ if (options.authToken)
468
+ this.authToken = options.authToken;
469
+ if (options.customEndpoints)
470
+ this.customEndpoints = options.customEndpoints;
471
+ this.mode = options.customEndpoints ? 'custom' : options.mode || 'live';
472
+ if (options.company)
473
+ this.company = options.company;
474
+ if (options.project)
475
+ this.project = options.project;
476
+ this.app = options.app;
477
+ if (options.universalModel)
478
+ this.universalModel = options.universalModel;
479
+ }
480
+ getUrl(type, methodArray) {
481
+ const method = methodArray.filter((single) => single);
482
+ const urlArray = [];
483
+ let useEndpoint;
484
+ if (this.mode === 'custom') {
485
+ useEndpoint = this.customEndpoints[type];
486
+ }
487
+ else {
488
+ useEndpoint = this.endpoints[this.mode][type];
489
+ }
490
+ urlArray.push(useEndpoint);
491
+ urlArray.push(...method);
492
+ return urlArray.filter((single) => single).join('/');
493
+ }
494
+ getHeaders() {
495
+ const headers = {
496
+ 'studio-app': this.app,
497
+ };
498
+ if (this.authToken) {
499
+ headers.Authorization = `bearer ${this.authToken}`;
500
+ }
501
+ return headers;
502
+ }
503
+ static getCacheKeyMock(url) {
504
+ const key = new URL(url);
505
+ return key.pathname + key.search;
506
+ }
507
+ static getCacheKey(url) {
508
+ let key = url;
509
+ key = key.replace(/:|\/|\?|=|&/ig, '-');
510
+ return key;
511
+ }
512
+ static getCache() {
513
+ return cachedCalls;
514
+ }
515
+ static handleCall(call, options) {
516
+ // if (ISMOCK) {
517
+ // if (call.method !== 'GET') return Promise.resolve({ data: {} as T, status: 200 });
518
+ // const key = StudioSDK.getCacheKeyMock(call.url as string);
519
+ // console.group(`SDK_MOCK_CALL: [${call.method}] ${key}`);
520
+ // // if url is not in MockJs.ts, error will be thrown
521
+ // if (!mockJs[key]) {
522
+ // console.error(key);
523
+ // console.groupEnd();
524
+ // throw new Error('MOCK_DATA_MISSING');
525
+ // }
526
+ // console.log({ data: mockJs[key].data as T, status: mockJs[key].status });
527
+ // console.groupEnd();
528
+ // return Promise.resolve({ data: mockJs[key].data as T, status: mockJs[key].status });
529
+ // }
530
+ if (call.method === 'GET' && !(options === null || options === void 0 ? void 0 : options.bypassCache)) {
531
+ const cacheHit = StudioSDK.cache(axios.getUri(call), undefined, options);
532
+ if (cacheHit)
533
+ return Promise.resolve(cacheHit);
534
+ }
535
+ return axios.request(call)
536
+ .then((response) => {
537
+ if (call.method === 'GET')
538
+ StudioSDK.cache(axios.getUri(call), response, options);
539
+ return response;
540
+ })
541
+ .then((response) => ({ data: response.data, status: response.status }));
542
+ }
543
+ static cache(url, response, options) {
544
+ const key = (options === null || options === void 0 ? void 0 : options.id) ? options.id : StudioSDK.getCacheKey(url);
545
+ if (response) {
546
+ const useKey = (options === null || options === void 0 ? void 0 : options.id)
547
+ ? options.id
548
+ : key;
549
+ cachedCalls[useKey] = {
550
+ data: response.data,
551
+ status: response.status,
552
+ action: options === null || options === void 0 ? void 0 : options.action,
553
+ group: options === null || options === void 0 ? void 0 : options.group,
554
+ cacheLifetime: (options === null || options === void 0 ? void 0 : options.cacheLifetime) ? Date.now() + ((options === null || options === void 0 ? void 0 : options.cacheLifetime) || 0) : null,
555
+ cacheTime: Date.now(),
556
+ };
557
+ return undefined;
558
+ }
559
+ const useCache = cachedCalls[key];
560
+ if (!useCache)
561
+ return null;
562
+ if (useCache.cacheLifetime && useCache.cacheLifetime < Date.now()) {
563
+ console.debug('cache found but lifetime');
564
+ delete cachedCalls[key];
565
+ return null;
566
+ }
567
+ const returnCache = hardCopy(useCache);
568
+ returnCache === null || returnCache === void 0 ? true : delete returnCache.action;
569
+ returnCache === null || returnCache === void 0 ? true : delete returnCache.group;
570
+ returnCache === null || returnCache === void 0 ? true : delete returnCache.id;
571
+ returnCache.isCache = true;
572
+ return returnCache;
573
+ }
574
+ static flushCache(group, action) {
575
+ if (group || action) {
576
+ Object.keys(cachedCalls).forEach((key) => {
577
+ let flush = false;
578
+ const singleCache = cachedCalls[key];
579
+ if (group && action) {
580
+ if (singleCache.group === group && singleCache.action === action)
581
+ flush = true;
582
+ }
583
+ else if (group) {
584
+ if (singleCache.group === group)
585
+ flush = true;
586
+ }
587
+ else if (action) {
588
+ if (singleCache.action === action)
589
+ flush = true;
590
+ }
591
+ if (flush) {
592
+ delete cachedCalls[key];
593
+ }
594
+ });
595
+ }
596
+ else {
597
+ cachedCalls = {};
598
+ }
599
+ }
600
+ static flushId(id) {
601
+ delete cachedCalls[id];
602
+ }
603
+ }
604
+ //# 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;IAwC5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BAErC,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;CA0oBF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilaquadrat/sdk",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
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
  },