@xxmachina/common 0.0.0-PLACEHOLDER
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/_shared/auth/index.d.ts +8 -0
- package/_shared/auth/passports/anonymous/index.d.ts +8 -0
- package/_shared/auth/passports/firebase/index.d.ts +19 -0
- package/_shared/auth/passports/internal/index.d.ts +17 -0
- package/_shared/auth/passports/msal/index.d.ts +26 -0
- package/_shared/meta/index.d.ts +8 -0
- package/_shared/meta/redis/index.d.ts +39 -0
- package/auth/index.d.ts +16 -0
- package/azure-auth/index.d.ts +41 -0
- package/domain/builder/index.d.ts +81 -0
- package/domain/builder/screen-item/index.d.ts +7 -0
- package/domain/index.d.ts +2 -0
- package/domain/models/index.d.ts +517 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs +20 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs +41 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs +34 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs +49 -0
- package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-auth.mjs +25 -0
- package/fesm2022/xxmachina-common-_shared-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-meta-redis.mjs +99 -0
- package/fesm2022/xxmachina-common-_shared-meta-redis.mjs.map +1 -0
- package/fesm2022/xxmachina-common-_shared-meta.mjs +26 -0
- package/fesm2022/xxmachina-common-_shared-meta.mjs.map +1 -0
- package/fesm2022/xxmachina-common-auth.mjs +17 -0
- package/fesm2022/xxmachina-common-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-azure-auth.mjs +160 -0
- package/fesm2022/xxmachina-common-azure-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-builder-screen-item.mjs +201 -0
- package/fesm2022/xxmachina-common-domain-builder-screen-item.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-builder.mjs +494 -0
- package/fesm2022/xxmachina-common-domain-builder.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain-models.mjs +841 -0
- package/fesm2022/xxmachina-common-domain-models.mjs.map +1 -0
- package/fesm2022/xxmachina-common-domain.mjs +7 -0
- package/fesm2022/xxmachina-common-domain.mjs.map +1 -0
- package/fesm2022/xxmachina-common-firebase-auth.mjs +36 -0
- package/fesm2022/xxmachina-common-firebase-auth.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-converters-google.mjs +39 -0
- package/fesm2022/xxmachina-common-infra-converters-google.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external-data-connect.mjs +13 -0
- package/fesm2022/xxmachina-common-infra-external-data-connect.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external-quick-js.mjs +61 -0
- package/fesm2022/xxmachina-common-infra-external-quick-js.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external-resend.mjs +10 -0
- package/fesm2022/xxmachina-common-infra-external-resend.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-external.mjs +35 -0
- package/fesm2022/xxmachina-common-infra-external.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-query-firestore.mjs +33 -0
- package/fesm2022/xxmachina-common-infra-query-firestore.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-query-hasura.mjs +20 -0
- package/fesm2022/xxmachina-common-infra-query-hasura.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs +18 -0
- package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-firestore.mjs +73 -0
- package/fesm2022/xxmachina-common-infra-repository-firestore.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-hasura.mjs +41 -0
- package/fesm2022/xxmachina-common-infra-repository-hasura.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs +105 -0
- package/fesm2022/xxmachina-common-infra-repository-notion.mjs.map +1 -0
- package/fesm2022/xxmachina-common-infra.mjs +368 -0
- package/fesm2022/xxmachina-common-infra.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain-builders.mjs +79 -0
- package/fesm2022/xxmachina-common-invoice-domain-builders.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain-models.mjs +432 -0
- package/fesm2022/xxmachina-common-invoice-domain-models.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain-resolvers.mjs +41 -0
- package/fesm2022/xxmachina-common-invoice-domain-resolvers.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-domain.mjs +8 -0
- package/fesm2022/xxmachina-common-invoice-domain.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-contract.mjs +27 -0
- package/fesm2022/xxmachina-common-invoice-usecase-contract.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-invoice.mjs +191 -0
- package/fesm2022/xxmachina-common-invoice-usecase-invoice.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-order.mjs +36 -0
- package/fesm2022/xxmachina-common-invoice-usecase-order.mjs.map +1 -0
- package/fesm2022/xxmachina-common-invoice-usecase-partner.mjs +36 -0
- package/fesm2022/xxmachina-common-invoice-usecase-partner.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-graphql.mjs +323 -0
- package/fesm2022/xxmachina-common-services-graphql.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-query-config.mjs +44 -0
- package/fesm2022/xxmachina-common-services-query-config.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-query.mjs +65 -0
- package/fesm2022/xxmachina-common-services-query.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-speech.mjs +178 -0
- package/fesm2022/xxmachina-common-services-speech.mjs.map +1 -0
- package/fesm2022/xxmachina-common-services-transformer.mjs +27 -0
- package/fesm2022/xxmachina-common-services-transformer.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores-firestore.mjs +33 -0
- package/fesm2022/xxmachina-common-stores-firestore.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores-hasura.mjs +32 -0
- package/fesm2022/xxmachina-common-stores-hasura.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores-inmemory.mjs +102 -0
- package/fesm2022/xxmachina-common-stores-inmemory.mjs.map +1 -0
- package/fesm2022/xxmachina-common-stores.mjs +16 -0
- package/fesm2022/xxmachina-common-stores.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-assistant.mjs +67 -0
- package/fesm2022/xxmachina-common-usecase-assistant.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-database.mjs +95 -0
- package/fesm2022/xxmachina-common-usecase-database.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-graphql.mjs +51 -0
- package/fesm2022/xxmachina-common-usecase-graphql.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-link.mjs +26 -0
- package/fesm2022/xxmachina-common-usecase-link.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-project.mjs +35 -0
- package/fesm2022/xxmachina-common-usecase-project.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase-spec.mjs +45 -0
- package/fesm2022/xxmachina-common-usecase-spec.mjs.map +1 -0
- package/fesm2022/xxmachina-common-usecase.mjs +198 -0
- package/fesm2022/xxmachina-common-usecase.mjs.map +1 -0
- package/fesm2022/xxmachina-common-utils-crypto.mjs +30 -0
- package/fesm2022/xxmachina-common-utils-crypto.mjs.map +1 -0
- package/fesm2022/xxmachina-common-utils.mjs +53 -0
- package/fesm2022/xxmachina-common-utils.mjs.map +1 -0
- package/fesm2022/xxmachina-common.mjs +6 -0
- package/fesm2022/xxmachina-common.mjs.map +1 -0
- package/firebase-auth/index.d.ts +6 -0
- package/index.d.ts +1 -0
- package/infra/converters/google/index.d.ts +15 -0
- package/infra/external/data-connect/index.d.ts +7 -0
- package/infra/external/index.d.ts +24 -0
- package/infra/external/quick-js/index.d.ts +24 -0
- package/infra/external/resend/index.d.ts +16 -0
- package/infra/index.d.ts +206 -0
- package/infra/query/firestore/index.d.ts +20 -0
- package/infra/query/hasura/index.d.ts +9 -0
- package/infra/repository/dataconnect/index.d.ts +28 -0
- package/infra/repository/firestore/index.d.ts +42 -0
- package/infra/repository/hasura/index.d.ts +24 -0
- package/infra/repository/notion/index.d.ts +89 -0
- package/invoice/domain/builders/index.d.ts +31 -0
- package/invoice/domain/index.d.ts +3 -0
- package/invoice/domain/models/index.d.ts +78 -0
- package/invoice/domain/resolvers/index.d.ts +15 -0
- package/invoice/usecase/contract/index.d.ts +14 -0
- package/invoice/usecase/invoice/index.d.ts +34 -0
- package/invoice/usecase/order/index.d.ts +16 -0
- package/invoice/usecase/partner/index.d.ts +16 -0
- package/package.json +276 -0
- package/services/graphql/index.d.ts +97 -0
- package/services/query/config/index.d.ts +18 -0
- package/services/query/index.d.ts +29 -0
- package/services/speech/index.d.ts +37 -0
- package/services/transformer/index.d.ts +14 -0
- package/stores/firestore/index.d.ts +17 -0
- package/stores/hasura/index.d.ts +17 -0
- package/stores/index.d.ts +32 -0
- package/stores/inmemory/index.d.ts +33 -0
- package/usecase/assistant/index.d.ts +18 -0
- package/usecase/database/index.d.ts +39 -0
- package/usecase/graphql/index.d.ts +17 -0
- package/usecase/index.d.ts +73 -0
- package/usecase/link/index.d.ts +13 -0
- package/usecase/project/index.d.ts +16 -0
- package/usecase/spec/index.d.ts +17 -0
- package/utils/crypto/index.d.ts +9 -0
- package/utils/index.d.ts +5 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as _apollo_client from '@apollo/client';
|
|
2
|
+
import * as graphql from 'graphql';
|
|
3
|
+
import { DocumentNode } from 'graphql';
|
|
4
|
+
import { GetHeaders, ApolloClientManagerService } from '@nx-ddd/hasura';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
import { Provider } from '@angular/core';
|
|
8
|
+
import { FetchResult } from '@apollo/client/core';
|
|
9
|
+
|
|
10
|
+
interface ExecutableGraphql {
|
|
11
|
+
endpoint: string;
|
|
12
|
+
query: string | DocumentNode;
|
|
13
|
+
variables: object;
|
|
14
|
+
headers: Record<string, string> | GetHeaders;
|
|
15
|
+
}
|
|
16
|
+
type ExecutableGetSchemaGraphql = Pick<ExecutableGraphql, 'endpoint' | 'headers'>;
|
|
17
|
+
declare class GraphqlService {
|
|
18
|
+
readonly apolloClientManager: ApolloClientManagerService;
|
|
19
|
+
/**
|
|
20
|
+
* @TODO
|
|
21
|
+
* this.apolloMulti.getClientはendpoint単位でApolloClientを管理しているため、
|
|
22
|
+
* _query.graphql.headersに認証情報などが含まれていないリクエストが初めに来ると、
|
|
23
|
+
* {message: 'no subscriptions exist}のようなエラーが出る。
|
|
24
|
+
* Headersが更新されるたびに、ApolloClientを再生成するような処理も必要。
|
|
25
|
+
*/
|
|
26
|
+
subscribe(graphql: ExecutableGraphql): Observable<graphql.FormattedExecutionResult<Record<string, any>, Record<string, any>>>;
|
|
27
|
+
query(graphql: ExecutableGraphql): Observable<_apollo_client.ApolloQueryResult<Record<string, any>>>;
|
|
28
|
+
getSchema(graphql: ExecutableGetSchemaGraphql): Observable<any>;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GraphqlService, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GraphqlService>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface ExecutableGraphqlWithSplitting extends ExecutableGraphql {
|
|
34
|
+
enableSplitting?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* GraphqlServiceを拡張して、subscription分割機能を追加
|
|
38
|
+
*
|
|
39
|
+
* GraphQL/Hasuraの制限「1つのsubscriptionには1つのトップレベルフィールドのみ」を回避し、
|
|
40
|
+
* 複数のフィールドを含むsubscriptionを自動的に分割して並列実行します。
|
|
41
|
+
*/
|
|
42
|
+
declare class GraphqlEnhancedService extends GraphqlService {
|
|
43
|
+
private readonly splitter;
|
|
44
|
+
/**
|
|
45
|
+
* subscriptionクエリを実行
|
|
46
|
+
* デフォルトでsubscriptionは自動的に分割される
|
|
47
|
+
*/
|
|
48
|
+
subscribe(graphql: ExecutableGraphqlWithSplitting): Observable<FetchResult<any>>;
|
|
49
|
+
/**
|
|
50
|
+
* subscriptionクエリを分割して並列実行し、結果を結合
|
|
51
|
+
*/
|
|
52
|
+
private subscribeSplit;
|
|
53
|
+
/**
|
|
54
|
+
* クエリがsubscriptionかどうかを判定
|
|
55
|
+
*/
|
|
56
|
+
private isSubscription;
|
|
57
|
+
/**
|
|
58
|
+
* クエリから使用されている変数を抽出
|
|
59
|
+
*/
|
|
60
|
+
private extractUsedVariablesFromQuery;
|
|
61
|
+
/**
|
|
62
|
+
* 変数値から使用される変数のみをフィルタリング
|
|
63
|
+
*/
|
|
64
|
+
private filterVariableValues;
|
|
65
|
+
/**
|
|
66
|
+
* GraphQLクエリから未使用の変数を削除
|
|
67
|
+
*/
|
|
68
|
+
private removeUnusedVariables;
|
|
69
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GraphqlEnhancedService, never>;
|
|
70
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GraphqlEnhancedService>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* GraphqlServiceをGraphqlEnhancedServiceで置き換えるプロバイダー
|
|
75
|
+
*
|
|
76
|
+
* 使用方法:
|
|
77
|
+
* ```typescript
|
|
78
|
+
* export default <Routes>[
|
|
79
|
+
* {
|
|
80
|
+
* path: '',
|
|
81
|
+
* component: YourComponent,
|
|
82
|
+
* providers: [
|
|
83
|
+
* provideGraphqlEnhancedLocally()
|
|
84
|
+
* ]
|
|
85
|
+
* }
|
|
86
|
+
* ];
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
declare function provideGraphqlEnhancedLocally(): Provider[];
|
|
90
|
+
/**
|
|
91
|
+
* グローバルにGraphqlEnhancedServiceを提供
|
|
92
|
+
* app.config.tsで使用
|
|
93
|
+
*/
|
|
94
|
+
declare function provideGraphqlEnhancedGlobally(): Provider[];
|
|
95
|
+
|
|
96
|
+
export { GraphqlEnhancedService, GraphqlService, provideGraphqlEnhancedGlobally, provideGraphqlEnhancedLocally };
|
|
97
|
+
export type { ExecutableGetSchemaGraphql, ExecutableGraphql, ExecutableGraphqlWithSplitting };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
type QueryConfig = Record<string, string>;
|
|
6
|
+
declare const QUERY_CONFIG: InjectionToken<Observable<QueryConfig>>;
|
|
7
|
+
declare function provideQueryConfig(useFactory: () => Observable<QueryConfig>): EnvironmentProviders;
|
|
8
|
+
declare class QueryConfigService {
|
|
9
|
+
readonly config$: Observable<QueryConfig>;
|
|
10
|
+
protected replaceText(text: string, config: QueryConfig): string;
|
|
11
|
+
protected replace<T extends Record<string, any> | string>(params: T, config: QueryConfig): T;
|
|
12
|
+
resolve<T extends object>(params: T): Observable<T>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryConfigService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<QueryConfigService>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { QUERY_CONFIG, QueryConfigService, provideQueryConfig };
|
|
18
|
+
export type { QueryConfig };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Query } from '@xxmachina/common/domain';
|
|
3
|
+
import { ExecutableGraphql, GraphqlService } from '@xxmachina/common/services/graphql';
|
|
4
|
+
import { QueryConfigService } from '@xxmachina/common/services/query/config';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { TransformerService } from '@xxmachina/common/services/transformer';
|
|
7
|
+
|
|
8
|
+
interface ExecutableQuery {
|
|
9
|
+
graphql: ExecutableGraphql;
|
|
10
|
+
}
|
|
11
|
+
declare class QueryResolverService {
|
|
12
|
+
readonly config: QueryConfigService;
|
|
13
|
+
resolve(query: Query): Observable<ExecutableQuery>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryResolverService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<QueryResolverService>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class QueryService {
|
|
19
|
+
protected readonly resolver: QueryResolverService;
|
|
20
|
+
protected readonly graphql: GraphqlService;
|
|
21
|
+
protected readonly transformer: TransformerService;
|
|
22
|
+
subscribe<R extends object = any>(query: Query): Observable<R>;
|
|
23
|
+
query<R extends object = any>(query: Query): Observable<R>;
|
|
24
|
+
getSchema(query: Query): Observable<any>;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<QueryService>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { QueryService };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as rxjs from 'rxjs';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare class SpeechService {
|
|
5
|
+
private static instanceCounter;
|
|
6
|
+
private readonly PAUSE_THRESHOLD;
|
|
7
|
+
private recognition;
|
|
8
|
+
private lastSpeechTime;
|
|
9
|
+
private ignoreResults;
|
|
10
|
+
readonly transcript: _angular_core.WritableSignal<{
|
|
11
|
+
finalized: string;
|
|
12
|
+
interim: string;
|
|
13
|
+
}>;
|
|
14
|
+
readonly transcript$: rxjs.Observable<{
|
|
15
|
+
finalized: string;
|
|
16
|
+
interim: string;
|
|
17
|
+
}>;
|
|
18
|
+
readonly isListening: _angular_core.WritableSignal<boolean>;
|
|
19
|
+
readonly activeComponentId: _angular_core.WritableSignal<string>;
|
|
20
|
+
readonly isSupported: boolean;
|
|
21
|
+
readonly finalized: _angular_core.Signal<string>;
|
|
22
|
+
readonly finalized$: rxjs.Observable<string>;
|
|
23
|
+
constructor();
|
|
24
|
+
generateComponentId(): string;
|
|
25
|
+
isActiveComponent(componentId: string): boolean;
|
|
26
|
+
start(componentId: string): void;
|
|
27
|
+
stop(): void;
|
|
28
|
+
toggle(componentId: string): void;
|
|
29
|
+
clear(): void;
|
|
30
|
+
private setupRecognition;
|
|
31
|
+
private startRecognition;
|
|
32
|
+
private stopRecognition;
|
|
33
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SpeechService, never>;
|
|
34
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SpeechService>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { SpeechService };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { QuickJsService } from '@xxmachina/common/infra/external/quick-js';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare class TransformerService {
|
|
5
|
+
readonly quickJs: QuickJsService;
|
|
6
|
+
transform({ transformerTs, transformer, }: {
|
|
7
|
+
transformerTs?: string;
|
|
8
|
+
transformer?: (result: any) => any;
|
|
9
|
+
}, input: any): any;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TransformerService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TransformerService>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { TransformerService };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as rxjs from 'rxjs';
|
|
2
|
+
import * as _xxmachina_common_domain_models from '@xxmachina/common/domain/models';
|
|
3
|
+
|
|
4
|
+
declare function getFirestoreQueryStore(): {
|
|
5
|
+
list: () => rxjs.Observable<_xxmachina_common_domain_models.Query<any, any>[]>;
|
|
6
|
+
create: (item: any) => Promise<_xxmachina_common_domain_models.Query<any, any>>;
|
|
7
|
+
update: (item: any) => Promise<void>;
|
|
8
|
+
save: (item: any) => Promise<any>;
|
|
9
|
+
};
|
|
10
|
+
declare function getFirestoreResourceStore(): {
|
|
11
|
+
list: () => rxjs.Observable<_xxmachina_common_domain_models.Resource[]>;
|
|
12
|
+
create: (item: any) => Promise<_xxmachina_common_domain_models.Resource>;
|
|
13
|
+
update: (item: any) => Promise<void>;
|
|
14
|
+
save: (item: any) => Promise<any>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { getFirestoreQueryStore, getFirestoreResourceStore };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as _xxmachina_common_domain_models from '@xxmachina/common/domain/models';
|
|
2
|
+
import * as rxjs from 'rxjs';
|
|
3
|
+
|
|
4
|
+
declare function getHasuraQueryStore(): {
|
|
5
|
+
list: () => rxjs.Observable<any[]>;
|
|
6
|
+
create: (item: any) => Promise<_xxmachina_common_domain_models.Query<any, any>>;
|
|
7
|
+
update: (item: any) => Promise<void>;
|
|
8
|
+
save: (item: any) => Promise<any>;
|
|
9
|
+
};
|
|
10
|
+
declare function getHasuraResourceStore(): {
|
|
11
|
+
list: () => rxjs.Observable<any[]>;
|
|
12
|
+
create: (item: any) => Promise<_xxmachina_common_domain_models.Resource>;
|
|
13
|
+
update: (item: any) => Promise<void>;
|
|
14
|
+
save: (item: any) => Promise<any>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { getHasuraQueryStore, getHasuraResourceStore };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _nx_ddd_common_domain from '@nx-ddd/common/domain';
|
|
3
|
+
import * as _ng_atomic_common_stores_entities from '@ng-atomic/common/stores/entities';
|
|
4
|
+
import { EntityStoreAdapter } from '@ng-atomic/common/stores/entities';
|
|
5
|
+
import { Query, Resource } from '@xxmachina/common/domain/models';
|
|
6
|
+
|
|
7
|
+
declare function provideQueryStore(useFactory: () => EntityStoreAdapter<Query>): {
|
|
8
|
+
provide: _angular_core.InjectionToken<{
|
|
9
|
+
entity: _nx_ddd_common_domain.Type<_ng_atomic_common_stores_entities.Entity>;
|
|
10
|
+
adapter: EntityStoreAdapter<_ng_atomic_common_stores_entities.Entity>;
|
|
11
|
+
}[]>;
|
|
12
|
+
multi: boolean;
|
|
13
|
+
useFactory: (injector: _angular_core.Injector) => {
|
|
14
|
+
entity: _nx_ddd_common_domain.Type<Query<any, any>>;
|
|
15
|
+
adapter: EntityStoreAdapter<Query<any, any>>;
|
|
16
|
+
};
|
|
17
|
+
deps: (typeof _angular_core.Injector)[];
|
|
18
|
+
};
|
|
19
|
+
declare function provideResourceStore(useFactory: () => EntityStoreAdapter<Resource>): {
|
|
20
|
+
provide: _angular_core.InjectionToken<{
|
|
21
|
+
entity: _nx_ddd_common_domain.Type<_ng_atomic_common_stores_entities.Entity>;
|
|
22
|
+
adapter: EntityStoreAdapter<_ng_atomic_common_stores_entities.Entity>;
|
|
23
|
+
}[]>;
|
|
24
|
+
multi: boolean;
|
|
25
|
+
useFactory: (injector: _angular_core.Injector) => {
|
|
26
|
+
entity: _nx_ddd_common_domain.Type<Resource>;
|
|
27
|
+
adapter: EntityStoreAdapter<Resource>;
|
|
28
|
+
};
|
|
29
|
+
deps: (typeof _angular_core.Injector)[];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { provideQueryStore, provideResourceStore };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { EntityStoreAdapter } from '@ng-atomic/common/stores/entities';
|
|
4
|
+
import { Resource } from '@xxmachina/common/domain/models';
|
|
5
|
+
|
|
6
|
+
interface InMemoryStoreOptions {
|
|
7
|
+
initialData?: Record<string, any>;
|
|
8
|
+
}
|
|
9
|
+
declare class InMemoryStore {
|
|
10
|
+
private readonly store$;
|
|
11
|
+
constructor(options?: InMemoryStoreOptions);
|
|
12
|
+
set<T>(key: string, value: T): void;
|
|
13
|
+
get<T>(key: string): T | undefined;
|
|
14
|
+
get$<T>(key: string): Observable<T | undefined>;
|
|
15
|
+
delete(key: string): void;
|
|
16
|
+
clear(): void;
|
|
17
|
+
has(key: string): boolean;
|
|
18
|
+
keys(): string[];
|
|
19
|
+
values(): any[];
|
|
20
|
+
entries(): [string, any][];
|
|
21
|
+
size(): number;
|
|
22
|
+
getAll(): Record<string, any>;
|
|
23
|
+
getAll$(): Observable<Record<string, any>>;
|
|
24
|
+
update<T>(key: string, updater: (value: T | undefined) => T): void;
|
|
25
|
+
merge(data: Record<string, any>): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InMemoryStore, never>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InMemoryStore>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare function getInmemoryResourceStore(initialResources?: Resource[]): EntityStoreAdapter<Resource>;
|
|
31
|
+
|
|
32
|
+
export { InMemoryStore, getInmemoryResourceStore };
|
|
33
|
+
export type { InMemoryStoreOptions };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InfrastructureService } from '@xxmachina/common/infra';
|
|
2
|
+
import { AssistantOperator } from '@xxmachina/common/domain/models';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
5
|
+
declare class AssistantService {
|
|
6
|
+
private infra;
|
|
7
|
+
constructor(infra: InfrastructureService);
|
|
8
|
+
list(): Promise<AssistantOperator[]>;
|
|
9
|
+
create(assistant: AssistantOperator): Promise<AssistantOperator>;
|
|
10
|
+
update(assistant: AssistantOperator): Promise<void>;
|
|
11
|
+
delete(assistantid: string): Promise<void>;
|
|
12
|
+
operate(assistantId: string, input: string): Promise<string>;
|
|
13
|
+
private scrape;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AssistantService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AssistantService>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { AssistantService };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as _notionhq_client_build_src_api_endpoints from '@notionhq/client/build/src/api-endpoints';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
interface DatabaseConfig {
|
|
6
|
+
notionApiKey: string;
|
|
7
|
+
databaseIdToName: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
declare function provideDatabaseConfig(useFactory: () => DatabaseConfig): {
|
|
12
|
+
provide: InjectionToken<DatabaseConfig>;
|
|
13
|
+
useFactory: () => DatabaseConfig;
|
|
14
|
+
};
|
|
15
|
+
declare class DatabaseService {
|
|
16
|
+
private config;
|
|
17
|
+
private notion;
|
|
18
|
+
get(databaseId: string): Promise<_notionhq_client_build_src_api_endpoints.GetDatabaseResponse>;
|
|
19
|
+
update(databaseId: string, body: any): Promise<_notionhq_client_build_src_api_endpoints.UpdateDatabaseResponse>;
|
|
20
|
+
listDatabases(): Promise<any[]>;
|
|
21
|
+
generateMermaidER(): Promise<string>;
|
|
22
|
+
getPageItems(dbId: string, name: string): Promise<any[]>;
|
|
23
|
+
getParent(parent: {
|
|
24
|
+
type: 'database_id';
|
|
25
|
+
database_id: string;
|
|
26
|
+
} | {
|
|
27
|
+
type: 'page_id';
|
|
28
|
+
page_id: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'block_id';
|
|
31
|
+
block_id: string;
|
|
32
|
+
}): Promise<_notionhq_client_build_src_api_endpoints.PartialDatabaseObjectResponse | _notionhq_client_build_src_api_endpoints.PartialPageObjectResponse | _notionhq_client_build_src_api_endpoints.PartialBlockObjectResponse>;
|
|
33
|
+
getPath(obj: any): Promise<string>;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatabaseService, never>;
|
|
35
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DatabaseService>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { DatabaseService, provideDatabaseConfig };
|
|
39
|
+
export type { DatabaseConfig };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as firebase_admin_data_connect from 'firebase-admin/data-connect';
|
|
2
|
+
import * as _nx_ddd_any_func from '@nx-ddd/any-func';
|
|
3
|
+
import { HttpClient } from '@angular/common/http';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
|
|
6
|
+
declare class GraphqlService {
|
|
7
|
+
protected http: HttpClient;
|
|
8
|
+
protected anyFunc: _nx_ddd_any_func.AnyFuncService;
|
|
9
|
+
protected dc: firebase_admin_data_connect.DataConnect;
|
|
10
|
+
constructor();
|
|
11
|
+
graphql(query: string): Promise<firebase_admin_data_connect.ExecuteGraphqlResponse<unknown>>;
|
|
12
|
+
makeQuery(instructions: string): Promise<string>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GraphqlService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GraphqlService>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { GraphqlService };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { InfrastructureService } from '@xxmachina/common/infra';
|
|
2
|
+
import { AssistantOperator, Spec, Project, Google } from '@xxmachina/common/domain/models';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import * as firebase_admin_data_connect from 'firebase-admin/data-connect';
|
|
5
|
+
import * as _nx_ddd_any_func from '@nx-ddd/any-func';
|
|
6
|
+
import { HttpClient } from '@angular/common/http';
|
|
7
|
+
|
|
8
|
+
declare class AssistantService {
|
|
9
|
+
private infra;
|
|
10
|
+
constructor(infra: InfrastructureService);
|
|
11
|
+
list(): Promise<AssistantOperator[]>;
|
|
12
|
+
create(assistant: AssistantOperator): Promise<AssistantOperator>;
|
|
13
|
+
update(assistant: AssistantOperator): Promise<void>;
|
|
14
|
+
delete(assistantid: string): Promise<void>;
|
|
15
|
+
operate(assistantId: string, input: string): Promise<string>;
|
|
16
|
+
private scrape;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AssistantService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AssistantService>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare class SpecService {
|
|
22
|
+
private infra;
|
|
23
|
+
constructor(infra: InfrastructureService);
|
|
24
|
+
list(): Promise<Spec[]>;
|
|
25
|
+
get(id: string): Promise<Spec>;
|
|
26
|
+
create(spec: Spec): Promise<Spec>;
|
|
27
|
+
update(spec: Partial<Spec>): Promise<void>;
|
|
28
|
+
delete(id: string): Promise<void>;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpecService, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SpecService>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare class ProjectService {
|
|
34
|
+
private infra;
|
|
35
|
+
constructor(infra: InfrastructureService);
|
|
36
|
+
list(): Promise<Project[]>;
|
|
37
|
+
get(projectId: string): Promise<Project>;
|
|
38
|
+
create(project: Project): Promise<Project>;
|
|
39
|
+
update(project: Project): Promise<void>;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProjectService, never>;
|
|
41
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ProjectService>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare class LinkService {
|
|
45
|
+
infra: InfrastructureService;
|
|
46
|
+
constructor(infra: InfrastructureService);
|
|
47
|
+
saveGoogleLink(google: Google): Promise<[Google, boolean]>;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LinkService, never>;
|
|
49
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LinkService>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare class GraphqlService {
|
|
53
|
+
protected http: HttpClient;
|
|
54
|
+
protected anyFunc: _nx_ddd_any_func.AnyFuncService;
|
|
55
|
+
protected dc: firebase_admin_data_connect.DataConnect;
|
|
56
|
+
constructor();
|
|
57
|
+
graphql(query: string): Promise<firebase_admin_data_connect.ExecuteGraphqlResponse<unknown>>;
|
|
58
|
+
makeQuery(instructions: string): Promise<string>;
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GraphqlService, never>;
|
|
60
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GraphqlService>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare class UsecaseService {
|
|
64
|
+
readonly assistant: AssistantService;
|
|
65
|
+
readonly link: LinkService;
|
|
66
|
+
readonly project: ProjectService;
|
|
67
|
+
readonly spec: SpecService;
|
|
68
|
+
readonly graphql: GraphqlService;
|
|
69
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UsecaseService, never>;
|
|
70
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UsecaseService>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { UsecaseService };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Google } from '@xxmachina/common/domain/models';
|
|
2
|
+
import { InfrastructureService } from '@xxmachina/common/infra';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
5
|
+
declare class LinkService {
|
|
6
|
+
infra: InfrastructureService;
|
|
7
|
+
constructor(infra: InfrastructureService);
|
|
8
|
+
saveGoogleLink(google: Google): Promise<[Google, boolean]>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LinkService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LinkService>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { LinkService };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Project } from '@xxmachina/common/domain/models';
|
|
2
|
+
import { InfrastructureService } from '@xxmachina/common/infra';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
5
|
+
declare class ProjectService {
|
|
6
|
+
private infra;
|
|
7
|
+
constructor(infra: InfrastructureService);
|
|
8
|
+
list(): Promise<Project[]>;
|
|
9
|
+
get(projectId: string): Promise<Project>;
|
|
10
|
+
create(project: Project): Promise<Project>;
|
|
11
|
+
update(project: Project): Promise<void>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProjectService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ProjectService>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { ProjectService };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { InfrastructureService } from '@xxmachina/common/infra';
|
|
2
|
+
import { Spec } from '@xxmachina/common/domain/models';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
5
|
+
declare class SpecService {
|
|
6
|
+
private infra;
|
|
7
|
+
constructor(infra: InfrastructureService);
|
|
8
|
+
list(): Promise<Spec[]>;
|
|
9
|
+
get(id: string): Promise<Spec>;
|
|
10
|
+
create(spec: Spec): Promise<Spec>;
|
|
11
|
+
update(spec: Partial<Spec>): Promise<void>;
|
|
12
|
+
delete(id: string): Promise<void>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpecService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SpecService>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { SpecService };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare function float32Buffer(arr: number[]): Buffer<ArrayBuffer>;
|
|
2
|
+
declare function _bufferFloat32(buffer: Buffer): Float32Array;
|
|
3
|
+
declare function bufferFloat32(buffer: Buffer): number[];
|
|
4
|
+
declare function float64Buffer(arr: number[]): Buffer<ArrayBuffer>;
|
|
5
|
+
declare function _bufferFloat64(buffer: Buffer): Float64Array;
|
|
6
|
+
declare function bufferFloat64(buffer: Buffer): number[];
|
|
7
|
+
declare function hash(input: string): string;
|
|
8
|
+
|
|
9
|
+
export { _bufferFloat32, _bufferFloat64, bufferFloat32, bufferFloat64, float32Buffer, float64Buffer, hash };
|