@superdurable/connector-google-workspace-admin 0.0.0-stage → 0.1.1

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 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
- # Temporary Holding Version
1
+ # Google Workspace Admin TypeScript connector
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
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,446 @@
1
+ {
2
+ "connectorId": "google-workspace-admin",
3
+ "releaseTag": "connectors/google/workspace-admin/go/v0.24.1",
4
+ "package": {
5
+ "ecosystem": "npm",
6
+ "name": "@superdurable/connector-google-workspace-admin",
7
+ "version": "0.1.1"
8
+ },
9
+ "factories": [
10
+ {
11
+ "name": "newGetUserStep",
12
+ "kind": "query",
13
+ "operationId": "getUser",
14
+ "inputType": "GetUserInput",
15
+ "description": "Read one user account by primary email address, alias, or unique user ID.",
16
+ "fields": {
17
+ "stepType": "stepType",
18
+ "annotations": "annotations",
19
+ "connectionName": "connectionName",
20
+ "resultAttribute": "resultAttribute"
21
+ },
22
+ "branches": [
23
+ {
24
+ "id": "found",
25
+ "field": "found",
26
+ "optional": false
27
+ },
28
+ {
29
+ "id": "notFound",
30
+ "field": "notFound",
31
+ "optional": true
32
+ },
33
+ {
34
+ "id": "providerRejected",
35
+ "field": "providerRejected",
36
+ "optional": true
37
+ },
38
+ {
39
+ "id": "invalidResponse",
40
+ "field": "invalidResponse",
41
+ "optional": true
42
+ },
43
+ {
44
+ "id": "defect",
45
+ "field": "defect",
46
+ "optional": true
47
+ }
48
+ ],
49
+ "inputSchema": {
50
+ "additionalProperties": false,
51
+ "description": "GetUserInput identifies one account to read.",
52
+ "properties": {
53
+ "userKey": {
54
+ "description": "UserKey is the account's primary email address, an alias address, or its numeric unique user ID.",
55
+ "type": "string"
56
+ }
57
+ },
58
+ "required": [
59
+ "userKey"
60
+ ],
61
+ "type": "object"
62
+ }
63
+ },
64
+ {
65
+ "name": "newListUsersStep",
66
+ "kind": "query",
67
+ "operationId": "listUsers",
68
+ "inputType": "ListUsersInput",
69
+ "description": "List one bounded page of accounts in the administrator's customer account or one domain, optionally filtered with Google's user search syntax.",
70
+ "fields": {
71
+ "stepType": "stepType",
72
+ "annotations": "annotations",
73
+ "connectionName": "connectionName",
74
+ "resultAttribute": "resultAttribute"
75
+ },
76
+ "branches": [
77
+ {
78
+ "id": "listed",
79
+ "field": "listed",
80
+ "optional": false
81
+ },
82
+ {
83
+ "id": "providerRejected",
84
+ "field": "providerRejected",
85
+ "optional": true
86
+ },
87
+ {
88
+ "id": "invalidResponse",
89
+ "field": "invalidResponse",
90
+ "optional": true
91
+ },
92
+ {
93
+ "id": "defect",
94
+ "field": "defect",
95
+ "optional": true
96
+ }
97
+ ],
98
+ "inputSchema": {
99
+ "additionalProperties": false,
100
+ "description": "ListUsersInput selects one page of accounts. Leave both Domain and Customer blank to list every account in the administrator's own customer account.",
101
+ "properties": {
102
+ "customer": {
103
+ "description": "Customer is a customer ID such as C03az79cb, for a reseller administrator; blank uses the administrator's own account.",
104
+ "type": "string"
105
+ },
106
+ "domain": {
107
+ "description": "Domain limits the page to one of the account's domains, such as example.com; it cannot be combined with Customer.",
108
+ "type": "string"
109
+ },
110
+ "orderBy": {
111
+ "description": "OrderBy is email, givenName, or familyName; blank sorts by primary address.",
112
+ "type": "string"
113
+ },
114
+ "pageSize": {
115
+ "description": "PageSize is 1 to 500 accounts; zero uses the connection's listUsersPageSize.",
116
+ "type": "integer"
117
+ },
118
+ "pageToken": {
119
+ "description": "PageToken is the NextPageToken of the previous page; Google keeps it valid for three days.",
120
+ "type": "string"
121
+ },
122
+ "query": {
123
+ "description": "Query is Google's user search syntax, such as orgUnitPath='/Sales' isSuspended=false; blank lists every account. Google documents that new data can take up to 36 hours to appear in search results.",
124
+ "type": "string"
125
+ }
126
+ },
127
+ "type": "object"
128
+ }
129
+ },
130
+ {
131
+ "name": "newCreateUserStep",
132
+ "kind": "mutation",
133
+ "operationId": "createUser",
134
+ "inputType": "CreateUserInput",
135
+ "description": "Create one account with a generated password nobody receives, tagged with a stable key, so a repeated Step returns the account it created instead of a duplicate.",
136
+ "fields": {
137
+ "stepType": "stepType",
138
+ "annotations": "annotations",
139
+ "connectionName": "connectionName",
140
+ "resultAttribute": "resultAttribute"
141
+ },
142
+ "branches": [
143
+ {
144
+ "id": "created",
145
+ "field": "created",
146
+ "optional": false
147
+ },
148
+ {
149
+ "id": "alreadyExists",
150
+ "field": "alreadyExists",
151
+ "optional": true
152
+ },
153
+ {
154
+ "id": "providerRejected",
155
+ "field": "providerRejected",
156
+ "optional": true
157
+ },
158
+ {
159
+ "id": "invalidResponse",
160
+ "field": "invalidResponse",
161
+ "optional": true
162
+ },
163
+ {
164
+ "id": "defect",
165
+ "field": "defect",
166
+ "optional": true
167
+ }
168
+ ],
169
+ "inputSchema": {
170
+ "additionalProperties": false,
171
+ "description": "CreateUserInput describes one account to create. The connector generates the initial password itself: no password is accepted, returned, stored, or logged.",
172
+ "properties": {
173
+ "familyName": {
174
+ "description": "FamilyName is the required last name, at most 60 characters.",
175
+ "type": "string"
176
+ },
177
+ "givenName": {
178
+ "description": "GivenName is the required first name, at most 60 characters.",
179
+ "type": "string"
180
+ },
181
+ "orgUnitPath": {
182
+ "description": "OrgUnitPath places the account in an organizational unit, such as /Engineering; blank uses the top-level unit /.",
183
+ "type": "string"
184
+ },
185
+ "primaryEmail": {
186
+ "description": "PrimaryEmail is the new sign-in address in one of the account's verified domains, such as ada@example.com.",
187
+ "type": "string"
188
+ },
189
+ "provisioningKey": {
190
+ "description": "ProvisioningKey optionally identifies one logical account across Step executions, such as an HR hire ID. It is 1 to 128 letters, digits, and . _ : - characters; blank uses the Step's Call ID.",
191
+ "type": "string"
192
+ },
193
+ "recoveryEmail": {
194
+ "description": "RecoveryEmail is an optional personal address Google can use for account recovery.",
195
+ "type": "string"
196
+ },
197
+ "recoveryPhone": {
198
+ "description": "RecoveryPhone is an optional E.164 recovery phone number, such as +16506661212.",
199
+ "type": "string"
200
+ }
201
+ },
202
+ "required": [
203
+ "familyName",
204
+ "givenName",
205
+ "primaryEmail"
206
+ ],
207
+ "type": "object"
208
+ }
209
+ },
210
+ {
211
+ "name": "newSuspendUserStep",
212
+ "kind": "mutation",
213
+ "operationId": "suspendUser",
214
+ "inputType": "SuspendUserInput",
215
+ "description": "Suspend one account so it cannot sign in, keeping its data; suspending a suspended account changes nothing.",
216
+ "fields": {
217
+ "stepType": "stepType",
218
+ "annotations": "annotations",
219
+ "connectionName": "connectionName",
220
+ "resultAttribute": "resultAttribute"
221
+ },
222
+ "branches": [
223
+ {
224
+ "id": "suspended",
225
+ "field": "suspended",
226
+ "optional": false
227
+ },
228
+ {
229
+ "id": "notFound",
230
+ "field": "notFound",
231
+ "optional": true
232
+ },
233
+ {
234
+ "id": "providerRejected",
235
+ "field": "providerRejected",
236
+ "optional": true
237
+ },
238
+ {
239
+ "id": "invalidResponse",
240
+ "field": "invalidResponse",
241
+ "optional": true
242
+ },
243
+ {
244
+ "id": "defect",
245
+ "field": "defect",
246
+ "optional": true
247
+ }
248
+ ],
249
+ "inputSchema": {
250
+ "additionalProperties": false,
251
+ "description": "SuspendUserInput identifies one account to suspend.",
252
+ "properties": {
253
+ "userKey": {
254
+ "description": "UserKey is the account's primary email address, an alias address, or its numeric unique user ID.",
255
+ "type": "string"
256
+ }
257
+ },
258
+ "required": [
259
+ "userKey"
260
+ ],
261
+ "type": "object"
262
+ }
263
+ },
264
+ {
265
+ "name": "newUnsuspendUserStep",
266
+ "kind": "mutation",
267
+ "operationId": "unsuspendUser",
268
+ "inputType": "UnsuspendUserInput",
269
+ "description": "Restore sign-in for one suspended account; restoring an active account changes nothing.",
270
+ "fields": {
271
+ "stepType": "stepType",
272
+ "annotations": "annotations",
273
+ "connectionName": "connectionName",
274
+ "resultAttribute": "resultAttribute"
275
+ },
276
+ "branches": [
277
+ {
278
+ "id": "unsuspended",
279
+ "field": "unsuspended",
280
+ "optional": false
281
+ },
282
+ {
283
+ "id": "notFound",
284
+ "field": "notFound",
285
+ "optional": true
286
+ },
287
+ {
288
+ "id": "providerRejected",
289
+ "field": "providerRejected",
290
+ "optional": true
291
+ },
292
+ {
293
+ "id": "invalidResponse",
294
+ "field": "invalidResponse",
295
+ "optional": true
296
+ },
297
+ {
298
+ "id": "defect",
299
+ "field": "defect",
300
+ "optional": true
301
+ }
302
+ ],
303
+ "inputSchema": {
304
+ "additionalProperties": false,
305
+ "description": "UnsuspendUserInput identifies one account whose sign-in to restore.",
306
+ "properties": {
307
+ "userKey": {
308
+ "description": "UserKey is the account's primary email address, an alias address, or its numeric unique user ID.",
309
+ "type": "string"
310
+ }
311
+ },
312
+ "required": [
313
+ "userKey"
314
+ ],
315
+ "type": "object"
316
+ }
317
+ },
318
+ {
319
+ "name": "newAddUserToGroupStep",
320
+ "kind": "mutation",
321
+ "operationId": "addUserToGroup",
322
+ "inputType": "AddUserToGroupInput",
323
+ "description": "Add one account to a group with a role; an existing membership is read back and returned instead of failing.",
324
+ "fields": {
325
+ "stepType": "stepType",
326
+ "annotations": "annotations",
327
+ "connectionName": "connectionName",
328
+ "resultAttribute": "resultAttribute"
329
+ },
330
+ "branches": [
331
+ {
332
+ "id": "added",
333
+ "field": "added",
334
+ "optional": false
335
+ },
336
+ {
337
+ "id": "notFound",
338
+ "field": "notFound",
339
+ "optional": true
340
+ },
341
+ {
342
+ "id": "providerRejected",
343
+ "field": "providerRejected",
344
+ "optional": true
345
+ },
346
+ {
347
+ "id": "invalidResponse",
348
+ "field": "invalidResponse",
349
+ "optional": true
350
+ },
351
+ {
352
+ "id": "defect",
353
+ "field": "defect",
354
+ "optional": true
355
+ }
356
+ ],
357
+ "inputSchema": {
358
+ "additionalProperties": false,
359
+ "description": "AddUserToGroupInput adds one account to one group.",
360
+ "properties": {
361
+ "groupKey": {
362
+ "description": "GroupKey is the group's email address, an alias, or its unique group ID.",
363
+ "type": "string"
364
+ },
365
+ "memberEmail": {
366
+ "description": "MemberEmail is the account's primary or alias email address.",
367
+ "type": "string"
368
+ },
369
+ "role": {
370
+ "description": "Role is MEMBER, MANAGER, or OWNER; blank adds the account as MEMBER.",
371
+ "enum": [
372
+ "MANAGER",
373
+ "MEMBER",
374
+ "OWNER"
375
+ ],
376
+ "type": "string"
377
+ }
378
+ },
379
+ "required": [
380
+ "groupKey",
381
+ "memberEmail"
382
+ ],
383
+ "type": "object"
384
+ }
385
+ },
386
+ {
387
+ "name": "newRemoveUserFromGroupStep",
388
+ "kind": "mutation",
389
+ "operationId": "removeUserFromGroup",
390
+ "inputType": "RemoveUserFromGroupInput",
391
+ "description": "Remove one account's direct membership from a group; a membership that is already gone is reported as removed.",
392
+ "fields": {
393
+ "stepType": "stepType",
394
+ "annotations": "annotations",
395
+ "connectionName": "connectionName",
396
+ "resultAttribute": "resultAttribute"
397
+ },
398
+ "branches": [
399
+ {
400
+ "id": "removed",
401
+ "field": "removed",
402
+ "optional": false
403
+ },
404
+ {
405
+ "id": "notFound",
406
+ "field": "notFound",
407
+ "optional": true
408
+ },
409
+ {
410
+ "id": "providerRejected",
411
+ "field": "providerRejected",
412
+ "optional": true
413
+ },
414
+ {
415
+ "id": "invalidResponse",
416
+ "field": "invalidResponse",
417
+ "optional": true
418
+ },
419
+ {
420
+ "id": "defect",
421
+ "field": "defect",
422
+ "optional": true
423
+ }
424
+ ],
425
+ "inputSchema": {
426
+ "additionalProperties": false,
427
+ "description": "RemoveUserFromGroupInput removes one account's direct membership from one group.",
428
+ "properties": {
429
+ "groupKey": {
430
+ "description": "GroupKey is the group's email address, an alias, or its unique group ID.",
431
+ "type": "string"
432
+ },
433
+ "memberKey": {
434
+ "description": "MemberKey is the account's primary or alias email address or its numeric unique user ID.",
435
+ "type": "string"
436
+ }
437
+ },
438
+ "required": [
439
+ "groupKey",
440
+ "memberKey"
441
+ ],
442
+ "type": "object"
443
+ }
444
+ }
445
+ ]
446
+ }