astromansion 0.1.0-alpha.5 → 0.1.0-alpha.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/README.md CHANGED
@@ -1032,6 +1032,24 @@ using the custom-body endpoint's orbital fields. Their positions follow
1032
1032
  the chart's actual moment; a composite uses the midpoint of both placements.
1033
1033
  Rising-sign charts accept no bodies.
1034
1034
 
1035
+ A chart of one moment (`natal`, `solar_return`, `lunar_return` and
1036
+ `saturn_return`) can be drawn in another zodiac with `zodiac`: `tropical`
1037
+ (the default), `sidereal` or `draconic`. A sidereal chart reads `ayanamsa`:
1038
+ `true_citra` (the default), `lahiri`, `raman`, `kp` or `fagan`. Every place
1039
+ moves back by the ayanamsa of the chart's moment, or by the true node's
1040
+ longitude for a draconic chart, and the wheel's heading names the zodiac.
1041
+ The other kinds refuse both options.
1042
+
1043
+ ```ts
1044
+ await client.renderChart({
1045
+ type: "natal",
1046
+ format: "svg",
1047
+ birth,
1048
+ options: { zodiac: "sidereal", ayanamsa: "lahiri" },
1049
+ output: "sidereal-chart.svg",
1050
+ });
1051
+ ```
1052
+
1035
1053
  Presets are `classic`, `minimal`, `ink`, `editorial` and `premium`. With no
1036
1054
  style the server uses `minimal`. Colours use six hexadecimal digits, such
1037
1055
  as `#123456`. The server validates style sections, ring order and the
package/dist/index.cjs CHANGED
@@ -95,6 +95,7 @@ __export(index_exports, {
95
95
  saveCustomBody: () => saveCustomBody,
96
96
  searchPlaces: () => searchPlaces,
97
97
  setApiKey: () => setApiKey,
98
+ sign: () => sign,
98
99
  solarArc: () => solarArc,
99
100
  solarReturn: () => solarReturn,
100
101
  stations: () => stations,
@@ -394,7 +395,7 @@ var KEY_MASK = Object.freeze({
394
395
 
395
396
  // package.json
396
397
  var name = "astromansion";
397
- var version = "0.1.0-alpha.5";
398
+ var version = "0.1.0-alpha.6";
398
399
 
399
400
  // src/models/constants/package.ts
400
401
  var PACKAGE_IDENTITY = Object.freeze({
@@ -1074,6 +1075,9 @@ function isSaturnReturnResponse(value) {
1074
1075
  function isSavedCustomBody(value) {
1075
1076
  return isJsonObject(value) && typeof value["name"] === "string" && typeof value["heliocentric"] === "boolean" && isJsonRecordOf(value["elements"], (member0) => typeof member0 === "number");
1076
1077
  }
1078
+ function isSignResponse(value) {
1079
+ return isJsonObject(value) && typeof value["body"] === "string" && typeof value["sign"] === "string" && (value["dms"] === void 0 || typeof value["dms"] === "string" || value["dms"] === null) && (value["house"] === void 0 || Number.isInteger(value["house"]) || value["house"] === null) && (value["retrograde"] === void 0 || typeof value["retrograde"] === "boolean" || value["retrograde"] === null) && isJsonArrayOf(value["day_signs"], (item0) => typeof item0 === "string") && (value["change"] === void 0 || typeof value["change"] === "string" || value["change"] === null) && typeof value["time_known"] === "boolean";
1080
+ }
1077
1081
  function isSummaryRow(value) {
1078
1082
  return isJsonObject(value) && typeof value["sign"] === "string" && typeof value["dms"] === "string";
1079
1083
  }
@@ -2801,6 +2805,34 @@ var EndpointMethods = class {
2801
2805
  });
2802
2806
  return readResult(answer, isGeoSearchResponse, "searchPlaces");
2803
2807
  }
2808
+ /**
2809
+ * A body's sign at a birth.
2810
+ *
2811
+ * @remarks
2812
+ * Sends `POST /v1/sign`. The Python SDK names it sign.
2813
+ *
2814
+ * Return one body's sign at a birth, its house and motion, and the signs it held through the birth's day.
2815
+ *
2816
+ * The Sun, the Moon and the planets are open to every plan. Any other
2817
+ * catalogued minor planet or comet, such as Juno, needs the named catalog.
2818
+ * A birth without a time is read through its local day, so a day the body
2819
+ * changed sign names both signs and the local time of the change.
2820
+ *
2821
+ * @param fields - The request body, as {@link SignRequest} describes it, sent as given. signal may stand beside its fields.
2822
+ * @param keywords - signal, and output for a document, when they come apart from the body.
2823
+ * @returns The answer as a Result, checked against {@link SignResponse}.
2824
+ * @throws {@link AstroMansionError} or the subclass that names the cause, as {@link AstroMansion.request} describes. The code unexpected_answer means the answer did not have its published shape.
2825
+ */
2826
+ async sign(fields, keywords) {
2827
+ const call = RequestBodies.body("sign", fields, keywords, false);
2828
+ const answer = await this.request("POST", "/v1/sign", {
2829
+ json: call.json,
2830
+ technique: "sign",
2831
+ enveloped: false,
2832
+ signal: call.signal
2833
+ });
2834
+ return readResult(answer, isSignResponse, "sign");
2835
+ }
2804
2836
  /**
2805
2837
  * Solar arc directions.
2806
2838
  *
@@ -4091,6 +4123,9 @@ async function saveCustomBody(...args) {
4091
4123
  async function searchPlaces(...args) {
4092
4124
  return defaultClient().searchPlaces(...args);
4093
4125
  }
4126
+ async function sign(...args) {
4127
+ return defaultClient().sign(...args);
4128
+ }
4094
4129
  async function solarArc(...args) {
4095
4130
  return defaultClient().solarArc(...args);
4096
4131
  }