Skip to content

Commit 39a845f

Browse files
authored
DONT MERGE YET. Renames extensions per go/ext-names and changes to extensions format (#281)
* Renames mod.yaml to extension.yaml * Renames mod.yaml to extension.yaml * Renames mod.yaml to extension.yaml * changes firebasemods.v1beta1.function to firebaseextension.v1beta.function * changes specVersion from v1beta1 to v1beta * renames mods per go/ext-names * renames directories per go/ext-names * v1beta1 -> v1beta * renames dirs * changing source links * renames mod.yaml to extension.yaml * switches function resource type * switches spec version * switches names and descriptions to final ones * updating dir names to match final names * changes function resource type * changes spec verison * mod.yaml -> extensions.yaml * Add billing info for a bunch of extensions * Add billing info for user-data-deletion * add info about Bit.ly in new billing section * changing sourceUrl to match new dir * mod.yaml -> extension.yaml * change function resource type * change spec version * removes extra ' * fixing terrible merge conflicts * fixing bad merges * removes extra whitespace * resolving conflicts * Remove postponed * Edit logs.ts files for phrasing and common errors (#260) * mod -> extension * mod -> extension * mod -> extension (logs) * mod -> extension (logs) * mod -> extension; PubSub -> Pub/Sub (logs) * mod -> extension; PubSub -> Pub/Sub; Slack URL -> Slack (logs) * mod -> extension; url -> URL (logs) * mod -> extension; url -> URL (logs) * mod -> extension; message -> string (copy only!); rtdb -> Realtime Database (logs) * mod -> extension; message -> string (copy only!); RTDB -> Realtime Database; languages -> language(s) (logs) * mod -> extension; remote config -> message (logs) * mod -> extension; remote config -> message (logs) * mod -> extension; aligned error message to other extensions (logs) * mod -> extension; aligned error message w/ other extensions (logs) * mod -> extension (logs) * mod -> extension (logs) * mod -> extension; URLS -> URLs; shortened error msg for deleting files (logs) * mod -> extension; URLS -> URLs; shortened error msg for deleting temp files (logs) * mod -> extension; shortened err msg for deleting temp files; wordsmith requested file msg * mod -> extension; shortened err msg for deleting temp files; wordsmith msg for requested files (logs) * mod -> extension; url -> URL; Firebase Document -> Cloud Firestore document (logs) * mod -> extension; url -> URL; Firestore Document -> Cloud Firestore document (logs) * mod -> extension (logs) * mod -> extension (logs) * extension execution -> execution of extension (logs) * extension execution -> execution of extension (logs) * mod -> extension; message -> string (copy only!); language -> language(s); Firestore Document -> Cloud Firestore document (logs) * mod -> extension; message -> string (copy only!); language -> language(s); Firestore Document -> Cloud Firestore document (logs) * mod -> extension; Pubsub Message -> Pub/Sub message; Zapier URL -> Zapier (logs) * mod -> extension; Pubsub Message -> Pub/Sub message; Zapier URL -> Zapier (logs) * align to "Error when" * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * url -> URL (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * align to "Error when" (logs) * fixes merge conflicts * add preinstall file from gDoc draft (firestore-bigquery-export) * update POSTINSTALL w/ content from gDoc draft (firestore-bigquery-export) * update extension.yaml (parameter, API, roles descriptions) * Deployment Location -> Deployment location * remove (Optional) * wordsmith (yaml - resize images) * wordsmith doc vs. subcollection; add metadata fields * swapped order of delete and import * wordsmith docs vs. subcollections paragraph * change styling and linked text for table & view * wordsmith; add cache-control; add multiple sizes info * wordsmith * add breaks for query (postinstall) Co-Authored-By: Fred Zhang <fredzqm@google.com> * add additional setup section * wordsmith; add headings (mailchimp - preinstall) * wordsmith (mailchimp - postinstall) * wordsmith; add headings (delete-user-data - preinstall) * wordsmith (delete-user-data - postinstall) * wordsmith; add headings (limit-child-nodes - preinstall) * wordsmith (limit-child-nodes - postinstall) * wordsmith; add headings (sharded-counter - preinstall) * wordsmith; add headings (sharded-counter - postinstall) * left-align code (sharded-countere - postinstall) * soften auth prereq * soften auth prereq * "email audience" -> "audience" (mailchimp - yaml) * update name, displayName, and descriptions fields These are the updates to match the go/ext-names decisions. * default datasetId to "exported_collection" "extensions" was too vague of a dataset id * fix spelling error * clarify that mutiple subcollections and docs are used by extension * clarified that "last change event" is returned * reorder products in Billing section * clarify the metadata for the table * image -> image(s) * clarify <p> about multiple resized images * align Deployment location description w/ other extensions * BigQuery - remove explicit import script name * Capitalize display name (#312) * cleaning up references to old extension names (#301) * reconcile extensions.yaml and mod.yaml for firestore-bigquery-export (#313) * changing name to hosting-deploy-github * Capitalizes Display Names (#314) * rebuild js source (#317) * update name in package.json (#315) * Launch.rename build (#319) * npm build storage-resize-images * npm build rtdb-translate-text * Generating readmes (#318) * Generating readmes * replace readme text * one last mod is dead
1 parent e619453 commit 39a845f

File tree

204 files changed

+1210
-1000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+1210
-1000
lines changed

mailchimper/POSTINSTALL.md renamed to auth-mailchimp-sync/POSTINSTALL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
### See it in action
22

3-
To test out this extension, follow these steps:
3+
You can test out this extension right away:
44

5-
1. Go to the [Authentication tab](https://console.firebase.google.com/project/${param:PROJECT_ID}/authentication/users).
5+
1. Go to your [Authentication dashboard](https://console.firebase.google.com/project/${param:PROJECT_ID}/authentication/users).
66

7-
1. Click "Add User" to add a test user.
7+
1. Click **Add User** to add a test user.
88

9-
1. In a few seconds, go to your Mailchimp audience page, you'll see the new user's email appear in the list.
9+
1. In a few seconds, go to your Mailchimp audience page, you'll see the test user's email appear in the list.
1010

1111
### Using the extension
1212

13-
Whenever a new user is added your app, this extension adds the user's email address to your Mailchimp audience.
13+
Whenever a new user is added your app, this extension adds the user's email address to your specified Mailchimp audience.
1414

1515
Also, if the user deletes their user account for your app, this extension removes the user from the Mailchimp audience.
1616

auth-mailchimp-sync/PREINSTALL.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Use this extension to add new users to an existing [Mailchimp](https://mailchimp.com) audience.
2+
3+
This extension adds the email address of each new user to your specified Mailchimp audience. Also, if the user deletes their user account for your app, this extension removes the user from the Mailchimp audience.
4+
5+
**Note:** To use this extension, you need to manage your users with Firebase Authentication.
6+
7+
This extension uses Mailchimp, so you'll need to supply your Mailchimp API Key and Audience ID when installing this extension.
8+
9+
### Additional setup
10+
11+
Make sure that you've set up [Firebase Authentication](https://firebase.google.com/docs/auth) to manage your users.
12+
13+
You must also have a Mailchimp account before installing this extension.
14+
15+
### Billing
16+
17+
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
18+
19+
- Firebase Realtime Database
20+
- Cloud Functions
21+
22+
When you use Firebase Extensions, you're only charged for the underlying resources that you use. A paid-tier billing plan is only required if the extension uses a service that requires a paid-tier plan, for example calling to a Google Cloud Platform API or making outbound network requests to non-Google services. All Firebase services offer a free tier of usage. [Learn more about Firebase billing.](https://firebase.google.com/pricing)
23+
24+
Usage of this extension also requires you to have a Mailchimp account. You are responsible for any associated costs with your usage of Mailchimp.
25+

auth-mailchimp-sync/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# auth-mailchimp-sync
2+
3+
**VERSION**: 0.1.0
4+
5+
**DESCRIPTION**: Adds new users from Firebase Authentication to a specified Mailchimp audience.
6+
7+
8+
9+
**CONFIGURATION PARAMETERS:**
10+
11+
* Deployment location: *Where should the extension be deployed? For help selecting a location, refer to the [location selection guide](https://firebase.google.com/docs/functions/locations).*
12+
13+
* Mailchimp API key: *What is your Mailchimp API key? To obtain a Mailchimp API key, go to your [Mailchimp account](https://admin.mailchimp.com/account/api/).*
14+
15+
* Audience ID: *What is the Mailchimp Audience ID to which you want to subscribe new users? To find your Audience ID: visit https://admin.mailchimp.com/lists, click on the desired audience or create a new audience, then select **Settings**. Look for **Audience ID** (for example, `27735fc60a`).*
16+
17+
18+
19+
**NON-CLOUD FUNCTION RESOURCES CREATED**:
20+
21+
* addUserToList (firebaseextensions.v1beta.function)
22+
23+
* removeUserFromList (firebaseextensions.v1beta.function)
24+
25+
26+
27+
**DETAILS**: Use this extension to add new users to an existing [Mailchimp](https://mailchimp.com) audience.
28+
29+
This extension adds the email address of each new user to your specified Mailchimp audience. Also, if the user deletes their user account for your app, this extension removes the user from the Mailchimp audience.
30+
31+
**Note:** To use this extension, you need to manage your users with Firebase Authentication.
32+
33+
This extension uses Mailchimp, so you'll need to supply your Mailchimp API Key and Audience ID when installing this extension.
34+
35+
### Additional setup
36+
37+
Make sure that you've set up [Firebase Authentication](https://firebase.google.com/docs/auth) to manage your users.
38+
39+
You must also have a Mailchimp account before installing this extension.
40+
41+
### Billing
42+
43+
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
44+
45+
- Firebase Realtime Database
46+
- Cloud Functions
47+
48+
When you use Firebase Extensions, you're only charged for the underlying resources that you use. A paid-tier billing plan is only required if the extension uses a service that requires a paid-tier plan, for example calling to a Google Cloud Platform API or making outbound network requests to non-Google services. All Firebase services offer a free tier of usage. [Learn more about Firebase billing.](https://firebase.google.com/pricing)
49+
50+
Usage of this extension also requires you to have a Mailchimp account. You are responsible for any associated costs with your usage of Mailchimp.

mailchimper/mod.yaml renamed to auth-mailchimp-sync/extension.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: mailchimper
15+
name: auth-mailchimp-sync
1616
version: 0.1.0
17-
specVersion: v1beta1
18-
displayName: Add new users to Mailchimp
17+
specVersion: v1beta
18+
displayName: Sync with Mailchimp
1919

2020
description:
21-
Automatically add new users to a specified Mailchimp email list.
21+
Adds new users from Firebase Authentication to a specified Mailchimp audience.
2222

2323
license: Apache-2.0
2424
billingRequired: true
25-
sourceUrl: https://accounts.google.com/AccountChooser/signinchooser?service=gerritcodereview&continue=https%3A%2F%2Fdev-partners.googlesource.com%2Flogin%2Fsamples%2Ffirebase%2Fmods%2F%2B%2Fmaster%2Fmailchimper
25+
sourceUrl: https://accounts.google.com/AccountChooser/signinchooser?service=gerritcodereview&continue=https%3A%2F%2Fdev-partners.googlesource.com%2Flogin%2Fsamples%2Ffirebase%2Fmods%2F%2B%2Fmaster%2Fauth-mailchimp-sync
2626
releaseNotesUrl: https://dev-partners.googlesource.com/samples/firebase/mods/+log
2727

2828
author:
@@ -38,21 +38,21 @@ contributors:
3838

3939
resources:
4040
- name: addUserToList
41-
type: firebasemods.v1beta1.function
41+
type: firebaseextensions.v1beta.function
4242
description:
4343
Listens for new user accounts (as managed by Firebase Authentication),
44-
then automatically adds the new user to your specified MailChimp email audience.
44+
then automatically adds the new user to your specified MailChimp audience.
4545
properties:
4646
sourceDirectory: .
4747
location: ${LOCATION}
4848
eventTrigger:
4949
eventType: providers/firebase.auth/eventTypes/user.create
5050
resource: projects/${PROJECT_ID}
5151
- name: removeUserFromList
52-
type: firebasemods.v1beta1.function
52+
type: firebaseextensions.v1beta.function
5353
description:
5454
Listens for existing user accounts to be deleted (as managed by Firebase Authentication),
55-
then automatically removes them from your specified MailChimp email audience.
55+
then automatically removes them from your specified MailChimp audience.
5656
properties:
5757
sourceDirectory: .
5858
location: ${LOCATION}

mailchimper/functions/lib/logs.js renamed to auth-mailchimp-sync/functions/lib/logs.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
1818
const config_1 = require("./config");
1919
const obfuscatedConfig = Object.assign({}, config_1.default, { mailchimpApiKey: "********" });
2020
exports.complete = () => {
21-
console.log("Completed mod execution");
21+
console.log("Completed execution of extension");
2222
};
2323
exports.errorAddUser = (err) => {
24-
console.error("Error adding user to Mailchimp list", err);
24+
console.error("Error when adding user to Mailchimp list", err);
2525
};
2626
exports.errorRemoveUser = (err) => {
27-
console.error("Error removing user from Mailchimp list", err);
27+
console.error("Error when removing user from Mailchimp list", err);
2828
};
2929
exports.init = () => {
30-
console.log("Initializing mod with configuration", obfuscatedConfig);
30+
console.log("Initializing extension with configuration", obfuscatedConfig);
3131
};
3232
exports.initError = (err) => {
33-
console.error("There was an error initializing the mod.", err);
33+
console.error("Error when initializing extension", err);
3434
};
3535
exports.mailchimpNotInitialized = () => {
3636
console.error("Mailchimp was not initialized correctly, check for errors in the logs");
3737
};
3838
exports.start = () => {
39-
console.log("Started mod execution with configuration", obfuscatedConfig);
39+
console.log("Started execution of extension with configuration", obfuscatedConfig);
4040
};
4141
exports.userAdded = (userId, audienceId, mailchimpId) => {
4242
console.log(`Added user: ${userId} to Mailchimp audience: ${audienceId} with Mailchimp ID: ${mailchimpId}`);

mailchimper/functions/src/logs.ts renamed to auth-mailchimp-sync/functions/src/logs.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ const obfuscatedConfig = {
2222
};
2323

2424
export const complete = () => {
25-
console.log("Completed mod execution");
25+
console.log("Completed execution of extension");
2626
};
2727

2828
export const errorAddUser = (err: Error) => {
29-
console.error("Error adding user to Mailchimp list", err);
29+
console.error("Error when adding user to Mailchimp list", err);
3030
};
3131

3232
export const errorRemoveUser = (err: Error) => {
33-
console.error("Error removing user from Mailchimp list", err);
33+
console.error("Error when removing user from Mailchimp list", err);
3434
};
3535

3636
export const init = () => {
37-
console.log("Initializing mod with configuration", obfuscatedConfig);
37+
console.log("Initializing extension with configuration", obfuscatedConfig);
3838
};
3939

4040
export const initError = (err: Error) => {
41-
console.error("There was an error initializing the mod.", err);
41+
console.error("Error when initializing extension", err);
4242
};
4343

4444
export const mailchimpNotInitialized = () => {
@@ -48,7 +48,7 @@ export const mailchimpNotInitialized = () => {
4848
};
4949

5050
export const start = () => {
51-
console.log("Started mod execution with configuration", obfuscatedConfig);
51+
console.log("Started execution of extension with configuration", obfuscatedConfig);
5252
};
5353

5454
export const userAdded = (

0 commit comments

Comments
 (0)