@dork-labs/cloud-api 0.75.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.
Files changed (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +192 -0
  3. package/dist/billing.d.ts +328 -0
  4. package/dist/billing.d.ts.map +1 -0
  5. package/dist/billing.js +267 -0
  6. package/dist/billing.js.map +1 -0
  7. package/dist/client.d.ts +130 -0
  8. package/dist/client.d.ts.map +1 -0
  9. package/dist/client.js +192 -0
  10. package/dist/client.js.map +1 -0
  11. package/dist/connections.d.ts +281 -0
  12. package/dist/connections.d.ts.map +1 -0
  13. package/dist/connections.js +241 -0
  14. package/dist/connections.js.map +1 -0
  15. package/dist/index.d.ts +31 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +31 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/inference.d.ts +123 -0
  20. package/dist/inference.d.ts.map +1 -0
  21. package/dist/inference.js +114 -0
  22. package/dist/inference.js.map +1 -0
  23. package/dist/instances.d.ts +60 -0
  24. package/dist/instances.d.ts.map +1 -0
  25. package/dist/instances.js +65 -0
  26. package/dist/instances.js.map +1 -0
  27. package/dist/primitives.d.ts +74 -0
  28. package/dist/primitives.d.ts.map +1 -0
  29. package/dist/primitives.js +98 -0
  30. package/dist/primitives.js.map +1 -0
  31. package/dist/problem.d.ts +96 -0
  32. package/dist/problem.d.ts.map +1 -0
  33. package/dist/problem.js +94 -0
  34. package/dist/problem.js.map +1 -0
  35. package/dist/remote.d.ts +268 -0
  36. package/dist/remote.d.ts.map +1 -0
  37. package/dist/remote.js +267 -0
  38. package/dist/remote.js.map +1 -0
  39. package/dist/routes.d.ts +273 -0
  40. package/dist/routes.d.ts.map +1 -0
  41. package/dist/routes.js +302 -0
  42. package/dist/routes.js.map +1 -0
  43. package/dist/seats.d.ts +529 -0
  44. package/dist/seats.d.ts.map +1 -0
  45. package/dist/seats.js +266 -0
  46. package/dist/seats.js.map +1 -0
  47. package/dist/session.d.ts +135 -0
  48. package/dist/session.d.ts.map +1 -0
  49. package/dist/session.js +143 -0
  50. package/dist/session.js.map +1 -0
  51. package/fixtures/v1/billing/balance-owed.json +16 -0
  52. package/fixtures/v1/billing/balance.json +16 -0
  53. package/fixtures/v1/billing/entitlements-free.json +34 -0
  54. package/fixtures/v1/billing/hosted-page.json +3 -0
  55. package/fixtures/v1/billing/nudge.json +9 -0
  56. package/fixtures/v1/billing/price-list.json +13 -0
  57. package/fixtures/v1/billing/statement.json +5 -0
  58. package/fixtures/v1/billing/usage-by-model.json +21 -0
  59. package/fixtures/v1/connections/catalog.json +12 -0
  60. package/fixtures/v1/connections/events-ack.json +3 -0
  61. package/fixtures/v1/connections/events-pull.json +16 -0
  62. package/fixtures/v1/connections/execution.json +12 -0
  63. package/fixtures/v1/connections/list.json +16 -0
  64. package/fixtures/v1/connections/usage.json +16 -0
  65. package/fixtures/v1/index.json +58 -0
  66. package/fixtures/v1/inference/models.json +17 -0
  67. package/fixtures/v1/inference/token-revoke.json +3 -0
  68. package/fixtures/v1/inference/token.json +14 -0
  69. package/fixtures/v1/instances/heartbeat.json +5 -0
  70. package/fixtures/v1/instances/list.json +15 -0
  71. package/fixtures/v1/instances/revoke.json +3 -0
  72. package/fixtures/v1/problem/handle-tombstoned.json +6 -0
  73. package/fixtures/v1/problem/person-seat-required.json +7 -0
  74. package/fixtures/v1/problem/unauthenticated.json +7 -0
  75. package/fixtures/v1/remote/address.json +5 -0
  76. package/fixtures/v1/remote/command-keepalive.json +4 -0
  77. package/fixtures/v1/remote/command-open.json +6 -0
  78. package/fixtures/v1/remote/commands-ack.json +3 -0
  79. package/fixtures/v1/remote/credential.json +7 -0
  80. package/fixtures/v1/remote/custom-address.json +12 -0
  81. package/fixtures/v1/remote/designation.json +5 -0
  82. package/fixtures/v1/remote/enrolment.json +5 -0
  83. package/fixtures/v1/remote/events.json +3 -0
  84. package/fixtures/v1/remote/open.json +5 -0
  85. package/fixtures/v1/remote/status-closed.json +7 -0
  86. package/fixtures/v1/remote/status-open.json +10 -0
  87. package/fixtures/v1/remote/wake-token.json +5 -0
  88. package/fixtures/v1/seats/addons.json +11 -0
  89. package/fixtures/v1/seats/agent.json +9 -0
  90. package/fixtures/v1/seats/grants.json +20 -0
  91. package/fixtures/v1/seats/inbox-browse.json +17 -0
  92. package/fixtures/v1/seats/inbox-pull.json +17 -0
  93. package/fixtures/v1/seats/invitation.json +9 -0
  94. package/fixtures/v1/seats/members.json +12 -0
  95. package/fixtures/v1/seats/org.json +7 -0
  96. package/fixtures/v1/seats/presence.json +6 -0
  97. package/fixtures/v1/seats/seat.json +21 -0
  98. package/fixtures/v1/session/account-export.json +6 -0
  99. package/fixtures/v1/session/device-code.json +8 -0
  100. package/fixtures/v1/session/device-token-pending.json +4 -0
  101. package/fixtures/v1/session/device-token.json +7 -0
  102. package/fixtures/v1/session/signed-in.json +14 -0
  103. package/fixtures/v1/session/signed-out.json +4 -0
  104. package/package.json +58 -0
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "plv_0001",
3
+ "effectiveFrom": "2026-09-15T12:00:00.000Z",
4
+ "entries": [
5
+ {
6
+ "modelId": "md_opaque_0001",
7
+ "displayName": "the model shown in your usage page",
8
+ "unit": "megatoken",
9
+ "inputMicro": "3000000",
10
+ "outputMicro": "15000000"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "period": "2026-08",
3
+ "downloadUrl": "https://example.invalid/statements/abc123.pdf",
4
+ "expiresAt": "2026-10-15T12:00:00.000Z"
5
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "from": "2026-09-15T12:00:00.000Z",
3
+ "to": "2026-10-15T12:00:00.000Z",
4
+ "groupBy": "model",
5
+ "state": "active",
6
+ "rows": [
7
+ {
8
+ "key": "md_opaque_0001",
9
+ "displayName": "the model shown in your usage page",
10
+ "units": 128000,
11
+ "unit": "tokens",
12
+ "listPriceMicro": "4200",
13
+ "dorkosPriceMicro": "4620",
14
+ "costBasis": "published_price"
15
+ }
16
+ ],
17
+ "totals": {
18
+ "listPriceMicro": "4200",
19
+ "dorkosPriceMicro": "4620"
20
+ }
21
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "toolkit": "tk_0001",
5
+ "displayName": "A toolkit",
6
+ "description": "Does a thing.",
7
+ "authentication": "oauth2",
8
+ "version": "v_0001"
9
+ }
10
+ ],
11
+ "nextCursor": "cur_0002"
12
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "acknowledged": 1
3
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "evt_0001",
5
+ "leaseToken": "lt_0001",
6
+ "connectionId": "conn_0001",
7
+ "toolkit": "tk_0001",
8
+ "event": "ev_0001",
9
+ "receivedAt": "2026-09-15T12:00:00.000Z",
10
+ "expiresAt": "2026-10-15T12:00:00.000Z",
11
+ "payload": {
12
+ "kind": "example"
13
+ }
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "attemptId": "att_0001",
3
+ "connectionId": "conn_0001",
4
+ "operation": "op_0001",
5
+ "status": "succeeded",
6
+ "startedAt": "2026-09-15T12:00:00.000Z",
7
+ "completedAt": "2026-09-15T12:00:00.000Z",
8
+ "output": {
9
+ "ok": true
10
+ },
11
+ "failure": null
12
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "conn_0001",
5
+ "toolkit": "tk_0001",
6
+ "displayName": "A toolkit",
7
+ "status": "active",
8
+ "orgId": "org_0001",
9
+ "seatId": "seat_0001",
10
+ "createdAt": "2026-09-15T12:00:00.000Z",
11
+ "expiresAt": null,
12
+ "lastUsedAt": "2026-09-15T12:00:00.000Z"
13
+ }
14
+ ],
15
+ "nextCursor": null
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "periodStart": "2026-09-15T12:00:00.000Z",
3
+ "periodEnd": "2026-10-15T12:00:00.000Z",
4
+ "rows": [
5
+ {
6
+ "connectionId": "conn_0001",
7
+ "toolkit": "tk_0001",
8
+ "actions": 12,
9
+ "events": 3
10
+ }
11
+ ],
12
+ "totals": {
13
+ "actions": 12,
14
+ "events": 3
15
+ }
16
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "wireVersion": 1,
3
+ "description": "Conformance fixtures for the DorkOS Cloud /v1 wire contract. Each key is a fixture path relative to this file; each value names the exported schema from @dork-labs/cloud-api that validates it. Every example is synthetic: example.invalid hosts, opaque identifiers, and no real catalog value anywhere.",
4
+ "fixtures": {
5
+ "problem/unauthenticated.json": "ProblemSchema",
6
+ "problem/person-seat-required.json": "ProblemSchema",
7
+ "problem/handle-tombstoned.json": "ProblemSchema",
8
+ "session/signed-in.json": "SessionSchema",
9
+ "session/signed-out.json": "SessionSchema",
10
+ "session/device-code.json": "DeviceCodeResponseSchema",
11
+ "session/device-token-pending.json": "DeviceTokenErrorSchema",
12
+ "session/device-token.json": "DeviceTokenResponseSchema",
13
+ "session/account-export.json": "AccountExportResponseSchema",
14
+ "instances/list.json": "InstanceListResponseSchema",
15
+ "instances/heartbeat.json": "InstanceHeartbeatResponseSchema",
16
+ "instances/revoke.json": "InstanceRevokeResponseSchema",
17
+ "connections/catalog.json": "ConnectionCatalogResponseSchema",
18
+ "connections/list.json": "ConnectionListResponseSchema",
19
+ "connections/events-pull.json": "ConnectionEventPullResponseSchema",
20
+ "connections/events-ack.json": "ConnectionEventAckResponseSchema",
21
+ "connections/execution.json": "ExecutionSchema",
22
+ "connections/usage.json": "ConnectionUsageResponseSchema",
23
+ "billing/entitlements-free.json": "EntitlementsSchema",
24
+ "billing/balance.json": "BalanceSchema",
25
+ "billing/balance-owed.json": "BalanceSchema",
26
+ "billing/usage-by-model.json": "UsageResponseSchema",
27
+ "billing/price-list.json": "PriceListResponseSchema",
28
+ "billing/nudge.json": "NudgeSchema",
29
+ "billing/hosted-page.json": "HostedPageResponseSchema",
30
+ "billing/statement.json": "StatementResponseSchema",
31
+ "inference/token.json": "InferenceTokenSchema",
32
+ "inference/models.json": "InferenceModelsResponseSchema",
33
+ "inference/token-revoke.json": "InferenceTokenRevokeResponseSchema",
34
+ "seats/org.json": "OrgSchema",
35
+ "seats/members.json": "MemberListResponseSchema",
36
+ "seats/invitation.json": "InvitationSchema",
37
+ "seats/agent.json": "AgentSchema",
38
+ "seats/seat.json": "SeatSchema",
39
+ "seats/grants.json": "GrantListResponseSchema",
40
+ "seats/addons.json": "AddonListResponseSchema",
41
+ "seats/inbox-pull.json": "InboxPullResponseSchema",
42
+ "seats/inbox-browse.json": "InboxBrowseResponseSchema",
43
+ "seats/presence.json": "PresenceSchema",
44
+ "remote/status-open.json": "RemoteStatusSchema",
45
+ "remote/status-closed.json": "RemoteStatusSchema",
46
+ "remote/open.json": "RemoteOpenResponseSchema",
47
+ "remote/wake-token.json": "RemoteWakeTokenSchema",
48
+ "remote/enrolment.json": "RemoteEnrolmentSchema",
49
+ "remote/address.json": "RemoteAddressSchema",
50
+ "remote/custom-address.json": "RemoteCustomAddressSchema",
51
+ "remote/designation.json": "RemoteDesignationSchema",
52
+ "remote/credential.json": "RemoteCredentialSchema",
53
+ "remote/command-open.json": "RemoteCommandSchema",
54
+ "remote/command-keepalive.json": "RemoteCommandSchema",
55
+ "remote/commands-ack.json": "RemoteCommandAckResponseSchema",
56
+ "remote/events.json": "RemoteEventBatchResponseSchema"
57
+ }
58
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "catalogVersion": "cv_0001",
3
+ "models": [
4
+ {
5
+ "id": "md_opaque_0001",
6
+ "displayName": "the model shown in your usage page",
7
+ "contextWindow": 200000,
8
+ "maxOutputTokens": 64000,
9
+ "supports": {
10
+ "tools": true,
11
+ "promptCaching": true,
12
+ "streaming": true,
13
+ "thinking": false
14
+ }
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "revoked": true
3
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "tokenId": "it_0001",
3
+ "token": "itv_0001_opaque",
4
+ "expiresAt": "2026-10-15T12:00:00.000Z",
5
+ "endpoints": {
6
+ "anthropicMessages": "https://example.invalid/proxy/v1/messages",
7
+ "openaiChat": "https://example.invalid/proxy/v1/chat/completions"
8
+ },
9
+ "limits": {
10
+ "concurrentStreams": 4,
11
+ "requestsPerMinute": 120
12
+ },
13
+ "catalogVersion": "cv_0001"
14
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "acknowledgedAt": "2026-09-15T12:00:00.000Z",
3
+ "nextHeartbeatAfterMs": 60000,
4
+ "revoked": false
5
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "inst_0001",
5
+ "orgId": "org_0001",
6
+ "displayName": "Studio laptop",
7
+ "appVersion": "0.75.1",
8
+ "platform": "darwin-arm64",
9
+ "firstSeenAt": "2026-09-15T12:00:00.000Z",
10
+ "lastSeenAt": "2026-09-15T12:00:00.000Z",
11
+ "revokedAt": null
12
+ }
13
+ ],
14
+ "nextCursor": null
15
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "revokedAt": "2026-09-15T12:00:00.000Z"
3
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "code": "handle_tombstoned",
3
+ "status": 409,
4
+ "title": "That handle is not available yet.",
5
+ "freesAt": "2026-10-15T12:00:00.000Z"
6
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "code": "person_seat_required",
3
+ "status": 403,
4
+ "title": "This needs a person seat.",
5
+ "requiredPlanId": "pl_opaque_0001",
6
+ "requiredPlanDisplayName": "the subscription shown in your billing page"
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "code": "unauthenticated",
3
+ "status": 401,
4
+ "title": "Sign in to continue.",
5
+ "detail": "No bearer token was presented.",
6
+ "instance": "req_0a1b2c3d"
7
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "address": "example-instance.remote.invalid",
3
+ "host": "remote.invalid",
4
+ "kind": "canonical"
5
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "kind": "keepalive",
3
+ "id": "cmd_0002"
4
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "kind": "open",
3
+ "id": "cmd_0001",
4
+ "leaseToken": "lt_0003",
5
+ "wakeId": "wk_0001"
6
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "acknowledged": 2
3
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "issuanceId": "iss_0001",
3
+ "credentialId": "cred_0001",
4
+ "value": "crv_0001_opaque",
5
+ "fingerprint": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
6
+ "acl": ["tunnel:connect"]
7
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "hostname": "agents.example.invalid",
3
+ "status": "pending_verification",
4
+ "verification": {
5
+ "recordName": "_dorkos-challenge.agents.example.invalid",
6
+ "recordValue": "v=dorkos1 token=abc123"
7
+ },
8
+ "certificate": {
9
+ "state": "pending",
10
+ "renewsAt": null
11
+ }
12
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "instanceId": "inst_0001",
3
+ "effectiveAt": "2026-09-15T12:00:00.000Z",
4
+ "cooldownUntil": "2026-10-15T12:00:00.000Z"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "enrolmentId": "enr_0001",
3
+ "consentVersion": "2026-09-01",
4
+ "enrolledAt": "2026-09-15T12:00:00.000Z"
5
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "accepted": 7
3
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "wakeId": "wk_0001",
3
+ "state": "opening",
4
+ "pollAfterMs": 1500
5
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "mode": "managed",
3
+ "state": "closed",
4
+ "address": "example-instance.remote.invalid",
5
+ "alwaysAvailable": false,
6
+ "reason": "idle"
7
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "mode": "managed",
3
+ "state": "open",
4
+ "address": "example-instance.remote.invalid",
5
+ "url": "https://example-instance.remote.invalid",
6
+ "openedAt": "2026-09-15T12:00:00.000Z",
7
+ "idleClosesAt": "2026-10-15T12:00:00.000Z",
8
+ "lastActivityAt": "2026-09-15T12:00:00.000Z",
9
+ "alwaysAvailable": false
10
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "token": "wt_0001_opaque",
3
+ "expiresAt": "2026-10-15T12:00:00.000Z",
4
+ "singleUse": true
5
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "addons": [
3
+ {
4
+ "id": "ao_0001",
5
+ "seatId": "seat_0001",
6
+ "kind": "ak_opaque_0001",
7
+ "status": "attached",
8
+ "attachedAt": "2026-09-15T12:00:00.000Z"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "id": "agt_0001",
3
+ "orgId": "org_0001",
4
+ "ownerMemberId": "mem_0001",
5
+ "displayName": "Nightly reviewer",
6
+ "emoji": "🦉",
7
+ "color": "#4f46e5",
8
+ "createdAt": "2026-09-15T12:00:00.000Z"
9
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "grants": [
3
+ {
4
+ "id": "gr_0001",
5
+ "seatId": "seat_0001",
6
+ "granteeKind": "org",
7
+ "granteeRef": "org_0001",
8
+ "capability": "address",
9
+ "effect": "allow"
10
+ },
11
+ {
12
+ "id": "gr_0002",
13
+ "seatId": "seat_0001",
14
+ "granteeKind": "public",
15
+ "granteeRef": null,
16
+ "capability": "trigger",
17
+ "effect": "deny"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "ibx_0001",
5
+ "receivedAt": "2026-09-15T12:00:00.000Z",
6
+ "expiresAt": "2026-10-15T12:00:00.000Z",
7
+ "sourceKind": "a2a",
8
+ "sourceRef": "dork:example-org/owl",
9
+ "envelope": {
10
+ "subject": "A message"
11
+ },
12
+ "bodyUrl": "https://example.invalid/inbox/ibx_0001/body",
13
+ "sizeBytes": 2048
14
+ }
15
+ ],
16
+ "nextCursor": null
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "ibx_0001",
5
+ "leaseToken": "lt_0002",
6
+ "receivedAt": "2026-09-15T12:00:00.000Z",
7
+ "expiresAt": "2026-10-15T12:00:00.000Z",
8
+ "sourceKind": "email",
9
+ "sourceRef": "sender@example.invalid",
10
+ "envelope": {
11
+ "subject": "A message"
12
+ },
13
+ "bodyUrl": "https://example.invalid/inbox/ibx_0001/body",
14
+ "sizeBytes": 2048
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "id": "inv_0001",
3
+ "orgId": "org_0001",
4
+ "email": "person@example.invalid",
5
+ "role": "member",
6
+ "status": "pending",
7
+ "expiresAt": "2026-10-15T12:00:00.000Z",
8
+ "createdAt": "2026-09-15T12:00:00.000Z"
9
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "mem_0001",
5
+ "orgId": "org_0001",
6
+ "userId": "acct_0001",
7
+ "role": "owner",
8
+ "createdAt": "2026-09-15T12:00:00.000Z"
9
+ }
10
+ ],
11
+ "nextCursor": null
12
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "id": "org_0001",
3
+ "slug": "example-org",
4
+ "name": "Example Org",
5
+ "kind": "org",
6
+ "createdAt": "2026-09-15T12:00:00.000Z"
7
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "seatId": "seat_0001",
3
+ "state": "reachable",
4
+ "lastSeenAt": "2026-09-15T12:00:00.000Z",
5
+ "source": "cloud-link"
6
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "id": "seat_0001",
3
+ "orgId": "org_0001",
4
+ "kind": "agent",
5
+ "status": "assigned",
6
+ "subject": {
7
+ "kind": "agent",
8
+ "id": "agt_0001"
9
+ },
10
+ "address": {
11
+ "id": "addr_0001",
12
+ "orgId": "org_0001",
13
+ "seatId": "seat_0001",
14
+ "handle": "owl",
15
+ "canonical": "dork:example-org/owl",
16
+ "status": "active",
17
+ "issuedAt": "2026-09-15T12:00:00.000Z"
18
+ },
19
+ "createdAt": "2026-09-15T12:00:00.000Z",
20
+ "assignedAt": "2026-09-15T12:00:00.000Z"
21
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "exportId": "exp_0001",
3
+ "requestedAt": "2026-09-15T12:00:00.000Z",
4
+ "readyAt": null,
5
+ "downloadUrl": null
6
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "device_code": "dc_0001_opaque",
3
+ "user_code": "ABCD-EFGH",
4
+ "verification_uri": "https://example.invalid/activate",
5
+ "verification_uri_complete": "https://example.invalid/activate?user_code=ABCD-EFGH",
6
+ "expires_in": 900,
7
+ "interval": 5
8
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "error": "authorization_pending",
3
+ "error_description": "The person has not approved this device yet."
4
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "access_token": "at_0001_opaque",
3
+ "token_type": "Bearer",
4
+ "expires_in": 3600,
5
+ "refresh_token": "rt_0001_opaque",
6
+ "scope": "account:read instances:write"
7
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "authenticated": true,
3
+ "account": {
4
+ "id": "acct_0001",
5
+ "email": "person@example.invalid",
6
+ "displayName": "A Person",
7
+ "createdAt": "2026-09-15T12:00:00.000Z"
8
+ },
9
+ "instanceId": "inst_0001",
10
+ "orgId": "org_0001",
11
+ "seatId": "seat_0001",
12
+ "scopes": ["account:read", "instances:read", "billing:read"],
13
+ "expiresAt": "2026-10-15T12:00:00.000Z"
14
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "authenticated": false,
3
+ "scopes": []
4
+ }
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@dork-labs/cloud-api",
3
+ "version": "0.75.1",
4
+ "description": "The public wire contract for DorkOS Cloud: Zod schemas for the /v1 surface, plus a thin fetch client.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/dork-labs/dorkos.git",
9
+ "directory": "packages/cloud-api"
10
+ },
11
+ "homepage": "https://github.com/dork-labs/dorkos/tree/main/packages/cloud-api#readme",
12
+ "type": "module",
13
+ "sideEffects": false,
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "default": "./dist/index.js"
21
+ },
22
+ "./client": {
23
+ "types": "./dist/client.d.ts",
24
+ "default": "./dist/client.js"
25
+ },
26
+ "./fixtures/v1/*.json": "./fixtures/v1/*.json",
27
+ "./package.json": "./package.json"
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "fixtures",
32
+ "README.md",
33
+ "LICENSE"
34
+ ],
35
+ "scripts": {
36
+ "build": "tsc -p tsconfig.build.json",
37
+ "prepublishOnly": "pnpm run build",
38
+ "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
39
+ "typecheck": "tsc --noEmit",
40
+ "test": "vitest run",
41
+ "lint": "eslint ."
42
+ },
43
+ "peerDependencies": {
44
+ "zod": "^4.6.2"
45
+ },
46
+ "devDependencies": {
47
+ "@dorkos/eslint-config": "workspace:*",
48
+ "@dorkos/typescript-config": "workspace:*",
49
+ "typescript": "^5.9.3",
50
+ "vitest": "^4.1.11",
51
+ "zod": "^4.6.2"
52
+ },
53
+ "keywords": [
54
+ "dorkos",
55
+ "wire-contract",
56
+ "zod"
57
+ ]
58
+ }