File tree Expand file tree Collapse file tree 13 files changed +3891
-4656
lines changed
Expand file tree Collapse file tree 13 files changed +3891
-4656
lines changed Original file line number Diff line number Diff line change 1010 "test" : " jest" ,
1111 "lint" : " eslint src --ext .ts"
1212 },
13+ "dependencies" : {
14+ "@mixcore/config" : " workspace:*" ,
15+ "@mixcore/file" : " workspace:*" ,
16+ "@mixcore/template" : " workspace:*" ,
17+ "@mixcore/user" : " workspace:*"
18+ },
1319 "license" : " SEE LICENSE IN LICENSE" ,
1420 "repository" : " https://github.com/mixcore/javascript-sdk" ,
1521 "publishConfig" : {
Original file line number Diff line number Diff line change 11// SDK bootstrap entrypoint for Mixcore JavaScript SDK
22// Usage: import { createMixcoreSdk } from '@mixcore/apis';
3+ import { ApiService } from './api-services' ;
34import { UserServices } from '@mixcore/user' ;
45import { TemplateService } from '@mixcore/template' ;
5- import { FileServices } from '@mixcore/file' ;
6+ import { FileServicesPortal } from '@mixcore/file' ;
67import { ConfigurationServices } from '@mixcore/config' ;
78// ...import other domain services as needed
89
910export interface MixcoreSdkConfig {
11+ apiBaseUrl : string ;
12+ apiKey ?: string ;
1013 [ key : string ] : any ;
1114}
1215
1316export function createMixcoreSdk ( config : MixcoreSdkConfig ) {
17+ const api = new ApiService ( config ) ;
18+
1419 return {
15- user : new UserServices ( config ) ,
16- template : new TemplateService ( config ) ,
17- file : new FileServices ( config ) ,
18- config : new ConfigurationServices ( config ) ,
20+ api,
21+ user : new UserServices ( api ) ,
22+ template : new TemplateService ( api ) ,
23+ file : new FileServicesPortal ( api ) ,
24+ config : new ConfigurationServices ( api ) ,
1925 // ...add other domain services here
2026 } ;
2127}
Original file line number Diff line number Diff line change 1010 "test" : " jest" ,
1111 "lint" : " eslint src --ext .ts"
1212 },
13+ "dependencies" : {
14+ "@mixcore/api" : " workspace:*"
15+ },
1316 "license" : " SEE LICENSE IN LICENSE" ,
1417 "repository" : " https://github.com/mixcore/javascript-sdk" ,
1518 "publishConfig" : {
Original file line number Diff line number Diff line change 1- import { ApiService } from '. /api-services ' ;
1+ import { ApiService } from '@mixcore /api' ;
22
33/**
44 * ConfigurationServices
Original file line number Diff line number Diff line change 1010 "test" : " jest" ,
1111 "lint" : " eslint src --ext .ts"
1212 },
13+ "dependencies" : {
14+ "@mixcore/api" : " workspace:*"
15+ },
1316 "license" : " SEE LICENSE IN LICENSE" ,
1417 "repository" : " https://github.com/mixcore/javascript-sdk" ,
1518 "publishConfig" : {
Original file line number Diff line number Diff line change 1010 "test" : " jest" ,
1111 "lint" : " eslint src --ext .ts"
1212 },
13+ "dependencies" : {
14+ "@mixcore/api" : " workspace:*"
15+ },
1316 "license" : " SEE LICENSE IN LICENSE" ,
1417 "repository" : " https://github.com/mixcore/javascript-sdk" ,
1518 "publishConfig" : {
Original file line number Diff line number Diff line change 1- import { ApiService } from '. /api-services ' ;
1+ import { ApiService } from '@mixcore /api' ;
22
33export class FileServicesPortal {
44 private api : ApiService ;
Original file line number Diff line number Diff line change 1010 "test" : " jest" ,
1111 "lint" : " eslint src --ext .ts"
1212 },
13+ "dependencies" : {
14+ "@mixcore/api" : " workspace:*"
15+ },
1316 "license" : " SEE LICENSE IN LICENSE" ,
1417 "repository" : " https://github.com/mixcore/javascript-sdk" ,
1518 "publishConfig" : {
Original file line number Diff line number Diff line change 11export * from './template-service' ;
22export * from './module-article-services' ;
3- export * from './post-rest-mvc-service' ;
43export * from './theme-services' ;
54export * from './module-gallery-services' ;
Original file line number Diff line number Diff line change 1- import { ApiService } from '. /api-services ' ;
1+ import { ApiService } from '@mixcore /api' ;
22
33export class TemplateService {
44 private api : ApiService ;
You can’t perform that action at this time.
0 commit comments