@hawk.so/types 0.5.3 → 0.5.4

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.
@@ -59,5 +59,43 @@ export interface ProjectTaskManagerConfig {
59
59
  * Repository full name (owner/repo)
60
60
  */
61
61
  repoFullName: string;
62
+ /**
63
+ * Delegated user OAuth token for user-to-server authentication
64
+ * Used for creating issues and assigning Copilot on behalf of the user
65
+ */
66
+ delegatedUser?: {
67
+ /**
68
+ * Hawk user ID who authorized the GitHub App
69
+ */
70
+ hawkUserId: string;
71
+ /**
72
+ * GitHub user ID
73
+ */
74
+ githubUserId: number;
75
+ /**
76
+ * GitHub username/login
77
+ */
78
+ githubLogin: string;
79
+ /**
80
+ * OAuth access token (user-to-server token)
81
+ */
82
+ accessToken: string;
83
+ /**
84
+ * Date when token was created/saved
85
+ */
86
+ tokenCreatedAt: Date;
87
+ /**
88
+ * Date when token was last successfully validated
89
+ * null if never validated
90
+ */
91
+ tokenLastValidatedAt: Date | null;
92
+ /**
93
+ * Token status
94
+ * - active: token is valid (GET /user returns 200)
95
+ * - revoked: token was revoked (GET /user returns 401/403) or user removed authorization
96
+ * - missing: token is not present in project
97
+ */
98
+ status: 'active' | 'revoked' | 'missing';
99
+ };
62
100
  };
63
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawk.so/types",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "TypeScript definitions for Hawk",
5
5
  "types": "build/index.d.ts",
6
6
  "main": "build/index.js",
@@ -70,5 +70,50 @@ export interface ProjectTaskManagerConfig {
70
70
  * Repository full name (owner/repo)
71
71
  */
72
72
  repoFullName: string;
73
+
74
+ /**
75
+ * Delegated user OAuth token for user-to-server authentication
76
+ * Used for creating issues and assigning Copilot on behalf of the user
77
+ */
78
+ delegatedUser?: {
79
+ /**
80
+ * Hawk user ID who authorized the GitHub App
81
+ */
82
+ hawkUserId: string;
83
+
84
+ /**
85
+ * GitHub user ID
86
+ */
87
+ githubUserId: number;
88
+
89
+ /**
90
+ * GitHub username/login
91
+ */
92
+ githubLogin: string;
93
+
94
+ /**
95
+ * OAuth access token (user-to-server token)
96
+ */
97
+ accessToken: string;
98
+
99
+ /**
100
+ * Date when token was created/saved
101
+ */
102
+ tokenCreatedAt: Date;
103
+
104
+ /**
105
+ * Date when token was last successfully validated
106
+ * null if never validated
107
+ */
108
+ tokenLastValidatedAt: Date | null;
109
+
110
+ /**
111
+ * Token status
112
+ * - active: token is valid (GET /user returns 200)
113
+ * - revoked: token was revoked (GET /user returns 401/403) or user removed authorization
114
+ * - missing: token is not present in project
115
+ */
116
+ status: 'active' | 'revoked' | 'missing';
117
+ };
73
118
  };
74
119
  }