feat(core): Added type paths configuration for TypeScript, improved BelliniClient with optional API endpoint and publicationName, and refined imports with JavaScript extensions.
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
import * as plugins from './api.plugins.js';
|
||||
|
||||
export interface IBelliniClientOptions {
|
||||
publicationName: string;
|
||||
publicationName?: string;
|
||||
smartstatePart?: plugins.smartstate.StatePart<any, IBelliniClientState>;
|
||||
apiEndpoint?: string;
|
||||
}
|
||||
|
||||
export interface IBelliniClientState {
|
||||
@ -10,7 +11,6 @@ export interface IBelliniClientState {
|
||||
}
|
||||
|
||||
export class BelliniClient {
|
||||
private apiEndpoint = 'https://connect.api.global/bellini';
|
||||
public smartstatePart: plugins.smartstate.StatePart<any, IBelliniClientState>;
|
||||
public options: IBelliniClientOptions;
|
||||
|
||||
@ -42,7 +42,7 @@ export class BelliniClient {
|
||||
await this.init();
|
||||
const getArticles =
|
||||
new plugins.typedrequest.TypedRequest<plugins.belliniInterfaces.IRequest_Any_Bellini_GetArticles>(
|
||||
this.apiEndpoint,
|
||||
this.options.apiEndpoint,
|
||||
'getArticles',
|
||||
);
|
||||
const response = await getArticles.fire({
|
||||
|
@ -1,5 +1,5 @@
|
||||
// @bellini scope
|
||||
import * as belliniInterfaces from '@bellini/interfaces';
|
||||
import * as belliniInterfaces from '@bellini.io/interfaces';
|
||||
|
||||
export { belliniInterfaces };
|
||||
|
||||
|
Reference in New Issue
Block a user