@konomi-app/kintone-utilities 6.0.1 → 6.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/dist/index.cjs +15 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +744 -26
- package/dist/index.d.ts +744 -26
- package/dist/index.js +15 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1099,16 +1099,6 @@ var KintoneEventListener = KintoneEventManager;
|
|
|
1099
1099
|
|
|
1100
1100
|
// src/plugin/config.ts
|
|
1101
1101
|
var META_PROPERTY_KEY = "$meta";
|
|
1102
|
-
var restoreStorage = (id) => {
|
|
1103
|
-
const config = kintone.plugin.app.getConfig(id);
|
|
1104
|
-
if (!Object.keys(config).length) {
|
|
1105
|
-
return null;
|
|
1106
|
-
}
|
|
1107
|
-
return Object.entries(config).reduce(
|
|
1108
|
-
(acc, [key, value]) => ({ ...acc, [key]: JSON.parse(value) }),
|
|
1109
|
-
{}
|
|
1110
|
-
);
|
|
1111
|
-
};
|
|
1112
1102
|
var storeStorage = (target, callback) => {
|
|
1113
1103
|
const converted = Object.entries(target).filter(([_, v]) => v !== void 0).reduce((acc, [key, value]) => ({ ...acc, [key]: JSON.stringify(value) }), {});
|
|
1114
1104
|
kintone.plugin.app.setConfig(converted, callback);
|
|
@@ -1123,9 +1113,8 @@ var restorePluginConfig = (id, options = {}) => {
|
|
|
1123
1113
|
}
|
|
1124
1114
|
if (!(META_PROPERTY_KEY in config)) {
|
|
1125
1115
|
debug && console.warn("[config] Meta property is not found. Fallback to normal config.");
|
|
1126
|
-
return Object.
|
|
1127
|
-
(
|
|
1128
|
-
{}
|
|
1116
|
+
return Object.fromEntries(
|
|
1117
|
+
Object.entries(config).map(([key, value]) => [key, JSON.parse(value)])
|
|
1129
1118
|
);
|
|
1130
1119
|
}
|
|
1131
1120
|
const meta = JSON.parse(config[META_PROPERTY_KEY]);
|
|
@@ -1286,6 +1275,7 @@ var API_ENDPOINT_VIEWS = "app/views";
|
|
|
1286
1275
|
var API_ENDPOINT_FORM_FIELDS = "app/form/fields";
|
|
1287
1276
|
var API_ENDPOINT_FORM_LAYOUT = "app/form/layout";
|
|
1288
1277
|
var API_ENDPOINT_APP_SETTINGS = "app/settings";
|
|
1278
|
+
var API_ENDPOINT_STATUS = "app/status";
|
|
1289
1279
|
var getApp = async (params) => {
|
|
1290
1280
|
const { debug, guestSpaceId, ...requestParams } = params;
|
|
1291
1281
|
return api2({
|
|
@@ -1367,6 +1357,17 @@ var getAppSettings = async (params) => {
|
|
|
1367
1357
|
guestSpaceId
|
|
1368
1358
|
});
|
|
1369
1359
|
};
|
|
1360
|
+
var getAppStatus = async (params) => {
|
|
1361
|
+
const { app, lang = "default", preview = false, debug, guestSpaceId } = params;
|
|
1362
|
+
return api2({
|
|
1363
|
+
endpointName: API_ENDPOINT_STATUS,
|
|
1364
|
+
method: "GET",
|
|
1365
|
+
body: { app, lang },
|
|
1366
|
+
preview,
|
|
1367
|
+
debug,
|
|
1368
|
+
guestSpaceId
|
|
1369
|
+
});
|
|
1370
|
+
};
|
|
1370
1371
|
|
|
1371
1372
|
// src/rest-api/record.ts
|
|
1372
1373
|
var API_ENDPOINT_RECORD = `record`;
|
|
@@ -1968,11 +1969,7 @@ var useQuery = (conditions, options) => {
|
|
|
1968
1969
|
}
|
|
1969
1970
|
return mergedCondition;
|
|
1970
1971
|
};
|
|
1971
|
-
var chunk = (arr, size) => Array.from(
|
|
1972
|
-
{ length: Math.ceil(arr.length / size) },
|
|
1973
|
-
(_, i) => arr.slice(i * size, i * size + size)
|
|
1974
|
-
);
|
|
1975
1972
|
|
|
1976
|
-
export { API_LIMIT_POST, KintoneEventListener, KintoneEventManager, PluginLocalStorage, addAllRecords, addRecord, addRecordComment, addRecords, backdoor, backdoorGetRecord, bulkRequest,
|
|
1973
|
+
export { API_LIMIT_POST, KintoneEventListener, KintoneEventManager, PluginLocalStorage, addAllRecords, addRecord, addRecordComment, addRecords, backdoor, backdoorGetRecord, bulkRequest, compareField, convertFullwidthAlphanumericToHalfwidth, convertHalfwidthKatakanaToFullwidth, convertKatakanaToHiragana, createSpace, deleteAllRecords, deleteAllRecordsByQuery, deleteRecordComment, deleteSpace, detectGuestSpaceId, downloadFile, filterFieldProperties, getAllApps, getAllRecords, getAllRecordsWithCursor, getAllRecordsWithId, getApp, getAppCharts, getAppId, getAppObject, getAppSettings, getAppStatus, getCalcFieldValueAsString, getCurrentRecord, getCybozuGroupUsers, getCybozuGroups, getCybozuOrganizationUsers, getCybozuOrganizations, getCybozuUserGroups, getCybozuUserOrganizations, getCybozuUsers, getDefaultValue, getEmptyValue, getFieldElement, getFieldElements, getFieldValueAsString, getFormFields, getFormLayout, getHeaderSpace, getMetaFieldId_UNSTABLE, getMetaFields_UNSTABLE, getMetaSubtableFields_UNSTABLE, getMetaSubtable_UNSTABLE, getMetaTable_UNSTABLE, getNumberFieldValueAsString, getQuery, getQueryCondition, getQueryString_UNSTABLE, getRecord, getRecordACLEvaluate, getRecordComments, getRecordId, getRecords, getSortFromQuery, getSpace, getSpaceElement, getViews, getWareki, getYuruChara, isGuestSpace, isMobile, onFileLoad, restorePluginConfig, setCurrentRecord, setFieldShown, setPluginProxyConfig, sortField, storePluginConfig, storeStorage, updateAllRecordStatuses, updateAllRecords, updateRecord, updateRecordAssignees, updateRecordStatus, updateThread, updateViews, uploadFile, upsertRecord, useApi, useQuery, useSorting, withLogging, withMobileEvents, withSpaceIdFallback, xapp };
|
|
1977
1974
|
//# sourceMappingURL=index.js.map
|
|
1978
1975
|
//# sourceMappingURL=index.js.map
|