-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Expand file tree
/
Copy pathheaders.ts
More file actions
60 lines (51 loc) · 1.97 KB
/
headers.ts
File metadata and controls
60 lines (51 loc) · 1.97 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
import { X_CAL_CLIENT_ID, X_CAL_SECRET_KEY } from "@calcom/platform-constants";
import { ApiHeaderOptions } from "@nestjs/swagger";
export const OPTIONAL_X_CAL_CLIENT_ID_HEADER: ApiHeaderOptions = {
name: X_CAL_CLIENT_ID,
description: "For platform customers - OAuth client ID",
required: false,
};
export const OPTIONAL_X_CAL_SECRET_KEY_HEADER: ApiHeaderOptions = {
name: X_CAL_SECRET_KEY,
description: "For platform customers - OAuth client secret key",
required: false,
};
export const X_CAL_CLIENT_ID_HEADER: ApiHeaderOptions = {
name: X_CAL_CLIENT_ID,
description: "For platform customers - OAuth client ID",
required: false,
};
export const X_CAL_SECRET_KEY_HEADER: ApiHeaderOptions = {
name: X_CAL_SECRET_KEY,
description: "For platform customers - OAuth client secret key",
required: false,
};
export const OPTIONAL_API_KEY_HEADER: ApiHeaderOptions = {
name: "Authorization",
description:
"For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
required: false,
};
export const API_KEY_HEADER: ApiHeaderOptions = {
name: "Authorization",
description: "value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
required: true,
};
export const API_KEY_OR_ACCESS_TOKEN_HEADER: ApiHeaderOptions = {
name: "Authorization",
description:
"value must be `Bearer <token>` where `<token>` is api key prefixed with cal_, managed user access token, or OAuth access token",
required: true,
};
export const OPTIONAL_API_KEY_OR_ACCESS_TOKEN_HEADER: ApiHeaderOptions = {
name: "Authorization",
description:
"value must be `Bearer <token>` where `<token>` is api key prefixed with cal_, managed user access token, or OAuth access token",
required: false,
};
export const ACCESS_TOKEN_HEADER: ApiHeaderOptions = {
name: "Authorization",
description:
"value must be `Bearer <token>` where `<token>` is managed user access token or OAuth access token",
required: true,
};