@bcrumbs.net/bc-api 0.0.12 → 0.0.14
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/index.esm.d.ts +1 -0
- package/index.esm.js +12796 -4661
- package/package.json +4 -7
- package/{index.d.ts → src/index.d.ts} +1 -0
- package/src/lib/clients/dqueryClient.d.ts +8 -0
- package/src/lib/clients/showcaseClient.d.ts +7 -0
- package/{lib → src/lib}/endpoints/graphql/showcase/index.d.ts +1 -1
- package/{lib → src/lib}/endpoints/rest/showcase/index.d.ts +2 -2
- package/{lib → src/lib}/models/folder.d.ts +1 -1
- package/src/lib/models/form.d.ts +22 -0
- package/{lib → src/lib}/services/auth/index.d.ts +7 -7
- package/index.umd.js +0 -87437
- package/lib/clients/dqueryClient.d.ts +0 -13
- package/lib/clients/showcaseClient.d.ts +0 -12
- package/lib/services/validators/index.d.ts +0 -20
- /package/{lib → src/lib}/clients/dconfigClient.d.ts +0 -0
- /package/{lib → src/lib}/clients/showcaseRendererClient.d.ts +0 -0
- /package/{lib → src/lib}/config/index.d.ts +0 -0
- /package/{lib → src/lib}/endpoints/rest/auth/index.d.ts +0 -0
- /package/{lib → src/lib}/endpoints/rest/billing/index.d.ts +0 -0
- /package/{lib → src/lib}/endpoints/rest/companies/index.d.ts +0 -0
- /package/{lib → src/lib}/endpoints/rest/contents/index.d.ts +0 -0
- /package/{lib → src/lib}/endpoints/rest/files/index.d.ts +0 -0
- /package/{lib → src/lib}/endpoints/rest/models/index.d.ts +0 -0
- /package/{lib → src/lib}/models/config.d.ts +0 -0
- /package/{lib → src/lib}/models/content.d.ts +0 -0
- /package/{lib → src/lib}/models/contentInstance.d.ts +0 -0
- /package/{lib → src/lib}/models/file.d.ts +0 -0
- /package/{lib → src/lib}/models/model.d.ts +0 -0
- /package/{lib → src/lib}/models/usage.d.ts +0 -0
- /package/{lib → src/lib}/services/i18n/index.d.ts +0 -0
- /package/{lib → src/lib}/utils/httpStatusCode.d.ts +0 -0
- /package/{lib → src/lib}/utils/index.d.ts +0 -0
- /package/{lib → src/lib}/utils/strings.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bcrumbs.net/bc-api",
|
|
3
3
|
"description": "The SDK that helps to work with Bread Crumbs APIs",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.14",
|
|
5
5
|
"keyword": [
|
|
6
6
|
"bcrumbs",
|
|
7
7
|
"bc-api"
|
|
@@ -10,10 +10,7 @@
|
|
|
10
10
|
"@apollo/client": "^3.5.10",
|
|
11
11
|
"i18next": "^21.6.14",
|
|
12
12
|
"react-i18next": "^11.15.6",
|
|
13
|
-
"date-fns": "^2.28.0"
|
|
14
|
-
"apollo-cache-inmemory": "^1.6.6",
|
|
15
|
-
"apollo-link-http": "^1.5.17",
|
|
16
|
-
"graphql-tag": "^2.12.6"
|
|
13
|
+
"date-fns": "^2.28.0"
|
|
17
14
|
},
|
|
18
15
|
"dependencies": {
|
|
19
16
|
"apollo-link-rest": "^0.9.0-rc.1",
|
|
@@ -25,7 +22,7 @@
|
|
|
25
22
|
"author": {
|
|
26
23
|
"name": "Ahmad Mhaish"
|
|
27
24
|
},
|
|
28
|
-
"main": "./index.umd.js",
|
|
29
25
|
"module": "./index.esm.js",
|
|
30
|
-
"
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "./index.esm.js"
|
|
31
28
|
}
|
|
@@ -16,6 +16,7 @@ export * from './lib/models/folder';
|
|
|
16
16
|
export * from './lib/models/content';
|
|
17
17
|
export * from './lib/models/usage';
|
|
18
18
|
export * from './lib/models/config';
|
|
19
|
+
export * from './lib/models/form';
|
|
19
20
|
export * from './lib/utils';
|
|
20
21
|
export * from './lib/services/i18n';
|
|
21
22
|
export * from './lib/services/auth';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ApolloClient } from '@apollo/client';
|
|
2
|
+
declare const dqueryClient: ApolloClient<import("@apollo/client").NormalizedCacheObject>;
|
|
3
|
+
declare const withDQueryClient: (Page: any, pageOptions?: import("next-with-apollo").WithApolloOptions | undefined) => {
|
|
4
|
+
({ apollo, apolloState, router, ...props }: Partial<import("next-with-apollo").WithApolloProps<any>>): any;
|
|
5
|
+
displayName: string;
|
|
6
|
+
getInitialProps(pageCtx: import("next-with-apollo").ApolloContext<any>): Promise<{}>;
|
|
7
|
+
};
|
|
8
|
+
export { dqueryClient, withDQueryClient };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ApolloClient } from '@apollo/client';
|
|
2
|
+
export declare const showcaseClient: ApolloClient<unknown>;
|
|
3
|
+
export declare const withShowcaseClient: (Page: any, pageOptions?: import("next-with-apollo").WithApolloOptions | undefined) => {
|
|
4
|
+
({ apollo, apolloState, router, ...props }: Partial<import("next-with-apollo").WithApolloProps<any>>): any;
|
|
5
|
+
displayName: string;
|
|
6
|
+
getInitialProps(pageCtx: import("next-with-apollo").ApolloContext<any>): Promise<{}>;
|
|
7
|
+
};
|
|
@@ -18,7 +18,7 @@ export declare const useShowcaseSectionQuery: (companyId: number, id: number) =>
|
|
|
18
18
|
export declare const showcaseDomainsQuery: import("@apollo/client").DocumentNode;
|
|
19
19
|
export declare const showcaseDomainsQueryOptions: any;
|
|
20
20
|
export declare const useDomainsQuery: () => import("@apollo/client").QueryResult<any, {
|
|
21
|
-
companyId:
|
|
21
|
+
companyId: number | null;
|
|
22
22
|
}>;
|
|
23
23
|
export declare const showcaseConfig: import("@apollo/client").DocumentNode;
|
|
24
24
|
export declare const useShowcaseConfig: (domain: string) => import("@apollo/client").QueryResult<any, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UsageRecordQueryResult } from '../../../models/usage';
|
|
2
2
|
export declare const showcaseConfigurationQuery: import("@apollo/client").DocumentNode;
|
|
3
3
|
export declare const useShowcaseConfigurationQuery: () => import("@apollo/client").QueryResult<any, {
|
|
4
|
-
ContextId:
|
|
4
|
+
ContextId: number | null;
|
|
5
5
|
}>;
|
|
6
6
|
export declare const showcaseConfigurationQueryOptions: any;
|
|
7
7
|
export declare const addDomain: import("@apollo/client").DocumentNode;
|
|
@@ -13,7 +13,7 @@ export declare const useShowcaseTemplateOptions: any;
|
|
|
13
13
|
export declare const useShowcaseTemplateProgress: import("@apollo/client").DocumentNode;
|
|
14
14
|
export declare const useShowcaseTemplateProgressQuery: (templateId: number) => import("@apollo/client").LazyQueryResultTuple<any, {
|
|
15
15
|
templateId: number;
|
|
16
|
-
companyId:
|
|
16
|
+
companyId: number | null;
|
|
17
17
|
}>;
|
|
18
18
|
export declare const updateTemplateSectionThumb: import("@apollo/client").DocumentNode;
|
|
19
19
|
export declare const registeUsage: import("@apollo/client").DocumentNode;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ModelFieldsTypes } from "./model";
|
|
2
|
+
export interface GraphForm {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
type: 'Multiple Same Child' | 'Multiple Sections Form' | 'Multiple Steps Form' | 'Single Form';
|
|
6
|
+
priority: number;
|
|
7
|
+
backButtonLabel?: string;
|
|
8
|
+
customSubmitPath?: string;
|
|
9
|
+
submitButtonLabel?: string;
|
|
10
|
+
submitRedirectUrl?: string;
|
|
11
|
+
formFields: GraphFormField;
|
|
12
|
+
}
|
|
13
|
+
export interface GraphFormField {
|
|
14
|
+
id: number;
|
|
15
|
+
type: ModelFieldsTypes;
|
|
16
|
+
name: string;
|
|
17
|
+
title: string;
|
|
18
|
+
priority: number;
|
|
19
|
+
invisible?: boolean;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
choices?: string[];
|
|
22
|
+
}
|
|
@@ -112,12 +112,12 @@ export declare const auth: {
|
|
|
112
112
|
*/
|
|
113
113
|
setContext(value?: string, toStorage?: Storage, contextKey?: ContextKey): void;
|
|
114
114
|
/**
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
getContext(fromStorage?: Storage, contextKey?: ContextKey):
|
|
115
|
+
* get context from localstorage
|
|
116
|
+
*
|
|
117
|
+
* @param {'localStorage' | 'sessionStorage'} [fromStorage='localStorage'] specify storage
|
|
118
|
+
* @param {any} [tokenKey=TOKEN_KEY] optionnal parameter to specify a token key
|
|
119
|
+
* @returns {number} token value
|
|
120
|
+
*/
|
|
121
|
+
getContext(fromStorage?: Storage, contextKey?: ContextKey): number | null;
|
|
122
122
|
};
|
|
123
123
|
export default auth;
|