@appconda/sdk 1.0.680 → 1.0.683
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/dist/modules/emploid/schema.d.ts +1149 -21
- package/dist/modules/emploid/schema.js +740 -53
- package/dist/modules/emploid/service.d.ts +117 -15
- package/dist/modules/emploid/service.js +163 -1
- package/dist/modules/emploid/types.d.ts +818 -6
- package/dist/modules/emploid/types.js +1 -1
- package/package.json +1 -1
- package/src/modules/emploid/schema.ts +826 -60
- package/src/modules/emploid/service.ts +476 -15
- package/src/modules/emploid/types.ts +892 -7
|
@@ -621,14 +621,60 @@ export type TCollection = {
|
|
|
621
621
|
id: string;
|
|
622
622
|
name: string;
|
|
623
623
|
displayName: string;
|
|
624
|
-
description
|
|
625
|
-
stats
|
|
624
|
+
description?: string | null;
|
|
625
|
+
stats?: {
|
|
626
626
|
totalFields: number;
|
|
627
627
|
activeFields: number;
|
|
628
628
|
deletedFields: number;
|
|
629
629
|
data: string;
|
|
630
630
|
storage: string;
|
|
631
631
|
};
|
|
632
|
+
fields?: TCollectionField[];
|
|
633
|
+
archived?: boolean;
|
|
634
|
+
ignoredFields?: string[];
|
|
635
|
+
};
|
|
636
|
+
export type TCollectionChecklistItem = {
|
|
637
|
+
id: string;
|
|
638
|
+
text: string;
|
|
639
|
+
checked: boolean;
|
|
640
|
+
};
|
|
641
|
+
export type TCollectionSignatureValue = {
|
|
642
|
+
kind: "typed" | "drawn";
|
|
643
|
+
value: string;
|
|
644
|
+
signedAt: string;
|
|
645
|
+
signedBy: string;
|
|
646
|
+
};
|
|
647
|
+
/** Client write shape; provenance is always attached by the collection service. */
|
|
648
|
+
export type TCollectionSignatureInput = Pick<TCollectionSignatureValue, "kind" | "value">;
|
|
649
|
+
export type TCollectionUserReference = string | {
|
|
650
|
+
id: string;
|
|
651
|
+
name?: string;
|
|
652
|
+
email?: string;
|
|
653
|
+
};
|
|
654
|
+
export type TCollectionDerivedCondition = {
|
|
655
|
+
fieldId: string;
|
|
656
|
+
fieldName?: string;
|
|
657
|
+
operator: "eq" | "neq" | "contains" | "not-contains" | "gt" | "gte" | "lt" | "lte" | "is-empty" | "is-not-empty";
|
|
658
|
+
value?: unknown;
|
|
659
|
+
};
|
|
660
|
+
export type TCollectionFieldConfig = {
|
|
661
|
+
[key: string]: any;
|
|
662
|
+
relationFieldId?: string;
|
|
663
|
+
relationFieldName?: string;
|
|
664
|
+
relationId?: string;
|
|
665
|
+
targetCollectionId?: string;
|
|
666
|
+
targetFieldId?: string;
|
|
667
|
+
targetFieldName?: string;
|
|
668
|
+
resultMode?: "first" | "list";
|
|
669
|
+
operation?: "count" | "count-values" | "count-unique" | "sum" | "average" | "min" | "max";
|
|
670
|
+
condition?: TCollectionDerivedCondition;
|
|
671
|
+
maxItems?: number;
|
|
672
|
+
min?: number;
|
|
673
|
+
max?: number;
|
|
674
|
+
precision?: number;
|
|
675
|
+
mode?: "typed" | "drawn" | "both";
|
|
676
|
+
source?: "organization" | "users" | "employees" | "both";
|
|
677
|
+
includeInactive?: boolean;
|
|
632
678
|
};
|
|
633
679
|
export type TCollectionField = {
|
|
634
680
|
id: string;
|
|
@@ -638,11 +684,536 @@ export type TCollectionField = {
|
|
|
638
684
|
displayName: string;
|
|
639
685
|
type: string;
|
|
640
686
|
required: boolean;
|
|
641
|
-
config?:
|
|
687
|
+
config?: TCollectionFieldConfig;
|
|
642
688
|
order?: number;
|
|
643
689
|
deletedAt?: string;
|
|
644
690
|
deletedBy?: string;
|
|
645
691
|
};
|
|
692
|
+
export type TCsvImportInvalidRowPolicy = "reject" | "skip-row" | "set-null";
|
|
693
|
+
export type TCsvImportRowRepair = {
|
|
694
|
+
rowIndex: number;
|
|
695
|
+
fieldId: string;
|
|
696
|
+
value: unknown;
|
|
697
|
+
};
|
|
698
|
+
export type TCsvImportRowIssue = {
|
|
699
|
+
rowIndex: number;
|
|
700
|
+
fieldId: string;
|
|
701
|
+
fieldName: string;
|
|
702
|
+
code: "required" | "type" | "option" | "relation_config" | "relation_cardinality";
|
|
703
|
+
message: string;
|
|
704
|
+
rawValue: unknown;
|
|
705
|
+
};
|
|
706
|
+
export type TCsvImportRowPreview = {
|
|
707
|
+
totalRows: number;
|
|
708
|
+
validRows: number;
|
|
709
|
+
invalidRows: number;
|
|
710
|
+
acceptedRows: number;
|
|
711
|
+
skippedRows: number;
|
|
712
|
+
blockingIssueCount: number;
|
|
713
|
+
issues: TCsvImportRowIssue[];
|
|
714
|
+
truncatedIssueCount: number;
|
|
715
|
+
invalidRowPolicy: TCsvImportInvalidRowPolicy;
|
|
716
|
+
};
|
|
717
|
+
export type TCollectionRecord = {
|
|
718
|
+
id: string;
|
|
719
|
+
data: Record<string, any>;
|
|
720
|
+
meta?: Record<string, any>;
|
|
721
|
+
};
|
|
722
|
+
export type TCollectionRecordPage = {
|
|
723
|
+
query?: string;
|
|
724
|
+
total: number;
|
|
725
|
+
limit: number;
|
|
726
|
+
offset: number;
|
|
727
|
+
items: TCollectionRecord[];
|
|
728
|
+
/** Compatibility alias returned for older consumers. */
|
|
729
|
+
records?: TCollectionRecord[];
|
|
730
|
+
};
|
|
731
|
+
export type TBulkUpdateRecordsResult = {
|
|
732
|
+
matchedCount: number;
|
|
733
|
+
modifiedCount: number;
|
|
734
|
+
};
|
|
735
|
+
export type TCollectionFieldOrder = {
|
|
736
|
+
fieldId: string;
|
|
737
|
+
order: number;
|
|
738
|
+
};
|
|
739
|
+
export type TReorderCollectionFieldsResult = {
|
|
740
|
+
collectionId: string;
|
|
741
|
+
reorderedCount: number;
|
|
742
|
+
orderStep: number;
|
|
743
|
+
fields: TCollectionFieldOrder[];
|
|
744
|
+
};
|
|
745
|
+
export type TRecordPermission = {
|
|
746
|
+
id: string;
|
|
747
|
+
recordId: string;
|
|
748
|
+
subjectType: string;
|
|
749
|
+
subjectId: string;
|
|
750
|
+
actor: string;
|
|
751
|
+
action: string;
|
|
752
|
+
effect: "allow" | "deny";
|
|
753
|
+
createdBy?: string;
|
|
754
|
+
createdAt?: string | Date;
|
|
755
|
+
};
|
|
756
|
+
export type TCollectionAccessPolicyScopeType = "app" | "list" | "field";
|
|
757
|
+
export type TCollectionAccessPolicySubjectType = "user" | "role" | "team" | "service";
|
|
758
|
+
export type TCollectionAccessPolicyEffect = "allow" | "deny";
|
|
759
|
+
export type TCollectionAccessPolicyAction = "read" | "create" | "update" | "delete" | "comment" | "assign";
|
|
760
|
+
export type TCollectionAccessPolicyRowOperator = "me" | "user" | "team" | "linked-record";
|
|
761
|
+
export type TCollectionAccessPolicyRowFilter = {
|
|
762
|
+
match: "all" | "any";
|
|
763
|
+
conditions: Array<{
|
|
764
|
+
fieldId: string;
|
|
765
|
+
operator: TCollectionAccessPolicyRowOperator;
|
|
766
|
+
value?: string;
|
|
767
|
+
}>;
|
|
768
|
+
};
|
|
769
|
+
export type TCollectionAccessPolicy = {
|
|
770
|
+
id: string;
|
|
771
|
+
tenantId: string;
|
|
772
|
+
dataModelId: string;
|
|
773
|
+
collectionId: string | null;
|
|
774
|
+
fieldId: string | null;
|
|
775
|
+
name: string;
|
|
776
|
+
scopeType: TCollectionAccessPolicyScopeType;
|
|
777
|
+
subjectType: TCollectionAccessPolicySubjectType;
|
|
778
|
+
subjectId: string;
|
|
779
|
+
effect: TCollectionAccessPolicyEffect;
|
|
780
|
+
actions: TCollectionAccessPolicyAction[];
|
|
781
|
+
rowFilter: TCollectionAccessPolicyRowFilter | null;
|
|
782
|
+
enabled: boolean;
|
|
783
|
+
createdAt?: string | Date;
|
|
784
|
+
updatedAt?: string | Date;
|
|
785
|
+
createdBy?: string;
|
|
786
|
+
updatedBy?: string;
|
|
787
|
+
};
|
|
788
|
+
export type TCollectionAccessPolicyPreview = {
|
|
789
|
+
valid: true;
|
|
790
|
+
policy: Omit<TCollectionAccessPolicy, "id" | "tenantId"> & {
|
|
791
|
+
id?: string;
|
|
792
|
+
};
|
|
793
|
+
currentActorMatches: boolean;
|
|
794
|
+
preview: {
|
|
795
|
+
allowed: boolean;
|
|
796
|
+
reason: string;
|
|
797
|
+
} | null;
|
|
798
|
+
};
|
|
799
|
+
export type TCollectionAccessTeamMember = {
|
|
800
|
+
id: string;
|
|
801
|
+
teamId: string;
|
|
802
|
+
userId: string;
|
|
803
|
+
createdAt: string | Date;
|
|
804
|
+
createdBy: string;
|
|
805
|
+
};
|
|
806
|
+
export type TSetCollectionAccessTeamMembersResult = {
|
|
807
|
+
teamId: string;
|
|
808
|
+
userIds: string[];
|
|
809
|
+
memberCount: number;
|
|
810
|
+
updatedBy: string;
|
|
811
|
+
};
|
|
812
|
+
export type TCollectionFormLayoutField = {
|
|
813
|
+
fieldId: string;
|
|
814
|
+
label?: string;
|
|
815
|
+
helpText?: string;
|
|
816
|
+
placeholder?: string;
|
|
817
|
+
required?: boolean;
|
|
818
|
+
width?: "full" | "half";
|
|
819
|
+
};
|
|
820
|
+
export type TCollectionFormLayoutSection = {
|
|
821
|
+
id: string;
|
|
822
|
+
title?: string;
|
|
823
|
+
description?: string;
|
|
824
|
+
fields: TCollectionFormLayoutField[];
|
|
825
|
+
};
|
|
826
|
+
export type TCollectionFormLayout = {
|
|
827
|
+
sections: TCollectionFormLayoutSection[];
|
|
828
|
+
};
|
|
829
|
+
export type TCollectionFormStatus = "draft" | "published" | "archived";
|
|
830
|
+
export type TCollectionForm = {
|
|
831
|
+
id: string;
|
|
832
|
+
tenantId: string;
|
|
833
|
+
dataModelId: string;
|
|
834
|
+
collectionId: string;
|
|
835
|
+
name: string;
|
|
836
|
+
description: string;
|
|
837
|
+
layout: TCollectionFormLayout;
|
|
838
|
+
submitLabel: string;
|
|
839
|
+
successMessage: string;
|
|
840
|
+
enabled: boolean;
|
|
841
|
+
status: TCollectionFormStatus;
|
|
842
|
+
serviceSubjectId: string;
|
|
843
|
+
tokenHint: string | null;
|
|
844
|
+
publishedAt: string | null;
|
|
845
|
+
expiresAt: string | null;
|
|
846
|
+
revokedAt: string | null;
|
|
847
|
+
rateLimitPerMinute: number;
|
|
848
|
+
maxSubmissions: number | null;
|
|
849
|
+
submissionCount: number;
|
|
850
|
+
createdAt: string | null;
|
|
851
|
+
updatedAt: string | null;
|
|
852
|
+
createdBy: string;
|
|
853
|
+
updatedBy: string;
|
|
854
|
+
};
|
|
855
|
+
export type TResolvedCollectionFormField = {
|
|
856
|
+
id: string;
|
|
857
|
+
type: string;
|
|
858
|
+
label: string;
|
|
859
|
+
helpText?: string;
|
|
860
|
+
placeholder?: string;
|
|
861
|
+
required: boolean;
|
|
862
|
+
width?: "full" | "half";
|
|
863
|
+
config?: Record<string, unknown>;
|
|
864
|
+
};
|
|
865
|
+
export type TResolvedCollectionFormSection = {
|
|
866
|
+
id: string;
|
|
867
|
+
title?: string;
|
|
868
|
+
description?: string;
|
|
869
|
+
fields: TResolvedCollectionFormField[];
|
|
870
|
+
};
|
|
871
|
+
export type TResolvedCollectionForm = {
|
|
872
|
+
name: string;
|
|
873
|
+
description?: string;
|
|
874
|
+
submitLabel: string;
|
|
875
|
+
successMessage: string;
|
|
876
|
+
expiresAt?: string | null;
|
|
877
|
+
sections: TResolvedCollectionFormSection[];
|
|
878
|
+
};
|
|
879
|
+
export type TResolvedInternalCollectionForm = TCollectionForm & {
|
|
880
|
+
sections: TResolvedCollectionFormSection[];
|
|
881
|
+
};
|
|
882
|
+
export type TCollectionFormPublishResult = {
|
|
883
|
+
form: TCollectionForm;
|
|
884
|
+
token: string;
|
|
885
|
+
};
|
|
886
|
+
export type TCollectionFormSubmissionResult = {
|
|
887
|
+
submissionId: string;
|
|
888
|
+
successMessage: string;
|
|
889
|
+
idempotent: boolean;
|
|
890
|
+
recordId?: string | null;
|
|
891
|
+
};
|
|
892
|
+
export type TCollectionAppGenerationField = {
|
|
893
|
+
name: string;
|
|
894
|
+
displayName: string;
|
|
895
|
+
type: string;
|
|
896
|
+
required: boolean;
|
|
897
|
+
config: Record<string, unknown>;
|
|
898
|
+
};
|
|
899
|
+
export type TCollectionAppGenerationView = {
|
|
900
|
+
name: string;
|
|
901
|
+
type: "grid" | "board" | "calendar";
|
|
902
|
+
config: Record<string, unknown>;
|
|
903
|
+
};
|
|
904
|
+
export type TCollectionAppGenerationProposal = {
|
|
905
|
+
version: 1;
|
|
906
|
+
app: {
|
|
907
|
+
name: string;
|
|
908
|
+
displayName: string;
|
|
909
|
+
};
|
|
910
|
+
collections: Array<{
|
|
911
|
+
name: string;
|
|
912
|
+
displayName: string;
|
|
913
|
+
fields: TCollectionAppGenerationField[];
|
|
914
|
+
views: TCollectionAppGenerationView[];
|
|
915
|
+
}>;
|
|
916
|
+
};
|
|
917
|
+
export type TCollectionAppGenerationDiff = {
|
|
918
|
+
version: 1;
|
|
919
|
+
destructive: false;
|
|
920
|
+
summary: {
|
|
921
|
+
creates: number;
|
|
922
|
+
updates: number;
|
|
923
|
+
deletes: number;
|
|
924
|
+
};
|
|
925
|
+
operations: Array<{
|
|
926
|
+
operation: "create";
|
|
927
|
+
kind: "dataModel" | "collection" | "field" | "view";
|
|
928
|
+
path: string;
|
|
929
|
+
displayName?: string;
|
|
930
|
+
fieldType?: string;
|
|
931
|
+
viewType?: string;
|
|
932
|
+
required?: boolean;
|
|
933
|
+
}>;
|
|
934
|
+
};
|
|
935
|
+
export type TCollectionAppGenerationResources = {
|
|
936
|
+
dataModel: {
|
|
937
|
+
id: string;
|
|
938
|
+
name: string;
|
|
939
|
+
};
|
|
940
|
+
collections: Array<{
|
|
941
|
+
id: string;
|
|
942
|
+
name: string;
|
|
943
|
+
}>;
|
|
944
|
+
};
|
|
945
|
+
export type TCollectionAppGenerationRun = {
|
|
946
|
+
id: string;
|
|
947
|
+
planId: string;
|
|
948
|
+
tenantId: string;
|
|
949
|
+
status: string;
|
|
950
|
+
createdResources: TCollectionAppGenerationResources | null;
|
|
951
|
+
errorCode: string | null;
|
|
952
|
+
errorMessage: string | null;
|
|
953
|
+
applyActorId: string;
|
|
954
|
+
rollbackActorId: string | null;
|
|
955
|
+
appliedAt: string | Date | null;
|
|
956
|
+
rolledBackAt: string | Date | null;
|
|
957
|
+
rollbackMetadataDeletedAt: string | Date | null;
|
|
958
|
+
createdAt: string | Date;
|
|
959
|
+
updatedAt: string | Date;
|
|
960
|
+
};
|
|
961
|
+
export type TCollectionAppGenerationPlan = {
|
|
962
|
+
id: string;
|
|
963
|
+
tenantId: string;
|
|
964
|
+
prompt: string;
|
|
965
|
+
promptHash: string;
|
|
966
|
+
proposal: TCollectionAppGenerationProposal;
|
|
967
|
+
proposalHash: string;
|
|
968
|
+
diff: TCollectionAppGenerationDiff;
|
|
969
|
+
status: string;
|
|
970
|
+
activeRunId: string | null;
|
|
971
|
+
createdBy: string;
|
|
972
|
+
createdAt: string | Date;
|
|
973
|
+
updatedAt: string | Date;
|
|
974
|
+
runs: TCollectionAppGenerationRun[];
|
|
975
|
+
};
|
|
976
|
+
export type TCollectionAppGenerationPlanPage = {
|
|
977
|
+
items: TCollectionAppGenerationPlan[];
|
|
978
|
+
nextOffset: number | null;
|
|
979
|
+
};
|
|
980
|
+
export type TCollectionAppGenerationRunPage = {
|
|
981
|
+
items: TCollectionAppGenerationRun[];
|
|
982
|
+
nextOffset: number | null;
|
|
983
|
+
};
|
|
984
|
+
export type TCollectionReportType = "table" | "metric" | "chart";
|
|
985
|
+
export type TCollectionReportVisibility = "personal" | "shared";
|
|
986
|
+
export type TCollectionReportTableConfig = {
|
|
987
|
+
filter?: Record<string, unknown>;
|
|
988
|
+
fields: string[];
|
|
989
|
+
sort?: Record<string, "asc" | "desc">;
|
|
990
|
+
limit?: number;
|
|
991
|
+
};
|
|
992
|
+
export type TCollectionReportAggregateConfig = {
|
|
993
|
+
filter?: Record<string, unknown>;
|
|
994
|
+
aggregate: "count" | "sum" | "avg" | "min" | "max";
|
|
995
|
+
valueField?: string;
|
|
996
|
+
groupBy?: string;
|
|
997
|
+
limit?: number;
|
|
998
|
+
};
|
|
999
|
+
export type TCollectionReport = {
|
|
1000
|
+
id: string;
|
|
1001
|
+
tenantId: string;
|
|
1002
|
+
dataModelId: string;
|
|
1003
|
+
collectionId: string;
|
|
1004
|
+
name: string;
|
|
1005
|
+
description: string | null;
|
|
1006
|
+
type: TCollectionReportType;
|
|
1007
|
+
visibility: TCollectionReportVisibility;
|
|
1008
|
+
ownerId: string;
|
|
1009
|
+
config: TCollectionReportTableConfig | TCollectionReportAggregateConfig | null;
|
|
1010
|
+
available: boolean;
|
|
1011
|
+
unavailableReason?: string;
|
|
1012
|
+
canEdit: boolean;
|
|
1013
|
+
createdAt: string | Date;
|
|
1014
|
+
updatedAt: string | Date;
|
|
1015
|
+
createdBy: string;
|
|
1016
|
+
updatedBy: string;
|
|
1017
|
+
};
|
|
1018
|
+
export type TCollectionReportPage = {
|
|
1019
|
+
total: number;
|
|
1020
|
+
limit: number;
|
|
1021
|
+
offset: number;
|
|
1022
|
+
items: TCollectionReport[];
|
|
1023
|
+
};
|
|
1024
|
+
export type TCollectionReportTableResult = {
|
|
1025
|
+
type: "table";
|
|
1026
|
+
fields: Array<{
|
|
1027
|
+
name: string;
|
|
1028
|
+
displayName: string;
|
|
1029
|
+
type: string;
|
|
1030
|
+
}>;
|
|
1031
|
+
items: Array<{
|
|
1032
|
+
id: string;
|
|
1033
|
+
data: Record<string, unknown>;
|
|
1034
|
+
}>;
|
|
1035
|
+
count: number;
|
|
1036
|
+
truncated: boolean;
|
|
1037
|
+
};
|
|
1038
|
+
export type TCollectionReportMetricResult = {
|
|
1039
|
+
type: "metric";
|
|
1040
|
+
value: number;
|
|
1041
|
+
};
|
|
1042
|
+
export type TCollectionReportChartResult = {
|
|
1043
|
+
type: "chart";
|
|
1044
|
+
points: Array<{
|
|
1045
|
+
label: string | number | boolean | null;
|
|
1046
|
+
value: number;
|
|
1047
|
+
}>;
|
|
1048
|
+
truncated: boolean;
|
|
1049
|
+
};
|
|
1050
|
+
export type TCollectionReportResult = TCollectionReportTableResult | TCollectionReportMetricResult | TCollectionReportChartResult;
|
|
1051
|
+
export type TCollectionReportEvaluation = {
|
|
1052
|
+
report: TCollectionReport;
|
|
1053
|
+
result: TCollectionReportResult;
|
|
1054
|
+
evaluatedAt: string | Date;
|
|
1055
|
+
};
|
|
1056
|
+
export type TCollectionDashboardWidget = {
|
|
1057
|
+
id: string;
|
|
1058
|
+
title: string;
|
|
1059
|
+
type: TCollectionReportType;
|
|
1060
|
+
order: number;
|
|
1061
|
+
reportId: string | null;
|
|
1062
|
+
reportName?: string;
|
|
1063
|
+
config: Record<string, unknown> | null;
|
|
1064
|
+
available: boolean;
|
|
1065
|
+
unavailableReason?: string;
|
|
1066
|
+
createdAt: string | Date;
|
|
1067
|
+
updatedAt: string | Date;
|
|
1068
|
+
};
|
|
1069
|
+
export type TCollectionDashboard = {
|
|
1070
|
+
id: string;
|
|
1071
|
+
tenantId: string;
|
|
1072
|
+
dataModelId: string;
|
|
1073
|
+
collectionId: string;
|
|
1074
|
+
name: string;
|
|
1075
|
+
description: string | null;
|
|
1076
|
+
visibility: TCollectionReportVisibility;
|
|
1077
|
+
ownerId: string;
|
|
1078
|
+
settings: {
|
|
1079
|
+
columns: number;
|
|
1080
|
+
compact: boolean;
|
|
1081
|
+
};
|
|
1082
|
+
widgets: TCollectionDashboardWidget[];
|
|
1083
|
+
canEdit: boolean;
|
|
1084
|
+
createdAt: string | Date;
|
|
1085
|
+
updatedAt: string | Date;
|
|
1086
|
+
createdBy: string;
|
|
1087
|
+
updatedBy: string;
|
|
1088
|
+
};
|
|
1089
|
+
export type TCollectionDashboardPage = {
|
|
1090
|
+
total: number;
|
|
1091
|
+
limit: number;
|
|
1092
|
+
offset: number;
|
|
1093
|
+
items: TCollectionDashboard[];
|
|
1094
|
+
};
|
|
1095
|
+
export type TCollectionDashboardEvaluation = {
|
|
1096
|
+
dashboard: TCollectionDashboard;
|
|
1097
|
+
widgets: Array<{
|
|
1098
|
+
widgetId: string;
|
|
1099
|
+
status: "ready" | "unavailable";
|
|
1100
|
+
result?: TCollectionReportResult;
|
|
1101
|
+
error?: string;
|
|
1102
|
+
}>;
|
|
1103
|
+
evaluatedAt: string | Date;
|
|
1104
|
+
};
|
|
1105
|
+
export type TCollectionComment = {
|
|
1106
|
+
id: string;
|
|
1107
|
+
parentId: string | null;
|
|
1108
|
+
authorId: string;
|
|
1109
|
+
body: string | null;
|
|
1110
|
+
mentionUserIds: string[];
|
|
1111
|
+
createdAt: string | Date;
|
|
1112
|
+
updatedAt: string | Date;
|
|
1113
|
+
editedAt?: string | Date | null;
|
|
1114
|
+
deletedAt?: string | Date | null;
|
|
1115
|
+
canEdit?: boolean;
|
|
1116
|
+
canDelete?: boolean;
|
|
1117
|
+
};
|
|
1118
|
+
export type TCollectionCommentPage = {
|
|
1119
|
+
comments: TCollectionComment[];
|
|
1120
|
+
total: number;
|
|
1121
|
+
limit: number;
|
|
1122
|
+
offset: number;
|
|
1123
|
+
hasMore: boolean;
|
|
1124
|
+
};
|
|
1125
|
+
export type TCollectionRecordActivity = {
|
|
1126
|
+
id: string;
|
|
1127
|
+
type: string;
|
|
1128
|
+
actorId: string;
|
|
1129
|
+
resourceType?: string | null;
|
|
1130
|
+
resourceId?: string | null;
|
|
1131
|
+
payload?: Record<string, string | number | boolean | null> | null;
|
|
1132
|
+
createdAt: string | Date;
|
|
1133
|
+
};
|
|
1134
|
+
export type TCollectionRecordEvent = {
|
|
1135
|
+
id: string;
|
|
1136
|
+
type: string;
|
|
1137
|
+
actorId: string;
|
|
1138
|
+
source?: string | null;
|
|
1139
|
+
createdAt: string | Date;
|
|
1140
|
+
};
|
|
1141
|
+
export type TCollectionRecordActivityPage = {
|
|
1142
|
+
activity: TCollectionRecordActivity[];
|
|
1143
|
+
total: number;
|
|
1144
|
+
recordEvents: TCollectionRecordEvent[];
|
|
1145
|
+
recordEventTotal: number;
|
|
1146
|
+
limit: number;
|
|
1147
|
+
offset: number;
|
|
1148
|
+
hasMore: boolean;
|
|
1149
|
+
recordEventsHasMore: boolean;
|
|
1150
|
+
};
|
|
1151
|
+
export type TCollectionRecordCollaborator = {
|
|
1152
|
+
id: string;
|
|
1153
|
+
userId: string;
|
|
1154
|
+
kind: "assignee" | "watcher";
|
|
1155
|
+
createdAt: string | Date;
|
|
1156
|
+
createdBy: string;
|
|
1157
|
+
};
|
|
1158
|
+
export type TCollectionRecordCollaborators = {
|
|
1159
|
+
assigneeIds: string[];
|
|
1160
|
+
watcherIds: string[];
|
|
1161
|
+
collaborators: TCollectionRecordCollaborator[];
|
|
1162
|
+
updatedBy?: string;
|
|
1163
|
+
};
|
|
1164
|
+
export type TCollectionNotification = {
|
|
1165
|
+
id: string;
|
|
1166
|
+
type: string;
|
|
1167
|
+
actorId: string;
|
|
1168
|
+
collectionId?: string | null;
|
|
1169
|
+
recordId?: string | null;
|
|
1170
|
+
resourceType?: string | null;
|
|
1171
|
+
resourceId?: string | null;
|
|
1172
|
+
payload?: Record<string, string | number | boolean | null> | null;
|
|
1173
|
+
readAt?: string | Date | null;
|
|
1174
|
+
createdAt: string | Date;
|
|
1175
|
+
};
|
|
1176
|
+
export type TCollectionNotificationPage = {
|
|
1177
|
+
notifications: TCollectionNotification[];
|
|
1178
|
+
unreadCount: number;
|
|
1179
|
+
limit: number;
|
|
1180
|
+
offset: number;
|
|
1181
|
+
nextOffset: number;
|
|
1182
|
+
hasMore: boolean;
|
|
1183
|
+
};
|
|
1184
|
+
export type TRecordPermissionDecision = {
|
|
1185
|
+
action: string;
|
|
1186
|
+
allowed: boolean;
|
|
1187
|
+
reason?: string;
|
|
1188
|
+
};
|
|
1189
|
+
export type TRecordPermissionListResult = {
|
|
1190
|
+
recordId: string;
|
|
1191
|
+
actor?: string;
|
|
1192
|
+
reason?: string;
|
|
1193
|
+
permissions: Array<TRecordPermission | TRecordPermissionDecision>;
|
|
1194
|
+
};
|
|
1195
|
+
export type TGrantRecordPermissionResult = {
|
|
1196
|
+
recordId: string;
|
|
1197
|
+
subjectType: string;
|
|
1198
|
+
subjectId: string;
|
|
1199
|
+
actor: string;
|
|
1200
|
+
actions: string[];
|
|
1201
|
+
action?: string;
|
|
1202
|
+
effect: "allow" | "deny";
|
|
1203
|
+
id?: string;
|
|
1204
|
+
permissions: TRecordPermission[];
|
|
1205
|
+
};
|
|
1206
|
+
export type TRevokeRecordPermissionResult = {
|
|
1207
|
+
recordId: string;
|
|
1208
|
+
subjectType: string;
|
|
1209
|
+
subjectId: string;
|
|
1210
|
+
actor: string;
|
|
1211
|
+
actions: string[];
|
|
1212
|
+
action?: string;
|
|
1213
|
+
revoked: boolean;
|
|
1214
|
+
revokedCount: number;
|
|
1215
|
+
revokedBy: string;
|
|
1216
|
+
};
|
|
646
1217
|
export type TCollectionRelation = {
|
|
647
1218
|
id: string;
|
|
648
1219
|
fieldId: string;
|
|
@@ -665,6 +1236,9 @@ export type TAutomationRuleTriggerType = "created" | "updated" | "linked" | "unl
|
|
|
665
1236
|
export type TCollectionAutomationRuleConditionOperator = "is" | "is-not" | "contains" | "is-empty" | "is-not-empty";
|
|
666
1237
|
export type TCollectionAutomationRuleTriggerConfig = {
|
|
667
1238
|
updatedFieldId?: string | null;
|
|
1239
|
+
cron?: string | null;
|
|
1240
|
+
timezone?: string | null;
|
|
1241
|
+
maxRecords?: number;
|
|
668
1242
|
};
|
|
669
1243
|
export type TCollectionAutomationRuleCondition = {
|
|
670
1244
|
id: string;
|
|
@@ -672,7 +1246,7 @@ export type TCollectionAutomationRuleCondition = {
|
|
|
672
1246
|
operator: TCollectionAutomationRuleConditionOperator;
|
|
673
1247
|
value?: string | string[] | boolean | null;
|
|
674
1248
|
};
|
|
675
|
-
export type TAutomationRuleActionType = "create" | "update" | "delete" | "append-description" | "script";
|
|
1249
|
+
export type TAutomationRuleActionType = "create" | "update" | "delete" | "append-description" | "script" | "conditional-branch" | "find-records" | "for-each" | "copy-record" | "move-record" | "webhook" | "approval";
|
|
676
1250
|
export type TAutomationRuleAction = {
|
|
677
1251
|
id: string;
|
|
678
1252
|
type: TAutomationRuleActionType | null;
|
|
@@ -682,6 +1256,25 @@ export type TAutomationRuleAction = {
|
|
|
682
1256
|
formula?: string;
|
|
683
1257
|
template?: string;
|
|
684
1258
|
script?: string;
|
|
1259
|
+
condition?: TCollectionAutomationRuleCondition | null;
|
|
1260
|
+
thenActions?: TAutomationRuleAction[];
|
|
1261
|
+
elseActions?: TAutomationRuleAction[];
|
|
1262
|
+
collectionId?: string | null;
|
|
1263
|
+
filters?: TCollectionAutomationRuleCondition[];
|
|
1264
|
+
limit?: number;
|
|
1265
|
+
resultKey?: string;
|
|
1266
|
+
sourceKey?: string;
|
|
1267
|
+
maxIterations?: number;
|
|
1268
|
+
actions?: TAutomationRuleAction[];
|
|
1269
|
+
targetCollectionId?: string | null;
|
|
1270
|
+
fieldMap?: Record<string, string>;
|
|
1271
|
+
url?: string;
|
|
1272
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
1273
|
+
headers?: Record<string, string>;
|
|
1274
|
+
body?: unknown;
|
|
1275
|
+
timeoutMs?: number;
|
|
1276
|
+
approverIds?: string[];
|
|
1277
|
+
approvalMessage?: string;
|
|
685
1278
|
};
|
|
686
1279
|
export type TAutomationRuleActivityItem = {
|
|
687
1280
|
id: string;
|
|
@@ -701,8 +1294,62 @@ export type TCollectionAutomationRule = {
|
|
|
701
1294
|
conditions?: TCollectionAutomationRuleCondition[];
|
|
702
1295
|
actions: TAutomationRuleAction[];
|
|
703
1296
|
activity: TAutomationRuleActivityItem[];
|
|
1297
|
+
createdBy?: string | null;
|
|
1298
|
+
updatedBy?: string | null;
|
|
1299
|
+
createdAt: string;
|
|
1300
|
+
updatedAt: string;
|
|
1301
|
+
};
|
|
1302
|
+
export type TCollectionAutomationExecutionStatus = "queued" | "running" | "waiting_approval" | "succeeded" | "failed" | "skipped" | "cancelled";
|
|
1303
|
+
export type TCollectionAutomationStepExecution = {
|
|
1304
|
+
id: string;
|
|
1305
|
+
actionId: string;
|
|
1306
|
+
actionType: string;
|
|
1307
|
+
sequence: number;
|
|
1308
|
+
status: string;
|
|
1309
|
+
output?: Record<string, unknown> | null;
|
|
1310
|
+
error?: string | null;
|
|
1311
|
+
startedAt: string;
|
|
1312
|
+
finishedAt?: string | null;
|
|
1313
|
+
};
|
|
1314
|
+
export type TCollectionAutomationApproval = {
|
|
1315
|
+
id: string;
|
|
1316
|
+
actionId: string;
|
|
1317
|
+
status: "pending" | "approved" | "rejected";
|
|
1318
|
+
approverIds: string[];
|
|
1319
|
+
message: string;
|
|
1320
|
+
requestedBy: string;
|
|
1321
|
+
decidedBy?: string | null;
|
|
1322
|
+
decisionNote?: string;
|
|
1323
|
+
decidedAt?: string | null;
|
|
1324
|
+
createdAt: string;
|
|
1325
|
+
};
|
|
1326
|
+
export type TCollectionAutomationExecution = {
|
|
1327
|
+
id: string;
|
|
1328
|
+
tenantId: string;
|
|
1329
|
+
dataModelId: string;
|
|
1330
|
+
collectionId: string;
|
|
1331
|
+
ruleId?: string | null;
|
|
1332
|
+
ruleName?: string | null;
|
|
1333
|
+
recordId?: string | null;
|
|
1334
|
+
trigger: TAutomationRuleTriggerType;
|
|
1335
|
+
status: TCollectionAutomationExecutionStatus;
|
|
1336
|
+
attempt: number;
|
|
1337
|
+
maxAttempts: number;
|
|
1338
|
+
principalType: "user" | "service";
|
|
1339
|
+
principalId: string;
|
|
1340
|
+
output?: Record<string, unknown> | null;
|
|
1341
|
+
error?: string | null;
|
|
1342
|
+
nextAttemptAt?: string | null;
|
|
1343
|
+
startedAt?: string | null;
|
|
1344
|
+
finishedAt?: string | null;
|
|
704
1345
|
createdAt: string;
|
|
705
1346
|
updatedAt: string;
|
|
1347
|
+
steps: TCollectionAutomationStepExecution[];
|
|
1348
|
+
approvals: TCollectionAutomationApproval[];
|
|
1349
|
+
};
|
|
1350
|
+
export type TCollectionAutomationExecutionPage = {
|
|
1351
|
+
items: TCollectionAutomationExecution[];
|
|
1352
|
+
nextCursor?: string | null;
|
|
706
1353
|
};
|
|
707
1354
|
export type TCollectionViewColumn = {
|
|
708
1355
|
fieldName: string;
|
|
@@ -748,18 +1395,79 @@ export type TCollectionBoardViewConfig = {
|
|
|
748
1395
|
colorMode: TCollectionBoardColorMode;
|
|
749
1396
|
groupVisibleFieldOverrides: TCollectionBoardGroupVisibleFieldOverride[];
|
|
750
1397
|
};
|
|
751
|
-
export type
|
|
1398
|
+
export type TCollectionCalendarDefaultMode = "month" | "week" | "agenda";
|
|
1399
|
+
export type TCollectionCalendarViewConfig = {
|
|
1400
|
+
version: 1;
|
|
1401
|
+
columns: TCollectionViewColumn[];
|
|
1402
|
+
titleFieldName: string;
|
|
1403
|
+
startDateFieldName: string;
|
|
1404
|
+
endDateFieldName: string;
|
|
1405
|
+
colorFieldName: string;
|
|
1406
|
+
defaultMode: TCollectionCalendarDefaultMode;
|
|
1407
|
+
filters: TCollectionBoardFilterRule[];
|
|
1408
|
+
sorts: TCollectionBoardSortRule[];
|
|
1409
|
+
};
|
|
1410
|
+
export type TCollectionPresentationViewConfigBase = {
|
|
1411
|
+
version: 1;
|
|
1412
|
+
columns: TCollectionViewColumn[];
|
|
1413
|
+
filters: TCollectionBoardFilterRule[];
|
|
1414
|
+
sorts: TCollectionBoardSortRule[];
|
|
1415
|
+
};
|
|
1416
|
+
export type TCollectionTimelineViewConfig = TCollectionPresentationViewConfigBase & {
|
|
1417
|
+
titleFieldName: string;
|
|
1418
|
+
startDateFieldName: string;
|
|
1419
|
+
endDateFieldName: string;
|
|
1420
|
+
groupByFieldName: string;
|
|
1421
|
+
};
|
|
1422
|
+
export type TCollectionTreeViewConfig = TCollectionPresentationViewConfigBase & {
|
|
1423
|
+
labelFieldName: string;
|
|
1424
|
+
parentRelationFieldName: string;
|
|
1425
|
+
};
|
|
1426
|
+
export type TCollectionGalleryViewConfig = TCollectionPresentationViewConfigBase & {
|
|
1427
|
+
imageFieldName: string;
|
|
1428
|
+
titleFieldName: string;
|
|
1429
|
+
summaryFieldName: string;
|
|
1430
|
+
};
|
|
1431
|
+
export type TCollectionMapViewConfig = TCollectionPresentationViewConfigBase & {
|
|
1432
|
+
titleFieldName: string;
|
|
1433
|
+
locationFieldName: string;
|
|
1434
|
+
latitudeFieldName: string;
|
|
1435
|
+
longitudeFieldName: string;
|
|
1436
|
+
};
|
|
1437
|
+
export type TCollectionDocumentViewConfig = TCollectionPresentationViewConfigBase & {
|
|
1438
|
+
titleFieldName: string;
|
|
1439
|
+
bodyFieldName: string;
|
|
1440
|
+
metadataFieldNames: string[];
|
|
1441
|
+
};
|
|
1442
|
+
export type TCollectionViewConfig = TCollectionGridViewConfig | TCollectionBoardViewConfig | TCollectionCalendarViewConfig | TCollectionTimelineViewConfig | TCollectionTreeViewConfig | TCollectionGalleryViewConfig | TCollectionMapViewConfig | TCollectionDocumentViewConfig;
|
|
1443
|
+
export type TCollectionViewType = "grid" | "board" | "calendar" | "timeline" | "tree" | "gallery" | "map" | "document";
|
|
1444
|
+
export type TCollectionViewVisibility = "shared" | "personal";
|
|
1445
|
+
export type TCollectionViewPreference = {
|
|
1446
|
+
columns: TCollectionViewColumn[];
|
|
1447
|
+
updatedAt?: string;
|
|
1448
|
+
};
|
|
752
1449
|
export type TCollectionView = {
|
|
753
1450
|
id: string;
|
|
754
1451
|
tenantId: string;
|
|
755
1452
|
dataModelId: string;
|
|
756
1453
|
collectionId: string;
|
|
757
1454
|
name: string;
|
|
758
|
-
type:
|
|
1455
|
+
type: TCollectionViewType;
|
|
759
1456
|
config: TCollectionViewConfig;
|
|
1457
|
+
visibility?: TCollectionViewVisibility;
|
|
1458
|
+
ownerId?: string | null;
|
|
1459
|
+
isOwner?: boolean;
|
|
1460
|
+
canEdit?: boolean;
|
|
1461
|
+
preference?: TCollectionViewPreference | null;
|
|
760
1462
|
createdAt: string;
|
|
761
1463
|
updatedAt: string;
|
|
762
1464
|
};
|
|
1465
|
+
export type TCollectionViewPreferenceResult = {
|
|
1466
|
+
viewId: string;
|
|
1467
|
+
userId: string;
|
|
1468
|
+
columns: TCollectionViewColumn[];
|
|
1469
|
+
updatedAt: string;
|
|
1470
|
+
};
|
|
763
1471
|
export type TCollectionButtonAction = TAutomationRuleAction;
|
|
764
1472
|
export type TCollectionButtonActivityItem = TAutomationRuleActivityItem;
|
|
765
1473
|
export type TCollectionButton = {
|
|
@@ -855,6 +1563,110 @@ export type TWorkerWhatsAppHealth = {
|
|
|
855
1563
|
statusUrl?: string;
|
|
856
1564
|
checks: TWorkerWhatsAppHealthCheck[];
|
|
857
1565
|
};
|
|
1566
|
+
export type TSlackConversation = {
|
|
1567
|
+
id: string;
|
|
1568
|
+
name: string;
|
|
1569
|
+
isPrivate: boolean;
|
|
1570
|
+
isMember: boolean;
|
|
1571
|
+
};
|
|
1572
|
+
export type TSlackConversationList = {
|
|
1573
|
+
team: {
|
|
1574
|
+
id: string;
|
|
1575
|
+
name: string;
|
|
1576
|
+
};
|
|
1577
|
+
bot: {
|
|
1578
|
+
id: string;
|
|
1579
|
+
name: string;
|
|
1580
|
+
};
|
|
1581
|
+
conversations: TSlackConversation[];
|
|
1582
|
+
};
|
|
1583
|
+
export type TWorkerSlackHealthCheck = {
|
|
1584
|
+
id: string;
|
|
1585
|
+
status: 'passed' | 'failed' | 'skipped';
|
|
1586
|
+
message: string;
|
|
1587
|
+
};
|
|
1588
|
+
export type TWorkerSlackHealth = {
|
|
1589
|
+
checkedAt?: string;
|
|
1590
|
+
eventsUrl?: string;
|
|
1591
|
+
webhookVerifiedAt?: string;
|
|
1592
|
+
teamId?: string;
|
|
1593
|
+
teamName?: string;
|
|
1594
|
+
botUserId?: string;
|
|
1595
|
+
botName?: string;
|
|
1596
|
+
checks: TWorkerSlackHealthCheck[];
|
|
1597
|
+
};
|
|
1598
|
+
export type TWorkerSlackMessageHistory = {
|
|
1599
|
+
channel: {
|
|
1600
|
+
id: string;
|
|
1601
|
+
name: string;
|
|
1602
|
+
provider: 'slack';
|
|
1603
|
+
teamId: string;
|
|
1604
|
+
teamName: string;
|
|
1605
|
+
botUserId: string;
|
|
1606
|
+
status: string;
|
|
1607
|
+
} | null;
|
|
1608
|
+
messages: TWorkerChannelMessage[];
|
|
1609
|
+
nextCursor: string | null;
|
|
1610
|
+
};
|
|
1611
|
+
export type TDiscordGuild = {
|
|
1612
|
+
id: string;
|
|
1613
|
+
name: string;
|
|
1614
|
+
icon: string | null;
|
|
1615
|
+
};
|
|
1616
|
+
export type TDiscordGuildList = {
|
|
1617
|
+
bot: {
|
|
1618
|
+
id: string;
|
|
1619
|
+
name: string;
|
|
1620
|
+
};
|
|
1621
|
+
application: {
|
|
1622
|
+
id: string;
|
|
1623
|
+
name: string;
|
|
1624
|
+
};
|
|
1625
|
+
guilds: TDiscordGuild[];
|
|
1626
|
+
};
|
|
1627
|
+
export type TDiscordGuildChannel = {
|
|
1628
|
+
id: string;
|
|
1629
|
+
name: string;
|
|
1630
|
+
type: 'text' | 'announcement';
|
|
1631
|
+
parentId: string | null;
|
|
1632
|
+
position: number;
|
|
1633
|
+
};
|
|
1634
|
+
export type TDiscordGuildChannelList = {
|
|
1635
|
+
guild: {
|
|
1636
|
+
id: string;
|
|
1637
|
+
name: string;
|
|
1638
|
+
};
|
|
1639
|
+
channels: TDiscordGuildChannel[];
|
|
1640
|
+
};
|
|
1641
|
+
export type TWorkerDiscordHealthCheck = {
|
|
1642
|
+
id: string;
|
|
1643
|
+
status: 'passed' | 'failed' | 'skipped';
|
|
1644
|
+
message: string;
|
|
1645
|
+
};
|
|
1646
|
+
export type TWorkerDiscordHealth = {
|
|
1647
|
+
checkedAt?: string;
|
|
1648
|
+
gatewayStatus?: string;
|
|
1649
|
+
connectedAt?: string;
|
|
1650
|
+
lastEventAt?: string;
|
|
1651
|
+
botUserId?: string;
|
|
1652
|
+
botName?: string;
|
|
1653
|
+
applicationId?: string;
|
|
1654
|
+
guildName?: string;
|
|
1655
|
+
checks: TWorkerDiscordHealthCheck[];
|
|
1656
|
+
};
|
|
1657
|
+
export type TWorkerDiscordMessageHistory = {
|
|
1658
|
+
channel: {
|
|
1659
|
+
id: string;
|
|
1660
|
+
name: string;
|
|
1661
|
+
provider: 'discord';
|
|
1662
|
+
guildId: string;
|
|
1663
|
+
guildName: string;
|
|
1664
|
+
botUserId: string;
|
|
1665
|
+
status: string;
|
|
1666
|
+
} | null;
|
|
1667
|
+
messages: TWorkerChannelMessage[];
|
|
1668
|
+
nextCursor: string | null;
|
|
1669
|
+
};
|
|
858
1670
|
export type TGoogleMeetCalendar = {
|
|
859
1671
|
id: string;
|
|
860
1672
|
summary: string;
|