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 Umbraco.Cms.Integrations.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VisualStudioVersion = 18.0.11111.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2801CB6C-78DE-4129-B5C6-D349F47F9B5C}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
.gitignore = .gitignore
azure-pipeline - Crm.ActiveCampaign.yml = azure-pipeline - Crm.ActiveCampaign.yml
azure-pipeline - Crm.Dynamics.yml = azure-pipeline - Crm.Dynamics.yml
azure-pipeline - Crm.Hubspot.yml = azure-pipeline - Crm.Hubspot.yml
Expand Down
62 changes: 37 additions & 25 deletions azure-pipelines - Automation.Zapier.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.Automation.Zapier/**
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 All @@ -51,24 +55,32 @@ steps:
packagesToPack: '$(project)'
versioningScheme: 'off'

- task: UseDotNet@2
displayName: 'Install .NET Core 3.x'
inputs:
packageType: 'sdk'
version: '3.x'

- task: CmdLine@2
displayName: 'Create Umbraco Package'
inputs:
script: |
dotnet tool install --global Umbraco.Tools.Packages
cd src/$(projectName)/
umbpack pack .\package.xml -o $(Build.ArtifactStagingDirectory)
cd ../../

- task: PublishBuildArtifacts@1
displayName: 'Publish Build Artifacts'
inputs:
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.Automation.Zapier\Umbraco.Cms.Integrations.Automation.Zapier.csproj" />
<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" />
Expand Down
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 { GetCheckFormExtensionData, GetCheckFormExtensionResponse, GetContentByTypeData, GetContentByTypeResponse, GetContentTypesData, GetContentTypesResponse, PostUpdateSubscriptionData, PostUpdateSubscriptionResponse, GetSubscriptionHooksData, GetSubscriptionHooksResponse, PostValidateUserData, PostValidateUserResponse } 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 { GetCheckFormExtensionData, GetCheckFormExtensionErrors, GetCheckFormExtensionResponses, GetContentByTypeData, GetContentByTypeErrors, GetContentByTypeResponses, GetContentTypesData, GetContentTypesErrors, GetContentTypesResponses, GetSubscriptionHooksData, GetSubscriptionHooksErrors, GetSubscriptionHooksResponses, PostUpdateSubscriptionData, PostUpdateSubscriptionErrors, PostUpdateSubscriptionResponses, PostValidateUserData, PostValidateUserErrors, PostValidateUserResponses } 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 ZapierService {
export class Zapier {
public static getCheckFormExtension<ThrowOnError extends boolean = true>(options?: Options<GetCheckFormExtensionData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).get<GetCheckFormExtensionResponse, unknown, ThrowOnError>({
return (options?.client ?? client).get<GetCheckFormExtensionResponses, GetCheckFormExtensionErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -33,7 +34,7 @@ export class ZapierService {
}

public static getContentByType<ThrowOnError extends boolean = true>(options: Options<GetContentByTypeData, ThrowOnError>) {
return (options.client ?? _heyApiClient).get<GetContentByTypeResponse, unknown, ThrowOnError>({
return (options.client ?? client).get<GetContentByTypeResponses, GetContentByTypeErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -46,7 +47,7 @@ export class ZapierService {
}

public static getContentTypes<ThrowOnError extends boolean = true>(options?: Options<GetContentTypesData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).get<GetContentTypesResponse, unknown, ThrowOnError>({
return (options?.client ?? client).get<GetContentTypesResponses, GetContentTypesErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -59,7 +60,7 @@ export class ZapierService {
}

public static postUpdateSubscription<ThrowOnError extends boolean = true>(options?: Options<PostUpdateSubscriptionData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).post<PostUpdateSubscriptionResponse, unknown, ThrowOnError>({
return (options?.client ?? client).post<PostUpdateSubscriptionResponses, PostUpdateSubscriptionErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -76,7 +77,7 @@ export class ZapierService {
}

public static getSubscriptionHooks<ThrowOnError extends boolean = true>(options?: Options<GetSubscriptionHooksData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).get<GetSubscriptionHooksResponse, unknown, ThrowOnError>({
return (options?.client ?? client).get<GetSubscriptionHooksResponses, GetSubscriptionHooksErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -89,7 +90,7 @@ export class ZapierService {
}

public static postValidateUser<ThrowOnError extends boolean = true>(options?: Options<PostValidateUserData, ThrowOnError>) {
return (options?.client ?? _heyApiClient).post<PostValidateUserResponse, unknown, ThrowOnError>({
return (options?.client ?? client).post<PostValidateUserResponses, PostValidateUserErrors, ThrowOnError>({
security: [
{
scheme: 'bearer',
Expand All @@ -104,5 +105,4 @@ export class ZapierService {
}
});
}

}
}
Loading
Loading