@wix/forms 1.0.153 → 1.0.155

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/forms",
3
- "version": "1.0.153",
3
+ "version": "1.0.155",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -19,10 +19,10 @@
19
19
  "service-plugins"
20
20
  ],
21
21
  "dependencies": {
22
- "@wix/forms_form-spam-submission-reports": "1.0.19",
23
- "@wix/forms_form-submissions": "1.0.27",
24
- "@wix/forms_forms": "1.0.30",
25
- "@wix/forms_submissions": "1.0.64"
22
+ "@wix/forms_form-spam-submission-reports": "1.0.20",
23
+ "@wix/forms_form-submissions": "1.0.28",
24
+ "@wix/forms_forms": "1.0.31",
25
+ "@wix/forms_submissions": "1.0.65"
26
26
  },
27
27
  "devDependencies": {
28
28
  "glob": "^10.4.1",
@@ -47,5 +47,5 @@
47
47
  "fqdn": ""
48
48
  }
49
49
  },
50
- "falconPackageHash": "12fc49f16a5a9bfcca719babe5c4c787baea64b83d107db5e58b92c0"
50
+ "falconPackageHash": "ec81d178cbb0e183057c2b0f1c66db58b946ef137d2b0e95dffbc891"
51
51
  }
@@ -12,6 +12,10 @@ type Host<Environment = unknown> = {
12
12
  }>;
13
13
  };
14
14
  environment?: Environment;
15
+ /**
16
+ * Optional name of the environment, use for logging
17
+ */
18
+ name?: string;
15
19
  /**
16
20
  * Optional bast url to use for API requests, for example `www.wixapis.com`
17
21
  */
@@ -271,6 +275,72 @@ type Except<ObjectType, KeysType extends keyof ObjectType, Options extends Excep
271
275
  ? Partial<Record<KeysType, never>>
272
276
  : {});
273
277
 
278
+ /**
279
+ Returns a boolean for whether the given type is `never`.
280
+
281
+ @link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
282
+ @link https://stackoverflow.com/a/53984913/10292952
283
+ @link https://www.zhenghao.io/posts/ts-never
284
+
285
+ Useful in type utilities, such as checking if something does not occur.
286
+
287
+ @example
288
+ ```
289
+ import type {IsNever, And} from 'type-fest';
290
+
291
+ // https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
292
+ type AreStringsEqual<A extends string, B extends string> =
293
+ And<
294
+ IsNever<Exclude<A, B>> extends true ? true : false,
295
+ IsNever<Exclude<B, A>> extends true ? true : false
296
+ >;
297
+
298
+ type EndIfEqual<I extends string, O extends string> =
299
+ AreStringsEqual<I, O> extends true
300
+ ? never
301
+ : void;
302
+
303
+ function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
304
+ if (input === output) {
305
+ process.exit(0);
306
+ }
307
+ }
308
+
309
+ endIfEqual('abc', 'abc');
310
+ //=> never
311
+
312
+ endIfEqual('abc', '123');
313
+ //=> void
314
+ ```
315
+
316
+ @category Type Guard
317
+ @category Utilities
318
+ */
319
+ type IsNever<T> = [T] extends [never] ? true : false;
320
+
321
+ /**
322
+ An if-else-like type that resolves depending on whether the given type is `never`.
323
+
324
+ @see {@link IsNever}
325
+
326
+ @example
327
+ ```
328
+ import type {IfNever} from 'type-fest';
329
+
330
+ type ShouldBeTrue = IfNever<never>;
331
+ //=> true
332
+
333
+ type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
334
+ //=> 'bar'
335
+ ```
336
+
337
+ @category Type Guard
338
+ @category Utilities
339
+ */
340
+ type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
341
+ IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
342
+ );
343
+
274
344
  /**
275
345
  Extract the keys from a type where the value type of the key extends the given `Condition`.
276
346
 
@@ -303,21 +373,19 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
303
373
 
304
374
  @category Object
305
375
  */
306
- type ConditionalKeys<Base, Condition> = NonNullable<
307
- // Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
376
+ type ConditionalKeys<Base, Condition> =
308
377
  {
309
378
  // Map through all the keys of the given base type.
310
- [Key in keyof Base]:
379
+ [Key in keyof Base]-?:
311
380
  // Pick only keys with types extending the given `Condition` type.
312
381
  Base[Key] extends Condition
313
- // Retain this key since the condition passes.
314
- ? Key
382
+ // Retain this key
383
+ // If the value for the key extends never, only include it if `Condition` also extends never
384
+ ? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
315
385
  // Discard this key since the condition fails.
316
386
  : never;
317
-
318
387
  // Convert the produced object into a union type of the keys which passed the conditional test.
319
- }[keyof Base]
320
- >;
388
+ }[keyof Base];
321
389
 
322
390
  /**
323
391
  Exclude keys from a shape that matches the given `Condition`.
@@ -434,12 +502,12 @@ interface Form$1 {
434
502
  * Date of creation.
435
503
  * @readonly
436
504
  */
437
- _createdDate?: Date;
505
+ _createdDate?: Date | null;
438
506
  /**
439
507
  * Date of last update.
440
508
  * @readonly
441
509
  */
442
- _updatedDate?: Date;
510
+ _updatedDate?: Date | null;
443
511
  /** Properties of the form. */
444
512
  properties?: FormProperties$1;
445
513
  /**
@@ -2198,12 +2266,12 @@ interface Metadata$1 {
2198
2266
  * @readonly
2199
2267
  * @deprecated
2200
2268
  */
2201
- createdTimestamp?: Date;
2269
+ createdTimestamp?: Date | null;
2202
2270
  /**
2203
2271
  * When the object was most recently updated.
2204
2272
  * @deprecated
2205
2273
  */
2206
- updatedTimestamp?: Date;
2274
+ updatedTimestamp?: Date | null;
2207
2275
  /** Object ID. */
2208
2276
  _id?: string | null;
2209
2277
  }
@@ -3416,9 +3484,7 @@ interface FormRule$1 {
3416
3484
  }
3417
3485
  declare enum OverrideEntityType$1 {
3418
3486
  UNKNOWN = "UNKNOWN",
3419
- FIELD = "FIELD",
3420
- FORM = "FORM",
3421
- NESTED_FORM_FIELD = "NESTED_FORM_FIELD"
3487
+ FIELD = "FIELD"
3422
3488
  }
3423
3489
  interface FormOverride$1 {
3424
3490
  /** Override entity type. */
@@ -3473,7 +3539,7 @@ interface LimitationRule$1 {
3473
3539
  /** Limitation by submission count, disables form when a set amount of submissions is reached. */
3474
3540
  maxAllowedSubmissions?: number | null;
3475
3541
  /** Limitation by submission date, disables form when a set date and time is reached. */
3476
- dateTimeDeadline?: Date;
3542
+ dateTimeDeadline?: Date | null;
3477
3543
  }
3478
3544
  declare enum SpamFilterProtectionLevel$1 {
3479
3545
  UNKNOWN = "UNKNOWN",
@@ -3949,7 +4015,7 @@ interface DomainEvent$2 extends DomainEventBodyOneOf$2 {
3949
4015
  /** ID of the entity associated with the event. */
3950
4016
  entityId?: string;
3951
4017
  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3952
- eventTime?: Date;
4018
+ eventTime?: Date | null;
3953
4019
  /**
3954
4020
  * Whether the event was triggered as a result of a privacy regulation application
3955
4021
  * (for example, GDPR).
@@ -3978,7 +4044,7 @@ interface EntityCreatedEvent$2 {
3978
4044
  entity?: string;
3979
4045
  }
3980
4046
  interface RestoreInfo$2 {
3981
- deletedDate?: Date;
4047
+ deletedDate?: Date | null;
3982
4048
  }
3983
4049
  interface EntityUpdatedEvent$2 {
3984
4050
  /**
@@ -4804,12 +4870,12 @@ interface UpdateForm {
4804
4870
  * Date of creation.
4805
4871
  * @readonly
4806
4872
  */
4807
- _createdDate?: Date;
4873
+ _createdDate?: Date | null;
4808
4874
  /**
4809
4875
  * Date of last update.
4810
4876
  * @readonly
4811
4877
  */
4812
- _updatedDate?: Date;
4878
+ _updatedDate?: Date | null;
4813
4879
  /** Properties of the form. */
4814
4880
  properties?: FormProperties$1;
4815
4881
  /**
@@ -5286,17 +5352,17 @@ interface FormSpamSubmissionReport {
5286
5352
  /** Identifies the reason why the submission was reported as spam. */
5287
5353
  reportReason?: ReportReason;
5288
5354
  /** Date of submission creation. If a submission was created in the past, pass the original submission creation date. */
5289
- _createdDate?: Date;
5355
+ _createdDate?: Date | null;
5290
5356
  /**
5291
5357
  * Date of form spam submission report creation.
5292
5358
  * @readonly
5293
5359
  */
5294
- reportedDate?: Date;
5360
+ reportedDate?: Date | null;
5295
5361
  /**
5296
5362
  * Date of last update.
5297
5363
  * @readonly
5298
5364
  */
5299
- _updatedDate?: Date;
5365
+ _updatedDate?: Date | null;
5300
5366
  /**
5301
5367
  * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision.
5302
5368
  * @readonly
@@ -5402,12 +5468,12 @@ interface FormSubmission$1 {
5402
5468
  /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
5403
5469
  submissions?: Record<string, any>;
5404
5470
  /** Date and time the form submission was created. */
5405
- _createdDate?: Date;
5471
+ _createdDate?: Date | null;
5406
5472
  /**
5407
5473
  * Date and time the form submission was updated.
5408
5474
  * @readonly
5409
5475
  */
5410
- _updatedDate?: Date;
5476
+ _updatedDate?: Date | null;
5411
5477
  /**
5412
5478
  * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
5413
5479
  * @readonly
@@ -5714,7 +5780,7 @@ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
5714
5780
  /** ID of the entity associated with the event. */
5715
5781
  entityId?: string;
5716
5782
  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
5717
- eventTime?: Date;
5783
+ eventTime?: Date | null;
5718
5784
  /**
5719
5785
  * Whether the event was triggered as a result of a privacy regulation application
5720
5786
  * (for example, GDPR).
@@ -5743,7 +5809,7 @@ interface EntityCreatedEvent$1 {
5743
5809
  entity?: string;
5744
5810
  }
5745
5811
  interface RestoreInfo$1 {
5746
- deletedDate?: Date;
5812
+ deletedDate?: Date | null;
5747
5813
  }
5748
5814
  interface EntityUpdatedEvent$1 {
5749
5815
  /**
@@ -6183,12 +6249,12 @@ interface FormSubmission {
6183
6249
  /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
6184
6250
  submissions?: Record<string, any>;
6185
6251
  /** Date and time the form submission was created. */
6186
- _createdDate?: Date;
6252
+ _createdDate?: Date | null;
6187
6253
  /**
6188
6254
  * Date and time the form submission was updated.
6189
6255
  * @readonly
6190
6256
  */
6191
- _updatedDate?: Date;
6257
+ _updatedDate?: Date | null;
6192
6258
  /**
6193
6259
  * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
6194
6260
  * @readonly
@@ -6307,7 +6373,7 @@ interface MarketingSubscriptionDetails {
6307
6373
  * Date and time the form submission was created.
6308
6374
  * @readonly
6309
6375
  */
6310
- submittedDate?: Date;
6376
+ submittedDate?: Date | null;
6311
6377
  /**
6312
6378
  * Subscription consent opt in level, either single or double confirmation.
6313
6379
  * Default: SINGLE_CONFIRMATION
@@ -6366,12 +6432,12 @@ interface Form {
6366
6432
  * Date of creation.
6367
6433
  * @readonly
6368
6434
  */
6369
- _createdDate?: Date;
6435
+ _createdDate?: Date | null;
6370
6436
  /**
6371
6437
  * Date of last update.
6372
6438
  * @readonly
6373
6439
  */
6374
- _updatedDate?: Date;
6440
+ _updatedDate?: Date | null;
6375
6441
  /** Properties of the form. */
6376
6442
  properties?: FormProperties;
6377
6443
  /**
@@ -8130,12 +8196,12 @@ interface Metadata {
8130
8196
  * @readonly
8131
8197
  * @deprecated
8132
8198
  */
8133
- createdTimestamp?: Date;
8199
+ createdTimestamp?: Date | null;
8134
8200
  /**
8135
8201
  * When the object was most recently updated.
8136
8202
  * @deprecated
8137
8203
  */
8138
- updatedTimestamp?: Date;
8204
+ updatedTimestamp?: Date | null;
8139
8205
  /** Object ID. */
8140
8206
  _id?: string | null;
8141
8207
  }
@@ -9348,9 +9414,7 @@ interface FormRule {
9348
9414
  }
9349
9415
  declare enum OverrideEntityType {
9350
9416
  UNKNOWN = "UNKNOWN",
9351
- FIELD = "FIELD",
9352
- FORM = "FORM",
9353
- NESTED_FORM_FIELD = "NESTED_FORM_FIELD"
9417
+ FIELD = "FIELD"
9354
9418
  }
9355
9419
  interface FormOverride {
9356
9420
  /** Override entity type. */
@@ -9394,7 +9458,7 @@ interface LimitationRule {
9394
9458
  /** Limitation by submission count, disables form when a set amount of submissions is reached. */
9395
9459
  maxAllowedSubmissions?: number | null;
9396
9460
  /** Limitation by submission date, disables form when a set date and time is reached. */
9397
- dateTimeDeadline?: Date;
9461
+ dateTimeDeadline?: Date | null;
9398
9462
  }
9399
9463
  declare enum SpamFilterProtectionLevel {
9400
9464
  UNKNOWN = "UNKNOWN",
@@ -9503,7 +9567,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
9503
9567
  /** ID of the entity associated with the event. */
9504
9568
  entityId?: string;
9505
9569
  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
9506
- eventTime?: Date;
9570
+ eventTime?: Date | null;
9507
9571
  /**
9508
9572
  * Whether the event was triggered as a result of a privacy regulation application
9509
9573
  * (for example, GDPR).
@@ -9532,7 +9596,7 @@ interface EntityCreatedEvent {
9532
9596
  entity?: string;
9533
9597
  }
9534
9598
  interface RestoreInfo {
9535
- deletedDate?: Date;
9599
+ deletedDate?: Date | null;
9536
9600
  }
9537
9601
  interface EntityUpdatedEvent {
9538
9602
  /**
@@ -10267,12 +10331,12 @@ interface UpdateSubmission {
10267
10331
  /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
10268
10332
  submissions?: Record<string, any>;
10269
10333
  /** Date and time the form submission was created. */
10270
- _createdDate?: Date;
10334
+ _createdDate?: Date | null;
10271
10335
  /**
10272
10336
  * Date and time the form submission was updated.
10273
10337
  * @readonly
10274
10338
  */
10275
- _updatedDate?: Date;
10339
+ _updatedDate?: Date | null;
10276
10340
  /**
10277
10341
  * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
10278
10342
  * @readonly
@@ -12,6 +12,10 @@ type Host<Environment = unknown> = {
12
12
  }>;
13
13
  };
14
14
  environment?: Environment;
15
+ /**
16
+ * Optional name of the environment, use for logging
17
+ */
18
+ name?: string;
15
19
  /**
16
20
  * Optional bast url to use for API requests, for example `www.wixapis.com`
17
21
  */
@@ -271,6 +275,72 @@ type Except<ObjectType, KeysType extends keyof ObjectType, Options extends Excep
271
275
  ? Partial<Record<KeysType, never>>
272
276
  : {});
273
277
 
278
+ /**
279
+ Returns a boolean for whether the given type is `never`.
280
+
281
+ @link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
282
+ @link https://stackoverflow.com/a/53984913/10292952
283
+ @link https://www.zhenghao.io/posts/ts-never
284
+
285
+ Useful in type utilities, such as checking if something does not occur.
286
+
287
+ @example
288
+ ```
289
+ import type {IsNever, And} from 'type-fest';
290
+
291
+ // https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
292
+ type AreStringsEqual<A extends string, B extends string> =
293
+ And<
294
+ IsNever<Exclude<A, B>> extends true ? true : false,
295
+ IsNever<Exclude<B, A>> extends true ? true : false
296
+ >;
297
+
298
+ type EndIfEqual<I extends string, O extends string> =
299
+ AreStringsEqual<I, O> extends true
300
+ ? never
301
+ : void;
302
+
303
+ function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
304
+ if (input === output) {
305
+ process.exit(0);
306
+ }
307
+ }
308
+
309
+ endIfEqual('abc', 'abc');
310
+ //=> never
311
+
312
+ endIfEqual('abc', '123');
313
+ //=> void
314
+ ```
315
+
316
+ @category Type Guard
317
+ @category Utilities
318
+ */
319
+ type IsNever<T> = [T] extends [never] ? true : false;
320
+
321
+ /**
322
+ An if-else-like type that resolves depending on whether the given type is `never`.
323
+
324
+ @see {@link IsNever}
325
+
326
+ @example
327
+ ```
328
+ import type {IfNever} from 'type-fest';
329
+
330
+ type ShouldBeTrue = IfNever<never>;
331
+ //=> true
332
+
333
+ type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
334
+ //=> 'bar'
335
+ ```
336
+
337
+ @category Type Guard
338
+ @category Utilities
339
+ */
340
+ type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
341
+ IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
342
+ );
343
+
274
344
  /**
275
345
  Extract the keys from a type where the value type of the key extends the given `Condition`.
276
346
 
@@ -303,21 +373,19 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
303
373
 
304
374
  @category Object
305
375
  */
306
- type ConditionalKeys<Base, Condition> = NonNullable<
307
- // Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
376
+ type ConditionalKeys<Base, Condition> =
308
377
  {
309
378
  // Map through all the keys of the given base type.
310
- [Key in keyof Base]:
379
+ [Key in keyof Base]-?:
311
380
  // Pick only keys with types extending the given `Condition` type.
312
381
  Base[Key] extends Condition
313
- // Retain this key since the condition passes.
314
- ? Key
382
+ // Retain this key
383
+ // If the value for the key extends never, only include it if `Condition` also extends never
384
+ ? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
315
385
  // Discard this key since the condition fails.
316
386
  : never;
317
-
318
387
  // Convert the produced object into a union type of the keys which passed the conditional test.
319
- }[keyof Base]
320
- >;
388
+ }[keyof Base];
321
389
 
322
390
  /**
323
391
  Exclude keys from a shape that matches the given `Condition`.
@@ -434,12 +502,12 @@ interface Form$1 {
434
502
  * Date of creation.
435
503
  * @readonly
436
504
  */
437
- _createdDate?: Date;
505
+ _createdDate?: Date | null;
438
506
  /**
439
507
  * Date of last update.
440
508
  * @readonly
441
509
  */
442
- _updatedDate?: Date;
510
+ _updatedDate?: Date | null;
443
511
  /** Properties of the form. */
444
512
  properties?: FormProperties$1;
445
513
  /**
@@ -2198,12 +2266,12 @@ interface Metadata$1 {
2198
2266
  * @readonly
2199
2267
  * @deprecated
2200
2268
  */
2201
- createdTimestamp?: Date;
2269
+ createdTimestamp?: Date | null;
2202
2270
  /**
2203
2271
  * When the object was most recently updated.
2204
2272
  * @deprecated
2205
2273
  */
2206
- updatedTimestamp?: Date;
2274
+ updatedTimestamp?: Date | null;
2207
2275
  /** Object ID. */
2208
2276
  _id?: string | null;
2209
2277
  }
@@ -3416,9 +3484,7 @@ interface FormRule$1 {
3416
3484
  }
3417
3485
  declare enum OverrideEntityType$1 {
3418
3486
  UNKNOWN = "UNKNOWN",
3419
- FIELD = "FIELD",
3420
- FORM = "FORM",
3421
- NESTED_FORM_FIELD = "NESTED_FORM_FIELD"
3487
+ FIELD = "FIELD"
3422
3488
  }
3423
3489
  interface FormOverride$1 {
3424
3490
  /** Override entity type. */
@@ -3473,7 +3539,7 @@ interface LimitationRule$1 {
3473
3539
  /** Limitation by submission count, disables form when a set amount of submissions is reached. */
3474
3540
  maxAllowedSubmissions?: number | null;
3475
3541
  /** Limitation by submission date, disables form when a set date and time is reached. */
3476
- dateTimeDeadline?: Date;
3542
+ dateTimeDeadline?: Date | null;
3477
3543
  }
3478
3544
  declare enum SpamFilterProtectionLevel$1 {
3479
3545
  UNKNOWN = "UNKNOWN",
@@ -3949,7 +4015,7 @@ interface DomainEvent$2 extends DomainEventBodyOneOf$2 {
3949
4015
  /** ID of the entity associated with the event. */
3950
4016
  entityId?: string;
3951
4017
  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3952
- eventTime?: Date;
4018
+ eventTime?: Date | null;
3953
4019
  /**
3954
4020
  * Whether the event was triggered as a result of a privacy regulation application
3955
4021
  * (for example, GDPR).
@@ -3978,7 +4044,7 @@ interface EntityCreatedEvent$2 {
3978
4044
  entity?: string;
3979
4045
  }
3980
4046
  interface RestoreInfo$2 {
3981
- deletedDate?: Date;
4047
+ deletedDate?: Date | null;
3982
4048
  }
3983
4049
  interface EntityUpdatedEvent$2 {
3984
4050
  /**
@@ -4804,12 +4870,12 @@ interface UpdateForm {
4804
4870
  * Date of creation.
4805
4871
  * @readonly
4806
4872
  */
4807
- _createdDate?: Date;
4873
+ _createdDate?: Date | null;
4808
4874
  /**
4809
4875
  * Date of last update.
4810
4876
  * @readonly
4811
4877
  */
4812
- _updatedDate?: Date;
4878
+ _updatedDate?: Date | null;
4813
4879
  /** Properties of the form. */
4814
4880
  properties?: FormProperties$1;
4815
4881
  /**
@@ -5286,17 +5352,17 @@ interface FormSpamSubmissionReport {
5286
5352
  /** Identifies the reason why the submission was reported as spam. */
5287
5353
  reportReason?: ReportReason;
5288
5354
  /** Date of submission creation. If a submission was created in the past, pass the original submission creation date. */
5289
- _createdDate?: Date;
5355
+ _createdDate?: Date | null;
5290
5356
  /**
5291
5357
  * Date of form spam submission report creation.
5292
5358
  * @readonly
5293
5359
  */
5294
- reportedDate?: Date;
5360
+ reportedDate?: Date | null;
5295
5361
  /**
5296
5362
  * Date of last update.
5297
5363
  * @readonly
5298
5364
  */
5299
- _updatedDate?: Date;
5365
+ _updatedDate?: Date | null;
5300
5366
  /**
5301
5367
  * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision.
5302
5368
  * @readonly
@@ -5402,12 +5468,12 @@ interface FormSubmission$1 {
5402
5468
  /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
5403
5469
  submissions?: Record<string, any>;
5404
5470
  /** Date and time the form submission was created. */
5405
- _createdDate?: Date;
5471
+ _createdDate?: Date | null;
5406
5472
  /**
5407
5473
  * Date and time the form submission was updated.
5408
5474
  * @readonly
5409
5475
  */
5410
- _updatedDate?: Date;
5476
+ _updatedDate?: Date | null;
5411
5477
  /**
5412
5478
  * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
5413
5479
  * @readonly
@@ -5714,7 +5780,7 @@ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
5714
5780
  /** ID of the entity associated with the event. */
5715
5781
  entityId?: string;
5716
5782
  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
5717
- eventTime?: Date;
5783
+ eventTime?: Date | null;
5718
5784
  /**
5719
5785
  * Whether the event was triggered as a result of a privacy regulation application
5720
5786
  * (for example, GDPR).
@@ -5743,7 +5809,7 @@ interface EntityCreatedEvent$1 {
5743
5809
  entity?: string;
5744
5810
  }
5745
5811
  interface RestoreInfo$1 {
5746
- deletedDate?: Date;
5812
+ deletedDate?: Date | null;
5747
5813
  }
5748
5814
  interface EntityUpdatedEvent$1 {
5749
5815
  /**
@@ -6183,12 +6249,12 @@ interface FormSubmission {
6183
6249
  /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
6184
6250
  submissions?: Record<string, any>;
6185
6251
  /** Date and time the form submission was created. */
6186
- _createdDate?: Date;
6252
+ _createdDate?: Date | null;
6187
6253
  /**
6188
6254
  * Date and time the form submission was updated.
6189
6255
  * @readonly
6190
6256
  */
6191
- _updatedDate?: Date;
6257
+ _updatedDate?: Date | null;
6192
6258
  /**
6193
6259
  * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
6194
6260
  * @readonly
@@ -6307,7 +6373,7 @@ interface MarketingSubscriptionDetails {
6307
6373
  * Date and time the form submission was created.
6308
6374
  * @readonly
6309
6375
  */
6310
- submittedDate?: Date;
6376
+ submittedDate?: Date | null;
6311
6377
  /**
6312
6378
  * Subscription consent opt in level, either single or double confirmation.
6313
6379
  * Default: SINGLE_CONFIRMATION
@@ -6366,12 +6432,12 @@ interface Form {
6366
6432
  * Date of creation.
6367
6433
  * @readonly
6368
6434
  */
6369
- _createdDate?: Date;
6435
+ _createdDate?: Date | null;
6370
6436
  /**
6371
6437
  * Date of last update.
6372
6438
  * @readonly
6373
6439
  */
6374
- _updatedDate?: Date;
6440
+ _updatedDate?: Date | null;
6375
6441
  /** Properties of the form. */
6376
6442
  properties?: FormProperties;
6377
6443
  /**
@@ -8130,12 +8196,12 @@ interface Metadata {
8130
8196
  * @readonly
8131
8197
  * @deprecated
8132
8198
  */
8133
- createdTimestamp?: Date;
8199
+ createdTimestamp?: Date | null;
8134
8200
  /**
8135
8201
  * When the object was most recently updated.
8136
8202
  * @deprecated
8137
8203
  */
8138
- updatedTimestamp?: Date;
8204
+ updatedTimestamp?: Date | null;
8139
8205
  /** Object ID. */
8140
8206
  _id?: string | null;
8141
8207
  }
@@ -9348,9 +9414,7 @@ interface FormRule {
9348
9414
  }
9349
9415
  declare enum OverrideEntityType {
9350
9416
  UNKNOWN = "UNKNOWN",
9351
- FIELD = "FIELD",
9352
- FORM = "FORM",
9353
- NESTED_FORM_FIELD = "NESTED_FORM_FIELD"
9417
+ FIELD = "FIELD"
9354
9418
  }
9355
9419
  interface FormOverride {
9356
9420
  /** Override entity type. */
@@ -9394,7 +9458,7 @@ interface LimitationRule {
9394
9458
  /** Limitation by submission count, disables form when a set amount of submissions is reached. */
9395
9459
  maxAllowedSubmissions?: number | null;
9396
9460
  /** Limitation by submission date, disables form when a set date and time is reached. */
9397
- dateTimeDeadline?: Date;
9461
+ dateTimeDeadline?: Date | null;
9398
9462
  }
9399
9463
  declare enum SpamFilterProtectionLevel {
9400
9464
  UNKNOWN = "UNKNOWN",
@@ -9503,7 +9567,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
9503
9567
  /** ID of the entity associated with the event. */
9504
9568
  entityId?: string;
9505
9569
  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
9506
- eventTime?: Date;
9570
+ eventTime?: Date | null;
9507
9571
  /**
9508
9572
  * Whether the event was triggered as a result of a privacy regulation application
9509
9573
  * (for example, GDPR).
@@ -9532,7 +9596,7 @@ interface EntityCreatedEvent {
9532
9596
  entity?: string;
9533
9597
  }
9534
9598
  interface RestoreInfo {
9535
- deletedDate?: Date;
9599
+ deletedDate?: Date | null;
9536
9600
  }
9537
9601
  interface EntityUpdatedEvent {
9538
9602
  /**
@@ -10267,12 +10331,12 @@ interface UpdateSubmission {
10267
10331
  /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
10268
10332
  submissions?: Record<string, any>;
10269
10333
  /** Date and time the form submission was created. */
10270
- _createdDate?: Date;
10334
+ _createdDate?: Date | null;
10271
10335
  /**
10272
10336
  * Date and time the form submission was updated.
10273
10337
  * @readonly
10274
10338
  */
10275
- _updatedDate?: Date;
10339
+ _updatedDate?: Date | null;
10276
10340
  /**
10277
10341
  * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
10278
10342
  * @readonly
@@ -24,12 +24,12 @@ interface Form$1 {
24
24
  * Date of creation.
25
25
  * @readonly
26
26
  */
27
- createdDate?: Date;
27
+ createdDate?: Date | null;
28
28
  /**
29
29
  * Date of last update.
30
30
  * @readonly
31
31
  */
32
- updatedDate?: Date;
32
+ updatedDate?: Date | null;
33
33
  /** Properties of the form. */
34
34
  properties?: FormProperties$1;
35
35
  /**
@@ -1759,12 +1759,12 @@ interface Metadata$1 {
1759
1759
  * @readonly
1760
1760
  * @deprecated
1761
1761
  */
1762
- createdTimestamp?: Date;
1762
+ createdTimestamp?: Date | null;
1763
1763
  /**
1764
1764
  * When the object was most recently updated.
1765
1765
  * @deprecated
1766
1766
  */
1767
- updatedTimestamp?: Date;
1767
+ updatedTimestamp?: Date | null;
1768
1768
  /** Object ID. */
1769
1769
  id?: string | null;
1770
1770
  }
@@ -3000,9 +3000,7 @@ interface FormRule$1 {
3000
3000
  }
3001
3001
  declare enum OverrideEntityType$1 {
3002
3002
  UNKNOWN = "UNKNOWN",
3003
- FIELD = "FIELD",
3004
- FORM = "FORM",
3005
- NESTED_FORM_FIELD = "NESTED_FORM_FIELD"
3003
+ FIELD = "FIELD"
3006
3004
  }
3007
3005
  interface FormOverride$1 {
3008
3006
  /** Override entity type. */
@@ -3051,7 +3049,7 @@ interface LimitationRule$1 {
3051
3049
  /** Limitation by submission count, disables form when a set amount of submissions is reached. */
3052
3050
  maxAllowedSubmissions?: number | null;
3053
3051
  /** Limitation by submission date, disables form when a set date and time is reached. */
3054
- dateTimeDeadline?: Date;
3052
+ dateTimeDeadline?: Date | null;
3055
3053
  }
3056
3054
  declare enum SpamFilterProtectionLevel$1 {
3057
3055
  UNKNOWN = "UNKNOWN",
@@ -4239,12 +4237,12 @@ interface Form {
4239
4237
  * Date of creation.
4240
4238
  * @readonly
4241
4239
  */
4242
- _createdDate?: Date;
4240
+ _createdDate?: Date | null;
4243
4241
  /**
4244
4242
  * Date of last update.
4245
4243
  * @readonly
4246
4244
  */
4247
- _updatedDate?: Date;
4245
+ _updatedDate?: Date | null;
4248
4246
  /** Properties of the form. */
4249
4247
  properties?: FormProperties;
4250
4248
  /**
@@ -5974,12 +5972,12 @@ interface Metadata {
5974
5972
  * @readonly
5975
5973
  * @deprecated
5976
5974
  */
5977
- createdTimestamp?: Date;
5975
+ createdTimestamp?: Date | null;
5978
5976
  /**
5979
5977
  * When the object was most recently updated.
5980
5978
  * @deprecated
5981
5979
  */
5982
- updatedTimestamp?: Date;
5980
+ updatedTimestamp?: Date | null;
5983
5981
  /** Object ID. */
5984
5982
  _id?: string | null;
5985
5983
  }
@@ -7192,9 +7190,7 @@ interface FormRule {
7192
7190
  }
7193
7191
  declare enum OverrideEntityType {
7194
7192
  UNKNOWN = "UNKNOWN",
7195
- FIELD = "FIELD",
7196
- FORM = "FORM",
7197
- NESTED_FORM_FIELD = "NESTED_FORM_FIELD"
7193
+ FIELD = "FIELD"
7198
7194
  }
7199
7195
  interface FormOverride {
7200
7196
  /** Override entity type. */
@@ -7243,7 +7239,7 @@ interface LimitationRule {
7243
7239
  /** Limitation by submission count, disables form when a set amount of submissions is reached. */
7244
7240
  maxAllowedSubmissions?: number | null;
7245
7241
  /** Limitation by submission date, disables form when a set date and time is reached. */
7246
- dateTimeDeadline?: Date;
7242
+ dateTimeDeadline?: Date | null;
7247
7243
  }
7248
7244
  declare enum SpamFilterProtectionLevel {
7249
7245
  UNKNOWN = "UNKNOWN",
@@ -8488,17 +8484,17 @@ interface FormSpamSubmissionReport$1 {
8488
8484
  /** Identifies the reason why the submission was reported as spam. */
8489
8485
  reportReason?: ReportReason$1;
8490
8486
  /** Date of submission creation. If a submission was created in the past, pass the original submission creation date. */
8491
- createdDate?: Date;
8487
+ createdDate?: Date | null;
8492
8488
  /**
8493
8489
  * Date of form spam submission report creation.
8494
8490
  * @readonly
8495
8491
  */
8496
- reportedDate?: Date;
8492
+ reportedDate?: Date | null;
8497
8493
  /**
8498
8494
  * Date of last update.
8499
8495
  * @readonly
8500
8496
  */
8501
- updatedDate?: Date;
8497
+ updatedDate?: Date | null;
8502
8498
  /**
8503
8499
  * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision.
8504
8500
  * @readonly
@@ -8604,12 +8600,12 @@ interface FormSubmission$3 {
8604
8600
  /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
8605
8601
  submissions?: Record<string, any>;
8606
8602
  /** Date and time the form submission was created. */
8607
- createdDate?: Date;
8603
+ createdDate?: Date | null;
8608
8604
  /**
8609
8605
  * Date and time the form submission was updated.
8610
8606
  * @readonly
8611
8607
  */
8612
- updatedDate?: Date;
8608
+ updatedDate?: Date | null;
8613
8609
  /**
8614
8610
  * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
8615
8611
  * @readonly
@@ -9007,17 +9003,17 @@ interface FormSpamSubmissionReport {
9007
9003
  /** Identifies the reason why the submission was reported as spam. */
9008
9004
  reportReason?: ReportReason;
9009
9005
  /** Date of submission creation. If a submission was created in the past, pass the original submission creation date. */
9010
- _createdDate?: Date;
9006
+ _createdDate?: Date | null;
9011
9007
  /**
9012
9008
  * Date of form spam submission report creation.
9013
9009
  * @readonly
9014
9010
  */
9015
- reportedDate?: Date;
9011
+ reportedDate?: Date | null;
9016
9012
  /**
9017
9013
  * Date of last update.
9018
9014
  * @readonly
9019
9015
  */
9020
- _updatedDate?: Date;
9016
+ _updatedDate?: Date | null;
9021
9017
  /**
9022
9018
  * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision.
9023
9019
  * @readonly
@@ -9123,12 +9119,12 @@ interface FormSubmission$2 {
9123
9119
  /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
9124
9120
  submissions?: Record<string, any>;
9125
9121
  /** Date and time the form submission was created. */
9126
- _createdDate?: Date;
9122
+ _createdDate?: Date | null;
9127
9123
  /**
9128
9124
  * Date and time the form submission was updated.
9129
9125
  * @readonly
9130
9126
  */
9131
- _updatedDate?: Date;
9127
+ _updatedDate?: Date | null;
9132
9128
  /**
9133
9129
  * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
9134
9130
  * @readonly
@@ -9574,12 +9570,12 @@ interface FormSubmission$1 {
9574
9570
  /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
9575
9571
  submissions?: Record<string, any>;
9576
9572
  /** Date and time the form submission was created. */
9577
- createdDate?: Date;
9573
+ createdDate?: Date | null;
9578
9574
  /**
9579
9575
  * Date and time the form submission was updated.
9580
9576
  * @readonly
9581
9577
  */
9582
- updatedDate?: Date;
9578
+ updatedDate?: Date | null;
9583
9579
  /**
9584
9580
  * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
9585
9581
  * @readonly
@@ -10285,12 +10281,12 @@ interface FormSubmission {
10285
10281
  /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
10286
10282
  submissions?: Record<string, any>;
10287
10283
  /** Date and time the form submission was created. */
10288
- _createdDate?: Date;
10284
+ _createdDate?: Date | null;
10289
10285
  /**
10290
10286
  * Date and time the form submission was updated.
10291
10287
  * @readonly
10292
10288
  */
10293
- _updatedDate?: Date;
10289
+ _updatedDate?: Date | null;
10294
10290
  /**
10295
10291
  * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
10296
10292
  * @readonly
@@ -36,12 +36,12 @@ interface FormSubmission {
36
36
  /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
37
37
  submissions?: Record<string, any>;
38
38
  /** Date and time the form submission was created. */
39
- _createdDate?: Date;
39
+ _createdDate?: Date | null;
40
40
  /**
41
41
  * Date and time the form submission was updated.
42
42
  * @readonly
43
43
  */
44
- _updatedDate?: Date;
44
+ _updatedDate?: Date | null;
45
45
  /**
46
46
  * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
47
47
  * @readonly
@@ -299,26 +299,27 @@ interface IdentificationDataIdOneOf {
299
299
  appId?: string;
300
300
  }
301
301
 
302
- type ServicePluginMethodInput$1 = {
302
+ type ServicePluginMethodInput = {
303
303
  request: any;
304
304
  metadata: any;
305
305
  };
306
- type ServicePluginContract$1 = Record<string, (payload: ServicePluginMethodInput$1) => unknown | Promise<unknown>>;
307
- type ServicePluginMethodMetadata$1 = {
306
+ type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
307
+ type ServicePluginMethodMetadata = {
308
308
  name: string;
309
309
  primaryHttpMappingPath: string;
310
310
  transformations: {
311
- fromREST: (...args: unknown[]) => ServicePluginMethodInput$1;
311
+ fromREST: (...args: unknown[]) => ServicePluginMethodInput;
312
312
  toREST: (...args: unknown[]) => unknown;
313
313
  };
314
314
  };
315
- type ServicePluginDefinition$1<Contract extends ServicePluginContract$1> = {
315
+ type ServicePluginDefinition<Contract extends ServicePluginContract> = {
316
316
  __type: 'service-plugin-definition';
317
317
  componentType: string;
318
- methods: ServicePluginMethodMetadata$1[];
318
+ methods: ServicePluginMethodMetadata[];
319
319
  __contract: Contract;
320
320
  };
321
- declare function ServicePluginDefinition$1<Contract extends ServicePluginContract$1>(componentType: string, methods: ServicePluginMethodMetadata$1[]): ServicePluginDefinition$1<Contract>;
321
+ declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
322
+ type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
322
323
 
323
324
  declare global {
324
325
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -336,7 +337,7 @@ interface ValidateSubmissionEnvelope {
336
337
  request: ValidateSubmissionRequest;
337
338
  metadata: Context;
338
339
  }
339
- declare const provideHandlers$1: ServicePluginDefinition$1<{
340
+ declare const provideHandlers$1: ServicePluginDefinition<{
340
341
  /**
341
342
  *
342
343
  * > **Note:** The Form Submission service plugin only works with the Wix Forms app.
@@ -347,35 +348,6 @@ declare const provideHandlers$1: ServicePluginDefinition$1<{
347
348
  validateSubmission(payload: ValidateSubmissionEnvelope): ValidateSubmissionResponse | Promise<ValidateSubmissionResponse>;
348
349
  }>;
349
350
 
350
- type ServicePluginMethodInput = {
351
- request: any;
352
- metadata: any;
353
- };
354
- type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
355
- type ServicePluginMethodMetadata = {
356
- name: string;
357
- primaryHttpMappingPath: string;
358
- transformations: {
359
- fromREST: (...args: unknown[]) => ServicePluginMethodInput;
360
- toREST: (...args: unknown[]) => unknown;
361
- };
362
- };
363
- type ServicePluginDefinition<Contract extends ServicePluginContract> = {
364
- __type: 'service-plugin-definition';
365
- componentType: string;
366
- methods: ServicePluginMethodMetadata[];
367
- __contract: Contract;
368
- };
369
- declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
370
- type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
371
-
372
- declare global {
373
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
374
- interface SymbolConstructor {
375
- readonly observable: symbol;
376
- }
377
- }
378
-
379
351
  declare function createServicePluginModule<T extends ServicePluginDefinition<any>>(servicePluginDefinition: T): BuildServicePluginDefinition<T> & T;
380
352
 
381
353
  type _publicProvideHandlersType = typeof provideHandlers$1;
@@ -36,12 +36,12 @@ interface FormSubmission {
36
36
  /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
37
37
  submissions?: Record<string, any>;
38
38
  /** Date and time the form submission was created. */
39
- _createdDate?: Date;
39
+ _createdDate?: Date | null;
40
40
  /**
41
41
  * Date and time the form submission was updated.
42
42
  * @readonly
43
43
  */
44
- _updatedDate?: Date;
44
+ _updatedDate?: Date | null;
45
45
  /**
46
46
  * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
47
47
  * @readonly
@@ -299,26 +299,27 @@ interface IdentificationDataIdOneOf {
299
299
  appId?: string;
300
300
  }
301
301
 
302
- type ServicePluginMethodInput$1 = {
302
+ type ServicePluginMethodInput = {
303
303
  request: any;
304
304
  metadata: any;
305
305
  };
306
- type ServicePluginContract$1 = Record<string, (payload: ServicePluginMethodInput$1) => unknown | Promise<unknown>>;
307
- type ServicePluginMethodMetadata$1 = {
306
+ type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
307
+ type ServicePluginMethodMetadata = {
308
308
  name: string;
309
309
  primaryHttpMappingPath: string;
310
310
  transformations: {
311
- fromREST: (...args: unknown[]) => ServicePluginMethodInput$1;
311
+ fromREST: (...args: unknown[]) => ServicePluginMethodInput;
312
312
  toREST: (...args: unknown[]) => unknown;
313
313
  };
314
314
  };
315
- type ServicePluginDefinition$1<Contract extends ServicePluginContract$1> = {
315
+ type ServicePluginDefinition<Contract extends ServicePluginContract> = {
316
316
  __type: 'service-plugin-definition';
317
317
  componentType: string;
318
- methods: ServicePluginMethodMetadata$1[];
318
+ methods: ServicePluginMethodMetadata[];
319
319
  __contract: Contract;
320
320
  };
321
- declare function ServicePluginDefinition$1<Contract extends ServicePluginContract$1>(componentType: string, methods: ServicePluginMethodMetadata$1[]): ServicePluginDefinition$1<Contract>;
321
+ declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
322
+ type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
322
323
 
323
324
  declare global {
324
325
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -336,7 +337,7 @@ interface ValidateSubmissionEnvelope {
336
337
  request: ValidateSubmissionRequest;
337
338
  metadata: Context;
338
339
  }
339
- declare const provideHandlers$1: ServicePluginDefinition$1<{
340
+ declare const provideHandlers$1: ServicePluginDefinition<{
340
341
  /**
341
342
  *
342
343
  * > **Note:** The Form Submission service plugin only works with the Wix Forms app.
@@ -347,35 +348,6 @@ declare const provideHandlers$1: ServicePluginDefinition$1<{
347
348
  validateSubmission(payload: ValidateSubmissionEnvelope): ValidateSubmissionResponse | Promise<ValidateSubmissionResponse>;
348
349
  }>;
349
350
 
350
- type ServicePluginMethodInput = {
351
- request: any;
352
- metadata: any;
353
- };
354
- type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
355
- type ServicePluginMethodMetadata = {
356
- name: string;
357
- primaryHttpMappingPath: string;
358
- transformations: {
359
- fromREST: (...args: unknown[]) => ServicePluginMethodInput;
360
- toREST: (...args: unknown[]) => unknown;
361
- };
362
- };
363
- type ServicePluginDefinition<Contract extends ServicePluginContract> = {
364
- __type: 'service-plugin-definition';
365
- componentType: string;
366
- methods: ServicePluginMethodMetadata[];
367
- __contract: Contract;
368
- };
369
- declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
370
- type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
371
-
372
- declare global {
373
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
374
- interface SymbolConstructor {
375
- readonly observable: symbol;
376
- }
377
- }
378
-
379
351
  declare function createServicePluginModule<T extends ServicePluginDefinition<any>>(servicePluginDefinition: T): BuildServicePluginDefinition<T> & T;
380
352
 
381
353
  type _publicProvideHandlersType = typeof provideHandlers$1;