@mathrunet/masamune 2.4.3 → 2.5.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/CHANGELOG.md +18 -0
- package/dist/functions/agora_token.js +26 -11
- package/dist/functions/agora_token.js.map +1 -1
- package/dist/functions/algolia.js +1 -1
- package/dist/functions/algolia.js.map +1 -1
- package/dist/functions/consumable_verify_android.js +2 -2
- package/dist/functions/consumable_verify_android.js.map +1 -1
- package/dist/functions/consumable_verify_ios.js +2 -2
- package/dist/functions/consumable_verify_ios.js.map +1 -1
- package/dist/functions/gmail.js +1 -1
- package/dist/functions/gmail.js.map +1 -1
- package/dist/functions/nonconsumable_verify_android.js +2 -2
- package/dist/functions/nonconsumable_verify_android.js.map +1 -1
- package/dist/functions/nonconsumable_verify_ios.js +2 -2
- package/dist/functions/nonconsumable_verify_ios.js.map +1 -1
- package/dist/functions/purchase_webhook_android.js +1 -1
- package/dist/functions/purchase_webhook_android.js.map +1 -1
- package/dist/functions/scheduler.js +9 -1
- package/dist/functions/scheduler.js.map +1 -1
- package/dist/functions/send_grid.js +1 -1
- package/dist/functions/send_grid.js.map +1 -1
- package/dist/functions/send_notification.js +29 -1
- package/dist/functions/send_notification.js.map +1 -1
- package/dist/functions/stripe.d.ts +1 -1
- package/dist/functions/stripe.js +3 -3
- package/dist/functions/stripe.js.map +1 -1
- package/dist/functions/stripe_webhook_secure.d.ts +1 -1
- package/dist/functions/stripe_webhook_secure.js +1 -1
- package/dist/functions/stripe_webhook_secure.js.map +1 -1
- package/dist/functions/subscription_verify_android.js +2 -2
- package/dist/functions/subscription_verify_android.js.map +1 -1
- package/dist/functions/subscription_verify_ios.js +2 -2
- package/dist/functions/subscription_verify_ios.js.map +1 -1
- package/dist/functions.d.ts +1 -1
- package/dist/functions.js +1 -1
- package/dist/functions.js.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/lib/exntensions/string.extension.d.ts +179 -0
- package/dist/lib/exntensions/string.extension.js +190 -0
- package/dist/lib/exntensions/string.extension.js.map +1 -0
- package/dist/lib/functions/firestore.d.ts +15 -0
- package/dist/lib/functions/firestore.js +216 -0
- package/dist/lib/functions/firestore.js.map +1 -0
- package/dist/lib/functions/gmail.d.ts +39 -0
- package/dist/lib/functions/gmail.js +65 -0
- package/dist/lib/functions/gmail.js.map +1 -0
- package/dist/lib/functions/send_grid.d.ts +33 -0
- package/dist/lib/functions/send_grid.js +58 -0
- package/dist/lib/functions/send_grid.js.map +1 -0
- package/dist/lib/functions/send_notification.d.ts +87 -0
- package/dist/lib/functions/send_notification.js +270 -0
- package/dist/lib/functions/send_notification.js.map +1 -0
- package/dist/lib/functions/update_subscription.d.ts +83 -0
- package/dist/lib/functions/update_subscription.js +143 -0
- package/dist/lib/functions/update_subscription.js.map +1 -0
- package/dist/lib/functions/update_unlock.d.ts +13 -0
- package/dist/lib/functions/update_unlock.js +64 -0
- package/dist/lib/functions/update_unlock.js.map +1 -0
- package/dist/lib/functions/update_wallet.d.ts +19 -0
- package/dist/lib/functions/update_wallet.js +70 -0
- package/dist/lib/functions/update_wallet.js.map +1 -0
- package/dist/lib/functions/verify_android.d.ts +50 -0
- package/dist/lib/functions/verify_android.js +121 -0
- package/dist/lib/functions/verify_android.js.map +1 -0
- package/dist/lib/functions/verify_ios.d.ts +26 -0
- package/dist/lib/functions/verify_ios.js +110 -0
- package/dist/lib/functions/verify_ios.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_basic_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_basic_converter.js +25 -0
- package/dist/lib/model_field_value/converters/firestore_basic_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_enum_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_enum_converter.js +25 -0
- package/dist/lib/model_field_value/converters/firestore_enum_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_command_base_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_command_base_converter.js +38 -0
- package/dist/lib/model_field_value/converters/firestore_model_command_base_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_counter_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_counter_converter.js +78 -0
- package/dist/lib/model_field_value/converters/firestore_model_counter_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_date_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_date_converter.js +95 -0
- package/dist/lib/model_field_value/converters/firestore_model_date_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_geo_value_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_geo_value_converter.js +77 -0
- package/dist/lib/model_field_value/converters/firestore_model_geo_value_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_image_uri_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_image_uri_converter.js +74 -0
- package/dist/lib/model_field_value/converters/firestore_model_image_uri_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_locale_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_locale_converter.js +74 -0
- package/dist/lib/model_field_value/converters/firestore_model_locale_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_localized_value_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_localized_value_converter.js +36 -0
- package/dist/lib/model_field_value/converters/firestore_model_localized_value_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_ref_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_ref_converter.js +60 -0
- package/dist/lib/model_field_value/converters/firestore_model_ref_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_search_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_search_converter.js +36 -0
- package/dist/lib/model_field_value/converters/firestore_model_search_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_timestamp_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_timestamp_converter.js +95 -0
- package/dist/lib/model_field_value/converters/firestore_model_timestamp_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_token_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_token_converter.js +36 -0
- package/dist/lib/model_field_value/converters/firestore_model_token_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_uri_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_uri_converter.js +74 -0
- package/dist/lib/model_field_value/converters/firestore_model_uri_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_model_video_uri_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_model_video_uri_converter.js +74 -0
- package/dist/lib/model_field_value/converters/firestore_model_video_uri_converter.js.map +1 -0
- package/dist/lib/model_field_value/converters/firestore_null_converter.d.ts +20 -0
- package/dist/lib/model_field_value/converters/firestore_null_converter.js +25 -0
- package/dist/lib/model_field_value/converters/firestore_null_converter.js.map +1 -0
- package/dist/lib/model_field_value/default_firestore_model_field_value_converter.d.ts +8 -0
- package/dist/lib/model_field_value/default_firestore_model_field_value_converter.js +44 -0
- package/dist/lib/model_field_value/default_firestore_model_field_value_converter.js.map +1 -0
- package/dist/lib/model_field_value/firestore_model_field_value_converter.d.ts +140 -0
- package/dist/lib/model_field_value/firestore_model_field_value_converter.js +127 -0
- package/dist/lib/model_field_value/firestore_model_field_value_converter.js.map +1 -0
- package/dist/lib/model_field_value/model_field_value.d.ts +82 -0
- package/dist/lib/model_field_value/model_field_value.js +104 -0
- package/dist/lib/model_field_value/model_field_value.js.map +1 -0
- package/dist/lib/src/call_process_function_base.d.ts +39 -0
- package/dist/lib/src/call_process_function_base.js +69 -0
- package/dist/lib/src/call_process_function_base.js.map +1 -0
- package/dist/lib/src/functions_base.d.ts +195 -0
- package/dist/lib/src/functions_base.js +37 -0
- package/dist/lib/src/functions_base.js.map +1 -0
- package/dist/lib/src/functions_data.d.ts +10 -0
- package/dist/lib/src/functions_data.js +19 -0
- package/dist/lib/src/functions_data.js.map +1 -0
- package/dist/lib/src/request_process_function_base.d.ts +39 -0
- package/dist/lib/src/request_process_function_base.js +69 -0
- package/dist/lib/src/request_process_function_base.js.map +1 -0
- package/dist/lib/src/schedule_process_function_base.d.ts +33 -0
- package/dist/lib/src/schedule_process_function_base.js +70 -0
- package/dist/lib/src/schedule_process_function_base.js.map +1 -0
- package/dist/lib/src/sql_api_base.d.ts +185 -0
- package/dist/lib/src/sql_api_base.js +94 -0
- package/dist/lib/src/sql_api_base.js.map +1 -0
- package/dist/lib/utils.d.ts +21 -0
- package/dist/lib/utils.js +32 -1
- package/dist/lib/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { MemoryOption } from "firebase-functions/v2";
|
|
2
|
+
/**
|
|
3
|
+
* Define Function data for FirebaseFunctions.
|
|
4
|
+
*
|
|
5
|
+
* Write code to generate FirebaseFunctions at `build`.
|
|
6
|
+
*
|
|
7
|
+
* FirebaseFunctions用のFunctionのデータを定義を行うためのベースクラス。
|
|
8
|
+
*
|
|
9
|
+
* `build`にてFirebaseFunctionsを生成するためのコードを記述します。
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class FunctionsBase {
|
|
12
|
+
/**
|
|
13
|
+
* Define Function data for FirebaseFunctions.
|
|
14
|
+
*
|
|
15
|
+
* Write code to generate FirebaseFunctions at `build`.
|
|
16
|
+
*
|
|
17
|
+
* FirebaseFunctions用のFunctionのデータを定義を行うためのベースクラス。
|
|
18
|
+
*
|
|
19
|
+
* `build`にてFirebaseFunctionsを生成するためのコードを記述します。
|
|
20
|
+
*/
|
|
21
|
+
constructor({ id, func, data, options, }: {
|
|
22
|
+
id?: string | undefined | null;
|
|
23
|
+
func?: ((region: string[], options: FunctionsOptions, data: {
|
|
24
|
+
[key: string]: string;
|
|
25
|
+
}) => Function) | undefined | null;
|
|
26
|
+
data?: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
} | undefined | null;
|
|
29
|
+
options?: FunctionsOptions | undefined | null;
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* @param id
|
|
33
|
+
* Describe the method names used in Functions.
|
|
34
|
+
*
|
|
35
|
+
* Functionsで利用されるメソッド名を記述します。
|
|
36
|
+
*/
|
|
37
|
+
readonly id: string;
|
|
38
|
+
/**
|
|
39
|
+
* @param func
|
|
40
|
+
* Specify the actual contents of the process.
|
|
41
|
+
*
|
|
42
|
+
* 実際の処理の中身を指定します。
|
|
43
|
+
*/
|
|
44
|
+
readonly func: ((region: string[], options: FunctionsOptions, data: {
|
|
45
|
+
[key: string]: string;
|
|
46
|
+
}) => Function) | undefined | null;
|
|
47
|
+
/**
|
|
48
|
+
* Specify the data to be passed to the process.
|
|
49
|
+
*
|
|
50
|
+
* 処理に渡すデータを指定します。
|
|
51
|
+
*/
|
|
52
|
+
readonly data: {
|
|
53
|
+
[key: string]: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Specify processing options.
|
|
57
|
+
*
|
|
58
|
+
* 処理のオプションを指定します。
|
|
59
|
+
*/
|
|
60
|
+
readonly options: FunctionsOptions;
|
|
61
|
+
/**
|
|
62
|
+
* Write code to generate FirebaseFunctions.
|
|
63
|
+
*
|
|
64
|
+
* FirebaseFunctionsを生成するためのコードを記述します。
|
|
65
|
+
*/
|
|
66
|
+
abstract build(region: string[]): Function;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Specifies the options for the process.
|
|
70
|
+
*
|
|
71
|
+
* 処理のオプションを指定します。
|
|
72
|
+
*/
|
|
73
|
+
export interface SchedulerFunctionsOptions extends FunctionsOptions {
|
|
74
|
+
/**
|
|
75
|
+
* Specifies the schedule.
|
|
76
|
+
* * Cron format and AppEngine format are available.
|
|
77
|
+
* * For Cron format, specify as `5 11 * * *`.
|
|
78
|
+
* * For AppEngine format, specify as `every 1 minutes`.
|
|
79
|
+
*
|
|
80
|
+
* スケジュールを指定します。
|
|
81
|
+
* * Cron形式とAppEngine形式で指定可能です。
|
|
82
|
+
* * Cron形式の場合は、`5 11 * * *`のように指定します。
|
|
83
|
+
* * AppEngine形式の場合は、`every 1 minutes`のように指定します。
|
|
84
|
+
*/
|
|
85
|
+
schedule?: string | undefined | null;
|
|
86
|
+
/**
|
|
87
|
+
* Specifies an alternate region.
|
|
88
|
+
*
|
|
89
|
+
* 代替のリージョンを指定します。
|
|
90
|
+
*/
|
|
91
|
+
region?: string | null;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Specifies the options for the process.
|
|
95
|
+
*
|
|
96
|
+
* 処理のオプションを指定します。
|
|
97
|
+
*/
|
|
98
|
+
export interface PathFunctionsOptions extends FunctionsOptions {
|
|
99
|
+
/**
|
|
100
|
+
* Specify the path to the target database.
|
|
101
|
+
*
|
|
102
|
+
* 対象のデータベースのパスを指定します。
|
|
103
|
+
*/
|
|
104
|
+
path?: string | undefined | null;
|
|
105
|
+
/**
|
|
106
|
+
* Specifies an alternate region.
|
|
107
|
+
*
|
|
108
|
+
* 代替のリージョンを指定します。
|
|
109
|
+
*/
|
|
110
|
+
region?: string | null;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Specifies the options for the process.
|
|
114
|
+
*
|
|
115
|
+
* 処理のオプションを指定します。
|
|
116
|
+
*/
|
|
117
|
+
export interface PubsubFunctionsOptions extends FunctionsOptions {
|
|
118
|
+
/**
|
|
119
|
+
* Specifies the topic.
|
|
120
|
+
* You can create a `purchasing` topic in GCP's pub/sub and set the principal to "google-play-developer-notifications@system.gserviceaccount.com" to receive notifications.
|
|
121
|
+
*
|
|
122
|
+
* トピックを指定します。
|
|
123
|
+
* GCPのpub/subに`purchasing`のトピックを作成しプリンシパルに「google-play-developer-notifications@system.gserviceaccount.com」を設定することで通知を受け取ることができるようになります。
|
|
124
|
+
*/
|
|
125
|
+
topic?: string | undefined | null;
|
|
126
|
+
/**
|
|
127
|
+
* Specifies an alternate region.
|
|
128
|
+
*
|
|
129
|
+
* 代替のリージョンを指定します。
|
|
130
|
+
*/
|
|
131
|
+
region?: string | null;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Specifies the options for the process.
|
|
135
|
+
*
|
|
136
|
+
* 処理のオプションを指定します。
|
|
137
|
+
*/
|
|
138
|
+
export interface HttpFunctionsOptions extends FunctionsOptions {
|
|
139
|
+
/**
|
|
140
|
+
* Specifies an alternate region.
|
|
141
|
+
*
|
|
142
|
+
* 代替のリージョンを指定します。
|
|
143
|
+
*/
|
|
144
|
+
region?: string | string[] | null;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Specifies the options for the process.
|
|
148
|
+
*
|
|
149
|
+
* 処理のオプションを指定します。
|
|
150
|
+
*/
|
|
151
|
+
export interface StorageFunctionsOptions extends FunctionsOptions {
|
|
152
|
+
/**
|
|
153
|
+
* Specifies an alternate region.
|
|
154
|
+
*
|
|
155
|
+
* 代替のリージョンを指定します。
|
|
156
|
+
*/
|
|
157
|
+
region?: string | null;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Specifies the options for the process.
|
|
161
|
+
*
|
|
162
|
+
* 処理のオプションを指定します。
|
|
163
|
+
*/
|
|
164
|
+
export interface FunctionsOptions {
|
|
165
|
+
/**
|
|
166
|
+
* Specifies the timeout period.
|
|
167
|
+
*
|
|
168
|
+
* タイムアウト時間を指定します。
|
|
169
|
+
*/
|
|
170
|
+
timeoutSeconds?: number | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* Specifies the memory.
|
|
173
|
+
*
|
|
174
|
+
* メモリを指定します。
|
|
175
|
+
*/
|
|
176
|
+
memory?: MemoryOption | undefined;
|
|
177
|
+
/**
|
|
178
|
+
* Specifies the minInstances.
|
|
179
|
+
*
|
|
180
|
+
* minInstancesを指定します。
|
|
181
|
+
*/
|
|
182
|
+
minInstances?: number | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* Specifies the maxInstances.
|
|
185
|
+
*
|
|
186
|
+
* maxInstancesを指定します。
|
|
187
|
+
*/
|
|
188
|
+
maxInstances?: number | undefined;
|
|
189
|
+
/**
|
|
190
|
+
* Specifies the concurrency.
|
|
191
|
+
*
|
|
192
|
+
* concurrencyを指定します。
|
|
193
|
+
*/
|
|
194
|
+
concurrency?: number | undefined;
|
|
195
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FunctionsBase = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Define Function data for FirebaseFunctions.
|
|
6
|
+
*
|
|
7
|
+
* Write code to generate FirebaseFunctions at `build`.
|
|
8
|
+
*
|
|
9
|
+
* FirebaseFunctions用のFunctionのデータを定義を行うためのベースクラス。
|
|
10
|
+
*
|
|
11
|
+
* `build`にてFirebaseFunctionsを生成するためのコードを記述します。
|
|
12
|
+
*/
|
|
13
|
+
class FunctionsBase {
|
|
14
|
+
/**
|
|
15
|
+
* Define Function data for FirebaseFunctions.
|
|
16
|
+
*
|
|
17
|
+
* Write code to generate FirebaseFunctions at `build`.
|
|
18
|
+
*
|
|
19
|
+
* FirebaseFunctions用のFunctionのデータを定義を行うためのベースクラス。
|
|
20
|
+
*
|
|
21
|
+
* `build`にてFirebaseFunctionsを生成するためのコードを記述します。
|
|
22
|
+
*/
|
|
23
|
+
constructor({ id, func, data = {}, options, }) {
|
|
24
|
+
this.id = id !== null && id !== void 0 ? id : "";
|
|
25
|
+
this.func = func;
|
|
26
|
+
this.data = data !== null && data !== void 0 ? data : {};
|
|
27
|
+
this.options = options !== null && options !== void 0 ? options : {
|
|
28
|
+
timeoutSeconds: 60,
|
|
29
|
+
memory: "256MiB",
|
|
30
|
+
minInstances: 0,
|
|
31
|
+
concurrency: 80,
|
|
32
|
+
maxInstances: 100,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.FunctionsBase = FunctionsBase;
|
|
37
|
+
//# sourceMappingURL=functions_base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions_base.js","sourceRoot":"","sources":["../../../src/lib/src/functions_base.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;GAQG;AACH,MAAsB,aAAa;IAC/B;;;;;;;;OAQG;IACH,YAAY,EACR,EAAE,EACF,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,OAAO,GAUV;QACG,IAAI,CAAC,EAAE,GAAG,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,EAAE,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI;YACtB,cAAc,EAAE,EAAE;YAClB,MAAM,EAAE,QAAQ;YAChB,YAAY,EAAE,CAAC;YACf,WAAW,EAAE,EAAE;YACf,YAAY,EAAE,GAAG;SACpB,CAAC;IACN,CAAC;CA0CJ;AA7ED,sCA6EC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FunctionsBase } from "./functions_base";
|
|
2
|
+
export { FunctionsOptions, SchedulerFunctionsOptions, PubsubFunctionsOptions, PathFunctionsOptions } from "./functions_base";
|
|
3
|
+
/**
|
|
4
|
+
* Define Function data for FirebaseFunctions.
|
|
5
|
+
*
|
|
6
|
+
* FirebaseFunctions用のFunctionのデータを定義します。
|
|
7
|
+
*/
|
|
8
|
+
export declare class FunctionsData extends FunctionsBase {
|
|
9
|
+
build(region: string[]): Function;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FunctionsData = void 0;
|
|
4
|
+
const functions_base_1 = require("./functions_base");
|
|
5
|
+
/**
|
|
6
|
+
* Define Function data for FirebaseFunctions.
|
|
7
|
+
*
|
|
8
|
+
* FirebaseFunctions用のFunctionのデータを定義します。
|
|
9
|
+
*/
|
|
10
|
+
class FunctionsData extends functions_base_1.FunctionsBase {
|
|
11
|
+
build(region) {
|
|
12
|
+
if (!this.func) {
|
|
13
|
+
return () => { };
|
|
14
|
+
}
|
|
15
|
+
return this.func(region, this.options, this.data);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.FunctionsData = FunctionsData;
|
|
19
|
+
//# sourceMappingURL=functions_data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions_data.js","sourceRoot":"","sources":["../../../src/lib/src/functions_data.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAGjD;;;;GAIG;AACH,MAAa,aAAc,SAAQ,8BAAa;IAC9C,KAAK,CAAC,MAAgB;QACpB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC;QACnB,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CACd,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,IAAI,CACV,CAAC;IACJ,CAAC;CACF;AAXD,sCAWC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as functions from "firebase-functions/v2";
|
|
2
|
+
import { FunctionsBase, HttpFunctionsOptions } from "./functions_base";
|
|
3
|
+
import * as express from "express";
|
|
4
|
+
export { Request } from "firebase-functions/v2/https";
|
|
5
|
+
export { Response } from "express";
|
|
6
|
+
/**
|
|
7
|
+
* Base class for defining Function data for HTTP request execution.
|
|
8
|
+
*
|
|
9
|
+
* HTTPリクエスト実行用のFunctionのデータを定義するためのベースクラス。
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class RequestProcessFunctionBase extends FunctionsBase {
|
|
12
|
+
/**
|
|
13
|
+
* Base class for defining Function data for HTTP request execution.
|
|
14
|
+
*
|
|
15
|
+
* HTTPリクエスト実行用のFunctionのデータを定義するためのベースクラス。
|
|
16
|
+
*/
|
|
17
|
+
constructor(options?: HttpFunctionsOptions);
|
|
18
|
+
/**
|
|
19
|
+
* Specify the actual contents of the process.
|
|
20
|
+
*
|
|
21
|
+
* 実際の処理の中身を指定します。
|
|
22
|
+
*
|
|
23
|
+
* @param reqest
|
|
24
|
+
* Request passed to Functions.
|
|
25
|
+
*
|
|
26
|
+
* Functionsに渡されたRequest。
|
|
27
|
+
*
|
|
28
|
+
* @param response
|
|
29
|
+
* Response passed to Functions.
|
|
30
|
+
*
|
|
31
|
+
* Functionsに渡されたResponse。
|
|
32
|
+
*/
|
|
33
|
+
abstract process(reqest: functions.https.Request, response: express.Response<any>): Promise<void>;
|
|
34
|
+
abstract id: string;
|
|
35
|
+
data: {
|
|
36
|
+
[key: string]: string;
|
|
37
|
+
};
|
|
38
|
+
build(regions: string[]): Function;
|
|
39
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.RequestProcessFunctionBase = void 0;
|
|
36
|
+
const functions = __importStar(require("firebase-functions/v2"));
|
|
37
|
+
const functions_base_1 = require("./functions_base");
|
|
38
|
+
/**
|
|
39
|
+
* Base class for defining Function data for HTTP request execution.
|
|
40
|
+
*
|
|
41
|
+
* HTTPリクエスト実行用のFunctionのデータを定義するためのベースクラス。
|
|
42
|
+
*/
|
|
43
|
+
class RequestProcessFunctionBase extends functions_base_1.FunctionsBase {
|
|
44
|
+
/**
|
|
45
|
+
* Base class for defining Function data for HTTP request execution.
|
|
46
|
+
*
|
|
47
|
+
* HTTPリクエスト実行用のFunctionのデータを定義するためのベースクラス。
|
|
48
|
+
*/
|
|
49
|
+
constructor(options = {}) {
|
|
50
|
+
super({ options: options });
|
|
51
|
+
this.data = {};
|
|
52
|
+
}
|
|
53
|
+
build(regions) {
|
|
54
|
+
var _a;
|
|
55
|
+
const options = this.options;
|
|
56
|
+
return functions.https.onRequest({
|
|
57
|
+
region: (_a = options === null || options === void 0 ? void 0 : options.region) !== null && _a !== void 0 ? _a : regions,
|
|
58
|
+
timeoutSeconds: options === null || options === void 0 ? void 0 : options.timeoutSeconds,
|
|
59
|
+
memory: options === null || options === void 0 ? void 0 : options.memory,
|
|
60
|
+
minInstances: options === null || options === void 0 ? void 0 : options.minInstances,
|
|
61
|
+
concurrency: options === null || options === void 0 ? void 0 : options.concurrency,
|
|
62
|
+
maxInstances: options === null || options === void 0 ? void 0 : options.maxInstances,
|
|
63
|
+
}, (req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
return this.process(req, res);
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.RequestProcessFunctionBase = RequestProcessFunctionBase;
|
|
69
|
+
//# sourceMappingURL=request_process_function_base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request_process_function_base.js","sourceRoot":"","sources":["../../../src/lib/src/request_process_function_base.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;AACnD,qDAAuE;AAKvE;;;;GAIG;AACH,MAAsB,0BAA2B,SAAQ,8BAAa;IAClE;;;;OAIG;IACH,YAAY,UAAgC,EAAE;QAC1C,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAqBhC,SAAI,GAA8B,EAAE,CAAC;IApBrC,CAAC;IAqBD,KAAK,CAAC,OAAiB;;QACnB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAkD,CAAC;QACxE,OAAO,SAAS,CAAC,KAAK,CAAC,SAAS,CAC5B;YACI,MAAM,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,mCAAI,OAAO;YAClC,cAAc,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc;YACvC,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM;YACvB,YAAY,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY;YACnC,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW;YACjC,YAAY,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY;SACtC,EACD,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;YACf,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAClC,CAAC,CAAA,CACJ,CAAC;IACN,CAAC;CACJ;AA7CD,gEA6CC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FunctionsBase, SchedulerFunctionsOptions } from "./functions_base";
|
|
2
|
+
/**
|
|
3
|
+
* Base class for defining the data of Functions for periodic scheduled execution.
|
|
4
|
+
*
|
|
5
|
+
* 定期スケジュール実行用のFunctionのデータを定義するためのベースクラス。
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class ScheduleProcessFunctionBase extends FunctionsBase {
|
|
8
|
+
/**
|
|
9
|
+
* Base class for defining the data of Functions for periodic scheduled execution.
|
|
10
|
+
*
|
|
11
|
+
* 定期スケジュール実行用のFunctionのデータを定義するためのベースクラス。
|
|
12
|
+
*/
|
|
13
|
+
constructor(options?: SchedulerFunctionsOptions);
|
|
14
|
+
/**
|
|
15
|
+
* Specify the schedule to execute the process in cron format.
|
|
16
|
+
*
|
|
17
|
+
* 処理を実行するスケジュールをcron形式で指定します。
|
|
18
|
+
*
|
|
19
|
+
* https://firebase.google.com/docs/functions/schedule-functions
|
|
20
|
+
*/
|
|
21
|
+
abstract schedule: string;
|
|
22
|
+
/**
|
|
23
|
+
* Specify the actual contents of the process.
|
|
24
|
+
*
|
|
25
|
+
* 実際の処理の中身を指定します。
|
|
26
|
+
*/
|
|
27
|
+
abstract process(): Promise<void>;
|
|
28
|
+
abstract id: string;
|
|
29
|
+
data: {
|
|
30
|
+
[key: string]: string;
|
|
31
|
+
};
|
|
32
|
+
build(regions: string[]): Function;
|
|
33
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.ScheduleProcessFunctionBase = void 0;
|
|
36
|
+
const functions = __importStar(require("firebase-functions/v2"));
|
|
37
|
+
const functions_base_1 = require("./functions_base");
|
|
38
|
+
/**
|
|
39
|
+
* Base class for defining the data of Functions for periodic scheduled execution.
|
|
40
|
+
*
|
|
41
|
+
* 定期スケジュール実行用のFunctionのデータを定義するためのベースクラス。
|
|
42
|
+
*/
|
|
43
|
+
class ScheduleProcessFunctionBase extends functions_base_1.FunctionsBase {
|
|
44
|
+
/**
|
|
45
|
+
* Base class for defining the data of Functions for periodic scheduled execution.
|
|
46
|
+
*
|
|
47
|
+
* 定期スケジュール実行用のFunctionのデータを定義するためのベースクラス。
|
|
48
|
+
*/
|
|
49
|
+
constructor(options = {}) {
|
|
50
|
+
super({ options: options });
|
|
51
|
+
this.data = {};
|
|
52
|
+
}
|
|
53
|
+
build(regions) {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
const options = this.options;
|
|
56
|
+
return functions.scheduler.onSchedule({
|
|
57
|
+
schedule: (_a = options === null || options === void 0 ? void 0 : options.schedule) !== null && _a !== void 0 ? _a : this.schedule,
|
|
58
|
+
region: (_b = options === null || options === void 0 ? void 0 : options.region) !== null && _b !== void 0 ? _b : regions[0],
|
|
59
|
+
timeoutSeconds: options === null || options === void 0 ? void 0 : options.timeoutSeconds,
|
|
60
|
+
memory: options === null || options === void 0 ? void 0 : options.memory,
|
|
61
|
+
minInstances: options === null || options === void 0 ? void 0 : options.minInstances,
|
|
62
|
+
concurrency: options === null || options === void 0 ? void 0 : options.concurrency,
|
|
63
|
+
maxInstances: options === null || options === void 0 ? void 0 : options.maxInstances,
|
|
64
|
+
}, (event) => __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
return this.process();
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.ScheduleProcessFunctionBase = ScheduleProcessFunctionBase;
|
|
70
|
+
//# sourceMappingURL=schedule_process_function_base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule_process_function_base.js","sourceRoot":"","sources":["../../../src/lib/src/schedule_process_function_base.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;AACnD,qDAA4E;AAE5E;;;;GAIG;AACH,MAAsB,2BAA4B,SAAQ,8BAAa;IACnE;;;;OAIG;IACH,YAAY,UAAqC,EAAE;QAC/C,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAoBhC,SAAI,GAA8B,EAAE,CAAC;IAnBrC,CAAC;IAoBD,KAAK,CAAC,OAAiB;;QACnB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAuD,CAAC;QAC7E,OAAO,SAAS,CAAC,SAAS,CAAC,UAAU,CACjC;YACI,QAAQ,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,IAAI,CAAC,QAAQ;YAC5C,MAAM,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,mCAAI,OAAO,CAAC,CAAC,CAAC;YACrC,cAAc,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc;YACvC,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM;YACvB,YAAY,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY;YACnC,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW;YACjC,YAAY,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY;SACtC,EACD,CAAO,KAAK,EAAE,EAAE;YACZ,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;QAC1B,CAAC,CAAA,CACJ,CAAC;IACN,CAAC;CACJ;AA7CD,kEA6CC"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for the API's model.
|
|
3
|
+
*
|
|
4
|
+
* Inherit this to create a model for the API.
|
|
5
|
+
*
|
|
6
|
+
* APIのモデルの基底クラス。
|
|
7
|
+
*
|
|
8
|
+
* これを継承してAPIのモデルを作成します。
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class SqlApiModelBase {
|
|
11
|
+
/**
|
|
12
|
+
* Convert [SqlApiModelBase] to a format that can be handled by Json.
|
|
13
|
+
*
|
|
14
|
+
* [SqlApiModelBase]をJsonで扱える形式に変換します。
|
|
15
|
+
*
|
|
16
|
+
* @returns {{ [key: string]: any }}
|
|
17
|
+
* Json format.
|
|
18
|
+
*
|
|
19
|
+
* Json形式。
|
|
20
|
+
*/
|
|
21
|
+
abstract toJson(): {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Base class for the API.
|
|
27
|
+
*
|
|
28
|
+
* Inherit this to create an API.
|
|
29
|
+
*
|
|
30
|
+
* APIの基底クラス。
|
|
31
|
+
*
|
|
32
|
+
* これを継承してAPIを作成します。
|
|
33
|
+
*/
|
|
34
|
+
export declare abstract class SqlApiBase<T extends SqlApiModelBase> {
|
|
35
|
+
/**
|
|
36
|
+
* Name of table to be used.
|
|
37
|
+
*
|
|
38
|
+
* 使用するテーブル名。
|
|
39
|
+
*/
|
|
40
|
+
abstract table: string;
|
|
41
|
+
/**
|
|
42
|
+
* Get the data from the table.
|
|
43
|
+
*
|
|
44
|
+
* テーブルからデータを取得します。
|
|
45
|
+
*
|
|
46
|
+
* @param {{ [key: string]: any }[]} where
|
|
47
|
+
* Specify the conditions for retrieving data from Sql.
|
|
48
|
+
*
|
|
49
|
+
* Sqlからデータを取得するための条件を指定します。
|
|
50
|
+
*
|
|
51
|
+
* @returns {Promise<T[]>}
|
|
52
|
+
* Data from the table.
|
|
53
|
+
*
|
|
54
|
+
* テーブルからのデータ。
|
|
55
|
+
*/
|
|
56
|
+
abstract get(where: {
|
|
57
|
+
[key: string]: any;
|
|
58
|
+
}[]): Promise<T[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Get the number of records matching [where].
|
|
61
|
+
*
|
|
62
|
+
* [where]に一致するレコードの数を取得します。
|
|
63
|
+
*
|
|
64
|
+
* @param {{ [key: string]: any }[]} where
|
|
65
|
+
* Specify the conditions for retrieving data from Sql.
|
|
66
|
+
*
|
|
67
|
+
* Sqlからデータを取得するための条件を指定します。
|
|
68
|
+
*
|
|
69
|
+
* @returns {Promise<number>}
|
|
70
|
+
* Number of records matching [where].
|
|
71
|
+
*
|
|
72
|
+
* [where]に一致するレコードの数。
|
|
73
|
+
*/
|
|
74
|
+
abstract count(where: {
|
|
75
|
+
[key: string]: any;
|
|
76
|
+
}[]): Promise<number>;
|
|
77
|
+
/**
|
|
78
|
+
* Add data to the table.
|
|
79
|
+
*
|
|
80
|
+
* テーブルにデータを追加します。
|
|
81
|
+
*
|
|
82
|
+
* @param {{ [key: string]: any }} value
|
|
83
|
+
* Data to be added to the table.
|
|
84
|
+
*
|
|
85
|
+
* テーブルに追加するデータ。
|
|
86
|
+
*
|
|
87
|
+
* @param {{ [key: string]: any }[]} where
|
|
88
|
+
* Specify the conditions for adding data from Sql.
|
|
89
|
+
*
|
|
90
|
+
* Sqlからデータを追加するための条件を指定します。
|
|
91
|
+
*
|
|
92
|
+
* @returns {Promise<T>}
|
|
93
|
+
* Data added to the table.
|
|
94
|
+
*
|
|
95
|
+
* テーブルに追加されたデータ。
|
|
96
|
+
*/
|
|
97
|
+
abstract post(value: {
|
|
98
|
+
[key: string]: any;
|
|
99
|
+
}, where: {
|
|
100
|
+
[key: string]: any;
|
|
101
|
+
}[]): Promise<T>;
|
|
102
|
+
/**
|
|
103
|
+
* Update the data in the table.
|
|
104
|
+
*
|
|
105
|
+
* テーブルのデータを更新します。
|
|
106
|
+
*
|
|
107
|
+
* @param {{ [key: string]: any }} value
|
|
108
|
+
* Data to be updated in the table.
|
|
109
|
+
*
|
|
110
|
+
* テーブルの更新するデータ。
|
|
111
|
+
*
|
|
112
|
+
* @param {{ [key: string]: any }[]} where
|
|
113
|
+
* Specify the conditions for updating data from Sql.
|
|
114
|
+
*
|
|
115
|
+
* Sqlからデータを更新するための条件を指定します。
|
|
116
|
+
*
|
|
117
|
+
* @returns {Promise<T>}
|
|
118
|
+
* Updated data for the table.
|
|
119
|
+
*
|
|
120
|
+
* テーブルの更新されたデータ。
|
|
121
|
+
*/
|
|
122
|
+
abstract put(value: {
|
|
123
|
+
[key: string]: any;
|
|
124
|
+
}, where: {
|
|
125
|
+
[key: string]: any;
|
|
126
|
+
}[]): Promise<T>;
|
|
127
|
+
/**
|
|
128
|
+
* Deletes data from the table.
|
|
129
|
+
*
|
|
130
|
+
* テーブルからデータを削除します。
|
|
131
|
+
*
|
|
132
|
+
* @param { [key: string]: any }[] where
|
|
133
|
+
* Specify the conditions for deleting data from Sql.
|
|
134
|
+
*
|
|
135
|
+
* Sqlからデータを削除するための条件を指定します。
|
|
136
|
+
*
|
|
137
|
+
* @returns {Promise<void>}
|
|
138
|
+
*/
|
|
139
|
+
abstract delete(where: {
|
|
140
|
+
[key: string]: any;
|
|
141
|
+
}[]): Promise<void>;
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @param {string} table
|
|
145
|
+
* Table Name.
|
|
146
|
+
*
|
|
147
|
+
* テーブル名。
|
|
148
|
+
*
|
|
149
|
+
* @param {"GET" | "POST" | "DELETE" | "PUT" | "COUNT"} method
|
|
150
|
+
* Specify the method to be used.
|
|
151
|
+
*
|
|
152
|
+
* 使用するメソッドを指定します。
|
|
153
|
+
*
|
|
154
|
+
* @param {{ [key: string]: any }[]} where
|
|
155
|
+
* Specify the conditions for retrieving data from Sql.
|
|
156
|
+
*
|
|
157
|
+
* Sqlからデータを取得するための条件を指定します。
|
|
158
|
+
*
|
|
159
|
+
* @param {{ [key: string]: any } | undefined} value
|
|
160
|
+
* Data to be added to the table.
|
|
161
|
+
*
|
|
162
|
+
* テーブルに追加するデータ。
|
|
163
|
+
*
|
|
164
|
+
* @returns {Promise<{ [key: string]: any }[] | number | null>}
|
|
165
|
+
* When [null] is returned, the condition is not met.
|
|
166
|
+
*
|
|
167
|
+
* Otherwise, it returns the retrieved data.
|
|
168
|
+
*
|
|
169
|
+
* [null]が返却されたときは条件に一致しないとき。
|
|
170
|
+
*
|
|
171
|
+
* その他の場合は取得されたデータを返します。
|
|
172
|
+
*/
|
|
173
|
+
process({ table, method, where, value, }: {
|
|
174
|
+
table: string;
|
|
175
|
+
method: "GET" | "POST" | "DELETE" | "PUT" | "COUNT";
|
|
176
|
+
where?: {
|
|
177
|
+
[key: string]: any;
|
|
178
|
+
}[] | undefined;
|
|
179
|
+
value?: {
|
|
180
|
+
[key: string]: any;
|
|
181
|
+
} | undefined;
|
|
182
|
+
}): Promise<{
|
|
183
|
+
[key: string]: any;
|
|
184
|
+
}[] | number | null>;
|
|
185
|
+
}
|