@mastra/core 0.1.0 → 0.1.2
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/dist/authenticator.d.ts +62 -0
- package/dist/constants.d.ts +1 -0
- package/dist/core.cjs.development.js +5011 -0
- package/dist/core.cjs.development.js.map +1 -0
- package/dist/core.cjs.production.min.js +2 -0
- package/dist/core.cjs.production.min.js.map +1 -0
- package/dist/core.esm.js +4947 -0
- package/dist/core.esm.js.map +1 -0
- package/dist/data-access/index.d.ts +350 -0
- package/dist/framework.d.ts +116 -0
- package/dist/generated-types/index.d.ts +4 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +8 -0
- package/dist/integration.d.ts +100 -0
- package/dist/lib/index.d.ts +5 -0
- package/dist/lib/query-builder/constants.d.ts +16 -0
- package/dist/lib/query-builder/filters/sql.d.ts +8 -0
- package/dist/lib/query-builder/schema.d.ts +36 -0
- package/dist/lib/query-builder/sorts/sql.d.ts +7 -0
- package/dist/lib/query-builder/types.d.ts +30 -0
- package/dist/lib/query-builder/utils.d.ts +26 -0
- package/dist/lib/utils/object.d.ts +50 -0
- package/dist/next/callback.d.ts +3 -0
- package/dist/next/connect.d.ts +3 -0
- package/dist/next/index.d.ts +15 -0
- package/dist/next/inngest.d.ts +3 -0
- package/dist/next/utils.d.ts +9 -0
- package/dist/next/webhook.d.ts +9 -0
- package/dist/prisma/client.d.ts +2 -0
- package/dist/prisma/client.ts +31 -0
- package/dist/prisma/gen.js +139 -0
- package/dist/prisma/migrations/20240828034109_initial_migration/migration.sql +111 -0
- package/dist/prisma/migrations/20240829210901_initial_migration/migration.sql +1 -0
- package/dist/prisma/migrations/20240905143158_initial_migration/migration.sql +1 -0
- package/dist/prisma/migrations/20240911212856_initial_migration/migration.sql +1 -0
- package/dist/prisma/migrations/20240915044235_initial_migration/migration.sql +1 -0
- package/dist/prisma/migrations/migration_lock.toml +3 -0
- package/dist/prisma/schema.prisma +129 -0
- package/dist/schemas.d.ts +84 -0
- package/dist/service/service.property.d.ts +24 -0
- package/dist/service/service.record.d.ts +24 -0
- package/dist/sync-factory.d.ts +13 -0
- package/dist/sync-fixtures/github.d.ts +949 -0
- package/dist/sync-fixtures/stripe.d.ts +92 -0
- package/dist/types.d.ts +367 -0
- package/dist/utils/errors.d.ts +3 -0
- package/dist/utils/index.d.ts +12 -0
- package/dist/utils/inngest.d.ts +4 -0
- package/dist/workflows/conditions/constants.d.ts +16 -0
- package/dist/workflows/conditions/types.d.ts +2 -0
- package/dist/workflows/handler.d.ts +38 -0
- package/dist/workflows/runner.d.ts +43 -0
- package/dist/workflows/schemas.d.ts +1043 -0
- package/dist/workflows/types.d.ts +96 -0
- package/dist/workflows/utils.d.ts +111 -0
- package/package.json +2 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { prisma } from '../prisma/client';
|
|
2
|
+
import { PrismaClient } from '@prisma-app/client';
|
|
3
|
+
export declare class PropertyService<T extends typeof prisma> {
|
|
4
|
+
db: PrismaClient;
|
|
5
|
+
constructor({ db }: {
|
|
6
|
+
db: T;
|
|
7
|
+
});
|
|
8
|
+
getPropertiesByEntityType({ entityType, }: {
|
|
9
|
+
entityType: string;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
visible: boolean;
|
|
15
|
+
config: import("@prisma-app/client/runtime/library").JsonValue | null;
|
|
16
|
+
description: string | null;
|
|
17
|
+
type: import("@prisma-app/client").$Enums.PropertyType;
|
|
18
|
+
order: number;
|
|
19
|
+
modifiable: boolean;
|
|
20
|
+
parentId: string | null;
|
|
21
|
+
entityId: string | null;
|
|
22
|
+
}[]>;
|
|
23
|
+
}
|
|
24
|
+
export declare const propertyService: PropertyService<(url: string) => PrismaClient>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { prisma } from '../prisma/client';
|
|
2
|
+
import { PrismaClient } from '@prisma-app/client';
|
|
3
|
+
import { PropertyService } from './service.property';
|
|
4
|
+
import { FilterObject } from '../lib/query-builder/types';
|
|
5
|
+
export declare class RecordService<T extends typeof prisma> {
|
|
6
|
+
db: PrismaClient;
|
|
7
|
+
propertyService: PropertyService<T>;
|
|
8
|
+
constructor({ db }: {
|
|
9
|
+
db: T;
|
|
10
|
+
});
|
|
11
|
+
buildRecordQuerySql({ whereClause, filterClause, sortClauses, entityType, }: {
|
|
12
|
+
whereClause: string;
|
|
13
|
+
filterClause?: string;
|
|
14
|
+
entityType: string;
|
|
15
|
+
sortClauses: string[];
|
|
16
|
+
}): string;
|
|
17
|
+
getFilteredRecords<T extends string | number | symbol>({ entityType, k_id, filters, sort, }: {
|
|
18
|
+
entityType: string;
|
|
19
|
+
filters?: FilterObject<T>;
|
|
20
|
+
sort?: string[];
|
|
21
|
+
k_id: string;
|
|
22
|
+
}): Promise<any>;
|
|
23
|
+
}
|
|
24
|
+
export declare const recordService: RecordService<(url: string) => PrismaClient>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function getResponseDataKey({ responseSchema, listDataKey, }: {
|
|
2
|
+
listDataKey?: string;
|
|
3
|
+
responseSchema: any;
|
|
4
|
+
}): any[];
|
|
5
|
+
export declare function allowedKey(key: string): boolean;
|
|
6
|
+
export declare function getEntityKey(key: string): string;
|
|
7
|
+
export declare function generateSyncs({ client, schema, name, idKey, listDataKey, }: {
|
|
8
|
+
client: any;
|
|
9
|
+
schema: any;
|
|
10
|
+
name: string;
|
|
11
|
+
idKey: string;
|
|
12
|
+
listDataKey?: string;
|
|
13
|
+
}): Record<string, any>;
|