@blazeo.com/calendar-client 1.0.31 → 1.0.32
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 +14 -0
- package/dist/index.mjs +14 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1962,6 +1962,12 @@ var CalendarLocationModel = import_mobx_state_tree16.types.model("CalendarLocati
|
|
|
1962
1962
|
if (!resolvedCalendarId) return { status: "failure", message: "calendarId required" };
|
|
1963
1963
|
return reqGet("/Calendar/Location/Get", { calendar_id: resolvedCalendarId });
|
|
1964
1964
|
},
|
|
1965
|
+
/** GET Calendar/Location/GetById – fetch a single location by calendar_location_id */
|
|
1966
|
+
async getById(calendarLocationId) {
|
|
1967
|
+
const resolvedCalendarLocationId = calendarLocationId ?? self.calendarLocationId;
|
|
1968
|
+
if (!resolvedCalendarLocationId) return { status: "failure", message: "calendarLocationId required" };
|
|
1969
|
+
return reqGet("/Calendar/Location/GetById", { calendar_location_id: resolvedCalendarLocationId });
|
|
1970
|
+
},
|
|
1965
1971
|
/** POST Calendar/Location/Save – create or update location */
|
|
1966
1972
|
async save() {
|
|
1967
1973
|
const res = await reqPost("/Calendar/Location/Save", toPayload4(self));
|
|
@@ -1998,6 +2004,14 @@ CalendarLocationModel.getByCalendar = async (calendarId) => {
|
|
|
1998
2004
|
}
|
|
1999
2005
|
return null;
|
|
2000
2006
|
};
|
|
2007
|
+
CalendarLocationModel.getById = async (calendarLocationId) => {
|
|
2008
|
+
const { reqGet } = createRequestHelpersFromEnv(getConfig());
|
|
2009
|
+
const res = await reqGet("/Calendar/Location/GetById", { calendar_location_id: calendarLocationId });
|
|
2010
|
+
if (res.status === "success" && res.data) {
|
|
2011
|
+
return CalendarLocationModel.create(mapCalendarLocationFromApi(res.data), { env: getConfig() });
|
|
2012
|
+
}
|
|
2013
|
+
return null;
|
|
2014
|
+
};
|
|
2001
2015
|
CalendarLocationModel.save = async (payload) => {
|
|
2002
2016
|
const { reqPost } = createRequestHelpersFromEnv(getConfig());
|
|
2003
2017
|
const res = await reqPost("/Calendar/Location/Save", payload);
|
package/dist/index.mjs
CHANGED
|
@@ -1891,6 +1891,12 @@ var CalendarLocationModel = types16.model("CalendarLocation", {
|
|
|
1891
1891
|
if (!resolvedCalendarId) return { status: "failure", message: "calendarId required" };
|
|
1892
1892
|
return reqGet("/Calendar/Location/Get", { calendar_id: resolvedCalendarId });
|
|
1893
1893
|
},
|
|
1894
|
+
/** GET Calendar/Location/GetById – fetch a single location by calendar_location_id */
|
|
1895
|
+
async getById(calendarLocationId) {
|
|
1896
|
+
const resolvedCalendarLocationId = calendarLocationId ?? self.calendarLocationId;
|
|
1897
|
+
if (!resolvedCalendarLocationId) return { status: "failure", message: "calendarLocationId required" };
|
|
1898
|
+
return reqGet("/Calendar/Location/GetById", { calendar_location_id: resolvedCalendarLocationId });
|
|
1899
|
+
},
|
|
1894
1900
|
/** POST Calendar/Location/Save – create or update location */
|
|
1895
1901
|
async save() {
|
|
1896
1902
|
const res = await reqPost("/Calendar/Location/Save", toPayload4(self));
|
|
@@ -1927,6 +1933,14 @@ CalendarLocationModel.getByCalendar = async (calendarId) => {
|
|
|
1927
1933
|
}
|
|
1928
1934
|
return null;
|
|
1929
1935
|
};
|
|
1936
|
+
CalendarLocationModel.getById = async (calendarLocationId) => {
|
|
1937
|
+
const { reqGet } = createRequestHelpersFromEnv(getConfig());
|
|
1938
|
+
const res = await reqGet("/Calendar/Location/GetById", { calendar_location_id: calendarLocationId });
|
|
1939
|
+
if (res.status === "success" && res.data) {
|
|
1940
|
+
return CalendarLocationModel.create(mapCalendarLocationFromApi(res.data), { env: getConfig() });
|
|
1941
|
+
}
|
|
1942
|
+
return null;
|
|
1943
|
+
};
|
|
1930
1944
|
CalendarLocationModel.save = async (payload) => {
|
|
1931
1945
|
const { reqPost } = createRequestHelpersFromEnv(getConfig());
|
|
1932
1946
|
const res = await reqPost("/Calendar/Location/Save", payload);
|