@vicacha-devs/strapi-plugin-certificates 0.0.0-stage → 1.0.0
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/LICENSE.md +21 -0
- package/README.md +17 -2
- package/dist/admin/CertificatesPage-CFDIEBN_.js +783 -0
- package/dist/admin/CertificatesPage-DeGmoX7h.cjs +783 -0
- package/dist/admin/SettingsPage-CsWFO1XB.js +447 -0
- package/dist/admin/SettingsPage-D7Ob1gV0.cjs +447 -0
- package/dist/admin/ar-Bv3T0_7C.cjs +258 -0
- package/dist/admin/ar-CDFHNnFd.js +258 -0
- package/dist/admin/de-BjMxn-Lt.js +258 -0
- package/dist/admin/de-DB5eW-yI.cjs +258 -0
- package/dist/admin/en-BI5Z3lPW.js +258 -0
- package/dist/admin/en-CsYV0VDf.cjs +258 -0
- package/dist/admin/es-B7uy9a-2.js +258 -0
- package/dist/admin/es-DEp3j3kD.cjs +258 -0
- package/dist/admin/fr-D7y038Pm.cjs +258 -0
- package/dist/admin/fr-DxbtdEIA.js +258 -0
- package/dist/admin/id-DfW4ARVm.js +258 -0
- package/dist/admin/id-Wuw9jl-Y.cjs +258 -0
- package/dist/admin/index-BQdS3gc3.cjs +707 -0
- package/dist/admin/index-BYO34da4.js +708 -0
- package/dist/admin/index.cjs +5 -0
- package/dist/admin/index.js +5 -0
- package/dist/admin/index.mjs +5 -0
- package/dist/admin/pt-C0QaikKS.js +258 -0
- package/dist/admin/pt-Dj2oc3Ga.cjs +258 -0
- package/dist/admin/src/components/IssueCertificateModal.d.ts +9 -0
- package/dist/admin/src/components/SettingsTabHelpers.d.ts +13 -0
- package/dist/admin/src/index.d.ts +11 -0
- package/dist/admin/src/pages/CertificatesPage.d.ts +3 -0
- package/dist/admin/src/pages/SettingsPage.d.ts +3 -0
- package/dist/admin/src/translations/cmLabels.d.ts +1 -0
- package/dist/admin/src/translations/cmPlaceholders.d.ts +1 -0
- package/dist/admin/tr-BbeagXRY.js +258 -0
- package/dist/admin/tr-DlGl_XMF.cjs +258 -0
- package/dist/admin/ur-Bwn4TrjF.js +258 -0
- package/dist/admin/ur-qIlUtgqb.cjs +258 -0
- package/dist/admin/zh-Cmg5mEvP.js +258 -0
- package/dist/admin/zh-D-3QDsuQ.cjs +258 -0
- package/dist/package.json +3 -0
- package/dist/server/index.cjs +2282 -0
- package/dist/server/index.js +2282 -0
- package/dist/server/index.mjs +2282 -0
- package/dist/server/src/bootstrap.d.ts +5 -0
- package/dist/server/src/content-types/certificate/schema.json.d.ts +165 -0
- package/dist/server/src/content-types/index.d.ts +277 -0
- package/dist/server/src/content-types/template/schema.json.d.ts +118 -0
- package/dist/server/src/controllers/admin.d.ts +31 -0
- package/dist/server/src/controllers/content-api.d.ts +28 -0
- package/dist/server/src/controllers/index.d.ts +30 -0
- package/dist/server/src/index.d.ts +413 -0
- package/dist/server/src/register.d.ts +5 -0
- package/dist/server/src/routes/admin.d.ts +12 -0
- package/dist/server/src/routes/content-api.d.ts +12 -0
- package/dist/server/src/routes/index.d.ts +25 -0
- package/dist/server/src/services/docusign.d.ts +76 -0
- package/dist/server/src/services/index.d.ts +76 -0
- package/dist/server/src/services/issuance.d.ts +54 -0
- package/dist/server/src/services/issuanceHelpers.d.ts +47 -0
- package/dist/server/src/services/settings.d.ts +17 -0
- package/dist/server/src/services/urlHelpers.d.ts +2 -0
- package/dist/shared/calendarSystems.d.ts +3 -0
- package/dist/shared/cryptoEngine.d.ts +27 -0
- package/dist/shared/documentRenderer.d.ts +12 -0
- package/dist/shared/index.cjs +636 -0
- package/dist/shared/index.d.ts +5 -0
- package/dist/shared/index.js +613 -0
- package/dist/shared/index.mjs +613 -0
- package/dist/shared/pluginId.d.ts +2 -0
- package/dist/shared/types.d.ts +194 -0
- package/package.json +112 -3
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
register: ({ strapi }: {
|
|
3
|
+
strapi: import("@strapi/strapi").Core.Strapi;
|
|
4
|
+
}) => void;
|
|
5
|
+
bootstrap: ({ strapi }: {
|
|
6
|
+
strapi: import("@strapi/strapi").Core.Strapi;
|
|
7
|
+
}) => Promise<void>;
|
|
8
|
+
contentTypes: {
|
|
9
|
+
template: {
|
|
10
|
+
schema: {
|
|
11
|
+
kind: string;
|
|
12
|
+
collectionName: string;
|
|
13
|
+
info: {
|
|
14
|
+
singularName: string;
|
|
15
|
+
pluralName: string;
|
|
16
|
+
displayName: string;
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
options: {
|
|
20
|
+
draftAndPublish: boolean;
|
|
21
|
+
};
|
|
22
|
+
pluginOptions: {
|
|
23
|
+
"content-manager": {
|
|
24
|
+
visible: boolean;
|
|
25
|
+
};
|
|
26
|
+
"content-type-builder": {
|
|
27
|
+
visible: boolean;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
attributes: {
|
|
31
|
+
name: {
|
|
32
|
+
type: string;
|
|
33
|
+
required: boolean;
|
|
34
|
+
maxLength: number;
|
|
35
|
+
};
|
|
36
|
+
slug: {
|
|
37
|
+
type: string;
|
|
38
|
+
targetField: string;
|
|
39
|
+
required: boolean;
|
|
40
|
+
};
|
|
41
|
+
description: {
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
serialPrefix: {
|
|
45
|
+
type: string;
|
|
46
|
+
required: boolean;
|
|
47
|
+
default: string;
|
|
48
|
+
maxLength: number;
|
|
49
|
+
};
|
|
50
|
+
defaultValidityDays: {
|
|
51
|
+
type: string;
|
|
52
|
+
min: number;
|
|
53
|
+
};
|
|
54
|
+
requiresWitnesses: {
|
|
55
|
+
type: string;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
minWitnesses: {
|
|
59
|
+
type: string;
|
|
60
|
+
default: number;
|
|
61
|
+
min: number;
|
|
62
|
+
max: number;
|
|
63
|
+
};
|
|
64
|
+
requiresApproval: {
|
|
65
|
+
type: string;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
esignEnabled: {
|
|
69
|
+
type: string;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
esignProvider: {
|
|
73
|
+
type: string;
|
|
74
|
+
enum: string[];
|
|
75
|
+
default: string;
|
|
76
|
+
};
|
|
77
|
+
organizationName: {
|
|
78
|
+
type: string;
|
|
79
|
+
required: boolean;
|
|
80
|
+
maxLength: number;
|
|
81
|
+
};
|
|
82
|
+
organizationSubheader: {
|
|
83
|
+
type: string;
|
|
84
|
+
maxLength: number;
|
|
85
|
+
};
|
|
86
|
+
headerText: {
|
|
87
|
+
type: string;
|
|
88
|
+
maxLength: number;
|
|
89
|
+
};
|
|
90
|
+
titleText: {
|
|
91
|
+
type: string;
|
|
92
|
+
required: boolean;
|
|
93
|
+
maxLength: number;
|
|
94
|
+
};
|
|
95
|
+
bodyTemplate: {
|
|
96
|
+
type: string;
|
|
97
|
+
required: boolean;
|
|
98
|
+
};
|
|
99
|
+
footerText: {
|
|
100
|
+
type: string;
|
|
101
|
+
};
|
|
102
|
+
defaultSignatories: {
|
|
103
|
+
type: string;
|
|
104
|
+
default: never[];
|
|
105
|
+
};
|
|
106
|
+
customFieldsSchema: {
|
|
107
|
+
type: string;
|
|
108
|
+
default: never[];
|
|
109
|
+
};
|
|
110
|
+
secondaryCalendars: {
|
|
111
|
+
type: string;
|
|
112
|
+
default: never[];
|
|
113
|
+
};
|
|
114
|
+
accentColor: {
|
|
115
|
+
type: string;
|
|
116
|
+
default: string;
|
|
117
|
+
maxLength: number;
|
|
118
|
+
};
|
|
119
|
+
active: {
|
|
120
|
+
type: string;
|
|
121
|
+
default: boolean;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
certificate: {
|
|
127
|
+
schema: {
|
|
128
|
+
kind: string;
|
|
129
|
+
collectionName: string;
|
|
130
|
+
info: {
|
|
131
|
+
singularName: string;
|
|
132
|
+
pluralName: string;
|
|
133
|
+
displayName: string;
|
|
134
|
+
description: string;
|
|
135
|
+
};
|
|
136
|
+
options: {
|
|
137
|
+
draftAndPublish: boolean;
|
|
138
|
+
};
|
|
139
|
+
pluginOptions: {
|
|
140
|
+
"content-manager": {
|
|
141
|
+
visible: boolean;
|
|
142
|
+
};
|
|
143
|
+
"content-type-builder": {
|
|
144
|
+
visible: boolean;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
attributes: {
|
|
148
|
+
serialNumber: {
|
|
149
|
+
type: string;
|
|
150
|
+
required: boolean;
|
|
151
|
+
unique: boolean;
|
|
152
|
+
maxLength: number;
|
|
153
|
+
};
|
|
154
|
+
templateDocumentId: {
|
|
155
|
+
type: string;
|
|
156
|
+
required: boolean;
|
|
157
|
+
maxLength: number;
|
|
158
|
+
};
|
|
159
|
+
templateSlug: {
|
|
160
|
+
type: string;
|
|
161
|
+
required: boolean;
|
|
162
|
+
maxLength: number;
|
|
163
|
+
};
|
|
164
|
+
templateName: {
|
|
165
|
+
type: string;
|
|
166
|
+
required: boolean;
|
|
167
|
+
maxLength: number;
|
|
168
|
+
};
|
|
169
|
+
status: {
|
|
170
|
+
type: string;
|
|
171
|
+
enum: string[];
|
|
172
|
+
default: string;
|
|
173
|
+
required: boolean;
|
|
174
|
+
};
|
|
175
|
+
recipientFullName: {
|
|
176
|
+
type: string;
|
|
177
|
+
required: boolean;
|
|
178
|
+
maxLength: number;
|
|
179
|
+
};
|
|
180
|
+
recipientChosenName: {
|
|
181
|
+
type: string;
|
|
182
|
+
maxLength: number;
|
|
183
|
+
};
|
|
184
|
+
recipientEmail: {
|
|
185
|
+
type: string;
|
|
186
|
+
};
|
|
187
|
+
recipientPhone: {
|
|
188
|
+
type: string;
|
|
189
|
+
maxLength: number;
|
|
190
|
+
};
|
|
191
|
+
recipientNationality: {
|
|
192
|
+
type: string;
|
|
193
|
+
maxLength: number;
|
|
194
|
+
};
|
|
195
|
+
nationalIdMasked: {
|
|
196
|
+
type: string;
|
|
197
|
+
maxLength: number;
|
|
198
|
+
};
|
|
199
|
+
nationalIdHash: {
|
|
200
|
+
type: string;
|
|
201
|
+
private: boolean;
|
|
202
|
+
maxLength: number;
|
|
203
|
+
};
|
|
204
|
+
issuedAt: {
|
|
205
|
+
type: string;
|
|
206
|
+
required: boolean;
|
|
207
|
+
maxLength: number;
|
|
208
|
+
};
|
|
209
|
+
expiresAt: {
|
|
210
|
+
type: string;
|
|
211
|
+
maxLength: number;
|
|
212
|
+
};
|
|
213
|
+
revokedAt: {
|
|
214
|
+
type: string;
|
|
215
|
+
maxLength: number;
|
|
216
|
+
};
|
|
217
|
+
revocationReason: {
|
|
218
|
+
type: string;
|
|
219
|
+
};
|
|
220
|
+
signatories: {
|
|
221
|
+
type: string;
|
|
222
|
+
default: never[];
|
|
223
|
+
};
|
|
224
|
+
witnesses: {
|
|
225
|
+
type: string;
|
|
226
|
+
default: never[];
|
|
227
|
+
};
|
|
228
|
+
customData: {
|
|
229
|
+
type: string;
|
|
230
|
+
default: {};
|
|
231
|
+
};
|
|
232
|
+
secondaryDates: {
|
|
233
|
+
type: string;
|
|
234
|
+
default: {};
|
|
235
|
+
};
|
|
236
|
+
canonicalPayloadHash: {
|
|
237
|
+
type: string;
|
|
238
|
+
required: boolean;
|
|
239
|
+
maxLength: number;
|
|
240
|
+
};
|
|
241
|
+
cryptographicSignature: {
|
|
242
|
+
type: string;
|
|
243
|
+
required: boolean;
|
|
244
|
+
};
|
|
245
|
+
publicKeyFingerprint: {
|
|
246
|
+
type: string;
|
|
247
|
+
required: boolean;
|
|
248
|
+
maxLength: number;
|
|
249
|
+
};
|
|
250
|
+
verificationToken: {
|
|
251
|
+
type: string;
|
|
252
|
+
private: boolean;
|
|
253
|
+
maxLength: number;
|
|
254
|
+
};
|
|
255
|
+
esignProvider: {
|
|
256
|
+
type: string;
|
|
257
|
+
enum: string[];
|
|
258
|
+
default: string;
|
|
259
|
+
};
|
|
260
|
+
esignEnvelopeId: {
|
|
261
|
+
type: string;
|
|
262
|
+
maxLength: number;
|
|
263
|
+
};
|
|
264
|
+
esignEnvelopeStatus: {
|
|
265
|
+
type: string;
|
|
266
|
+
enum: string[];
|
|
267
|
+
default: string;
|
|
268
|
+
};
|
|
269
|
+
esignCompletedAt: {
|
|
270
|
+
type: string;
|
|
271
|
+
maxLength: number;
|
|
272
|
+
};
|
|
273
|
+
linkedBookingCode: {
|
|
274
|
+
type: string;
|
|
275
|
+
maxLength: number;
|
|
276
|
+
};
|
|
277
|
+
notes: {
|
|
278
|
+
type: string;
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
controllers: {
|
|
285
|
+
admin: ({ strapi }: {
|
|
286
|
+
strapi: import("@strapi/strapi").Core.Strapi;
|
|
287
|
+
}) => {
|
|
288
|
+
getSettings(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
289
|
+
updateSettings(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
290
|
+
rotateKeys(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
291
|
+
listTemplates(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
292
|
+
createTemplate(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
293
|
+
seedTemplates(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
294
|
+
listCertificates(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
295
|
+
issueCertificate(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
296
|
+
sendDocuSignEnvelope(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
297
|
+
approveCertificate(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
298
|
+
revokeCertificate(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
299
|
+
printCertificate(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
300
|
+
exportCsv(ctx: import('./controllers/admin').KoaContext): Promise<void>;
|
|
301
|
+
};
|
|
302
|
+
"content-api": ({ strapi }: {
|
|
303
|
+
strapi: import("@strapi/strapi").Core.Strapi;
|
|
304
|
+
}) => {
|
|
305
|
+
listPublicTemplates(ctx: import('./controllers/content-api').KoaContext): Promise<void>;
|
|
306
|
+
getPublicKey(ctx: import('./controllers/content-api').KoaContext): Promise<void>;
|
|
307
|
+
applyCertificate(ctx: import('./controllers/content-api').KoaContext): Promise<void>;
|
|
308
|
+
verifyBySerial(ctx: import('./controllers/content-api').KoaContext): Promise<void>;
|
|
309
|
+
downloadPrintableHtml(ctx: import('./controllers/content-api').KoaContext): Promise<void>;
|
|
310
|
+
docusignWebhook(ctx: import('./controllers/content-api').KoaContext): Promise<void>;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
routes: {
|
|
314
|
+
admin: {
|
|
315
|
+
type: string;
|
|
316
|
+
routes: {
|
|
317
|
+
method: string;
|
|
318
|
+
path: string;
|
|
319
|
+
handler: string;
|
|
320
|
+
config: {
|
|
321
|
+
policies: never[];
|
|
322
|
+
};
|
|
323
|
+
}[];
|
|
324
|
+
};
|
|
325
|
+
"content-api": {
|
|
326
|
+
type: string;
|
|
327
|
+
routes: {
|
|
328
|
+
method: string;
|
|
329
|
+
path: string;
|
|
330
|
+
handler: string;
|
|
331
|
+
config: {
|
|
332
|
+
auth: boolean;
|
|
333
|
+
};
|
|
334
|
+
}[];
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
services: {
|
|
338
|
+
settings: ({ strapi }: {
|
|
339
|
+
strapi: import("@strapi/strapi").Core.Strapi;
|
|
340
|
+
}) => {
|
|
341
|
+
getSigningKeyPair(): Promise<import('../../shared').Ed25519KeyPairMaterial>;
|
|
342
|
+
rotateKeyPair(): Promise<{
|
|
343
|
+
publicKeyPem: string;
|
|
344
|
+
publicKeyFingerprint: string;
|
|
345
|
+
}>;
|
|
346
|
+
getSettings(): Promise<import('../../shared').CertificatesPluginSettings>;
|
|
347
|
+
updateSettings(partial: Partial<import('../../shared').CertificatesPluginSettings>): Promise<import('../../shared').CertificatesPluginSettings>;
|
|
348
|
+
};
|
|
349
|
+
issuance: ({ strapi }: {
|
|
350
|
+
strapi: import("@strapi/strapi").Core.Strapi;
|
|
351
|
+
}) => {
|
|
352
|
+
listTemplates(activeOnly?: boolean): Promise<import('../../shared').CertificateTemplate[]>;
|
|
353
|
+
findTemplate(identifier: {
|
|
354
|
+
templateDocumentId?: string;
|
|
355
|
+
templateSlug?: string;
|
|
356
|
+
}): Promise<import('../../shared').CertificateTemplate | null>;
|
|
357
|
+
createTemplate(data: Partial<import('../../shared').CertificateTemplate>): Promise<import('../../shared').CertificateTemplate>;
|
|
358
|
+
seedDefaultTemplates(): Promise<number>;
|
|
359
|
+
issueCertificate(input: import('../../shared').CertificateIssueInput): Promise<import('../../shared').CertificateRecord>;
|
|
360
|
+
approveCertificate(documentId: string, options?: import('./services/issuance').ApproveCertificateOptions): Promise<import('../../shared').CertificateRecord>;
|
|
361
|
+
revokeCertificate(documentId: string, reason: string): Promise<import('../../shared').CertificateRecord>;
|
|
362
|
+
verifyCertificateBySerial(serialNumber: string, options?: {
|
|
363
|
+
token?: string;
|
|
364
|
+
nationalId?: string;
|
|
365
|
+
}): Promise<import('../../shared').CertificateVerificationResult | null>;
|
|
366
|
+
renderCertificateDocument(identifier: {
|
|
367
|
+
documentId?: string;
|
|
368
|
+
serialNumber?: string;
|
|
369
|
+
}, options?: {
|
|
370
|
+
token?: string;
|
|
371
|
+
isAdmin?: boolean;
|
|
372
|
+
}): Promise<{
|
|
373
|
+
html: string;
|
|
374
|
+
serialNumber: string;
|
|
375
|
+
} | null>;
|
|
376
|
+
listCertificates(filters?: {
|
|
377
|
+
status?: string;
|
|
378
|
+
templateSlug?: string;
|
|
379
|
+
search?: string;
|
|
380
|
+
}): Promise<{
|
|
381
|
+
records: import('../../shared').CertificateRecord[];
|
|
382
|
+
stats: import('../../shared').CertificateStats;
|
|
383
|
+
}>;
|
|
384
|
+
exportCsv(filters?: {
|
|
385
|
+
status?: string;
|
|
386
|
+
templateSlug?: string;
|
|
387
|
+
}): Promise<string>;
|
|
388
|
+
};
|
|
389
|
+
docusign: ({ strapi }: {
|
|
390
|
+
strapi: import("@strapi/strapi").Core.Strapi;
|
|
391
|
+
}) => {
|
|
392
|
+
sendEnvelopeForCertificate(documentId: string, options?: {
|
|
393
|
+
fetchImpl?: import('./services/docusign').FetchLikeFn;
|
|
394
|
+
accessToken?: string;
|
|
395
|
+
}): Promise<{
|
|
396
|
+
envelopeId: string;
|
|
397
|
+
envelopeStatus: import('../../shared').ESignEnvelopeStatus;
|
|
398
|
+
certificate: import('../../shared').CertificateRecord;
|
|
399
|
+
}>;
|
|
400
|
+
handleWebhookEvent(params: {
|
|
401
|
+
rawBody: string;
|
|
402
|
+
signatureHeader?: string;
|
|
403
|
+
payload: Record<string, unknown>;
|
|
404
|
+
webhookSecret?: string;
|
|
405
|
+
}): Promise<{
|
|
406
|
+
envelopeId: string;
|
|
407
|
+
envelopeStatus: import('../../shared').ESignEnvelopeStatus;
|
|
408
|
+
certificate: import('../../shared').CertificateRecord;
|
|
409
|
+
}>;
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
admin: {
|
|
3
|
+
type: string;
|
|
4
|
+
routes: {
|
|
5
|
+
method: string;
|
|
6
|
+
path: string;
|
|
7
|
+
handler: string;
|
|
8
|
+
config: {
|
|
9
|
+
policies: never[];
|
|
10
|
+
};
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
"content-api": {
|
|
14
|
+
type: string;
|
|
15
|
+
routes: {
|
|
16
|
+
method: string;
|
|
17
|
+
path: string;
|
|
18
|
+
handler: string;
|
|
19
|
+
config: {
|
|
20
|
+
auth: boolean;
|
|
21
|
+
};
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Core } from '@strapi/strapi';
|
|
2
|
+
import { CertificateRecord, ESignEnvelopeStatus } from '../../../shared';
|
|
3
|
+
export interface DocuSignSignerTab {
|
|
4
|
+
anchorString: string;
|
|
5
|
+
anchorUnits: "pixels";
|
|
6
|
+
anchorXOffset: string;
|
|
7
|
+
anchorYOffset: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DocuSignSignerRecipient {
|
|
10
|
+
email: string;
|
|
11
|
+
name: string;
|
|
12
|
+
recipientId: string;
|
|
13
|
+
routingOrder: string;
|
|
14
|
+
roleName?: string;
|
|
15
|
+
tabs: {
|
|
16
|
+
signHereTabs: DocuSignSignerTab[];
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface DocuSignEnvelopePayload {
|
|
20
|
+
emailSubject: string;
|
|
21
|
+
status: "sent" | "created";
|
|
22
|
+
documents: Array<{
|
|
23
|
+
documentBase64: string;
|
|
24
|
+
name: string;
|
|
25
|
+
fileExtension: "html";
|
|
26
|
+
documentId: "1";
|
|
27
|
+
}>;
|
|
28
|
+
recipients: {
|
|
29
|
+
signers: DocuSignSignerRecipient[];
|
|
30
|
+
};
|
|
31
|
+
customFields: {
|
|
32
|
+
textCustomFields: Array<{
|
|
33
|
+
name: string;
|
|
34
|
+
value: string;
|
|
35
|
+
show: "false";
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export declare function validateDocuSignBaseUrl(rawUrl: string): string;
|
|
40
|
+
export declare function buildDocuSignEnvelopePayload(params: {
|
|
41
|
+
certificate: CertificateRecord;
|
|
42
|
+
htmlDocument: string;
|
|
43
|
+
emailSubjectPrefix?: string;
|
|
44
|
+
}): DocuSignEnvelopePayload;
|
|
45
|
+
export type FetchLikeFn = (url: string, init: {
|
|
46
|
+
method: string;
|
|
47
|
+
headers: Record<string, string>;
|
|
48
|
+
body: string;
|
|
49
|
+
}) => Promise<{
|
|
50
|
+
ok: boolean;
|
|
51
|
+
status: number;
|
|
52
|
+
json(): Promise<Record<string, unknown>>;
|
|
53
|
+
}>;
|
|
54
|
+
declare const _default: ({ strapi }: {
|
|
55
|
+
strapi: Core.Strapi;
|
|
56
|
+
}) => {
|
|
57
|
+
sendEnvelopeForCertificate(documentId: string, options?: {
|
|
58
|
+
fetchImpl?: FetchLikeFn;
|
|
59
|
+
accessToken?: string;
|
|
60
|
+
}): Promise<{
|
|
61
|
+
envelopeId: string;
|
|
62
|
+
envelopeStatus: ESignEnvelopeStatus;
|
|
63
|
+
certificate: CertificateRecord;
|
|
64
|
+
}>;
|
|
65
|
+
handleWebhookEvent(params: {
|
|
66
|
+
rawBody: string;
|
|
67
|
+
signatureHeader?: string;
|
|
68
|
+
payload: Record<string, unknown>;
|
|
69
|
+
webhookSecret?: string;
|
|
70
|
+
}): Promise<{
|
|
71
|
+
envelopeId: string;
|
|
72
|
+
envelopeStatus: ESignEnvelopeStatus;
|
|
73
|
+
certificate: CertificateRecord;
|
|
74
|
+
}>;
|
|
75
|
+
};
|
|
76
|
+
export default _default;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
settings: ({ strapi }: {
|
|
3
|
+
strapi: import("@strapi/strapi").Core.Strapi;
|
|
4
|
+
}) => {
|
|
5
|
+
getSigningKeyPair(): Promise<import('../../../shared').Ed25519KeyPairMaterial>;
|
|
6
|
+
rotateKeyPair(): Promise<{
|
|
7
|
+
publicKeyPem: string;
|
|
8
|
+
publicKeyFingerprint: string;
|
|
9
|
+
}>;
|
|
10
|
+
getSettings(): Promise<import('../../../shared').CertificatesPluginSettings>;
|
|
11
|
+
updateSettings(partial: Partial<import('../../../shared').CertificatesPluginSettings>): Promise<import('../../../shared').CertificatesPluginSettings>;
|
|
12
|
+
};
|
|
13
|
+
issuance: ({ strapi }: {
|
|
14
|
+
strapi: import("@strapi/strapi").Core.Strapi;
|
|
15
|
+
}) => {
|
|
16
|
+
listTemplates(activeOnly?: boolean): Promise<import('../../../shared').CertificateTemplate[]>;
|
|
17
|
+
findTemplate(identifier: {
|
|
18
|
+
templateDocumentId?: string;
|
|
19
|
+
templateSlug?: string;
|
|
20
|
+
}): Promise<import('../../../shared').CertificateTemplate | null>;
|
|
21
|
+
createTemplate(data: Partial<import('../../../shared').CertificateTemplate>): Promise<import('../../../shared').CertificateTemplate>;
|
|
22
|
+
seedDefaultTemplates(): Promise<number>;
|
|
23
|
+
issueCertificate(input: import('../../../shared').CertificateIssueInput): Promise<import('../../../shared').CertificateRecord>;
|
|
24
|
+
approveCertificate(documentId: string, options?: import('./issuance').ApproveCertificateOptions): Promise<import('../../../shared').CertificateRecord>;
|
|
25
|
+
revokeCertificate(documentId: string, reason: string): Promise<import('../../../shared').CertificateRecord>;
|
|
26
|
+
verifyCertificateBySerial(serialNumber: string, options?: {
|
|
27
|
+
token?: string;
|
|
28
|
+
nationalId?: string;
|
|
29
|
+
}): Promise<import('../../../shared').CertificateVerificationResult | null>;
|
|
30
|
+
renderCertificateDocument(identifier: {
|
|
31
|
+
documentId?: string;
|
|
32
|
+
serialNumber?: string;
|
|
33
|
+
}, options?: {
|
|
34
|
+
token?: string;
|
|
35
|
+
isAdmin?: boolean;
|
|
36
|
+
}): Promise<{
|
|
37
|
+
html: string;
|
|
38
|
+
serialNumber: string;
|
|
39
|
+
} | null>;
|
|
40
|
+
listCertificates(filters?: {
|
|
41
|
+
status?: string;
|
|
42
|
+
templateSlug?: string;
|
|
43
|
+
search?: string;
|
|
44
|
+
}): Promise<{
|
|
45
|
+
records: import('../../../shared').CertificateRecord[];
|
|
46
|
+
stats: import('../../../shared').CertificateStats;
|
|
47
|
+
}>;
|
|
48
|
+
exportCsv(filters?: {
|
|
49
|
+
status?: string;
|
|
50
|
+
templateSlug?: string;
|
|
51
|
+
}): Promise<string>;
|
|
52
|
+
};
|
|
53
|
+
docusign: ({ strapi }: {
|
|
54
|
+
strapi: import("@strapi/strapi").Core.Strapi;
|
|
55
|
+
}) => {
|
|
56
|
+
sendEnvelopeForCertificate(documentId: string, options?: {
|
|
57
|
+
fetchImpl?: import('./docusign').FetchLikeFn;
|
|
58
|
+
accessToken?: string;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
envelopeId: string;
|
|
61
|
+
envelopeStatus: import('../../../shared').ESignEnvelopeStatus;
|
|
62
|
+
certificate: import('../../../shared').CertificateRecord;
|
|
63
|
+
}>;
|
|
64
|
+
handleWebhookEvent(params: {
|
|
65
|
+
rawBody: string;
|
|
66
|
+
signatureHeader?: string;
|
|
67
|
+
payload: Record<string, unknown>;
|
|
68
|
+
webhookSecret?: string;
|
|
69
|
+
}): Promise<{
|
|
70
|
+
envelopeId: string;
|
|
71
|
+
envelopeStatus: import('../../../shared').ESignEnvelopeStatus;
|
|
72
|
+
certificate: import('../../../shared').CertificateRecord;
|
|
73
|
+
}>;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Core } from '@strapi/strapi';
|
|
2
|
+
import { CertificateIssueInput, CertificateRecord, CertificateSignatory, CertificateStats, CertificateTemplate, CertificateVerificationResult } from '../../../shared';
|
|
3
|
+
export interface ApproveCertificateOptions {
|
|
4
|
+
signatories?: CertificateSignatory[];
|
|
5
|
+
witnesses?: Array<{
|
|
6
|
+
fullName: string;
|
|
7
|
+
documentIdRaw?: string;
|
|
8
|
+
documentIdMasked?: string;
|
|
9
|
+
role?: string;
|
|
10
|
+
}>;
|
|
11
|
+
recipientChosenName?: string;
|
|
12
|
+
notes?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: ({ strapi }: {
|
|
15
|
+
strapi: Core.Strapi;
|
|
16
|
+
}) => {
|
|
17
|
+
listTemplates(activeOnly?: boolean): Promise<CertificateTemplate[]>;
|
|
18
|
+
findTemplate(identifier: {
|
|
19
|
+
templateDocumentId?: string;
|
|
20
|
+
templateSlug?: string;
|
|
21
|
+
}): Promise<CertificateTemplate | null>;
|
|
22
|
+
createTemplate(data: Partial<CertificateTemplate>): Promise<CertificateTemplate>;
|
|
23
|
+
seedDefaultTemplates(): Promise<number>;
|
|
24
|
+
issueCertificate(input: CertificateIssueInput): Promise<CertificateRecord>;
|
|
25
|
+
approveCertificate(documentId: string, options?: ApproveCertificateOptions): Promise<CertificateRecord>;
|
|
26
|
+
revokeCertificate(documentId: string, reason: string): Promise<CertificateRecord>;
|
|
27
|
+
verifyCertificateBySerial(serialNumber: string, options?: {
|
|
28
|
+
token?: string;
|
|
29
|
+
nationalId?: string;
|
|
30
|
+
}): Promise<CertificateVerificationResult | null>;
|
|
31
|
+
renderCertificateDocument(identifier: {
|
|
32
|
+
documentId?: string;
|
|
33
|
+
serialNumber?: string;
|
|
34
|
+
}, options?: {
|
|
35
|
+
token?: string;
|
|
36
|
+
isAdmin?: boolean;
|
|
37
|
+
}): Promise<{
|
|
38
|
+
html: string;
|
|
39
|
+
serialNumber: string;
|
|
40
|
+
} | null>;
|
|
41
|
+
listCertificates(filters?: {
|
|
42
|
+
status?: string;
|
|
43
|
+
templateSlug?: string;
|
|
44
|
+
search?: string;
|
|
45
|
+
}): Promise<{
|
|
46
|
+
records: CertificateRecord[];
|
|
47
|
+
stats: CertificateStats;
|
|
48
|
+
}>;
|
|
49
|
+
exportCsv(filters?: {
|
|
50
|
+
status?: string;
|
|
51
|
+
templateSlug?: string;
|
|
52
|
+
}): Promise<string>;
|
|
53
|
+
};
|
|
54
|
+
export default _default;
|