Skip to content

Commit d5ac557

Browse files
authored
Merge pull request #293 from umbraco/feature/v17/zapier
Feature/v17/zapier
2 parents ff3e305 + b15a871 commit d5ac557

26 files changed

+4231
-2183
lines changed

Umbraco.Cms.Integrations.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ VisualStudioVersion = 18.0.11111.16
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2801CB6C-78DE-4129-B5C6-D349F47F9B5C}"
77
ProjectSection(SolutionItems) = preProject
8-
.gitignore = .gitignore
8+
.gitignore = .gitignore
99
azure-pipeline - Crm.ActiveCampaign.yml = azure-pipeline - Crm.ActiveCampaign.yml
1010
azure-pipeline - Crm.Dynamics.yml = azure-pipeline - Crm.Dynamics.yml
1111
azure-pipeline - Crm.Hubspot.yml = azure-pipeline - Crm.Hubspot.yml
Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
trigger:
22
branches:
33
include:
4-
- main-v16
5-
- v16/dev
4+
- main-v17
5+
- v17/dev
66
paths:
77
include:
88
- src/Umbraco.Cms.Integrations.Automation.Zapier/**
@@ -16,24 +16,28 @@ variables:
1616
project: 'src/$(projectName)/$(projectName).csproj'
1717
buildPlatform: 'Any CPU'
1818
buildConfiguration: 'Release'
19+
productGroup: 'DXP'
20+
productVersion: 'v17'
21+
DT_API_KEY: $(dtApiKey)
22+
DT_BASE_URL: $(dtBaseUrl)
1923

2024
steps:
25+
- task: UseDotNet@2
26+
displayName: 'Use SDK version 10.0.100'
27+
inputs:
28+
packageType: 'sdk'
29+
version: '10.0.100'
30+
2131
- task: NuGetToolInstaller@1
2232
displayName: 'Install NuGet'
2333

2434
- task: DotNetCoreCLI@2
2535
displayName: 'NuGet Restore'
2636
inputs:
2737
command: 'restore'
28-
feedsToUse: 'select'
38+
feedsToUse: 'config'
2939
projects: '$(project)'
30-
includeNuGetOrg: true
31-
32-
- task: UseDotNet@2
33-
displayName: 'Use SDK version 9.0.203'
34-
inputs:
35-
packageType: 'sdk'
36-
version: '9.0.203'
40+
nugetConfigPath: 'NuGet.config'
3741

3842
- task: VSBuild@1
3943
displayName: 'Build Project'
@@ -51,24 +55,32 @@ steps:
5155
packagesToPack: '$(project)'
5256
versioningScheme: 'off'
5357

54-
- task: UseDotNet@2
55-
displayName: 'Install .NET Core 3.x'
56-
inputs:
57-
packageType: 'sdk'
58-
version: '3.x'
59-
60-
- task: CmdLine@2
61-
displayName: 'Create Umbraco Package'
62-
inputs:
63-
script: |
64-
dotnet tool install --global Umbraco.Tools.Packages
65-
cd src/$(projectName)/
66-
umbpack pack .\package.xml -o $(Build.ArtifactStagingDirectory)
67-
cd ../../
68-
6958
- task: PublishBuildArtifacts@1
7059
displayName: 'Publish Build Artifacts'
7160
inputs:
7261
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
7362
ArtifactName: 'drop'
7463
publishLocation: 'Container'
64+
65+
# Generate/upload SBOM with cdxgen
66+
- script: |
67+
cd $(Build.SourcesDirectory)
68+
npm install --global @cyclonedx/cdxgen
69+
displayName: 'Install cdxgen'
70+
71+
- script: |
72+
mkdir -p $(Build.ArtifactStagingDirectory)/bom
73+
cd $(Build.SourcesDirectory)
74+
75+
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
76+
displayName: 'Generate & Upload SBOM with cdxgen'
77+
env:
78+
DT_API_KEY: $(DT_API_KEY)
79+
DT_BASE_URL: $(DT_BASE_URL)
80+
81+
# Publish SBOM artifact
82+
- task: PublishPipelineArtifact@1
83+
displayName: 'Publish SBOM Artifact'
84+
inputs:
85+
targetPath: $(Build.ArtifactStagingDirectory)/bom
86+
artifactName: SBOM

examples/Umbraco.Cms.Integrations.Testsite.V17/Umbraco.Cms.Integrations.Testsite.V17.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
<ItemGroup>
1010
<PackageReference Include="Umbraco.Cms" Version="17.0.0" />
11+
<ProjectReference Include="..\..\src\Umbraco.Cms.Integrations.Automation.Zapier\Umbraco.Cms.Integrations.Automation.Zapier.csproj" />
1112
<ProjectReference Include="..\..\src\Umbraco.Cms.Integrations.Crm.Dynamics\Umbraco.Cms.Integrations.Crm.Dynamics.csproj" />
1213
<ProjectReference Include="..\..\src\Umbraco.Cms.Integrations.Crm.ActiveCampaign\Umbraco.Cms.Integrations.Crm.ActiveCampaign.csproj" />
1314
<ProjectReference Include="..\..\src\Umbraco.Cms.Integrations.Commerce.Shopify\Umbraco.Cms.Integrations.Commerce.Shopify.csproj" />
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@umbraco-cms:registry=https://www.myget.org/F/umbracoprereleases/npm/
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

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

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

16-
export const client = createClient(createConfig<ClientOptions>({
17-
baseUrl: 'http://localhost:30450',
17+
export const client = createClient(createConfig<ClientOptions2>({
18+
baseUrl: 'http://localhost:28157',
1819
throwOnError: true
19-
}));
20+
}));
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// This file is auto-generated by @hey-api/openapi-ts
2+
23
export * from './types.gen';
34
export * from './client.gen';
4-
export * from './sdk.gen';
5+
export * from './sdk.gen';

src/Umbraco.Cms.Integrations.Automation.Zapier/Client/generated/sdk.gen.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

3-
import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
4-
import type { GetCheckFormExtensionData, GetCheckFormExtensionResponse, GetContentByTypeData, GetContentByTypeResponse, GetContentTypesData, GetContentTypesResponse, PostUpdateSubscriptionData, PostUpdateSubscriptionResponse, GetSubscriptionHooksData, GetSubscriptionHooksResponse, PostValidateUserData, PostValidateUserResponse } from './types.gen';
5-
import { client as _heyApiClient } from './client.gen';
3+
import type { Client, Options as Options2, TDataShape } from '@hey-api/client-fetch';
64

7-
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
5+
import { client } from './client.gen';
6+
import type { GetCheckFormExtensionData, GetCheckFormExtensionErrors, GetCheckFormExtensionResponses, GetContentByTypeData, GetContentByTypeErrors, GetContentByTypeResponses, GetContentTypesData, GetContentTypesErrors, GetContentTypesResponses, GetSubscriptionHooksData, GetSubscriptionHooksErrors, GetSubscriptionHooksResponses, PostUpdateSubscriptionData, PostUpdateSubscriptionErrors, PostUpdateSubscriptionResponses, PostValidateUserData, PostValidateUserErrors, PostValidateUserResponses } from './types.gen';
7+
8+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
89
/**
910
* You can provide a client instance returned by `createClient()` instead of
1011
* individual options. This might be also useful if you want to implement a
@@ -18,9 +19,9 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
1819
meta?: Record<string, unknown>;
1920
};
2021

21-
export class ZapierService {
22+
export class Zapier {
2223
public static getCheckFormExtension<ThrowOnError extends boolean = true>(options?: Options<GetCheckFormExtensionData, ThrowOnError>) {
23-
return (options?.client ?? _heyApiClient).get<GetCheckFormExtensionResponse, unknown, ThrowOnError>({
24+
return (options?.client ?? client).get<GetCheckFormExtensionResponses, GetCheckFormExtensionErrors, ThrowOnError>({
2425
security: [
2526
{
2627
scheme: 'bearer',
@@ -33,7 +34,7 @@ export class ZapierService {
3334
}
3435

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

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

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

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

9192
public static postValidateUser<ThrowOnError extends boolean = true>(options?: Options<PostValidateUserData, ThrowOnError>) {
92-
return (options?.client ?? _heyApiClient).post<PostValidateUserResponse, unknown, ThrowOnError>({
93+
return (options?.client ?? client).post<PostValidateUserResponses, PostValidateUserErrors, ThrowOnError>({
9394
security: [
9495
{
9596
scheme: 'bearer',
@@ -104,5 +105,4 @@ export class ZapierService {
104105
}
105106
});
106107
}
107-
108-
}
108+
}

0 commit comments

Comments
 (0)