@thecorporation/cli 26.3.5 → 26.3.7
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 +19 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1624,6 +1624,17 @@ async function transferSharesCommand(opts) {
|
|
|
1624
1624
|
const eid = resolveEntityId(cfg, opts.entityId);
|
|
1625
1625
|
const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
|
|
1626
1626
|
try {
|
|
1627
|
+
let intentId = opts.prepareIntentId;
|
|
1628
|
+
if (!intentId) {
|
|
1629
|
+
const intent = await client.createExecutionIntent({
|
|
1630
|
+
entity_id: eid,
|
|
1631
|
+
intent_type: "equity.transfer.prepare",
|
|
1632
|
+
description: `Transfer ${opts.shares} shares from ${opts.from} to ${opts.to}`
|
|
1633
|
+
});
|
|
1634
|
+
intentId = intent.intent_id ?? intent.id;
|
|
1635
|
+
await client.evaluateIntent(intentId, eid);
|
|
1636
|
+
await client.authorizeIntent(intentId, eid);
|
|
1637
|
+
}
|
|
1627
1638
|
const body = {
|
|
1628
1639
|
entity_id: eid,
|
|
1629
1640
|
share_class_id: opts.shareClassId,
|
|
@@ -1633,7 +1644,7 @@ async function transferSharesCommand(opts) {
|
|
|
1633
1644
|
share_count: opts.shares,
|
|
1634
1645
|
governing_doc_type: opts.governingDocType,
|
|
1635
1646
|
transferee_rights: opts.transfereeRights,
|
|
1636
|
-
prepare_intent_id:
|
|
1647
|
+
prepare_intent_id: intentId
|
|
1637
1648
|
};
|
|
1638
1649
|
if (opts.pricePerShareCents != null) body.price_per_share_cents = opts.pricePerShareCents;
|
|
1639
1650
|
if (opts.relationship) body.relationship_to_holder = opts.relationship;
|
|
@@ -1958,10 +1969,11 @@ async function governanceCreateBodyCommand(opts) {
|
|
|
1958
1969
|
}
|
|
1959
1970
|
async function governanceAddSeatCommand(bodyId, opts) {
|
|
1960
1971
|
const cfg = requireConfig("api_url", "api_key", "workspace_id");
|
|
1972
|
+
const eid = resolveEntityId(cfg, opts.entityId);
|
|
1961
1973
|
const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
|
|
1962
1974
|
try {
|
|
1963
1975
|
const data = { holder_id: opts.holder, role: opts.role ?? "member" };
|
|
1964
|
-
const result = await client.createGovernanceSeat(bodyId, data);
|
|
1976
|
+
const result = await client.createGovernanceSeat(bodyId, eid, data);
|
|
1965
1977
|
printSuccess(`Seat added: ${result.seat_id ?? "OK"}`);
|
|
1966
1978
|
printJson(result);
|
|
1967
1979
|
} catch (err) {
|
|
@@ -3223,7 +3235,7 @@ capTableCmd.command("issue-safe").requiredOption("--investor <name>", "Investor
|
|
|
3223
3235
|
const { issueSafeCommand: issueSafeCommand2 } = await Promise.resolve().then(() => (init_cap_table(), cap_table_exports));
|
|
3224
3236
|
await issueSafeCommand2({ ...opts, entityId: parent.entityId });
|
|
3225
3237
|
});
|
|
3226
|
-
capTableCmd.command("transfer").requiredOption("--from <id>", "Source contact ID (from_contact_id)").requiredOption("--to <id>", "Destination contact ID (to_contact_id)").requiredOption("--shares <n>", "Number of shares to transfer", parseInt).requiredOption("--share-class-id <id>", "Share class ID").requiredOption("--governing-doc-type <type>", "Governing
|
|
3238
|
+
capTableCmd.command("transfer").requiredOption("--from <id>", "Source contact ID (from_contact_id)").requiredOption("--to <id>", "Destination contact ID (to_contact_id)").requiredOption("--shares <n>", "Number of shares to transfer", parseInt).requiredOption("--share-class-id <id>", "Share class ID").requiredOption("--governing-doc-type <type>", "Governing doc type (bylaws, operating_agreement, shareholder_agreement, other)").requiredOption("--transferee-rights <rights>", "Transferee rights (full_member, economic_only, limited)").option("--prepare-intent-id <id>", "Prepare intent ID (auto-created if omitted)").option("--type <type>", "Transfer type (gift, trust_transfer, secondary_sale, estate, other)", "secondary_sale").option("--price-per-share-cents <n>", "Price per share in cents", parseInt).option("--relationship <rel>", "Relationship to holder").description("Create a share transfer workflow").action(async (opts, cmd) => {
|
|
3227
3239
|
const parent = cmd.parent.opts();
|
|
3228
3240
|
const { transferSharesCommand: transferSharesCommand2 } = await Promise.resolve().then(() => (init_cap_table(), cap_table_exports));
|
|
3229
3241
|
await transferSharesCommand2({ ...opts, entityId: parent.entityId });
|
|
@@ -3303,9 +3315,10 @@ governanceCmd.command("create-body").requiredOption("--name <name>", "Body name
|
|
|
3303
3315
|
const { governanceCreateBodyCommand: governanceCreateBodyCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3304
3316
|
await governanceCreateBodyCommand2({ ...opts, entityId: parent.entityId });
|
|
3305
3317
|
});
|
|
3306
|
-
governanceCmd.command("add-seat <body-id>").requiredOption("--holder <contact-id>", "Contact ID for the seat holder").option("--role <role>", "Seat role (chair, member, officer, observer)", "member").description("Add a seat to a governance body").action(async (bodyId, opts) => {
|
|
3318
|
+
governanceCmd.command("add-seat <body-id>").requiredOption("--holder <contact-id>", "Contact ID for the seat holder").option("--role <role>", "Seat role (chair, member, officer, observer)", "member").description("Add a seat to a governance body").action(async (bodyId, opts, cmd) => {
|
|
3319
|
+
const parent = cmd.parent.opts();
|
|
3307
3320
|
const { governanceAddSeatCommand: governanceAddSeatCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3308
|
-
await governanceAddSeatCommand2(bodyId, opts);
|
|
3321
|
+
await governanceAddSeatCommand2(bodyId, { ...opts, entityId: parent.entityId });
|
|
3309
3322
|
});
|
|
3310
3323
|
governanceCmd.command("seats <body-id>").description("Seats for a governance body").action(async (bodyId, _opts, cmd) => {
|
|
3311
3324
|
const parent = cmd.parent.opts();
|
|
@@ -3322,7 +3335,7 @@ governanceCmd.command("resolutions <meeting-id>").description("Resolutions for a
|
|
|
3322
3335
|
const { governanceResolutionsCommand: governanceResolutionsCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3323
3336
|
await governanceResolutionsCommand2(meetingId, parent);
|
|
3324
3337
|
});
|
|
3325
|
-
governanceCmd.command("convene").requiredOption("--body <id>", "Governance body ID").requiredOption("--type <type>", "Meeting type").requiredOption("--title <title>", "Meeting title").requiredOption("--date <date>", "Meeting date (ISO 8601)").option("--agenda <item>", "Agenda item (repeatable)", (v, a) => [...a, v], []).description("Convene a governance meeting").action(async (opts, cmd) => {
|
|
3338
|
+
governanceCmd.command("convene").requiredOption("--body <id>", "Governance body ID").requiredOption("--type <type>", "Meeting type (board_meeting, shareholder_meeting, member_meeting, written_consent)").requiredOption("--title <title>", "Meeting title").requiredOption("--date <date>", "Meeting date (ISO 8601)").option("--agenda <item>", "Agenda item (repeatable)", (v, a) => [...a, v], []).description("Convene a governance meeting").action(async (opts, cmd) => {
|
|
3326
3339
|
const parent = cmd.parent.opts();
|
|
3327
3340
|
const { governanceConveneCommand: governanceConveneCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3328
3341
|
await governanceConveneCommand2({ ...opts, meetingType: opts.type, entityId: parent.entityId });
|