Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="Umbraco Prereleases" value="https://www.myget.org/F/umbracoprereleases/api/v3/index.json" />
</packageSources>
</configuration>
</configuration>
47 changes: 37 additions & 10 deletions azure-pipeline - Crm.Dynamics.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
trigger:
branches:
include:
- main-v16
- v16/dev
- main-v17
- v17/dev
paths:
include:
- src/Umbraco.Cms.Integrations.Crm.Dynamics/**
Expand All @@ -16,24 +16,28 @@ variables:
project: 'src/$(projectName)/$(projectName).csproj'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
productGroup: 'DXP'
productVersion: 'v17'
DT_API_KEY: $(dtApiKey)
DT_BASE_URL: $(dtBaseUrl)

steps:
- task: UseDotNet@2
displayName: 'Use SDK version 10.0.100'
inputs:
packageType: 'sdk'
version: '10.0.100'

- task: NuGetToolInstaller@1
displayName: 'Install NuGet'

- task: DotNetCoreCLI@2
displayName: 'NuGet Restore'
inputs:
command: 'restore'
feedsToUse: 'select'
feedsToUse: 'config'
projects: '$(project)'
includeNuGetOrg: true

- task: UseDotNet@2
displayName: 'Use SDK version 9.0.203'
inputs:
packageType: 'sdk'
version: '9.0.203'
nugetConfigPath: 'NuGet.config'

- task: VSBuild@1
displayName: 'Build Project'
Expand Down Expand Up @@ -71,3 +75,26 @@ steps:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'

# Generate/upload SBOM with cdxgen
- script: |
cd $(Build.SourcesDirectory)
npm install --global @cyclonedx/cdxgen
displayName: 'Install cdxgen'

- script: |
mkdir -p $(Build.ArtifactStagingDirectory)/bom
cd $(Build.SourcesDirectory)

cdxgen --recurse --output $(Build.ArtifactStagingDirectory)\bom\bom.json --json-pretty --project-group "$(productGroup)" --project-name "$(projectName)" --project-version "$(productVersion)" --server-url "$(DT_BASE_URL)" --api-key "$(DT_API_KEY)" --deep
displayName: 'Generate & Upload SBOM with cdxgen'
env:
DT_API_KEY: $(DT_API_KEY)
DT_BASE_URL: $(DT_BASE_URL)

# Publish SBOM artifact
- task: PublishPipelineArtifact@1
displayName: 'Publish SBOM Artifact'
inputs:
targetPath: $(Build.ArtifactStagingDirectory)/bom
artifactName: SBOM
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<ItemGroup>
<PackageReference Include="Umbraco.Cms" Version="17.0.0" />
<ProjectReference Include="..\..\src\Umbraco.Cms.Integrations.Crm.Dynamics\Umbraco.Cms.Integrations.Crm.Dynamics.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Cms.Integrations.Crm.ActiveCampaign\Umbraco.Cms.Integrations.Crm.ActiveCampaign.csproj" />
<ProjectReference Include="..\..\src\Umbraco.Cms.Integrations.Commerce.Shopify\Umbraco.Cms.Integrations.Commerce.Shopify.csproj" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Umbraco.Cms.Integrations.Crm.Dynamics/Client/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@umbraco-cms:registry=https://www.myget.org/F/umbracoprereleases/npm/
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// This file is auto-generated by @hey-api/openapi-ts

import type { ClientOptions } from './types.gen';
import { type Config, type ClientOptions as DefaultClientOptions, createClient, createConfig } from '@hey-api/client-fetch';
import { type ClientOptions, type Config, createClient, createConfig } from '@hey-api/client-fetch';

import type { ClientOptions as ClientOptions2 } from './types.gen';

/**
* The `createClientConfig()` function will be called on client initialization
Expand All @@ -11,9 +12,9 @@ import { type Config, type ClientOptions as DefaultClientOptions, createClient,
* `setConfig()`. This is useful for example if you're using Next.js
* to ensure your client always has the correct values.
*/
export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> = (override?: Config<DefaultClientOptions & T>) => Config<Required<DefaultClientOptions> & T>;
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;

export const client = createClient(createConfig<ClientOptions>({
baseUrl: 'http://localhost:30450',
export const client = createClient(createConfig<ClientOptions2>({
baseUrl: 'http://localhost:28157',
throwOnError: true
}));
}));
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// This file is auto-generated by @hey-api/openapi-ts

export * from './types.gen';
export * from './client.gen';
export * from './sdk.gen';
export * from './sdk.gen';
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// This file is auto-generated by @hey-api/openapi-ts

import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
import type { GetFormsData, GetFormsResponse, PostFormsAccessTokenData, PostFormsAccessTokenResponse, GetFormsAuthorizationUrlData, GetFormsAuthorizationUrlResponse, GetFormsEmbedCodeData, GetFormsEmbedCodeResponse, GetFormsOauthConfigurationData, GetFormsOauthConfigurationResponse, DeleteFormsRevokeAccessTokenData, DeleteFormsRevokeAccessTokenResponse, GetFormsSystemUserFullnameData, GetFormsSystemUserFullnameResponse, GetUmbracoApiDynamicsAuthorizationData, GetUmbracoApiDynamicsAuthorizationResponse } from './types.gen';
import { client as _heyApiClient } from './client.gen';
import type { Client, Options as Options2, TDataShape } from '@hey-api/client-fetch';

export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
import { client } from './client.gen';
import type { DeleteFormsRevokeAccessTokenData, DeleteFormsRevokeAccessTokenErrors, DeleteFormsRevokeAccessTokenResponses, GetFormsAuthorizationUrlData, GetFormsAuthorizationUrlErrors, GetFormsAuthorizationUrlResponses, GetFormsData, GetFormsEmbedCodeData, GetFormsEmbedCodeErrors, GetFormsEmbedCodeResponses, GetFormsErrors, GetFormsOauthConfigurationData, GetFormsOauthConfigurationErrors, GetFormsOauthConfigurationResponses, GetFormsResponses, GetFormsSystemUserFullnameData, GetFormsSystemUserFullnameErrors, GetFormsSystemUserFullnameResponses, GetUmbracoApiDynamicsAuthorizationData, GetUmbracoApiDynamicsAuthorizationErrors, GetUmbracoApiDynamicsAuthorizationResponses, PostFormsAccessTokenData, PostFormsAccessTokenErrors, PostFormsAccessTokenResponses } from './types.gen';

export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
/**
* You can provide a client instance returned by `createClient()` instead of
* individual options. This might be also useful if you want to implement a
Expand All @@ -18,9 +19,9 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
meta?: Record<string, unknown>;
};

export class DynamicsService {
export class Dynamics {
public static getForms<ThrowOnError extends boolean = true>(options?: Options<GetFormsData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).get<GetFormsResponse, unknown, ThrowOnError>({
return (options?.client ?? client).get<GetFormsResponses, GetFormsErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -33,7 +34,7 @@ export class DynamicsService {
}

public static postFormsAccessToken<ThrowOnError extends boolean = true>(options?: Options<PostFormsAccessTokenData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).post<PostFormsAccessTokenResponse, unknown, ThrowOnError>({
return (options?.client ?? client).post<PostFormsAccessTokenResponses, PostFormsAccessTokenErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -50,7 +51,7 @@ export class DynamicsService {
}

public static getFormsAuthorizationUrl<ThrowOnError extends boolean = true>(options?: Options<GetFormsAuthorizationUrlData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).get<GetFormsAuthorizationUrlResponse, unknown, ThrowOnError>({
return (options?.client ?? client).get<GetFormsAuthorizationUrlResponses, GetFormsAuthorizationUrlErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -63,7 +64,7 @@ export class DynamicsService {
}

public static getFormsEmbedCode<ThrowOnError extends boolean = true>(options?: Options<GetFormsEmbedCodeData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).get<GetFormsEmbedCodeResponse, unknown, ThrowOnError>({
return (options?.client ?? client).get<GetFormsEmbedCodeResponses, GetFormsEmbedCodeErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -76,7 +77,7 @@ export class DynamicsService {
}

public static getFormsOauthConfiguration<ThrowOnError extends boolean = true>(options?: Options<GetFormsOauthConfigurationData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).get<GetFormsOauthConfigurationResponse, unknown, ThrowOnError>({
return (options?.client ?? client).get<GetFormsOauthConfigurationResponses, GetFormsOauthConfigurationErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -89,7 +90,7 @@ export class DynamicsService {
}

public static deleteFormsRevokeAccessToken<ThrowOnError extends boolean = true>(options?: Options<DeleteFormsRevokeAccessTokenData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).delete<DeleteFormsRevokeAccessTokenResponse, unknown, ThrowOnError>({
return (options?.client ?? client).delete<DeleteFormsRevokeAccessTokenResponses, DeleteFormsRevokeAccessTokenErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -102,7 +103,7 @@ export class DynamicsService {
}

public static getFormsSystemUserFullname<ThrowOnError extends boolean = true>(options?: Options<GetFormsSystemUserFullnameData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).get<GetFormsSystemUserFullnameResponse, unknown, ThrowOnError>({
return (options?.client ?? client).get<GetFormsSystemUserFullnameResponses, GetFormsSystemUserFullnameErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -113,12 +114,11 @@ export class DynamicsService {
...options
});
}

}

export class V1Service {
export class V1 {
public static getUmbracoApiDynamicsAuthorization<ThrowOnError extends boolean = true>(options?: Options<GetUmbracoApiDynamicsAuthorizationData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).get<GetUmbracoApiDynamicsAuthorizationResponse, unknown, ThrowOnError>({
return (options?.client ?? client).get<GetUmbracoApiDynamicsAuthorizationResponses, GetUmbracoApiDynamicsAuthorizationErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -129,5 +129,4 @@ export class V1Service {
...options
});
}

}
}
Loading