Skip to content

Commit 52088de

Browse files
committed
build: update extension.yaml for new env params
1 parent b4f13cc commit 52088de

File tree

1 file changed

+49
-36
lines changed

1 file changed

+49
-36
lines changed

extension.yaml

Lines changed: 49 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ resources:
3434
- attribute: database
3535
value: ${DATABASE}
3636
- attribute: document
37-
value: ${FIRESTORE_COLLECTION_PATH}/{documentID}
37+
value: ${FIRESTORE_COLLECTION_PATHS}/{documentID}
3838
operator: match-path-pattern
3939

4040
- name: backfill
@@ -101,13 +101,13 @@ params:
101101
value: northamerica-northeast1
102102
- label: northamerica-northeast2 (Toronto)
103103
value: northamerica-northeast2
104-
104+
105105
# South America
106106
- label: southamerica-east1 (Sao Paulo)
107107
value: southamerica-east1
108108
- label: southamerica-west1 (Santiago)
109109
value: southamerica-west1
110-
110+
111111
# Europe
112112
- label: europe-north1 (Finland)
113113
value: europe-north1
@@ -133,15 +133,15 @@ params:
133133
value: europe-central2
134134
- label: europe-southwest1 (Madrid)
135135
value: europe-southwest1
136-
136+
137137
# Middle East
138138
- label: me-central1 (Doha)
139139
value: me-central1
140140
- label: me-central2 (Dammam)
141141
value: me-central2
142142
- label: me-west1 (Tel Aviv)
143143
value: me-west1
144-
144+
145145
# Asia
146146
- label: asia-east1 (Taiwan)
147147
value: asia-east1
@@ -161,7 +161,7 @@ params:
161161
value: asia-southeast1
162162
- label: asia-southeast2 (Jakarta)
163163
value: asia-southeast2
164-
164+
165165
# Australia
166166
- label: australia-southeast1 (Sydney)
167167
value: australia-southeast1
@@ -285,22 +285,53 @@ params:
285285
default: "(default)"
286286
required: false
287287

288-
- param: FIRESTORE_COLLECTION_PATH
289-
label: Firestore Collection Path
288+
- param: FIRESTORE_COLLECTION_PATHS
289+
label: Firestore Collection Paths
290+
description: >-
291+
Comma-separated list of Firestore collection paths to index into Typesense.
292+
Supports both regular collections and subcollections with path parameters (e.g., "users/{userId}/books").
293+
example: users,products,users/{userId}/books,stores/{storeId}/products
294+
validationRegex: "^[^,]+(?:,[^,]+)*$"
295+
validationErrorMessage: Collection paths must be comma-separated without spaces.
296+
default: users,products
297+
required: true
298+
299+
- param: TYPESENSE_COLLECTION_NAMES
300+
label: Typesense Collection Names
290301
description: >-
291-
The Firestore collection that needs to be indexed into Typesense.
292-
example: path/to/firestore_collection
293-
validationRegex: "^[^/]+(/[^/]+/[^/]+)*$"
294-
validationErrorMessage: Firestore collection paths must be an odd number of segments separated by slashes, e.g. "path/to/firestore_collection".
295-
default: path/to/firestore_collection
302+
Comma-separated list of Typesense collection names corresponding to the Firestore collection paths.
303+
The order must match the FIRESTORE_COLLECTION_PATHS parameter.
304+
example: users,products,user_books,store_products
305+
validationRegex: "^[^,]+(?:,[^,]+)*$"
306+
validationErrorMessage: Collection names must be comma-separated without spaces.
307+
default: users,products
296308
required: true
297-
- param: FIRESTORE_COLLECTION_FIELDS
298-
label: Firestore Collection Fields
309+
310+
- param: FIRESTORE_COLLECTION_FIELDS_LIST
311+
label: Firestore Collection Fields List
299312
description: >-
300-
A comma separated list of fields that need to be indexed from each Firestore document. Leave blank to index all fields.
301-
example: field1,field2,field3
313+
Pipe-separated list of comma-separated field lists for each collection.
314+
Each field list corresponds to a collection in FIRESTORE_COLLECTION_PATHS.
315+
Leave empty or use "||" to skip fields for a collection.
316+
example: name,email,profile|title,description,price||name,email|title,description
302317
default: ""
303318
required: false
319+
320+
- param: FLATTEN_NESTED_DOCUMENTS_LIST
321+
label: Flatten Nested Documents List
322+
description: >-
323+
Comma-separated list of boolean values indicating whether to flatten nested documents for each collection.
324+
Each value corresponds to a collection in FIRESTORE_COLLECTION_PATHS.
325+
type: select
326+
options:
327+
- label: No
328+
value: false
329+
- label: Yes
330+
value: true
331+
example: false,true,false,true
332+
default: false,true
333+
required: false
334+
304335
- param: TYPESENSE_HOSTS
305336
label: Typesense Hosts
306337
description: >-
@@ -317,25 +348,7 @@ params:
317348
Click on "Generate API Key" in cluster dashboard in Typesense Cloud
318349
example: ""
319350
required: true
320-
- param: TYPESENSE_COLLECTION_NAME
321-
label: Typesense Collection Name
322-
description: >-
323-
Typesense collection name to index data into. This collection needs to exist before this extension is installed. Please create it via the Typesense Cloud dashboard or API.
324-
default: companies
325-
required: true
326-
- param: FLATTEN_NESTED_DOCUMENTS
327-
label: Flatten Nested Documents
328-
description: >-
329-
Should nested documents in Firestore be flattened by this extension before they are indexed in Typesense?
330-
Set to "Yes" for Typesense versions 0.23.1 and earlier. Set to "No" for Typesense versions 0.24.0 and later.
331-
type: select
332-
options:
333-
- label: No
334-
value: false
335-
- label: Yes
336-
value: true
337-
default: false
338-
required: false
351+
339352
- param: LOG_TYPESENSE_INSERTS
340353
label: Log Typesense Inserts for Debugging
341354
description: >-

0 commit comments

Comments
 (0)