kingminos 0.1.0 → 0.2.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/README.md CHANGED
@@ -74,6 +74,8 @@ kingminos person verify-employment --email ada@example.com --expected-company-do
74
74
  kingminos person language --email ada@example.com
75
75
  kingminos person phone --email ada@example.com --format e164
76
76
  kingminos person title --email ada@example.com --company-domain example.com
77
+ kingminos person name --email ada@example.com --path accuracy
78
+ kingminos person b2b-social --email ada@example.com --priority balance
77
79
  ```
78
80
 
79
81
  Discovery and account helpers:
package/dist/kingminos.js CHANGED
@@ -330,6 +330,42 @@ var COMMAND_FLAGS = {
330
330
  "cache-control",
331
331
  "priority"
332
332
  ]),
333
+ "person.name": /* @__PURE__ */ new Set([
334
+ "body",
335
+ "email",
336
+ "linkedin-url",
337
+ "path",
338
+ "routing",
339
+ "skip-cache",
340
+ "dry-run",
341
+ "external-ref",
342
+ "compliance",
343
+ "idempotency-key",
344
+ "explain",
345
+ "schema",
346
+ "cache",
347
+ "cache-control",
348
+ "priority"
349
+ ]),
350
+ "person.b2b_social": /* @__PURE__ */ new Set([
351
+ "body",
352
+ "email",
353
+ "first-name",
354
+ "last-name",
355
+ "linkedin-url",
356
+ "path",
357
+ "routing",
358
+ "skip-cache",
359
+ "dry-run",
360
+ "external-ref",
361
+ "compliance",
362
+ "idempotency-key",
363
+ "explain",
364
+ "schema",
365
+ "cache",
366
+ "cache-control",
367
+ "priority"
368
+ ]),
333
369
  "runs.get": /* @__PURE__ */ new Set(["explain", "schema"]),
334
370
  "credentials.put": /* @__PURE__ */ new Set(["body", "api-key", "client-id", "client-secret"]),
335
371
  "credentials.delete": /* @__PURE__ */ new Set(),
@@ -416,8 +452,10 @@ function resolveCommand(positionals) {
416
452
  case "company":
417
453
  return resolveCompany(mid, tail);
418
454
  case "person":
419
- if (mid !== "verify-employment" && mid !== "language" && mid !== "phone" && mid !== "title") {
420
- throw new UsageError("person commands: verify-employment | language | phone | title");
455
+ if (mid !== "verify-employment" && mid !== "language" && mid !== "phone" && mid !== "title" && mid !== "name" && mid !== "b2b-social") {
456
+ throw new UsageError(
457
+ "person commands: verify-employment | language | phone | title | name | b2b-social"
458
+ );
421
459
  }
422
460
  if (tail !== void 0) {
423
461
  throw new UsageError(`person ${mid} does not take positional arguments`);
@@ -431,6 +469,12 @@ function resolveCommand(positionals) {
431
469
  if (mid === "title") {
432
470
  return { name: "person.title" };
433
471
  }
472
+ if (mid === "name") {
473
+ return { name: "person.name" };
474
+ }
475
+ if (mid === "b2b-social") {
476
+ return { name: "person.b2b_social" };
477
+ }
434
478
  return { name: "person.verify_employment" };
435
479
  case "runs":
436
480
  if (mid !== "get" || !tail) {
@@ -469,8 +513,10 @@ function resolveBatch(mid, tail) {
469
513
  }
470
514
  }
471
515
  if (mid === "person") {
472
- if (tail !== "verify-employment" && tail !== "language" && tail !== "phone" && tail !== "title") {
473
- throw new UsageError("batch person commands: verify-employment | language | phone | title");
516
+ if (tail !== "verify-employment" && tail !== "language" && tail !== "phone" && tail !== "title" && tail !== "name" && tail !== "b2b-social") {
517
+ throw new UsageError(
518
+ "batch person commands: verify-employment | language | phone | title | name | b2b-social"
519
+ );
474
520
  }
475
521
  if (tail === "language") {
476
522
  return { name: "batch", capability: "person.language" };
@@ -481,6 +527,12 @@ function resolveBatch(mid, tail) {
481
527
  if (tail === "title") {
482
528
  return { name: "batch", capability: "person.title" };
483
529
  }
530
+ if (tail === "name") {
531
+ return { name: "batch", capability: "person.name" };
532
+ }
533
+ if (tail === "b2b-social") {
534
+ return { name: "batch", capability: "person.b2b_social" };
535
+ }
484
536
  return { name: "batch", capability: "person.verify_employment" };
485
537
  }
486
538
  throw new UsageError(
@@ -646,6 +698,14 @@ function buildRequest(command, flags, loader) {
646
698
  return capabilityPost("/v1/person/title", titleBody(flags, loader), flags, {
647
699
  cache: true
648
700
  });
701
+ case "person.name":
702
+ return capabilityPost("/v1/person/name", nameBody(flags, loader), flags, {
703
+ cache: true
704
+ });
705
+ case "person.b2b_social":
706
+ return capabilityPost("/v1/person/b2b-social", personB2bSocialBody(flags, loader), flags, {
707
+ cache: true
708
+ });
649
709
  case "runs.get":
650
710
  return {
651
711
  method: "GET",
@@ -873,14 +933,43 @@ function titleBody(flags, loader) {
873
933
  body.skip_cache = true;
874
934
  }
875
935
  assignCommon(body, flags);
936
+ assignRouting(body, flags);
937
+ assignJson(body, "compliance", flags);
938
+ return withPriority(body, flags, "person.title");
939
+ }
940
+ function nameBody(flags, loader) {
941
+ const body = baseBody(flags, loader);
942
+ assignString(body, "email", flags);
943
+ assignString(body, "linkedin_url", flags, "linkedin-url");
944
+ if (flagBool(flags, "skip-cache")) {
945
+ body.skip_cache = true;
946
+ }
947
+ assignCommon(body, flags);
948
+ assignRouting(body, flags);
949
+ assignJson(body, "compliance", flags);
950
+ return withPriority(body, flags, "person.name");
951
+ }
952
+ function personB2bSocialBody(flags, loader) {
953
+ const body = baseBody(flags, loader);
954
+ assignString(body, "email", flags);
955
+ assignString(body, "linkedin_url", flags, "linkedin-url");
956
+ assignString(body, "first_name", flags, "first-name");
957
+ assignString(body, "last_name", flags, "last-name");
958
+ if (flagBool(flags, "skip-cache")) {
959
+ body.skip_cache = true;
960
+ }
961
+ assignCommon(body, flags);
962
+ assignRouting(body, flags);
963
+ assignJson(body, "compliance", flags);
964
+ return withPriority(body, flags, "person.b2b_social");
965
+ }
966
+ function assignRouting(body, flags) {
876
967
  assignJson(body, "routing", flags);
877
968
  const path = flagString(flags, "path");
878
969
  if (path !== void 0) {
879
970
  const routing = body.routing && typeof body.routing === "object" && !Array.isArray(body.routing) ? body.routing : {};
880
971
  body.routing = { ...routing, path };
881
972
  }
882
- assignJson(body, "compliance", flags);
883
- return withPriority(body, flags, "person.title");
884
973
  }
885
974
  function expectedCompany(flags) {
886
975
  const fromJson = parseJsonFlag(flags, "expected-company");
@@ -1051,6 +1140,8 @@ Commands (live OpenAPI only):
1051
1140
  person language POST /v1/person/language
1052
1141
  person phone POST /v1/person/phone
1053
1142
  person title POST /v1/person/title
1143
+ person name POST /v1/person/name
1144
+ person b2b-social POST /v1/person/b2b-social
1054
1145
  runs get <id> GET /v1/runs/{id}
1055
1146
  credentials put <provider> PUT /v1/credentials/{provider}
1056
1147
  credentials delete <provider> DELETE /v1/credentials/{provider}
@@ -1277,6 +1368,41 @@ Body fields: --email | --linkedin-url (one required)
1277
1368
  Headers: --idempotency-key --explain default|full|minimal --schema 2
1278
1369
  --cache bypass --cache-control no-cache|no-store
1279
1370
  Delivered answers are billed; misses are not. See usage.credits.spent.
1371
+ `;
1372
+ case "person.name":
1373
+ return `kingminos person name
1374
+
1375
+ POST /v1/person/name
1376
+ A person's proper-cased first, last and full name.
1377
+ Requires tenant Bearer (--token or ${TOKEN_ENV}).
1378
+
1379
+ Body fields: --email | --linkedin-url (one required)
1380
+ --path speed|balance|accuracy|coverage
1381
+ --priority speed|balance|accuracy|coverage
1382
+ --routing <json> (only / ignore)
1383
+ --skip-cache --dry-run --external-ref --compliance <json>
1384
+ --body <json|@file|->
1385
+ Headers: --idempotency-key --explain default|full|minimal --schema 2
1386
+ --cache bypass --cache-control no-cache|no-store
1387
+ Delivered answers are billed; misses are not. See usage.credits.spent.
1388
+ `;
1389
+ case "person.b2b_social":
1390
+ return `kingminos person b2b-social
1391
+
1392
+ POST /v1/person/b2b-social
1393
+ A person's B2B social profile URL (result.linkedin_url) from their email.
1394
+ Requires tenant Bearer (--token or ${TOKEN_ENV}).
1395
+
1396
+ Body fields: --email (required)
1397
+ --linkedin-url --first-name --last-name (match-only: rejects a mismatched profile)
1398
+ --path speed|balance|accuracy (no coverage)
1399
+ --priority speed|balance|accuracy
1400
+ --routing <json> (only / ignore)
1401
+ --skip-cache --dry-run --external-ref --compliance <json>
1402
+ --body <json|@file|->
1403
+ Headers: --idempotency-key --explain default|full|minimal --schema 2
1404
+ --cache bypass --cache-control no-cache|no-store
1405
+ Delivered answers are billed; misses are not. See usage.credits.spent.
1280
1406
  `;
1281
1407
  case "runs.get":
1282
1408
  return `kingminos runs get <id>
@@ -1591,6 +1717,8 @@ function helpTopic(topic) {
1591
1717
  return "person.phone";
1592
1718
  case "title":
1593
1719
  return "person.title";
1720
+ case "name":
1721
+ return "person.name";
1594
1722
  case "recipes":
1595
1723
  return "recipes";
1596
1724
  case "batch":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kingminos",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "KingMinos CLI — call the KingMinos API from your terminal",
5
5
  "license": "MIT",
6
6
  "type": "module",