@wix/reports 1.0.0 → 1.0.1
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 +3 -3
- package/type-bundles/context.bundle.d.ts +217 -91
- package/type-bundles/index.bundle.d.ts +217 -91
- package/type-bundles/meta.bundle.d.ts +102 -70
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/reports",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"type-bundles"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@wix/reports_reports": "1.0.
|
|
24
|
+
"@wix/reports_reports": "1.0.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"glob": "^10.4.1",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"fqdn": ""
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
"falconPackageHash": "
|
|
49
|
+
"falconPackageHash": "f5cdaeb6bc8ffcc7ffeab6ab6ae0beb468be564bdcfa704368ae835c"
|
|
50
50
|
}
|
|
@@ -476,43 +476,43 @@ type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
|
476
476
|
host: Host;
|
|
477
477
|
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
478
478
|
|
|
479
|
-
/**
|
|
480
|
-
* A Report is an entity defining a UoU complaint with a reason on the site
|
|
481
|
-
* You can report an entity from a select number of reasons, also providing details for the report
|
|
482
|
-
*/
|
|
483
479
|
interface Report {
|
|
484
480
|
/**
|
|
485
481
|
* Report ID.
|
|
486
482
|
* @readonly
|
|
487
483
|
*/
|
|
488
484
|
_id?: string | null;
|
|
489
|
-
/** Reported entity name */
|
|
485
|
+
/** Reported entity name. For example, `comment`. */
|
|
490
486
|
entityName?: string;
|
|
491
|
-
/** Reported entity ID */
|
|
487
|
+
/** Reported entity ID. */
|
|
492
488
|
entityId?: string;
|
|
493
489
|
/**
|
|
494
|
-
* Identity of who
|
|
490
|
+
* Identity of who created a report.
|
|
495
491
|
* @readonly
|
|
496
492
|
*/
|
|
497
493
|
identity?: CommonIdentificationData;
|
|
498
|
-
/** Reason for
|
|
494
|
+
/** Reason for report. */
|
|
499
495
|
reason?: Reason;
|
|
500
496
|
/**
|
|
501
|
-
* Revision number, which increments by 1 each time the
|
|
497
|
+
* Revision number, which increments by 1 each time the rule is updated. To prevent conflicting changes, the existing revision must be used when updating a rule.
|
|
502
498
|
* @readonly
|
|
503
499
|
*/
|
|
504
500
|
revision?: string | null;
|
|
505
501
|
/**
|
|
506
|
-
* Date and time the
|
|
502
|
+
* Date and time when the report was created.
|
|
507
503
|
* @readonly
|
|
508
504
|
*/
|
|
509
505
|
_createdDate?: Date | null;
|
|
510
506
|
/**
|
|
511
|
-
* Date and time the
|
|
507
|
+
* Date and time when the report was updated.
|
|
512
508
|
* @readonly
|
|
513
509
|
*/
|
|
514
510
|
_updatedDate?: Date | null;
|
|
515
|
-
/**
|
|
511
|
+
/**
|
|
512
|
+
* Custom field data for the rule object.
|
|
513
|
+
*
|
|
514
|
+
* **Note:** You must configure extended fields using schema plugin extensions in your app's dashboard before you can access the extended fields with API calls.
|
|
515
|
+
*/
|
|
516
516
|
extendedFields?: ExtendedFields;
|
|
517
517
|
}
|
|
518
518
|
interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
@@ -541,27 +541,43 @@ declare enum IdentityType {
|
|
|
541
541
|
APP = "APP"
|
|
542
542
|
}
|
|
543
543
|
interface Reason {
|
|
544
|
-
/**
|
|
544
|
+
/** Report reason type. */
|
|
545
545
|
reasonType?: Type;
|
|
546
|
-
/**
|
|
546
|
+
/** Details of why the entity is reported. */
|
|
547
547
|
details?: string | null;
|
|
548
548
|
}
|
|
549
549
|
declare enum Type {
|
|
550
|
+
/** Unknown type. This value is not used. */
|
|
550
551
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
552
|
+
/** Entity is reported for other reasons, specify in `details`. */
|
|
551
553
|
OTHER = "OTHER",
|
|
554
|
+
/** Entity is reported for spam. */
|
|
552
555
|
SPAM = "SPAM",
|
|
556
|
+
/** Entity is reported for nudity. */
|
|
553
557
|
NUDITY_OR_SEXUAL_HARASSMENT = "NUDITY_OR_SEXUAL_HARASSMENT",
|
|
558
|
+
/** Entity is reported for hate speech. */
|
|
554
559
|
HATE_SPEECH_OR_SYMBOLS = "HATE_SPEECH_OR_SYMBOLS",
|
|
560
|
+
/** Entity is reported for false information. */
|
|
555
561
|
FALSE_INFORMATION = "FALSE_INFORMATION",
|
|
562
|
+
/** Entity is reported for community guidelines violation. */
|
|
556
563
|
COMMUNITY_GUIDELINES_VIOLATION = "COMMUNITY_GUIDELINES_VIOLATION",
|
|
564
|
+
/** Entity is reported for violence. */
|
|
557
565
|
VIOLENCE = "VIOLENCE",
|
|
566
|
+
/** Entity is reported for mentioning suicide. */
|
|
558
567
|
SUICIDE_OR_SELF_INJURY = "SUICIDE_OR_SELF_INJURY",
|
|
568
|
+
/** Entity is reported for unuathorized sales. */
|
|
559
569
|
UNAUTHORIZED_SALES = "UNAUTHORIZED_SALES",
|
|
570
|
+
/** Entity is reported for mentioning an eating disorder. */
|
|
560
571
|
EATING_DISORDER = "EATING_DISORDER",
|
|
572
|
+
/** Entity is reported for involving a minor. */
|
|
561
573
|
INVOLVES_A_CHILD = "INVOLVES_A_CHILD",
|
|
574
|
+
/** Entity is reported for mentioning terrorism. */
|
|
562
575
|
TERRORISM = "TERRORISM",
|
|
576
|
+
/** Entity is reported for mentioning drugs. */
|
|
563
577
|
DRUGS = "DRUGS",
|
|
578
|
+
/** Entity is reported for unlawful actions. */
|
|
564
579
|
UNLAWFUL = "UNLAWFUL",
|
|
580
|
+
/** Entity is reported for exposing identifying info. */
|
|
565
581
|
EXPOSING_IDENTIFYING_INFO = "EXPOSING_IDENTIFYING_INFO"
|
|
566
582
|
}
|
|
567
583
|
interface ExtendedFields {
|
|
@@ -576,85 +592,85 @@ interface ExtendedFields {
|
|
|
576
592
|
namespaces?: Record<string, Record<string, any>>;
|
|
577
593
|
}
|
|
578
594
|
interface EntityReportSummaryChanged {
|
|
579
|
-
/** Reported entity name */
|
|
595
|
+
/** Reported entity name. */
|
|
580
596
|
entityName?: string;
|
|
581
|
-
/** Reported entity ID */
|
|
597
|
+
/** Reported entity ID. */
|
|
582
598
|
entityId?: string;
|
|
583
|
-
/**
|
|
599
|
+
/** Number of reports. */
|
|
584
600
|
reportCount?: number;
|
|
585
|
-
/**
|
|
601
|
+
/** Number of reports per reason type. */
|
|
586
602
|
reasonCounts?: ReasonCount[];
|
|
587
603
|
}
|
|
588
604
|
interface ReasonCount {
|
|
589
|
-
/** Reason type */
|
|
605
|
+
/** Reason type. */
|
|
590
606
|
reasonType?: Type;
|
|
591
|
-
/**
|
|
607
|
+
/** Number of reports. */
|
|
592
608
|
count?: number;
|
|
593
609
|
}
|
|
594
610
|
interface CreateReportRequest {
|
|
595
|
-
/** Report
|
|
611
|
+
/** Report details. */
|
|
596
612
|
report: Report;
|
|
597
613
|
}
|
|
598
614
|
interface CreateReportResponse {
|
|
599
|
-
/**
|
|
615
|
+
/** Created report. */
|
|
600
616
|
report?: Report;
|
|
601
617
|
}
|
|
602
618
|
interface GetReportRequest {
|
|
603
|
-
/** ID of the
|
|
619
|
+
/** ID of the report to retrieve. */
|
|
604
620
|
reportId: string;
|
|
605
621
|
}
|
|
606
622
|
interface GetReportResponse {
|
|
607
|
-
/**
|
|
623
|
+
/** Retrieved report. */
|
|
608
624
|
report?: Report;
|
|
609
625
|
}
|
|
610
626
|
interface UpdateReportRequest {
|
|
611
|
-
/** Report to
|
|
627
|
+
/** Report to update. */
|
|
612
628
|
report: Report;
|
|
613
629
|
}
|
|
614
630
|
interface UpdateReportResponse {
|
|
615
|
-
/** Updated
|
|
631
|
+
/** Updated report. */
|
|
616
632
|
report?: Report;
|
|
617
633
|
}
|
|
618
634
|
interface DeleteReportRequest {
|
|
619
|
-
/**
|
|
635
|
+
/** ID of the report to delete. */
|
|
620
636
|
reportId: string;
|
|
621
637
|
}
|
|
622
638
|
interface DeleteReportResponse {
|
|
623
639
|
}
|
|
624
640
|
interface UpsertReportRequest {
|
|
625
|
-
/** Report to
|
|
641
|
+
/** Report to create or update. */
|
|
626
642
|
report?: Report;
|
|
627
643
|
}
|
|
628
644
|
interface UpsertReportResponse {
|
|
629
|
-
/** Updated or created
|
|
645
|
+
/** Updated or created report. */
|
|
630
646
|
report?: Report;
|
|
631
647
|
}
|
|
632
648
|
interface BulkDeleteReportsByFilterRequest {
|
|
633
|
-
/**
|
|
649
|
+
/** Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details. */
|
|
634
650
|
filter: Record<string, any> | null;
|
|
635
651
|
}
|
|
636
652
|
interface BulkDeleteReportsByFilterResponse {
|
|
637
|
-
/**
|
|
653
|
+
/** Job ID. Pass this ID to [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/introduction) to retrieve job details and metadata. */
|
|
638
654
|
jobId?: string;
|
|
639
655
|
}
|
|
640
656
|
interface CountReportsByReasonTypesRequest {
|
|
641
|
-
/**
|
|
657
|
+
/** Reported entity name. For example, `comment`. */
|
|
642
658
|
entityName: string;
|
|
643
|
-
/** ID of the entity. */
|
|
659
|
+
/** ID of the reported entity. */
|
|
644
660
|
entityId: string;
|
|
645
661
|
}
|
|
646
662
|
interface CountReportsByReasonTypesResponse {
|
|
647
|
-
/**
|
|
663
|
+
/** List of reports grouped by the reason type. */
|
|
648
664
|
reasonTypeCount?: ReasonTypeCount[];
|
|
649
665
|
}
|
|
650
666
|
interface ReasonTypeCount {
|
|
651
|
-
/**
|
|
667
|
+
/** Reason for report. */
|
|
652
668
|
reasonType?: Type;
|
|
653
|
-
/**
|
|
669
|
+
/** Number of reports by reason type. */
|
|
654
670
|
count?: number;
|
|
655
671
|
}
|
|
656
672
|
interface QueryReportsRequest {
|
|
657
|
-
/**
|
|
673
|
+
/** Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details. */
|
|
658
674
|
query?: CursorQuery;
|
|
659
675
|
}
|
|
660
676
|
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
@@ -690,9 +706,9 @@ interface CursorPaging {
|
|
|
690
706
|
cursor?: string | null;
|
|
691
707
|
}
|
|
692
708
|
interface QueryReportsResponse {
|
|
693
|
-
/** List of
|
|
709
|
+
/** List of reports. */
|
|
694
710
|
reports?: Report[];
|
|
695
|
-
/** Paging metadata */
|
|
711
|
+
/** Paging metadata. */
|
|
696
712
|
pagingMetadata?: CursorPagingMetadata;
|
|
697
713
|
}
|
|
698
714
|
interface CursorPagingMetadata {
|
|
@@ -710,7 +726,7 @@ interface Cursors {
|
|
|
710
726
|
prev?: string | null;
|
|
711
727
|
}
|
|
712
728
|
interface UpdateExtendedFieldsRequest {
|
|
713
|
-
/** ID of the
|
|
729
|
+
/** ID of the report to update. */
|
|
714
730
|
_id: string;
|
|
715
731
|
/** Identifier for the app whose extended fields are being updated. */
|
|
716
732
|
namespace: string;
|
|
@@ -718,7 +734,7 @@ interface UpdateExtendedFieldsRequest {
|
|
|
718
734
|
namespaceData: Record<string, any> | null;
|
|
719
735
|
}
|
|
720
736
|
interface UpdateExtendedFieldsResponse {
|
|
721
|
-
/** Updated
|
|
737
|
+
/** Updated report. */
|
|
722
738
|
report?: Report;
|
|
723
739
|
}
|
|
724
740
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -877,39 +893,105 @@ interface QueryReportsResponseNonNullableFields {
|
|
|
877
893
|
interface UpdateExtendedFieldsResponseNonNullableFields {
|
|
878
894
|
report?: ReportNonNullableFields;
|
|
879
895
|
}
|
|
896
|
+
interface BaseEventMetadata {
|
|
897
|
+
/** App instance ID. */
|
|
898
|
+
instanceId?: string | null;
|
|
899
|
+
/** Event type. */
|
|
900
|
+
eventType?: string;
|
|
901
|
+
/** The identification type and identity data. */
|
|
902
|
+
identity?: IdentificationData;
|
|
903
|
+
}
|
|
904
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
905
|
+
/**
|
|
906
|
+
* Unique event ID.
|
|
907
|
+
* Allows clients to ignore duplicate webhooks.
|
|
908
|
+
*/
|
|
909
|
+
_id?: string;
|
|
910
|
+
/**
|
|
911
|
+
* Assumes actions are also always typed to an entity_type
|
|
912
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
913
|
+
*/
|
|
914
|
+
entityFqdn?: string;
|
|
915
|
+
/**
|
|
916
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
917
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
918
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
919
|
+
*/
|
|
920
|
+
slug?: string;
|
|
921
|
+
/** ID of the entity associated with the event. */
|
|
922
|
+
entityId?: string;
|
|
923
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
924
|
+
eventTime?: Date | null;
|
|
925
|
+
/**
|
|
926
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
927
|
+
* (for example, GDPR).
|
|
928
|
+
*/
|
|
929
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
930
|
+
/** If present, indicates the action that triggered the event. */
|
|
931
|
+
originatedFrom?: string | null;
|
|
932
|
+
/**
|
|
933
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
934
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
935
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
936
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
937
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
938
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
939
|
+
*/
|
|
940
|
+
entityEventSequence?: string | null;
|
|
941
|
+
}
|
|
942
|
+
interface ReportCreatedEnvelope {
|
|
943
|
+
entity: Report;
|
|
944
|
+
metadata: EventMetadata;
|
|
945
|
+
}
|
|
946
|
+
interface ReportDeletedEnvelope {
|
|
947
|
+
entity: Report;
|
|
948
|
+
metadata: EventMetadata;
|
|
949
|
+
}
|
|
950
|
+
interface ReportEntityReportSummaryChangedEnvelope {
|
|
951
|
+
data: EntityReportSummaryChanged;
|
|
952
|
+
metadata: EventMetadata;
|
|
953
|
+
}
|
|
954
|
+
interface ReportUpdatedEnvelope {
|
|
955
|
+
entity: Report;
|
|
956
|
+
metadata: EventMetadata;
|
|
957
|
+
}
|
|
880
958
|
interface UpdateReport {
|
|
881
959
|
/**
|
|
882
960
|
* Report ID.
|
|
883
961
|
* @readonly
|
|
884
962
|
*/
|
|
885
963
|
_id?: string | null;
|
|
886
|
-
/** Reported entity name */
|
|
964
|
+
/** Reported entity name. For example, `comment`. */
|
|
887
965
|
entityName?: string;
|
|
888
|
-
/** Reported entity ID */
|
|
966
|
+
/** Reported entity ID. */
|
|
889
967
|
entityId?: string;
|
|
890
968
|
/**
|
|
891
|
-
* Identity of who
|
|
969
|
+
* Identity of who created a report.
|
|
892
970
|
* @readonly
|
|
893
971
|
*/
|
|
894
972
|
identity?: CommonIdentificationData;
|
|
895
|
-
/** Reason for
|
|
973
|
+
/** Reason for report. */
|
|
896
974
|
reason?: Reason;
|
|
897
975
|
/**
|
|
898
|
-
* Revision number, which increments by 1 each time the
|
|
976
|
+
* Revision number, which increments by 1 each time the rule is updated. To prevent conflicting changes, the existing revision must be used when updating a rule.
|
|
899
977
|
* @readonly
|
|
900
978
|
*/
|
|
901
979
|
revision?: string | null;
|
|
902
980
|
/**
|
|
903
|
-
* Date and time the
|
|
981
|
+
* Date and time when the report was created.
|
|
904
982
|
* @readonly
|
|
905
983
|
*/
|
|
906
984
|
_createdDate?: Date | null;
|
|
907
985
|
/**
|
|
908
|
-
* Date and time the
|
|
986
|
+
* Date and time when the report was updated.
|
|
909
987
|
* @readonly
|
|
910
988
|
*/
|
|
911
989
|
_updatedDate?: Date | null;
|
|
912
|
-
/**
|
|
990
|
+
/**
|
|
991
|
+
* Custom field data for the rule object.
|
|
992
|
+
*
|
|
993
|
+
* **Note:** You must configure extended fields using schema plugin extensions in your app's dashboard before you can access the extended fields with API calls.
|
|
994
|
+
*/
|
|
913
995
|
extendedFields?: ExtendedFields;
|
|
914
996
|
}
|
|
915
997
|
interface UpsertReportOptions {
|
|
@@ -920,39 +1002,43 @@ interface UpsertReportOptions {
|
|
|
920
1002
|
*/
|
|
921
1003
|
_id?: string | null;
|
|
922
1004
|
/**
|
|
923
|
-
* Identity of who
|
|
1005
|
+
* Identity of who created a report.
|
|
924
1006
|
* @readonly
|
|
925
1007
|
*/
|
|
926
1008
|
identity?: CommonIdentificationData;
|
|
927
|
-
/** Reason for
|
|
1009
|
+
/** Reason for report. */
|
|
928
1010
|
reason?: Reason;
|
|
929
1011
|
/**
|
|
930
|
-
* Revision number, which increments by 1 each time the
|
|
1012
|
+
* Revision number, which increments by 1 each time the rule is updated. To prevent conflicting changes, the existing revision must be used when updating a rule.
|
|
931
1013
|
* @readonly
|
|
932
1014
|
*/
|
|
933
1015
|
revision?: string | null;
|
|
934
1016
|
/**
|
|
935
|
-
* Date and time the
|
|
1017
|
+
* Date and time when the report was created.
|
|
936
1018
|
* @readonly
|
|
937
1019
|
*/
|
|
938
1020
|
_createdDate?: Date | null;
|
|
939
1021
|
/**
|
|
940
|
-
* Date and time the
|
|
1022
|
+
* Date and time when the report was updated.
|
|
941
1023
|
* @readonly
|
|
942
1024
|
*/
|
|
943
1025
|
_updatedDate?: Date | null;
|
|
944
|
-
/**
|
|
1026
|
+
/**
|
|
1027
|
+
* Custom field data for the rule object.
|
|
1028
|
+
*
|
|
1029
|
+
* **Note:** You must configure extended fields using schema plugin extensions in your app's dashboard before you can access the extended fields with API calls.
|
|
1030
|
+
*/
|
|
945
1031
|
extendedFields?: ExtendedFields;
|
|
946
1032
|
};
|
|
947
1033
|
}
|
|
948
1034
|
interface UpsertReportIdentifiers {
|
|
949
|
-
/** Reported entity name */
|
|
1035
|
+
/** Reported entity name. For example, `comment`. */
|
|
950
1036
|
reportEntityName?: string;
|
|
951
|
-
/** Reported entity ID */
|
|
1037
|
+
/** Reported entity ID. */
|
|
952
1038
|
reportEntityId?: string;
|
|
953
1039
|
}
|
|
954
1040
|
interface CountReportsByReasonTypesOptions {
|
|
955
|
-
/** ID of the entity. */
|
|
1041
|
+
/** ID of the reported entity. */
|
|
956
1042
|
entityId: string;
|
|
957
1043
|
}
|
|
958
1044
|
interface QueryCursorResult {
|
|
@@ -1040,93 +1126,97 @@ interface UpdateExtendedFieldsOptions {
|
|
|
1040
1126
|
declare function createReport$1(httpClient: HttpClient): CreateReportSignature;
|
|
1041
1127
|
interface CreateReportSignature {
|
|
1042
1128
|
/**
|
|
1043
|
-
* Creates a
|
|
1044
|
-
* @param - Report
|
|
1045
|
-
* @returns
|
|
1129
|
+
* Creates a report.
|
|
1130
|
+
* @param - Report details.
|
|
1131
|
+
* @returns Created report.
|
|
1046
1132
|
*/
|
|
1047
1133
|
(report: Report): Promise<Report & ReportNonNullableFields>;
|
|
1048
1134
|
}
|
|
1049
1135
|
declare function getReport$1(httpClient: HttpClient): GetReportSignature;
|
|
1050
1136
|
interface GetReportSignature {
|
|
1051
1137
|
/**
|
|
1052
|
-
* Retrieves a
|
|
1138
|
+
* Retrieves a report.
|
|
1053
1139
|
*
|
|
1054
|
-
*
|
|
1055
|
-
* @param - ID of the
|
|
1056
|
-
* @returns
|
|
1140
|
+
* Site members and visitors can only access their own reports.
|
|
1141
|
+
* @param - ID of the report to retrieve.
|
|
1142
|
+
* @returns Retrieved report.
|
|
1057
1143
|
*/
|
|
1058
1144
|
(reportId: string): Promise<Report & ReportNonNullableFields>;
|
|
1059
1145
|
}
|
|
1060
1146
|
declare function updateReport$1(httpClient: HttpClient): UpdateReportSignature;
|
|
1061
1147
|
interface UpdateReportSignature {
|
|
1062
1148
|
/**
|
|
1063
|
-
* Updates a
|
|
1064
|
-
*
|
|
1065
|
-
* `revision` increments by 1.
|
|
1066
|
-
* The current `revision` must be passed when updating the Report.
|
|
1067
|
-
* This ensures you're working with the latest Report
|
|
1068
|
-
* and prevents unintended overwrites.
|
|
1149
|
+
* Updates a report.
|
|
1150
|
+
*
|
|
1151
|
+
* Each time the report is updated, `revision` increments by 1. The current `revision` must be passed when updating the report. This ensures you're working with the latest report and prevents unintended overwrites.
|
|
1069
1152
|
* @param - Report ID.
|
|
1070
|
-
* @returns Updated
|
|
1153
|
+
* @returns Updated report.
|
|
1071
1154
|
*/
|
|
1072
1155
|
(_id: string | null, report: UpdateReport): Promise<Report & ReportNonNullableFields>;
|
|
1073
1156
|
}
|
|
1074
1157
|
declare function deleteReport$1(httpClient: HttpClient): DeleteReportSignature;
|
|
1075
1158
|
interface DeleteReportSignature {
|
|
1076
1159
|
/**
|
|
1077
|
-
* Deletes a
|
|
1078
|
-
* Deleting a Report permanently removes them from the Report List.
|
|
1160
|
+
* Deletes a report, and removes it from the report list in the dashboard.
|
|
1079
1161
|
*
|
|
1080
|
-
*
|
|
1081
|
-
* @param -
|
|
1162
|
+
* Site members and visitors can only delete their own reports.
|
|
1163
|
+
* @param - ID of the report to delete.
|
|
1082
1164
|
*/
|
|
1083
1165
|
(reportId: string): Promise<void>;
|
|
1084
1166
|
}
|
|
1085
1167
|
declare function upsertReport$1(httpClient: HttpClient): UpsertReportSignature;
|
|
1086
1168
|
interface UpsertReportSignature {
|
|
1087
1169
|
/**
|
|
1088
|
-
*
|
|
1089
|
-
*
|
|
1090
|
-
* If Report exists it will be updated with provided Reason
|
|
1170
|
+
* Creates or updates a report.
|
|
1171
|
+
* If the report for the requested entity already exists, then the report is updated with the provided `reason` value. Otherwise, the report is created.
|
|
1091
1172
|
*/
|
|
1092
1173
|
(identifiers: UpsertReportIdentifiers, options?: UpsertReportOptions | undefined): Promise<UpsertReportResponse & UpsertReportResponseNonNullableFields>;
|
|
1093
1174
|
}
|
|
1094
1175
|
declare function bulkDeleteReportsByFilter$1(httpClient: HttpClient): BulkDeleteReportsByFilterSignature;
|
|
1095
1176
|
interface BulkDeleteReportsByFilterSignature {
|
|
1096
1177
|
/**
|
|
1097
|
-
* Deletes multiple
|
|
1098
|
-
*
|
|
1099
|
-
* @param - Filter for which reports to delete
|
|
1178
|
+
* Deletes multiple reports by filter, and removes them from the report list in the dashboard.
|
|
1179
|
+
* @param - Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details.
|
|
1100
1180
|
*/
|
|
1101
1181
|
(filter: Record<string, any> | null): Promise<BulkDeleteReportsByFilterResponse & BulkDeleteReportsByFilterResponseNonNullableFields>;
|
|
1102
1182
|
}
|
|
1103
1183
|
declare function countReportsByReasonTypes$1(httpClient: HttpClient): CountReportsByReasonTypesSignature;
|
|
1104
1184
|
interface CountReportsByReasonTypesSignature {
|
|
1105
1185
|
/**
|
|
1106
|
-
*
|
|
1107
|
-
* @param -
|
|
1186
|
+
* Counts reports by reasons.
|
|
1187
|
+
* @param - Reported entity name. For example, `comment`.
|
|
1108
1188
|
*/
|
|
1109
1189
|
(entityName: string, options: CountReportsByReasonTypesOptions): Promise<CountReportsByReasonTypesResponse & CountReportsByReasonTypesResponseNonNullableFields>;
|
|
1110
1190
|
}
|
|
1111
1191
|
declare function queryReports$1(httpClient: HttpClient): QueryReportsSignature;
|
|
1112
1192
|
interface QueryReportsSignature {
|
|
1113
1193
|
/**
|
|
1114
|
-
* Retrieves a list of
|
|
1115
|
-
*
|
|
1116
|
-
*
|
|
1117
|
-
*
|
|
1194
|
+
* Retrieves a list of reports, given the provided paging, filtering, and sorting.
|
|
1195
|
+
* Query Reports runs with these defaults, which you can override:
|
|
1196
|
+
* - `createdDate` is sorted in `ASC` order
|
|
1197
|
+
* - `paging.limit` is `100`
|
|
1198
|
+
* - `paging.offset` is `0`
|
|
1199
|
+
* For field support for filters and sorting, see [Reports: Supported Filters and Sorting]().
|
|
1200
|
+
* To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
1118
1201
|
*/
|
|
1119
1202
|
(): ReportsQueryBuilder;
|
|
1120
1203
|
}
|
|
1121
1204
|
declare function updateExtendedFields$1(httpClient: HttpClient): UpdateExtendedFieldsSignature;
|
|
1122
1205
|
interface UpdateExtendedFieldsSignature {
|
|
1123
1206
|
/**
|
|
1124
|
-
* Updates extended fields of a
|
|
1125
|
-
*
|
|
1207
|
+
* Updates extended fields of a report.
|
|
1208
|
+
* [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must first be configured in the app dashboard.
|
|
1209
|
+
* @param - ID of the report to update.
|
|
1126
1210
|
* @param - Identifier for the app whose extended fields are being updated.
|
|
1127
1211
|
*/
|
|
1128
1212
|
(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
|
|
1129
1213
|
}
|
|
1214
|
+
declare const onReportCreated$1: EventDefinition<ReportCreatedEnvelope, "wix.reports.v2.report_created">;
|
|
1215
|
+
declare const onReportDeleted$1: EventDefinition<ReportDeletedEnvelope, "wix.reports.v2.report_deleted">;
|
|
1216
|
+
declare const onReportEntityReportSummaryChanged$1: EventDefinition<ReportEntityReportSummaryChangedEnvelope, "wix.reports.v2.report_entity_report_summary_changed">;
|
|
1217
|
+
declare const onReportUpdated$1: EventDefinition<ReportUpdatedEnvelope, "wix.reports.v2.report_updated">;
|
|
1218
|
+
|
|
1219
|
+
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
1130
1220
|
|
|
1131
1221
|
declare const createReport: MaybeContext<BuildRESTFunction<typeof createReport$1> & typeof createReport$1>;
|
|
1132
1222
|
declare const getReport: MaybeContext<BuildRESTFunction<typeof getReport$1> & typeof getReport$1>;
|
|
@@ -1138,7 +1228,30 @@ declare const countReportsByReasonTypes: MaybeContext<BuildRESTFunction<typeof c
|
|
|
1138
1228
|
declare const queryReports: MaybeContext<BuildRESTFunction<typeof queryReports$1> & typeof queryReports$1>;
|
|
1139
1229
|
declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
|
|
1140
1230
|
|
|
1231
|
+
type _publicOnReportCreatedType = typeof onReportCreated$1;
|
|
1232
|
+
/**
|
|
1233
|
+
* Triggered when a report is created.
|
|
1234
|
+
*/
|
|
1235
|
+
declare const onReportCreated: ReturnType<typeof createEventModule<_publicOnReportCreatedType>>;
|
|
1236
|
+
|
|
1237
|
+
type _publicOnReportDeletedType = typeof onReportDeleted$1;
|
|
1238
|
+
/**
|
|
1239
|
+
* Triggered when a report is deleted.
|
|
1240
|
+
*/
|
|
1241
|
+
declare const onReportDeleted: ReturnType<typeof createEventModule<_publicOnReportDeletedType>>;
|
|
1242
|
+
|
|
1243
|
+
type _publicOnReportEntityReportSummaryChangedType = typeof onReportEntityReportSummaryChanged$1;
|
|
1244
|
+
/** */
|
|
1245
|
+
declare const onReportEntityReportSummaryChanged: ReturnType<typeof createEventModule<_publicOnReportEntityReportSummaryChangedType>>;
|
|
1246
|
+
|
|
1247
|
+
type _publicOnReportUpdatedType = typeof onReportUpdated$1;
|
|
1248
|
+
/**
|
|
1249
|
+
* Triggered when a report is updated.
|
|
1250
|
+
*/
|
|
1251
|
+
declare const onReportUpdated: ReturnType<typeof createEventModule<_publicOnReportUpdatedType>>;
|
|
1252
|
+
|
|
1141
1253
|
type context_ActionEvent = ActionEvent;
|
|
1254
|
+
type context_BaseEventMetadata = BaseEventMetadata;
|
|
1142
1255
|
type context_BulkDeleteReportsByFilterRequest = BulkDeleteReportsByFilterRequest;
|
|
1143
1256
|
type context_BulkDeleteReportsByFilterResponse = BulkDeleteReportsByFilterResponse;
|
|
1144
1257
|
type context_BulkDeleteReportsByFilterResponseNonNullableFields = BulkDeleteReportsByFilterResponseNonNullableFields;
|
|
@@ -1165,6 +1278,7 @@ type context_EntityCreatedEvent = EntityCreatedEvent;
|
|
|
1165
1278
|
type context_EntityDeletedEvent = EntityDeletedEvent;
|
|
1166
1279
|
type context_EntityReportSummaryChanged = EntityReportSummaryChanged;
|
|
1167
1280
|
type context_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
1281
|
+
type context_EventMetadata = EventMetadata;
|
|
1168
1282
|
type context_ExtendedFields = ExtendedFields;
|
|
1169
1283
|
type context_GetReportRequest = GetReportRequest;
|
|
1170
1284
|
type context_GetReportResponse = GetReportResponse;
|
|
@@ -1181,7 +1295,11 @@ type context_Reason = Reason;
|
|
|
1181
1295
|
type context_ReasonCount = ReasonCount;
|
|
1182
1296
|
type context_ReasonTypeCount = ReasonTypeCount;
|
|
1183
1297
|
type context_Report = Report;
|
|
1298
|
+
type context_ReportCreatedEnvelope = ReportCreatedEnvelope;
|
|
1299
|
+
type context_ReportDeletedEnvelope = ReportDeletedEnvelope;
|
|
1300
|
+
type context_ReportEntityReportSummaryChangedEnvelope = ReportEntityReportSummaryChangedEnvelope;
|
|
1184
1301
|
type context_ReportNonNullableFields = ReportNonNullableFields;
|
|
1302
|
+
type context_ReportUpdatedEnvelope = ReportUpdatedEnvelope;
|
|
1185
1303
|
type context_ReportsQueryBuilder = ReportsQueryBuilder;
|
|
1186
1304
|
type context_ReportsQueryResult = ReportsQueryResult;
|
|
1187
1305
|
type context_RestoreInfo = RestoreInfo;
|
|
@@ -1205,17 +1323,25 @@ type context_UpsertReportResponse = UpsertReportResponse;
|
|
|
1205
1323
|
type context_UpsertReportResponseNonNullableFields = UpsertReportResponseNonNullableFields;
|
|
1206
1324
|
type context_WebhookIdentityType = WebhookIdentityType;
|
|
1207
1325
|
declare const context_WebhookIdentityType: typeof WebhookIdentityType;
|
|
1326
|
+
type context__publicOnReportCreatedType = _publicOnReportCreatedType;
|
|
1327
|
+
type context__publicOnReportDeletedType = _publicOnReportDeletedType;
|
|
1328
|
+
type context__publicOnReportEntityReportSummaryChangedType = _publicOnReportEntityReportSummaryChangedType;
|
|
1329
|
+
type context__publicOnReportUpdatedType = _publicOnReportUpdatedType;
|
|
1208
1330
|
declare const context_bulkDeleteReportsByFilter: typeof bulkDeleteReportsByFilter;
|
|
1209
1331
|
declare const context_countReportsByReasonTypes: typeof countReportsByReasonTypes;
|
|
1210
1332
|
declare const context_createReport: typeof createReport;
|
|
1211
1333
|
declare const context_deleteReport: typeof deleteReport;
|
|
1212
1334
|
declare const context_getReport: typeof getReport;
|
|
1335
|
+
declare const context_onReportCreated: typeof onReportCreated;
|
|
1336
|
+
declare const context_onReportDeleted: typeof onReportDeleted;
|
|
1337
|
+
declare const context_onReportEntityReportSummaryChanged: typeof onReportEntityReportSummaryChanged;
|
|
1338
|
+
declare const context_onReportUpdated: typeof onReportUpdated;
|
|
1213
1339
|
declare const context_queryReports: typeof queryReports;
|
|
1214
1340
|
declare const context_updateExtendedFields: typeof updateExtendedFields;
|
|
1215
1341
|
declare const context_updateReport: typeof updateReport;
|
|
1216
1342
|
declare const context_upsertReport: typeof upsertReport;
|
|
1217
1343
|
declare namespace context {
|
|
1218
|
-
export { type context_ActionEvent as ActionEvent, type context_BulkDeleteReportsByFilterRequest as BulkDeleteReportsByFilterRequest, type context_BulkDeleteReportsByFilterResponse as BulkDeleteReportsByFilterResponse, type context_BulkDeleteReportsByFilterResponseNonNullableFields as BulkDeleteReportsByFilterResponseNonNullableFields, type context_CommonIdentificationData as CommonIdentificationData, type context_CommonIdentificationDataIdOneOf as CommonIdentificationDataIdOneOf, type context_CountReportsByReasonTypesOptions as CountReportsByReasonTypesOptions, type context_CountReportsByReasonTypesRequest as CountReportsByReasonTypesRequest, type context_CountReportsByReasonTypesResponse as CountReportsByReasonTypesResponse, type context_CountReportsByReasonTypesResponseNonNullableFields as CountReportsByReasonTypesResponseNonNullableFields, type context_CreateReportRequest as CreateReportRequest, type context_CreateReportResponse as CreateReportResponse, type context_CreateReportResponseNonNullableFields as CreateReportResponseNonNullableFields, type context_CursorPaging as CursorPaging, type context_CursorPagingMetadata as CursorPagingMetadata, type context_CursorQuery as CursorQuery, type context_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type context_Cursors as Cursors, type context_DeleteReportRequest as DeleteReportRequest, type context_DeleteReportResponse as DeleteReportResponse, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_Empty as Empty, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityReportSummaryChanged as EntityReportSummaryChanged, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_ExtendedFields as ExtendedFields, type context_GetReportRequest as GetReportRequest, type context_GetReportResponse as GetReportResponse, type context_GetReportResponseNonNullableFields as GetReportResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, context_IdentityType as IdentityType, type context_MessageEnvelope as MessageEnvelope, type context_QueryReportsRequest as QueryReportsRequest, type context_QueryReportsResponse as QueryReportsResponse, type context_QueryReportsResponseNonNullableFields as QueryReportsResponseNonNullableFields, type context_Reason as Reason, type context_ReasonCount as ReasonCount, type context_ReasonTypeCount as ReasonTypeCount, type context_Report as Report, type context_ReportNonNullableFields as ReportNonNullableFields, type context_ReportsQueryBuilder as ReportsQueryBuilder, type context_ReportsQueryResult as ReportsQueryResult, type context_RestoreInfo as RestoreInfo, context_SortOrder as SortOrder, type context_Sorting as Sorting, context_Type as Type, type context_UpdateExtendedFieldsOptions as UpdateExtendedFieldsOptions, type context_UpdateExtendedFieldsRequest as UpdateExtendedFieldsRequest, type context_UpdateExtendedFieldsResponse as UpdateExtendedFieldsResponse, type context_UpdateExtendedFieldsResponseNonNullableFields as UpdateExtendedFieldsResponseNonNullableFields, type context_UpdateReport as UpdateReport, type context_UpdateReportRequest as UpdateReportRequest, type context_UpdateReportResponse as UpdateReportResponse, type context_UpdateReportResponseNonNullableFields as UpdateReportResponseNonNullableFields, type context_UpsertReportIdentifiers as UpsertReportIdentifiers, type context_UpsertReportOptions as UpsertReportOptions, type context_UpsertReportRequest as UpsertReportRequest, type context_UpsertReportResponse as UpsertReportResponse, type context_UpsertReportResponseNonNullableFields as UpsertReportResponseNonNullableFields, context_WebhookIdentityType as WebhookIdentityType, context_bulkDeleteReportsByFilter as bulkDeleteReportsByFilter, context_countReportsByReasonTypes as countReportsByReasonTypes, context_createReport as createReport, context_deleteReport as deleteReport, context_getReport as getReport, context_queryReports as queryReports, context_updateExtendedFields as updateExtendedFields, context_updateReport as updateReport, context_upsertReport as upsertReport };
|
|
1344
|
+
export { type context_ActionEvent as ActionEvent, type context_BaseEventMetadata as BaseEventMetadata, type context_BulkDeleteReportsByFilterRequest as BulkDeleteReportsByFilterRequest, type context_BulkDeleteReportsByFilterResponse as BulkDeleteReportsByFilterResponse, type context_BulkDeleteReportsByFilterResponseNonNullableFields as BulkDeleteReportsByFilterResponseNonNullableFields, type context_CommonIdentificationData as CommonIdentificationData, type context_CommonIdentificationDataIdOneOf as CommonIdentificationDataIdOneOf, type context_CountReportsByReasonTypesOptions as CountReportsByReasonTypesOptions, type context_CountReportsByReasonTypesRequest as CountReportsByReasonTypesRequest, type context_CountReportsByReasonTypesResponse as CountReportsByReasonTypesResponse, type context_CountReportsByReasonTypesResponseNonNullableFields as CountReportsByReasonTypesResponseNonNullableFields, type context_CreateReportRequest as CreateReportRequest, type context_CreateReportResponse as CreateReportResponse, type context_CreateReportResponseNonNullableFields as CreateReportResponseNonNullableFields, type context_CursorPaging as CursorPaging, type context_CursorPagingMetadata as CursorPagingMetadata, type context_CursorQuery as CursorQuery, type context_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type context_Cursors as Cursors, type context_DeleteReportRequest as DeleteReportRequest, type context_DeleteReportResponse as DeleteReportResponse, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_Empty as Empty, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityReportSummaryChanged as EntityReportSummaryChanged, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_EventMetadata as EventMetadata, type context_ExtendedFields as ExtendedFields, type context_GetReportRequest as GetReportRequest, type context_GetReportResponse as GetReportResponse, type context_GetReportResponseNonNullableFields as GetReportResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, context_IdentityType as IdentityType, type context_MessageEnvelope as MessageEnvelope, type context_QueryReportsRequest as QueryReportsRequest, type context_QueryReportsResponse as QueryReportsResponse, type context_QueryReportsResponseNonNullableFields as QueryReportsResponseNonNullableFields, type context_Reason as Reason, type context_ReasonCount as ReasonCount, type context_ReasonTypeCount as ReasonTypeCount, type context_Report as Report, type context_ReportCreatedEnvelope as ReportCreatedEnvelope, type context_ReportDeletedEnvelope as ReportDeletedEnvelope, type context_ReportEntityReportSummaryChangedEnvelope as ReportEntityReportSummaryChangedEnvelope, type context_ReportNonNullableFields as ReportNonNullableFields, type context_ReportUpdatedEnvelope as ReportUpdatedEnvelope, type context_ReportsQueryBuilder as ReportsQueryBuilder, type context_ReportsQueryResult as ReportsQueryResult, type context_RestoreInfo as RestoreInfo, context_SortOrder as SortOrder, type context_Sorting as Sorting, context_Type as Type, type context_UpdateExtendedFieldsOptions as UpdateExtendedFieldsOptions, type context_UpdateExtendedFieldsRequest as UpdateExtendedFieldsRequest, type context_UpdateExtendedFieldsResponse as UpdateExtendedFieldsResponse, type context_UpdateExtendedFieldsResponseNonNullableFields as UpdateExtendedFieldsResponseNonNullableFields, type context_UpdateReport as UpdateReport, type context_UpdateReportRequest as UpdateReportRequest, type context_UpdateReportResponse as UpdateReportResponse, type context_UpdateReportResponseNonNullableFields as UpdateReportResponseNonNullableFields, type context_UpsertReportIdentifiers as UpsertReportIdentifiers, type context_UpsertReportOptions as UpsertReportOptions, type context_UpsertReportRequest as UpsertReportRequest, type context_UpsertReportResponse as UpsertReportResponse, type context_UpsertReportResponseNonNullableFields as UpsertReportResponseNonNullableFields, context_WebhookIdentityType as WebhookIdentityType, type context__publicOnReportCreatedType as _publicOnReportCreatedType, type context__publicOnReportDeletedType as _publicOnReportDeletedType, type context__publicOnReportEntityReportSummaryChangedType as _publicOnReportEntityReportSummaryChangedType, type context__publicOnReportUpdatedType as _publicOnReportUpdatedType, context_bulkDeleteReportsByFilter as bulkDeleteReportsByFilter, context_countReportsByReasonTypes as countReportsByReasonTypes, context_createReport as createReport, context_deleteReport as deleteReport, context_getReport as getReport, context_onReportCreated as onReportCreated, context_onReportDeleted as onReportDeleted, context_onReportEntityReportSummaryChanged as onReportEntityReportSummaryChanged, context_onReportUpdated as onReportUpdated, onReportCreated$1 as publicOnReportCreated, onReportDeleted$1 as publicOnReportDeleted, onReportEntityReportSummaryChanged$1 as publicOnReportEntityReportSummaryChanged, onReportUpdated$1 as publicOnReportUpdated, context_queryReports as queryReports, context_updateExtendedFields as updateExtendedFields, context_updateReport as updateReport, context_upsertReport as upsertReport };
|
|
1219
1345
|
}
|
|
1220
1346
|
|
|
1221
1347
|
export { context as reports };
|