astromansion 0.1.0-alpha.2 → 0.1.0-alpha.3
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 +1 -1
- package/dist/index.cjs +76 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +220 -5
- package/dist/index.d.ts +220 -5
- package/dist/index.js +76 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -802,7 +802,7 @@ list of one:
|
|
|
802
802
|
|
|
803
803
|
## Every endpoint
|
|
804
804
|
|
|
805
|
-
Every published operation,
|
|
805
|
+
Every published operation, 68 of them, has a method on the client and a
|
|
806
806
|
module-level shortcut, all generated from the schema. They are the Python
|
|
807
807
|
SDK's methods under the same names, written in camelCase: `natal`,
|
|
808
808
|
`transits`, `synastry`, `composite`, `solarReturn`, `progression`,
|
package/dist/index.cjs
CHANGED
|
@@ -77,6 +77,7 @@ __export(index_exports, {
|
|
|
77
77
|
pairAspects: () => pairAspects,
|
|
78
78
|
parans: () => parans,
|
|
79
79
|
patterns: () => patterns,
|
|
80
|
+
planetarySystem: () => planetarySystem,
|
|
80
81
|
profection: () => profection,
|
|
81
82
|
progression: () => progression,
|
|
82
83
|
query: () => query,
|
|
@@ -392,7 +393,7 @@ var KEY_MASK = Object.freeze({
|
|
|
392
393
|
|
|
393
394
|
// package.json
|
|
394
395
|
var name = "astromansion";
|
|
395
|
-
var version = "0.1.0-alpha.
|
|
396
|
+
var version = "0.1.0-alpha.3";
|
|
396
397
|
|
|
397
398
|
// src/models/constants/package.ts
|
|
398
399
|
var PACKAGE_IDENTITY = Object.freeze({
|
|
@@ -982,6 +983,9 @@ function isEclipseEvent(value) {
|
|
|
982
983
|
function isEclipsesResponse(value) {
|
|
983
984
|
return isJsonObject(value) && Number.isInteger(value["year"]) && (value["timezone"] === void 0 || typeof value["timezone"] === "string") && isJsonArrayOf(value["events"], (item0) => isEclipseEvent(item0));
|
|
984
985
|
}
|
|
986
|
+
function isGeocentricFrame(value) {
|
|
987
|
+
return isJsonObject(value) && typeof value["frame_id"] === "string" && typeof value["correction"] === "string" && typeof value["has_houses"] === "boolean";
|
|
988
|
+
}
|
|
985
989
|
function isGeoSearchResponse(value) {
|
|
986
990
|
return isJsonObject(value) && isJsonArrayOf(value["results"], (item0) => isPlaceRow(item0));
|
|
987
991
|
}
|
|
@@ -1021,9 +1025,18 @@ function isMoonPhasesResponse(value) {
|
|
|
1021
1025
|
function isNatalResponse(value) {
|
|
1022
1026
|
return isJsonObject(value) && isJsonRecordOf(value["summary"], (member0) => isSummaryRow(member0)) && isJsonArrayOf(value["planets"], (item0) => isBodyRow(item0)) && isJsonArrayOf(value["aspects"], (item0) => isAspectRow(item0)) && (value["wheel"] === void 0 || typeof value["wheel"] === "string" || value["wheel"] === null);
|
|
1023
1027
|
}
|
|
1028
|
+
function isParentcentricFrame(value) {
|
|
1029
|
+
return isJsonObject(value) && typeof value["frame_id"] === "string" && typeof value["correction"] === "string" && Number.isInteger(value["center"]) && typeof value["has_houses"] === "boolean";
|
|
1030
|
+
}
|
|
1024
1031
|
function isPlaceRow(value) {
|
|
1025
1032
|
return isJsonObject(value) && typeof value["name"] === "string" && typeof value["label"] === "string" && typeof value["lat"] === "number" && typeof value["lon"] === "number" && typeof value["timezone"] === "string";
|
|
1026
1033
|
}
|
|
1034
|
+
function isPlanetarySystemResponse(value) {
|
|
1035
|
+
return isJsonObject(value) && isSystemParent(value["parent"]) && isSystemEphemeris(value["ephemeris"]) && isSystemTime(value["time"]) && isSystemFrames(value["frames"]) && isJsonArrayOf(value["satellites"], (item0) => isSatelliteRow(item0));
|
|
1036
|
+
}
|
|
1037
|
+
function isProjectedFrame(value) {
|
|
1038
|
+
return isJsonObject(value) && typeof value["frame_id"] === "string" && typeof value["technique"] === "string" && typeof value["tradition"] === "string" && typeof value["zero_reference"] === "string" && (value["zero_longitude"] === void 0 || typeof value["zero_longitude"] === "number" || value["zero_longitude"] === null) && typeof value["has_houses"] === "boolean";
|
|
1039
|
+
}
|
|
1027
1040
|
function isRetrogradeBody(value) {
|
|
1028
1041
|
return isJsonObject(value) && typeof value["body"] === "string" && isJsonArrayOf(value["cycles"], (item0) => isRetrogradeCycle(item0));
|
|
1029
1042
|
}
|
|
@@ -1033,6 +1046,18 @@ function isRetrogradeCycle(value) {
|
|
|
1033
1046
|
function isRetrogradesResponse(value) {
|
|
1034
1047
|
return isJsonObject(value) && Number.isInteger(value["year"]) && (value["timezone"] === void 0 || typeof value["timezone"] === "string") && isJsonArrayOf(value["bodies"], (item0) => isRetrogradeBody(item0));
|
|
1035
1048
|
}
|
|
1049
|
+
function isSatelliteGeocentric(value) {
|
|
1050
|
+
return isJsonObject(value) && typeof value["frame_id"] === "string" && typeof value["correction"] === "string" && typeof value["correction_label"] === "string" && Number.isInteger(value["observer"]) && Number.isInteger(value["origin"]) && typeof value["distance_km"] === "number" && typeof value["light_time_seconds"] === "number" && typeof value["target_epoch_et"] === "number" && Number.isInteger(value["iterations"]) && typeof value["has_houses"] === "boolean";
|
|
1051
|
+
}
|
|
1052
|
+
function isSatelliteParentcentric(value) {
|
|
1053
|
+
return isJsonObject(value) && typeof value["frame_id"] === "string" && typeof value["correction"] === "string" && (value["longitude"] === void 0 || typeof value["longitude"] === "number" || value["longitude"] === null) && (value["latitude"] === void 0 || typeof value["latitude"] === "number" || value["latitude"] === null) && typeof value["distance_km"] === "number" && Number.isInteger(value["sector"]) && (value["degree_in_sector"] === void 0 || typeof value["degree_in_sector"] === "number" || value["degree_in_sector"] === null) && typeof value["has_houses"] === "boolean";
|
|
1054
|
+
}
|
|
1055
|
+
function isSatelliteProjected(value) {
|
|
1056
|
+
return isJsonObject(value) && typeof value["frame_id"] === "string" && typeof value["technique"] === "string" && typeof value["tradition"] === "string" && typeof value["zero_reference"] === "string" && (value["orbital_phase"] === void 0 || typeof value["orbital_phase"] === "number" || value["orbital_phase"] === null) && (value["longitude"] === void 0 || typeof value["longitude"] === "number" || value["longitude"] === null) && (value["sign"] === void 0 || typeof value["sign"] === "string" || value["sign"] === null) && (value["house"] === void 0 || Number.isInteger(value["house"]) || value["house"] === null);
|
|
1057
|
+
}
|
|
1058
|
+
function isSatelliteRow(value) {
|
|
1059
|
+
return isJsonObject(value) && typeof value["name"] === "string" && Number.isInteger(value["naif_id"]) && (value["geocentric"] === void 0 || isSatelliteGeocentric(value["geocentric"]) || value["geocentric"] === null) && isSatelliteParentcentric(value["parentcentric"]) && isSatelliteProjected(value["natal_parent_projected"]);
|
|
1060
|
+
}
|
|
1036
1061
|
function isSaturnReturnEvent(value) {
|
|
1037
1062
|
return isJsonObject(value) && Number.isInteger(value["return"]) && typeof value["date"] === "string" && typeof value["time"] === "string" && typeof value["sign"] === "string" && typeof value["dms"] === "string";
|
|
1038
1063
|
}
|
|
@@ -1045,6 +1070,21 @@ function isSavedCustomBody(value) {
|
|
|
1045
1070
|
function isSummaryRow(value) {
|
|
1046
1071
|
return isJsonObject(value) && typeof value["sign"] === "string" && typeof value["dms"] === "string";
|
|
1047
1072
|
}
|
|
1073
|
+
function isSystemEphemeris(value) {
|
|
1074
|
+
return isJsonObject(value) && typeof value["kernel"] === "string" && typeof value["source"] === "string" && typeof value["planetary_kernel"] === "string" && typeof value["matches_horizons"] === "boolean" && (value["horizons_delta_km"] === void 0 || typeof value["horizons_delta_km"] === "number" || value["horizons_delta_km"] === null) && isJsonArrayOf(
|
|
1075
|
+
value["coverage_jd"],
|
|
1076
|
+
(item0) => isJsonArrayOf(item0) && item0.length === 2 && typeof item0[0] === "number" && typeof item0[1] === "number"
|
|
1077
|
+
);
|
|
1078
|
+
}
|
|
1079
|
+
function isSystemFrames(value) {
|
|
1080
|
+
return isJsonObject(value) && isGeocentricFrame(value["geocentric"]) && isParentcentricFrame(value["parentcentric"]) && isProjectedFrame(value["natal_parent_projected"]);
|
|
1081
|
+
}
|
|
1082
|
+
function isSystemParent(value) {
|
|
1083
|
+
return isJsonObject(value) && typeof value["name"] === "string" && Number.isInteger(value["naif_id"]) && typeof value["natal_longitude"] === "number" && typeof value["natal_sign"] === "string" && (value["parentcentric_longitude"] === void 0 || value["parentcentric_longitude"] === null);
|
|
1084
|
+
}
|
|
1085
|
+
function isSystemTime(value) {
|
|
1086
|
+
return isJsonObject(value) && typeof value["scale"] === "string" && typeof value["model"] === "string" && typeof value["et_seconds"] === "number" && typeof value["jd"] === "number";
|
|
1087
|
+
}
|
|
1048
1088
|
function isTechniqueEnvelope(value) {
|
|
1049
1089
|
return isJsonObject(value) && typeof value["technique"] === "string" && value["result"] !== void 0;
|
|
1050
1090
|
}
|
|
@@ -2336,6 +2376,38 @@ var EndpointMethods = class {
|
|
|
2336
2376
|
});
|
|
2337
2377
|
return readWrapped(answer, isTechniqueEnvelope, "patterns");
|
|
2338
2378
|
}
|
|
2379
|
+
/**
|
|
2380
|
+
* A planet's satellites, in three frames at once.
|
|
2381
|
+
*
|
|
2382
|
+
* @remarks
|
|
2383
|
+
* Sends `POST /v1/planetary-system`. The Python SDK names it planetary_system.
|
|
2384
|
+
*
|
|
2385
|
+
* Calculate a planet's satellite system for a birth moment.
|
|
2386
|
+
*
|
|
2387
|
+
* Three answers come back for every satellite and they are not versions of
|
|
2388
|
+
* one another. From Earth the Galilean moons sit within arcminutes of
|
|
2389
|
+
* Jupiter, so the observed longitude repeats the planet's own. The
|
|
2390
|
+
* planet-centred longitude says where the moon is in its orbit but has no
|
|
2391
|
+
* horizon and therefore no houses. And the projected layer carries that
|
|
2392
|
+
* orbital phase onto the natal circle from Jupiter's own degree, which is
|
|
2393
|
+
* an AstroMansion derivation rather than a received rule. The request names
|
|
2394
|
+
* no language, so the signs are named in English.
|
|
2395
|
+
*
|
|
2396
|
+
* @param fields - The request body, as {@link PlanetarySystemRequest} describes it, sent as given. signal may stand beside its fields.
|
|
2397
|
+
* @param keywords - signal, and output for a document, when they come apart from the body.
|
|
2398
|
+
* @returns The answer as a Result, checked against {@link PlanetarySystemResponse}.
|
|
2399
|
+
* @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.
|
|
2400
|
+
*/
|
|
2401
|
+
async planetarySystem(fields, keywords) {
|
|
2402
|
+
const call = RequestBodies.body("planetarySystem", fields, keywords, false);
|
|
2403
|
+
const answer = await this.request("POST", "/v1/planetary-system", {
|
|
2404
|
+
json: call.json,
|
|
2405
|
+
technique: "planetary_system",
|
|
2406
|
+
enveloped: false,
|
|
2407
|
+
signal: call.signal
|
|
2408
|
+
});
|
|
2409
|
+
return readResult(answer, isPlanetarySystemResponse, "planetarySystem");
|
|
2410
|
+
}
|
|
2339
2411
|
/**
|
|
2340
2412
|
* Annual profections.
|
|
2341
2413
|
*
|
|
@@ -3893,6 +3965,9 @@ async function parans(...args) {
|
|
|
3893
3965
|
async function patterns(...args) {
|
|
3894
3966
|
return defaultClient().patterns(...args);
|
|
3895
3967
|
}
|
|
3968
|
+
async function planetarySystem(...args) {
|
|
3969
|
+
return defaultClient().planetarySystem(...args);
|
|
3970
|
+
}
|
|
3896
3971
|
async function profection(...args) {
|
|
3897
3972
|
return defaultClient().profection(...args);
|
|
3898
3973
|
}
|