@elevasis/core 0.40.0 → 0.42.0
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/auth/index.d.ts +68 -2
- package/dist/index.d.ts +652 -416
- package/dist/index.js +82 -5
- package/dist/knowledge/index.d.ts +69 -5
- package/dist/organization-model/index.d.ts +652 -416
- package/dist/organization-model/index.js +82 -5
- package/dist/test-utils/index.d.ts +103 -37
- package/dist/test-utils/index.js +69 -2
- package/package.json +1 -1
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +54 -0
- package/src/business/clients/api-schemas.test.ts +63 -29
- package/src/business/clients/api-schemas.ts +41 -29
- package/src/integrations/credentials/index.ts +3 -4
- package/src/organization-model/__tests__/clients.test.ts +146 -0
- package/src/organization-model/contracts.ts +27 -27
- package/src/organization-model/cross-ref.ts +4 -0
- package/src/organization-model/defaults.ts +2 -2
- package/src/organization-model/domains/knowledge.ts +1 -0
- package/src/organization-model/graph/build.ts +23 -6
- package/src/organization-model/graph/schema.ts +4 -3
- package/src/organization-model/graph/types.ts +4 -3
- package/src/organization-model/helpers.ts +15 -0
- package/src/organization-model/published.ts +19 -1
- package/src/organization-model/schema-refinements.ts +2 -2
- package/src/organization-model/schema.ts +97 -0
- package/src/organization-model/snapshot-hash.ts +0 -2
- package/src/organization-model/types.ts +19 -1
- package/src/platform/constants/versions.ts +1 -1
- package/src/reference/_generated/contracts.md +54 -0
- package/src/supabase/database.types.ts +3 -0
- package/src/supabase/index.ts +0 -6
- package/src/business/pdf/server/__tests__/pdfmake-test.ts +0 -219
package/dist/auth/index.d.ts
CHANGED
|
@@ -2018,6 +2018,7 @@ type Database = {
|
|
|
2018
2018
|
organization_id: string;
|
|
2019
2019
|
primary_company_id: string | null;
|
|
2020
2020
|
primary_contact_id: string | null;
|
|
2021
|
+
source: string;
|
|
2021
2022
|
source_deal_id: string | null;
|
|
2022
2023
|
status: string;
|
|
2023
2024
|
updated_at: string;
|
|
@@ -2031,6 +2032,7 @@ type Database = {
|
|
|
2031
2032
|
organization_id: string;
|
|
2032
2033
|
primary_company_id?: string | null;
|
|
2033
2034
|
primary_contact_id?: string | null;
|
|
2035
|
+
source?: string;
|
|
2034
2036
|
source_deal_id?: string | null;
|
|
2035
2037
|
status?: string;
|
|
2036
2038
|
updated_at?: string;
|
|
@@ -2044,6 +2046,7 @@ type Database = {
|
|
|
2044
2046
|
organization_id?: string;
|
|
2045
2047
|
primary_company_id?: string | null;
|
|
2046
2048
|
primary_contact_id?: string | null;
|
|
2049
|
+
source?: string;
|
|
2047
2050
|
source_deal_id?: string | null;
|
|
2048
2051
|
status?: string;
|
|
2049
2052
|
updated_at?: string;
|
|
@@ -4393,6 +4396,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
4393
4396
|
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
4394
4397
|
lastModified: z.ZodString;
|
|
4395
4398
|
}, z.core.$strip>>;
|
|
4399
|
+
clients: z.ZodOptional<z.ZodObject<{
|
|
4400
|
+
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
4401
|
+
lastModified: z.ZodString;
|
|
4402
|
+
}, z.core.$strip>>;
|
|
4396
4403
|
customers: z.ZodOptional<z.ZodObject<{
|
|
4397
4404
|
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
4398
4405
|
lastModified: z.ZodString;
|
|
@@ -4450,6 +4457,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
4450
4457
|
version: 1;
|
|
4451
4458
|
lastModified: string;
|
|
4452
4459
|
};
|
|
4460
|
+
clients: {
|
|
4461
|
+
version: 1;
|
|
4462
|
+
lastModified: string;
|
|
4463
|
+
};
|
|
4453
4464
|
customers: {
|
|
4454
4465
|
version: 1;
|
|
4455
4466
|
lastModified: string;
|
|
@@ -4507,6 +4518,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
4507
4518
|
version: 1;
|
|
4508
4519
|
lastModified: string;
|
|
4509
4520
|
} | undefined;
|
|
4521
|
+
clients?: {
|
|
4522
|
+
version: 1;
|
|
4523
|
+
lastModified: string;
|
|
4524
|
+
} | undefined;
|
|
4510
4525
|
customers?: {
|
|
4511
4526
|
version: 1;
|
|
4512
4527
|
lastModified: string;
|
|
@@ -4699,6 +4714,56 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
4699
4714
|
shortName: z.ZodOptional<z.ZodString>;
|
|
4700
4715
|
description: z.ZodOptional<z.ZodString>;
|
|
4701
4716
|
}, z.core.$loose>>;
|
|
4717
|
+
clients: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
4718
|
+
id: z.ZodString;
|
|
4719
|
+
slug: z.ZodString;
|
|
4720
|
+
name: z.ZodString;
|
|
4721
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
4722
|
+
active: "active";
|
|
4723
|
+
onboarding: "onboarding";
|
|
4724
|
+
paused: "paused";
|
|
4725
|
+
completed: "completed";
|
|
4726
|
+
churned: "churned";
|
|
4727
|
+
}>>;
|
|
4728
|
+
source: z.ZodOptional<z.ZodString>;
|
|
4729
|
+
identity: z.ZodDefault<z.ZodObject<{
|
|
4730
|
+
organizationName: z.ZodOptional<z.ZodString>;
|
|
4731
|
+
shortName: z.ZodOptional<z.ZodString>;
|
|
4732
|
+
clientBrief: z.ZodDefault<z.ZodString>;
|
|
4733
|
+
geographicFocus: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
4734
|
+
timeZone: z.ZodDefault<z.ZodString>;
|
|
4735
|
+
}, z.core.$loose>>;
|
|
4736
|
+
branding: z.ZodDefault<z.ZodObject<{
|
|
4737
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
4738
|
+
tagline: z.ZodOptional<z.ZodString>;
|
|
4739
|
+
values: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
4740
|
+
}, z.core.$loose>>;
|
|
4741
|
+
workspace: z.ZodDefault<z.ZodObject<{
|
|
4742
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
4743
|
+
"external-project": "external-project";
|
|
4744
|
+
"internal-project": "internal-project";
|
|
4745
|
+
none: "none";
|
|
4746
|
+
}>>;
|
|
4747
|
+
owner: z.ZodOptional<z.ZodEnum<{
|
|
4748
|
+
platform: "platform";
|
|
4749
|
+
client: "client";
|
|
4750
|
+
developer: "developer";
|
|
4751
|
+
}>>;
|
|
4752
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
4753
|
+
workspacePath: z.ZodOptional<z.ZodString>;
|
|
4754
|
+
}, z.core.$loose>>;
|
|
4755
|
+
links: z.ZodDefault<z.ZodObject<{
|
|
4756
|
+
projectIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
4757
|
+
primaryCompanyId: z.ZodOptional<z.ZodString>;
|
|
4758
|
+
primaryContactId: z.ZodOptional<z.ZodString>;
|
|
4759
|
+
sourceDealId: z.ZodOptional<z.ZodString>;
|
|
4760
|
+
}, z.core.$strip>>;
|
|
4761
|
+
prompts: z.ZodDefault<z.ZodObject<{
|
|
4762
|
+
defaultContext: z.ZodDefault<z.ZodString>;
|
|
4763
|
+
}, z.core.$loose>>;
|
|
4764
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
4765
|
+
customValues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
4766
|
+
}, z.core.$strict>>>>;
|
|
4702
4767
|
customers: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
4703
4768
|
id: z.ZodString;
|
|
4704
4769
|
order: z.ZodNumber;
|
|
@@ -5352,6 +5417,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
5352
5417
|
action: "action";
|
|
5353
5418
|
ontology: "ontology";
|
|
5354
5419
|
role: "role";
|
|
5420
|
+
client: "client";
|
|
5355
5421
|
stage: "stage";
|
|
5356
5422
|
goal: "goal";
|
|
5357
5423
|
"customer-segment": "customer-segment";
|
|
@@ -5363,7 +5429,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
5363
5429
|
nodeId: z.ZodUnion<readonly [z.ZodString, z.ZodTemplateLiteral<`ontology:${string}`>]>;
|
|
5364
5430
|
}, z.core.$strip>]>, z.ZodTransform<{
|
|
5365
5431
|
target: {
|
|
5366
|
-
kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
|
|
5432
|
+
kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
|
|
5367
5433
|
id: string;
|
|
5368
5434
|
};
|
|
5369
5435
|
nodeId: string;
|
|
@@ -5371,7 +5437,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
5371
5437
|
nodeId: string;
|
|
5372
5438
|
} | {
|
|
5373
5439
|
target: {
|
|
5374
|
-
kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
|
|
5440
|
+
kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
|
|
5375
5441
|
id: string;
|
|
5376
5442
|
};
|
|
5377
5443
|
}>>>>;
|