@picahq/authkit-token 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/.github/workflows/publish.yml +28 -0
- package/LICENSE +674 -0
- package/README.MD +77 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/src/apis/index.d.ts +2 -0
- package/dist/src/apis/index.d.ts.map +1 -0
- package/dist/src/apis/index.js +18 -0
- package/dist/src/apis/index.js.map +1 -0
- package/dist/src/apis/link.api.d.ts +3 -0
- package/dist/src/apis/link.api.d.ts.map +1 -0
- package/dist/src/apis/link.api.js +71 -0
- package/dist/src/apis/link.api.js.map +1 -0
- package/dist/src/client/index.d.ts +21 -0
- package/dist/src/client/index.d.ts.map +1 -0
- package/dist/src/client/index.js +32 -0
- package/dist/src/client/index.js.map +1 -0
- package/dist/src/logic/getHeaders.d.ts +5 -0
- package/dist/src/logic/getHeaders.d.ts.map +1 -0
- package/dist/src/logic/getHeaders.js +11 -0
- package/dist/src/logic/getHeaders.js.map +1 -0
- package/index.ts +1 -0
- package/package.json +51 -0
- package/src/apis/index.ts +1 -0
- package/src/apis/link.api.ts +123 -0
- package/src/client/index.ts +54 -0
- package/src/logic/getHeaders.ts +6 -0
- package/src/types/index.d.ts +221 -0
- package/tsconfig.json +29 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
export interface Author {
|
|
2
|
+
_id: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
avatar?: string;
|
|
5
|
+
[x: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface Ownership {
|
|
8
|
+
buildableId: string;
|
|
9
|
+
clientId?: string;
|
|
10
|
+
projectId?: string;
|
|
11
|
+
organizationId?: string;
|
|
12
|
+
author?: Author;
|
|
13
|
+
userId?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface EventLink {
|
|
17
|
+
_id?: string;
|
|
18
|
+
version: string;
|
|
19
|
+
ownership: Ownership;
|
|
20
|
+
identity?: string;
|
|
21
|
+
identityType?: 'user' | 'team' | 'organization' | 'project';
|
|
22
|
+
group?: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
token: string;
|
|
25
|
+
createdAt: number;
|
|
26
|
+
createdDate: Date;
|
|
27
|
+
updatedAt?: number;
|
|
28
|
+
expiresAt: number;
|
|
29
|
+
environment?: string;
|
|
30
|
+
usageSource?: string;
|
|
31
|
+
_type: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type CreateEventLinkPayload = {
|
|
35
|
+
identity?: string;
|
|
36
|
+
identityType?: 'user' | 'team' | 'organization' | 'project';
|
|
37
|
+
group?: string;
|
|
38
|
+
label?: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export interface ConnectionDefinition {
|
|
42
|
+
authMethod: object | null; // You can specify the correct data type for authMethod if needed
|
|
43
|
+
_id: string;
|
|
44
|
+
platformVersion: string;
|
|
45
|
+
platform: string;
|
|
46
|
+
type: string;
|
|
47
|
+
name: string;
|
|
48
|
+
authSecrets: any[]; // You can specify the correct data type for authSecrets if needed
|
|
49
|
+
frontend: {
|
|
50
|
+
spec: {
|
|
51
|
+
title: string;
|
|
52
|
+
description: string;
|
|
53
|
+
platform: string;
|
|
54
|
+
category: string;
|
|
55
|
+
image: string;
|
|
56
|
+
tags: string[];
|
|
57
|
+
};
|
|
58
|
+
connectionForm: {
|
|
59
|
+
name: string;
|
|
60
|
+
description: string;
|
|
61
|
+
formData: any[]; // You can specify the correct data type for formData if needed
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
paths: {
|
|
65
|
+
id: any; // You can specify the correct data type for id if needed
|
|
66
|
+
event: any; // You can specify the correct data type for event if needed
|
|
67
|
+
payload: any; // You can specify the correct data type for payload if needed
|
|
68
|
+
timestamp: string;
|
|
69
|
+
secret: string;
|
|
70
|
+
signature: any; // You can specify the correct data type for signature if needed
|
|
71
|
+
cursor: any; // You can specify the correct data type for cursor if needed
|
|
72
|
+
};
|
|
73
|
+
settings: {
|
|
74
|
+
parseWebhookBody: boolean;
|
|
75
|
+
showSecret: boolean;
|
|
76
|
+
allowCustomEvents: boolean;
|
|
77
|
+
oauth: boolean;
|
|
78
|
+
};
|
|
79
|
+
hidden: boolean;
|
|
80
|
+
testConnection: any; // You can specify the correct data type for testConnection if needed
|
|
81
|
+
createdAt: number;
|
|
82
|
+
updatedAt: number;
|
|
83
|
+
updated: boolean;
|
|
84
|
+
version: string;
|
|
85
|
+
lastModifiedBy: string;
|
|
86
|
+
deleted: boolean;
|
|
87
|
+
changeLog: Record<string, any>; // Assuming changeLog is a dictionary
|
|
88
|
+
tags: string[]; // You can specify the correct data type for tags if needed
|
|
89
|
+
active: boolean;
|
|
90
|
+
deprecated: boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface ConnectionDefinitions {
|
|
94
|
+
rows: ConnectionDefinition[];
|
|
95
|
+
limit: number;
|
|
96
|
+
skip: number;
|
|
97
|
+
total: number;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface Platform {
|
|
101
|
+
type: string;
|
|
102
|
+
title: string;
|
|
103
|
+
connectionDefinitionId: string;
|
|
104
|
+
active?: boolean;
|
|
105
|
+
image: string;
|
|
106
|
+
activatedAt?: number;
|
|
107
|
+
secretsServiceId?: string;
|
|
108
|
+
secret?: {
|
|
109
|
+
clientId: string;
|
|
110
|
+
clientSecretDisplay: string;
|
|
111
|
+
};
|
|
112
|
+
environment?: 'test' | 'live';
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface Feature {
|
|
116
|
+
key: string;
|
|
117
|
+
value: 'enabled' | 'disabled';
|
|
118
|
+
updatedAt: number;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface ConnectionRecord {
|
|
122
|
+
_id: string;
|
|
123
|
+
platformVersion: string;
|
|
124
|
+
connectionDefinitionId: string;
|
|
125
|
+
name: string;
|
|
126
|
+
key: string;
|
|
127
|
+
environment: string;
|
|
128
|
+
platform: string;
|
|
129
|
+
secretsServiceId: string;
|
|
130
|
+
settings: {
|
|
131
|
+
parseWebhookBody: boolean;
|
|
132
|
+
showSecret: boolean;
|
|
133
|
+
allowCustomEvents: boolean;
|
|
134
|
+
oauth: boolean;
|
|
135
|
+
};
|
|
136
|
+
throughput: {
|
|
137
|
+
key: string;
|
|
138
|
+
limit: number;
|
|
139
|
+
};
|
|
140
|
+
createdAt: number;
|
|
141
|
+
updatedAt: number;
|
|
142
|
+
updated: boolean;
|
|
143
|
+
version: string;
|
|
144
|
+
lastModifiedBy: string;
|
|
145
|
+
deleted: boolean;
|
|
146
|
+
changeLog: Record<string, any>; // You can replace 'any' with a more specific type if needed
|
|
147
|
+
tags: string[];
|
|
148
|
+
active: boolean;
|
|
149
|
+
deprecated: boolean;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
export interface EmbedTokenRecord {
|
|
154
|
+
linkSettings: {
|
|
155
|
+
connectedPlatforms: Platform[];
|
|
156
|
+
eventIncToken: string;
|
|
157
|
+
};
|
|
158
|
+
group?: string;
|
|
159
|
+
label?: string;
|
|
160
|
+
identity?: string;
|
|
161
|
+
identityType?: 'user' | 'team' | 'organization' | 'project';
|
|
162
|
+
createdAt: number;
|
|
163
|
+
createdDate: Date;
|
|
164
|
+
updatedAt?: number;
|
|
165
|
+
expiresAt?: number;
|
|
166
|
+
environment: string;
|
|
167
|
+
features?: Feature[];
|
|
168
|
+
sessionId: string;
|
|
169
|
+
_id?: string;
|
|
170
|
+
formData?: object;
|
|
171
|
+
response?: {
|
|
172
|
+
isConnected: boolean;
|
|
173
|
+
message?: string;
|
|
174
|
+
connection?: ConnectionRecord;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface LinkSettings {
|
|
179
|
+
_id?: string;
|
|
180
|
+
ownership: Ownership;
|
|
181
|
+
connectedPlatforms: Platform[];
|
|
182
|
+
createdAt: number;
|
|
183
|
+
updatedAt: number;
|
|
184
|
+
createdDate: Date;
|
|
185
|
+
updatedDate: Date;
|
|
186
|
+
features?: Feature[];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface AuthkitConnection {
|
|
190
|
+
id: number;
|
|
191
|
+
connectionDefId: number;
|
|
192
|
+
type: string;
|
|
193
|
+
title: string;
|
|
194
|
+
image: string;
|
|
195
|
+
activatedAt: string;
|
|
196
|
+
secretId?: string | null;
|
|
197
|
+
clientSecretDisplay?: string | null;
|
|
198
|
+
clientIdDisplay?: string | null;
|
|
199
|
+
scopes?: string | null;
|
|
200
|
+
environment: string;
|
|
201
|
+
guide?: string | null;
|
|
202
|
+
createdAt: string;
|
|
203
|
+
tags: string[];
|
|
204
|
+
active: boolean;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface AuthkitResponse {
|
|
208
|
+
rows: AuthkitConnection[];
|
|
209
|
+
total: number;
|
|
210
|
+
pages: number;
|
|
211
|
+
page: number;
|
|
212
|
+
requestId: number;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface ConnectorPaginationOptions {
|
|
216
|
+
limit?: number;
|
|
217
|
+
maxConcurrentRequests?: number;
|
|
218
|
+
maxRetries?: number;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": [
|
|
6
|
+
"ES2020"
|
|
7
|
+
],
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"declarationMap": true,
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"outDir": "dist",
|
|
12
|
+
"rootDir": ".",
|
|
13
|
+
"removeComments": true,
|
|
14
|
+
"strict": true,
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"forceConsistentCasingInFileNames": true,
|
|
18
|
+
"moduleResolution": "node",
|
|
19
|
+
"resolveJsonModule": true,
|
|
20
|
+
"paths": {}
|
|
21
|
+
},
|
|
22
|
+
"include": [
|
|
23
|
+
"./**/*.ts"
|
|
24
|
+
],
|
|
25
|
+
"exclude": [
|
|
26
|
+
"node_modules",
|
|
27
|
+
"dist"
|
|
28
|
+
]
|
|
29
|
+
}
|