@thecorporation/cli 26.3.5 → 26.3.6
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 +17 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1624,6 +1624,15 @@ 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: "share_transfer",
|
|
1632
|
+
description: `Transfer ${opts.shares} shares from ${opts.from} to ${opts.to}`
|
|
1633
|
+
});
|
|
1634
|
+
intentId = intent.intent_id ?? intent.id;
|
|
1635
|
+
}
|
|
1627
1636
|
const body = {
|
|
1628
1637
|
entity_id: eid,
|
|
1629
1638
|
share_class_id: opts.shareClassId,
|
|
@@ -1633,7 +1642,7 @@ async function transferSharesCommand(opts) {
|
|
|
1633
1642
|
share_count: opts.shares,
|
|
1634
1643
|
governing_doc_type: opts.governingDocType,
|
|
1635
1644
|
transferee_rights: opts.transfereeRights,
|
|
1636
|
-
prepare_intent_id:
|
|
1645
|
+
prepare_intent_id: intentId
|
|
1637
1646
|
};
|
|
1638
1647
|
if (opts.pricePerShareCents != null) body.price_per_share_cents = opts.pricePerShareCents;
|
|
1639
1648
|
if (opts.relationship) body.relationship_to_holder = opts.relationship;
|
|
@@ -1958,10 +1967,11 @@ async function governanceCreateBodyCommand(opts) {
|
|
|
1958
1967
|
}
|
|
1959
1968
|
async function governanceAddSeatCommand(bodyId, opts) {
|
|
1960
1969
|
const cfg = requireConfig("api_url", "api_key", "workspace_id");
|
|
1970
|
+
const eid = resolveEntityId(cfg, opts.entityId);
|
|
1961
1971
|
const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
|
|
1962
1972
|
try {
|
|
1963
1973
|
const data = { holder_id: opts.holder, role: opts.role ?? "member" };
|
|
1964
|
-
const result = await client.createGovernanceSeat(bodyId, data);
|
|
1974
|
+
const result = await client.createGovernanceSeat(bodyId, eid, data);
|
|
1965
1975
|
printSuccess(`Seat added: ${result.seat_id ?? "OK"}`);
|
|
1966
1976
|
printJson(result);
|
|
1967
1977
|
} catch (err) {
|
|
@@ -3223,7 +3233,7 @@ capTableCmd.command("issue-safe").requiredOption("--investor <name>", "Investor
|
|
|
3223
3233
|
const { issueSafeCommand: issueSafeCommand2 } = await Promise.resolve().then(() => (init_cap_table(), cap_table_exports));
|
|
3224
3234
|
await issueSafeCommand2({ ...opts, entityId: parent.entityId });
|
|
3225
3235
|
});
|
|
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 document type").requiredOption("--transferee-rights <rights>", "Transferee rights").
|
|
3236
|
+
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 document type").requiredOption("--transferee-rights <rights>", "Transferee rights").option("--prepare-intent-id <id>", "Prepare intent ID (auto-created if omitted)").option("--type <type>", "Transfer type", "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
3237
|
const parent = cmd.parent.opts();
|
|
3228
3238
|
const { transferSharesCommand: transferSharesCommand2 } = await Promise.resolve().then(() => (init_cap_table(), cap_table_exports));
|
|
3229
3239
|
await transferSharesCommand2({ ...opts, entityId: parent.entityId });
|
|
@@ -3303,9 +3313,10 @@ governanceCmd.command("create-body").requiredOption("--name <name>", "Body name
|
|
|
3303
3313
|
const { governanceCreateBodyCommand: governanceCreateBodyCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3304
3314
|
await governanceCreateBodyCommand2({ ...opts, entityId: parent.entityId });
|
|
3305
3315
|
});
|
|
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) => {
|
|
3316
|
+
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) => {
|
|
3317
|
+
const parent = cmd.parent.opts();
|
|
3307
3318
|
const { governanceAddSeatCommand: governanceAddSeatCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3308
|
-
await governanceAddSeatCommand2(bodyId, opts);
|
|
3319
|
+
await governanceAddSeatCommand2(bodyId, { ...opts, entityId: parent.entityId });
|
|
3309
3320
|
});
|
|
3310
3321
|
governanceCmd.command("seats <body-id>").description("Seats for a governance body").action(async (bodyId, _opts, cmd) => {
|
|
3311
3322
|
const parent = cmd.parent.opts();
|
|
@@ -3322,7 +3333,7 @@ governanceCmd.command("resolutions <meeting-id>").description("Resolutions for a
|
|
|
3322
3333
|
const { governanceResolutionsCommand: governanceResolutionsCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3323
3334
|
await governanceResolutionsCommand2(meetingId, parent);
|
|
3324
3335
|
});
|
|
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) => {
|
|
3336
|
+
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
3337
|
const parent = cmd.parent.opts();
|
|
3327
3338
|
const { governanceConveneCommand: governanceConveneCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3328
3339
|
await governanceConveneCommand2({ ...opts, meetingType: opts.type, entityId: parent.entityId });
|