@vizmo/parse-server 8.6.2-3 → 9.10.0-2

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.
Files changed (127) hide show
  1. package/README.md +265 -91
  2. package/lib/AccountLockout.js +14 -42
  3. package/lib/Adapters/Auth/BaseCodeAuthAdapter.js +24 -4
  4. package/lib/Adapters/Auth/apple.js +6 -4
  5. package/lib/Adapters/Auth/facebook.js +12 -9
  6. package/lib/Adapters/Auth/google.js +35 -93
  7. package/lib/Adapters/Auth/index.js +19 -2
  8. package/lib/Adapters/Auth/keycloak.js +56 -36
  9. package/lib/Adapters/Auth/ldap.js +30 -4
  10. package/lib/Adapters/Auth/mfa.js +42 -50
  11. package/lib/Adapters/Auth/oauth2.js +4 -4
  12. package/lib/Adapters/Cache/RedisCacheAdapter.js +2 -2
  13. package/lib/Adapters/Files/FilesAdapter.js +12 -2
  14. package/lib/Adapters/Files/GridFSBucketAdapter.js +53 -4
  15. package/lib/Adapters/PubSub/RedisPubSub.js +1 -3
  16. package/lib/Adapters/Push/PushAdapter.js +2 -2
  17. package/lib/Adapters/Storage/Mongo/MongoCollection.js +54 -4
  18. package/lib/Adapters/Storage/Mongo/MongoStorageAdapter.js +169 -46
  19. package/lib/Adapters/Storage/Mongo/MongoTransform.js +30 -30
  20. package/lib/Adapters/Storage/Postgres/PostgresStorageAdapter.js +134 -36
  21. package/lib/Adapters/Storage/StorageAdapter.js +1 -1
  22. package/lib/Auth.js +82 -19
  23. package/lib/AuthDataLock.js +53 -0
  24. package/lib/Config.js +177 -22
  25. package/lib/Controllers/AdaptableController.js +6 -1
  26. package/lib/Controllers/DatabaseController.js +265 -40
  27. package/lib/Controllers/FilesController.js +26 -8
  28. package/lib/Controllers/LiveQueryController.js +2 -2
  29. package/lib/Controllers/ParseGraphQLController.js +3 -2
  30. package/lib/Controllers/PushController.js +2 -2
  31. package/lib/Controllers/SchemaController.js +3 -7
  32. package/lib/Controllers/UserController.js +12 -3
  33. package/lib/Deprecator/Deprecations.js +81 -7
  34. package/lib/Deprecator/Deprecator.js +15 -2
  35. package/lib/Error.js +5 -3
  36. package/lib/FileUrlValidator.js +69 -0
  37. package/lib/GraphQL/ParseGraphQLServer.js +156 -33
  38. package/lib/GraphQL/helpers/objectsMutations.js +3 -3
  39. package/lib/GraphQL/helpers/objectsQueries.js +4 -4
  40. package/lib/GraphQL/helpers/queryComplexity.js +138 -0
  41. package/lib/GraphQL/loaders/defaultGraphQLTypes.js +6 -5
  42. package/lib/GraphQL/loaders/functionsMutations.js +3 -4
  43. package/lib/GraphQL/loaders/parseClassMutations.js +4 -5
  44. package/lib/GraphQL/loaders/parseClassQueries.js +3 -4
  45. package/lib/GraphQL/loaders/schemaMutations.js +4 -5
  46. package/lib/GraphQL/loaders/schemaQueries.js +2 -3
  47. package/lib/GraphQL/loaders/usersMutations.js +5 -5
  48. package/lib/GraphQL/loaders/usersQueries.js +2 -2
  49. package/lib/GraphQL/parseGraphQLUtils.js +9 -1
  50. package/lib/GraphQL/transformers/mutation.js +7 -1
  51. package/lib/GraphQL/transformers/query.js +2 -2
  52. package/lib/InstallationDedup.js +178 -0
  53. package/lib/LiveQuery/ParseLiveQueryServer.js +574 -115
  54. package/lib/LiveQuery/ParseWebSocketServer.js +41 -5
  55. package/lib/LiveQuery/QueryTools.js +83 -22
  56. package/lib/LiveQuery/Subscription.js +6 -2
  57. package/lib/Options/Definitions.js +265 -36
  58. package/lib/Options/docs.js +77 -20
  59. package/lib/Options/index.js +1 -1
  60. package/lib/Options/parsers.js +8 -1
  61. package/lib/ParseServer.js +42 -20
  62. package/lib/ParseServerRESTController.js +14 -6
  63. package/lib/Push/PushWorker.js +2 -4
  64. package/lib/Push/utils.js +3 -4
  65. package/lib/RestQuery.js +205 -21
  66. package/lib/RestWrite.js +219 -116
  67. package/lib/Routers/AggregateRouter.js +33 -6
  68. package/lib/Routers/AudiencesRouter.js +2 -2
  69. package/lib/Routers/ClassesRouter.js +10 -6
  70. package/lib/Routers/FilesRouter.js +572 -57
  71. package/lib/Routers/FunctionsRouter.js +204 -16
  72. package/lib/Routers/HooksRouter.js +8 -1
  73. package/lib/Routers/IAPValidationRouter.js +2 -2
  74. package/lib/Routers/InstallationsRouter.js +2 -2
  75. package/lib/Routers/PagesRouter.js +57 -28
  76. package/lib/Routers/SessionsRouter.js +59 -25
  77. package/lib/Routers/UsersRouter.js +161 -47
  78. package/lib/SchemaMigrations/DefinedSchemas.js +2 -3
  79. package/lib/SchemaMigrations/Migrations.js +1 -1
  80. package/lib/Security/Check.js +2 -2
  81. package/lib/Security/CheckGroups/CheckGroupServerConfig.js +65 -1
  82. package/lib/SharedRest.js +7 -2
  83. package/lib/StatusHandler.js +3 -2
  84. package/lib/Utils.js +143 -17
  85. package/lib/batch.js +68 -2
  86. package/lib/cloud-code/Parse.Cloud.js +60 -11
  87. package/lib/defaults.js +12 -4
  88. package/lib/middlewares.js +234 -71
  89. package/lib/password.js +8 -2
  90. package/lib/rest.js +16 -14
  91. package/lib/triggers.js +54 -14
  92. package/package.json +57 -59
  93. package/public/custom_json.html +17 -0
  94. package/public/custom_json.json +23 -0
  95. package/public/custom_page.html +15 -0
  96. package/public/de/email_verification_link_expired.html +24 -0
  97. package/public/de/email_verification_link_invalid.html +21 -0
  98. package/public/de/email_verification_send_fail.html +21 -0
  99. package/public/de/email_verification_send_success.html +19 -0
  100. package/public/de/email_verification_success.html +18 -0
  101. package/public/de/password_reset.html +65 -0
  102. package/public/de/password_reset_link_invalid.html +19 -0
  103. package/public/de/password_reset_success.html +18 -0
  104. package/public/de-AT/email_verification_link_expired.html +24 -0
  105. package/public/de-AT/email_verification_link_invalid.html +21 -0
  106. package/public/de-AT/email_verification_send_fail.html +21 -0
  107. package/public/de-AT/email_verification_send_success.html +19 -0
  108. package/public/de-AT/email_verification_success.html +18 -0
  109. package/public/de-AT/password_reset.html +65 -0
  110. package/public/de-AT/password_reset_link_invalid.html +19 -0
  111. package/public/de-AT/password_reset_success.html +18 -0
  112. package/public/email_verification_link_expired.html +24 -0
  113. package/public/email_verification_link_invalid.html +21 -0
  114. package/public/email_verification_send_fail.html +21 -0
  115. package/public/email_verification_send_success.html +19 -0
  116. package/public/email_verification_success.html +18 -0
  117. package/public/password_reset.html +65 -0
  118. package/public/password_reset_link_invalid.html +19 -0
  119. package/public/password_reset_success.html +18 -0
  120. package/types/LiveQuery/ParseLiveQueryServer.d.ts +22 -2
  121. package/types/Options/index.d.ts +45 -5
  122. package/public_html/invalid_link.html +0 -45
  123. package/public_html/invalid_verification_link.html +0 -68
  124. package/public_html/link_send_fail.html +0 -45
  125. package/public_html/link_send_success.html +0 -45
  126. package/public_html/password_reset_success.html +0 -27
  127. package/public_html/verify_email_success.html +0 -27
@@ -0,0 +1,19 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ This page is displayed when a user opens a password reset link with parameters
4
+ that are missing or incorrect. This can either mean the user has incorrectly
5
+ entered a link or this could be a sign of a malicious user trying to tamper
6
+ with your app.
7
+ -->
8
+ <html>
9
+
10
+ <head>
11
+ <title>Password Reset</title>
12
+ </head>
13
+
14
+ <body>
15
+ <h1>{{appName}}</h1>
16
+ <h1>Invalid password reset link!</h1>
17
+ </body>
18
+
19
+ </html>
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ This page is displayed when a user opens a reset password link, then submits
4
+ the form with a new password and the password gets updated successfully.
5
+ -->
6
+ <html>
7
+
8
+ <head>
9
+ <title>Password Reset</title>
10
+ </head>
11
+
12
+ <body>
13
+ <h1>{{appName}}</h1>
14
+ <h1>Success!</h1>
15
+ <p>Your password has been updated.</p>
16
+ </body>
17
+
18
+ </html>
@@ -0,0 +1,24 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ This page is displayed when a user opens a verify email link with a security
4
+ token that is expired or incorrect. This can either mean the user has clicked
5
+ on a stale link (i.e. re-clicked on the link) or this could be a sign of a
6
+ malicious user trying to tamper with your app.
7
+ -->
8
+ <html>
9
+
10
+ <head>
11
+ <title>Email Verification</title>
12
+ </head>
13
+
14
+ <body>
15
+ <h1>{{appName}}</h1>
16
+ <h1>Expired verification link!</h1>
17
+ <form method="POST" action="{{publicServerUrl}}/apps/{{appId}}/resend_verification_email">
18
+ <input name="token" type="hidden" value="{{token}}">
19
+ <input name="locale" type="hidden" value="{{locale}}">
20
+ <button type="submit">Resend Link</button>
21
+ </form>
22
+ </body>
23
+
24
+ </html>
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ This page is displayed when a user opens a verify email link with parameters
4
+ that are missing or incorrect. This can either mean the user has incorrectly
5
+ entered a link or this could be a sign of a malicious user trying to tamper
6
+ with your app.
7
+ If the link contains an expired security token (or the email has already
8
+ been verified), this page is not displayed, there is another page for that.
9
+ -->
10
+ <html>
11
+
12
+ <head>
13
+ <title>Email Verification</title>
14
+ </head>
15
+
16
+ <body>
17
+ <h1>{{appName}}</h1>
18
+ <h1>Invalid verification link!</h1>
19
+ </body>
20
+
21
+ </html>
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ This page is displayed when a user opens a verify email link with a security
4
+ token that is expired or incorrect, then requests to receive another link,
5
+ but it fails because the username is invalid or the email has already been
6
+ verified. This can either mean the user has previously verified the email
7
+ or this could be a sign of a malicious user trying to tamper with your app.
8
+ -->
9
+ <html>
10
+
11
+ <head>
12
+ <title>Email Verification</title>
13
+ </head>
14
+
15
+ <body>
16
+ <h1>{{appName}}</h1>
17
+ <h1>Invalid link!</h1>
18
+ <p>No link sent. User not found or email already verified.</p>
19
+ </body>
20
+
21
+ </html>
@@ -0,0 +1,19 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ This page is displayed when a user opens a verify email link with a
4
+ security token that is expired, then requests to receive another email
5
+ with a new link and the email is sent successfully.
6
+ -->
7
+ <html>
8
+
9
+ <head>
10
+ <title>Email Verification</title>
11
+ </head>
12
+
13
+ <body>
14
+ <h1>{{appName}}</h1>
15
+ <h1>Link sent!</h1>
16
+ <p>A new link has been sent. Check your email.</p>
17
+ </body>
18
+
19
+ </html>
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ This page is displayed when a user opens a verify email link and the
4
+ email gets verified successfully.
5
+ -->
6
+ <html>
7
+
8
+ <head>
9
+ <title>Email Verification</title>
10
+ </head>
11
+
12
+ <body>
13
+ <h1>{{appName}}</h1>
14
+ <h1>Email verified!</h1>
15
+ <p>Successfully verified your email for account: {{username}}.</p>
16
+ </body>
17
+
18
+ </html>
@@ -0,0 +1,65 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ This page is displayed when someone clicks a valid 'reset password' link.
4
+ Users should feel free to add to this page (i.e. branding or security widgets)
5
+ but should be sure not to delete any of the form inputs or the javascript from the
6
+ template file. This javascript is what adds the necessary values to authenticate
7
+ this session with Parse.
8
+ The query params 'username' and 'app' hold the friendly names for your current user and
9
+ your app. You should feel free to incorporate their values to make the page more personal.
10
+ If you are missing form parameters in your POST, Parse will navigate back to this page and
11
+ add an 'error' query parameter.
12
+ -->
13
+ <html>
14
+
15
+ <head>
16
+ <title>Password Reset</title>
17
+ </head>
18
+
19
+ <body>
20
+ <h1>{{appName}}</h1>
21
+ <h1>Reset Your Password</h1>
22
+ <noscript><p>We apologize, but resetting your password requires javascript</p></noscript>
23
+ <p>You can set a new Password for your account: {{username}}</p>
24
+ <br />
25
+ <p>{{error}}</p>
26
+ <form id='form' action='{{publicServerUrl}}/apps/{{appId}}/request_password_reset' method='POST'>
27
+ <input name='utf-8' type='hidden' value='✓' />
28
+ <input name="username" type="hidden" id="username" value="{{username}}" />
29
+ <input name="token" type="hidden" id="token" value="{{token}}" />
30
+ <input name="locale" type="hidden" id="locale" value="{{locale}}" />
31
+
32
+ <p>New Password</p>
33
+ <input name="new_password" type="password" id="password" />
34
+ <p>Confirm New Password</p>
35
+ <input name="confirm_new_password" type="password" id="password_confirm" />
36
+ <br />
37
+ <p id="password_match_info"></p>
38
+ <br />
39
+ <button id="change_password">Change Password</button>
40
+ </form>
41
+
42
+ <script>
43
+ window.onload = function() {
44
+ document.getElementById("password").oninput = validatePassword;
45
+ document.getElementById("password_confirm").oninput = validatePassword;
46
+ document.getElementById("change_password").disabled = true;
47
+
48
+ function validatePassword() {
49
+ var pass2 = document.getElementById("password").value;
50
+ var pass1 = document.getElementById("password_confirm").value;
51
+ if(pass1 !== pass2) {
52
+ if(document.getElementById("password_confirm").value) {
53
+ document.getElementById("change_password").disabled = true;
54
+ document.getElementById("password_match_info").innerHTML = "Must match the previous entry";
55
+ }
56
+ } else {
57
+ document.getElementById("change_password").disabled = false;
58
+ document.getElementById("password_match_info").innerHTML = "";
59
+ }
60
+ }
61
+ }
62
+ </script>
63
+ </body>
64
+
65
+ </html>
@@ -0,0 +1,19 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ This page is displayed when a user opens a password reset link with parameters
4
+ that are missing or incorrect. This can either mean the user has incorrectly
5
+ entered a link or this could be a sign of a malicious user trying to tamper
6
+ with your app.
7
+ -->
8
+ <html>
9
+
10
+ <head>
11
+ <title>Password Reset</title>
12
+ </head>
13
+
14
+ <body>
15
+ <h1>{{appName}}</h1>
16
+ <h1>Invalid password reset link!</h1>
17
+ </body>
18
+
19
+ </html>
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ This page is displayed when a user opens a reset password link, then submits
4
+ the form with a new password and the password gets updated successfully.
5
+ -->
6
+ <html>
7
+
8
+ <head>
9
+ <title>Password Reset</title>
10
+ </head>
11
+
12
+ <body>
13
+ <h1>{{appName}}</h1>
14
+ <h1>Success!</h1>
15
+ <p>Your password has been updated.</p>
16
+ </body>
17
+
18
+ </html>
@@ -1,4 +1,18 @@
1
1
  import { Auth } from '../Auth';
2
+ type SubscriptionRemovalReason = 'client_unsubscribe' | 'query_update' | 'socket_close' | 'socket_error' | 'pong_timeout' | 'server_shutdown' | 'subscribe_rollback';
3
+ type SubscriptionLifecycleEvent = {
4
+ event: 'subscribe' | 'unsubscribe';
5
+ className: string;
6
+ clientId: string;
7
+ requestId: number;
8
+ installationId?: string;
9
+ query?: {
10
+ where: any;
11
+ };
12
+ reason?: SubscriptionRemovalReason;
13
+ useMasterKey: boolean;
14
+ userId?: string;
15
+ };
2
16
  declare class ParseLiveQueryServer {
3
17
  server: any;
4
18
  config: any;
@@ -17,6 +31,8 @@ declare class ParseLiveQueryServer {
17
31
  _onAfterDelete(message: any): Promise<void>;
18
32
  _onAfterSave(message: any): Promise<void>;
19
33
  _onConnect(parseWebsocket: any): void;
34
+ _handleDisconnect(parseWebsocket: any, reason?: SubscriptionRemovalReason): Promise<void>;
35
+ _isActiveClient(parseWebsocket: any, client: any): boolean;
20
36
  _matchesSubscription(parseObject: any, subscription: any): boolean;
21
37
  _clearCachedRoles(userId: string): Promise<void>;
22
38
  getAuthForSessionToken(sessionToken?: string): Promise<{
@@ -33,8 +49,12 @@ declare class ParseLiveQueryServer {
33
49
  _handleConnect(parseWebsocket: any, request: any): Promise<any>;
34
50
  _hasMasterKey(request: any, validKeyPairs: any): boolean;
35
51
  _validateKeys(request: any, validKeyPairs: any): boolean;
52
+ _getSubscriptionLifecycleUserId(client: any, subscriptionInfo: any): Promise<string | void>;
53
+ _getSubscriptionLifecycleEvent(event: 'subscribe' | 'unsubscribe', client: any, clientId: string, requestId: number, subscriptionInfo: any, reason?: SubscriptionRemovalReason): Promise<SubscriptionLifecycleEvent>;
54
+ _runSubscriptionHandler(event: 'subscribe' | 'unsubscribe', client: any, clientId: string, requestId: number, subscriptionInfo: any, reason?: SubscriptionRemovalReason): Promise<void>;
55
+ _removeSubscription(client: any, clientId: string, requestId: number, reason: SubscriptionRemovalReason, notifyClient?: boolean, emitEvents?: boolean): Promise<boolean>;
36
56
  _handleSubscribe(parseWebsocket: any, request: any): Promise<any>;
37
- _handleUpdateSubscription(parseWebsocket: any, request: any): any;
38
- _handleUnsubscribe(parseWebsocket: any, request: any, notifyClient?: boolean): any;
57
+ _handleUpdateSubscription(parseWebsocket: any, request: any): Promise<any>;
58
+ _handleUnsubscribe(parseWebsocket: any, request: any, notifyClient?: boolean, reason?: SubscriptionRemovalReason): Promise<any>;
39
59
  }
40
60
  export { ParseLiveQueryServer };
@@ -14,6 +14,7 @@ export interface SchemaOptions {
14
14
  deleteExtraFields?: boolean;
15
15
  recreateModifiedFields?: boolean;
16
16
  lockSchemas?: boolean;
17
+ keepUnknownIndexes?: boolean;
17
18
  beforeMigration?: () => void | Promise<void>;
18
19
  afterMigration?: () => void | Promise<void>;
19
20
  }
@@ -26,6 +27,22 @@ type RequestKeywordDenylist = {
26
27
  key: string;
27
28
  value: any;
28
29
  };
30
+ export interface EmailVerificationRequest {
31
+ original?: any;
32
+ object: any;
33
+ master?: boolean;
34
+ ip?: string;
35
+ installationId?: string;
36
+ createdWith?: {
37
+ action: 'login' | 'signup';
38
+ authProvider: string;
39
+ };
40
+ resendRequest?: boolean;
41
+ }
42
+ export interface SendEmailVerificationRequest {
43
+ user: any;
44
+ master?: boolean;
45
+ }
29
46
  export interface ParseServerOptions {
30
47
  appId: string;
31
48
  masterKey: (() => void) | string;
@@ -74,17 +91,17 @@ export interface ParseServerOptions {
74
91
  auth?: Record<string, AuthAdapter>;
75
92
  enableInsecureAuthAdapters?: boolean;
76
93
  maxUploadSize?: string;
77
- verifyUserEmails?: (boolean | void);
78
- preventLoginWithUnverifiedEmail?: boolean;
94
+ verifyUserEmails?: boolean | ((params: EmailVerificationRequest) => boolean | Promise<boolean>);
95
+ preventLoginWithUnverifiedEmail?: boolean | ((params: EmailVerificationRequest) => boolean | Promise<boolean>);
79
96
  preventSignupWithUnverifiedEmail?: boolean;
80
97
  emailVerifyTokenValidityDuration?: number;
81
98
  emailVerifyTokenReuseIfValid?: boolean;
82
- sendUserEmailVerification?: (boolean | void);
99
+ emailVerifySuccessOnInvalidEmail?: boolean;
100
+ sendUserEmailVerification?: boolean | ((params: SendEmailVerificationRequest) => boolean | Promise<boolean>);
83
101
  accountLockout?: AccountLockoutOptions;
84
102
  passwordPolicy?: PasswordPolicyOptions;
85
103
  cacheAdapter?: Adapter<CacheAdapter>;
86
104
  emailAdapter?: Adapter<MailAdapter>;
87
- encodeParseObjectInCloudFunction?: boolean;
88
105
  publicServerURL?: string | (() => string) | (() => Promise<string>);
89
106
  pages?: PagesOptions;
90
107
  customPages?: CustomPagesOptions;
@@ -141,7 +158,6 @@ export interface SecurityOptions {
141
158
  checkGroups?: (CheckGroup[]);
142
159
  }
143
160
  export interface PagesOptions {
144
- enableRouter?: boolean;
145
161
  enableLocalization?: boolean;
146
162
  localizationJsonPath?: string;
147
163
  localizationFallbackLocale?: string;
@@ -186,6 +202,25 @@ export interface LiveQueryOptions {
186
202
  pubSubAdapter?: Adapter<PubSubAdapter>;
187
203
  wssAdapter?: Adapter<WSSAdapter>;
188
204
  }
205
+ export type LiveQuerySubscriptionEvent = {
206
+ event: 'subscribe' | 'unsubscribe';
207
+ className: string;
208
+ clientId: string;
209
+ requestId: number;
210
+ installationId?: string;
211
+ query?: {
212
+ where: any;
213
+ };
214
+ reason?: 'client_unsubscribe' | 'query_update' | 'socket_close' | 'socket_error' | 'pong_timeout' | 'server_shutdown';
215
+ useMasterKey: boolean;
216
+ userId?: string;
217
+ };
218
+ export type LiveQuerySubscriptionHandlers = {
219
+ [className: string]: {
220
+ onSubscribe?: (event: LiveQuerySubscriptionEvent) => void | Promise<void>;
221
+ onUnsubscribe?: (event: LiveQuerySubscriptionEvent) => void | Promise<void>;
222
+ };
223
+ };
189
224
  export interface LiveQueryServerOptions {
190
225
  appId?: string;
191
226
  masterKey?: string;
@@ -199,6 +234,7 @@ export interface LiveQueryServerOptions {
199
234
  redisURL?: string;
200
235
  pubSubAdapter?: Adapter<PubSubAdapter>;
201
236
  wssAdapter?: Adapter<WSSAdapter>;
237
+ subscriptionHandlers?: LiveQuerySubscriptionHandlers;
202
238
  }
203
239
  export interface IdempotencyOptions {
204
240
  paths?: (string[]);
@@ -221,6 +257,7 @@ export interface PasswordPolicyOptions {
221
257
  resetPasswordSuccessOnInvalidEmail?: boolean;
222
258
  }
223
259
  export interface FileUploadOptions {
260
+ allowedFileUrlDomains?: string[];
224
261
  fileExtensions?: (string[]);
225
262
  enableForAnonymousUser?: boolean;
226
263
  enableForAuthenticatedUser?: boolean;
@@ -229,6 +266,7 @@ export interface FileUploadOptions {
229
266
  export interface DatabaseOptions {
230
267
  // Parse Server custom options
231
268
  allowPublicExplain?: boolean;
269
+ batchSize?: number;
232
270
  createIndexRoleName?: boolean;
233
271
  createIndexUserEmail?: boolean;
234
272
  createIndexUserEmailCaseInsensitive?: boolean;
@@ -254,6 +292,7 @@ export interface DatabaseOptions {
254
292
  connectTimeoutMS?: number;
255
293
  directConnection?: boolean;
256
294
  forceServerObjectId?: boolean;
295
+ ignoreUndefined?: boolean;
257
296
  heartbeatFrequencyMS?: number;
258
297
  loadBalanced?: boolean;
259
298
  localThresholdMS?: number;
@@ -297,5 +336,6 @@ export interface LogLevels {
297
336
  triggerBeforeError?: string;
298
337
  cloudFunctionSuccess?: string;
299
338
  cloudFunctionError?: string;
339
+ signupUsernameTaken?: string;
300
340
  }
301
341
  export {};
@@ -1,45 +0,0 @@
1
- <!DOCTYPE html>
2
- <!-- This page is displayed when someone navigates to a verify email or reset password link
3
- but their security token is wrong. This can either mean the user has clicked on a
4
- stale link (i.e. re-click on a password reset link after resetting their password) or
5
- (rarely) this could be a sign of a malicious user trying to tamper with your app.
6
- -->
7
- <html>
8
- <head>
9
- <title>Invalid Link</title>
10
- <style type='text/css'>
11
- .container {
12
- border-width: 0px;
13
- display: block;
14
- font: inherit;
15
- font-family: 'Helvetica Neue', Helvetica;
16
- font-size: 16px;
17
- height: 30px;
18
- line-height: 16px;
19
- margin: 45px 0px 0px 45px;
20
- padding: 0px 8px 0px 8px;
21
- position: relative;
22
- vertical-align: baseline;
23
- }
24
-
25
- h1, h2, h3, h4, h5 {
26
- color: #0067AB;
27
- display: block;
28
- font: inherit;
29
- font-family: 'Open Sans', 'Helvetica Neue', Helvetica;
30
- font-size: 30px;
31
- font-weight: 600;
32
- height: 30px;
33
- line-height: 30px;
34
- margin: 0 0 15px 0;
35
- padding: 0 0 0 0;
36
- }
37
- </style>
38
- </head>
39
-
40
- <body>
41
- <div class="container">
42
- <h1>Invalid Link</h1>
43
- </div>
44
- </body>
45
- </html>
@@ -1,68 +0,0 @@
1
- <!DOCTYPE html>
2
- <!-- This page is displayed when someone navigates to a verify email or reset password link
3
- but their security token is wrong. This can either mean the user has clicked on a
4
- stale link (i.e. re-click on a password reset link after resetting their password) or
5
- (rarely) this could be a sign of a malicious user trying to tamper with your app.
6
- -->
7
- <html>
8
- <head>
9
- <title>Invalid Link</title>
10
- <style type='text/css'>
11
- .container {
12
- border-width: 0px;
13
- display: block;
14
- font: inherit;
15
- font-family: 'Helvetica Neue', Helvetica;
16
- font-size: 16px;
17
- height: 30px;
18
- line-height: 16px;
19
- margin: 45px 0px 0px 45px;
20
- padding: 0px 8px 0px 8px;
21
- position: relative;
22
- vertical-align: baseline;
23
- }
24
-
25
- h1, h2, h3, h4, h5 {
26
- color: #0067AB;
27
- display: block;
28
- font: inherit;
29
- font-family: 'Open Sans', 'Helvetica Neue', Helvetica;
30
- font-size: 30px;
31
- font-weight: 600;
32
- height: 30px;
33
- line-height: 30px;
34
- margin: 0 0 15px 0;
35
- padding: 0 0 0 0;
36
- }
37
- </style>
38
- </head>
39
- <script type="text/javascript">
40
- function getUrlParameter(name) {
41
- name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
42
- var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
43
- var results = regex.exec(location.search);
44
- return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
45
- };
46
-
47
- window.onload = addDataToForm;
48
-
49
- function addDataToForm() {
50
- const token = getUrlParameter("token");
51
- document.getElementById("token").value = token;
52
-
53
- var appId = getUrlParameter("appId");
54
- document.getElementById("resendForm").action = '/apps/' + appId + '/resend_verification_email'
55
- }
56
-
57
- </script>
58
-
59
- <body>
60
- <div class="container">
61
- <h1>Invalid Verification Link</h1>
62
- <form id="resendForm" method="POST" action="/resend_verification_email">
63
- <input id="token" class="form-control" name="token" type="hidden" value="">
64
- <button type="submit" class="btn btn-default">Resend Link</button>
65
- </form>
66
- </div>
67
- </body>
68
- </html>
@@ -1,45 +0,0 @@
1
- <!DOCTYPE html>
2
- <!-- This page is displayed when someone navigates to a verify email link with an invalid
3
- security token and requests a link resend. This page is displayed when the username from
4
- the original link is invalid or if the email of that user has already been verfieid when
5
- the resend request is made
6
- -->
7
- <html>
8
- <head>
9
- <title>Invalid Link</title>
10
- <style type='text/css'>
11
- .container {
12
- border-width: 0px;
13
- display: block;
14
- font: inherit;
15
- font-family: 'Helvetica Neue', Helvetica;
16
- font-size: 16px;
17
- height: 30px;
18
- line-height: 16px;
19
- margin: 45px 0px 0px 45px;
20
- padding: 0px 8px 0px 8px;
21
- position: relative;
22
- vertical-align: baseline;
23
- }
24
-
25
- h1, h2, h3, h4, h5 {
26
- color: #0067AB;
27
- display: block;
28
- font: inherit;
29
- font-family: 'Open Sans', 'Helvetica Neue', Helvetica;
30
- font-size: 30px;
31
- font-weight: 600;
32
- height: 30px;
33
- line-height: 30px;
34
- margin: 0 0 15px 0;
35
- padding: 0 0 0 0;
36
- }
37
- </style>
38
- </head>
39
-
40
- <body>
41
- <div class="container">
42
- <h1>No link sent. User not found or email already verified</h1>
43
- </div>
44
- </body>
45
- </html>
@@ -1,45 +0,0 @@
1
- <!DOCTYPE html>
2
- <!-- This page is displayed when someone navigates to a verify email link with an invalid
3
- security token and requests a link resend. This page is displayed when the username
4
- from the original verification link has been found and a new verification link has
5
- been successfully sent to the corresponding stored email
6
- -->
7
- <html>
8
- <head>
9
- <title>Invalid Link</title>
10
- <style type='text/css'>
11
- .container {
12
- border-width: 0px;
13
- display: block;
14
- font: inherit;
15
- font-family: 'Helvetica Neue', Helvetica;
16
- font-size: 16px;
17
- height: 30px;
18
- line-height: 16px;
19
- margin: 45px 0px 0px 45px;
20
- padding: 0px 8px 0px 8px;
21
- position: relative;
22
- vertical-align: baseline;
23
- }
24
-
25
- h1, h2, h3, h4, h5 {
26
- color: #0067AB;
27
- display: block;
28
- font: inherit;
29
- font-family: 'Open Sans', 'Helvetica Neue', Helvetica;
30
- font-size: 30px;
31
- font-weight: 600;
32
- height: 30px;
33
- line-height: 30px;
34
- margin: 0 0 15px 0;
35
- padding: 0 0 0 0;
36
- }
37
- </style>
38
- </head>
39
-
40
- <body>
41
- <div class="container">
42
- <h1>Link Sent! Check your email.</h1>
43
- </div>
44
- </body>
45
- </html>
@@ -1,27 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <!-- This page is displayed whenever someone has successfully reset their password.
4
- Pro and Enterprise accounts may edit this page and tell Parse to use that custom
5
- version in their Parse app. See the App Settigns page for more information.
6
- This page will be called with the query param 'username'
7
- -->
8
- <head>
9
- <title>Password Reset</title>
10
- <style type='text/css'>
11
- h1 {
12
- color: #0067AB;
13
- display: block;
14
- font: inherit;
15
- font-family: 'Open Sans', 'Helvetica Neue', Helvetica;
16
- font-size: 30px;
17
- font-weight: 600;
18
- height: 30px;
19
- line-height: 30px;
20
- margin: 45px 0px 0px 45px;
21
- padding: 0px 8px 0px 8px;
22
- }
23
- </style>
24
- <body>
25
- <h1>Successfully updated your password!</h1>
26
- </body>
27
- </html>