@lilaquadrat/sdk 0.0.8 → 0.0.9

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.9](https://github.com/lilaquadrat/sdk/compare/v0.0.8...v0.0.9) (2025-04-30)
6
+
7
+
8
+ ### Features
9
+
10
+ * **carts & lists:** added carts endpoints & join lists with structures ([df9bc9a](https://github.com/lilaquadrat/sdk/commit/df9bc9acf559055ed092e1070663210c95b29ff3))
11
+
5
12
  ### [0.0.8](https://github.com/lilaquadrat/sdk/compare/v0.0.7...v0.0.8) (2024-04-24)
6
13
 
7
14
 
package/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import axios, { AxiosResponse, AxiosRequestConfig, HttpStatusCode } from 'axios';
2
- import { BasicData, Contact, ContactAgreement, Content, Customers, DataObject, List, ListOfModels, ListParticipants, ListPartiticpantsDetails, Location, Me } from '@lilaquadrat/interfaces';
2
+ import { BasicData, Contact, ContactAgreement, Content, CustomerPerson, Customers, DataObject, List, ListOfModels, ListParticipants, ListPartiticpantsDetails, Location, ObjectIdString } from '@lilaquadrat/interfaces';
3
3
  import { hardCopy } from '@lilaquadrat/studio/lib/esm/frontend';
4
4
 
5
5
  // const mockJs = {};
@@ -409,7 +409,7 @@ export default class StudioSDK {
409
409
  },
410
410
 
411
411
  lists: {
412
- join: (listId: string, person: Contact, message: string | undefined, category: string, agreements: ContactAgreement[]) => StudioSDK.handleCall<Customers>(
412
+ join: (listId: string, person: Contact, message: string | undefined, category: string, agreements: ContactAgreement[], structure: Record<string, string> | undefined, options: {uuid: ObjectIdString, parentId: string}) => StudioSDK.handleCall<{_id: string, id: string}>(
413
413
  {
414
414
  method: 'POST',
415
415
  url: this.getUrl('api', ['public', 'lists', 'participants', this.company, this.project, listId, 'join']),
@@ -419,6 +419,8 @@ export default class StudioSDK {
419
419
  agreements,
420
420
  message,
421
421
  category,
422
+ structure,
423
+ options,
422
424
  },
423
425
  },
424
426
  ),
@@ -440,6 +442,53 @@ export default class StudioSDK {
440
442
  },
441
443
  ),
442
444
  },
445
+
446
+ carts: {
447
+ create:(cart?: {attributes: Record<string, string>}) => StudioSDK.handleCall<any>(
448
+ {
449
+ method: 'POST',
450
+ url: this.getUrl('api', ['public', 'carts', this.company, this.project]),
451
+ headers: this.getHeaders(),
452
+ data: cart,
453
+ },
454
+ ),
455
+ update:(internalId: ObjectIdString, items: any) => StudioSDK.handleCall<any>(
456
+ {
457
+ method: 'PUT',
458
+ url: this.getUrl('api', ['public', 'carts', this.company, this.project, internalId]),
459
+ headers: this.getHeaders(),
460
+ data: items,
461
+ },
462
+ ),
463
+ getById:(internalId: ObjectIdString) => StudioSDK.handleCall<any>(
464
+ {
465
+ method: 'GET',
466
+ url: this.getUrl('api', ['public', 'carts', this.company, this.project, internalId]),
467
+ headers: this.getHeaders(),
468
+ },
469
+ ),
470
+ getFinishedById:(internalId: ObjectIdString) => StudioSDK.handleCall<any>(
471
+ {
472
+ method: 'GET',
473
+ url: this.getUrl('api', ['public', 'carts', this.company, this.project, 'finished', internalId]),
474
+ headers: this.getHeaders(),
475
+ },
476
+ ),
477
+ getProduct:(id: string) => StudioSDK.handleCall<any>(
478
+ {
479
+ method: 'GET',
480
+ url: this.getUrl('api', ['public', 'carts', this.company, this.project, 'product', id]),
481
+ headers: this.getHeaders(),
482
+ },
483
+ ),
484
+ finalize:(internalId: ObjectIdString) => StudioSDK.handleCall<any>(
485
+ {
486
+ method: 'PUT',
487
+ url: this.getUrl('api', ['public', 'carts', this.company, this.project, 'finalize', internalId]),
488
+ headers: this.getHeaders(),
489
+ },
490
+ ),
491
+ }
443
492
  };
444
493
 
445
494
  members = {
@@ -517,7 +566,7 @@ export default class StudioSDK {
517
566
 
518
567
  lists: {
519
568
 
520
- join: (listId: string, message: string | undefined, category: string, agreements: ContactAgreement[]) => StudioSDK.handleCall<string>(
569
+ join: (listId: string, message: string | undefined, category: string, agreements: ContactAgreement[], structure: Record<string, string> | undefined, options: {uuid: ObjectIdString, parentId: string}) => StudioSDK.handleCall<string>(
521
570
  {
522
571
  method: 'POST',
523
572
  url: this.getUrl('api', ['members', 'lists', 'participants', this.company, this.project, listId, 'join']),
@@ -526,6 +575,8 @@ export default class StudioSDK {
526
575
  agreements,
527
576
  message,
528
577
  category,
578
+ structure,
579
+ options,
529
580
  },
530
581
  },
531
582
  ),
@@ -568,7 +619,7 @@ export default class StudioSDK {
568
619
  },
569
620
  ),
570
621
 
571
- get: () => StudioSDK.handleCall<Me>(
622
+ get: () => StudioSDK.handleCall<CustomerPerson>(
572
623
  {
573
624
  method: 'GET',
574
625
  url: this.getUrl('api', ['members', 'me', this.company, this.project]),
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@lilaquadrat/sdk",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "sdk for accessing STUDIO api",
5
+ "type": "module",
5
6
  "author": {
6
7
  "email": "m.schuebel@lila2.de",
7
8
  "name": "Mathias Schübel",
@@ -27,6 +28,7 @@
27
28
  "axios": "^1.6.7"
28
29
  },
29
30
  "devDependencies": {
31
+ "commitizen": "^4.3.1",
30
32
  "cz-conventional-changelog": "^3.3.0",
31
33
  "standard-version": "^9.5.0",
32
34
  "typescript": "^5.3.3"
package/lib/index.d.ts DELETED
@@ -1,172 +0,0 @@
1
- import { AxiosResponse, AxiosRequestConfig, HttpStatusCode } from 'axios';
2
- import { BasicData, Contact, ContactAgreement, Content, Customers, DataObject, List, ListOfModels, ListParticipants, ListPartiticpantsDetails, Location, Me } 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[]) => Promise<SDKResponse<Customers>>;
100
- address: (address: string) => Promise<SDKResponse<ListOfModels<Location>>>;
101
- state: (listId: string) => Promise<SDKResponse<ListPartiticpantsDetails>>;
102
- };
103
- };
104
- members: {
105
- content: {
106
- fetch: (type: string, link: string, options?: {
107
- state?: 'draft' | 'publish';
108
- }) => Promise<SDKResponse<BasicData<Content>>>;
109
- search: (type: string, search: string, site?: number, options?: {
110
- state?: 'draft' | 'publish';
111
- }) => Promise<SDKResponse<BasicData<Content>>>;
112
- getById: (id: string) => Promise<SDKResponse<BasicData<Content>>>;
113
- getByFilename: (filename: string) => Promise<SDKResponse<BasicData<Content>>>;
114
- getByInternalId: (id: string) => Promise<SDKResponse<BasicData<Content>>>;
115
- };
116
- lists: {
117
- join: (listId: string, message: string | undefined, category: string, agreements: ContactAgreement[]) => Promise<SDKResponse<string>>;
118
- /**
119
- * get the state for the logged in used for a specific list
120
- */
121
- state: (listId: string) => Promise<SDKResponse<ListParticipants>>;
122
- };
123
- me: {
124
- connect: (customerId: string) => Promise<SDKResponse<any>>;
125
- confirmEmail: (confirmationCode: string) => Promise<SDKResponse<any>>;
126
- get: () => Promise<SDKResponse<Me>>;
127
- isConnected: () => Promise<SDKResponse<any>>;
128
- emailConfirmed: () => Promise<SDKResponse<any>>;
129
- };
130
- };
131
- editor: {
132
- getById: (id: string) => Promise<SDKResponse<Content>>;
133
- getByInternalId: (id: string) => Promise<SDKResponse<Content>>;
134
- settings: (data: {
135
- company: string;
136
- project: string;
137
- }) => Promise<SDKResponse<Content>>;
138
- list: (site?: number, sort?: string, order?: number, options?: {
139
- layout?: boolean;
140
- partial?: boolean;
141
- active?: boolean;
142
- search?: string;
143
- tags?: string[];
144
- }) => Promise<SDKResponse<ListOfModels<Content>>>;
145
- };
146
- health: {
147
- health: () => Promise<SDKResponse<void>>;
148
- };
149
- customers: {
150
- list: (site?: number, search?: string, tags?: string[], type?: string, sort?: number, order?: string) => Promise<SDKResponse<DataObject<Customers>>>;
151
- single: (id: string) => Promise<SDKResponse<Customers>>;
152
- tags: (search: string) => Promise<SDKResponse<string[]>>;
153
- update: (id: string, data: Customers) => Promise<SDKResponse<Customers>>;
154
- add: (data: Customers) => Promise<SDKResponse<Customers>>;
155
- remove: (id: string) => Promise<SDKResponse<Customers>>;
156
- };
157
- lists: {
158
- single: (id: string) => Promise<SDKResponse<List>>;
159
- add: (data: List) => Promise<SDKResponse<List>>;
160
- update: (id: string, data: List) => Promise<SDKResponse<List>>;
161
- remove: (id: string) => Promise<SDKResponse<List>>;
162
- getByInternalId: (id: string) => Promise<SDKResponse<List>>;
163
- list: (site?: number, search?: string, tags?: string[], state?: string, sort?: string, order?: number) => Promise<SDKResponse<DataObject<List[]>>>;
164
- participants: {
165
- single: (listId: string, id: string) => Promise<SDKResponse<ListParticipants>>;
166
- udpateState: (listId: string, id: string, state: ListParticipants['state']) => Promise<SDKResponse<ListParticipants>>;
167
- udpateNote: (listId: string, id: string, note: ListParticipants['note']) => Promise<SDKResponse<ListParticipants>>;
168
- remove: (listId: string, id: string) => Promise<SDKResponse<ListParticipants>>;
169
- list: (listId: string, site?: number, search?: string, tags?: string[], state?: string[], sort?: string, order?: number) => Promise<SDKResponse<DataObject<ListParticipants>>>;
170
- };
171
- };
172
- }
package/lib/index.js DELETED
@@ -1,561 +0,0 @@
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) => 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
- },
101
- }),
102
- address: (address) => StudioSDK.handleCall({
103
- method: 'get',
104
- url: this.getUrl('api', ['public', 'lists', 'participants', this.company, this.project, 'address']),
105
- headers: this.getHeaders(),
106
- params: {
107
- address,
108
- },
109
- }),
110
- state: (listId) => StudioSDK.handleCall({
111
- method: 'get',
112
- url: this.getUrl('api', ['public', 'lists', this.company, this.project, listId, 'state']),
113
- headers: this.getHeaders(),
114
- }),
115
- },
116
- };
117
- this.members = {
118
- content: {
119
- fetch: (type, link, options) => StudioSDK.handleCall({
120
- method: 'GET',
121
- url: this.getUrl('api', ['members', 'content', type, link]),
122
- headers: this.getHeaders(),
123
- params: options,
124
- }),
125
- search: (type, search, site = 1, options) => {
126
- const params = Object.assign({ search }, options);
127
- return StudioSDK.handleCall({
128
- method: 'GET',
129
- url: this.getUrl('api', ['members', 'content', type, 'search', site.toString()]),
130
- headers: this.getHeaders(),
131
- params,
132
- });
133
- },
134
- getById: (id) => StudioSDK.handleCall({
135
- method: 'GET',
136
- url: this.getUrl('api', ['members', 'content', this.company, this.project, id]),
137
- headers: this.getHeaders(),
138
- }, {
139
- group: 'editor',
140
- action: 'single',
141
- id,
142
- }),
143
- getByFilename: (filename) => StudioSDK.handleCall({
144
- method: 'GET',
145
- url: this.getUrl('api', ['members', 'content', this.company, this.project, 'filename']),
146
- headers: this.getHeaders(),
147
- params: {
148
- filename
149
- }
150
- }, {
151
- group: 'editor',
152
- action: 'single',
153
- id: filename,
154
- }),
155
- getByInternalId: (id) => StudioSDK.handleCall({
156
- method: 'GET',
157
- url: this.getUrl('api', ['members', 'content', this.company, this.project, 'internal', id]),
158
- headers: this.getHeaders(),
159
- }, {
160
- group: 'editor',
161
- action: 'single',
162
- id,
163
- }),
164
- },
165
- lists: {
166
- join: (listId, message, category, agreements) => StudioSDK.handleCall({
167
- method: 'POST',
168
- url: this.getUrl('api', ['members', 'lists', 'participants', this.company, this.project, listId, 'join']),
169
- headers: this.getHeaders(),
170
- data: {
171
- agreements,
172
- message,
173
- category,
174
- },
175
- }),
176
- /**
177
- * get the state for the logged in used for a specific list
178
- */
179
- state: (listId) => StudioSDK.handleCall({
180
- method: 'GET',
181
- url: this.getUrl('api', ['members', 'lists', this.company, this.project, listId]),
182
- headers: this.getHeaders(),
183
- }, {
184
- group: 'lists',
185
- action: 'state',
186
- id: listId,
187
- }),
188
- },
189
- me: {
190
- connect: (customerId) => StudioSDK.handleCall({
191
- method: 'PUT',
192
- url: this.getUrl('api', ['members', 'me', this.company, this.project, 'connect']),
193
- headers: this.getHeaders(),
194
- data: { customerId },
195
- }),
196
- confirmEmail: (confirmationCode) => StudioSDK.handleCall({
197
- method: 'PUT',
198
- url: this.getUrl('api', ['members', 'me', this.company, this.project, 'confirm']),
199
- headers: this.getHeaders(),
200
- data: { confirmationCode },
201
- }),
202
- get: () => StudioSDK.handleCall({
203
- method: 'GET',
204
- url: this.getUrl('api', ['members', 'me', this.company, this.project]),
205
- headers: this.getHeaders(),
206
- }, {
207
- group: 'me',
208
- action: 'get',
209
- }),
210
- isConnected: () => StudioSDK.handleCall({
211
- method: 'HEAD',
212
- url: this.getUrl('api', ['members', 'me', this.company, this.project, 'connected', this.app]),
213
- headers: this.getHeaders(),
214
- }),
215
- emailConfirmed: () => StudioSDK.handleCall({
216
- method: 'HEAD',
217
- url: this.getUrl('api', ['members', 'me', this.company, this.project, 'emailConfirmed', this.app]),
218
- headers: this.getHeaders(),
219
- }),
220
- }
221
- };
222
- this.editor = {
223
- getById: (id) => StudioSDK.handleCall({
224
- method: 'GET',
225
- url: this.getUrl('api', ['editor', this.company, this.project, id]),
226
- headers: this.getHeaders(),
227
- }, {
228
- group: 'editor',
229
- action: 'single',
230
- id,
231
- }),
232
- getByInternalId: (id) => StudioSDK.handleCall({
233
- method: 'GET',
234
- url: this.getUrl('api', ['editor', this.company, this.project, 'internal', id]),
235
- headers: this.getHeaders(),
236
- }, {
237
- group: 'editor',
238
- action: 'single',
239
- id,
240
- }),
241
- settings: (data) => StudioSDK.handleCall({
242
- method: 'GET',
243
- url: this.getUrl('api', ['editor', data.company, data.project, 'settings']),
244
- headers: this.getHeaders(),
245
- }, {
246
- group: 'editor',
247
- action: 'settings',
248
- }),
249
- list: (site = 0, sort, order, options) => {
250
- const params = Object.assign({ sort,
251
- order }, (options || {}));
252
- return StudioSDK.handleCall({
253
- method: 'GET',
254
- url: this.getUrl('api', ['editor', this.company, this.project, 'list', site.toString()]),
255
- headers: this.getHeaders(),
256
- params,
257
- }, {
258
- group: 'editor',
259
- action: 'list',
260
- });
261
- },
262
- };
263
- this.health = {
264
- health: () => StudioSDK.handleCall({
265
- method: 'GET',
266
- url: this.getUrl('api', ['health']),
267
- headers: this.getHeaders(),
268
- }),
269
- };
270
- this.customers = {
271
- list: (site = 0, search, tags, type, sort, order) => StudioSDK.handleCall({
272
- method: 'GET',
273
- url: this.getUrl('api', ['customers', this.company, this.project, 'list', site.toString()]),
274
- headers: this.getHeaders(),
275
- params: {
276
- search,
277
- tags,
278
- sort,
279
- order,
280
- type,
281
- },
282
- }, {
283
- group: 'customers',
284
- action: 'list',
285
- }),
286
- single: (id) => StudioSDK.handleCall({
287
- method: 'GET',
288
- url: this.getUrl('api', ['customers', this.company, this.project, id]),
289
- headers: this.getHeaders(),
290
- }, {
291
- group: 'customers',
292
- action: 'single',
293
- id,
294
- }),
295
- tags: (search) => StudioSDK.handleCall({
296
- method: 'GET',
297
- url: this.getUrl('api', ['customers', this.company, this.project, 'tags', search]),
298
- headers: this.getHeaders(),
299
- }, {
300
- group: 'customers',
301
- action: 'tags',
302
- }),
303
- update: (id, data) => StudioSDK.handleCall({
304
- method: 'PUT',
305
- url: this.getUrl('api', ['customers', this.company, this.project, id]),
306
- headers: this.getHeaders(),
307
- data,
308
- }),
309
- add: (data) => StudioSDK.handleCall({
310
- method: 'POST',
311
- url: this.getUrl('api', ['customers', this.company, this.project]),
312
- headers: this.getHeaders(),
313
- data,
314
- }),
315
- remove: (id) => StudioSDK.handleCall({
316
- method: 'DELETE',
317
- url: this.getUrl('api', ['customers', this.company, this.project, id]),
318
- headers: this.getHeaders(),
319
- }),
320
- };
321
- this.lists = {
322
- single: (id) => StudioSDK.handleCall({
323
- method: 'GET',
324
- url: this.getUrl('api', ['lists', this.company, this.project, id]),
325
- headers: this.getHeaders(),
326
- }, {
327
- group: 'lists',
328
- action: 'single',
329
- id,
330
- }),
331
- add: (data) => StudioSDK.handleCall({
332
- method: 'POST',
333
- url: this.getUrl('api', ['lists', this.company, this.project]),
334
- headers: this.getHeaders(),
335
- data,
336
- }),
337
- update: (id, data) => StudioSDK.handleCall({
338
- method: 'PUT',
339
- url: this.getUrl('api', ['lists', this.company, this.project, id]),
340
- headers: this.getHeaders(),
341
- data,
342
- }),
343
- remove: (id) => StudioSDK.handleCall({
344
- method: 'DELETE',
345
- url: this.getUrl('api', ['lists', this.company, this.project, id]),
346
- headers: this.getHeaders(),
347
- }),
348
- getByInternalId: (id) => StudioSDK.handleCall({
349
- method: 'GET',
350
- url: this.getUrl('api', ['lists', this.company, this.project, id]),
351
- headers: this.getHeaders(),
352
- }, {
353
- group: 'lists',
354
- action: 'single',
355
- id,
356
- }),
357
- list: (site = 0, search, tags, state, sort, order) => StudioSDK.handleCall({
358
- method: 'GET',
359
- url: this.getUrl('api', ['lists', this.company, this.project, 'list', site.toString()]),
360
- headers: this.getHeaders(),
361
- params: {
362
- search,
363
- tags,
364
- sort,
365
- order,
366
- state,
367
- },
368
- }, {
369
- group: 'lists',
370
- action: 'list',
371
- }),
372
- participants: {
373
- single: (listId, id) => StudioSDK.handleCall({
374
- method: 'GET',
375
- url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, id]),
376
- headers: this.getHeaders(),
377
- }, {
378
- group: 'listParticipants',
379
- action: 'single',
380
- id,
381
- }),
382
- udpateState: (listId, id, state) => StudioSDK.handleCall({
383
- method: 'PUT',
384
- url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, 'state', id]),
385
- headers: this.getHeaders(),
386
- data: { state },
387
- }, {
388
- group: 'listParticipants',
389
- action: 'single',
390
- id,
391
- }),
392
- udpateNote: (listId, id, note) => StudioSDK.handleCall({
393
- method: 'PUT',
394
- url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, 'note', id]),
395
- headers: this.getHeaders(),
396
- data: { note },
397
- }, {
398
- group: 'listParticipants',
399
- action: 'single',
400
- id,
401
- }),
402
- remove: (listId, id) => StudioSDK.handleCall({
403
- method: 'DELETE',
404
- url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, id]),
405
- headers: this.getHeaders(),
406
- }),
407
- list: (listId, site = 0, search, tags, state, sort, order) => StudioSDK.handleCall({
408
- method: 'GET',
409
- url: this.getUrl('api', ['lists', 'participants', this.company, this.project, listId, 'list', site.toString()]),
410
- headers: this.getHeaders(),
411
- params: {
412
- search,
413
- tags,
414
- sort,
415
- order,
416
- state,
417
- },
418
- }, {
419
- group: 'listParticipants',
420
- action: 'list',
421
- }),
422
- },
423
- };
424
- if (options.authToken)
425
- this.authToken = options.authToken;
426
- if (options.customEndpoints)
427
- this.customEndpoints = options.customEndpoints;
428
- this.mode = options.customEndpoints ? 'custom' : options.mode || 'live';
429
- if (options.company)
430
- this.company = options.company;
431
- if (options.project)
432
- this.project = options.project;
433
- this.app = options.app;
434
- if (options.universalModel)
435
- this.universalModel = options.universalModel;
436
- }
437
- getUrl(type, methodArray) {
438
- const method = methodArray.filter((single) => single);
439
- const urlArray = [];
440
- let useEndpoint;
441
- if (this.mode === 'custom') {
442
- useEndpoint = this.customEndpoints[type];
443
- }
444
- else {
445
- useEndpoint = this.endpoints[this.mode][type];
446
- }
447
- urlArray.push(useEndpoint);
448
- urlArray.push(...method);
449
- return urlArray.filter((single) => single).join('/');
450
- }
451
- getHeaders() {
452
- const headers = {
453
- 'studio-app': this.app,
454
- };
455
- if (this.authToken) {
456
- headers.Authorization = `bearer ${this.authToken}`;
457
- }
458
- return headers;
459
- }
460
- static getCacheKeyMock(url) {
461
- const key = new URL(url);
462
- return key.pathname + key.search;
463
- }
464
- static getCacheKey(url) {
465
- let key = url;
466
- key = key.replace(/:|\/|\?|=|&/ig, '-');
467
- return key;
468
- }
469
- static getCache() {
470
- return cachedCalls;
471
- }
472
- static handleCall(call, options) {
473
- // if (ISMOCK) {
474
- // if (call.method !== 'GET') return Promise.resolve({ data: {} as T, status: 200 });
475
- // const key = StudioSDK.getCacheKeyMock(call.url as string);
476
- // console.group(`SDK_MOCK_CALL: [${call.method}] ${key}`);
477
- // // if url is not in MockJs.ts, error will be thrown
478
- // if (!mockJs[key]) {
479
- // console.error(key);
480
- // console.groupEnd();
481
- // throw new Error('MOCK_DATA_MISSING');
482
- // }
483
- // console.log({ data: mockJs[key].data as T, status: mockJs[key].status });
484
- // console.groupEnd();
485
- // return Promise.resolve({ data: mockJs[key].data as T, status: mockJs[key].status });
486
- // }
487
- if (call.method === 'GET' && !(options === null || options === void 0 ? void 0 : options.bypassCache)) {
488
- const cacheHit = StudioSDK.cache(axios.getUri(call), undefined, options);
489
- if (cacheHit)
490
- return Promise.resolve(cacheHit);
491
- }
492
- return axios.request(call)
493
- .then((response) => {
494
- if (call.method === 'GET')
495
- StudioSDK.cache(axios.getUri(call), response, options);
496
- return response;
497
- })
498
- .then((response) => ({ data: response.data, status: response.status }));
499
- }
500
- static cache(url, response, options) {
501
- const key = (options === null || options === void 0 ? void 0 : options.id) ? options.id : StudioSDK.getCacheKey(url);
502
- if (response) {
503
- const useKey = (options === null || options === void 0 ? void 0 : options.id)
504
- ? options.id
505
- : key;
506
- cachedCalls[useKey] = {
507
- data: response.data,
508
- status: response.status,
509
- action: options === null || options === void 0 ? void 0 : options.action,
510
- group: options === null || options === void 0 ? void 0 : options.group,
511
- cacheLifetime: (options === null || options === void 0 ? void 0 : options.cacheLifetime) ? Date.now() + ((options === null || options === void 0 ? void 0 : options.cacheLifetime) || 0) : null,
512
- cacheTime: Date.now(),
513
- };
514
- return undefined;
515
- }
516
- const useCache = cachedCalls[key];
517
- if (!useCache)
518
- return null;
519
- if (useCache.cacheLifetime && useCache.cacheLifetime < Date.now()) {
520
- console.debug('cache found but lifetime');
521
- delete cachedCalls[key];
522
- return null;
523
- }
524
- const returnCache = hardCopy(useCache);
525
- returnCache === null || returnCache === void 0 ? true : delete returnCache.action;
526
- returnCache === null || returnCache === void 0 ? true : delete returnCache.group;
527
- returnCache === null || returnCache === void 0 ? true : delete returnCache.id;
528
- returnCache.isCache = true;
529
- return returnCache;
530
- }
531
- static flushCache(group, action) {
532
- if (group || action) {
533
- Object.keys(cachedCalls).forEach((key) => {
534
- let flush = false;
535
- const singleCache = cachedCalls[key];
536
- if (group && action) {
537
- if (singleCache.group === group && singleCache.action === action)
538
- flush = true;
539
- }
540
- else if (group) {
541
- if (singleCache.group === group)
542
- flush = true;
543
- }
544
- else if (action) {
545
- if (singleCache.action === action)
546
- flush = true;
547
- }
548
- if (flush) {
549
- delete cachedCalls[key];
550
- }
551
- });
552
- }
553
- else {
554
- cachedCalls = {};
555
- }
556
- }
557
- static flushId(id) {
558
- delete cachedCalls[id];
559
- }
560
- }
561
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
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,MA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