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