@salesforce/b2c-tooling-sdk 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/tooling/index.json +9 -9
- package/dist/esm/cli/config.js +7 -1
- package/dist/esm/cli/config.js.map +1 -1
- package/dist/esm/cli/mrt-command.d.ts +20 -4
- package/dist/esm/cli/mrt-command.js +28 -6
- package/dist/esm/cli/mrt-command.js.map +1 -1
- package/dist/esm/cli/webdav-command.d.ts +1 -0
- package/dist/esm/cli/webdav-command.js +1 -0
- package/dist/esm/cli/webdav-command.js.map +1 -1
- package/dist/esm/clients/index.d.ts +2 -0
- package/dist/esm/clients/index.js +1 -0
- package/dist/esm/clients/index.js.map +1 -1
- package/dist/esm/clients/middleware-registry.d.ts +1 -1
- package/dist/esm/clients/middleware-registry.js.map +1 -1
- package/dist/esm/clients/storefront-deployments.d.ts +1 -0
- package/dist/esm/clients/storefront-deployments.js.map +1 -1
- package/dist/esm/clients/storefront-environments.d.ts +56 -0
- package/dist/esm/clients/storefront-environments.generated.d.ts +208 -0
- package/dist/esm/clients/storefront-environments.generated.js +6 -0
- package/dist/esm/clients/storefront-environments.generated.js.map +1 -0
- package/dist/esm/clients/storefront-environments.js +24 -0
- package/dist/esm/clients/storefront-environments.js.map +1 -0
- package/dist/esm/config/resolver.js +12 -0
- package/dist/esm/config/resolver.js.map +1 -1
- package/dist/esm/config/sources/env-source.d.ts +10 -1
- package/dist/esm/config/sources/env-source.js +29 -1
- package/dist/esm/config/sources/env-source.js.map +1 -1
- package/dist/esm/config/types.d.ts +1 -1
- package/dist/esm/guidance/catalog.js +1 -1
- package/dist/esm/guidance/catalog.js.map +1 -1
- package/dist/esm/guidance/types.d.ts +6 -2
- package/dist/esm/guidance/types.js.map +1 -1
- package/dist/esm/operations/code/deploy.js +4 -0
- package/dist/esm/operations/code/deploy.js.map +1 -1
- package/dist/esm/operations/jobs/site-archive.d.ts +7 -0
- package/dist/esm/operations/jobs/site-archive.js.map +1 -1
- package/dist/esm/operations/mrt/deployment.d.ts +28 -1
- package/dist/esm/operations/mrt/deployment.js +17 -4
- package/dist/esm/operations/mrt/deployment.js.map +1 -1
- package/dist/esm/operations/mrt/env-var.d.ts +135 -0
- package/dist/esm/operations/mrt/env-var.js +203 -0
- package/dist/esm/operations/mrt/env-var.js.map +1 -1
- package/dist/esm/operations/mrt/index.d.ts +4 -4
- package/dist/esm/operations/mrt/index.js +2 -2
- package/dist/esm/operations/mrt/index.js.map +1 -1
- package/dist/esm/operations/mrt/push.d.ts +202 -0
- package/dist/esm/operations/mrt/push.js +280 -0
- package/dist/esm/operations/mrt/push.js.map +1 -1
- package/dist/esm/safety/safety-guard.d.ts +1 -0
- package/dist/esm/safety/safety-guard.js +2 -1
- package/dist/esm/safety/safety-guard.js.map +1 -1
- package/dist/esm/safety/types.d.ts +2 -2
- package/dist/esm/scapi/index.d.ts +2 -2
- package/dist/esm/scapi/request.d.ts +13 -0
- package/dist/esm/scapi/request.js +49 -15
- package/dist/esm/scapi/request.js.map +1 -1
- package/dist/esm/scapi/runtime.d.ts +7 -0
- package/dist/esm/scapi/runtime.js +31 -1
- package/dist/esm/scapi/runtime.js.map +1 -1
- package/dist/esm/skills/sources.js +8 -0
- package/dist/esm/skills/sources.js.map +1 -1
- package/dist/esm/skills/types.d.ts +1 -1
- package/dist/esm/test-utils/config-isolation.js +2 -2
- package/dist/esm/test-utils/config-isolation.js.map +1 -1
- package/package.json +2 -2
- package/specs/storefront-environments-v1.yaml +272 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
openapi: "3.0.3"
|
|
2
|
+
# ---------------------------------------------------------------------------
|
|
3
|
+
# SCAPI MRT Storefront Environments API (v1) — self-contained bundle.
|
|
4
|
+
#
|
|
5
|
+
# Source of truth: git.soma.salesforce.com/cc-mercury-api/storefront-oas
|
|
6
|
+
# environments-oas/v1/api_spec/src/environments.yaml
|
|
7
|
+
#
|
|
8
|
+
# The upstream source is a multi-file spec whose $refs resolve component files
|
|
9
|
+
# under src/components/ plus a build-time `dependencies/commerce-cloud-standards-oas`
|
|
10
|
+
# folder (populated by the redocly/maven build, not committed to git). That tree
|
|
11
|
+
# is not directly consumable by openapi-typescript, and every other spec in this
|
|
12
|
+
# repo is a single self-contained file, so this file inlines the referenced
|
|
13
|
+
# components: the standard SCAPI `organizationId`/`storefrontId`/`environmentId`
|
|
14
|
+
# parameters and the RFC 7807 `ErrorResponse` envelope.
|
|
15
|
+
#
|
|
16
|
+
# Scope note: this bundle covers ONLY the environment-variables sub-resource
|
|
17
|
+
# (GET + merge-PATCH), which is what the `mrt env var` commands need. The broader
|
|
18
|
+
# Environments lifecycle surface (list/create/clone/get/update/delete/...) is
|
|
19
|
+
# intentionally omitted; it belongs to a later story. When adding that surface or
|
|
20
|
+
# bumping to a newer upstream version, re-bundle from the same source path.
|
|
21
|
+
# ---------------------------------------------------------------------------
|
|
22
|
+
info:
|
|
23
|
+
x-api-type: Admin
|
|
24
|
+
x-api-family: Storefront
|
|
25
|
+
title: Environments
|
|
26
|
+
version: 1.0.0
|
|
27
|
+
description: >-
|
|
28
|
+
SCAPI Managed Runtime Storefront Environments API. Read and update the
|
|
29
|
+
environment variables for a storefront environment. Variables are returned
|
|
30
|
+
with their values masked; updates use merge-PATCH semantics.
|
|
31
|
+
servers:
|
|
32
|
+
- url: "https://{shortCode}.api.commercecloud.salesforce.com/storefront/environments/v1"
|
|
33
|
+
variables:
|
|
34
|
+
shortCode:
|
|
35
|
+
default: "123456gf"
|
|
36
|
+
paths:
|
|
37
|
+
/organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/environment-variables:
|
|
38
|
+
get:
|
|
39
|
+
summary: Get environment variables for an environment.
|
|
40
|
+
description: >-
|
|
41
|
+
Retrieves the environment variables configured for the specified
|
|
42
|
+
environment. Values are returned masked (only the last few characters are
|
|
43
|
+
visible) and cannot be read back in plaintext.
|
|
44
|
+
operationId: getEnvironmentVariables
|
|
45
|
+
parameters:
|
|
46
|
+
- $ref: "#/components/parameters/organizationId"
|
|
47
|
+
- $ref: "#/components/parameters/storefrontId"
|
|
48
|
+
- $ref: "#/components/parameters/environmentId"
|
|
49
|
+
responses:
|
|
50
|
+
"200":
|
|
51
|
+
description: Environment variables successfully retrieved.
|
|
52
|
+
content:
|
|
53
|
+
application/json:
|
|
54
|
+
schema:
|
|
55
|
+
$ref: "#/components/schemas/EnvironmentVariables"
|
|
56
|
+
"401":
|
|
57
|
+
$ref: "#/components/responses/401Unauthorized"
|
|
58
|
+
"403":
|
|
59
|
+
$ref: "#/components/responses/403Forbidden"
|
|
60
|
+
"404":
|
|
61
|
+
$ref: "#/components/responses/404NotFound"
|
|
62
|
+
security:
|
|
63
|
+
- AmOAuth2:
|
|
64
|
+
- "sfcc.storefront.environments"
|
|
65
|
+
- "sfcc.storefront.environments.rw"
|
|
66
|
+
patch:
|
|
67
|
+
summary: Update environment variables for an environment.
|
|
68
|
+
description: >-
|
|
69
|
+
Updates the environment variables using merge-PATCH semantics: a key
|
|
70
|
+
present in the request is created or replaced; a key with a `null` value is
|
|
71
|
+
deleted; a key omitted from the request is left unchanged. Returns 204 No
|
|
72
|
+
Content on success.
|
|
73
|
+
operationId: updateEnvironmentVariables
|
|
74
|
+
parameters:
|
|
75
|
+
- $ref: "#/components/parameters/organizationId"
|
|
76
|
+
- $ref: "#/components/parameters/storefrontId"
|
|
77
|
+
- $ref: "#/components/parameters/environmentId"
|
|
78
|
+
requestBody:
|
|
79
|
+
required: true
|
|
80
|
+
content:
|
|
81
|
+
application/json:
|
|
82
|
+
schema:
|
|
83
|
+
$ref: "#/components/schemas/EnvironmentVariablesUpdateRequest"
|
|
84
|
+
responses:
|
|
85
|
+
"204":
|
|
86
|
+
description: Environment variables successfully updated.
|
|
87
|
+
"400":
|
|
88
|
+
$ref: "#/components/responses/400BadRequest"
|
|
89
|
+
"401":
|
|
90
|
+
$ref: "#/components/responses/401Unauthorized"
|
|
91
|
+
"403":
|
|
92
|
+
$ref: "#/components/responses/403Forbidden"
|
|
93
|
+
"404":
|
|
94
|
+
$ref: "#/components/responses/404NotFound"
|
|
95
|
+
security:
|
|
96
|
+
- AmOAuth2:
|
|
97
|
+
- "sfcc.storefront.environments.rw"
|
|
98
|
+
components:
|
|
99
|
+
securitySchemes:
|
|
100
|
+
AmOAuth2:
|
|
101
|
+
type: oauth2
|
|
102
|
+
description: AccountManager OAuth 2.0 bearer token Authentication.
|
|
103
|
+
flows:
|
|
104
|
+
clientCredentials:
|
|
105
|
+
tokenUrl: https://account.demandware.com/dwsso/oauth2/access_token
|
|
106
|
+
scopes:
|
|
107
|
+
sfcc.storefront.environments: Read-only access to the Environments API.
|
|
108
|
+
sfcc.storefront.environments.rw: Read and write access to the Environments API.
|
|
109
|
+
authorizationCode:
|
|
110
|
+
authorizationUrl: https://account.demandware.com/dwsso/oauth2/authorize
|
|
111
|
+
tokenUrl: https://account.demandware.com/dwsso/oauth2/access_token
|
|
112
|
+
scopes:
|
|
113
|
+
sfcc.storefront.environments: Read-only access to the Environments API.
|
|
114
|
+
sfcc.storefront.environments.rw: Read and write access to the Environments API.
|
|
115
|
+
parameters:
|
|
116
|
+
# Standard SCAPI organization identifier (inlined from
|
|
117
|
+
# commerce-cloud-standards-oas). For B2C Commerce this is `f_ecom_<tenant>`.
|
|
118
|
+
organizationId:
|
|
119
|
+
name: organizationId
|
|
120
|
+
in: path
|
|
121
|
+
required: true
|
|
122
|
+
style: simple
|
|
123
|
+
explode: false
|
|
124
|
+
description: The B2C Commerce organization identifier, e.g. `f_ecom_zzxy_prd`.
|
|
125
|
+
schema:
|
|
126
|
+
type: string
|
|
127
|
+
minLength: 1
|
|
128
|
+
maxLength: 32
|
|
129
|
+
storefrontId:
|
|
130
|
+
name: storefrontId
|
|
131
|
+
in: path
|
|
132
|
+
required: true
|
|
133
|
+
description: >-
|
|
134
|
+
The storefront identifier. Must consist only of lowercase letters,
|
|
135
|
+
numbers, and hyphens, with no leading or trailing hyphens.
|
|
136
|
+
schema:
|
|
137
|
+
type: string
|
|
138
|
+
minLength: 1
|
|
139
|
+
maxLength: 20
|
|
140
|
+
pattern: "^[a-z0-9]+(?:-+[a-z0-9]+)*$"
|
|
141
|
+
environmentId:
|
|
142
|
+
name: environmentId
|
|
143
|
+
in: path
|
|
144
|
+
required: true
|
|
145
|
+
description: >-
|
|
146
|
+
The environment identifier. Must consist only of lowercase letters,
|
|
147
|
+
numbers, and hyphens, with no leading or trailing hyphens.
|
|
148
|
+
schema:
|
|
149
|
+
type: string
|
|
150
|
+
minLength: 1
|
|
151
|
+
maxLength: 19
|
|
152
|
+
pattern: "^[a-z0-9]+(?:-+[a-z0-9]+)*$"
|
|
153
|
+
responses:
|
|
154
|
+
401Unauthorized:
|
|
155
|
+
description: Your access token is invalid or expired and can't be used to identify a user.
|
|
156
|
+
content:
|
|
157
|
+
application/problem+json:
|
|
158
|
+
schema:
|
|
159
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
160
|
+
403Forbidden:
|
|
161
|
+
description: You aren't authorized to perform this action.
|
|
162
|
+
content:
|
|
163
|
+
application/problem+json:
|
|
164
|
+
schema:
|
|
165
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
166
|
+
400BadRequest:
|
|
167
|
+
description: The request was malformed or failed validation.
|
|
168
|
+
content:
|
|
169
|
+
application/problem+json:
|
|
170
|
+
schema:
|
|
171
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
172
|
+
404NotFound:
|
|
173
|
+
description: The requested resource was not found.
|
|
174
|
+
content:
|
|
175
|
+
application/problem+json:
|
|
176
|
+
schema:
|
|
177
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
178
|
+
schemas:
|
|
179
|
+
# Standard SCAPI RFC 7807 error envelope (inlined from commerce-cloud-standards-oas).
|
|
180
|
+
ErrorResponse:
|
|
181
|
+
type: object
|
|
182
|
+
additionalProperties: true
|
|
183
|
+
properties:
|
|
184
|
+
title:
|
|
185
|
+
type: string
|
|
186
|
+
maxLength: 256
|
|
187
|
+
type:
|
|
188
|
+
type: string
|
|
189
|
+
maxLength: 2048
|
|
190
|
+
detail:
|
|
191
|
+
type: string
|
|
192
|
+
instance:
|
|
193
|
+
type: string
|
|
194
|
+
maxLength: 2048
|
|
195
|
+
required:
|
|
196
|
+
- detail
|
|
197
|
+
- title
|
|
198
|
+
- type
|
|
199
|
+
PublishingStatus:
|
|
200
|
+
type: string
|
|
201
|
+
description: The publishing status of an environment variable.
|
|
202
|
+
enum:
|
|
203
|
+
- pending
|
|
204
|
+
- completed
|
|
205
|
+
- failed
|
|
206
|
+
example: "completed"
|
|
207
|
+
EnvironmentVariableEntry:
|
|
208
|
+
description: A single environment variable's masked value and metadata.
|
|
209
|
+
type: object
|
|
210
|
+
properties:
|
|
211
|
+
value:
|
|
212
|
+
type: string
|
|
213
|
+
nullable: true
|
|
214
|
+
description: >-
|
|
215
|
+
The masked value of the environment variable (only the last few
|
|
216
|
+
characters are visible). Null if no value is set.
|
|
217
|
+
maxLength: 32768
|
|
218
|
+
example: "****cret"
|
|
219
|
+
createdBy:
|
|
220
|
+
type: string
|
|
221
|
+
nullable: true
|
|
222
|
+
description: The email address of the user who created the variable. Null if no user is associated.
|
|
223
|
+
maxLength: 254
|
|
224
|
+
example: "dev@example.com"
|
|
225
|
+
creationDate:
|
|
226
|
+
type: string
|
|
227
|
+
format: date-time
|
|
228
|
+
description: The timestamp when the variable was created.
|
|
229
|
+
example: "2026-04-08T21:47:28.188965Z"
|
|
230
|
+
lastModified:
|
|
231
|
+
type: string
|
|
232
|
+
format: date-time
|
|
233
|
+
description: The timestamp when the variable was last modified.
|
|
234
|
+
example: "2026-04-08T21:47:31.307595Z"
|
|
235
|
+
lastModifiedBy:
|
|
236
|
+
type: string
|
|
237
|
+
nullable: true
|
|
238
|
+
description: The email address of the user who last modified the variable. Null if no user is associated.
|
|
239
|
+
maxLength: 254
|
|
240
|
+
example: "dev@example.com"
|
|
241
|
+
publishingStatus:
|
|
242
|
+
$ref: "#/components/schemas/PublishingStatus"
|
|
243
|
+
EnvironmentVariables:
|
|
244
|
+
description: >-
|
|
245
|
+
The environment variables for an environment, keyed by variable name. Each
|
|
246
|
+
value is an {@link EnvironmentVariableEntry} with a masked value and metadata.
|
|
247
|
+
type: object
|
|
248
|
+
additionalProperties:
|
|
249
|
+
$ref: "#/components/schemas/EnvironmentVariableEntry"
|
|
250
|
+
EnvironmentVariableUpdateEntry:
|
|
251
|
+
description: >-
|
|
252
|
+
A single environment variable update. A `null` value deletes the variable;
|
|
253
|
+
a string or number value creates or replaces it.
|
|
254
|
+
type: object
|
|
255
|
+
required:
|
|
256
|
+
- value
|
|
257
|
+
properties:
|
|
258
|
+
value:
|
|
259
|
+
nullable: true
|
|
260
|
+
description: The new value for the variable, or `null` to delete it.
|
|
261
|
+
oneOf:
|
|
262
|
+
- type: string
|
|
263
|
+
maxLength: 32768
|
|
264
|
+
- type: number
|
|
265
|
+
EnvironmentVariablesUpdateRequest:
|
|
266
|
+
description: >-
|
|
267
|
+
Merge-PATCH request body, keyed by variable name. Present keys are
|
|
268
|
+
created/replaced, keys with a `null` value are deleted, and omitted keys are
|
|
269
|
+
left unchanged.
|
|
270
|
+
type: object
|
|
271
|
+
additionalProperties:
|
|
272
|
+
$ref: "#/components/schemas/EnvironmentVariableUpdateEntry"
|