@mathrunet/masamune 2.6.2 → 2.6.5
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/CHANGELOG.md +23 -0
- package/dist/lib/functions/firestore.js +15 -6
- package/dist/lib/functions/firestore.js.map +1 -1
- package/dist/lib/functions/send_notification.js +1 -1
- package/package.json +1 -1
- package/dist/converter/firestore_basic_converter.d.ts +0 -20
- package/dist/converter/firestore_basic_converter.js +0 -25
- package/dist/converter/firestore_basic_converter.js.map +0 -1
- package/dist/converter/firestore_enum_converter.d.ts +0 -20
- package/dist/converter/firestore_enum_converter.js +0 -25
- package/dist/converter/firestore_enum_converter.js.map +0 -1
- package/dist/converter/firestore_model_command_base_converter.d.ts +0 -20
- package/dist/converter/firestore_model_command_base_converter.js +0 -38
- package/dist/converter/firestore_model_command_base_converter.js.map +0 -1
- package/dist/converter/firestore_model_counter_converter.d.ts +0 -20
- package/dist/converter/firestore_model_counter_converter.js +0 -78
- package/dist/converter/firestore_model_counter_converter.js.map +0 -1
- package/dist/converter/firestore_model_date_converter.d.ts +0 -20
- package/dist/converter/firestore_model_date_converter.js +0 -95
- package/dist/converter/firestore_model_date_converter.js.map +0 -1
- package/dist/converter/firestore_model_geo_value_converter.d.ts +0 -20
- package/dist/converter/firestore_model_geo_value_converter.js +0 -77
- package/dist/converter/firestore_model_geo_value_converter.js.map +0 -1
- package/dist/converter/firestore_model_image_uri_converter.d.ts +0 -20
- package/dist/converter/firestore_model_image_uri_converter.js +0 -74
- package/dist/converter/firestore_model_image_uri_converter.js.map +0 -1
- package/dist/converter/firestore_model_locale_converter.d.ts +0 -20
- package/dist/converter/firestore_model_locale_converter.js +0 -74
- package/dist/converter/firestore_model_locale_converter.js.map +0 -1
- package/dist/converter/firestore_model_localized_value_converter.d.ts +0 -20
- package/dist/converter/firestore_model_localized_value_converter.js +0 -36
- package/dist/converter/firestore_model_localized_value_converter.js.map +0 -1
- package/dist/converter/firestore_model_ref_converter.d.ts +0 -20
- package/dist/converter/firestore_model_ref_converter.js +0 -60
- package/dist/converter/firestore_model_ref_converter.js.map +0 -1
- package/dist/converter/firestore_model_search_converter.d.ts +0 -20
- package/dist/converter/firestore_model_search_converter.js +0 -36
- package/dist/converter/firestore_model_search_converter.js.map +0 -1
- package/dist/converter/firestore_model_timestamp_converter.d.ts +0 -20
- package/dist/converter/firestore_model_timestamp_converter.js +0 -95
- package/dist/converter/firestore_model_timestamp_converter.js.map +0 -1
- package/dist/converter/firestore_model_token_converter.d.ts +0 -20
- package/dist/converter/firestore_model_token_converter.js +0 -36
- package/dist/converter/firestore_model_token_converter.js.map +0 -1
- package/dist/converter/firestore_model_uri_converter.d.ts +0 -20
- package/dist/converter/firestore_model_uri_converter.js +0 -74
- package/dist/converter/firestore_model_uri_converter.js.map +0 -1
- package/dist/converter/firestore_model_video_uri_converter.d.ts +0 -20
- package/dist/converter/firestore_model_video_uri_converter.js +0 -74
- package/dist/converter/firestore_model_video_uri_converter.js.map +0 -1
- package/dist/converter/firestore_null_converter.d.ts +0 -20
- package/dist/converter/firestore_null_converter.js +0 -25
- package/dist/converter/firestore_null_converter.js.map +0 -1
- package/dist/exntension/string.extension.d.ts +0 -179
- package/dist/exntension/string.extension.js +0 -190
- package/dist/exntension/string.extension.js.map +0 -1
- package/dist/functions/notification.d.ts +0 -1
- package/dist/functions/notification.js +0 -111
- package/dist/functions/notification.js.map +0 -1
- package/dist/functions/send_notification_schedule.d.ts +0 -1
- package/dist/functions/send_notification_schedule.js +0 -86
- package/dist/functions/send_notification_schedule.js.map +0 -1
- package/dist/functions/stripe_hook.d.ts +0 -1
- package/dist/functions/stripe_hook.js +0 -573
- package/dist/functions/stripe_hook.js.map +0 -1
- package/dist/functions/stripe_hook_connect.d.ts +0 -1
- package/dist/functions/stripe_hook_connect.js +0 -140
- package/dist/functions/stripe_hook_connect.js.map +0 -1
- package/dist/functions/stripe_hook_secure.d.ts +0 -1
- package/dist/functions/stripe_hook_secure.js +0 -150
- package/dist/functions/stripe_hook_secure.js.map +0 -1
- package/dist/lib/call_process_function_base.d.ts +0 -39
- package/dist/lib/call_process_function_base.js +0 -69
- package/dist/lib/call_process_function_base.js.map +0 -1
- package/dist/lib/default_firestore_model_field_value_converter.d.ts +0 -8
- package/dist/lib/default_firestore_model_field_value_converter.js +0 -44
- package/dist/lib/default_firestore_model_field_value_converter.js.map +0 -1
- package/dist/lib/firestore_model_field_value_converter.d.ts +0 -140
- package/dist/lib/firestore_model_field_value_converter.js +0 -127
- package/dist/lib/firestore_model_field_value_converter.js.map +0 -1
- package/dist/lib/functions_base.d.ts +0 -195
- package/dist/lib/functions_base.js +0 -37
- package/dist/lib/functions_base.js.map +0 -1
- package/dist/lib/functions_data.d.ts +0 -10
- package/dist/lib/functions_data.js +0 -19
- package/dist/lib/functions_data.js.map +0 -1
- package/dist/lib/gmail.d.ts +0 -39
- package/dist/lib/gmail.js +0 -65
- package/dist/lib/gmail.js.map +0 -1
- package/dist/lib/model_field_value.d.ts +0 -82
- package/dist/lib/model_field_value.js +0 -104
- package/dist/lib/model_field_value.js.map +0 -1
- package/dist/lib/request_process_function_base.d.ts +0 -39
- package/dist/lib/request_process_function_base.js +0 -69
- package/dist/lib/request_process_function_base.js.map +0 -1
- package/dist/lib/schedule_process_function_base.d.ts +0 -33
- package/dist/lib/schedule_process_function_base.js +0 -70
- package/dist/lib/schedule_process_function_base.js.map +0 -1
- package/dist/lib/send_gmail.d.ts +0 -34
- package/dist/lib/send_gmail.js +0 -90
- package/dist/lib/send_gmail.js.map +0 -1
- package/dist/lib/send_grid.d.ts +0 -33
- package/dist/lib/send_grid.js +0 -58
- package/dist/lib/send_grid.js.map +0 -1
- package/dist/lib/send_notification.d.ts +0 -59
- package/dist/lib/send_notification.js +0 -216
- package/dist/lib/send_notification.js.map +0 -1
- package/dist/lib/sql_api_base.d.ts +0 -185
- package/dist/lib/sql_api_base.js +0 -94
- package/dist/lib/sql_api_base.js.map +0 -1
- package/dist/lib/update_subscription.d.ts +0 -83
- package/dist/lib/update_subscription.js +0 -143
- package/dist/lib/update_subscription.js.map +0 -1
- package/dist/lib/update_unlock.d.ts +0 -13
- package/dist/lib/update_unlock.js +0 -64
- package/dist/lib/update_unlock.js.map +0 -1
- package/dist/lib/update_wallet.d.ts +0 -19
- package/dist/lib/update_wallet.js +0 -70
- package/dist/lib/update_wallet.js.map +0 -1
- package/dist/lib/verify_android.d.ts +0 -50
- package/dist/lib/verify_android.js +0 -121
- package/dist/lib/verify_android.js.map +0 -1
- package/dist/lib/verify_ios.d.ts +0 -26
- package/dist/lib/verify_ios.js +0 -110
- package/dist/lib/verify_ios.js.map +0 -1
- package/dist/src/functions/notification.d.ts +0 -1
- package/dist/src/functions/notification.js +0 -111
- package/dist/src/functions/notification.js.map +0 -1
- package/dist/src/functions.d.ts +0 -14
- package/dist/src/functions.js +0 -41
- package/dist/src/functions.js.map +0 -1
- package/dist/src/index.d.ts +0 -13
- package/dist/src/index.js +0 -51
- package/dist/src/index.js.map +0 -1
- package/dist/src/lib/functions_data.d.ts +0 -25
- package/dist/src/lib/functions_data.js +0 -31
- package/dist/src/lib/functions_data.js.map +0 -1
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FirestoreModelImageUriConverter = void 0;
|
|
4
|
-
const firestore_model_field_value_converter_1 = require("../lib/firestore_model_field_value_converter");
|
|
5
|
-
const utils_1 = require("../lib/utils");
|
|
6
|
-
/**
|
|
7
|
-
* FirestoreConverter for [ModelImageUri].
|
|
8
|
-
*
|
|
9
|
-
* [ModelImageUri]用のFirestoreConverter。
|
|
10
|
-
*/
|
|
11
|
-
class FirestoreModelImageUriConverter extends firestore_model_field_value_converter_1.FirestoreModelFieldValueConverter {
|
|
12
|
-
/**
|
|
13
|
-
* FirestoreConverter for [ModelImageUri].
|
|
14
|
-
*
|
|
15
|
-
* [ModelImageUri]用のFirestoreConverter。
|
|
16
|
-
*/
|
|
17
|
-
constructor() {
|
|
18
|
-
super();
|
|
19
|
-
this.type = "ModelImageUri";
|
|
20
|
-
}
|
|
21
|
-
convertFrom(key, value, original) {
|
|
22
|
-
var _a, _b, _c, _d, _e, _f;
|
|
23
|
-
if (typeof value === "string") {
|
|
24
|
-
const targetKey = `#${key}`;
|
|
25
|
-
const targetMap = (_a = original[targetKey]) !== null && _a !== void 0 ? _a : {};
|
|
26
|
-
const type = (_b = targetMap["@type"]) !== null && _b !== void 0 ? _b : "";
|
|
27
|
-
if (type == this.type) {
|
|
28
|
-
return {
|
|
29
|
-
[key]: String(value),
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
else if (Array.isArray(value)) {
|
|
34
|
-
const targetKey = `#${key}`;
|
|
35
|
-
const targetList = (_c = original[targetKey]) !== null && _c !== void 0 ? _c : [];
|
|
36
|
-
if (targetList != null && targetList.length > 0 && targetList.every((e) => e["@type"] === this.type)) {
|
|
37
|
-
const res = [];
|
|
38
|
-
for (const tmp of value) {
|
|
39
|
-
res.push(String(tmp));
|
|
40
|
-
}
|
|
41
|
-
if (res.length > 0) {
|
|
42
|
-
return {
|
|
43
|
-
[key]: res,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
else if ((0, utils_1.isDynamicMap)(value)) {
|
|
49
|
-
const targetKey = `#${key}`;
|
|
50
|
-
const targetMap = (_d = original[targetKey]) !== null && _d !== void 0 ? _d : {};
|
|
51
|
-
targetMap;
|
|
52
|
-
if (targetMap != null) {
|
|
53
|
-
const res = {};
|
|
54
|
-
for (const key in value) {
|
|
55
|
-
const val = value[key];
|
|
56
|
-
const mapVal = (_e = targetMap[key]) !== null && _e !== void 0 ? _e : {};
|
|
57
|
-
const type = (_f = mapVal["@type"]) !== null && _f !== void 0 ? _f : "";
|
|
58
|
-
if (type != this.type) {
|
|
59
|
-
continue;
|
|
60
|
-
}
|
|
61
|
-
res[key] = String(val);
|
|
62
|
-
}
|
|
63
|
-
if (Object.keys(res).length > 0) {
|
|
64
|
-
return {
|
|
65
|
-
[key]: res,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.FirestoreModelImageUriConverter = FirestoreModelImageUriConverter;
|
|
74
|
-
//# sourceMappingURL=firestore_model_image_uri_converter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firestore_model_image_uri_converter.js","sourceRoot":"","sources":["../../src/converter/firestore_model_image_uri_converter.ts"],"names":[],"mappings":";;;AAAA,wGAAiG;AACjG,wCAA4C;AAE5C;;;;GAIG;AACH,MAAa,+BAAgC,SAAQ,yEAAiC;IACpF;;;;OAIG;IACH;QACE,KAAK,EAAE,CAAC;QAGV,SAAI,GAAW,eAAe,CAAC;IAF/B,CAAC;IAID,WAAW,CACT,GAAW,EACX,KAAU,EACV,QAAkC;;QAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;YAC5B,MAAM,SAAS,GAAG,MAAA,QAAQ,CAAC,SAAS,CAAgD,mCAAI,EAAE,CAAC;YAC3F,MAAM,IAAI,GAAG,MAAA,SAAS,CAAC,OAAO,CAA8B,mCAAI,EAAE,CAAC;YACnE,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;gBACtB,OAAO;oBACL,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC;iBACrB,CAAC;YACJ,CAAC;QACH,CAAC;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAChC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;YAC5B,MAAM,UAAU,GAAG,MAAA,QAAQ,CAAC,SAAS,CAAkD,mCAAI,EAAE,CAAC;YAC9F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C,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAChC,OAAO;wBACL,CAAC,GAAG,CAAC,EAAE,GAAG;qBACX,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAjED,0EAiEC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FirestoreModelFieldValueConverter } from "../lib/firestore_model_field_value_converter";
|
|
2
|
-
/**
|
|
3
|
-
* FirestoreConverter for [ModelLocale].
|
|
4
|
-
*
|
|
5
|
-
* [ModelLocale]用のFirestoreConverter。
|
|
6
|
-
*/
|
|
7
|
-
export declare class FirestoreModelLocaleConverter extends FirestoreModelFieldValueConverter {
|
|
8
|
-
/**
|
|
9
|
-
* FirestoreConverter for [ModelLocale].
|
|
10
|
-
*
|
|
11
|
-
* [ModelLocale]用のFirestoreConverter。
|
|
12
|
-
*/
|
|
13
|
-
constructor();
|
|
14
|
-
type: string;
|
|
15
|
-
convertFrom(key: string, value: any, original: {
|
|
16
|
-
[field: string]: any;
|
|
17
|
-
}): {
|
|
18
|
-
[field: string]: any;
|
|
19
|
-
} | null;
|
|
20
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FirestoreModelLocaleConverter = void 0;
|
|
4
|
-
const firestore_model_field_value_converter_1 = require("../lib/firestore_model_field_value_converter");
|
|
5
|
-
const utils_1 = require("../lib/utils");
|
|
6
|
-
/**
|
|
7
|
-
* FirestoreConverter for [ModelLocale].
|
|
8
|
-
*
|
|
9
|
-
* [ModelLocale]用のFirestoreConverter。
|
|
10
|
-
*/
|
|
11
|
-
class FirestoreModelLocaleConverter extends firestore_model_field_value_converter_1.FirestoreModelFieldValueConverter {
|
|
12
|
-
/**
|
|
13
|
-
* FirestoreConverter for [ModelLocale].
|
|
14
|
-
*
|
|
15
|
-
* [ModelLocale]用のFirestoreConverter。
|
|
16
|
-
*/
|
|
17
|
-
constructor() {
|
|
18
|
-
super();
|
|
19
|
-
this.type = "ModelLocale";
|
|
20
|
-
}
|
|
21
|
-
convertFrom(key, value, original) {
|
|
22
|
-
var _a, _b, _c, _d, _e, _f;
|
|
23
|
-
if (typeof value === "string") {
|
|
24
|
-
const targetKey = `#${key}`;
|
|
25
|
-
const targetMap = (_a = original[targetKey]) !== null && _a !== void 0 ? _a : {};
|
|
26
|
-
const type = (_b = targetMap["@type"]) !== null && _b !== void 0 ? _b : "";
|
|
27
|
-
if (type == this.type) {
|
|
28
|
-
return {
|
|
29
|
-
[key]: String(value),
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
else if (Array.isArray(value)) {
|
|
34
|
-
const targetKey = `#${key}`;
|
|
35
|
-
const targetList = (_c = original[targetKey]) !== null && _c !== void 0 ? _c : [];
|
|
36
|
-
if (targetList != null && targetList.length > 0 && targetList.every((e) => e["@type"] === this.type)) {
|
|
37
|
-
const res = [];
|
|
38
|
-
for (const tmp of value) {
|
|
39
|
-
res.push(String(tmp));
|
|
40
|
-
}
|
|
41
|
-
if (res.length > 0) {
|
|
42
|
-
return {
|
|
43
|
-
[key]: res,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
else if ((0, utils_1.isDynamicMap)(value)) {
|
|
49
|
-
const targetKey = `#${key}`;
|
|
50
|
-
const targetMap = (_d = original[targetKey]) !== null && _d !== void 0 ? _d : {};
|
|
51
|
-
targetMap;
|
|
52
|
-
if (targetMap != null) {
|
|
53
|
-
const res = {};
|
|
54
|
-
for (const key in value) {
|
|
55
|
-
const val = value[key];
|
|
56
|
-
const mapVal = (_e = targetMap[key]) !== null && _e !== void 0 ? _e : {};
|
|
57
|
-
const type = (_f = mapVal["@type"]) !== null && _f !== void 0 ? _f : "";
|
|
58
|
-
if (type != this.type) {
|
|
59
|
-
continue;
|
|
60
|
-
}
|
|
61
|
-
res[key] = String(val);
|
|
62
|
-
}
|
|
63
|
-
if (Object.keys(res).length > 0) {
|
|
64
|
-
return {
|
|
65
|
-
[key]: res,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.FirestoreModelLocaleConverter = FirestoreModelLocaleConverter;
|
|
74
|
-
//# sourceMappingURL=firestore_model_locale_converter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firestore_model_locale_converter.js","sourceRoot":"","sources":["../../src/converter/firestore_model_locale_converter.ts"],"names":[],"mappings":";;;AAAA,wGAAiG;AACjG,wCAA4C;AAE5C;;;;GAIG;AACH,MAAa,6BAA8B,SAAQ,yEAAiC;IAClF;;;;OAIG;IACH;QACE,KAAK,EAAE,CAAC;QAGV,SAAI,GAAW,aAAa,CAAC;IAF7B,CAAC;IAID,WAAW,CACT,GAAW,EACX,KAAU,EACV,QAAkC;;QAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;YAC5B,MAAM,SAAS,GAAG,MAAA,QAAQ,CAAC,SAAS,CAAgD,mCAAI,EAAE,CAAC;YAC3F,MAAM,IAAI,GAAG,MAAA,SAAS,CAAC,OAAO,CAA8B,mCAAI,EAAE,CAAC;YACnE,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;gBACtB,OAAO;oBACL,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC;iBACrB,CAAC;YACJ,CAAC;QACH,CAAC;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAChC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;YAC5B,MAAM,UAAU,GAAG,MAAA,QAAQ,CAAC,SAAS,CAAkD,mCAAI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AM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAChC,OAAO;wBACL,CAAC,GAAG,CAAC,EAAE,GAAG;qBACX,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAjED,sEAiEC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FirestoreModelFieldValueConverter } from "../lib/firestore_model_field_value_converter";
|
|
2
|
-
/**
|
|
3
|
-
* FirestoreConverter for [ModelLocalizedValue].
|
|
4
|
-
*
|
|
5
|
-
* [ModelLocalizedValue]用のFirestoreConverter。
|
|
6
|
-
*/
|
|
7
|
-
export declare class FirestoreModelLocalizedValueConverter extends FirestoreModelFieldValueConverter {
|
|
8
|
-
/**
|
|
9
|
-
* FirestoreConverter for [ModelLocalizedValue].
|
|
10
|
-
*
|
|
11
|
-
* [ModelLocalizedValue]用のFirestoreConverter。
|
|
12
|
-
*/
|
|
13
|
-
constructor();
|
|
14
|
-
type: string;
|
|
15
|
-
convertFrom(key: string, value: any, original: {
|
|
16
|
-
[field: string]: any;
|
|
17
|
-
}): {
|
|
18
|
-
[field: string]: any;
|
|
19
|
-
} | null;
|
|
20
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FirestoreModelLocalizedValueConverter = void 0;
|
|
4
|
-
const firestore_model_field_value_converter_1 = require("../lib/firestore_model_field_value_converter");
|
|
5
|
-
/**
|
|
6
|
-
* FirestoreConverter for [ModelLocalizedValue].
|
|
7
|
-
*
|
|
8
|
-
* [ModelLocalizedValue]用のFirestoreConverter。
|
|
9
|
-
*/
|
|
10
|
-
class FirestoreModelLocalizedValueConverter extends firestore_model_field_value_converter_1.FirestoreModelFieldValueConverter {
|
|
11
|
-
/**
|
|
12
|
-
* FirestoreConverter for [ModelLocalizedValue].
|
|
13
|
-
*
|
|
14
|
-
* [ModelLocalizedValue]用のFirestoreConverter。
|
|
15
|
-
*/
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.type = "ModelLocalizedValue";
|
|
19
|
-
}
|
|
20
|
-
convertFrom(key, value, original) {
|
|
21
|
-
var _a, _b;
|
|
22
|
-
if (Array.isArray(value)) {
|
|
23
|
-
const targetKey = `#${key}`;
|
|
24
|
-
const targetMap = (_a = original[targetKey]) !== null && _a !== void 0 ? _a : {};
|
|
25
|
-
const type = (_b = targetMap["@type"]) !== null && _b !== void 0 ? _b : "";
|
|
26
|
-
if (type == this.type) {
|
|
27
|
-
return {
|
|
28
|
-
[key]: targetMap["@localized"],
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.FirestoreModelLocalizedValueConverter = FirestoreModelLocalizedValueConverter;
|
|
36
|
-
//# sourceMappingURL=firestore_model_localized_value_converter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firestore_model_localized_value_converter.js","sourceRoot":"","sources":["../../src/converter/firestore_model_localized_value_converter.ts"],"names":[],"mappings":";;;AAAA,wGAAiG;AAEjG;;;;GAIG;AACH,MAAa,qCAAsC,SAAQ,yEAAiC;IAC1F;;;;OAIG;IACH;QACE,KAAK,EAAE,CAAC;QAGV,SAAI,GAAW,qBAAqB,CAAC;IAFrC,CAAC;IAID,WAAW,CACT,GAAW,EACX,KAAU,EACV,QAAkC;;QAClC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;YAC5B,MAAM,SAAS,GAAG,MAAA,QAAQ,CAAC,SAAS,CAAgD,mCAAI,EAAE,CAAC;YAC3F,MAAM,IAAI,GAAG,MAAA,SAAS,CAAC,OAAO,CAA8B,mCAAI,EAAE,CAAC;YACnE,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;gBACtB,OAAO;oBACL,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC;iBAC/B,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5BD,sFA4BC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FirestoreModelFieldValueConverter } from "../lib/firestore_model_field_value_converter";
|
|
2
|
-
/**
|
|
3
|
-
* FirestoreConverter for [ModelRef].
|
|
4
|
-
*
|
|
5
|
-
* [ModelRef]用のFirestoreConverter。
|
|
6
|
-
*/
|
|
7
|
-
export declare class FirestoreModelRefConverter extends FirestoreModelFieldValueConverter {
|
|
8
|
-
/**
|
|
9
|
-
* FirestoreConverter for [ModelRef].
|
|
10
|
-
*
|
|
11
|
-
* [ModelRef]用のFirestoreConverter。
|
|
12
|
-
*/
|
|
13
|
-
constructor();
|
|
14
|
-
type: string;
|
|
15
|
-
convertFrom(key: string, value: any, original: {
|
|
16
|
-
[field: string]: any;
|
|
17
|
-
}): {
|
|
18
|
-
[field: string]: any;
|
|
19
|
-
} | null;
|
|
20
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FirestoreModelRefConverter = void 0;
|
|
4
|
-
const firestore_model_field_value_converter_1 = require("../lib/firestore_model_field_value_converter");
|
|
5
|
-
const utils_1 = require("../lib/utils");
|
|
6
|
-
const firestore_1 = require("firebase-admin/firestore");
|
|
7
|
-
/**
|
|
8
|
-
* FirestoreConverter for [ModelRef].
|
|
9
|
-
*
|
|
10
|
-
* [ModelRef]用のFirestoreConverter。
|
|
11
|
-
*/
|
|
12
|
-
class FirestoreModelRefConverter extends firestore_model_field_value_converter_1.FirestoreModelFieldValueConverter {
|
|
13
|
-
/**
|
|
14
|
-
* FirestoreConverter for [ModelRef].
|
|
15
|
-
*
|
|
16
|
-
* [ModelRef]用のFirestoreConverter。
|
|
17
|
-
*/
|
|
18
|
-
constructor() {
|
|
19
|
-
super();
|
|
20
|
-
this.type = "ModelRefBase";
|
|
21
|
-
}
|
|
22
|
-
convertFrom(key, value, original) {
|
|
23
|
-
console.log(`${key} is ${typeof value}`);
|
|
24
|
-
if (value instanceof firestore_1.DocumentReference) {
|
|
25
|
-
return {
|
|
26
|
-
[key]: Object.assign({ "@ref": value.path }, this.header()),
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
else if (Array.isArray(value)) {
|
|
30
|
-
const res = [];
|
|
31
|
-
for (const tmp of value) {
|
|
32
|
-
if (tmp instanceof firestore_1.DocumentReference) {
|
|
33
|
-
res.push(Object.assign({ "@ref": tmp.path }, this.header()));
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
if (res.length > 0) {
|
|
37
|
-
return {
|
|
38
|
-
[key]: res,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
else if ((0, utils_1.isDynamicMap)(value)) {
|
|
43
|
-
const res = {};
|
|
44
|
-
for (const k in value) {
|
|
45
|
-
const val = value[k];
|
|
46
|
-
if (val instanceof firestore_1.DocumentReference) {
|
|
47
|
-
res[k] = Object.assign({ "@ref": val.path }, this.header());
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
if (Object.keys(res).length > 0) {
|
|
51
|
-
return {
|
|
52
|
-
[key]: res,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.FirestoreModelRefConverter = FirestoreModelRefConverter;
|
|
60
|
-
//# sourceMappingURL=firestore_model_ref_converter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firestore_model_ref_converter.js","sourceRoot":"","sources":["../../src/converter/firestore_model_ref_converter.ts"],"names":[],"mappings":";;;AAAA,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C,IAAI,IACb,IAAI,CAAC,MAAM,EAAE,CACjB,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAChC,OAAO;oBACL,CAAC,GAAG,CAAC,EAAE,GAAG;iBACX,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5DD,gEA4DC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FirestoreModelFieldValueConverter } from "../lib/firestore_model_field_value_converter";
|
|
2
|
-
/**
|
|
3
|
-
* FirestoreConverter for [ModelSearch].
|
|
4
|
-
*
|
|
5
|
-
* [ModelSearch]用のFirestoreConverter。
|
|
6
|
-
*/
|
|
7
|
-
export declare class FirestoreModelSearchConverter extends FirestoreModelFieldValueConverter {
|
|
8
|
-
/**
|
|
9
|
-
* FirestoreConverter for [ModelSearch].
|
|
10
|
-
*
|
|
11
|
-
* [ModelSearch]用のFirestoreConverter。
|
|
12
|
-
*/
|
|
13
|
-
constructor();
|
|
14
|
-
type: string;
|
|
15
|
-
convertFrom(key: string, value: any, original: {
|
|
16
|
-
[field: string]: any;
|
|
17
|
-
}): {
|
|
18
|
-
[field: string]: any;
|
|
19
|
-
} | null;
|
|
20
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FirestoreModelSearchConverter = void 0;
|
|
4
|
-
const firestore_model_field_value_converter_1 = require("../lib/firestore_model_field_value_converter");
|
|
5
|
-
/**
|
|
6
|
-
* FirestoreConverter for [ModelSearch].
|
|
7
|
-
*
|
|
8
|
-
* [ModelSearch]用のFirestoreConverter。
|
|
9
|
-
*/
|
|
10
|
-
class FirestoreModelSearchConverter extends firestore_model_field_value_converter_1.FirestoreModelFieldValueConverter {
|
|
11
|
-
/**
|
|
12
|
-
* FirestoreConverter for [ModelSearch].
|
|
13
|
-
*
|
|
14
|
-
* [ModelSearch]用のFirestoreConverter。
|
|
15
|
-
*/
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.type = "ModelSearch";
|
|
19
|
-
}
|
|
20
|
-
convertFrom(key, value, original) {
|
|
21
|
-
var _a, _b;
|
|
22
|
-
if (Array.isArray(value)) {
|
|
23
|
-
const targetKey = `#${key}`;
|
|
24
|
-
const targetMap = (_a = original[targetKey]) !== null && _a !== void 0 ? _a : {};
|
|
25
|
-
const type = (_b = targetMap["@type"]) !== null && _b !== void 0 ? _b : "";
|
|
26
|
-
if (type == this.type) {
|
|
27
|
-
return {
|
|
28
|
-
[key]: value.map((e) => String(e)),
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.FirestoreModelSearchConverter = FirestoreModelSearchConverter;
|
|
36
|
-
//# sourceMappingURL=firestore_model_search_converter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firestore_model_search_converter.js","sourceRoot":"","sources":["../../src/converter/firestore_model_search_converter.ts"],"names":[],"mappings":";;;AAAA,wGAAiG;AAEjG;;;;GAIG;AACH,MAAa,6BAA8B,SAAQ,yEAAiC;IAClF;;;;OAIG;IACH;QACE,KAAK,EAAE,CAAC;QAGV,SAAI,GAAW,aAAa,CAAC;IAF7B,CAAC;IAID,WAAW,CACT,GAAW,EACX,KAAU,EACV,QAAkC;;QAClC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;YAC5B,MAAM,SAAS,GAAG,MAAA,QAAQ,CAAC,SAAS,CAAgD,mCAAI,EAAE,CAAC;YAC3F,MAAM,IAAI,GAAG,MAAA,SAAS,CAAC,OAAO,CAA8B,mCAAI,EAAE,CAAC;YACnE,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;gBACtB,OAAO;oBACL,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;iBACnC,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5BD,sEA4BC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FirestoreModelFieldValueConverter } from "../lib/firestore_model_field_value_converter";
|
|
2
|
-
/**
|
|
3
|
-
* FirestoreConverter for [ModelTimestamp].
|
|
4
|
-
*
|
|
5
|
-
* [ModelTimestamp]用のFirestoreConverter。
|
|
6
|
-
*/
|
|
7
|
-
export declare class FirestoreModelTimestampConverter extends FirestoreModelFieldValueConverter {
|
|
8
|
-
/**
|
|
9
|
-
* FirestoreConverter for [ModelTimestamp].
|
|
10
|
-
*
|
|
11
|
-
* [ModelTimestamp]用のFirestoreConverter。
|
|
12
|
-
*/
|
|
13
|
-
constructor();
|
|
14
|
-
type: string;
|
|
15
|
-
convertFrom(key: string, value: any, original: {
|
|
16
|
-
[field: string]: any;
|
|
17
|
-
}): {
|
|
18
|
-
[field: string]: any;
|
|
19
|
-
} | null;
|
|
20
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FirestoreModelTimestampConverter = void 0;
|
|
4
|
-
const firestore_model_field_value_converter_1 = require("../lib/firestore_model_field_value_converter");
|
|
5
|
-
const utils_1 = require("../lib/utils");
|
|
6
|
-
const firestore_1 = require("firebase-admin/firestore");
|
|
7
|
-
/**
|
|
8
|
-
* FirestoreConverter for [ModelTimestamp].
|
|
9
|
-
*
|
|
10
|
-
* [ModelTimestamp]用のFirestoreConverter。
|
|
11
|
-
*/
|
|
12
|
-
class FirestoreModelTimestampConverter extends firestore_model_field_value_converter_1.FirestoreModelFieldValueConverter {
|
|
13
|
-
/**
|
|
14
|
-
* FirestoreConverter for [ModelTimestamp].
|
|
15
|
-
*
|
|
16
|
-
* [ModelTimestamp]用のFirestoreConverter。
|
|
17
|
-
*/
|
|
18
|
-
constructor() {
|
|
19
|
-
super();
|
|
20
|
-
this.type = "ModelTimestamp";
|
|
21
|
-
}
|
|
22
|
-
convertFrom(key, value, original) {
|
|
23
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
24
|
-
if (typeof value === "number") {
|
|
25
|
-
const targetKey = `#${key}`;
|
|
26
|
-
const targetMap = (_a = original[targetKey]) !== null && _a !== void 0 ? _a : {};
|
|
27
|
-
const type = (_b = targetMap["@type"]) !== null && _b !== void 0 ? _b : "";
|
|
28
|
-
if (type == this.type) {
|
|
29
|
-
return {
|
|
30
|
-
[key]: value,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
else if (value instanceof firestore_1.Timestamp) {
|
|
35
|
-
const targetKey = `#${key}`;
|
|
36
|
-
const targetMap = (_c = original[targetKey]) !== null && _c !== void 0 ? _c : {};
|
|
37
|
-
const type = (_d = targetMap["@type"]) !== null && _d !== void 0 ? _d : "";
|
|
38
|
-
if (type == this.type) {
|
|
39
|
-
return {
|
|
40
|
-
[key]: value.toMillis(),
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
else if (Array.isArray(value)) {
|
|
45
|
-
const targetKey = `#${key}`;
|
|
46
|
-
const targetList = (_e = original[targetKey]) !== null && _e !== void 0 ? _e : [];
|
|
47
|
-
if (targetList != null && targetList.length > 0 && targetList.every((e) => e["@type"] === this.type)) {
|
|
48
|
-
const res = [];
|
|
49
|
-
for (const tmp of value) {
|
|
50
|
-
if (typeof tmp === "number") {
|
|
51
|
-
res.push(tmp);
|
|
52
|
-
}
|
|
53
|
-
else if (tmp instanceof firestore_1.Timestamp) {
|
|
54
|
-
res.push(tmp.toMillis());
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
if (res.length > 0) {
|
|
58
|
-
return {
|
|
59
|
-
[key]: res,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
else if ((0, utils_1.isDynamicMap)(value)) {
|
|
65
|
-
const targetKey = `#${key}`;
|
|
66
|
-
const targetMap = (_f = original[targetKey]) !== null && _f !== void 0 ? _f : {};
|
|
67
|
-
targetMap;
|
|
68
|
-
if (targetMap != null) {
|
|
69
|
-
const res = {};
|
|
70
|
-
for (const key in value) {
|
|
71
|
-
const val = value[key];
|
|
72
|
-
const mapVal = (_g = targetMap[key]) !== null && _g !== void 0 ? _g : {};
|
|
73
|
-
const type = (_h = mapVal["@type"]) !== null && _h !== void 0 ? _h : "";
|
|
74
|
-
if (type != this.type) {
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
if (typeof val === "number") {
|
|
78
|
-
res[key] = val;
|
|
79
|
-
}
|
|
80
|
-
else if (val instanceof firestore_1.Timestamp) {
|
|
81
|
-
res[key] = val.toMillis();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if (Object.keys(res).length > 0) {
|
|
85
|
-
return {
|
|
86
|
-
[key]: res,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
exports.FirestoreModelTimestampConverter = FirestoreModelTimestampConverter;
|
|
95
|
-
//# sourceMappingURL=firestore_model_timestamp_converter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firestore_model_timestamp_converter.js","sourceRoot":"","sources":["../../src/converter/firestore_model_timestamp_converter.ts"],"names":[],"mappings":";;;AAAA,wGAAiG;AACjG,wCAA4C;AAC5C,wDAAqD;AAErD;;;;GAIG;AACH,MAAa,gCAAiC,SAAQ,yEAAiC;IACrF;;;;OAIG;IACH;Q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,CAAC,GAAG,GAAG,CAAC;oBACjB,CAAC;yBAAM,IAAI,GAAG,YAAY,qBAAS,EAAE,CAAC;wBACpC,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;oBAC5B,CAAC;gBACH,CAAC;gBACD,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAChC,OAAO;wBACL,CAAC,GAAG,CAAC,EAAE,GAAG;qBACX,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlFD,4EAkFC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FirestoreModelFieldValueConverter } from "../lib/firestore_model_field_value_converter";
|
|
2
|
-
/**
|
|
3
|
-
* FirestoreConverter for [ModelToken].
|
|
4
|
-
*
|
|
5
|
-
* [ModelToken]用のFirestoreConverter。
|
|
6
|
-
*/
|
|
7
|
-
export declare class FirestoreModelTokenConverter extends FirestoreModelFieldValueConverter {
|
|
8
|
-
/**
|
|
9
|
-
* FirestoreConverter for [ModelToken].
|
|
10
|
-
*
|
|
11
|
-
* [ModelToken]用のFirestoreConverter。
|
|
12
|
-
*/
|
|
13
|
-
constructor();
|
|
14
|
-
type: string;
|
|
15
|
-
convertFrom(key: string, value: any, original: {
|
|
16
|
-
[field: string]: any;
|
|
17
|
-
}): {
|
|
18
|
-
[field: string]: any;
|
|
19
|
-
} | null;
|
|
20
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FirestoreModelTokenConverter = void 0;
|
|
4
|
-
const firestore_model_field_value_converter_1 = require("../lib/firestore_model_field_value_converter");
|
|
5
|
-
/**
|
|
6
|
-
* FirestoreConverter for [ModelToken].
|
|
7
|
-
*
|
|
8
|
-
* [ModelToken]用のFirestoreConverter。
|
|
9
|
-
*/
|
|
10
|
-
class FirestoreModelTokenConverter extends firestore_model_field_value_converter_1.FirestoreModelFieldValueConverter {
|
|
11
|
-
/**
|
|
12
|
-
* FirestoreConverter for [ModelToken].
|
|
13
|
-
*
|
|
14
|
-
* [ModelToken]用のFirestoreConverter。
|
|
15
|
-
*/
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.type = "ModelToken";
|
|
19
|
-
}
|
|
20
|
-
convertFrom(key, value, original) {
|
|
21
|
-
var _a, _b;
|
|
22
|
-
if (Array.isArray(value)) {
|
|
23
|
-
const targetKey = `#${key}`;
|
|
24
|
-
const targetMap = (_a = original[targetKey]) !== null && _a !== void 0 ? _a : {};
|
|
25
|
-
const type = (_b = targetMap["@type"]) !== null && _b !== void 0 ? _b : "";
|
|
26
|
-
if (type == this.type) {
|
|
27
|
-
return {
|
|
28
|
-
[key]: value.map((e) => String(e)),
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.FirestoreModelTokenConverter = FirestoreModelTokenConverter;
|
|
36
|
-
//# sourceMappingURL=firestore_model_token_converter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firestore_model_token_converter.js","sourceRoot":"","sources":["../../src/converter/firestore_model_token_converter.ts"],"names":[],"mappings":";;;AAAA,wGAAiG;AAEjG;;;;GAIG;AACH,MAAa,4BAA6B,SAAQ,yEAAiC;IACjF;;;;OAIG;IACH;QACE,KAAK,EAAE,CAAC;QAGV,SAAI,GAAW,YAAY,CAAC;IAF5B,CAAC;IAID,WAAW,CACT,GAAW,EACX,KAAU,EACV,QAAkC;;QAClC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;YAC5B,MAAM,SAAS,GAAG,MAAA,QAAQ,CAAC,SAAS,CAAgD,mCAAI,EAAE,CAAC;YAC3F,MAAM,IAAI,GAAG,MAAA,SAAS,CAAC,OAAO,CAA8B,mCAAI,EAAE,CAAC;YACnE,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;gBACtB,OAAO;oBACL,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;iBACnC,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5BD,oEA4BC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FirestoreModelFieldValueConverter } from "../lib/firestore_model_field_value_converter";
|
|
2
|
-
/**
|
|
3
|
-
* FirestoreConverter for [ModelUri].
|
|
4
|
-
*
|
|
5
|
-
* [ModelUri]用のFirestoreConverter。
|
|
6
|
-
*/
|
|
7
|
-
export declare class FirestoreModelUriConverter extends FirestoreModelFieldValueConverter {
|
|
8
|
-
/**
|
|
9
|
-
* FirestoreConverter for [ModelUri].
|
|
10
|
-
*
|
|
11
|
-
* [ModelUri]用のFirestoreConverter。
|
|
12
|
-
*/
|
|
13
|
-
constructor();
|
|
14
|
-
type: string;
|
|
15
|
-
convertFrom(key: string, value: any, original: {
|
|
16
|
-
[field: string]: any;
|
|
17
|
-
}): {
|
|
18
|
-
[field: string]: any;
|
|
19
|
-
} | null;
|
|
20
|
-
}
|