-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcredly.interface.ts
More file actions
73 lines (69 loc) · 1.7 KB
/
credly.interface.ts
File metadata and controls
73 lines (69 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright The Linux Foundation and each contributor to LFX.
// SPDX-License-Identifier: MIT
import { Badge } from './badge.interface';
/** Raw Credly API badge entry as returned by GET /organizations/:orgId/badges */
export interface CredlyBadgeEntry {
id: string;
issued_at: string;
issued_at_date: string;
expires_at: string | null;
expires_at_date: string | null;
state: string;
public: boolean;
badge_url: string | null;
accept_badge_url: string | null;
recipient_email: string;
image_url: string;
issued_to: string;
issued_to_first_name: string;
issued_to_middle_name: string | null;
issued_to_last_name: string;
issuer_earner_id: string | null;
user?: {
first_name: string;
middle_name: string | null;
last_name: string;
url: string;
} | null;
issuer?: {
summary: string;
entities: Array<{
label: string;
primary: boolean;
entity: {
type: string;
id: string;
name: string;
};
}>;
} | null;
badge_template?: {
id: string;
name: string;
description: string;
image_url: string;
url: string;
type_category: string | null;
level: string | null;
skills: string[];
reporting_tags?: string[] | null;
} | null;
}
/** Raw Credly API paginated response wrapper */
export interface CredlyApiResponse {
data?: CredlyBadgeEntry[];
metadata: {
count: number;
current_page: number;
total_count: number;
total_pages: number;
per: number;
previous_page_url: string | null;
next_page_url: string | null;
};
}
/** Cached Credly badge payload used by server-side in-memory cache. */
export interface CredlyCachedBadges {
badges: Badge[];
expiresAt: number;
}