@appconda/sdk 1.0.677 → 1.0.680
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 +129 -3
- package/dist/modules/emploid/schema.js +72 -2
- package/dist/modules/emploid/service.d.ts +15 -0
- package/dist/modules/emploid/service.js +25 -1
- package/dist/modules/emploid/types.d.ts +140 -0
- package/dist/modules/emploid/types.js +1 -1
- package/dist/modules/scheduled-job/types.d.ts +7 -0
- package/dist/modules/scheduled-job/types.js +1 -1
- package/package.json +1 -1
- package/src/modules/emploid/schema.ts +81 -1
- package/src/modules/emploid/service.ts +46 -0
- package/src/modules/emploid/types.ts +151 -0
- package/src/modules/scheduled-job/types.ts +7 -0
|
@@ -31,6 +31,105 @@ export type TScope = {
|
|
|
31
31
|
updatedAt?: string;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
export type TWorkerBackgroundJobRule = {
|
|
35
|
+
mode: "everyMinute" | "everyHour" | "everyDay" | "everyWeek" | "everyMonth" | "cronExpression";
|
|
36
|
+
interval?: number;
|
|
37
|
+
minute?: number;
|
|
38
|
+
hour?: number;
|
|
39
|
+
weekday?: string | number;
|
|
40
|
+
dayOfMonth?: number;
|
|
41
|
+
cron?: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type TWorkerBackgroundJobSchedule = {
|
|
45
|
+
timezone: string;
|
|
46
|
+
rule: TWorkerBackgroundJobRule;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type TWorkerBackgroundJob = {
|
|
50
|
+
id: string;
|
|
51
|
+
scopeId: string;
|
|
52
|
+
scheduledJobId: string | null;
|
|
53
|
+
tenantId: string;
|
|
54
|
+
workerId: string;
|
|
55
|
+
parentScopeId: string | null;
|
|
56
|
+
name: string;
|
|
57
|
+
description: string;
|
|
58
|
+
enabled: boolean;
|
|
59
|
+
needsSchedule: boolean;
|
|
60
|
+
cron: string | null;
|
|
61
|
+
timezone: string | null;
|
|
62
|
+
schedule: TWorkerBackgroundJobSchedule | null;
|
|
63
|
+
lastRun: string | null;
|
|
64
|
+
nextRun: string | null;
|
|
65
|
+
lastExecutionId: string | null;
|
|
66
|
+
lastExecutionStatus: string | null;
|
|
67
|
+
createdAt: string | null;
|
|
68
|
+
updatedAt: string | null;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export type TWorkerBackgroundJobAttempt = {
|
|
72
|
+
attempt: number;
|
|
73
|
+
startedAt: string;
|
|
74
|
+
endedAt: string;
|
|
75
|
+
status: "completed" | "failed";
|
|
76
|
+
error?: string;
|
|
77
|
+
responseMessageId?: string | null;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type TWorkerBackgroundJobExecution = {
|
|
81
|
+
id: string;
|
|
82
|
+
scheduledJobId: string;
|
|
83
|
+
scheduledAt: string;
|
|
84
|
+
startedAt: string | null;
|
|
85
|
+
endedAt: string | null;
|
|
86
|
+
executionTime: number | null;
|
|
87
|
+
status: string;
|
|
88
|
+
output: string | null;
|
|
89
|
+
error: string | null;
|
|
90
|
+
details?: {
|
|
91
|
+
attempts?: TWorkerBackgroundJobAttempt[];
|
|
92
|
+
reason?: string;
|
|
93
|
+
skipped?: boolean;
|
|
94
|
+
nextRetryAt?: string;
|
|
95
|
+
activeExecutionId?: string;
|
|
96
|
+
request?: {
|
|
97
|
+
text?: string;
|
|
98
|
+
source?: string;
|
|
99
|
+
platform?: string;
|
|
100
|
+
userId?: string;
|
|
101
|
+
channelId?: string;
|
|
102
|
+
messageId?: string;
|
|
103
|
+
requestId?: string;
|
|
104
|
+
scopeId?: string;
|
|
105
|
+
workerId?: string;
|
|
106
|
+
executionId?: string;
|
|
107
|
+
scheduledJobId?: string;
|
|
108
|
+
};
|
|
109
|
+
response?: {
|
|
110
|
+
messageId?: string | null;
|
|
111
|
+
attachments?: unknown[];
|
|
112
|
+
knowledgeTrace?: unknown;
|
|
113
|
+
};
|
|
114
|
+
scopeId?: string;
|
|
115
|
+
workerId?: string;
|
|
116
|
+
[key: string]: unknown;
|
|
117
|
+
} | null;
|
|
118
|
+
createdAt: string;
|
|
119
|
+
updatedAt: string;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export type TWorkerBackgroundJobExecutionPage = {
|
|
123
|
+
items: TWorkerBackgroundJobExecution[];
|
|
124
|
+
nextCursor: string | null;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export type TClearWorkerBackgroundJobExecutionsResult = {
|
|
128
|
+
deletedCount: number;
|
|
129
|
+
cancelledActiveCount: number;
|
|
130
|
+
retainedActiveCount: number;
|
|
131
|
+
};
|
|
132
|
+
|
|
34
133
|
export type TOccupation = {
|
|
35
134
|
tenantId: string;
|
|
36
135
|
id: string;
|
|
@@ -854,6 +953,58 @@ export type TChannel = {
|
|
|
854
953
|
config: any;
|
|
855
954
|
}
|
|
856
955
|
|
|
956
|
+
export type TWorkerChannelMessage = {
|
|
957
|
+
id: string;
|
|
958
|
+
tenantId: string;
|
|
959
|
+
channelId: string;
|
|
960
|
+
workerId: string;
|
|
961
|
+
provider: string;
|
|
962
|
+
direction: 'INBOUND' | 'OUTBOUND';
|
|
963
|
+
providerMessageId?: string | null;
|
|
964
|
+
idempotencyKey?: string | null;
|
|
965
|
+
inReplyToMessageId?: string | null;
|
|
966
|
+
inReplyToProviderMessageId?: string | null;
|
|
967
|
+
fromAddress: string;
|
|
968
|
+
toAddress: string;
|
|
969
|
+
kind: string;
|
|
970
|
+
body?: string | null;
|
|
971
|
+
media?: unknown;
|
|
972
|
+
status: string;
|
|
973
|
+
attemptCount?: number;
|
|
974
|
+
nextAttemptAt?: string | null;
|
|
975
|
+
leaseExpiresAt?: string | null;
|
|
976
|
+
error?: string | null;
|
|
977
|
+
processedAt?: string | null;
|
|
978
|
+
createdAt: string;
|
|
979
|
+
updatedAt: string;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
export type TWorkerWhatsAppMessageHistory = {
|
|
983
|
+
channel: {
|
|
984
|
+
id: string;
|
|
985
|
+
name: string;
|
|
986
|
+
provider: string;
|
|
987
|
+
mode: 'sandbox' | 'production';
|
|
988
|
+
senderAddress: string;
|
|
989
|
+
status: string;
|
|
990
|
+
} | null;
|
|
991
|
+
messages: TWorkerChannelMessage[];
|
|
992
|
+
nextCursor: string | null;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
export type TWorkerWhatsAppHealthCheck = {
|
|
996
|
+
id: string;
|
|
997
|
+
status: 'passed' | 'failed' | 'skipped';
|
|
998
|
+
message: string;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
export type TWorkerWhatsAppHealth = {
|
|
1002
|
+
checkedAt?: string;
|
|
1003
|
+
inboundUrl?: string;
|
|
1004
|
+
statusUrl?: string;
|
|
1005
|
+
checks: TWorkerWhatsAppHealthCheck[];
|
|
1006
|
+
}
|
|
1007
|
+
|
|
857
1008
|
export type TGoogleMeetCalendar = {
|
|
858
1009
|
id: string;
|
|
859
1010
|
summary: string;
|
|
@@ -23,9 +23,16 @@ export type JobRun = {
|
|
|
23
23
|
export type Execution = {
|
|
24
24
|
id: string;
|
|
25
25
|
scheduledJobId: string;
|
|
26
|
+
scheduledAt: Date;
|
|
27
|
+
startedAt?: Date;
|
|
28
|
+
endedAt?: Date;
|
|
29
|
+
executionTime?: number;
|
|
26
30
|
createdAt: Date;
|
|
27
31
|
updatedAt: Date;
|
|
28
32
|
status: string;
|
|
33
|
+
output?: string;
|
|
34
|
+
error?: string;
|
|
35
|
+
details?: Record<string, unknown>;
|
|
29
36
|
}
|
|
30
37
|
|
|
31
38
|
|