This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from salesforce-marketingcloud/1.0
1.0
- Loading branch information
Showing
125 changed files
with
11,779 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# next.js build output | ||
.next | ||
|
||
# IntelliJ IDEA | ||
.idea/ | ||
*.iml | ||
*.iws |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Swagger Codegen Ignore | ||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md | ||
|
||
test/api/AssetApi.spec.js | ||
test/api/CampaignApi.spec.js | ||
test/api/TransactionalMessagingApi.spec.js | ||
git_push.sh | ||
mocha.opts | ||
.babelrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.4.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
language: node_js | ||
node_js: | ||
- "12.10.0" | ||
|
||
branches: | ||
only: | ||
- master | ||
- develop | ||
- /^feature\/.*$/ | ||
- /^release\/.*$/ | ||
- /^hotfix\/.*$/ | ||
- /^*.0$/ | ||
- /^ci\/*.0$/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,42 @@ | ||
# This project is under development | ||
# Salesforce Marketing Cloud - Autogenerated SDK | ||
|
||
## Overview | ||
|
||
The Salesforce Marketing Cloud Node.js SDK enables developers to easily access the Salesforce Marketing Cloud. | ||
|
||
- This is an upgraded version of the existing community supported [Fuel-Node](https://github.com/salesforce-marketingcloud/FuelSDK-Node) SDK | ||
- Unlike the [Fuel-Node](https://github.com/salesforce-marketingcloud/FuelSDK-Node), this SDK is auto generated using [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) | ||
|
||
## Supported Features | ||
|
||
- [Transactional Messaging](https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/transactional-messaging-api.htm) | ||
|
||
## Environment Requirements | ||
|
||
- Node.js >= 12.10.0 | ||
|
||
## Download | ||
|
||
To consume this SDK, add the [Salesforce Marketing Cloud SDK](https://www.npmjs.com/package/salesforce-marketing-cloud-sdk) to your project using the following command: | ||
|
||
```npm install --save salesforce-marketing-cloud-sdk``` | ||
|
||
## Getting Started | ||
|
||
To find more information on how to consume the SDK, Refer to the [Regression tests](https://github.com/salesforce-marketingcloud/mcsdk-automation-node/tree/master/test/integration/api) or the [Code Samples](https://github.com/salesforce-marketingcloud/mcsdk-automation-node/tree/master/test/samples) | ||
|
||
### Note | ||
|
||
- Most of the code in this repo is auto generated from the [mcsdk-automation-framework-core](https://github.com/salesforce-marketingcloud/mcsdk-automation-framework-core) and the [mcsdk-automation-framework-node](https://github.com/salesforce-marketingcloud/mcsdk-automation-framework-node) repos. Other features like authentication flow, caching are directly implemented in this repo. | ||
- If any change is needed in the auto generated code, it has to come from the [mcsdk-automation-framework-core](https://github.com/salesforce-marketingcloud/mcsdk-automation-framework-core) or the [mcsdk-automation-framework-node](https://github.com/salesforce-marketingcloud/mcsdk-automation-framework-node) repos. | ||
- If any change is needed in the auth flow or caching, it should be done in this repo. | ||
|
||
## Contact us | ||
|
||
- Request a [new feature](https://github.com/salesforce-marketingcloud/mcsdk-automation-node/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc), add a question or report a bug on GitHub. | ||
- Vote for [Popular Feature Requests](https://github.com/salesforce-marketingcloud/mcsdk-automation-node/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) by making relevant comments and add your reaction. Use a reaction in place of a "+1" comment: | ||
- 👍 - upvote | ||
- 👎 - downvote | ||
|
||
## License | ||
By contributing your code, you agree to license your contribution under the terms of the [BSD 3-Clause License](https://github.com/salesforce-marketingcloud/mcsdk-automation-node/blob/master/license.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SalesforceMarketingCloud.ApiError | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**message** | **String** | The error message | [optional] | ||
**errorCode** | **Number** | The specific error code | [optional] | ||
**documentation** | **String** | Any specific documentation for the error | [optional] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# SalesforceMarketingCloud.Asset | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**id** | **Number** | The id of the asset | [optional] | ||
**customerKey** | **String** | Reference to customer's private ID/name for the asset | | ||
**contentType** | **String** | The type that the content attribute will be in | [optional] | ||
**data** | **Object** | Property bag containing the asset data | [optional] | ||
**assetType** | [**AssetType**](AssetType.md) | | | ||
**version** | **Number** | The version of the asset | [optional] | ||
**locked** | **Boolean** | Specifies if the asset can be modified or not | [optional] | ||
**fileProperties** | **Object** | Stores the different properties that this asset refers to if it is a file type | [optional] | ||
**name** | **String** | Name of the asset, set by the client | | ||
**description** | **String** | Description of the asset, set by the client | | ||
**category** | **Object** | ID of the category the asset belongs to | [optional] | ||
**tags** | **[String]** | List of tags associated with the asset | [optional] | ||
**content** | **String** | The actual content of the asset | [optional] | ||
**design** | **String** | Fallback for display when neither content nor supercontent are provided | [optional] | ||
**superContent** | **String** | Content that supersedes content in terms of display | [optional] | ||
**customFields** | **Object** | Custom fields within an asset | [optional] | ||
**views** | **Object** | Views within an asset | [optional] | ||
**blocks** | **Object** | Blocks within the asset | [optional] | ||
**minBlocks** | **Number** | Minimum number of blocks within an asset | [optional] | ||
**maxBlocks** | **Number** | Maximum number of blocks within an asset | [optional] | ||
**channels** | **Object** | List of channels that are allowed to use this asset | [optional] | ||
**allowedBlocks** | **[String]** | List of blocks that are allowed in the asset | [optional] | ||
**slots** | **Object** | Slots within the asset | [optional] | ||
**businessUnitAvailability** | **Object** | A dictionary of member IDs that have been granted access to the asset | [optional] | ||
**sharingProperties** | [**SharingProperties**](SharingProperties.md) | | [optional] | ||
**template** | **Object** | Template the asset follows | [optional] | ||
**file** | **String** | Base64-encoded string of a file associated with an asset | [optional] | ||
**generateFrom** | **String** | Tells the sending compiler what view to use for generating this view's content | [optional] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
# SalesforceMarketingCloud.AssetApi | ||
|
||
All URIs are relative to *https://www.exacttargetapis.com* | ||
|
||
Method | HTTP request | Description | ||
------------- | ------------- | ------------- | ||
[**createAsset**](AssetApi.md#createAsset) | **POST** /asset/v1/content/assets | createAsset | ||
[**deleteAssetById**](AssetApi.md#deleteAssetById) | **DELETE** /asset/v1/content/assets/{id} | deleteAssetById | ||
[**getAssetById**](AssetApi.md#getAssetById) | **GET** /asset/v1/content/assets/{id} | getAssetById | ||
[**partiallyUpdateAssetById**](AssetApi.md#partiallyUpdateAssetById) | **PATCH** /asset/v1/content/assets/{id} | partiallyUpdateAssetById | ||
|
||
|
||
<a name="createAsset"></a> | ||
# **createAsset** | ||
> Asset createAsset(body) | ||
createAsset | ||
|
||
Creates a new asset. | ||
|
||
### Example | ||
```javascript | ||
const SalesforceMarketingCloud = require ('salesforce-marketing-cloud-sdk'); | ||
|
||
let apiInstance = new SalesforceMarketingCloud.AssetApi(); | ||
|
||
let body = new SalesforceMarketingCloud.Asset(); // Asset | JSON Parameters | ||
|
||
apiInstance.createAsset(body).then((data) => { | ||
console.log('API called successfully. Returned data: ' + data); | ||
}, (error) => { | ||
console.error(error); | ||
}); | ||
|
||
``` | ||
|
||
### Parameters | ||
|
||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | ------------- | ||
**body** | [**Asset**](Asset.md)| JSON Parameters | | ||
|
||
### Return type | ||
|
||
[**Asset**](Asset.md) | ||
|
||
### Authorization | ||
|
||
No authorization required | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: Not defined | ||
- **Accept**: Not defined | ||
|
||
<a name="deleteAssetById"></a> | ||
# **deleteAssetById** | ||
> deleteAssetById(id) | ||
deleteAssetById | ||
|
||
Deletes an asset. | ||
|
||
### Example | ||
```javascript | ||
const SalesforceMarketingCloud = require ('salesforce-marketing-cloud-sdk'); | ||
|
||
let apiInstance = new SalesforceMarketingCloud.AssetApi(); | ||
|
||
let id = 8.14; // Number | The ID of the asset to delete | ||
|
||
apiInstance.deleteAssetById(id).then(() => { | ||
console.log('API called successfully.'); | ||
}, (error) => { | ||
console.error(error); | ||
}); | ||
|
||
``` | ||
|
||
### Parameters | ||
|
||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | ------------- | ||
**id** | **Number**| The ID of the asset to delete | | ||
|
||
### Return type | ||
|
||
null (empty response body) | ||
|
||
### Authorization | ||
|
||
No authorization required | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: Not defined | ||
- **Accept**: Not defined | ||
|
||
<a name="getAssetById"></a> | ||
# **getAssetById** | ||
> Asset getAssetById(id) | ||
getAssetById | ||
|
||
Gets an asset by ID. | ||
|
||
### Example | ||
```javascript | ||
const SalesforceMarketingCloud = require ('salesforce-marketing-cloud-sdk'); | ||
|
||
let apiInstance = new SalesforceMarketingCloud.AssetApi(); | ||
|
||
let id = 8.14; // Number | The ID of the asset | ||
|
||
apiInstance.getAssetById(id).then((data) => { | ||
console.log('API called successfully. Returned data: ' + data); | ||
}, (error) => { | ||
console.error(error); | ||
}); | ||
|
||
``` | ||
|
||
### Parameters | ||
|
||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | ------------- | ||
**id** | **Number**| The ID of the asset | | ||
|
||
### Return type | ||
|
||
[**Asset**](Asset.md) | ||
|
||
### Authorization | ||
|
||
No authorization required | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: Not defined | ||
- **Accept**: Not defined | ||
|
||
<a name="partiallyUpdateAssetById"></a> | ||
# **partiallyUpdateAssetById** | ||
> Asset partiallyUpdateAssetById(id, body) | ||
partiallyUpdateAssetById | ||
|
||
Updates part of an asset. | ||
|
||
### Example | ||
```javascript | ||
const SalesforceMarketingCloud = require ('salesforce-marketing-cloud-sdk'); | ||
|
||
let apiInstance = new SalesforceMarketingCloud.AssetApi(); | ||
|
||
let id = 8.14; // Number | The ID of the asset to update | ||
|
||
let body = new SalesforceMarketingCloud.Asset(); // Asset | JSON Parameters | ||
|
||
apiInstance.partiallyUpdateAssetById(id, body).then((data) => { | ||
console.log('API called successfully. Returned data: ' + data); | ||
}, (error) => { | ||
console.error(error); | ||
}); | ||
|
||
``` | ||
|
||
### Parameters | ||
|
||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | ------------- | ||
**id** | **Number**| The ID of the asset to update | | ||
**body** | [**Asset**](Asset.md)| JSON Parameters | | ||
|
||
### Return type | ||
|
||
[**Asset**](Asset.md) | ||
|
||
### Authorization | ||
|
||
No authorization required | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: Not defined | ||
- **Accept**: Not defined | ||
|
Oops, something went wrong.