@superdurable/connector-google-workspace-admin 0.0.0-stage → 0.1.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 +21 -0
- package/README.md +8 -2
- package/dex-connector.json +272 -0
- package/dist/chunk-Z52APRCQ.js +447 -0
- package/dist/connection-DIUn6yK-.d.ts +392 -0
- package/dist/index.d.ts +462 -0
- package/dist/index.js +1051 -0
- package/dist/mock.d.ts +186 -0
- package/dist/mock.js +453 -0
- package/package.json +61 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Super Durable
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Google Workspace Admin TypeScript connector
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@superdurable/connector-google-workspace-admin` implements seven Dex Step operations against Google's Admin SDK Directory API: `getUser`, `listUsers`, `createUser`, `suspendUser`, `unsuspendUser`, `addUserToGroup`, and `removeUserFromGroup`. It uses the manifest-generated Step factories and OAuth refresh declaration. `createUser` writes a stable external creation key and reads back conflicts; group addition and removal likewise converge after retries.
|
|
4
|
+
|
|
5
|
+
The [get-user example](examples/get-user/README.md) is a runnable Dex Flow with the static connection name `workspace-admin-directory`. Bind that name in Dex Web using the connector's authorization guide. Domain-wide delegation and interactive Google OAuth are both supported through the generated credential provider and refresh driver. The package never asks for provider tokens in Flow input.
|
|
6
|
+
|
|
7
|
+
For the complete runnable import and Flow definition, see `examples/get-user/flow/workflow.ts`. Operation errors and rejected credentials select optional failure branches; wire an optional branch only when the Flow has a business reaction for it. The default example leaves them unwired, so Dex fails the Flow on those outcomes.
|
|
8
|
+
|
|
9
|
+
Run `npm ci`, `npm run check`, and `npm run test:integration` with `DEX_FLOW_SERVICE_ADDRESS` pointing to `dexcli dev`. Provider conformance replays Go-recorded HTTP scenarios. Live Google authorization, scopes, and Directory behavior need a user-controlled connection and were not verified by replay.
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
{
|
|
2
|
+
"connectorId": "google-workspace-admin",
|
|
3
|
+
"releaseTag": "connectors/google/workspace-admin/go/v0.24.0",
|
|
4
|
+
"package": {
|
|
5
|
+
"ecosystem": "npm",
|
|
6
|
+
"name": "@superdurable/connector-google-workspace-admin",
|
|
7
|
+
"version": "0.1.0"
|
|
8
|
+
},
|
|
9
|
+
"factories": [
|
|
10
|
+
{
|
|
11
|
+
"name": "newGetUserStep",
|
|
12
|
+
"kind": "query",
|
|
13
|
+
"operationId": "getUser",
|
|
14
|
+
"fields": {
|
|
15
|
+
"stepType": "stepType",
|
|
16
|
+
"annotations": "annotations",
|
|
17
|
+
"connectionName": "connectionName",
|
|
18
|
+
"resultAttribute": "resultAttribute"
|
|
19
|
+
},
|
|
20
|
+
"branches": [
|
|
21
|
+
{
|
|
22
|
+
"id": "found",
|
|
23
|
+
"field": "found",
|
|
24
|
+
"optional": false
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "notFound",
|
|
28
|
+
"field": "notFound",
|
|
29
|
+
"optional": true
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "providerRejected",
|
|
33
|
+
"field": "providerRejected",
|
|
34
|
+
"optional": true
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "invalidResponse",
|
|
38
|
+
"field": "invalidResponse",
|
|
39
|
+
"optional": true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "defect",
|
|
43
|
+
"field": "defect",
|
|
44
|
+
"optional": true
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "newListUsersStep",
|
|
50
|
+
"kind": "query",
|
|
51
|
+
"operationId": "listUsers",
|
|
52
|
+
"fields": {
|
|
53
|
+
"stepType": "stepType",
|
|
54
|
+
"annotations": "annotations",
|
|
55
|
+
"connectionName": "connectionName",
|
|
56
|
+
"resultAttribute": "resultAttribute"
|
|
57
|
+
},
|
|
58
|
+
"branches": [
|
|
59
|
+
{
|
|
60
|
+
"id": "listed",
|
|
61
|
+
"field": "listed",
|
|
62
|
+
"optional": false
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "providerRejected",
|
|
66
|
+
"field": "providerRejected",
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "invalidResponse",
|
|
71
|
+
"field": "invalidResponse",
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "defect",
|
|
76
|
+
"field": "defect",
|
|
77
|
+
"optional": true
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "newCreateUserStep",
|
|
83
|
+
"kind": "mutation",
|
|
84
|
+
"operationId": "createUser",
|
|
85
|
+
"fields": {
|
|
86
|
+
"stepType": "stepType",
|
|
87
|
+
"annotations": "annotations",
|
|
88
|
+
"connectionName": "connectionName",
|
|
89
|
+
"resultAttribute": "resultAttribute"
|
|
90
|
+
},
|
|
91
|
+
"branches": [
|
|
92
|
+
{
|
|
93
|
+
"id": "created",
|
|
94
|
+
"field": "created",
|
|
95
|
+
"optional": false
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "alreadyExists",
|
|
99
|
+
"field": "alreadyExists",
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "providerRejected",
|
|
104
|
+
"field": "providerRejected",
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "invalidResponse",
|
|
109
|
+
"field": "invalidResponse",
|
|
110
|
+
"optional": true
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "defect",
|
|
114
|
+
"field": "defect",
|
|
115
|
+
"optional": true
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "newSuspendUserStep",
|
|
121
|
+
"kind": "mutation",
|
|
122
|
+
"operationId": "suspendUser",
|
|
123
|
+
"fields": {
|
|
124
|
+
"stepType": "stepType",
|
|
125
|
+
"annotations": "annotations",
|
|
126
|
+
"connectionName": "connectionName",
|
|
127
|
+
"resultAttribute": "resultAttribute"
|
|
128
|
+
},
|
|
129
|
+
"branches": [
|
|
130
|
+
{
|
|
131
|
+
"id": "suspended",
|
|
132
|
+
"field": "suspended",
|
|
133
|
+
"optional": false
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": "notFound",
|
|
137
|
+
"field": "notFound",
|
|
138
|
+
"optional": true
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"id": "providerRejected",
|
|
142
|
+
"field": "providerRejected",
|
|
143
|
+
"optional": true
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "invalidResponse",
|
|
147
|
+
"field": "invalidResponse",
|
|
148
|
+
"optional": true
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "defect",
|
|
152
|
+
"field": "defect",
|
|
153
|
+
"optional": true
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "newUnsuspendUserStep",
|
|
159
|
+
"kind": "mutation",
|
|
160
|
+
"operationId": "unsuspendUser",
|
|
161
|
+
"fields": {
|
|
162
|
+
"stepType": "stepType",
|
|
163
|
+
"annotations": "annotations",
|
|
164
|
+
"connectionName": "connectionName",
|
|
165
|
+
"resultAttribute": "resultAttribute"
|
|
166
|
+
},
|
|
167
|
+
"branches": [
|
|
168
|
+
{
|
|
169
|
+
"id": "unsuspended",
|
|
170
|
+
"field": "unsuspended",
|
|
171
|
+
"optional": false
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"id": "notFound",
|
|
175
|
+
"field": "notFound",
|
|
176
|
+
"optional": true
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": "providerRejected",
|
|
180
|
+
"field": "providerRejected",
|
|
181
|
+
"optional": true
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "invalidResponse",
|
|
185
|
+
"field": "invalidResponse",
|
|
186
|
+
"optional": true
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"id": "defect",
|
|
190
|
+
"field": "defect",
|
|
191
|
+
"optional": true
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "newAddUserToGroupStep",
|
|
197
|
+
"kind": "mutation",
|
|
198
|
+
"operationId": "addUserToGroup",
|
|
199
|
+
"fields": {
|
|
200
|
+
"stepType": "stepType",
|
|
201
|
+
"annotations": "annotations",
|
|
202
|
+
"connectionName": "connectionName",
|
|
203
|
+
"resultAttribute": "resultAttribute"
|
|
204
|
+
},
|
|
205
|
+
"branches": [
|
|
206
|
+
{
|
|
207
|
+
"id": "added",
|
|
208
|
+
"field": "added",
|
|
209
|
+
"optional": false
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"id": "notFound",
|
|
213
|
+
"field": "notFound",
|
|
214
|
+
"optional": true
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"id": "providerRejected",
|
|
218
|
+
"field": "providerRejected",
|
|
219
|
+
"optional": true
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"id": "invalidResponse",
|
|
223
|
+
"field": "invalidResponse",
|
|
224
|
+
"optional": true
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"id": "defect",
|
|
228
|
+
"field": "defect",
|
|
229
|
+
"optional": true
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "newRemoveUserFromGroupStep",
|
|
235
|
+
"kind": "mutation",
|
|
236
|
+
"operationId": "removeUserFromGroup",
|
|
237
|
+
"fields": {
|
|
238
|
+
"stepType": "stepType",
|
|
239
|
+
"annotations": "annotations",
|
|
240
|
+
"connectionName": "connectionName",
|
|
241
|
+
"resultAttribute": "resultAttribute"
|
|
242
|
+
},
|
|
243
|
+
"branches": [
|
|
244
|
+
{
|
|
245
|
+
"id": "removed",
|
|
246
|
+
"field": "removed",
|
|
247
|
+
"optional": false
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"id": "notFound",
|
|
251
|
+
"field": "notFound",
|
|
252
|
+
"optional": true
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"id": "providerRejected",
|
|
256
|
+
"field": "providerRejected",
|
|
257
|
+
"optional": true
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"id": "invalidResponse",
|
|
261
|
+
"field": "invalidResponse",
|
|
262
|
+
"optional": true
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"id": "defect",
|
|
266
|
+
"field": "defect",
|
|
267
|
+
"optional": true
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
}
|