Skip to content

Release v6.0.0 (@W-20718643@)#438

Merged
joeluong-sfcc merged 14 commits intomainfrom
release/20260122
Jan 27, 2026
Merged

Release v6.0.0 (@W-20718643@)#438
joeluong-sfcc merged 14 commits intomainfrom
release/20260122

Conversation

@joeluong-sfcc
Copy link
Copy Markdown
Collaborator

@joeluong-sfcc joeluong-sfcc commented Jan 22, 2026

This PR includes the changes required to release v6.0.0, which will be released when we create a github release after this PR is merged into main.

This release only includes API changes with the following API versions:

### API Versions

| API Name | API Version |
|----------|-------------|
| assignments | 1.0.38 |
| campaigns | 1.0.40 |
| catalogs | 1.0.46 |
| cdn-api-process-apis | 1.0.41 |
| cors-preferences | 1.0.9 |
| coupons | 1.0.43 |
| customers | 1.1.3 |
| gift-certificates | 1.0.42 |
| orders | 1.4.15 |
| preferences | 1.1.6 |
| products | 1.1.5 |
| promotions | 1.0.36 |
| shopper-baskets | 1.9.4 |
| shopper-baskets | 2.3.3 |
| shopper-configurations | 1.0.2 |
| shopper-consents | 1.1.4 |
| shopper-context | 1.1.3 |
| shopper-customers | 1.3.2 |
| shopper-experience | 1.1.2 |
| shopper-gift-certificates | 1.0.29 |
| shopper-login | 1.42.2 |
| shopper-orders | 1.10.2 |
| shopper-products | 1.1.3 |
| shopper-promotions | 1.0.39 |
| shopper-search | 1.5.4 |
| shopper-seo | 1.0.17 |
| shopper-stores | 1.0.19 |
| slas-admin | 1.14.1 |
| source-code-groups | 1.0.40 |

Unique Items

This PR also modifies the template to handle the case of the uniqueItems flag being present in the OAS. This flag is available for array types, where if it is set to true, the generated typescript type is a Set instead of an Array. In order to maintain consistency across all the APIs, the SDK will only handle array type and allow the server to error handle duplicate items in an array.

Example:

OAS (getSubscriptions endpoint on Shopper Consents API)

    expand:
      description: "Optional parameter to expand response with additional fields. \nAccepts an array of field names to include in the response.\nCurrently supports:\n- \"consentStatus\": Include consent status information in the response\n\nFuture expansions may include additional fields.\n"
      name: expand
      in: query
      required: false
      schema:
        type: array
        items:
          type: string
          enum:
            - consentStatus
          example: consentStatus
        uniqueItems: true
        default: []
        minItems: 0
        maxItems: 10

Generated Typescript BEFORE updating mustache templates

    getSubscriptions(
        options?: RequireParametersUnlessAllAreOptional<{
            parameters?: CompositeParameters<{
                organizationId: string;
                siteId: string;
                locale?: LocaleCode;
                tags?: Array<string>;
                expand?: Set<GetSubscriptionsExpandEnum>; // <--- Uses Set based on uniqueItems flag
            } & QueryParameters, ConfigParameters>
            headers?: { [key: string]: string },
        }>
    ): Promise<ConsentSubscriptionResponse>;

Generated Typescript AFTER updating mustache templates

    getSubscriptions(
        options?: RequireParametersUnlessAllAreOptional<{
            parameters?: CompositeParameters<{
                organizationId: string;
                siteId: string;
                locale?: LocaleCode;
                tags?: Array<string>;
                expand?: Array<GetSubscriptionsExpandEnum>; // <--- Updated to Array
            } & QueryParameters, ConfigParameters>
            headers?: { [key: string]: string },
        }>
    ): Promise<ConsentSubscriptionResponse>;

How to test uniqueItems

  1. Generate the SDK with npm run build
  2. do a search in the generated typescript directory, renderedTemplates and look for instances of Set<
  3. Observe that no instances of Set are being used in query parameters, model types, and response types\

To validate sets were being used before:

  1. Use the following api-versions.txt and update the APIs and build the SDK on the main branch:
# ECOM v26.2
assignments-oas-v1=1.0.38
campaigns-oas-v1=1.0.40
catalogs-oas-v1=1.0.46
cdn-api-process-apis-oas-v1=1.0.41
cors-preferences-oas-v1=1.0.9
coupons-oas-v1=1.0.43
customers-oas-v1=1.1.3
gift-certificates-oas-v1=1.0.42
orders-oas-v1=1.4.15
preferences-oas-v1=1.1.6
products-oas-v1=1.1.5
promotions-oas-v1=1.0.36
shopper-baskets-oas-v1=1.9.4
shopper-baskets-oas-v2=2.3.3
shopper-configurations-oas=1.0.2
shopper-consents-oas-v1=1.1.4
shopper-context-oas-v1=1.1.3
shopper-customers-oas-v1=1.3.2
shopper-experience-oas-v1=1.1.2
shopper-gift-certificates-oas-v1=1.0.29
shopper-login-oas-v1=1.42.2
shopper-orders-oas-v1=1.10.2
shopper-products-oas-v1=1.1.3
shopper-promotions-oas-v1=1.0.39
shopper-search-oas-v1=1.5.4
shopper-seo-oas-v1=1.0.17
shopper-stores-oas-v1=1.0.19
slas-admin-oas-v1=1.14.1
source-code-groups-oas-v1=1.0.40
  1. Search for Set< in the /renderedTemplates directory and observe multiple instances of Sets being used instead of Arrays

@joeluong-sfcc joeluong-sfcc changed the base branch from main to ju/api-version-script January 22, 2026 16:04
@joeluong-sfcc joeluong-sfcc changed the base branch from ju/api-version-script to ju/update-apis-script January 22, 2026 16:04
Base automatically changed from ju/update-apis-script to main January 26, 2026 18:24
@joeluong-sfcc joeluong-sfcc marked this pull request as ready for review January 27, 2026 16:45
@joeluong-sfcc joeluong-sfcc requested a review from a team as a code owner January 27, 2026 16:45
Copy link
Copy Markdown
Contributor

@vcua-mobify vcua-mobify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In renderedTemplates, I only see references to MrtRuleSet< not Set<

@joeluong-sfcc joeluong-sfcc merged commit ea4e3dc into main Jan 27, 2026
7 checks passed
@joeluong-sfcc joeluong-sfcc deleted the release/20260122 branch January 27, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants