@distilled.cloud/namespacelabs 0.0.0 → 1.0.0-rc.21

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 (219) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +130 -4
  3. package/lib/.lazy.json +1 -0
  4. package/lib/_bundle/lazy.js +4 -0
  5. package/lib/_bundle/sdk.js +2 -0
  6. package/lib/_bundle/sdk.js.map +1 -0
  7. package/lib/credentials.d.ts +73 -0
  8. package/lib/credentials.d.ts.map +1 -0
  9. package/lib/credentials.js +1 -0
  10. package/lib/errors.d.ts +59 -0
  11. package/lib/errors.d.ts.map +1 -0
  12. package/lib/errors.js +1 -0
  13. package/lib/index.d.ts +44 -0
  14. package/lib/index.d.ts.map +1 -0
  15. package/lib/index.js +6 -0
  16. package/lib/pagination.d.ts +2 -0
  17. package/lib/pagination.d.ts.map +1 -0
  18. package/lib/pagination.js +1 -0
  19. package/lib/protocol.d.ts +19 -0
  20. package/lib/protocol.d.ts.map +1 -0
  21. package/lib/protocol.js +1 -0
  22. package/lib/retry.d.ts +12 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +1 -0
  25. package/lib/services/buildkite_jobs.d.ts +129 -0
  26. package/lib/services/buildkite_jobs.d.ts.map +1 -0
  27. package/lib/services/buildkite_jobs.js +2 -0
  28. package/lib/services/buildkite_jobs.js.map +1 -0
  29. package/lib/services/buildkite_queue.d.ts +186 -0
  30. package/lib/services/buildkite_queue.d.ts.map +1 -0
  31. package/lib/services/buildkite_queue.js +2 -0
  32. package/lib/services/buildkite_queue.js.map +1 -0
  33. package/lib/services/index.d.ts +3 -0
  34. package/lib/services/index.d.ts.map +1 -0
  35. package/lib/services/index.js +2 -0
  36. package/lib/services.lazy/buildkite_jobs.js +1 -0
  37. package/lib/services.lazy/buildkite_queue.js +1 -0
  38. package/lib/services.lazy/index.js +3 -0
  39. package/lib/traits.d.ts +3 -0
  40. package/lib/traits.d.ts.map +1 -0
  41. package/lib/traits.js +1 -0
  42. package/lib/unstable-services/artifacts.d.ts +268 -0
  43. package/lib/unstable-services/artifacts.d.ts.map +1 -0
  44. package/lib/unstable-services/artifacts.js +2 -0
  45. package/lib/unstable-services/artifacts.js.map +1 -0
  46. package/lib/unstable-services/audit.d.ts +157 -0
  47. package/lib/unstable-services/audit.d.ts.map +1 -0
  48. package/lib/unstable-services/audit.js +2 -0
  49. package/lib/unstable-services/audit.js.map +1 -0
  50. package/lib/unstable-services/bazel.d.ts +181 -0
  51. package/lib/unstable-services/bazel.d.ts.map +1 -0
  52. package/lib/unstable-services/bazel.js +2 -0
  53. package/lib/unstable-services/bazel.js.map +1 -0
  54. package/lib/unstable-services/bazel_cache.d.ts +126 -0
  55. package/lib/unstable-services/bazel_cache.d.ts.map +1 -0
  56. package/lib/unstable-services/bazel_cache.js +2 -0
  57. package/lib/unstable-services/bazel_cache.js.map +1 -0
  58. package/lib/unstable-services/builder.d.ts +242 -0
  59. package/lib/unstable-services/builder.d.ts.map +1 -0
  60. package/lib/unstable-services/builder.js +2 -0
  61. package/lib/unstable-services/builder.js.map +1 -0
  62. package/lib/unstable-services/compute.d.ts +1124 -0
  63. package/lib/unstable-services/compute.d.ts.map +1 -0
  64. package/lib/unstable-services/compute.js +47 -0
  65. package/lib/unstable-services/compute.js.map +1 -0
  66. package/lib/unstable-services/compute_command.d.ts +120 -0
  67. package/lib/unstable-services/compute_command.d.ts.map +1 -0
  68. package/lib/unstable-services/compute_command.js +2 -0
  69. package/lib/unstable-services/compute_command.js.map +1 -0
  70. package/lib/unstable-services/compute_observability.d.ts +165 -0
  71. package/lib/unstable-services/compute_observability.d.ts.map +1 -0
  72. package/lib/unstable-services/compute_observability.js +2 -0
  73. package/lib/unstable-services/compute_observability.js.map +1 -0
  74. package/lib/unstable-services/compute_storage.d.ts +379 -0
  75. package/lib/unstable-services/compute_storage.d.ts.map +1 -0
  76. package/lib/unstable-services/compute_storage.js +33 -0
  77. package/lib/unstable-services/compute_storage.js.map +1 -0
  78. package/lib/unstable-services/compute_usage.d.ts +283 -0
  79. package/lib/unstable-services/compute_usage.d.ts.map +1 -0
  80. package/lib/unstable-services/compute_usage.js +2 -0
  81. package/lib/unstable-services/compute_usage.js.map +1 -0
  82. package/lib/unstable-services/egress.d.ts +191 -0
  83. package/lib/unstable-services/egress.d.ts.map +1 -0
  84. package/lib/unstable-services/egress.js +2 -0
  85. package/lib/unstable-services/egress.js.map +1 -0
  86. package/lib/unstable-services/experimental_compute_reservation.d.ts +672 -0
  87. package/lib/unstable-services/experimental_compute_reservation.d.ts.map +1 -0
  88. package/lib/unstable-services/experimental_compute_reservation.js +23 -0
  89. package/lib/unstable-services/experimental_compute_reservation.js.map +1 -0
  90. package/lib/unstable-services/experimental_remote_results.d.ts +496 -0
  91. package/lib/unstable-services/experimental_remote_results.d.ts.map +1 -0
  92. package/lib/unstable-services/experimental_remote_results.js +2 -0
  93. package/lib/unstable-services/experimental_remote_results.js.map +1 -0
  94. package/lib/unstable-services/github_image.d.ts +162 -0
  95. package/lib/unstable-services/github_image.d.ts.map +1 -0
  96. package/lib/unstable-services/github_image.js +2 -0
  97. package/lib/unstable-services/github_image.js.map +1 -0
  98. package/lib/unstable-services/github_jobs.d.ts +183 -0
  99. package/lib/unstable-services/github_jobs.d.ts.map +1 -0
  100. package/lib/unstable-services/github_jobs.js +2 -0
  101. package/lib/unstable-services/github_jobs.js.map +1 -0
  102. package/lib/unstable-services/github_profile.d.ts +296 -0
  103. package/lib/unstable-services/github_profile.d.ts.map +1 -0
  104. package/lib/unstable-services/github_profile.js +2 -0
  105. package/lib/unstable-services/github_profile.js.map +1 -0
  106. package/lib/unstable-services/gradle_cache.d.ts +125 -0
  107. package/lib/unstable-services/gradle_cache.d.ts.map +1 -0
  108. package/lib/unstable-services/gradle_cache.js +2 -0
  109. package/lib/unstable-services/gradle_cache.js.map +1 -0
  110. package/lib/unstable-services/httpcache.d.ts +125 -0
  111. package/lib/unstable-services/httpcache.d.ts.map +1 -0
  112. package/lib/unstable-services/httpcache.js +2 -0
  113. package/lib/unstable-services/httpcache.js.map +1 -0
  114. package/lib/unstable-services/iam_tenant.d.ts +457 -0
  115. package/lib/unstable-services/iam_tenant.d.ts.map +1 -0
  116. package/lib/unstable-services/iam_tenant.js +45 -0
  117. package/lib/unstable-services/iam_tenant.js.map +1 -0
  118. package/lib/unstable-services/iam_tenant_membership.d.ts +114 -0
  119. package/lib/unstable-services/iam_tenant_membership.d.ts.map +1 -0
  120. package/lib/unstable-services/iam_tenant_membership.js +2 -0
  121. package/lib/unstable-services/iam_tenant_membership.js.map +1 -0
  122. package/lib/unstable-services/iam_token.d.ts +257 -0
  123. package/lib/unstable-services/iam_token.d.ts.map +1 -0
  124. package/lib/unstable-services/iam_token.js +2 -0
  125. package/lib/unstable-services/iam_token.js.map +1 -0
  126. package/lib/unstable-services/image.d.ts +222 -0
  127. package/lib/unstable-services/image.d.ts.map +1 -0
  128. package/lib/unstable-services/image.js +2 -0
  129. package/lib/unstable-services/image.js.map +1 -0
  130. package/lib/unstable-services/index.d.ts +28 -0
  131. package/lib/unstable-services/index.d.ts.map +1 -0
  132. package/lib/unstable-services/index.js +27 -0
  133. package/lib/unstable-services/private_devbox.d.ts +1180 -0
  134. package/lib/unstable-services/private_devbox.d.ts.map +1 -0
  135. package/lib/unstable-services/private_devbox.js +81 -0
  136. package/lib/unstable-services/private_devbox.js.map +1 -0
  137. package/lib/unstable-services/private_user_sessions.d.ts +145 -0
  138. package/lib/unstable-services/private_user_sessions.d.ts.map +1 -0
  139. package/lib/unstable-services/private_user_sessions.js +2 -0
  140. package/lib/unstable-services/private_user_sessions.js.map +1 -0
  141. package/lib/unstable-services/registry.d.ts +373 -0
  142. package/lib/unstable-services/registry.d.ts.map +1 -0
  143. package/lib/unstable-services/registry.js +34 -0
  144. package/lib/unstable-services/registry.js.map +1 -0
  145. package/lib/unstable-services/testing.d.ts +160 -0
  146. package/lib/unstable-services/testing.d.ts.map +1 -0
  147. package/lib/unstable-services/testing.js +2 -0
  148. package/lib/unstable-services/testing.js.map +1 -0
  149. package/lib/unstable-services/vault.d.ts +203 -0
  150. package/lib/unstable-services/vault.d.ts.map +1 -0
  151. package/lib/unstable-services/vault.js +2 -0
  152. package/lib/unstable-services/vault.js.map +1 -0
  153. package/lib/unstable-services.lazy/artifacts.js +1 -0
  154. package/lib/unstable-services.lazy/audit.js +1 -0
  155. package/lib/unstable-services.lazy/bazel.js +1 -0
  156. package/lib/unstable-services.lazy/bazel_cache.js +1 -0
  157. package/lib/unstable-services.lazy/builder.js +1 -0
  158. package/lib/unstable-services.lazy/compute.js +4 -0
  159. package/lib/unstable-services.lazy/compute_command.js +1 -0
  160. package/lib/unstable-services.lazy/compute_observability.js +1 -0
  161. package/lib/unstable-services.lazy/compute_storage.js +4 -0
  162. package/lib/unstable-services.lazy/compute_usage.js +1 -0
  163. package/lib/unstable-services.lazy/egress.js +1 -0
  164. package/lib/unstable-services.lazy/experimental_compute_reservation.js +4 -0
  165. package/lib/unstable-services.lazy/experimental_remote_results.js +1 -0
  166. package/lib/unstable-services.lazy/github_image.js +1 -0
  167. package/lib/unstable-services.lazy/github_jobs.js +1 -0
  168. package/lib/unstable-services.lazy/github_profile.js +1 -0
  169. package/lib/unstable-services.lazy/gradle_cache.js +1 -0
  170. package/lib/unstable-services.lazy/httpcache.js +1 -0
  171. package/lib/unstable-services.lazy/iam_tenant.js +4 -0
  172. package/lib/unstable-services.lazy/iam_tenant_membership.js +1 -0
  173. package/lib/unstable-services.lazy/iam_token.js +1 -0
  174. package/lib/unstable-services.lazy/image.js +1 -0
  175. package/lib/unstable-services.lazy/index.js +3 -0
  176. package/lib/unstable-services.lazy/private_devbox.js +4 -0
  177. package/lib/unstable-services.lazy/private_user_sessions.js +1 -0
  178. package/lib/unstable-services.lazy/registry.js +4 -0
  179. package/lib/unstable-services.lazy/testing.js +1 -0
  180. package/lib/unstable-services.lazy/vault.js +1 -0
  181. package/package.json +89 -2
  182. package/src/credentials.ts +208 -0
  183. package/src/errors.ts +71 -0
  184. package/src/index.ts +50 -0
  185. package/src/pagination.ts +1 -0
  186. package/src/protocol.ts +83 -0
  187. package/src/retry.ts +28 -0
  188. package/src/services/buildkite_jobs.ts +230 -0
  189. package/src/services/buildkite_queue.ts +453 -0
  190. package/src/services/index.ts +3 -0
  191. package/src/traits.ts +36 -0
  192. package/src/unstable-services/artifacts.ts +769 -0
  193. package/src/unstable-services/audit.ts +323 -0
  194. package/src/unstable-services/bazel.ts +423 -0
  195. package/src/unstable-services/bazel_cache.ts +219 -0
  196. package/src/unstable-services/builder.ts +576 -0
  197. package/src/unstable-services/compute.ts +2991 -0
  198. package/src/unstable-services/compute_command.ts +220 -0
  199. package/src/unstable-services/compute_observability.ts +436 -0
  200. package/src/unstable-services/compute_storage.ts +1167 -0
  201. package/src/unstable-services/compute_usage.ts +738 -0
  202. package/src/unstable-services/egress.ts +516 -0
  203. package/src/unstable-services/experimental_compute_reservation.ts +1499 -0
  204. package/src/unstable-services/experimental_remote_results.ts +1165 -0
  205. package/src/unstable-services/github_image.ts +301 -0
  206. package/src/unstable-services/github_jobs.ts +389 -0
  207. package/src/unstable-services/github_profile.ts +729 -0
  208. package/src/unstable-services/gradle_cache.ts +271 -0
  209. package/src/unstable-services/httpcache.ts +271 -0
  210. package/src/unstable-services/iam_tenant.ts +1720 -0
  211. package/src/unstable-services/iam_tenant_membership.ts +253 -0
  212. package/src/unstable-services/iam_token.ts +788 -0
  213. package/src/unstable-services/image.ts +602 -0
  214. package/src/unstable-services/index.ts +28 -0
  215. package/src/unstable-services/private_devbox.ts +4256 -0
  216. package/src/unstable-services/private_user_sessions.ts +410 -0
  217. package/src/unstable-services/registry.ts +1242 -0
  218. package/src/unstable-services/testing.ts +394 -0
  219. package/src/unstable-services/vault.ts +522 -0
@@ -0,0 +1,114 @@
1
+ import * as API from "@distilled.cloud/core/api";
2
+ import * as S from "@distilled.cloud/core/schema-lite";
3
+ import { type NamespaceLabsOpError, type NamespaceLabsOpContext } from "../protocol.ts";
4
+ export type { NamespaceLabsOpError, NamespaceLabsOpContext };
5
+ declare const AlreadyExists_base: S.TaggedErrorClass<"AlreadyExists", {
6
+ readonly message: any;
7
+ readonly body: any;
8
+ readonly headers: any;
9
+ }> & (new (...args: any[]) => {
10
+ "@distilled.cloud/error/categories": {
11
+ ConflictError: true;
12
+ };
13
+ });
14
+ export declare class AlreadyExists extends /*@__PURE__*/ AlreadyExists_base {
15
+ }
16
+ declare const FailedPrecondition_base: S.TaggedErrorClass<"FailedPrecondition", {
17
+ readonly message: any;
18
+ readonly body: any;
19
+ readonly headers: any;
20
+ }> & (new (...args: any[]) => {
21
+ "@distilled.cloud/error/categories": {
22
+ BadRequestError: true;
23
+ };
24
+ });
25
+ export declare class FailedPrecondition extends /*@__PURE__*/ FailedPrecondition_base {
26
+ }
27
+ declare const InvalidArgument_base: S.TaggedErrorClass<"InvalidArgument", {
28
+ readonly message: any;
29
+ readonly body: any;
30
+ readonly headers: any;
31
+ }> & (new (...args: any[]) => {
32
+ "@distilled.cloud/error/categories": {
33
+ BadRequestError: true;
34
+ };
35
+ });
36
+ export declare class InvalidArgument extends /*@__PURE__*/ InvalidArgument_base {
37
+ }
38
+ declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
39
+ readonly message: any;
40
+ readonly body: any;
41
+ readonly headers: any;
42
+ }> & (new (...args: any[]) => {
43
+ "@distilled.cloud/error/categories": {
44
+ BadRequestError: true;
45
+ };
46
+ });
47
+ export declare class NotFound extends /*@__PURE__*/ NotFound_base {
48
+ }
49
+ declare const PermissionDenied_base: S.TaggedErrorClass<"PermissionDenied", {
50
+ readonly message: any;
51
+ readonly body: any;
52
+ readonly headers: any;
53
+ }> & (new (...args: any[]) => {
54
+ "@distilled.cloud/error/categories": {
55
+ AuthError: true;
56
+ };
57
+ });
58
+ export declare class PermissionDenied extends /*@__PURE__*/ PermissionDenied_base {
59
+ }
60
+ declare const ResourceExhausted_base: S.TaggedErrorClass<"ResourceExhausted", {
61
+ readonly message: any;
62
+ readonly body: any;
63
+ readonly headers: any;
64
+ readonly retryAfter: any;
65
+ }> & (new (...args: any[]) => {
66
+ "@distilled.cloud/error/categories": {
67
+ ThrottlingError: true;
68
+ };
69
+ });
70
+ export declare class ResourceExhausted extends /*@__PURE__*/ ResourceExhausted_base {
71
+ }
72
+ declare const Unauthenticated_base: S.TaggedErrorClass<"Unauthenticated", {
73
+ readonly message: any;
74
+ readonly body: any;
75
+ readonly headers: any;
76
+ }> & (new (...args: any[]) => {
77
+ "@distilled.cloud/error/categories": {
78
+ AuthError: true;
79
+ };
80
+ });
81
+ export declare class Unauthenticated extends /*@__PURE__*/ Unauthenticated_base {
82
+ }
83
+ export interface ListTenantMembersRequest {
84
+ }
85
+ export type TenantMemberRole = "TENANT_MEMBER_ROLE_UNSPECIFIED" | "TENANT_MEMBER_ROLE_OWNER" | "TENANT_MEMBER_ROLE_EDITOR" | "TENANT_MEMBER_ROLE_ADMIN" | "TENANT_MEMBER_ROLE_READER" | "TENANT_MEMBER_ROLE_ACCOUNTANT";
86
+ export interface TenantMember {
87
+ /** The ID of the user. User IDs should be treated as opaque by clients. */
88
+ userId: string;
89
+ /** The user's first name. */
90
+ firstName: string;
91
+ /** The user's last name. */
92
+ lastName: string;
93
+ /** The user's email address. */
94
+ email: string;
95
+ /** The user's role in the tenant. */
96
+ role: TenantMemberRole;
97
+ }
98
+ export type TenantMemberList = Array<TenantMember>;
99
+ export interface ListTenantMembersResponse {
100
+ members: TenantMemberList;
101
+ }
102
+ export interface RemoveTenantMemberRequest {
103
+ /** The ID of the user to remove. */
104
+ userId?: string | undefined;
105
+ }
106
+ export interface RemoveTenantMemberResponse {
107
+ }
108
+ export type ListTenantMembersError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
109
+ /** Lists the members of the authenticated tenant. ### Authentication Requires a tenant token with the {"tenant/member", "list"} action permission. */
110
+ export declare const listTenantMembers: API.OperationMethod<ListTenantMembersRequest, ListTenantMembersResponse, ListTenantMembersError, NamespaceLabsOpContext>;
111
+ export type RemoveTenantMemberError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
112
+ /** Removes a non-owner member from the authenticated tenant. ### Authentication Requires a tenant token with the {"tenant/member", "remove"} action permission. */
113
+ export declare const removeTenantMember: API.OperationMethod<RemoveTenantMemberRequest, RemoveTenantMemberResponse, RemoveTenantMemberError, NamespaceLabsOpContext>;
114
+ //# sourceMappingURL=iam_tenant_membership.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam_tenant_membership.d.ts","sources":["../../src/unstable-services/iam_tenant_membership.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAGjD,OAAO,KAAK,CAAC,MAAM,mCAAmC,CAAC;AAGvD,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAMxB,YAAY,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,CAAC;;;;;;;;;;AAc7D,qBAAa,aACX,SAAQ,aAAa,CAAC,kBAOrB;CAAG;;;;;;;;;;AAEN,qBAAa,kBACX,SAAQ,aAAa,CAAC,uBAOrB;CAAG;;;;;;;;;;AAEN,qBAAa,eACX,SAAQ,aAAa,CAAC,oBAOrB;CAAG;;;;;;;;;;AAEN,qBAAa,QACX,SAAQ,aAAa,CAAC,aAOrB;CAAG;;;;;;;;;;AAEN,qBAAa,gBACX,SAAQ,aAAa,CAAC,qBAOrB;CAAG;;;;;;;;;;;AAEN,qBAAa,iBACX,SAAQ,aAAa,CAAC,sBAQrB;CAAG;;;;;;;;;;AAEN,qBAAa,eACX,SAAQ,aAAa,CAAC,oBAOrB;CAAG;AAEN,MAAM,WAAW,wBAAwB;CAAG;AAC5C,MAAM,MAAM,gBAAgB,GACxB,gCAAgC,GAChC,0BAA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hd as c,jd as l,kd as u,l as d,m as f,md as p,n as m,pd as h,protocol$NamespaceLabsProtocol as g,rd as _,retry$Retry as v,traits$Http as y,traits$applyErrorMatchers as b,wd as x,xd as S,ya as C,za as w}from"../_bundle/sdk.js";const T={system:`namespacelabs-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Namespacelabs`,service:`TenantMembershipService`,propagate:`w3c`};const E=/*@__PURE__*/ s(function AlreadyExists(t){return f(t,new.target,[`$7($6()("AlreadyExists",{message:$2,body:$3,headers:$5($4($2,$2))}).pipe($1),[{status:409,body:{"/code":"already_exists"}}])`,[_,e,l,h,c,x,p,b]])});const D=/*@__PURE__*/ s(function FailedPrecondition(e){return f(e,new.target,[`$7($6()("FailedPrecondition",{message:$2,body:$3,headers:$5($4($2,$2))}).pipe($1),[{status:400,body:{"/code":"failed_precondition"}}])`,[_,w,l,h,c,x,p,b]])});const O=/*@__PURE__*/ s(function InvalidArgument(e){return f(e,new.target,[`$7($6()("InvalidArgument",{message:$2,body:$3,headers:$5($4($2,$2))}).pipe($1),[{status:400,body:{"/code":"invalid_argument"}}])`,[_,w,l,h,c,x,p,b]])});const k=/*@__PURE__*/ s(function NotFound(e){return f(e,new.target,[`$7($6()("NotFound",{message:$2,body:$3,headers:$5($4($2,$2))}).pipe($1),[{status:404}])`,[_,w,l,h,c,x,p,b]])});const A=/*@__PURE__*/ s(function PermissionDenied(e){return f(e,new.target,[`$7($6()("PermissionDenied",{message:$2,body:$3,headers:$5($4($2,$2))}).pipe($1),[{status:403}])`,[_,C,l,h,c,x,p,b]])});const j=/*@__PURE__*/ s(function ResourceExhausted(e){return f(e,new.target,[`$8($7()("ResourceExhausted",{message:$2,body:$3,headers:$5($4($2,$2)),retryAfter:$5($6)}).pipe($1),[{status:429}])`,[_,t,l,h,c,x,r,p,b]])});const M=/*@__PURE__*/ s(function Unauthenticated(e){return f(e,new.target,[`$7($6()("Unauthenticated",{message:$2,body:$3,headers:$5($4($2,$2))}).pipe($1),[{status:401}])`,[_,C,l,h,c,x,p,b]])});const N=/*@__PURE__*/ m(e=>e===i?d(`TenantMember`,`{input:#1,output:#4,errors:[$6,$7,$8,$9,$10,$11,$12],serviceErrors:$13,protocol:$14,retry:$15,telemetry:$16,span:"List%s"};$3(>5)@"List%sRequest";$3(>6)@"%";$5(#2);$3(>7)@"List%sResponse";$2({}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.%shipService/List%s",code:200}));$2({userId:$4,firstName:$4,lastName:$4,email:$4,role:$4});$2({members:#3})`,[_,y,u,S,l,n,O,D,M,A,k,E,j,o,g,v,T]):a(N,e));const P=/*@__PURE__*/ m(e=>e===i?d(`RemoveTenantMember`,`{input:#1,output:#2,errors:[$6,$7,$8,$9,$10,$11,$12],serviceErrors:$13,protocol:$14,retry:$15,telemetry:$16,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({userId:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TenantMembershipService/%",code:200}));$4({})`,[_,y,l,x,u,S,O,D,M,A,k,E,j,o,g,v,T]):a(P,e));export{E as AlreadyExists,D as FailedPrecondition,O as InvalidArgument,k as NotFound,A as PermissionDenied,j as ResourceExhausted,M as Unauthenticated,N as listTenantMembers,P as removeTenantMember};
2
+ //# sourceMappingURL=iam_tenant_membership.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam_tenant_membership.js","names":["API.newError","__L.at","C.withConflictError","S.String","S.Unknown","S.Record","S.optional","S.TaggedError","T.applyErrorMatchers","C.withBadRequestError","C.withAuthError","C.withThrottlingError","S.Duration","API.D","API.named","T.Http","S.Struct","S.suspend","S.Array","Retry.Retry","API.call","withConflictError","withThrottlingError","Array","Duration","D","call","NamespaceLabsServiceErrors","error","Record","String","Struct","named","newError","TaggedError","op","Unknown","NamespaceLabsProtocol","at","Retry","Http","applyErrorMatchers","optional","suspend","withAuthError","withBadRequestError","TELEMETRY","AlreadyExists","i","FailedPrecondition","InvalidArgument","NotFound","PermissionDenied","ResourceExhausted","Unauthenticated","listTenantMembers","removeTenantMember"],"sources":["../../src/unstable-services/iam_tenant_membership.ts"],"mappings":"qUAiBA,MAAM8C,EAAY,CAChB,OAAQ,oBACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,gBACR,QAAS,0BACT,UAAW,KACb,EAEA,MAAaC,EAAmC,gBAAU,SAAS,cAAc,EAAa,CAC5F,OAAO/C,EAAagD,EAAG,WAAY,CAAC,+HAAgI,CAAC/C,EAAQC,EAAqBC,EAAUC,EAAWC,EAAUC,EAAYC,EAAeC,CAAoB,CAAC,CAAC,CACpR,CAAC,EAED,MAAayC,EAAwC,gBAAU,SAAS,mBAAmB,EAAa,CACtG,OAAOjD,EAAagD,EAAG,WAAY,CAAC,yIAA0I,CAAC/C,EAAQQ,EAAuBN,EAAUC,EAAWC,EAAUC,EAAYC,EAAeC,CAAoB,CAAC,CAAC,CAChS,CAAC,EAED,MAAa0C,EAAqC,gBAAU,SAAS,gBAAgB,EAAa,CAChG,OAAOlD,EAAagD,EAAG,WAAY,CAAC,mIAAoI,CAAC/C,EAAQQ,EAAuBN,EAAUC,EAAWC,EAAUC,EAAYC,EAAeC,CAAoB,CAAC,CAAC,CAC1R,CAAC,EAED,MAAa2C,EAA8B,gBAAU,SAAS,SAAS,EAAa,CAClF,OAAOnD,EAAagD,EAAG,WAAY,CAAC,0FAA2F,CAAC/C,EAAQQ,EAAuBN,EAAUC,EAAWC,EAAUC,EAAYC,EAAeC,CAAoB,CAAC,CAAC,CACjP,CAAC,EAED,MAAa4C,EAAsC,gBAAU,SAAS,iBAAiB,EAAa,CAClG,OAAOpD,EAAagD,EAAG,WAAY,CAAC,kGAAmG,CAAC/C,EAAQS,EAAiBP,EAAUC,EAAWC,EAAUC,EAAYC,EAAeC,CAAoB,CAAC,CAAC,CACnP,CAAC,EAED,MAAa6C,EAAuC,gBAAU,SAAS,kBAAkB,EAAa,CACpG,OAAOrD,EAAagD,EAAG,WAAY,CAAC,qHAAsH,CAAC/C,EAAQU,EAAuBR,EAAUC,EAAWC,EAAUC,EAAYM,EAAYL,EAAeC,CAAoB,CAAC,CAAC,CACxR,CAAC,EAED,MAAa8C,EAAqC,gBAAU,SAAS,gBAAgB,EAAa,CAChG,OAAOtD,EAAagD,EAAG,WAAY,CAAC,iGAAkG,CAAC/C,EAAQS,EAAiBP,EAAUC,EAAWC,EAAUC,EAAYC,EAAeC,CAAoB,CAAC,CAAC,CAClP,CAAC,EAyCD,MAAa+C,EAKK,gBAAQ,GAAgBP,IAAMnC,EAAQC,EAAU,eAAgB,yWAA0W,CAACb,EAAQc,EAAQC,EAAUC,EAAWd,EAAUe,EAASgC,EAAiBD,EAAoBK,EAAiBF,EAAkBD,EAAUJ,EAAeM,EAAmB1B,EAA4BU,EAAuBlB,EAAa2B,CAAS,CAAC,EAAI1B,EAASmC,EAAmBP,CAAC,CAAC,EAYrtB,MAAaQ,EAKK,gBAAQ,GAAgBR,IAAMnC,EAAQC,EAAU,qBAAsB,uRAAwR,CAACb,EAAQc,EAAQZ,EAAUG,EAAYU,EAAUC,EAAWiC,EAAiBD,EAAoBK,EAAiBF,EAAkBD,EAAUJ,EAAeM,EAAmB1B,EAA4BU,EAAuBlB,EAAa2B,CAAS,CAAC,EAAI1B,EAASoC,EAAoBR,CAAC,CAAC"}
@@ -0,0 +1,257 @@
1
+ import * as API from "@distilled.cloud/core/api";
2
+ import * as S from "@distilled.cloud/core/schema-lite";
3
+ import type * as Redacted from "effect/Redacted";
4
+ import { type NamespaceLabsOpError, type NamespaceLabsOpContext } from "../protocol.ts";
5
+ export type { NamespaceLabsOpError, NamespaceLabsOpContext };
6
+ declare const AlreadyExists_base: S.TaggedErrorClass<"AlreadyExists", {
7
+ readonly message: any;
8
+ readonly body: any;
9
+ readonly headers: any;
10
+ }> & (new (...args: any[]) => {
11
+ "@distilled.cloud/error/categories": {
12
+ ConflictError: true;
13
+ };
14
+ });
15
+ export declare class AlreadyExists extends /*@__PURE__*/ AlreadyExists_base {
16
+ }
17
+ declare const FailedPrecondition_base: S.TaggedErrorClass<"FailedPrecondition", {
18
+ readonly message: any;
19
+ readonly body: any;
20
+ readonly headers: any;
21
+ }> & (new (...args: any[]) => {
22
+ "@distilled.cloud/error/categories": {
23
+ BadRequestError: true;
24
+ };
25
+ });
26
+ export declare class FailedPrecondition extends /*@__PURE__*/ FailedPrecondition_base {
27
+ }
28
+ declare const InvalidArgument_base: S.TaggedErrorClass<"InvalidArgument", {
29
+ readonly message: any;
30
+ readonly body: any;
31
+ readonly headers: any;
32
+ }> & (new (...args: any[]) => {
33
+ "@distilled.cloud/error/categories": {
34
+ BadRequestError: true;
35
+ };
36
+ });
37
+ export declare class InvalidArgument extends /*@__PURE__*/ InvalidArgument_base {
38
+ }
39
+ declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
40
+ readonly message: any;
41
+ readonly body: any;
42
+ readonly headers: any;
43
+ }> & (new (...args: any[]) => {
44
+ "@distilled.cloud/error/categories": {
45
+ BadRequestError: true;
46
+ };
47
+ });
48
+ export declare class NotFound extends /*@__PURE__*/ NotFound_base {
49
+ }
50
+ declare const PermissionDenied_base: S.TaggedErrorClass<"PermissionDenied", {
51
+ readonly message: any;
52
+ readonly body: any;
53
+ readonly headers: any;
54
+ }> & (new (...args: any[]) => {
55
+ "@distilled.cloud/error/categories": {
56
+ AuthError: true;
57
+ };
58
+ });
59
+ export declare class PermissionDenied extends /*@__PURE__*/ PermissionDenied_base {
60
+ }
61
+ declare const ResourceExhausted_base: S.TaggedErrorClass<"ResourceExhausted", {
62
+ readonly message: any;
63
+ readonly body: any;
64
+ readonly headers: any;
65
+ readonly retryAfter: any;
66
+ }> & (new (...args: any[]) => {
67
+ "@distilled.cloud/error/categories": {
68
+ ThrottlingError: true;
69
+ };
70
+ });
71
+ export declare class ResourceExhausted extends /*@__PURE__*/ ResourceExhausted_base {
72
+ }
73
+ declare const Unauthenticated_base: S.TaggedErrorClass<"Unauthenticated", {
74
+ readonly message: any;
75
+ readonly body: any;
76
+ readonly headers: any;
77
+ }> & (new (...args: any[]) => {
78
+ "@distilled.cloud/error/categories": {
79
+ AuthError: true;
80
+ };
81
+ });
82
+ export declare class Unauthenticated extends /*@__PURE__*/ Unauthenticated_base {
83
+ }
84
+ export type RevokableTokenScope = "SCOPE_UNKNOWN" | "TENANT_SCOPE" | "TENANT_MEMBERSHIP_SCOPE";
85
+ export interface BatchRevokeRevokableTokenRequest {
86
+ /** Revoke tokens created before this timestamp. If not set, no time-based filtering is applied. */
87
+ before?: string | undefined;
88
+ /** Revoke tokens created by this actor_id (only applies to user actors). If not set, no actor-based filtering is applied. */
89
+ createdByActorId?: string | undefined;
90
+ /** Revoke tokens with the selected scope only. If not set, no scope-based filtering is applied. */
91
+ scope?: RevokableTokenScope | (string & {}) | undefined;
92
+ }
93
+ export type StringList = Array<string>;
94
+ export interface BatchRevokeRevokableTokenResponse {
95
+ /** The IDs of the tokens that were revoked (prefixed with "tok_"). */
96
+ revokedTokenIds: StringList;
97
+ }
98
+ export interface TenantTokenPolicy {
99
+ /** The policy type being set. Consult with the Namespace team on which controls can be applied per tenant token. */
100
+ policyType?: string | undefined;
101
+ /** The policy-specific value. It may be a string, number, or serialized message (e.g. JSON). */
102
+ value?: string | undefined;
103
+ }
104
+ export type TenantTokenPolicyList = Array<TenantTokenPolicy>;
105
+ /** Defines a permission grant on a resource. Permissions are used to restrict what a token is allowed to do. See https://namespace.so/docs/security/permissions for a list of available resource types and actions. */
106
+ export interface Permission {
107
+ /** The type of resource this permission applies to, e.g. "instance", "vault/object", "token/revokable". */
108
+ resourceType?: string | undefined;
109
+ /** The specific resource ID, or empty for all resources of this type. */
110
+ resourceId?: string | undefined;
111
+ /** The set of actions allowed on the resource, e.g. "create", "list", "describe". */
112
+ actions?: StringList | undefined;
113
+ }
114
+ export type PermissionList = Array<Permission>;
115
+ export interface AccessPolicy {
116
+ /** Grant a restricted set of permissions to this token. See https://namespace.so/docs/security/permissions for available permissions. */
117
+ grants?: PermissionList | undefined;
118
+ }
119
+ export interface CreateRevokableTokenRequest {
120
+ /** A unique name for the token within the tenant. Required. */
121
+ name?: string | undefined;
122
+ /** A human-readable description of the token's purpose. */
123
+ description?: string | undefined;
124
+ /** When the token should expire. Maximum expiration is 1 year from creation. May be omitted for membership-scoped tokens to create a token with unlimited duration. */
125
+ expiresAt?: string | undefined;
126
+ /** A set of policies that apply to this token. */
127
+ policies?: TenantTokenPolicyList | undefined;
128
+ /** Configure the access permissions available with this token. */
129
+ access?: AccessPolicy | undefined;
130
+ /** Allows restricting the scope of the issued token. */
131
+ scope?: RevokableTokenScope | (string & {}) | undefined;
132
+ }
133
+ export type RevokableTokenState = "STATE_UNKNOWN" | "ACTIVE" | "REVOKED" | "EXPIRED";
134
+ export interface RevokableToken {
135
+ /** The unique identifier for this token, prefixed with "tok_". This is used for revocation. */
136
+ tokenId: string;
137
+ /** The tenant this token belongs to. */
138
+ tenantId: string;
139
+ /** A unique name for the token within the tenant. */
140
+ name: string;
141
+ /** A human-readable description of the token's purpose. */
142
+ description: string;
143
+ /** When the token was created. */
144
+ createdAt?: string | undefined;
145
+ /** When the token expires. Tokens are implicitly invalid after this time. If omitted, the membership-scoped token has unlimited duration. */
146
+ expiresAt?: string | undefined;
147
+ /** If set, when the token was explicitly revoked. */
148
+ revokedAt?: string | undefined;
149
+ /** If set, the actor who revoked the token. */
150
+ revokedByActorId: string;
151
+ /** The actor who created this token. */
152
+ creatorActorId: string;
153
+ /** Indicates whether the token is bound to a particular membership, or tenant-wide. */
154
+ scope: RevokableTokenScope;
155
+ /** The permissions granted to this token. */
156
+ permissions: PermissionList;
157
+ /** The current state of the token. */
158
+ state: RevokableTokenState;
159
+ }
160
+ export interface CreateRevokableTokenResponse {
161
+ /** The bearer token that can be used for authentication. This value is only returned once at creation time and cannot be retrieved later. */
162
+ bearerToken: string | Redacted.Redacted<string>;
163
+ /** The token metadata, including the token_id (prefixed with "tok_") which can be used to revoke or list the token. */
164
+ token?: RevokableToken | undefined;
165
+ }
166
+ export interface IssueIdTokenRequest {
167
+ /** Target audience for the generated identity token. */
168
+ audience?: string | undefined;
169
+ }
170
+ export interface IssueIdTokenResponse {
171
+ /** The signed OIDC ID token. Use this token to authenticate with external services that trust the Namespace federation issuer (`https://federation.namespaceapis.com`). */
172
+ idToken: string | Redacted.Redacted<string>;
173
+ }
174
+ export interface IssueTenantTokenRequest {
175
+ /** Which tenant credentials should be produced for. */
176
+ tenantId?: string | undefined;
177
+ /** A integration-specified identifier that represents the user that is requesting these credentials. The actor identity is embedded into the verifiable claims of the resulting JWT. */
178
+ actorId?: string | undefined;
179
+ /** For how long should the resulting credentials be valid for. If not specified, a short-lived default is used (e.g 15mins). */
180
+ durationSecs?: string | undefined;
181
+ /** A set of policies that apply to this tenant token. */
182
+ policies?: TenantTokenPolicyList | undefined;
183
+ /** Configure the access permissions available with this token. */
184
+ access?: AccessPolicy | undefined;
185
+ }
186
+ export interface IssueTenantTokenResponse {
187
+ /** The tenant Bearer token. Pass this in the `Authorization: Bearer {token}` header when calling Namespace APIs. */
188
+ bearerToken: string | Redacted.Redacted<string>;
189
+ }
190
+ export interface IssueTenantTokenWithOIDCRequest {
191
+ /** Which tenant credentials should be produced for. */
192
+ tenantId?: string | undefined;
193
+ /** The OIDC token from a trusted external issuer. */
194
+ oidcToken?: string | Redacted.Redacted<string> | undefined;
195
+ /** For how long the resulting credentials should be valid. */
196
+ duration?: string | undefined;
197
+ }
198
+ export interface IssueTenantTokenWithOIDCResponse {
199
+ /** The tenant Bearer token. Pass this in the `Authorization: Bearer {token}` header when calling Namespace APIs. */
200
+ bearerToken: string | Redacted.Redacted<string>;
201
+ }
202
+ export interface ListRevokableTokensRequest {
203
+ /** If a previous response returned a `pagination_cursor`, it can be specified to continue reading results with the same arguments as the original call. */
204
+ paginationCursor?: string | undefined;
205
+ /** The maximum number of entries to return as part of this ListRevokableTokens request. A maximum number of entries may also be specified when `pagination_cursor` is set. We won't return more than `max_entries`, but may return fewer. */
206
+ maxEntries?: string | undefined;
207
+ /** If true, include revoked tokens in the results. */
208
+ includeRevoked?: boolean | undefined;
209
+ }
210
+ export type RevokableTokenList = Array<RevokableToken>;
211
+ export interface ListRevokableTokensResponse {
212
+ /** The list of revokable tokens. */
213
+ tokens: RevokableTokenList;
214
+ /** If set, there are additional results. Pass the same cursor to a subsequent ListRevokableTokens call to continue fetching results. */
215
+ paginationCursor: string;
216
+ }
217
+ export interface RefreshRevokableTokenRequest {
218
+ /** The unique identifier of the token to refresh, prefixed with "tok_". */
219
+ tokenId?: string | undefined;
220
+ /** Ensure the token remains valid for at least this much longer. Maximum duration is 1 year. */
221
+ minimumDuration?: string | undefined;
222
+ }
223
+ export interface RefreshRevokableTokenResponse {
224
+ /** The refreshed token metadata. */
225
+ token?: RevokableToken | undefined;
226
+ }
227
+ export interface RevokeRevokableTokenRequest {
228
+ /** The unique identifier of the token to revoke, prefixed with "tok_". */
229
+ tokenId?: string | undefined;
230
+ }
231
+ export interface RevokeRevokableTokenResponse {
232
+ }
233
+ export type BatchRevokeRevokableTokenError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
234
+ /** Batch revokes multiple revokable tokens based on filter criteria. At least one filter must be provided. ### Authentication Requires a tenant token with the {"token/revokable", "revoke"} action permission. ### Errors - If no filters are provided, an `InvalidArgument` status is returned. */
235
+ export declare const batchRevokeRevokableToken: API.OperationMethod<BatchRevokeRevokableTokenRequest, BatchRevokeRevokableTokenResponse, BatchRevokeRevokableTokenError, NamespaceLabsOpContext>;
236
+ export type CreateRevokableTokenError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
237
+ /** Creates a revokable token that returns a bearer token (prefixed with "nsrt_") and metadata (with token_id prefixed with "tok_"). Revokable tokens can be explicitly revoked and have a maximum expiration of 1 year when an expiration is set. Membership-scoped tokens may have no expiration and remain valid until revoked or the user loses tenant membership. ### Authentication Requires a tenant token with the {"token/revokable", "create"} action permission. ### Errors - If expiry is not provided for a tenant-scoped token or exceeds 1 year, an `InvalidArgument` status is returned. - If no policies are defined, an `InvalidArgument` status is returned. */
238
+ export declare const createRevokableToken: API.OperationMethod<CreateRevokableTokenRequest, CreateRevokableTokenResponse, CreateRevokableTokenError, NamespaceLabsOpContext>;
239
+ export type IssueIdTokenError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
240
+ /** Exchange a Namespace tenant token for an OIDC token for identity federation. The generated token identifies Namespace tenants with the provided target audience. ### Authentication Requires a tenant token with the {"federation", "issue_federation"} action permission. ### Errors - If no audience is provided, a `InvalidArgument` status is returned. */
241
+ export declare const issueIdToken: API.OperationMethod<IssueIdTokenRequest, IssueIdTokenResponse, IssueIdTokenError, NamespaceLabsOpContext>;
242
+ export type IssueTenantTokenError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
243
+ /** Produces credentials in the form of a Bearer token that grant access to the specified Tenant. The credentials provided to the `IssueTenantToken` call are validated to verify they are capable of requesting credentials. ### Authentication Requires a "partner token". */
244
+ export declare const issueTenantToken: API.OperationMethod<IssueTenantTokenRequest, IssueTenantTokenResponse, IssueTenantTokenError, NamespaceLabsOpContext>;
245
+ export type IssueTenantTokenWithOIDCError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
246
+ /** Produces credentials in the form of a Bearer token that grant access to the specified Tenant using an OIDC token from a trusted issuer. ### Authentication This call authenticates using the `oidc_token` provided in the request. */
247
+ export declare const issueTenantTokenWithOIDC: API.OperationMethod<IssueTenantTokenWithOIDCRequest, IssueTenantTokenWithOIDCResponse, IssueTenantTokenWithOIDCError, NamespaceLabsOpContext>;
248
+ export type ListRevokableTokensError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
249
+ /** Lists all revokable tokens for the authenticated tenant. ### Authentication Requires a tenant token with the {"token/revokable", "list"} action permission. */
250
+ export declare const listRevokableTokens: API.PaginatedOperationMethod<ListRevokableTokensRequest, ListRevokableTokensResponse, ListRevokableTokensError, NamespaceLabsOpContext, RevokableToken>;
251
+ export type RefreshRevokableTokenError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
252
+ /** Ensures a revokable token has at least the requested remaining lifetime. Refreshing does not return a new bearer token; it updates the existing token's expiry in place. ### Authentication Requires a tenant token with the {"token/revokable", "refresh"} action permission. ### Errors - If `minimum_duration` is missing, non-positive, or exceeds 1 year, an `InvalidArgument` status is returned. - If the token_id is not found or already revoked, a `NotFound` status is returned. - If the token has already expired, a `FailedPrecondition` status is returned. */
253
+ export declare const refreshRevokableToken: API.OperationMethod<RefreshRevokableTokenRequest, RefreshRevokableTokenResponse, RefreshRevokableTokenError, NamespaceLabsOpContext>;
254
+ export type RevokeRevokableTokenError = InvalidArgument | FailedPrecondition | Unauthenticated | PermissionDenied | NotFound | AlreadyExists | ResourceExhausted | NamespaceLabsOpError;
255
+ /** Revokes a revokable token by its token_id (prefixed with "tok_"), preventing the associated bearer token from being used for authentication. Records who revoked the token and when. ### Authentication Requires a tenant token with the {"token/revokable", "revoke"} action permission. ### Errors - If the token_id is not found or already revoked, a `NotFound` status is returned. */
256
+ export declare const revokeRevokableToken: API.OperationMethod<RevokeRevokableTokenRequest, RevokeRevokableTokenResponse, RevokeRevokableTokenError, NamespaceLabsOpContext>;
257
+ //# sourceMappingURL=iam_token.d.ts.map
@@ -0,0 +1 @@
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,Yc as r,_c as i,a,b as o,errors$NamespaceLabsServiceErrors as s,f as c,hd as l,jd as u,kd as d,l as f,m as p,md as m,n as h,o as g,pagination$paginateCursor as _,pd as v,protocol$NamespaceLabsProtocol as y,rd as b,retry$Retry as x,traits$Http as S,traits$SensitiveValue as C,traits$applyErrorMatchers as w,wd as T,xd as E,ya as D,za as O}from"../_bundle/sdk.js";const k={system:`namespacelabs-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Namespacelabs`,service:`TokenService`,propagate:`w3c`};const A=/*@__PURE__*/ c(function AlreadyExists(t){return p(t,new.target,[`$7($6()("AlreadyExists",{message:$2,body:$3,headers:$5($4($2,$2))}).pipe($1),[{status:409,body:{"/code":"already_exists"}}])`,[b,e,u,v,l,T,m,w]])});const j=/*@__PURE__*/ c(function FailedPrecondition(e){return p(e,new.target,[`$7($6()("FailedPrecondition",{message:$2,body:$3,headers:$5($4($2,$2))}).pipe($1),[{status:400,body:{"/code":"failed_precondition"}}])`,[b,O,u,v,l,T,m,w]])});const M=/*@__PURE__*/ c(function InvalidArgument(e){return p(e,new.target,[`$7($6()("InvalidArgument",{message:$2,body:$3,headers:$5($4($2,$2))}).pipe($1),[{status:400,body:{"/code":"invalid_argument"}}])`,[b,O,u,v,l,T,m,w]])});const N=/*@__PURE__*/ c(function NotFound(e){return p(e,new.target,[`$7($6()("NotFound",{message:$2,body:$3,headers:$5($4($2,$2))}).pipe($1),[{status:404}])`,[b,O,u,v,l,T,m,w]])});const P=/*@__PURE__*/ c(function PermissionDenied(e){return p(e,new.target,[`$7($6()("PermissionDenied",{message:$2,body:$3,headers:$5($4($2,$2))}).pipe($1),[{status:403}])`,[b,D,u,v,l,T,m,w]])});const F=/*@__PURE__*/ c(function ResourceExhausted(e){return p(e,new.target,[`$8($7()("ResourceExhausted",{message:$2,body:$3,headers:$5($4($2,$2)),retryAfter:$5($6)}).pipe($1),[{status:429}])`,[b,t,u,v,l,T,i,m,w]])});const I=/*@__PURE__*/ c(function Unauthenticated(e){return p(e,new.target,[`$7($6()("Unauthenticated",{message:$2,body:$3,headers:$5($4($2,$2))}).pipe($1),[{status:401}])`,[b,D,u,v,l,T,m,w]])});const L=/*@__PURE__*/ h(e=>e===a?f(`BatchRevokeRevokableToken`,`{input:#1,output:#2,errors:[$7,$8,$9,$10,$11,$12,$13],serviceErrors:$14,protocol:$15,retry:$16,telemetry:$17,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({before:$3($2),createdByActorId:$3($2),scope:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}));$4({revokedTokenIds:#6:0})`,[b,S,u,T,d,E,__d1,M,j,I,P,N,A,F,s,y,x,k]):o(L,e));const R=/*@__PURE__*/ h(e=>e===a?f(`CreateRevokableToken`,`{input:#1,output:#2,errors:[$9,$10,$11,$12,$13,$14,$15],serviceErrors:$16,protocol:$17,retry:$18,telemetry:$19,span:"%"};$6(>3)@"%Request";$6(>4)@"%Response";$5({name:$3($2),description:$3($2),expiresAt:$3($2),policies:$3(#4:1),access:$3(#4:2),scope:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}));$5({bearerToken:$2.pipe($7({})),token:$3(#8:0)})`,[b,S,u,T,__d2,d,E,C,__d4,M,j,I,P,N,A,F,s,y,x,k]):o(R,e));const z=/*@__PURE__*/ h(e=>e===a?f(`IssueIdToken`,`{input:#1,output:#2,errors:[$7,$8,$9,$10,$11,$12,$13],serviceErrors:$14,protocol:$15,retry:$16,telemetry:$17,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({audience:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}));$4({idToken:$2.pipe($6({}))})`,[b,S,u,T,d,E,C,M,j,I,P,N,A,F,s,y,x,k]):o(z,e));const B=/*@__PURE__*/ h(e=>e===a?f(`IssueTenantToken`,`{input:#1,output:#7:0,errors:[$8,$9,$10,$11,$12,$13,$14],serviceErrors:$15,protocol:$16,retry:$17,telemetry:$18,span:"%"};$6(>2)@"%Request";$5({tenantId:$3($2),actorId:$3($2),durationSecs:$3($2),policies:$3(#4:1),access:$3(#4:2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}))`,[b,S,u,T,__d2,d,E,__d0,M,j,I,P,N,A,F,s,y,x,k]):o(B,e));const V=/*@__PURE__*/ h(e=>e===a?f(`IssueTenantTokenWithOIDC`,`{input:#1,output:#7:0,errors:[$8,$9,$10,$11,$12,$13,$14],serviceErrors:$15,protocol:$16,retry:$17,telemetry:$18,span:"%"};$6(>2)@"%Request";$5({tenantId:$3($2),oidcToken:$3($2.pipe($4({}))),duration:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}))`,[b,S,u,T,C,d,E,__d0,M,j,I,P,N,A,F,s,y,x,k]):o(V,e));const H=/*@__PURE__*/ g(e=>e===a?f(`ListRevokableTokens`,`{input:#1,output:#3,errors:[$9,$10,$11,$12,$13,$14,$15],serviceErrors:$16,protocol:$17,retry:$18,telemetry:$19,span:"%",pagination:{mode:"cursor",inputToken:"paginationCursor",outputToken:"paginationCursor",items:"tokens"},strategy:$20};$6(>4)@"%Request";$8(#7:0);$6(>5)@"%Response";$5({paginationCursor:$3($2),maxEntries:$3($2),includeRevoked:$3($4)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}));$5({tokens:#2,paginationCursor:$2})`,[b,S,u,T,r,d,E,__d4,n,M,j,I,P,N,A,F,s,y,x,k,_]):o(H,e));const U=/*@__PURE__*/ h(e=>e===a?f(`RefreshRevokableToken`,`{input:#1,output:#2,errors:[$7,$8,$9,$10,$11,$12,$13],serviceErrors:$14,protocol:$15,retry:$16,telemetry:$17,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({tokenId:$3($2),minimumDuration:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}));$4({token:$3(#6:0)})`,[b,S,u,T,d,E,__d4,M,j,I,P,N,A,F,s,y,x,k]):o(U,e));const W=/*@__PURE__*/ h(e=>e===a?f(`RevokeRevokableToken`,`{input:#1,output:#2,errors:[$6,$7,$8,$9,$10,$11,$12],serviceErrors:$13,protocol:$14,retry:$15,telemetry:$16,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({tokenId:$3($2)}).pipe($1({method:"POST",uri:"/namespace.cloud.iam.v1beta.TokenService/%",code:200}));$4({})`,[b,S,u,T,d,E,M,j,I,P,N,A,F,s,y,x,k]):o(W,e));function __d0(){return[`$4(>1)@"IssueTenantTokenResponse";$3({bearerToken:$2.pipe($1({}))})`,[b,C,u,d,E]]}function __d1(){return[`$2($1)`,[b,u,n]]}function __d2(){return[`$4(>3)@"TenantTokenPolicy";$5(#0);$4(>4)@"AccessPolicy";$3({policyType:$2($1),value:$2($1)});$3({grants:$2(#6:1)})`,[b,u,T,d,E,n,__d3]]}function __d3(){return[`$5(>2)@"Permission";$6(#0);$4({resourceType:$2($1),resourceId:$2($1),actions:$2(#3:0)})`,[b,u,T,__d1,d,E,n]]}function __d4(){return[`$5(>1)@"RevokableToken";$4({tokenId:$1,tenantId:$1,name:$1,description:$1,createdAt:$2($1),expiresAt:$2($1),revokedAt:$2($1),revokedByActorId:$1,creatorActorId:$1,scope:$1,permissions:#3:1,state:$1})`,[b,u,T,__d3,d,E]]}export{A as AlreadyExists,j as FailedPrecondition,M as InvalidArgument,N as NotFound,P as PermissionDenied,F as ResourceExhausted,I as Unauthenticated,L as batchRevokeRevokableToken,R as createRevokableToken,z as issueIdToken,B as issueTenantToken,V as issueTenantTokenWithOIDC,H as listRevokableTokens,U as refreshRevokableToken,W as revokeRevokableToken};
2
+ //# sourceMappingURL=iam_token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam_token.js","names":["API.newError","__L.at","C.withConflictError","S.String","S.Unknown","S.Record","S.optional","S.TaggedError","T.applyErrorMatchers","C.withBadRequestError","C.withAuthError","C.withThrottlingError","S.Duration","API.D","API.named","T.Http","S.Struct","S.suspend","Retry.Retry","API.call","T.SensitiveValue","S.Boolean","S.Array","withConflictError","withThrottlingError","Array","Boolean","Duration","call","NamespaceLabsServiceErrors","error","Record","String","Struct","named","newError","TaggedError","op","opPaginated","paginateCursor","Unknown","NamespaceLabsProtocol","at","Retry","Http","SensitiveValue","applyErrorMatchers","optional","suspend","withAuthError","withBadRequestError","TELEMETRY","AlreadyExists","i","FailedPrecondition","InvalidArgument","NotFound","PermissionDenied","ResourceExhausted","Unauthenticated","batchRevokeRevokableToken","D","createRevokableToken","issueIdToken","issueTenantToken","issueTenantTokenWithOIDC","listRevokableTokens","refreshRevokableToken","revokeRevokableToken"],"sources":["../../src/unstable-services/iam_token.ts"],"mappings":"yYAmBA,MAAMmD,EAAY,CAChB,OAAQ,oBACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,gBACR,QAAS,eACT,UAAW,KACb,EAEA,MAAaC,EAAmC,gBAAU,SAAS,cAAc,EAAa,CAC5F,OAAOpD,EAAaqD,EAAG,WAAY,CAAC,+HAAgI,CAACpD,EAAQC,EAAqBC,EAAUC,EAAWC,EAAUC,EAAYC,EAAeC,CAAoB,CAAC,CAAC,CACpR,CAAC,EAED,MAAa8C,EAAwC,gBAAU,SAAS,mBAAmB,EAAa,CACtG,OAAOtD,EAAaqD,EAAG,WAAY,CAAC,yIAA0I,CAACpD,EAAQQ,EAAuBN,EAAUC,EAAWC,EAAUC,EAAYC,EAAeC,CAAoB,CAAC,CAAC,CAChS,CAAC,EAED,MAAa+C,EAAqC,gBAAU,SAAS,gBAAgB,EAAa,CAChG,OAAOvD,EAAaqD,EAAG,WAAY,CA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