-
Notifications
You must be signed in to change notification settings - Fork 15
/
extension.yaml
175 lines (156 loc) · 6.77 KB
/
extension.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# Copyright 2022 Meilisearch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Identifier for your extension
name: firestore-meilisearch
# Follow semver versioning
version: 0.3.0
# Version of the Firebase Extensions specification
specVersion: v1beta
# Friendly display name for your extension (~3-5 words)
displayName: Search with Meilisearch
# Brief description of the task your extension performs (~1 sentence)
description: >-
Full-text Search on Firebase with Meilisearch
license: Apache-2.0 # https://spdx.org/licenses/
# Public URL for the source code of your extension
sourceUrl: https://github.com/meilisearch/firestore-meilisearch
releaseNotesUrl: https://github.com/meilisearch/firestore-meilisearch/releases
author:
authorName: Meilisearch
email: [email protected]
url: https://meilisearch.com
# Specify whether a paid-tier billing plan is required to use your extension.
# Learn more in the docs: https://firebase.google.com/docs/extensions/alpha/ref-extension-yaml#billing-required-field
billingRequired: true
# In an `apis` field, list any Google APIs (like Cloud Translation, BigQuery, etc.)
# required for your extension to operate.
# Learn more in the docs: https://firebase.google.com/docs/extensions/alpha/ref-extension-yaml#apis-field
# In a `roles` field, list any IAM access roles required for your extension to operate.
# Learn more in the docs: https://firebase.google.com/docs/extensions/alpha/ref-extension-yaml#roles-field
# In the `resources` field, list each of your extension's functions, including the trigger for each function.
# Learn more in the docs: https://firebase.google.com/docs/extensions/alpha/ref-extension-yaml#resources-field
resources:
- name: indexingWorker
type: firebaseextensions.v1beta.function
description: >-
Cloud function triggered by document modification in Firestore to import changes into Meilisearch.
properties:
# LOCATION is a user-configured parameter value specified by the user
# during installation.
location: ${LOCATION}
runtime: nodejs20
eventTrigger:
eventType: providers/cloud.firestore/eventTypes/document.write
resource: projects/${PROJECT_ID}/databases/(default)/documents/${COLLECTION_PATH}/{documentID}
# In the `params` field, set up your extension's user-configured parameters.
# Learn more in the docs: https://firebase.google.com/docs/extensions/alpha/ref-extension-yaml#params-field
params:
- param: LOCATION
label: Cloud Functions location
description: >-
Where do you want to deploy the functions created for this extension?
If you need help selecting a location, refer to the [location selection
guide](https://firebase.google.com/docs/functions/locations).
type: select
options:
- label: Iowa (us-central1)
value: us-central1
- label: South Carolina (us-east1)
value: us-east1
- label: Northern Virginia (us-east4)
value: us-east4
- label: Los Angeles (us-west2)
value: us-west2
- label: Salt Lake City (us-west3)
value: us-west3
- label: Las Vegas (us-west4)
value: us-west4
- label: Warsaw (europe-central2)
value: europe-central2
- label: Belgium (europe-west1)
value: europe-west1
- label: London (europe-west2)
value: europe-west2
- label: Frankfurt (europe-west3)
value: europe-west3
- label: Zurich (europe-west6)
value: europe-west6
- label: Hong Kong (asia-east2)
value: asia-east2
- label: Tokyo (asia-northeast1)
value: asia-northeast1
- label: Osaka (asia-northeast2)
value: asia-northeast2
- label: Seoul (asia-northeast3)
value: asia-northeast3
- label: Mumbai (asia-south1)
value: asia-south1
- label: Jakarta (asia-southeast2)
value: asia-southeast2
- label: Montreal (northamerica-northeast1)
value: northamerica-northeast1
- label: Sao Paulo (southamerica-east1)
value: southamerica-east1
- label: Sydney (australia-southeast1)
value: australia-southeast1
required: true
immutable: true
- param: COLLECTION_PATH
label: Collection path
description: >-
What is the path of the collection you would like to export into Meilisearch?
example: "example: my_collection"
type: string
validationRegex: "^[^/]+(/[^/]+/[^/]+)*$"
validationErrorMessage: Must be a valid Cloud Firestore Collection.
required: true
- param: MEILISEARCH_FIELDS_TO_INDEX
label: Fields to index in Meilisearch
description: >-
What fields do you want to index in Meilisearch?
Create a comma-separated list of the field names, or leave it blank to include all fields.
The id field is always indexed even when omitted from the list.
default: ""
example: "example: name,description,..."
validationRegex: "^[^,]?[a-zA-Z-_0-9,]*[^,]$"
validationErrorMessage: Fields must be given through a comma-separated list.
required: false
- param: MEILISEARCH_INDEX_NAME
label: Meilisearch Index Name
description: >-
What Meilisearch index do you want to index your data in?
type: string
example: "example: my_index"
validationRegex: "^[0-9A-Za-z_-]+$"
validationErrorMessage: Must be a valid Index format.
Index uid can be of type integer or string only composed of alphanumeric characters, hyphens (-) and underscores (_).
Check out our guide on [index creation](https://docs.meilisearch.com/learn/core_concepts/indexes.html#index-creation).
required: true
- param: MEILISEARCH_HOST
label: Meilisearch host
description: >-
What is the URL of the host of your Meilisearch database?
Make sure your URL starts with `http://` or `https://`
type: string
example: "example: my-meilisearch-host.com"
required: true
- param: MEILISEARCH_API_KEY
label: Meilisearch API key
description: >-
What is your Meilisearch API key with permission to perform actions on indexes?
Both the API keys and the master key are valid choices but we strongly recommend using an API key for security purposes.
Check out our guide on [security](https://docs.meilisearch.com/learn/security/master_api_keys.html).
type: secret
example: "example: my_secret_api_key"
required: false