@sylphx/sdk 0.28.0 → 0.31.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.
Files changed (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -114
  3. package/dist/access.d.ts +670 -0
  4. package/dist/access.js +640 -0
  5. package/dist/access.js.map +1 -0
  6. package/dist/ai.d.ts +176 -0
  7. package/dist/ai.js +112 -0
  8. package/dist/ai.js.map +1 -0
  9. package/dist/artifacts.d.ts +165 -0
  10. package/dist/artifacts.js +129 -0
  11. package/dist/artifacts.js.map +1 -0
  12. package/dist/auth/verify.d.ts +57 -0
  13. package/dist/auth/verify.js +157 -0
  14. package/dist/auth/verify.js.map +1 -0
  15. package/dist/auth.d.ts +896 -0
  16. package/dist/auth.js +828 -0
  17. package/dist/auth.js.map +1 -0
  18. package/dist/billing.d.ts +854 -0
  19. package/dist/billing.js +593 -0
  20. package/dist/billing.js.map +1 -0
  21. package/dist/broker.d.ts +226 -0
  22. package/dist/broker.js +187 -0
  23. package/dist/broker.js.map +1 -0
  24. package/dist/build.d.ts +313 -0
  25. package/dist/build.js +271 -0
  26. package/dist/build.js.map +1 -0
  27. package/dist/common.d.ts +162 -0
  28. package/dist/common.js +41 -0
  29. package/dist/common.js.map +1 -0
  30. package/dist/config.d.ts +198 -0
  31. package/dist/config.js +168 -0
  32. package/dist/config.js.map +1 -0
  33. package/dist/connections.d.ts +354 -0
  34. package/dist/connections.js +313 -0
  35. package/dist/connections.js.map +1 -0
  36. package/dist/data.d.ts +1141 -0
  37. package/dist/data.js +1082 -0
  38. package/dist/data.js.map +1 -0
  39. package/dist/entitlement.d.ts +179 -0
  40. package/dist/entitlement.js +117 -0
  41. package/dist/entitlement.js.map +1 -0
  42. package/dist/events.d.ts +1324 -0
  43. package/dist/events.js +1227 -0
  44. package/dist/events.js.map +1 -0
  45. package/dist/hosting.d.ts +709 -0
  46. package/dist/hosting.js +611 -0
  47. package/dist/hosting.js.map +1 -0
  48. package/dist/index.d.ts +79 -33656
  49. package/dist/index.js +113 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/keys.d.ts +438 -0
  52. package/dist/keys.js +406 -0
  53. package/dist/keys.js.map +1 -0
  54. package/dist/methods.d.ts +2 -0
  55. package/dist/methods.js +4200 -0
  56. package/dist/methods.js.map +1 -0
  57. package/dist/network.d.ts +733 -0
  58. package/dist/network.js +711 -0
  59. package/dist/network.js.map +1 -0
  60. package/dist/notify.d.ts +1753 -0
  61. package/dist/notify.js +1551 -0
  62. package/dist/notify.js.map +1 -0
  63. package/dist/observability.d.ts +509 -0
  64. package/dist/observability.js +437 -0
  65. package/dist/observability.js.map +1 -0
  66. package/dist/release.d.ts +303 -0
  67. package/dist/release.js +214 -0
  68. package/dist/release.js.map +1 -0
  69. package/dist/runners.d.ts +262 -0
  70. package/dist/runners.js +238 -0
  71. package/dist/runners.js.map +1 -0
  72. package/dist/runtime.d.ts +121 -0
  73. package/dist/runtime.js +305 -0
  74. package/dist/runtime.js.map +1 -0
  75. package/dist/sandboxes.d.ts +1705 -0
  76. package/dist/sandboxes.js +1226 -0
  77. package/dist/sandboxes.js.map +1 -0
  78. package/dist/secrets.d.ts +508 -0
  79. package/dist/secrets.js +474 -0
  80. package/dist/secrets.js.map +1 -0
  81. package/dist/workflows.d.ts +678 -0
  82. package/dist/workflows.js +595 -0
  83. package/dist/workflows.js.map +1 -0
  84. package/package.json +33 -112
  85. package/dist/connect.d.ts +0 -2838
  86. package/dist/connect.mjs +0 -220
  87. package/dist/connect.mjs.map +0 -1
  88. package/dist/health/index.d.ts +0 -1394
  89. package/dist/health/index.mjs +0 -1394
  90. package/dist/health/index.mjs.map +0 -1
  91. package/dist/index.mjs +0 -38429
  92. package/dist/index.mjs.map +0 -1
  93. package/dist/nextjs/index.d.ts +0 -724
  94. package/dist/nextjs/index.mjs +0 -3332
  95. package/dist/nextjs/index.mjs.map +0 -1
  96. package/dist/react/index.d.ts +0 -13066
  97. package/dist/react/index.mjs +0 -35329
  98. package/dist/react/index.mjs.map +0 -1
  99. package/dist/server/index.d.ts +0 -2000
  100. package/dist/server/index.mjs +0 -3446
  101. package/dist/server/index.mjs.map +0 -1
  102. package/dist/web-analytics.d.ts +0 -90
  103. package/dist/web-analytics.mjs +0 -225
  104. package/dist/web-analytics.mjs.map +0 -1
@@ -0,0 +1,226 @@
1
+ import * as runtime from './runtime.js';
2
+ import './common.js';
3
+ import type * as common from './common.js';
4
+ /** The request of CreateTrustPolicy. */
5
+ export interface CreateTrustPolicyRequest {
6
+ /** The org to create in. */
7
+ parent: string;
8
+ /** The trust policy to create; only spec and caller-writable metadata are read. */
9
+ trustPolicy: TrustPolicy;
10
+ /**
11
+ * The id of the new trust policy, `^[a-z]([a-z0-9_-]{0,61}[a-z0-9])?$`; the server assigns one when
12
+ * empty.
13
+ */
14
+ trustPolicyId?: string;
15
+ /** Validate and return the result without writing anything. */
16
+ validateOnly?: boolean;
17
+ }
18
+ /** The request of DeleteTrustPolicy. */
19
+ export interface DeleteTrustPolicyRequest {
20
+ /** The name of the trust policy to delete. */
21
+ name: string;
22
+ /** Delete only if the current etag matches. */
23
+ etag?: string;
24
+ /** Validate without deleting anything. */
25
+ validateOnly?: boolean;
26
+ }
27
+ /** The request of ExchangeToken. */
28
+ export interface ExchangeTokenRequest {
29
+ /** The trust policy to exchange under. */
30
+ name: string;
31
+ /**
32
+ * The caller's identity: a SPIFFE JWT-SVID or an Access-issued workload
33
+ * OIDC token, with audience `broker.sylphx.com`.
34
+ */
35
+ subjectToken: string;
36
+ /**
37
+ * The permissions this call needs, at most the policy's; empty means the
38
+ * policy's.
39
+ */
40
+ permissions?: Record<string, string>;
41
+ /**
42
+ * The repositories this call needs, at most the policy's; empty means the
43
+ * policy's.
44
+ */
45
+ repositories?: string[];
46
+ /** How long the credential should live, at most the policy's `max_ttl`. */
47
+ ttl?: string;
48
+ }
49
+ /** The response of ExchangeToken. */
50
+ export interface ExchangeTokenResponse {
51
+ /**
52
+ * The provider credential. Never logged, persisted, or cached by the
53
+ * caller beyond `expire_time`.
54
+ */
55
+ token?: string;
56
+ /** What `token` is. */
57
+ credentialKind?: CredentialKind;
58
+ /** When the credential stops working. */
59
+ expireTime?: string;
60
+ /** The permissions the credential carries. */
61
+ permissions?: Record<string, string>;
62
+ /**
63
+ * The repositories the credential covers; empty means every repository
64
+ * the Connection covers.
65
+ */
66
+ repositories?: string[];
67
+ }
68
+ /** The request of GetTrustPolicy. */
69
+ export interface GetTrustPolicyRequest {
70
+ /** The name of the trust policy to get. */
71
+ name: string;
72
+ }
73
+ /** The request of ListTrustPolicies. */
74
+ export interface ListTrustPoliciesRequest {
75
+ /** The org to list in. */
76
+ parent: string;
77
+ /** At most this many; default 50, clamped to 1000. */
78
+ pageSize?: number;
79
+ /** `next_page_token` of the previous page. */
80
+ pageToken?: string;
81
+ /** AIP-160 filter over labels and filterable fields. */
82
+ filter?: string;
83
+ /** AIP-132 ordering over filterable fields. */
84
+ orderBy?: string;
85
+ }
86
+ /** The response of ListTrustPolicies. */
87
+ export interface ListTrustPoliciesResponse {
88
+ /** The page. */
89
+ trustPolicies?: TrustPolicy[];
90
+ /** The token of the next page; empty on the last page. */
91
+ nextPageToken?: string;
92
+ }
93
+ /**
94
+ * A TrustPolicy grants a set of subjects the right to exchange their
95
+ * identity for a provider credential on one Connection, never wider than
96
+ * the policy's permissions and repositories.
97
+ */
98
+ export interface TrustPolicy {
99
+ /** `orgs/{org}/trust_policies/{trust_policy}`. */
100
+ name?: string;
101
+ /** `trp_<cell><ulid>`. */
102
+ readonly uid?: string;
103
+ /** Resource metadata. */
104
+ meta?: common.ResourceMeta;
105
+ /** Desired state. */
106
+ spec?: TrustPolicySpec;
107
+ /** Observed state. */
108
+ readonly status?: TrustPolicyStatus;
109
+ }
110
+ /** TrustPolicySpec is the caller-writable state of a TrustPolicy. */
111
+ export interface TrustPolicySpec {
112
+ /** The Connection credentials are issued on. */
113
+ connection?: string;
114
+ /**
115
+ * The identities allowed to exchange: SPIFFE ids
116
+ * (`spiffe://<trust-domain>/cell/<cell>/role/<role>`, `*` matching one
117
+ * segment) or Access principal names. The Cell segment is never stripped.
118
+ */
119
+ subjects?: string[];
120
+ /**
121
+ * The most a credential may carry, in the provider's permission names, for
122
+ * example `{"contents": "read", "checks": "write"}`.
123
+ */
124
+ permissions?: Record<string, string>;
125
+ /**
126
+ * The most repositories a credential may cover; empty means every
127
+ * repository the Connection covers.
128
+ */
129
+ repositories?: string[];
130
+ /** What the Broker issues. */
131
+ credentialKind?: CredentialKind;
132
+ /** The longest a credential lives; default and maximum 1 hour. */
133
+ maxTtl?: string;
134
+ }
135
+ /** TrustPolicyStatus is the observed state of a TrustPolicy. */
136
+ export interface TrustPolicyStatus {
137
+ /** The generation this status was computed from. */
138
+ readonly observedGeneration?: string;
139
+ /**
140
+ * Ready, Reconciling, Stalled. Ready is FALSE with reason
141
+ * `CapabilityMissing` when the Connection lacks a permission the policy
142
+ * names.
143
+ */
144
+ readonly conditions?: common.Condition[];
145
+ }
146
+ /** The request of UpdateTrustPolicy. */
147
+ export interface UpdateTrustPolicyRequest {
148
+ /** The trust policy to update; `name` identifies it. */
149
+ trustPolicy: TrustPolicy;
150
+ /** The fields to write; unset writes every populated field. */
151
+ updateMask?: string;
152
+ /** Validate and return the result without writing anything. */
153
+ validateOnly?: boolean;
154
+ }
155
+ /** CredentialKind is what the Broker issues under a TrustPolicy. */
156
+ export type CredentialKind = 'access_token' | 'runner_registration' | (string & {});
157
+ /**
158
+ * BrokerService is the Kernel Broker (owner credentials.md): workload
159
+ * identity in, short-lived scoped provider credential out.
160
+ *
161
+ * Namespace of Sylphx Broker on `Sylphx`.
162
+ */
163
+ export declare class BrokerApi {
164
+ /** The `trust_policies` collection. */
165
+ readonly trustPolicies: TrustPoliciesCollection;
166
+ constructor(client: runtime.Client);
167
+ }
168
+ /** `trust_policies` of Sylphx Broker: Resource type `broker.sylphx.com/TrustPolicy`. */
169
+ export declare class TrustPoliciesCollection {
170
+ private readonly client;
171
+ constructor(client: runtime.Client);
172
+ /**
173
+ * Gets a trust policy.
174
+ *
175
+ * `GET /v1/{name=orgs/*\/trust_policies/*}` · permission `broker:read` · effect `read`
176
+ *
177
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
178
+ */
179
+ get(request: GetTrustPolicyRequest): Promise<TrustPolicy>;
180
+ /**
181
+ * Lists an org's trust policies.
182
+ *
183
+ * `GET /v1/{parent=orgs/*}/trust_policies` · permission `broker:read` · effect `read`
184
+ *
185
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
186
+ */
187
+ list(request: ListTrustPoliciesRequest): Promise<ListTrustPoliciesResponse>;
188
+ /** Every item of every page of `list`. */
189
+ listAll(request: ListTrustPoliciesRequest): AsyncGenerator<TrustPolicy>;
190
+ /**
191
+ * Creates a trust policy.
192
+ *
193
+ * `POST /v1/{parent=orgs/*}/trust_policies` · permission `broker:admin` · effect `write`
194
+ *
195
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
196
+ */
197
+ create(request: CreateTrustPolicyRequest): Promise<TrustPolicy>;
198
+ /**
199
+ * Updates a trust policy.
200
+ *
201
+ * `PATCH /v1/{trust_policy.name=orgs/*\/trust_policies/*}` · permission `broker:admin` · effect `write`
202
+ *
203
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
204
+ */
205
+ update(request: UpdateTrustPolicyRequest): Promise<TrustPolicy>;
206
+ /**
207
+ * Deletes a trust policy.
208
+ *
209
+ * `DELETE /v1/{name=orgs/*\/trust_policies/*}` · permission `broker:admin` · effect `destructive`
210
+ *
211
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
212
+ */
213
+ delete(request: DeleteTrustPolicyRequest): Promise<Record<string, never>>;
214
+ /**
215
+ * Exchanges the caller's workload identity for a short-lived provider
216
+ * credential under a trust policy (RFC 8693 token exchange). The
217
+ * credential is narrowed to the request and cached per installation and
218
+ * permission set; a permission the Connection lacks is PERMISSION_DENIED
219
+ * with reason `CapabilityMissing`, never an outage.
220
+ *
221
+ * `POST /v1/{name=orgs/*\/trust_policies/*}:exchangeToken` · permission `broker:exchange` · effect `write`
222
+ *
223
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `RATE_LIMITED`.
224
+ */
225
+ exchangeToken(request: ExchangeTokenRequest): Promise<ExchangeTokenResponse>;
226
+ }
package/dist/broker.js ADDED
@@ -0,0 +1,187 @@
1
+ // @generated by sylphx-gen 0.1.0 from contracts@446ceb843d4ff88057b0db68e2e54e4aea52d8143b72d66016122995b878de20. Do not edit.
2
+ // `sylphx.broker.v1`.
3
+ import * as runtime from './runtime.js';
4
+ import './common.js';
5
+ runtime.registerSchemas({
6
+ 'sylphx.broker.v1.CreateTrustPolicyRequest': [
7
+ ['trustPolicy', 'trust_policy', 'sylphx.broker.v1.TrustPolicy'],
8
+ ['trustPolicyId', 'trust_policy_id'],
9
+ ['validateOnly', 'validate_only'],
10
+ ],
11
+ 'sylphx.broker.v1.DeleteTrustPolicyRequest': [
12
+ ['validateOnly', 'validate_only'],
13
+ ],
14
+ 'sylphx.broker.v1.ExchangeTokenRequest': [
15
+ ['subjectToken', 'subject_token'],
16
+ ['permissions', 'permissions', undefined, 'map'],
17
+ ],
18
+ 'sylphx.broker.v1.ExchangeTokenResponse': [
19
+ ['credentialKind', 'credential_kind'],
20
+ ['expireTime', 'expire_time'],
21
+ ['permissions', 'permissions', undefined, 'map'],
22
+ ],
23
+ 'sylphx.broker.v1.GetTrustPolicyRequest': [],
24
+ 'sylphx.broker.v1.ListTrustPoliciesRequest': [
25
+ ['pageSize', 'page_size'],
26
+ ['pageToken', 'page_token'],
27
+ ['orderBy', 'order_by'],
28
+ ],
29
+ 'sylphx.broker.v1.ListTrustPoliciesResponse': [
30
+ ['trustPolicies', 'trust_policies', 'sylphx.broker.v1.TrustPolicy'],
31
+ ['nextPageToken', 'next_page_token'],
32
+ ],
33
+ 'sylphx.broker.v1.TrustPolicy': [
34
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
35
+ ['spec', 'spec', 'sylphx.broker.v1.TrustPolicySpec'],
36
+ ['status', 'status', 'sylphx.broker.v1.TrustPolicyStatus'],
37
+ ],
38
+ 'sylphx.broker.v1.TrustPolicySpec': [
39
+ ['permissions', 'permissions', undefined, 'map'],
40
+ ['credentialKind', 'credential_kind'],
41
+ ['maxTtl', 'max_ttl'],
42
+ ],
43
+ 'sylphx.broker.v1.TrustPolicyStatus': [
44
+ ['observedGeneration', 'observed_generation'],
45
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
46
+ ],
47
+ 'sylphx.broker.v1.UpdateTrustPolicyRequest': [
48
+ ['trustPolicy', 'trust_policy', 'sylphx.broker.v1.TrustPolicy'],
49
+ ['updateMask', 'update_mask'],
50
+ ['validateOnly', 'validate_only'],
51
+ ],
52
+ });
53
+ /**
54
+ * BrokerService is the Kernel Broker (owner credentials.md): workload
55
+ * identity in, short-lived scoped provider credential out.
56
+ *
57
+ * Namespace of Sylphx Broker on `Sylphx`.
58
+ */
59
+ export class BrokerApi {
60
+ /** The `trust_policies` collection. */
61
+ trustPolicies;
62
+ constructor(client) {
63
+ this.trustPolicies = new TrustPoliciesCollection(client);
64
+ }
65
+ }
66
+ /** `trust_policies` of Sylphx Broker: Resource type `broker.sylphx.com/TrustPolicy`. */
67
+ export class TrustPoliciesCollection {
68
+ client;
69
+ constructor(client) {
70
+ this.client = client;
71
+ }
72
+ /**
73
+ * Gets a trust policy.
74
+ *
75
+ * `GET /v1/{name=orgs/*\/trust_policies/*}` · permission `broker:read` · effect `read`
76
+ *
77
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
78
+ */
79
+ async get(request) {
80
+ return this.client.call({
81
+ method: 'GET',
82
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/trust_policies/*', 'name')}`,
83
+ responseType: 'sylphx.broker.v1.TrustPolicy',
84
+ mutation: false,
85
+ });
86
+ }
87
+ /**
88
+ * Lists an org's trust policies.
89
+ *
90
+ * `GET /v1/{parent=orgs/*}/trust_policies` · permission `broker:read` · effect `read`
91
+ *
92
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
93
+ */
94
+ async list(request) {
95
+ return this.client.call({
96
+ method: 'GET',
97
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*', 'parent')}/trust_policies`,
98
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
99
+ responseType: 'sylphx.broker.v1.ListTrustPoliciesResponse',
100
+ mutation: false,
101
+ });
102
+ }
103
+ /** Every item of every page of `list`. */
104
+ async *listAll(request) {
105
+ let next = request;
106
+ for (;;) {
107
+ const page = await this.list(next);
108
+ yield* page.trustPolicies ?? [];
109
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
110
+ return;
111
+ next = { ...request, pageToken: page.nextPageToken };
112
+ }
113
+ }
114
+ /**
115
+ * Creates a trust policy.
116
+ *
117
+ * `POST /v1/{parent=orgs/*}/trust_policies` · permission `broker:admin` · effect `write`
118
+ *
119
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
120
+ */
121
+ async create(request) {
122
+ return this.client.call({
123
+ method: 'POST',
124
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*', 'parent')}/trust_policies`,
125
+ query: { trust_policy_id: request.trustPolicyId, validate_only: request.validateOnly },
126
+ body: request.trustPolicy ?? {},
127
+ bodyType: 'sylphx.broker.v1.TrustPolicy',
128
+ responseType: 'sylphx.broker.v1.TrustPolicy',
129
+ mutation: true,
130
+ });
131
+ }
132
+ /**
133
+ * Updates a trust policy.
134
+ *
135
+ * `PATCH /v1/{trust_policy.name=orgs/*\/trust_policies/*}` · permission `broker:admin` · effect `write`
136
+ *
137
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
138
+ */
139
+ async update(request) {
140
+ return this.client.call({
141
+ method: 'PATCH',
142
+ path: `/v1/${runtime.pathParam(request.trustPolicy?.name, 'orgs/*/trust_policies/*', 'trust_policy.name')}`,
143
+ query: { update_mask: request.updateMask, validate_only: request.validateOnly },
144
+ body: request.trustPolicy ?? {},
145
+ bodyType: 'sylphx.broker.v1.TrustPolicy',
146
+ responseType: 'sylphx.broker.v1.TrustPolicy',
147
+ mutation: true,
148
+ });
149
+ }
150
+ /**
151
+ * Deletes a trust policy.
152
+ *
153
+ * `DELETE /v1/{name=orgs/*\/trust_policies/*}` · permission `broker:admin` · effect `destructive`
154
+ *
155
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
156
+ */
157
+ async delete(request) {
158
+ return this.client.call({
159
+ method: 'DELETE',
160
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/trust_policies/*', 'name')}`,
161
+ query: { etag: request.etag, validate_only: request.validateOnly },
162
+ mutation: true,
163
+ });
164
+ }
165
+ /**
166
+ * Exchanges the caller's workload identity for a short-lived provider
167
+ * credential under a trust policy (RFC 8693 token exchange). The
168
+ * credential is narrowed to the request and cached per installation and
169
+ * permission set; a permission the Connection lacks is PERMISSION_DENIED
170
+ * with reason `CapabilityMissing`, never an outage.
171
+ *
172
+ * `POST /v1/{name=orgs/*\/trust_policies/*}:exchangeToken` · permission `broker:exchange` · effect `write`
173
+ *
174
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `RATE_LIMITED`.
175
+ */
176
+ async exchangeToken(request) {
177
+ return this.client.call({
178
+ method: 'POST',
179
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/trust_policies/*', 'name')}:exchangeToken`,
180
+ body: runtime.omit(request, ['name']),
181
+ bodyType: 'sylphx.broker.v1.ExchangeTokenRequest',
182
+ responseType: 'sylphx.broker.v1.ExchangeTokenResponse',
183
+ mutation: true,
184
+ });
185
+ }
186
+ }
187
+ //# sourceMappingURL=broker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker.js","sourceRoot":"","sources":["../src/broker.ts"],"names":[],"mappings":"AAAA,+HAA+H;AAC/H,sBAAsB;AAEtB,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,aAAa,CAAA;AAwKpB,OAAO,CAAC,eAAe,CAAC;IACvB,2CAA2C,EAAE;QAC5C,CAAC,aAAa,EAAE,cAAc,EAAE,8BAA8B,CAAC;QAC/D,CAAC,eAAe,EAAE,iBAAiB,CAAC;QACpC,CAAC,cAAc,EAAE,eAAe,CAAC;KACjC;IACD,2CAA2C,EAA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