@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
|
@@ -718,16 +718,68 @@ export type TCollection = {
|
|
|
718
718
|
id: string;
|
|
719
719
|
name: string;
|
|
720
720
|
displayName: string;
|
|
721
|
-
description
|
|
722
|
-
stats
|
|
721
|
+
description?: string | null;
|
|
722
|
+
stats?: {
|
|
723
723
|
totalFields: number;
|
|
724
724
|
activeFields: number;
|
|
725
725
|
deletedFields: number;
|
|
726
726
|
data: string;
|
|
727
727
|
storage: string;
|
|
728
|
-
}
|
|
728
|
+
};
|
|
729
|
+
fields?: TCollectionField[];
|
|
730
|
+
archived?: boolean;
|
|
731
|
+
ignoredFields?: string[];
|
|
729
732
|
}
|
|
730
733
|
|
|
734
|
+
export type TCollectionChecklistItem = {
|
|
735
|
+
id: string;
|
|
736
|
+
text: string;
|
|
737
|
+
checked: boolean;
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
export type TCollectionSignatureValue = {
|
|
741
|
+
kind: "typed" | "drawn";
|
|
742
|
+
value: string;
|
|
743
|
+
signedAt: string;
|
|
744
|
+
signedBy: string;
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
/** Client write shape; provenance is always attached by the collection service. */
|
|
748
|
+
export type TCollectionSignatureInput = Pick<TCollectionSignatureValue, "kind" | "value">;
|
|
749
|
+
|
|
750
|
+
export type TCollectionUserReference = string | {
|
|
751
|
+
id: string;
|
|
752
|
+
name?: string;
|
|
753
|
+
email?: string;
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
export type TCollectionDerivedCondition = {
|
|
757
|
+
fieldId: string;
|
|
758
|
+
fieldName?: string;
|
|
759
|
+
operator: "eq" | "neq" | "contains" | "not-contains" | "gt" | "gte" | "lt" | "lte" | "is-empty" | "is-not-empty";
|
|
760
|
+
value?: unknown;
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
export type TCollectionFieldConfig = {
|
|
764
|
+
[key: string]: any;
|
|
765
|
+
relationFieldId?: string;
|
|
766
|
+
relationFieldName?: string;
|
|
767
|
+
relationId?: string;
|
|
768
|
+
targetCollectionId?: string;
|
|
769
|
+
targetFieldId?: string;
|
|
770
|
+
targetFieldName?: string;
|
|
771
|
+
resultMode?: "first" | "list";
|
|
772
|
+
operation?: "count" | "count-values" | "count-unique" | "sum" | "average" | "min" | "max";
|
|
773
|
+
condition?: TCollectionDerivedCondition;
|
|
774
|
+
maxItems?: number;
|
|
775
|
+
min?: number;
|
|
776
|
+
max?: number;
|
|
777
|
+
precision?: number;
|
|
778
|
+
mode?: "typed" | "drawn" | "both";
|
|
779
|
+
source?: "organization" | "users" | "employees" | "both";
|
|
780
|
+
includeInactive?: boolean;
|
|
781
|
+
};
|
|
782
|
+
|
|
731
783
|
export type TCollectionField = {
|
|
732
784
|
id: string;
|
|
733
785
|
collectionId: string;
|
|
@@ -736,12 +788,570 @@ export type TCollectionField = {
|
|
|
736
788
|
displayName: string;
|
|
737
789
|
type: string;
|
|
738
790
|
required: boolean;
|
|
739
|
-
config?:
|
|
791
|
+
config?: TCollectionFieldConfig;
|
|
740
792
|
order?: number;
|
|
741
793
|
deletedAt?: string;
|
|
742
794
|
deletedBy?: string;
|
|
743
795
|
}
|
|
744
796
|
|
|
797
|
+
export type TCsvImportInvalidRowPolicy = "reject" | "skip-row" | "set-null";
|
|
798
|
+
|
|
799
|
+
export type TCsvImportRowRepair = {
|
|
800
|
+
rowIndex: number;
|
|
801
|
+
fieldId: string;
|
|
802
|
+
value: unknown;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
export type TCsvImportRowIssue = {
|
|
806
|
+
rowIndex: number;
|
|
807
|
+
fieldId: string;
|
|
808
|
+
fieldName: string;
|
|
809
|
+
code: "required" | "type" | "option" | "relation_config" | "relation_cardinality";
|
|
810
|
+
message: string;
|
|
811
|
+
rawValue: unknown;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export type TCsvImportRowPreview = {
|
|
815
|
+
totalRows: number;
|
|
816
|
+
validRows: number;
|
|
817
|
+
invalidRows: number;
|
|
818
|
+
acceptedRows: number;
|
|
819
|
+
skippedRows: number;
|
|
820
|
+
blockingIssueCount: number;
|
|
821
|
+
issues: TCsvImportRowIssue[];
|
|
822
|
+
truncatedIssueCount: number;
|
|
823
|
+
invalidRowPolicy: TCsvImportInvalidRowPolicy;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
export type TCollectionRecord = {
|
|
827
|
+
id: string;
|
|
828
|
+
data: Record<string, any>;
|
|
829
|
+
meta?: Record<string, any>;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
export type TCollectionRecordPage = {
|
|
833
|
+
query?: string;
|
|
834
|
+
total: number;
|
|
835
|
+
limit: number;
|
|
836
|
+
offset: number;
|
|
837
|
+
items: TCollectionRecord[];
|
|
838
|
+
/** Compatibility alias returned for older consumers. */
|
|
839
|
+
records?: TCollectionRecord[];
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
export type TBulkUpdateRecordsResult = {
|
|
843
|
+
matchedCount: number;
|
|
844
|
+
modifiedCount: number;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
export type TCollectionFieldOrder = {
|
|
848
|
+
fieldId: string;
|
|
849
|
+
order: number;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
export type TReorderCollectionFieldsResult = {
|
|
853
|
+
collectionId: string;
|
|
854
|
+
reorderedCount: number;
|
|
855
|
+
orderStep: number;
|
|
856
|
+
fields: TCollectionFieldOrder[];
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
export type TRecordPermission = {
|
|
860
|
+
id: string;
|
|
861
|
+
recordId: string;
|
|
862
|
+
subjectType: string;
|
|
863
|
+
subjectId: string;
|
|
864
|
+
actor: string;
|
|
865
|
+
action: string;
|
|
866
|
+
effect: "allow" | "deny";
|
|
867
|
+
createdBy?: string;
|
|
868
|
+
createdAt?: string | Date;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
export type TCollectionAccessPolicyScopeType = "app" | "list" | "field";
|
|
872
|
+
export type TCollectionAccessPolicySubjectType = "user" | "role" | "team" | "service";
|
|
873
|
+
export type TCollectionAccessPolicyEffect = "allow" | "deny";
|
|
874
|
+
export type TCollectionAccessPolicyAction = "read" | "create" | "update" | "delete" | "comment" | "assign";
|
|
875
|
+
export type TCollectionAccessPolicyRowOperator = "me" | "user" | "team" | "linked-record";
|
|
876
|
+
|
|
877
|
+
export type TCollectionAccessPolicyRowFilter = {
|
|
878
|
+
match: "all" | "any";
|
|
879
|
+
conditions: Array<{
|
|
880
|
+
fieldId: string;
|
|
881
|
+
operator: TCollectionAccessPolicyRowOperator;
|
|
882
|
+
value?: string;
|
|
883
|
+
}>;
|
|
884
|
+
};
|
|
885
|
+
|
|
886
|
+
export type TCollectionAccessPolicy = {
|
|
887
|
+
id: string;
|
|
888
|
+
tenantId: string;
|
|
889
|
+
dataModelId: string;
|
|
890
|
+
collectionId: string | null;
|
|
891
|
+
fieldId: string | null;
|
|
892
|
+
name: string;
|
|
893
|
+
scopeType: TCollectionAccessPolicyScopeType;
|
|
894
|
+
subjectType: TCollectionAccessPolicySubjectType;
|
|
895
|
+
subjectId: string;
|
|
896
|
+
effect: TCollectionAccessPolicyEffect;
|
|
897
|
+
actions: TCollectionAccessPolicyAction[];
|
|
898
|
+
rowFilter: TCollectionAccessPolicyRowFilter | null;
|
|
899
|
+
enabled: boolean;
|
|
900
|
+
createdAt?: string | Date;
|
|
901
|
+
updatedAt?: string | Date;
|
|
902
|
+
createdBy?: string;
|
|
903
|
+
updatedBy?: string;
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
export type TCollectionAccessPolicyPreview = {
|
|
907
|
+
valid: true;
|
|
908
|
+
policy: Omit<TCollectionAccessPolicy, "id" | "tenantId"> & { id?: string };
|
|
909
|
+
currentActorMatches: boolean;
|
|
910
|
+
preview: {
|
|
911
|
+
allowed: boolean;
|
|
912
|
+
reason: string;
|
|
913
|
+
} | null;
|
|
914
|
+
};
|
|
915
|
+
|
|
916
|
+
export type TCollectionAccessTeamMember = {
|
|
917
|
+
id: string;
|
|
918
|
+
teamId: string;
|
|
919
|
+
userId: string;
|
|
920
|
+
createdAt: string | Date;
|
|
921
|
+
createdBy: string;
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
export type TSetCollectionAccessTeamMembersResult = {
|
|
925
|
+
teamId: string;
|
|
926
|
+
userIds: string[];
|
|
927
|
+
memberCount: number;
|
|
928
|
+
updatedBy: string;
|
|
929
|
+
};
|
|
930
|
+
|
|
931
|
+
export type TCollectionFormLayoutField = {
|
|
932
|
+
fieldId: string;
|
|
933
|
+
label?: string;
|
|
934
|
+
helpText?: string;
|
|
935
|
+
placeholder?: string;
|
|
936
|
+
required?: boolean;
|
|
937
|
+
width?: "full" | "half";
|
|
938
|
+
};
|
|
939
|
+
|
|
940
|
+
export type TCollectionFormLayoutSection = {
|
|
941
|
+
id: string;
|
|
942
|
+
title?: string;
|
|
943
|
+
description?: string;
|
|
944
|
+
fields: TCollectionFormLayoutField[];
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
export type TCollectionFormLayout = {
|
|
948
|
+
sections: TCollectionFormLayoutSection[];
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
export type TCollectionFormStatus = "draft" | "published" | "archived";
|
|
952
|
+
|
|
953
|
+
export type TCollectionForm = {
|
|
954
|
+
id: string;
|
|
955
|
+
tenantId: string;
|
|
956
|
+
dataModelId: string;
|
|
957
|
+
collectionId: string;
|
|
958
|
+
name: string;
|
|
959
|
+
description: string;
|
|
960
|
+
layout: TCollectionFormLayout;
|
|
961
|
+
submitLabel: string;
|
|
962
|
+
successMessage: string;
|
|
963
|
+
enabled: boolean;
|
|
964
|
+
status: TCollectionFormStatus;
|
|
965
|
+
serviceSubjectId: string;
|
|
966
|
+
tokenHint: string | null;
|
|
967
|
+
publishedAt: string | null;
|
|
968
|
+
expiresAt: string | null;
|
|
969
|
+
revokedAt: string | null;
|
|
970
|
+
rateLimitPerMinute: number;
|
|
971
|
+
maxSubmissions: number | null;
|
|
972
|
+
submissionCount: number;
|
|
973
|
+
createdAt: string | null;
|
|
974
|
+
updatedAt: string | null;
|
|
975
|
+
createdBy: string;
|
|
976
|
+
updatedBy: string;
|
|
977
|
+
};
|
|
978
|
+
|
|
979
|
+
export type TResolvedCollectionFormField = {
|
|
980
|
+
id: string;
|
|
981
|
+
type: string;
|
|
982
|
+
label: string;
|
|
983
|
+
helpText?: string;
|
|
984
|
+
placeholder?: string;
|
|
985
|
+
required: boolean;
|
|
986
|
+
width?: "full" | "half";
|
|
987
|
+
config?: Record<string, unknown>;
|
|
988
|
+
};
|
|
989
|
+
|
|
990
|
+
export type TResolvedCollectionFormSection = {
|
|
991
|
+
id: string;
|
|
992
|
+
title?: string;
|
|
993
|
+
description?: string;
|
|
994
|
+
fields: TResolvedCollectionFormField[];
|
|
995
|
+
};
|
|
996
|
+
|
|
997
|
+
export type TResolvedCollectionForm = {
|
|
998
|
+
name: string;
|
|
999
|
+
description?: string;
|
|
1000
|
+
submitLabel: string;
|
|
1001
|
+
successMessage: string;
|
|
1002
|
+
expiresAt?: string | null;
|
|
1003
|
+
sections: TResolvedCollectionFormSection[];
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
export type TResolvedInternalCollectionForm = TCollectionForm & {
|
|
1007
|
+
sections: TResolvedCollectionFormSection[];
|
|
1008
|
+
};
|
|
1009
|
+
|
|
1010
|
+
export type TCollectionFormPublishResult = {
|
|
1011
|
+
form: TCollectionForm;
|
|
1012
|
+
token: string;
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
export type TCollectionFormSubmissionResult = {
|
|
1016
|
+
submissionId: string;
|
|
1017
|
+
successMessage: string;
|
|
1018
|
+
idempotent: boolean;
|
|
1019
|
+
recordId?: string | null;
|
|
1020
|
+
};
|
|
1021
|
+
|
|
1022
|
+
export type TCollectionAppGenerationField = {
|
|
1023
|
+
name: string;
|
|
1024
|
+
displayName: string;
|
|
1025
|
+
type: string;
|
|
1026
|
+
required: boolean;
|
|
1027
|
+
config: Record<string, unknown>;
|
|
1028
|
+
};
|
|
1029
|
+
|
|
1030
|
+
export type TCollectionAppGenerationView = {
|
|
1031
|
+
name: string;
|
|
1032
|
+
type: "grid" | "board" | "calendar";
|
|
1033
|
+
config: Record<string, unknown>;
|
|
1034
|
+
};
|
|
1035
|
+
|
|
1036
|
+
export type TCollectionAppGenerationProposal = {
|
|
1037
|
+
version: 1;
|
|
1038
|
+
app: { name: string; displayName: string };
|
|
1039
|
+
collections: Array<{
|
|
1040
|
+
name: string;
|
|
1041
|
+
displayName: string;
|
|
1042
|
+
fields: TCollectionAppGenerationField[];
|
|
1043
|
+
views: TCollectionAppGenerationView[];
|
|
1044
|
+
}>;
|
|
1045
|
+
};
|
|
1046
|
+
|
|
1047
|
+
export type TCollectionAppGenerationDiff = {
|
|
1048
|
+
version: 1;
|
|
1049
|
+
destructive: false;
|
|
1050
|
+
summary: { creates: number; updates: number; deletes: number };
|
|
1051
|
+
operations: Array<{
|
|
1052
|
+
operation: "create";
|
|
1053
|
+
kind: "dataModel" | "collection" | "field" | "view";
|
|
1054
|
+
path: string;
|
|
1055
|
+
displayName?: string;
|
|
1056
|
+
fieldType?: string;
|
|
1057
|
+
viewType?: string;
|
|
1058
|
+
required?: boolean;
|
|
1059
|
+
}>;
|
|
1060
|
+
};
|
|
1061
|
+
|
|
1062
|
+
export type TCollectionAppGenerationResources = {
|
|
1063
|
+
dataModel: { id: string; name: string };
|
|
1064
|
+
collections: Array<{ id: string; name: string }>;
|
|
1065
|
+
};
|
|
1066
|
+
|
|
1067
|
+
export type TCollectionAppGenerationRun = {
|
|
1068
|
+
id: string;
|
|
1069
|
+
planId: string;
|
|
1070
|
+
tenantId: string;
|
|
1071
|
+
status: string;
|
|
1072
|
+
createdResources: TCollectionAppGenerationResources | null;
|
|
1073
|
+
errorCode: string | null;
|
|
1074
|
+
errorMessage: string | null;
|
|
1075
|
+
applyActorId: string;
|
|
1076
|
+
rollbackActorId: string | null;
|
|
1077
|
+
appliedAt: string | Date | null;
|
|
1078
|
+
rolledBackAt: string | Date | null;
|
|
1079
|
+
rollbackMetadataDeletedAt: string | Date | null;
|
|
1080
|
+
createdAt: string | Date;
|
|
1081
|
+
updatedAt: string | Date;
|
|
1082
|
+
};
|
|
1083
|
+
|
|
1084
|
+
export type TCollectionAppGenerationPlan = {
|
|
1085
|
+
id: string;
|
|
1086
|
+
tenantId: string;
|
|
1087
|
+
prompt: string;
|
|
1088
|
+
promptHash: string;
|
|
1089
|
+
proposal: TCollectionAppGenerationProposal;
|
|
1090
|
+
proposalHash: string;
|
|
1091
|
+
diff: TCollectionAppGenerationDiff;
|
|
1092
|
+
status: string;
|
|
1093
|
+
activeRunId: string | null;
|
|
1094
|
+
createdBy: string;
|
|
1095
|
+
createdAt: string | Date;
|
|
1096
|
+
updatedAt: string | Date;
|
|
1097
|
+
runs: TCollectionAppGenerationRun[];
|
|
1098
|
+
};
|
|
1099
|
+
|
|
1100
|
+
export type TCollectionAppGenerationPlanPage = {
|
|
1101
|
+
items: TCollectionAppGenerationPlan[];
|
|
1102
|
+
nextOffset: number | null;
|
|
1103
|
+
};
|
|
1104
|
+
|
|
1105
|
+
export type TCollectionAppGenerationRunPage = {
|
|
1106
|
+
items: TCollectionAppGenerationRun[];
|
|
1107
|
+
nextOffset: number | null;
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
export type TCollectionReportType = "table" | "metric" | "chart";
|
|
1111
|
+
export type TCollectionReportVisibility = "personal" | "shared";
|
|
1112
|
+
|
|
1113
|
+
export type TCollectionReportTableConfig = {
|
|
1114
|
+
filter?: Record<string, unknown>;
|
|
1115
|
+
fields: string[];
|
|
1116
|
+
sort?: Record<string, "asc" | "desc">;
|
|
1117
|
+
limit?: number;
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1120
|
+
export type TCollectionReportAggregateConfig = {
|
|
1121
|
+
filter?: Record<string, unknown>;
|
|
1122
|
+
aggregate: "count" | "sum" | "avg" | "min" | "max";
|
|
1123
|
+
valueField?: string;
|
|
1124
|
+
groupBy?: string;
|
|
1125
|
+
limit?: number;
|
|
1126
|
+
};
|
|
1127
|
+
|
|
1128
|
+
export type TCollectionReport = {
|
|
1129
|
+
id: string;
|
|
1130
|
+
tenantId: string;
|
|
1131
|
+
dataModelId: string;
|
|
1132
|
+
collectionId: string;
|
|
1133
|
+
name: string;
|
|
1134
|
+
description: string | null;
|
|
1135
|
+
type: TCollectionReportType;
|
|
1136
|
+
visibility: TCollectionReportVisibility;
|
|
1137
|
+
ownerId: string;
|
|
1138
|
+
config: TCollectionReportTableConfig | TCollectionReportAggregateConfig | null;
|
|
1139
|
+
available: boolean;
|
|
1140
|
+
unavailableReason?: string;
|
|
1141
|
+
canEdit: boolean;
|
|
1142
|
+
createdAt: string | Date;
|
|
1143
|
+
updatedAt: string | Date;
|
|
1144
|
+
createdBy: string;
|
|
1145
|
+
updatedBy: string;
|
|
1146
|
+
};
|
|
1147
|
+
|
|
1148
|
+
export type TCollectionReportPage = {
|
|
1149
|
+
total: number;
|
|
1150
|
+
limit: number;
|
|
1151
|
+
offset: number;
|
|
1152
|
+
items: TCollectionReport[];
|
|
1153
|
+
};
|
|
1154
|
+
|
|
1155
|
+
export type TCollectionReportTableResult = {
|
|
1156
|
+
type: "table";
|
|
1157
|
+
fields: Array<{ name: string; displayName: string; type: string }>;
|
|
1158
|
+
items: Array<{ id: string; data: Record<string, unknown> }>;
|
|
1159
|
+
count: number;
|
|
1160
|
+
truncated: boolean;
|
|
1161
|
+
};
|
|
1162
|
+
|
|
1163
|
+
export type TCollectionReportMetricResult = { type: "metric"; value: number };
|
|
1164
|
+
export type TCollectionReportChartResult = {
|
|
1165
|
+
type: "chart";
|
|
1166
|
+
points: Array<{ label: string | number | boolean | null; value: number }>;
|
|
1167
|
+
truncated: boolean;
|
|
1168
|
+
};
|
|
1169
|
+
export type TCollectionReportResult =
|
|
1170
|
+
| TCollectionReportTableResult
|
|
1171
|
+
| TCollectionReportMetricResult
|
|
1172
|
+
| TCollectionReportChartResult;
|
|
1173
|
+
|
|
1174
|
+
export type TCollectionReportEvaluation = {
|
|
1175
|
+
report: TCollectionReport;
|
|
1176
|
+
result: TCollectionReportResult;
|
|
1177
|
+
evaluatedAt: string | Date;
|
|
1178
|
+
};
|
|
1179
|
+
|
|
1180
|
+
export type TCollectionDashboardWidget = {
|
|
1181
|
+
id: string;
|
|
1182
|
+
title: string;
|
|
1183
|
+
type: TCollectionReportType;
|
|
1184
|
+
order: number;
|
|
1185
|
+
reportId: string | null;
|
|
1186
|
+
reportName?: string;
|
|
1187
|
+
config: Record<string, unknown> | null;
|
|
1188
|
+
available: boolean;
|
|
1189
|
+
unavailableReason?: string;
|
|
1190
|
+
createdAt: string | Date;
|
|
1191
|
+
updatedAt: string | Date;
|
|
1192
|
+
};
|
|
1193
|
+
|
|
1194
|
+
export type TCollectionDashboard = {
|
|
1195
|
+
id: string;
|
|
1196
|
+
tenantId: string;
|
|
1197
|
+
dataModelId: string;
|
|
1198
|
+
collectionId: string;
|
|
1199
|
+
name: string;
|
|
1200
|
+
description: string | null;
|
|
1201
|
+
visibility: TCollectionReportVisibility;
|
|
1202
|
+
ownerId: string;
|
|
1203
|
+
settings: { columns: number; compact: boolean };
|
|
1204
|
+
widgets: TCollectionDashboardWidget[];
|
|
1205
|
+
canEdit: boolean;
|
|
1206
|
+
createdAt: string | Date;
|
|
1207
|
+
updatedAt: string | Date;
|
|
1208
|
+
createdBy: string;
|
|
1209
|
+
updatedBy: string;
|
|
1210
|
+
};
|
|
1211
|
+
|
|
1212
|
+
export type TCollectionDashboardPage = {
|
|
1213
|
+
total: number;
|
|
1214
|
+
limit: number;
|
|
1215
|
+
offset: number;
|
|
1216
|
+
items: TCollectionDashboard[];
|
|
1217
|
+
};
|
|
1218
|
+
|
|
1219
|
+
export type TCollectionDashboardEvaluation = {
|
|
1220
|
+
dashboard: TCollectionDashboard;
|
|
1221
|
+
widgets: Array<{
|
|
1222
|
+
widgetId: string;
|
|
1223
|
+
status: "ready" | "unavailable";
|
|
1224
|
+
result?: TCollectionReportResult;
|
|
1225
|
+
error?: string;
|
|
1226
|
+
}>;
|
|
1227
|
+
evaluatedAt: string | Date;
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
export type TCollectionComment = {
|
|
1231
|
+
id: string;
|
|
1232
|
+
parentId: string | null;
|
|
1233
|
+
authorId: string;
|
|
1234
|
+
body: string | null;
|
|
1235
|
+
mentionUserIds: string[];
|
|
1236
|
+
createdAt: string | Date;
|
|
1237
|
+
updatedAt: string | Date;
|
|
1238
|
+
editedAt?: string | Date | null;
|
|
1239
|
+
deletedAt?: string | Date | null;
|
|
1240
|
+
canEdit?: boolean;
|
|
1241
|
+
canDelete?: boolean;
|
|
1242
|
+
};
|
|
1243
|
+
|
|
1244
|
+
export type TCollectionCommentPage = {
|
|
1245
|
+
comments: TCollectionComment[];
|
|
1246
|
+
total: number;
|
|
1247
|
+
limit: number;
|
|
1248
|
+
offset: number;
|
|
1249
|
+
hasMore: boolean;
|
|
1250
|
+
};
|
|
1251
|
+
|
|
1252
|
+
export type TCollectionRecordActivity = {
|
|
1253
|
+
id: string;
|
|
1254
|
+
type: string;
|
|
1255
|
+
actorId: string;
|
|
1256
|
+
resourceType?: string | null;
|
|
1257
|
+
resourceId?: string | null;
|
|
1258
|
+
payload?: Record<string, string | number | boolean | null> | null;
|
|
1259
|
+
createdAt: string | Date;
|
|
1260
|
+
};
|
|
1261
|
+
|
|
1262
|
+
export type TCollectionRecordEvent = {
|
|
1263
|
+
id: string;
|
|
1264
|
+
type: string;
|
|
1265
|
+
actorId: string;
|
|
1266
|
+
source?: string | null;
|
|
1267
|
+
createdAt: string | Date;
|
|
1268
|
+
};
|
|
1269
|
+
|
|
1270
|
+
export type TCollectionRecordActivityPage = {
|
|
1271
|
+
activity: TCollectionRecordActivity[];
|
|
1272
|
+
total: number;
|
|
1273
|
+
recordEvents: TCollectionRecordEvent[];
|
|
1274
|
+
recordEventTotal: number;
|
|
1275
|
+
limit: number;
|
|
1276
|
+
offset: number;
|
|
1277
|
+
hasMore: boolean;
|
|
1278
|
+
recordEventsHasMore: boolean;
|
|
1279
|
+
};
|
|
1280
|
+
|
|
1281
|
+
export type TCollectionRecordCollaborator = {
|
|
1282
|
+
id: string;
|
|
1283
|
+
userId: string;
|
|
1284
|
+
kind: "assignee" | "watcher";
|
|
1285
|
+
createdAt: string | Date;
|
|
1286
|
+
createdBy: string;
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
export type TCollectionRecordCollaborators = {
|
|
1290
|
+
assigneeIds: string[];
|
|
1291
|
+
watcherIds: string[];
|
|
1292
|
+
collaborators: TCollectionRecordCollaborator[];
|
|
1293
|
+
updatedBy?: string;
|
|
1294
|
+
};
|
|
1295
|
+
|
|
1296
|
+
export type TCollectionNotification = {
|
|
1297
|
+
id: string;
|
|
1298
|
+
type: string;
|
|
1299
|
+
actorId: string;
|
|
1300
|
+
collectionId?: string | null;
|
|
1301
|
+
recordId?: string | null;
|
|
1302
|
+
resourceType?: string | null;
|
|
1303
|
+
resourceId?: string | null;
|
|
1304
|
+
payload?: Record<string, string | number | boolean | null> | null;
|
|
1305
|
+
readAt?: string | Date | null;
|
|
1306
|
+
createdAt: string | Date;
|
|
1307
|
+
};
|
|
1308
|
+
|
|
1309
|
+
export type TCollectionNotificationPage = {
|
|
1310
|
+
notifications: TCollectionNotification[];
|
|
1311
|
+
unreadCount: number;
|
|
1312
|
+
limit: number;
|
|
1313
|
+
offset: number;
|
|
1314
|
+
nextOffset: number;
|
|
1315
|
+
hasMore: boolean;
|
|
1316
|
+
};
|
|
1317
|
+
|
|
1318
|
+
export type TRecordPermissionDecision = {
|
|
1319
|
+
action: string;
|
|
1320
|
+
allowed: boolean;
|
|
1321
|
+
reason?: string;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
export type TRecordPermissionListResult = {
|
|
1325
|
+
recordId: string;
|
|
1326
|
+
actor?: string;
|
|
1327
|
+
reason?: string;
|
|
1328
|
+
permissions: Array<TRecordPermission | TRecordPermissionDecision>;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
export type TGrantRecordPermissionResult = {
|
|
1332
|
+
recordId: string;
|
|
1333
|
+
subjectType: string;
|
|
1334
|
+
subjectId: string;
|
|
1335
|
+
actor: string;
|
|
1336
|
+
actions: string[];
|
|
1337
|
+
action?: string;
|
|
1338
|
+
effect: "allow" | "deny";
|
|
1339
|
+
id?: string;
|
|
1340
|
+
permissions: TRecordPermission[];
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
export type TRevokeRecordPermissionResult = {
|
|
1344
|
+
recordId: string;
|
|
1345
|
+
subjectType: string;
|
|
1346
|
+
subjectId: string;
|
|
1347
|
+
actor: string;
|
|
1348
|
+
actions: string[];
|
|
1349
|
+
action?: string;
|
|
1350
|
+
revoked: boolean;
|
|
1351
|
+
revokedCount: number;
|
|
1352
|
+
revokedBy: string;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
745
1355
|
export type TCollectionRelation = {
|
|
746
1356
|
id: string;
|
|
747
1357
|
fieldId: string;
|
|
@@ -777,6 +1387,9 @@ export type TCollectionAutomationRuleConditionOperator =
|
|
|
777
1387
|
|
|
778
1388
|
export type TCollectionAutomationRuleTriggerConfig = {
|
|
779
1389
|
updatedFieldId?: string | null;
|
|
1390
|
+
cron?: string | null;
|
|
1391
|
+
timezone?: string | null;
|
|
1392
|
+
maxRecords?: number;
|
|
780
1393
|
}
|
|
781
1394
|
|
|
782
1395
|
export type TCollectionAutomationRuleCondition = {
|
|
@@ -791,7 +1404,14 @@ export type TAutomationRuleActionType =
|
|
|
791
1404
|
| "update"
|
|
792
1405
|
| "delete"
|
|
793
1406
|
| "append-description"
|
|
794
|
-
| "script"
|
|
1407
|
+
| "script"
|
|
1408
|
+
| "conditional-branch"
|
|
1409
|
+
| "find-records"
|
|
1410
|
+
| "for-each"
|
|
1411
|
+
| "copy-record"
|
|
1412
|
+
| "move-record"
|
|
1413
|
+
| "webhook"
|
|
1414
|
+
| "approval";
|
|
795
1415
|
|
|
796
1416
|
export type TAutomationRuleAction = {
|
|
797
1417
|
id: string;
|
|
@@ -802,6 +1422,25 @@ export type TAutomationRuleAction = {
|
|
|
802
1422
|
formula?: string;
|
|
803
1423
|
template?: string;
|
|
804
1424
|
script?: string;
|
|
1425
|
+
condition?: TCollectionAutomationRuleCondition | null;
|
|
1426
|
+
thenActions?: TAutomationRuleAction[];
|
|
1427
|
+
elseActions?: TAutomationRuleAction[];
|
|
1428
|
+
collectionId?: string | null;
|
|
1429
|
+
filters?: TCollectionAutomationRuleCondition[];
|
|
1430
|
+
limit?: number;
|
|
1431
|
+
resultKey?: string;
|
|
1432
|
+
sourceKey?: string;
|
|
1433
|
+
maxIterations?: number;
|
|
1434
|
+
actions?: TAutomationRuleAction[];
|
|
1435
|
+
targetCollectionId?: string | null;
|
|
1436
|
+
fieldMap?: Record<string, string>;
|
|
1437
|
+
url?: string;
|
|
1438
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
1439
|
+
headers?: Record<string, string>;
|
|
1440
|
+
body?: unknown;
|
|
1441
|
+
timeoutMs?: number;
|
|
1442
|
+
approverIds?: string[];
|
|
1443
|
+
approvalMessage?: string;
|
|
805
1444
|
}
|
|
806
1445
|
|
|
807
1446
|
export type TAutomationRuleActivityItem = {
|
|
@@ -823,10 +1462,76 @@ export type TCollectionAutomationRule = {
|
|
|
823
1462
|
conditions?: TCollectionAutomationRuleCondition[];
|
|
824
1463
|
actions: TAutomationRuleAction[];
|
|
825
1464
|
activity: TAutomationRuleActivityItem[];
|
|
1465
|
+
createdBy?: string | null;
|
|
1466
|
+
updatedBy?: string | null;
|
|
826
1467
|
createdAt: string;
|
|
827
1468
|
updatedAt: string;
|
|
828
1469
|
}
|
|
829
1470
|
|
|
1471
|
+
export type TCollectionAutomationExecutionStatus =
|
|
1472
|
+
| "queued"
|
|
1473
|
+
| "running"
|
|
1474
|
+
| "waiting_approval"
|
|
1475
|
+
| "succeeded"
|
|
1476
|
+
| "failed"
|
|
1477
|
+
| "skipped"
|
|
1478
|
+
| "cancelled";
|
|
1479
|
+
|
|
1480
|
+
export type TCollectionAutomationStepExecution = {
|
|
1481
|
+
id: string;
|
|
1482
|
+
actionId: string;
|
|
1483
|
+
actionType: string;
|
|
1484
|
+
sequence: number;
|
|
1485
|
+
status: string;
|
|
1486
|
+
output?: Record<string, unknown> | null;
|
|
1487
|
+
error?: string | null;
|
|
1488
|
+
startedAt: string;
|
|
1489
|
+
finishedAt?: string | null;
|
|
1490
|
+
};
|
|
1491
|
+
|
|
1492
|
+
export type TCollectionAutomationApproval = {
|
|
1493
|
+
id: string;
|
|
1494
|
+
actionId: string;
|
|
1495
|
+
status: "pending" | "approved" | "rejected";
|
|
1496
|
+
approverIds: string[];
|
|
1497
|
+
message: string;
|
|
1498
|
+
requestedBy: string;
|
|
1499
|
+
decidedBy?: string | null;
|
|
1500
|
+
decisionNote?: string;
|
|
1501
|
+
decidedAt?: string | null;
|
|
1502
|
+
createdAt: string;
|
|
1503
|
+
};
|
|
1504
|
+
|
|
1505
|
+
export type TCollectionAutomationExecution = {
|
|
1506
|
+
id: string;
|
|
1507
|
+
tenantId: string;
|
|
1508
|
+
dataModelId: string;
|
|
1509
|
+
collectionId: string;
|
|
1510
|
+
ruleId?: string | null;
|
|
1511
|
+
ruleName?: string | null;
|
|
1512
|
+
recordId?: string | null;
|
|
1513
|
+
trigger: TAutomationRuleTriggerType;
|
|
1514
|
+
status: TCollectionAutomationExecutionStatus;
|
|
1515
|
+
attempt: number;
|
|
1516
|
+
maxAttempts: number;
|
|
1517
|
+
principalType: "user" | "service";
|
|
1518
|
+
principalId: string;
|
|
1519
|
+
output?: Record<string, unknown> | null;
|
|
1520
|
+
error?: string | null;
|
|
1521
|
+
nextAttemptAt?: string | null;
|
|
1522
|
+
startedAt?: string | null;
|
|
1523
|
+
finishedAt?: string | null;
|
|
1524
|
+
createdAt: string;
|
|
1525
|
+
updatedAt: string;
|
|
1526
|
+
steps: TCollectionAutomationStepExecution[];
|
|
1527
|
+
approvals: TCollectionAutomationApproval[];
|
|
1528
|
+
};
|
|
1529
|
+
|
|
1530
|
+
export type TCollectionAutomationExecutionPage = {
|
|
1531
|
+
items: TCollectionAutomationExecution[];
|
|
1532
|
+
nextCursor?: string | null;
|
|
1533
|
+
};
|
|
1534
|
+
|
|
830
1535
|
export type TCollectionViewColumn = {
|
|
831
1536
|
fieldName: string;
|
|
832
1537
|
visible: boolean;
|
|
@@ -885,7 +1590,84 @@ export type TCollectionBoardViewConfig = {
|
|
|
885
1590
|
groupVisibleFieldOverrides: TCollectionBoardGroupVisibleFieldOverride[];
|
|
886
1591
|
}
|
|
887
1592
|
|
|
888
|
-
export type
|
|
1593
|
+
export type TCollectionCalendarDefaultMode = "month" | "week" | "agenda";
|
|
1594
|
+
|
|
1595
|
+
export type TCollectionCalendarViewConfig = {
|
|
1596
|
+
version: 1;
|
|
1597
|
+
columns: TCollectionViewColumn[];
|
|
1598
|
+
titleFieldName: string;
|
|
1599
|
+
startDateFieldName: string;
|
|
1600
|
+
endDateFieldName: string;
|
|
1601
|
+
colorFieldName: string;
|
|
1602
|
+
defaultMode: TCollectionCalendarDefaultMode;
|
|
1603
|
+
filters: TCollectionBoardFilterRule[];
|
|
1604
|
+
sorts: TCollectionBoardSortRule[];
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
export type TCollectionPresentationViewConfigBase = {
|
|
1608
|
+
version: 1;
|
|
1609
|
+
columns: TCollectionViewColumn[];
|
|
1610
|
+
filters: TCollectionBoardFilterRule[];
|
|
1611
|
+
sorts: TCollectionBoardSortRule[];
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
export type TCollectionTimelineViewConfig = TCollectionPresentationViewConfigBase & {
|
|
1615
|
+
titleFieldName: string;
|
|
1616
|
+
startDateFieldName: string;
|
|
1617
|
+
endDateFieldName: string;
|
|
1618
|
+
groupByFieldName: string;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
export type TCollectionTreeViewConfig = TCollectionPresentationViewConfigBase & {
|
|
1622
|
+
labelFieldName: string;
|
|
1623
|
+
parentRelationFieldName: string;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
export type TCollectionGalleryViewConfig = TCollectionPresentationViewConfigBase & {
|
|
1627
|
+
imageFieldName: string;
|
|
1628
|
+
titleFieldName: string;
|
|
1629
|
+
summaryFieldName: string;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
export type TCollectionMapViewConfig = TCollectionPresentationViewConfigBase & {
|
|
1633
|
+
titleFieldName: string;
|
|
1634
|
+
locationFieldName: string;
|
|
1635
|
+
latitudeFieldName: string;
|
|
1636
|
+
longitudeFieldName: string;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
export type TCollectionDocumentViewConfig = TCollectionPresentationViewConfigBase & {
|
|
1640
|
+
titleFieldName: string;
|
|
1641
|
+
bodyFieldName: string;
|
|
1642
|
+
metadataFieldNames: string[];
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
export type TCollectionViewConfig =
|
|
1646
|
+
| TCollectionGridViewConfig
|
|
1647
|
+
| TCollectionBoardViewConfig
|
|
1648
|
+
| TCollectionCalendarViewConfig
|
|
1649
|
+
| TCollectionTimelineViewConfig
|
|
1650
|
+
| TCollectionTreeViewConfig
|
|
1651
|
+
| TCollectionGalleryViewConfig
|
|
1652
|
+
| TCollectionMapViewConfig
|
|
1653
|
+
| TCollectionDocumentViewConfig;
|
|
1654
|
+
|
|
1655
|
+
export type TCollectionViewType =
|
|
1656
|
+
| "grid"
|
|
1657
|
+
| "board"
|
|
1658
|
+
| "calendar"
|
|
1659
|
+
| "timeline"
|
|
1660
|
+
| "tree"
|
|
1661
|
+
| "gallery"
|
|
1662
|
+
| "map"
|
|
1663
|
+
| "document";
|
|
1664
|
+
|
|
1665
|
+
export type TCollectionViewVisibility = "shared" | "personal";
|
|
1666
|
+
|
|
1667
|
+
export type TCollectionViewPreference = {
|
|
1668
|
+
columns: TCollectionViewColumn[];
|
|
1669
|
+
updatedAt?: string;
|
|
1670
|
+
}
|
|
889
1671
|
|
|
890
1672
|
export type TCollectionView = {
|
|
891
1673
|
id: string;
|
|
@@ -893,12 +1675,24 @@ export type TCollectionView = {
|
|
|
893
1675
|
dataModelId: string;
|
|
894
1676
|
collectionId: string;
|
|
895
1677
|
name: string;
|
|
896
|
-
type:
|
|
1678
|
+
type: TCollectionViewType;
|
|
897
1679
|
config: TCollectionViewConfig;
|
|
1680
|
+
visibility?: TCollectionViewVisibility;
|
|
1681
|
+
ownerId?: string | null;
|
|
1682
|
+
isOwner?: boolean;
|
|
1683
|
+
canEdit?: boolean;
|
|
1684
|
+
preference?: TCollectionViewPreference | null;
|
|
898
1685
|
createdAt: string;
|
|
899
1686
|
updatedAt: string;
|
|
900
1687
|
}
|
|
901
1688
|
|
|
1689
|
+
export type TCollectionViewPreferenceResult = {
|
|
1690
|
+
viewId: string;
|
|
1691
|
+
userId: string;
|
|
1692
|
+
columns: TCollectionViewColumn[];
|
|
1693
|
+
updatedAt: string;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
902
1696
|
export type TCollectionButtonAction = TAutomationRuleAction;
|
|
903
1697
|
|
|
904
1698
|
export type TCollectionButtonActivityItem = TAutomationRuleActivityItem;
|
|
@@ -1005,6 +1799,97 @@ export type TWorkerWhatsAppHealth = {
|
|
|
1005
1799
|
checks: TWorkerWhatsAppHealthCheck[];
|
|
1006
1800
|
}
|
|
1007
1801
|
|
|
1802
|
+
export type TSlackConversation = {
|
|
1803
|
+
id: string;
|
|
1804
|
+
name: string;
|
|
1805
|
+
isPrivate: boolean;
|
|
1806
|
+
isMember: boolean;
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
export type TSlackConversationList = {
|
|
1810
|
+
team: { id: string; name: string };
|
|
1811
|
+
bot: { id: string; name: string };
|
|
1812
|
+
conversations: TSlackConversation[];
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
export type TWorkerSlackHealthCheck = {
|
|
1816
|
+
id: string;
|
|
1817
|
+
status: 'passed' | 'failed' | 'skipped';
|
|
1818
|
+
message: string;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
export type TWorkerSlackHealth = {
|
|
1822
|
+
checkedAt?: string;
|
|
1823
|
+
eventsUrl?: string;
|
|
1824
|
+
webhookVerifiedAt?: string;
|
|
1825
|
+
teamId?: string;
|
|
1826
|
+
teamName?: string;
|
|
1827
|
+
botUserId?: string;
|
|
1828
|
+
botName?: string;
|
|
1829
|
+
checks: TWorkerSlackHealthCheck[];
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
export type TWorkerSlackMessageHistory = {
|
|
1833
|
+
channel: {
|
|
1834
|
+
id: string;
|
|
1835
|
+
name: string;
|
|
1836
|
+
provider: 'slack';
|
|
1837
|
+
teamId: string;
|
|
1838
|
+
teamName: string;
|
|
1839
|
+
botUserId: string;
|
|
1840
|
+
status: string;
|
|
1841
|
+
} | null;
|
|
1842
|
+
messages: TWorkerChannelMessage[];
|
|
1843
|
+
nextCursor: string | null;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
export type TDiscordGuild = { id: string; name: string; icon: string | null }
|
|
1847
|
+
export type TDiscordGuildList = {
|
|
1848
|
+
bot: { id: string; name: string };
|
|
1849
|
+
application: { id: string; name: string };
|
|
1850
|
+
guilds: TDiscordGuild[];
|
|
1851
|
+
}
|
|
1852
|
+
export type TDiscordGuildChannel = {
|
|
1853
|
+
id: string;
|
|
1854
|
+
name: string;
|
|
1855
|
+
type: 'text' | 'announcement';
|
|
1856
|
+
parentId: string | null;
|
|
1857
|
+
position: number;
|
|
1858
|
+
}
|
|
1859
|
+
export type TDiscordGuildChannelList = {
|
|
1860
|
+
guild: { id: string; name: string };
|
|
1861
|
+
channels: TDiscordGuildChannel[];
|
|
1862
|
+
}
|
|
1863
|
+
export type TWorkerDiscordHealthCheck = {
|
|
1864
|
+
id: string;
|
|
1865
|
+
status: 'passed' | 'failed' | 'skipped';
|
|
1866
|
+
message: string;
|
|
1867
|
+
}
|
|
1868
|
+
export type TWorkerDiscordHealth = {
|
|
1869
|
+
checkedAt?: string;
|
|
1870
|
+
gatewayStatus?: string;
|
|
1871
|
+
connectedAt?: string;
|
|
1872
|
+
lastEventAt?: string;
|
|
1873
|
+
botUserId?: string;
|
|
1874
|
+
botName?: string;
|
|
1875
|
+
applicationId?: string;
|
|
1876
|
+
guildName?: string;
|
|
1877
|
+
checks: TWorkerDiscordHealthCheck[];
|
|
1878
|
+
}
|
|
1879
|
+
export type TWorkerDiscordMessageHistory = {
|
|
1880
|
+
channel: {
|
|
1881
|
+
id: string;
|
|
1882
|
+
name: string;
|
|
1883
|
+
provider: 'discord';
|
|
1884
|
+
guildId: string;
|
|
1885
|
+
guildName: string;
|
|
1886
|
+
botUserId: string;
|
|
1887
|
+
status: string;
|
|
1888
|
+
} | null;
|
|
1889
|
+
messages: TWorkerChannelMessage[];
|
|
1890
|
+
nextCursor: string | null;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1008
1893
|
export type TGoogleMeetCalendar = {
|
|
1009
1894
|
id: string;
|
|
1010
1895
|
summary: string;
|