@elevasis/sdk 1.31.0 → 1.32.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/cli.cjs CHANGED
@@ -37935,6 +37935,7 @@ function buildOmCrossRefIndex(model) {
37935
37935
  systemsById.set(system.id, system);
37936
37936
  }
37937
37937
  const resourceIds = new Set(Object.keys(model.resources ?? {}));
37938
+ const clientIds = new Set(Object.keys(model.clients ?? {}));
37938
37939
  const knowledgeIds = new Set(Object.keys(model.knowledge ?? {}));
37939
37940
  const roleIds = new Set(Object.keys(model.roles ?? {}));
37940
37941
  const goalIds = new Set(Object.keys(model.goals ?? {}));
@@ -37968,6 +37969,7 @@ function buildOmCrossRefIndex(model) {
37968
37969
  return {
37969
37970
  systemsById,
37970
37971
  resourceIds,
37972
+ clientIds,
37971
37973
  knowledgeIds,
37972
37974
  roleIds,
37973
37975
  goalIds,
@@ -37981,6 +37983,7 @@ function buildOmCrossRefIndex(model) {
37981
37983
  }
37982
37984
  function knowledgeTargetExists(index, kind, id) {
37983
37985
  if (kind === "system") return index.systemsById.has(id);
37986
+ if (kind === "client") return index.clientIds.has(id);
37984
37987
  if (kind === "resource") return index.resourceIds.has(id);
37985
37988
  if (kind === "knowledge") return index.knowledgeIds.has(id);
37986
37989
  if (kind === "stage") return index.stageIds.has(id);
@@ -38924,6 +38927,7 @@ var DEFAULT_ORGANIZATION_MODEL_GOALS = {};
38924
38927
  // ../core/src/organization-model/domains/knowledge.ts
38925
38928
  var KnowledgeTargetKindSchema = external_exports.enum([
38926
38929
  "system",
38930
+ "client",
38927
38931
  "resource",
38928
38932
  "knowledge",
38929
38933
  "stage",
@@ -39185,10 +39189,10 @@ function asRoleHolderArray(heldBy) {
39185
39189
  function isKnowledgeKindCompatibleWithTarget(knowledgeKind, targetKind) {
39186
39190
  if (knowledgeKind === "reference") return true;
39187
39191
  if (knowledgeKind === "playbook") {
39188
- return ["system", "resource", "stage", "action", "ontology"].includes(targetKind);
39192
+ return ["system", "client", "resource", "stage", "action", "ontology"].includes(targetKind);
39189
39193
  }
39190
39194
  if (knowledgeKind === "strategy") {
39191
- return ["system", "goal", "offering", "customer-segment", "ontology"].includes(targetKind);
39195
+ return ["system", "client", "goal", "offering", "customer-segment", "ontology"].includes(targetKind);
39192
39196
  }
39193
39197
  return false;
39194
39198
  }
@@ -39717,9 +39721,68 @@ function refineOrganizationModel(model, ctx) {
39717
39721
  }
39718
39722
 
39719
39723
  // ../core/src/organization-model/schema.ts
39724
+ var ClientProfileIdSchema = external_exports.string().uuid();
39725
+ var ClientProfileStatusSchema = external_exports.enum(["active", "onboarding", "paused", "completed", "churned"]);
39726
+ var ClientProfileSourceSchema = external_exports.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/, "Source must use lowercase letters, numbers, and underscores");
39727
+ var ClientProfileIdentitySchema = external_exports.object({
39728
+ organizationName: LabelSchema.optional(),
39729
+ shortName: external_exports.string().trim().min(1).max(40).optional(),
39730
+ clientBrief: external_exports.string().trim().max(4e3).default(""),
39731
+ geographicFocus: external_exports.array(external_exports.string().trim().min(1).max(200)).default([]),
39732
+ timeZone: external_exports.string().trim().min(1).max(100).default("UTC")
39733
+ }).passthrough().default({
39734
+ clientBrief: "",
39735
+ geographicFocus: [],
39736
+ timeZone: "UTC"
39737
+ });
39738
+ var ClientProfileBrandingSchema = external_exports.object({
39739
+ voice: external_exports.string().trim().max(280).optional(),
39740
+ tagline: external_exports.string().trim().max(200).optional(),
39741
+ values: external_exports.array(external_exports.string().trim().min(1).max(100)).default([])
39742
+ }).passthrough().default({
39743
+ values: []
39744
+ });
39745
+ var ClientProfileWorkspaceSchema = external_exports.object({
39746
+ kind: external_exports.enum(["external-project", "internal-project", "none"]).optional(),
39747
+ owner: external_exports.enum(["developer", "client", "platform"]).optional(),
39748
+ projectId: external_exports.string().trim().min(1).max(200).optional(),
39749
+ workspacePath: external_exports.string().trim().min(1).max(500).optional()
39750
+ }).passthrough().default({});
39751
+ var ClientProfileLinksSchema = external_exports.object({
39752
+ projectIds: external_exports.array(external_exports.string().uuid()).default([]),
39753
+ primaryCompanyId: external_exports.string().uuid().optional(),
39754
+ primaryContactId: external_exports.string().uuid().optional(),
39755
+ sourceDealId: external_exports.string().uuid().optional()
39756
+ }).default({
39757
+ projectIds: []
39758
+ });
39759
+ var ClientProfilePromptsSchema = external_exports.object({
39760
+ defaultContext: external_exports.string().trim().max(8e3).default("")
39761
+ }).passthrough().default({
39762
+ defaultContext: ""
39763
+ });
39764
+ var ClientProfileSchema = external_exports.object({
39765
+ id: ClientProfileIdSchema,
39766
+ slug: ModelIdSchema,
39767
+ name: LabelSchema,
39768
+ status: ClientProfileStatusSchema.default("onboarding"),
39769
+ source: ClientProfileSourceSchema.optional(),
39770
+ identity: ClientProfileIdentitySchema,
39771
+ branding: ClientProfileBrandingSchema,
39772
+ workspace: ClientProfileWorkspaceSchema,
39773
+ links: ClientProfileLinksSchema,
39774
+ prompts: ClientProfilePromptsSchema,
39775
+ config: external_exports.record(external_exports.string().trim().min(1).max(200), JsonValueSchema).default({}),
39776
+ customValues: external_exports.record(external_exports.string().trim().min(1).max(200), JsonValueSchema).default({})
39777
+ }).strict();
39778
+ var ClientProfilesDomainSchema = external_exports.record(ClientProfileIdSchema, ClientProfileSchema).refine((record2) => Object.entries(record2).every(([key, entry]) => entry.id === key), {
39779
+ message: "Each client profile id must match its map key"
39780
+ }).default({});
39781
+ var DEFAULT_ORGANIZATION_MODEL_CLIENTS = {};
39720
39782
  var OrganizationModelDomainKeySchema = external_exports.enum([
39721
39783
  "branding",
39722
39784
  "identity",
39785
+ "clients",
39723
39786
  "customers",
39724
39787
  "offerings",
39725
39788
  "roles",
@@ -39740,6 +39803,7 @@ var OrganizationModelDomainMetadataSchema = external_exports.object({
39740
39803
  var DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA = {
39741
39804
  branding: { version: 1, lastModified: "2026-05-10" },
39742
39805
  identity: { version: 1, lastModified: "2026-05-10" },
39806
+ clients: { version: 1, lastModified: "2026-05-30" },
39743
39807
  customers: { version: 1, lastModified: "2026-05-10" },
39744
39808
  offerings: { version: 1, lastModified: "2026-05-10" },
39745
39809
  roles: { version: 1, lastModified: "2026-05-10" },
@@ -39756,6 +39820,7 @@ var DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA = {
39756
39820
  var OrganizationModelDomainMetadataByDomainSchema = external_exports.object({
39757
39821
  branding: OrganizationModelDomainMetadataSchema,
39758
39822
  identity: OrganizationModelDomainMetadataSchema,
39823
+ clients: OrganizationModelDomainMetadataSchema,
39759
39824
  customers: OrganizationModelDomainMetadataSchema,
39760
39825
  offerings: OrganizationModelDomainMetadataSchema,
39761
39826
  roles: OrganizationModelDomainMetadataSchema,
@@ -39787,6 +39852,7 @@ var OrganizationModelSchemaBase = external_exports.object({
39787
39852
  branding: OrganizationModelBrandingSchema.default(DEFAULT_ORGANIZATION_MODEL_BRANDING),
39788
39853
  navigation: OrganizationModelNavigationSchema,
39789
39854
  identity: IdentityDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_IDENTITY),
39855
+ clients: ClientProfilesDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_CLIENTS),
39790
39856
  customers: CustomersDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_CUSTOMERS),
39791
39857
  offerings: OfferingsDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_OFFERINGS),
39792
39858
  roles: RolesDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_ROLES),
@@ -39819,6 +39885,7 @@ var DEFAULT_ORGANIZATION_MODEL = {
39819
39885
  branding: DEFAULT_ORGANIZATION_MODEL_BRANDING,
39820
39886
  navigation: DEFAULT_ORGANIZATION_MODEL_NAVIGATION,
39821
39887
  identity: DEFAULT_ORGANIZATION_MODEL_IDENTITY,
39888
+ clients: DEFAULT_ORGANIZATION_MODEL_CLIENTS,
39822
39889
  customers: DEFAULT_ORGANIZATION_MODEL_CUSTOMERS,
39823
39890
  offerings: DEFAULT_ORGANIZATION_MODEL_OFFERINGS,
39824
39891
  roles: DEFAULT_ORGANIZATION_MODEL_ROLES,
@@ -39985,6 +40052,7 @@ function getAllProjectStatuses(model, appliesTo) {
39985
40052
  var OrganizationGraphNodeKindSchema = external_exports.enum([
39986
40053
  "organization",
39987
40054
  "system",
40055
+ "client",
39988
40056
  "role",
39989
40057
  "action",
39990
40058
  "entity",
@@ -40230,6 +40298,22 @@ function buildOrganizationGraph(input) {
40230
40298
  }
40231
40299
  const validSystemRefs = new Set(systemPathByRef.keys());
40232
40300
  const systemNodeId = (systemRef) => nodeId("system", systemPathByRef.get(systemRef) ?? systemRef);
40301
+ for (const client of Object.values(organizationModel.clients).sort((a, b) => a.slug.localeCompare(b.slug))) {
40302
+ const id = nodeId("client", client.id);
40303
+ pushUniqueNode(nodes, nodeIds, {
40304
+ id,
40305
+ kind: "client",
40306
+ label: client.name,
40307
+ sourceId: client.id,
40308
+ description: client.identity.clientBrief || void 0
40309
+ });
40310
+ pushUniqueEdge(edges, edgeIds, {
40311
+ id: edgeId("contains", organizationNode.id, id),
40312
+ kind: "contains",
40313
+ sourceId: organizationNode.id,
40314
+ targetId: id
40315
+ });
40316
+ }
40233
40317
  function topologyNodeId(ref) {
40234
40318
  if (ref.kind === "system") return systemNodeId(ref.id);
40235
40319
  if (ref.kind === "resource") return nodeId("resource", ref.id);
@@ -45632,7 +45716,7 @@ function wrapAction(commandName, fn) {
45632
45716
  // package.json
45633
45717
  var package_default = {
45634
45718
  name: "@elevasis/sdk",
45635
- version: "1.31.0",
45719
+ version: "1.32.0",
45636
45720
  description: "SDK for building Elevasis organization resources",
45637
45721
  type: "module",
45638
45722
  bin: {
@@ -50755,13 +50839,14 @@ function registerAcquisitionCommands(program3) {
50755
50839
  init_source();
50756
50840
  init_config();
50757
50841
  function registerClientCreate(program3) {
50758
- program3.command("client:create").description('Create a new client\n Example: elevasis-sdk client:create --name "Acme Corp"').requiredOption("--name <name>", "Client name").option("--status <status>", "Client status: active | onboarding | paused | completed | churned").option("--source-deal-id <uuid>", "UUID of the source deal").option("--primary-company-id <uuid>", "UUID of the primary company").option("--primary-contact-id <uuid>", "UUID of the primary contact").option("--metadata <json>", "Arbitrary metadata (JSON string)").option("--api-url <url>", "API base URL").option("--pretty", "Render human-readable output instead of raw JSON").action(
50842
+ program3.command("client:create").description('Create a new client\n Example: elevasis-sdk client:create --name "Acme Corp"').requiredOption("--name <name>", "Client name").option("--status <status>", "Client status: active | onboarding | paused | completed | churned").option("--source <source>", "Client source (for example: acquisition | word_of_mouth)").option("--source-deal-id <uuid>", "UUID of the source deal").option("--primary-company-id <uuid>", "UUID of the primary company").option("--primary-contact-id <uuid>", "UUID of the primary contact").option("--metadata <json>", "Arbitrary metadata (JSON string)").option("--api-url <url>", "API base URL").option("--pretty", "Render human-readable output instead of raw JSON").action(
50759
50843
  wrapAction(
50760
50844
  "client:create",
50761
50845
  async (options) => {
50762
50846
  const apiUrl = resolveApiUrl(options.apiUrl);
50763
50847
  const body = { name: options.name };
50764
50848
  if (options.status !== void 0) body.status = options.status;
50849
+ if (options.source !== void 0) body.source = options.source;
50765
50850
  if (options.sourceDealId !== void 0) body.sourceDealId = options.sourceDealId;
50766
50851
  if (options.primaryCompanyId !== void 0) body.primaryCompanyId = options.primaryCompanyId;
50767
50852
  if (options.primaryContactId !== void 0) body.primaryContactId = options.primaryContactId;
@@ -50781,7 +50866,7 @@ Client created: ${result.name}`));
50781
50866
  );
50782
50867
  }
50783
50868
  function registerClientUpdate(program3) {
50784
- program3.command("client:update <id>").description("Update a client\n Example: elevasis-sdk client:update <uuid> --status active").option("--name <name>", "New client name").option("--status <status>", "New status: active | onboarding | paused | completed | churned").option("--source-deal-id <uuid>", "Set source deal (UUID)").option("--clear-source-deal", "Remove the source deal link (sets sourceDealId to null)").option("--primary-company-id <uuid>", "Set primary company (UUID)").option("--clear-primary-company", "Remove the primary company link (sets primaryCompanyId to null)").option("--primary-contact-id <uuid>", "Set primary contact (UUID)").option("--clear-primary-contact", "Remove the primary contact link (sets primaryContactId to null)").option("--metadata <json>", "Arbitrary metadata (JSON string)").option("--api-url <url>", "API base URL").option("--pretty", "Render human-readable output instead of raw JSON").action(
50869
+ program3.command("client:update <id>").description("Update a client\n Example: elevasis-sdk client:update <uuid> --status active").option("--name <name>", "New client name").option("--status <status>", "New status: active | onboarding | paused | completed | churned").option("--source <source>", "Set client source (for example: acquisition | word_of_mouth)").option("--source-deal-id <uuid>", "Set source deal (UUID)").option("--clear-source-deal", "Remove the source deal link (sets sourceDealId to null)").option("--primary-company-id <uuid>", "Set primary company (UUID)").option("--clear-primary-company", "Remove the primary company link (sets primaryCompanyId to null)").option("--primary-contact-id <uuid>", "Set primary contact (UUID)").option("--clear-primary-contact", "Remove the primary contact link (sets primaryContactId to null)").option("--metadata <json>", "Arbitrary metadata (JSON string)").option("--api-url <url>", "API base URL").option("--pretty", "Render human-readable output instead of raw JSON").action(
50785
50870
  wrapAction(
50786
50871
  "client:update",
50787
50872
  async (id, options) => {
@@ -50816,6 +50901,7 @@ function registerClientUpdate(program3) {
50816
50901
  const body = {};
50817
50902
  if (options.name !== void 0) body.name = options.name;
50818
50903
  if (options.status !== void 0) body.status = options.status;
50904
+ if (options.source !== void 0) body.source = options.source;
50819
50905
  if (options.clearSourceDeal) {
50820
50906
  body.sourceDealId = null;
50821
50907
  } else if (options.sourceDealId !== void 0) {
@@ -50835,7 +50921,7 @@ function registerClientUpdate(program3) {
50835
50921
  if (Object.keys(body).length === 0) {
50836
50922
  process.stderr.write(
50837
50923
  JSON.stringify({
50838
- error: "At least one field must be provided (--name, --status, --source-deal-id, --clear-source-deal, --primary-company-id, --clear-primary-company, --primary-contact-id, --clear-primary-contact, --metadata)",
50924
+ error: "At least one field must be provided (--name, --status, --source, --source-deal-id, --clear-source-deal, --primary-company-id, --clear-primary-company, --primary-contact-id, --clear-primary-contact, --metadata)",
50839
50925
  code: "MISSING_FIELDS"
50840
50926
  }) + "\n"
50841
50927
  );
package/dist/index.d.ts CHANGED
@@ -2675,6 +2675,7 @@ type Database = {
2675
2675
  organization_id: string;
2676
2676
  primary_company_id: string | null;
2677
2677
  primary_contact_id: string | null;
2678
+ source: string;
2678
2679
  source_deal_id: string | null;
2679
2680
  status: string;
2680
2681
  updated_at: string;
@@ -2688,6 +2689,7 @@ type Database = {
2688
2689
  organization_id: string;
2689
2690
  primary_company_id?: string | null;
2690
2691
  primary_contact_id?: string | null;
2692
+ source?: string;
2691
2693
  source_deal_id?: string | null;
2692
2694
  status?: string;
2693
2695
  updated_at?: string;
@@ -2701,6 +2703,7 @@ type Database = {
2701
2703
  organization_id?: string;
2702
2704
  primary_company_id?: string | null;
2703
2705
  primary_contact_id?: string | null;
2706
+ source?: string;
2704
2707
  source_deal_id?: string | null;
2705
2708
  status?: string;
2706
2709
  updated_at?: string;
@@ -6808,6 +6811,10 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
6808
6811
  version: z.ZodDefault<z.ZodLiteral<1>>;
6809
6812
  lastModified: z.ZodString;
6810
6813
  }, z.core.$strip>>;
6814
+ clients: z.ZodOptional<z.ZodObject<{
6815
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6816
+ lastModified: z.ZodString;
6817
+ }, z.core.$strip>>;
6811
6818
  customers: z.ZodOptional<z.ZodObject<{
6812
6819
  version: z.ZodDefault<z.ZodLiteral<1>>;
6813
6820
  lastModified: z.ZodString;
@@ -6865,6 +6872,10 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
6865
6872
  version: 1;
6866
6873
  lastModified: string;
6867
6874
  };
6875
+ clients: {
6876
+ version: 1;
6877
+ lastModified: string;
6878
+ };
6868
6879
  customers: {
6869
6880
  version: 1;
6870
6881
  lastModified: string;
@@ -6922,6 +6933,10 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
6922
6933
  version: 1;
6923
6934
  lastModified: string;
6924
6935
  } | undefined;
6936
+ clients?: {
6937
+ version: 1;
6938
+ lastModified: string;
6939
+ } | undefined;
6925
6940
  customers?: {
6926
6941
  version: 1;
6927
6942
  lastModified: string;
@@ -7114,6 +7129,56 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
7114
7129
  shortName: z.ZodOptional<z.ZodString>;
7115
7130
  description: z.ZodOptional<z.ZodString>;
7116
7131
  }, z.core.$loose>>;
7132
+ clients: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
7133
+ id: z.ZodString;
7134
+ slug: z.ZodString;
7135
+ name: z.ZodString;
7136
+ status: z.ZodDefault<z.ZodEnum<{
7137
+ active: "active";
7138
+ onboarding: "onboarding";
7139
+ paused: "paused";
7140
+ completed: "completed";
7141
+ churned: "churned";
7142
+ }>>;
7143
+ source: z.ZodOptional<z.ZodString>;
7144
+ identity: z.ZodDefault<z.ZodObject<{
7145
+ organizationName: z.ZodOptional<z.ZodString>;
7146
+ shortName: z.ZodOptional<z.ZodString>;
7147
+ clientBrief: z.ZodDefault<z.ZodString>;
7148
+ geographicFocus: z.ZodDefault<z.ZodArray<z.ZodString>>;
7149
+ timeZone: z.ZodDefault<z.ZodString>;
7150
+ }, z.core.$loose>>;
7151
+ branding: z.ZodDefault<z.ZodObject<{
7152
+ voice: z.ZodOptional<z.ZodString>;
7153
+ tagline: z.ZodOptional<z.ZodString>;
7154
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
7155
+ }, z.core.$loose>>;
7156
+ workspace: z.ZodDefault<z.ZodObject<{
7157
+ kind: z.ZodOptional<z.ZodEnum<{
7158
+ "external-project": "external-project";
7159
+ "internal-project": "internal-project";
7160
+ none: "none";
7161
+ }>>;
7162
+ owner: z.ZodOptional<z.ZodEnum<{
7163
+ platform: "platform";
7164
+ client: "client";
7165
+ developer: "developer";
7166
+ }>>;
7167
+ projectId: z.ZodOptional<z.ZodString>;
7168
+ workspacePath: z.ZodOptional<z.ZodString>;
7169
+ }, z.core.$loose>>;
7170
+ links: z.ZodDefault<z.ZodObject<{
7171
+ projectIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
7172
+ primaryCompanyId: z.ZodOptional<z.ZodString>;
7173
+ primaryContactId: z.ZodOptional<z.ZodString>;
7174
+ sourceDealId: z.ZodOptional<z.ZodString>;
7175
+ }, z.core.$strip>>;
7176
+ prompts: z.ZodDefault<z.ZodObject<{
7177
+ defaultContext: z.ZodDefault<z.ZodString>;
7178
+ }, z.core.$loose>>;
7179
+ config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
7180
+ customValues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
7181
+ }, z.core.$strict>>>>;
7117
7182
  customers: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
7118
7183
  id: z.ZodString;
7119
7184
  order: z.ZodNumber;
@@ -7767,6 +7832,7 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
7767
7832
  action: "action";
7768
7833
  ontology: "ontology";
7769
7834
  role: "role";
7835
+ client: "client";
7770
7836
  stage: "stage";
7771
7837
  goal: "goal";
7772
7838
  "customer-segment": "customer-segment";
@@ -7778,7 +7844,7 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
7778
7844
  nodeId: z.ZodUnion<readonly [z.ZodString, z.ZodTemplateLiteral<`ontology:${string}`>]>;
7779
7845
  }, z.core.$strip>]>, z.ZodTransform<{
7780
7846
  target: {
7781
- kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
7847
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
7782
7848
  id: string;
7783
7849
  };
7784
7850
  nodeId: string;
@@ -7786,7 +7852,7 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
7786
7852
  nodeId: string;
7787
7853
  } | {
7788
7854
  target: {
7789
- kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
7855
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
7790
7856
  id: string;
7791
7857
  };
7792
7858
  }>>>>;
@@ -9601,8 +9667,8 @@ declare const ProjectSchemas: {
9601
9667
  }>;
9602
9668
  status: z.ZodOptional<z.ZodEnum<{
9603
9669
  active: "active";
9604
- completed: "completed";
9605
9670
  paused: "paused";
9671
+ completed: "completed";
9606
9672
  on_track: "on_track";
9607
9673
  at_risk: "at_risk";
9608
9674
  blocked: "blocked";
@@ -9626,8 +9692,8 @@ declare const ProjectSchemas: {
9626
9692
  }>>;
9627
9693
  status: z.ZodOptional<z.ZodEnum<{
9628
9694
  active: "active";
9629
- completed: "completed";
9630
9695
  paused: "paused";
9696
+ completed: "completed";
9631
9697
  on_track: "on_track";
9632
9698
  at_risk: "at_risk";
9633
9699
  blocked: "blocked";
@@ -9651,8 +9717,8 @@ declare const ProjectSchemas: {
9651
9717
  }>>;
9652
9718
  status: z.ZodOptional<z.ZodEnum<{
9653
9719
  active: "active";
9654
- completed: "completed";
9655
9720
  paused: "paused";
9721
+ completed: "completed";
9656
9722
  on_track: "on_track";
9657
9723
  at_risk: "at_risk";
9658
9724
  blocked: "blocked";
@@ -1519,6 +1519,10 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
1519
1519
  version: z.ZodDefault<z.ZodLiteral<1>>;
1520
1520
  lastModified: z.ZodString;
1521
1521
  }, z.core.$strip>>;
1522
+ clients: z.ZodOptional<z.ZodObject<{
1523
+ version: z.ZodDefault<z.ZodLiteral<1>>;
1524
+ lastModified: z.ZodString;
1525
+ }, z.core.$strip>>;
1522
1526
  customers: z.ZodOptional<z.ZodObject<{
1523
1527
  version: z.ZodDefault<z.ZodLiteral<1>>;
1524
1528
  lastModified: z.ZodString;
@@ -1576,6 +1580,10 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
1576
1580
  version: 1;
1577
1581
  lastModified: string;
1578
1582
  };
1583
+ clients: {
1584
+ version: 1;
1585
+ lastModified: string;
1586
+ };
1579
1587
  customers: {
1580
1588
  version: 1;
1581
1589
  lastModified: string;
@@ -1633,6 +1641,10 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
1633
1641
  version: 1;
1634
1642
  lastModified: string;
1635
1643
  } | undefined;
1644
+ clients?: {
1645
+ version: 1;
1646
+ lastModified: string;
1647
+ } | undefined;
1636
1648
  customers?: {
1637
1649
  version: 1;
1638
1650
  lastModified: string;
@@ -1825,6 +1837,56 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
1825
1837
  shortName: z.ZodOptional<z.ZodString>;
1826
1838
  description: z.ZodOptional<z.ZodString>;
1827
1839
  }, z.core.$loose>>;
1840
+ clients: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1841
+ id: z.ZodString;
1842
+ slug: z.ZodString;
1843
+ name: z.ZodString;
1844
+ status: z.ZodDefault<z.ZodEnum<{
1845
+ active: "active";
1846
+ onboarding: "onboarding";
1847
+ paused: "paused";
1848
+ completed: "completed";
1849
+ churned: "churned";
1850
+ }>>;
1851
+ source: z.ZodOptional<z.ZodString>;
1852
+ identity: z.ZodDefault<z.ZodObject<{
1853
+ organizationName: z.ZodOptional<z.ZodString>;
1854
+ shortName: z.ZodOptional<z.ZodString>;
1855
+ clientBrief: z.ZodDefault<z.ZodString>;
1856
+ geographicFocus: z.ZodDefault<z.ZodArray<z.ZodString>>;
1857
+ timeZone: z.ZodDefault<z.ZodString>;
1858
+ }, z.core.$loose>>;
1859
+ branding: z.ZodDefault<z.ZodObject<{
1860
+ voice: z.ZodOptional<z.ZodString>;
1861
+ tagline: z.ZodOptional<z.ZodString>;
1862
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
1863
+ }, z.core.$loose>>;
1864
+ workspace: z.ZodDefault<z.ZodObject<{
1865
+ kind: z.ZodOptional<z.ZodEnum<{
1866
+ "external-project": "external-project";
1867
+ "internal-project": "internal-project";
1868
+ none: "none";
1869
+ }>>;
1870
+ owner: z.ZodOptional<z.ZodEnum<{
1871
+ platform: "platform";
1872
+ client: "client";
1873
+ developer: "developer";
1874
+ }>>;
1875
+ projectId: z.ZodOptional<z.ZodString>;
1876
+ workspacePath: z.ZodOptional<z.ZodString>;
1877
+ }, z.core.$loose>>;
1878
+ links: z.ZodDefault<z.ZodObject<{
1879
+ projectIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
1880
+ primaryCompanyId: z.ZodOptional<z.ZodString>;
1881
+ primaryContactId: z.ZodOptional<z.ZodString>;
1882
+ sourceDealId: z.ZodOptional<z.ZodString>;
1883
+ }, z.core.$strip>>;
1884
+ prompts: z.ZodDefault<z.ZodObject<{
1885
+ defaultContext: z.ZodDefault<z.ZodString>;
1886
+ }, z.core.$loose>>;
1887
+ config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
1888
+ customValues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
1889
+ }, z.core.$strict>>>>;
1828
1890
  customers: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1829
1891
  id: z.ZodString;
1830
1892
  order: z.ZodNumber;
@@ -2478,6 +2540,7 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
2478
2540
  action: "action";
2479
2541
  ontology: "ontology";
2480
2542
  role: "role";
2543
+ client: "client";
2481
2544
  stage: "stage";
2482
2545
  goal: "goal";
2483
2546
  "customer-segment": "customer-segment";
@@ -2489,7 +2552,7 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
2489
2552
  nodeId: z.ZodUnion<readonly [z.ZodString, z.ZodTemplateLiteral<`ontology:${string}`>]>;
2490
2553
  }, z.core.$strip>]>, z.ZodTransform<{
2491
2554
  target: {
2492
- kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
2555
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
2493
2556
  id: string;
2494
2557
  };
2495
2558
  nodeId: string;
@@ -2497,7 +2560,7 @@ declare const OrganizationModelSchema$1: z.ZodObject<{
2497
2560
  nodeId: string;
2498
2561
  } | {
2499
2562
  target: {
2500
- kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
2563
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
2501
2564
  id: string;
2502
2565
  };
2503
2566
  }>>>>;
@@ -2508,6 +2508,7 @@ type Database = {
2508
2508
  organization_id: string;
2509
2509
  primary_company_id: string | null;
2510
2510
  primary_contact_id: string | null;
2511
+ source: string;
2511
2512
  source_deal_id: string | null;
2512
2513
  status: string;
2513
2514
  updated_at: string;
@@ -2521,6 +2522,7 @@ type Database = {
2521
2522
  organization_id: string;
2522
2523
  primary_company_id?: string | null;
2523
2524
  primary_contact_id?: string | null;
2525
+ source?: string;
2524
2526
  source_deal_id?: string | null;
2525
2527
  status?: string;
2526
2528
  updated_at?: string;
@@ -2534,6 +2536,7 @@ type Database = {
2534
2536
  organization_id?: string;
2535
2537
  primary_company_id?: string | null;
2536
2538
  primary_contact_id?: string | null;
2539
+ source?: string;
2537
2540
  source_deal_id?: string | null;
2538
2541
  status?: string;
2539
2542
  updated_at?: string;
@@ -6003,6 +6006,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
6003
6006
  version: z.ZodDefault<z.ZodLiteral<1>>;
6004
6007
  lastModified: z.ZodString;
6005
6008
  }, z.core.$strip>>;
6009
+ clients: z.ZodOptional<z.ZodObject<{
6010
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6011
+ lastModified: z.ZodString;
6012
+ }, z.core.$strip>>;
6006
6013
  customers: z.ZodOptional<z.ZodObject<{
6007
6014
  version: z.ZodDefault<z.ZodLiteral<1>>;
6008
6015
  lastModified: z.ZodString;
@@ -6060,6 +6067,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
6060
6067
  version: 1;
6061
6068
  lastModified: string;
6062
6069
  };
6070
+ clients: {
6071
+ version: 1;
6072
+ lastModified: string;
6073
+ };
6063
6074
  customers: {
6064
6075
  version: 1;
6065
6076
  lastModified: string;
@@ -6117,6 +6128,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
6117
6128
  version: 1;
6118
6129
  lastModified: string;
6119
6130
  } | undefined;
6131
+ clients?: {
6132
+ version: 1;
6133
+ lastModified: string;
6134
+ } | undefined;
6120
6135
  customers?: {
6121
6136
  version: 1;
6122
6137
  lastModified: string;
@@ -6309,6 +6324,56 @@ declare const OrganizationModelSchema: z.ZodObject<{
6309
6324
  shortName: z.ZodOptional<z.ZodString>;
6310
6325
  description: z.ZodOptional<z.ZodString>;
6311
6326
  }, z.core.$loose>>;
6327
+ clients: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6328
+ id: z.ZodString;
6329
+ slug: z.ZodString;
6330
+ name: z.ZodString;
6331
+ status: z.ZodDefault<z.ZodEnum<{
6332
+ active: "active";
6333
+ onboarding: "onboarding";
6334
+ paused: "paused";
6335
+ completed: "completed";
6336
+ churned: "churned";
6337
+ }>>;
6338
+ source: z.ZodOptional<z.ZodString>;
6339
+ identity: z.ZodDefault<z.ZodObject<{
6340
+ organizationName: z.ZodOptional<z.ZodString>;
6341
+ shortName: z.ZodOptional<z.ZodString>;
6342
+ clientBrief: z.ZodDefault<z.ZodString>;
6343
+ geographicFocus: z.ZodDefault<z.ZodArray<z.ZodString>>;
6344
+ timeZone: z.ZodDefault<z.ZodString>;
6345
+ }, z.core.$loose>>;
6346
+ branding: z.ZodDefault<z.ZodObject<{
6347
+ voice: z.ZodOptional<z.ZodString>;
6348
+ tagline: z.ZodOptional<z.ZodString>;
6349
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
6350
+ }, z.core.$loose>>;
6351
+ workspace: z.ZodDefault<z.ZodObject<{
6352
+ kind: z.ZodOptional<z.ZodEnum<{
6353
+ "external-project": "external-project";
6354
+ "internal-project": "internal-project";
6355
+ none: "none";
6356
+ }>>;
6357
+ owner: z.ZodOptional<z.ZodEnum<{
6358
+ platform: "platform";
6359
+ client: "client";
6360
+ developer: "developer";
6361
+ }>>;
6362
+ projectId: z.ZodOptional<z.ZodString>;
6363
+ workspacePath: z.ZodOptional<z.ZodString>;
6364
+ }, z.core.$loose>>;
6365
+ links: z.ZodDefault<z.ZodObject<{
6366
+ projectIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
6367
+ primaryCompanyId: z.ZodOptional<z.ZodString>;
6368
+ primaryContactId: z.ZodOptional<z.ZodString>;
6369
+ sourceDealId: z.ZodOptional<z.ZodString>;
6370
+ }, z.core.$strip>>;
6371
+ prompts: z.ZodDefault<z.ZodObject<{
6372
+ defaultContext: z.ZodDefault<z.ZodString>;
6373
+ }, z.core.$loose>>;
6374
+ config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
6375
+ customValues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
6376
+ }, z.core.$strict>>>>;
6312
6377
  customers: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6313
6378
  id: z.ZodString;
6314
6379
  order: z.ZodNumber;
@@ -6962,6 +7027,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
6962
7027
  action: "action";
6963
7028
  ontology: "ontology";
6964
7029
  role: "role";
7030
+ client: "client";
6965
7031
  stage: "stage";
6966
7032
  goal: "goal";
6967
7033
  "customer-segment": "customer-segment";
@@ -6973,7 +7039,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
6973
7039
  nodeId: z.ZodUnion<readonly [z.ZodString, z.ZodTemplateLiteral<`ontology:${string}`>]>;
6974
7040
  }, z.core.$strip>]>, z.ZodTransform<{
6975
7041
  target: {
6976
- kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
7042
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
6977
7043
  id: string;
6978
7044
  };
6979
7045
  nodeId: string;
@@ -6981,7 +7047,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
6981
7047
  nodeId: string;
6982
7048
  } | {
6983
7049
  target: {
6984
- kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
7050
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
6985
7051
  id: string;
6986
7052
  };
6987
7053
  }>>>>;
@@ -8704,8 +8770,8 @@ declare const ProjectSchemas: {
8704
8770
  }>;
8705
8771
  status: z.ZodOptional<z.ZodEnum<{
8706
8772
  active: "active";
8707
- completed: "completed";
8708
8773
  paused: "paused";
8774
+ completed: "completed";
8709
8775
  on_track: "on_track";
8710
8776
  at_risk: "at_risk";
8711
8777
  blocked: "blocked";
@@ -8729,8 +8795,8 @@ declare const ProjectSchemas: {
8729
8795
  }>>;
8730
8796
  status: z.ZodOptional<z.ZodEnum<{
8731
8797
  active: "active";
8732
- completed: "completed";
8733
8798
  paused: "paused";
8799
+ completed: "completed";
8734
8800
  on_track: "on_track";
8735
8801
  at_risk: "at_risk";
8736
8802
  blocked: "blocked";
@@ -8754,8 +8820,8 @@ declare const ProjectSchemas: {
8754
8820
  }>>;
8755
8821
  status: z.ZodOptional<z.ZodEnum<{
8756
8822
  active: "active";
8757
- completed: "completed";
8758
8823
  paused: "paused";
8824
+ completed: "completed";
8759
8825
  on_track: "on_track";
8760
8826
  at_risk: "at_risk";
8761
8827
  blocked: "blocked";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "1.31.0",
3
+ "version": "1.32.0",
4
4
  "description": "SDK for building Elevasis organization resources",
5
5
  "type": "module",
6
6
  "bin": {
@@ -58,7 +58,7 @@
58
58
  "tsup": "^8.0.0",
59
59
  "typescript": "5.9.2",
60
60
  "zod": "^4.1.0",
61
- "@repo/core": "0.40.0",
61
+ "@repo/core": "0.41.0",
62
62
  "@repo/eslint-config": "0.0.0",
63
63
  "@repo/typescript-config": "0.0.0"
64
64
  },
@@ -0,0 +1,39 @@
1
+ # Client Source and OM Client Profiles
2
+
3
+ ## Why this note exists
4
+
5
+ The client-system release train adds first-class client source support across the platform and introduces top-level Organization Model client profiles in `@elevasis/core/organization-model`.
6
+
7
+ Template-derived projects need the updated package baselines and guidance before relying on the shared clients UI, SDK client commands, or OM client-profile helpers. Tenant-authored client profile content remains project-owned and is not auto-generated by sync.
8
+
9
+ ## Applies to
10
+
11
+ - Projects that use the shared `@elevasis/ui` clients feature.
12
+ - Projects that create or update clients through `elevasis-sdk client:create` or `elevasis-sdk client:update`.
13
+ - Projects that intentionally author real client profiles in `core/config/organization-model.ts`.
14
+ - Projects that deploy operations bundles against the updated `@elevasis/sdk` baseline.
15
+
16
+ ## Required actions
17
+
18
+ 1. Pull the package baseline updates from the prepared `/sdk ship` train.
19
+ 2. Use the first-class client `source` field for direct clients, for example `word_of_mouth`, instead of storing the primary source only in ad hoc metadata.
20
+ 3. If the project intentionally authors OM client profiles, key `organizationModel.clients` by the canonical production `public.clients.id`; the profile `id` must match the same UUID.
21
+ 4. Keep tenant-specific client profile records, prompts, branding, workspace links, and custom values project-owned. Do not copy Elevasis or another tenant's client profiles into this project.
22
+ 5. Treat `Organization > Clients` as the semantic home for real client profiles and `Systems > Client Management` as the operational platform system.
23
+
24
+ ## Verification
25
+
26
+ Run the checks that match the project surface:
27
+
28
+ ```bash
29
+ pnpm -C core check-types
30
+ pnpm -C operations check-types
31
+ pnpm -C operations check
32
+ pnpm -C ui check-types
33
+ ```
34
+
35
+ For projects that author OM client profiles, also run the project-local OM validation or deploy preflight before publishing operations resources.
36
+
37
+ ## Not handled by /git-sync
38
+
39
+ `/git-sync` can propagate the updated package baselines and this guidance, but it does not create tenant-specific `clients` rows, choose client source values, author OM client profile content, or decide whether a project should model a client profile at all. Maintainers must make those project-specific data and authoring decisions intentionally.
@@ -42,6 +42,60 @@ export type OrganizationModelDomainMetadataByDomain = z.infer<typeof Organizatio
42
42
  export type OrganizationModelBranding = z.infer<typeof OrganizationModelBrandingSchema>
43
43
  ```
44
44
 
45
+ ### `ClientProfile`
46
+
47
+ ```typescript
48
+ export type ClientProfile = z.infer<typeof ClientProfileSchema>
49
+ ```
50
+
51
+ ### `ClientProfileBranding`
52
+
53
+ ```typescript
54
+ export type ClientProfileBranding = z.infer<typeof ClientProfileBrandingSchema>
55
+ ```
56
+
57
+ ### `ClientProfileIdentity`
58
+
59
+ ```typescript
60
+ export type ClientProfileIdentity = z.infer<typeof ClientProfileIdentitySchema>
61
+ ```
62
+
63
+ ### `ClientProfileLinks`
64
+
65
+ ```typescript
66
+ export type ClientProfileLinks = z.infer<typeof ClientProfileLinksSchema>
67
+ ```
68
+
69
+ ### `ClientProfilePrompts`
70
+
71
+ ```typescript
72
+ export type ClientProfilePrompts = z.infer<typeof ClientProfilePromptsSchema>
73
+ ```
74
+
75
+ ### `ClientProfileSource`
76
+
77
+ ```typescript
78
+ export type ClientProfileSource = z.infer<typeof ClientProfileSourceSchema>
79
+ ```
80
+
81
+ ### `ClientProfileStatus`
82
+
83
+ ```typescript
84
+ export type ClientProfileStatus = z.infer<typeof ClientProfileStatusSchema>
85
+ ```
86
+
87
+ ### `ClientProfileWorkspace`
88
+
89
+ ```typescript
90
+ export type ClientProfileWorkspace = z.infer<typeof ClientProfileWorkspaceSchema>
91
+ ```
92
+
93
+ ### `OrganizationModelClients`
94
+
95
+ ```typescript
96
+ export type OrganizationModelClients = z.infer<typeof ClientProfilesDomainSchema>
97
+ ```
98
+
45
99
  ### `SalesPipeline`
46
100
 
47
101
  ```typescript