@fairmint/captable-ai 0.1.11 → 0.1.13
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/index.js +205 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16483,6 +16483,204 @@ function assembleEngineOcfDump(objects) {
|
|
|
16483
16483
|
};
|
|
16484
16484
|
}
|
|
16485
16485
|
|
|
16486
|
+
// ../captable-ai-core/dist/onboarding.js
|
|
16487
|
+
var ONBOARDING_COMPANY_TYPES = {
|
|
16488
|
+
US_C_CORPORATION: "us_c_corporation",
|
|
16489
|
+
US_LLC: "us_llc",
|
|
16490
|
+
FOREIGN_ENTITY: "foreign_entity",
|
|
16491
|
+
NOT_INCORPORATED: "not_incorporated"
|
|
16492
|
+
};
|
|
16493
|
+
var ONBOARDING_COMPANY_TYPE_VALUES = Object.values(ONBOARDING_COMPANY_TYPES);
|
|
16494
|
+
var ONBOARDING_COMPANY_TYPE_TO_PERSISTED_VALUE = {
|
|
16495
|
+
[ONBOARDING_COMPANY_TYPES.US_C_CORPORATION]: "Corporation",
|
|
16496
|
+
[ONBOARDING_COMPANY_TYPES.US_LLC]: "Limited liability company (LLC)",
|
|
16497
|
+
[ONBOARDING_COMPANY_TYPES.FOREIGN_ENTITY]: "Foreign company",
|
|
16498
|
+
[ONBOARDING_COMPANY_TYPES.NOT_INCORPORATED]: "Not-incorporated yet"
|
|
16499
|
+
};
|
|
16500
|
+
var ONBOARDING_ROLES = [
|
|
16501
|
+
"CEO",
|
|
16502
|
+
"COO",
|
|
16503
|
+
"CMO",
|
|
16504
|
+
"CFO",
|
|
16505
|
+
"CTO",
|
|
16506
|
+
"CRO",
|
|
16507
|
+
"Director",
|
|
16508
|
+
"Founder",
|
|
16509
|
+
"co-founder",
|
|
16510
|
+
"co-CEO"
|
|
16511
|
+
];
|
|
16512
|
+
var ONBOARDING_OTHER_ROLE = "other";
|
|
16513
|
+
var ONBOARDING_CAP_TABLE_SOURCES = {
|
|
16514
|
+
NONE: "none",
|
|
16515
|
+
SPREADSHEET: "spreadsheet",
|
|
16516
|
+
CARTA: "carta",
|
|
16517
|
+
PULLEY: "pulley",
|
|
16518
|
+
ANGELLIST: "angellist",
|
|
16519
|
+
OTHER: "other"
|
|
16520
|
+
};
|
|
16521
|
+
var ONBOARDING_CAP_TABLE_SOURCE_VALUES = Object.values(ONBOARDING_CAP_TABLE_SOURCES);
|
|
16522
|
+
var ONBOARDING_STAKEHOLDER_COUNT_BUCKETS = [
|
|
16523
|
+
"1_10",
|
|
16524
|
+
"11_25",
|
|
16525
|
+
"26_50",
|
|
16526
|
+
"50_100",
|
|
16527
|
+
"100_plus"
|
|
16528
|
+
];
|
|
16529
|
+
var ONBOARDING_WORKSPACE_STATES = {
|
|
16530
|
+
NEEDS_WORKSPACE: "needs_workspace",
|
|
16531
|
+
WORKSPACE_READY: "workspace_ready"
|
|
16532
|
+
};
|
|
16533
|
+
var ONBOARDING_STATES = {
|
|
16534
|
+
NEEDS_COMPANY_SETUP: "needs_company_setup",
|
|
16535
|
+
NEEDS_COMPANY_SELECTION: "needs_company_selection",
|
|
16536
|
+
READY_TO_IMPORT: "ready_to_import",
|
|
16537
|
+
PROCESSING: "processing",
|
|
16538
|
+
NEEDS_REVIEW: "needs_review",
|
|
16539
|
+
BLOCKED: "blocked",
|
|
16540
|
+
READY_TO_COMMIT: "ready_to_commit"
|
|
16541
|
+
};
|
|
16542
|
+
var ONBOARDING_STATE_VALUES = Object.values(ONBOARDING_STATES);
|
|
16543
|
+
var onboardingNextActionSchema = external_exports.object({
|
|
16544
|
+
id: external_exports.string().trim().min(1),
|
|
16545
|
+
label: external_exports.string().trim().min(1),
|
|
16546
|
+
required: external_exports.boolean(),
|
|
16547
|
+
tool: external_exports.string().trim().min(1).optional(),
|
|
16548
|
+
command: external_exports.string().trim().min(1).optional(),
|
|
16549
|
+
href: external_exports.string().url().optional(),
|
|
16550
|
+
arguments: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
16551
|
+
});
|
|
16552
|
+
var onboardingStateBaseSchema = external_exports.object({
|
|
16553
|
+
nextActions: external_exports.array(onboardingNextActionSchema)
|
|
16554
|
+
});
|
|
16555
|
+
var onboardingStateSchema = external_exports.discriminatedUnion("state", [
|
|
16556
|
+
onboardingStateBaseSchema.extend({ state: external_exports.literal(ONBOARDING_STATES.NEEDS_COMPANY_SETUP) }),
|
|
16557
|
+
onboardingStateBaseSchema.extend({
|
|
16558
|
+
state: external_exports.literal(ONBOARDING_STATES.NEEDS_COMPANY_SELECTION),
|
|
16559
|
+
companies: external_exports.array(external_exports.object({ id: external_exports.string().uuid(), name: external_exports.string().nullable() })).min(1)
|
|
16560
|
+
}),
|
|
16561
|
+
onboardingStateBaseSchema.extend({
|
|
16562
|
+
state: external_exports.literal(ONBOARDING_STATES.READY_TO_IMPORT),
|
|
16563
|
+
portalId: external_exports.string().uuid()
|
|
16564
|
+
}),
|
|
16565
|
+
onboardingStateBaseSchema.extend({
|
|
16566
|
+
state: external_exports.literal(ONBOARDING_STATES.PROCESSING),
|
|
16567
|
+
portalId: external_exports.string().uuid(),
|
|
16568
|
+
importSessionId: external_exports.string().uuid()
|
|
16569
|
+
}),
|
|
16570
|
+
onboardingStateBaseSchema.extend({
|
|
16571
|
+
state: external_exports.literal(ONBOARDING_STATES.NEEDS_REVIEW),
|
|
16572
|
+
portalId: external_exports.string().uuid(),
|
|
16573
|
+
importSessionId: external_exports.string().uuid(),
|
|
16574
|
+
blockerCount: external_exports.number().int().nonnegative()
|
|
16575
|
+
}),
|
|
16576
|
+
onboardingStateBaseSchema.extend({
|
|
16577
|
+
state: external_exports.literal(ONBOARDING_STATES.BLOCKED),
|
|
16578
|
+
portalId: external_exports.string().uuid().optional(),
|
|
16579
|
+
importSessionId: external_exports.string().uuid().optional(),
|
|
16580
|
+
code: external_exports.string().trim().min(1),
|
|
16581
|
+
message: external_exports.string().trim().min(1)
|
|
16582
|
+
}),
|
|
16583
|
+
onboardingStateBaseSchema.extend({
|
|
16584
|
+
state: external_exports.literal(ONBOARDING_STATES.READY_TO_COMMIT),
|
|
16585
|
+
portalId: external_exports.string().uuid(),
|
|
16586
|
+
importSessionId: external_exports.string().uuid()
|
|
16587
|
+
})
|
|
16588
|
+
]);
|
|
16589
|
+
var ONBOARDING_SESSION_ACTIONS = {
|
|
16590
|
+
NONE: "none",
|
|
16591
|
+
REFRESH: "refresh",
|
|
16592
|
+
REEXCHANGE: "reexchange"
|
|
16593
|
+
};
|
|
16594
|
+
var shortTextSchema = (max) => external_exports.string().trim().min(1).max(max);
|
|
16595
|
+
var hasControlCharacter = (value) => Array.from(value).some((character) => {
|
|
16596
|
+
const codePoint = character.codePointAt(0);
|
|
16597
|
+
return codePoint !== void 0 && (codePoint <= 31 || codePoint >= 127 && codePoint <= 159);
|
|
16598
|
+
});
|
|
16599
|
+
var legalNameSchema = shortTextSchema(255).refine((value) => !hasControlCharacter(value), "Legal name cannot contain control characters").describe("Confirmed legal name of the company.");
|
|
16600
|
+
var countryCodeSchema = external_exports.string().trim().transform((value) => value.toUpperCase()).pipe(external_exports.string().regex(/^[A-Z]{2}$/, "Must be an ISO 3166-1 alpha-2 country code")).describe("ISO 3166-1 alpha-2 country of incorporation. Required for foreign entities.");
|
|
16601
|
+
var roleSchema = external_exports.discriminatedUnion("role", [
|
|
16602
|
+
external_exports.object({
|
|
16603
|
+
role: external_exports.enum(ONBOARDING_ROLES).describe("Founder's role at the company."),
|
|
16604
|
+
otherRole: external_exports.never().optional().describe("Omit unless role is other.")
|
|
16605
|
+
}),
|
|
16606
|
+
external_exports.object({
|
|
16607
|
+
role: external_exports.literal(ONBOARDING_OTHER_ROLE).describe("Founder's role at the company."),
|
|
16608
|
+
otherRole: shortTextSchema(100).describe("Free-text role when role is other.")
|
|
16609
|
+
})
|
|
16610
|
+
]);
|
|
16611
|
+
var capTableSourceSchema = external_exports.discriminatedUnion("capTableSource", [
|
|
16612
|
+
external_exports.object({
|
|
16613
|
+
capTableSource: external_exports.enum([
|
|
16614
|
+
ONBOARDING_CAP_TABLE_SOURCES.NONE,
|
|
16615
|
+
ONBOARDING_CAP_TABLE_SOURCES.SPREADSHEET,
|
|
16616
|
+
ONBOARDING_CAP_TABLE_SOURCES.CARTA,
|
|
16617
|
+
ONBOARDING_CAP_TABLE_SOURCES.PULLEY,
|
|
16618
|
+
ONBOARDING_CAP_TABLE_SOURCES.ANGELLIST
|
|
16619
|
+
]).describe("Where the current cap table is maintained."),
|
|
16620
|
+
otherCapTableSource: external_exports.never().optional().describe("Omit unless capTableSource is other.")
|
|
16621
|
+
}),
|
|
16622
|
+
external_exports.object({
|
|
16623
|
+
capTableSource: external_exports.literal(ONBOARDING_CAP_TABLE_SOURCES.OTHER).describe("Where the current cap table is maintained."),
|
|
16624
|
+
otherCapTableSource: shortTextSchema(100).describe("Free-text cap table tool when capTableSource is other.")
|
|
16625
|
+
})
|
|
16626
|
+
]);
|
|
16627
|
+
var commonSetupSchema = external_exports.object({
|
|
16628
|
+
legalName: legalNameSchema,
|
|
16629
|
+
stakeholderCount: external_exports.enum(ONBOARDING_STAKEHOLDER_COUNT_BUCKETS).describe("Approximate number of stakeholders on the cap table."),
|
|
16630
|
+
termsAccepted: external_exports.literal(true).describe("Whether the user accepted Fairmint's Terms of Service; must be true.")
|
|
16631
|
+
}).and(roleSchema).and(capTableSourceSchema);
|
|
16632
|
+
var companySchema = external_exports.discriminatedUnion("companyType", [
|
|
16633
|
+
external_exports.object({
|
|
16634
|
+
companyType: external_exports.enum([ONBOARDING_COMPANY_TYPES.US_C_CORPORATION, ONBOARDING_COMPANY_TYPES.US_LLC]).describe("Confirmed company type."),
|
|
16635
|
+
country: external_exports.never().optional().describe("Omit for US companies.")
|
|
16636
|
+
}),
|
|
16637
|
+
external_exports.object({
|
|
16638
|
+
companyType: external_exports.literal(ONBOARDING_COMPANY_TYPES.FOREIGN_ENTITY).describe("Confirmed company type."),
|
|
16639
|
+
country: countryCodeSchema.refine((country) => country !== "US", {
|
|
16640
|
+
message: "Foreign entities must use a non-US country"
|
|
16641
|
+
}).describe("ISO 3166-1 alpha-2 country of incorporation. Required for foreign entities.")
|
|
16642
|
+
}),
|
|
16643
|
+
external_exports.object({
|
|
16644
|
+
companyType: external_exports.literal(ONBOARDING_COMPANY_TYPES.NOT_INCORPORATED).describe("Confirmed company type."),
|
|
16645
|
+
country: external_exports.never().optional().describe("Omit until the company is incorporated.")
|
|
16646
|
+
})
|
|
16647
|
+
]);
|
|
16648
|
+
var onboardingWorkspaceSetupInputSchema = commonSetupSchema.and(companySchema);
|
|
16649
|
+
var onboardingWorkspaceSetupResultSchema = external_exports.object({
|
|
16650
|
+
portalId: external_exports.uuid().describe("ID of the user's first production workspace."),
|
|
16651
|
+
state: external_exports.literal(ONBOARDING_WORKSPACE_STATES.WORKSPACE_READY).describe("Workspace is created or reused and ready for import."),
|
|
16652
|
+
created: external_exports.boolean().describe("True when this request inserted a new portal."),
|
|
16653
|
+
commitReady: external_exports.boolean().describe("True when the draft issuer has formation date and country of formation."),
|
|
16654
|
+
commitBlockers: external_exports.array(external_exports.enum(["formation_date", "country_of_formation"])).describe("Issuer fields that still block a live commit."),
|
|
16655
|
+
session: external_exports.object({
|
|
16656
|
+
action: external_exports.enum([
|
|
16657
|
+
ONBOARDING_SESSION_ACTIONS.NONE,
|
|
16658
|
+
ONBOARDING_SESSION_ACTIONS.REFRESH,
|
|
16659
|
+
ONBOARDING_SESSION_ACTIONS.REEXCHANGE
|
|
16660
|
+
]).describe("How the client should obtain a full-access token."),
|
|
16661
|
+
accessTokenCanAccessWorkspace: external_exports.boolean().describe("False until the client refreshes or re-exchanges the onboarding token."),
|
|
16662
|
+
refreshPreservesOnboardingScope: external_exports.boolean().describe("True when refresh still mints onboarding-only scopes.")
|
|
16663
|
+
}).describe("Client session upgrade instructions after workspace setup.")
|
|
16664
|
+
});
|
|
16665
|
+
var ONBOARDING_COMPANY_TYPE_TO_ISSUER = {
|
|
16666
|
+
[ONBOARDING_COMPANY_TYPES.US_C_CORPORATION]: {
|
|
16667
|
+
countryOfFormation: "US",
|
|
16668
|
+
incorporated: true
|
|
16669
|
+
},
|
|
16670
|
+
[ONBOARDING_COMPANY_TYPES.US_LLC]: {
|
|
16671
|
+
countryOfFormation: "US",
|
|
16672
|
+
incorporated: true
|
|
16673
|
+
},
|
|
16674
|
+
[ONBOARDING_COMPANY_TYPES.FOREIGN_ENTITY]: {
|
|
16675
|
+
countryOfFormation: null,
|
|
16676
|
+
incorporated: true
|
|
16677
|
+
},
|
|
16678
|
+
[ONBOARDING_COMPANY_TYPES.NOT_INCORPORATED]: {
|
|
16679
|
+
countryOfFormation: null,
|
|
16680
|
+
incorporated: false
|
|
16681
|
+
}
|
|
16682
|
+
};
|
|
16683
|
+
|
|
16486
16684
|
// ../captable-ai-core/dist/scopes.js
|
|
16487
16685
|
var CAPTABLE_AI_SCOPES = {
|
|
16488
16686
|
READ: "read",
|
|
@@ -16490,12 +16688,14 @@ var CAPTABLE_AI_SCOPES = {
|
|
|
16490
16688
|
WRITE_OBJECTS: "write:objects",
|
|
16491
16689
|
WRITE_COMMIT: "write:commit",
|
|
16492
16690
|
WRITE_DOCUMENTS: "write:documents",
|
|
16493
|
-
ADMIN_PORTAL: "admin:portal"
|
|
16691
|
+
ADMIN_PORTAL: "admin:portal",
|
|
16692
|
+
ONBOARDING_WORKSPACE: "onboarding:workspace"
|
|
16494
16693
|
};
|
|
16495
16694
|
var DEFAULT_SCOPES = [
|
|
16496
16695
|
CAPTABLE_AI_SCOPES.READ,
|
|
16497
16696
|
CAPTABLE_AI_SCOPES.WRITE
|
|
16498
16697
|
];
|
|
16698
|
+
var ONBOARDING_SCOPES = [CAPTABLE_AI_SCOPES.ONBOARDING_WORKSPACE];
|
|
16499
16699
|
|
|
16500
16700
|
// ../captable-ai-core/dist/securityholder-file.js
|
|
16501
16701
|
var securityholderFileInputSchema = external_exports.object({
|
|
@@ -16591,7 +16791,10 @@ var warrantResolutionItemSchema = external_exports.object({
|
|
|
16591
16791
|
amount: external_exports.string(),
|
|
16592
16792
|
currency: external_exports.string()
|
|
16593
16793
|
}).nullable(),
|
|
16594
|
-
relatedSecurityId: external_exports.string().nullable()
|
|
16794
|
+
relatedSecurityId: external_exports.string().nullable(),
|
|
16795
|
+
// Present only on warrants whose deferred percentage exercise could not be replayed. They
|
|
16796
|
+
// are listed but excluded from the counts below, since they contribute no diluted shares.
|
|
16797
|
+
replayFailed: external_exports.boolean().optional()
|
|
16595
16798
|
});
|
|
16596
16799
|
var warrantsSnapshotSchema = external_exports.object({
|
|
16597
16800
|
numberOfSecurities: external_exports.number().int().nonnegative(),
|
package/package.json
CHANGED