@cfxlabsinc/b2b-services
Preparing search index...
@cfxlabsinc/customer-services
CustomerDocumentService
Class CustomerDocumentService
Manage customer documents stored in S3
Hierarchy (
View Summary
)
CustomerDocumentQueryService
CustomerDocumentService
Index
Constructors
constructor
Properties
customer
Service
s3
Bucket
s3
Client
Methods
create
delete
get
get
Download
Url
get
Stream
search
Constructors
constructor
new
CustomerDocumentService
(
__namedParameters
:
{
customerService
:
CustomerService
;
eventPublisher
:
EventPublisher
;
s3Bucket
:
string
;
s3Client
:
S3Client
;
}
,
)
:
CustomerDocumentService
Parameters
__namedParameters
:
{
customerService
:
CustomerService
;
eventPublisher
:
EventPublisher
;
s3Bucket
:
string
;
s3Client
:
S3Client
;
}
Returns
CustomerDocumentService
Properties
Protected
Readonly
customer
Service
customerService
:
CustomerService
Protected
Readonly
s3
Bucket
s3Bucket
:
string
Protected
Readonly
s3
Client
s3Client
:
S3Client
Methods
create
create
(
__namedParameters
:
{
contentType
?:
string
;
customerId
:
string
;
document
:
Buffer
;
fileName
:
string
;
type
:
"CUSTOM"
|
"LOGO"
|
"PRICING_SCHEDULE"
|
"TERMS"
;
}
,
)
:
Promise
<
{
ok
:
true
;
value
:
CustomerDocument
}
>
Parameters
__namedParameters
:
{
contentType
?:
string
;
customerId
:
string
;
document
:
Buffer
;
fileName
:
string
;
type
:
"CUSTOM"
|
"LOGO"
|
"PRICING_SCHEDULE"
|
"TERMS"
;
}
Returns
Promise
<
{
ok
:
true
;
value
:
CustomerDocument
}
>
delete
delete
(
__namedParameters
:
{
customerId
:
string
;
key
:
string
}
,
)
:
Promise
<
{
ok
:
true
;
value
:
void
}
>
Parameters
__namedParameters
:
{
customerId
:
string
;
key
:
string
}
Returns
Promise
<
{
ok
:
true
;
value
:
void
}
>
get
get
(
__namedParameters
:
{
customerId
:
string
;
fileName
:
string
;
type
:
"CUSTOM"
|
"LOGO"
|
"PRICING_SCHEDULE"
|
"TERMS"
;
}
,
)
:
Promise
<
{
ok
:
true
;
value
:
CustomerDocument
|
null
}
>
Parameters
__namedParameters
:
{
customerId
:
string
;
fileName
:
string
;
type
:
"CUSTOM"
|
"LOGO"
|
"PRICING_SCHEDULE"
|
"TERMS"
;
}
Returns
Promise
<
{
ok
:
true
;
value
:
CustomerDocument
|
null
}
>
get
Download
Url
getDownloadUrl
(
__namedParameters
:
{
customerId
:
string
;
fileName
:
string
;
type
:
"CUSTOM"
|
"LOGO"
|
"PRICING_SCHEDULE"
|
"TERMS"
;
}
,
)
:
Promise
<
{
ok
:
true
;
value
:
string
|
null
}
>
Parameters
__namedParameters
:
{
customerId
:
string
;
fileName
:
string
;
type
:
"CUSTOM"
|
"LOGO"
|
"PRICING_SCHEDULE"
|
"TERMS"
;
}
Returns
Promise
<
{
ok
:
true
;
value
:
string
|
null
}
>
get
Stream
getStream
(
__namedParameters
:
{
customerId
:
string
;
fileName
:
string
;
type
:
"CUSTOM"
|
"LOGO"
|
"PRICING_SCHEDULE"
|
"TERMS"
;
}
,
)
:
Promise
<
{
ok
:
true
;
value
:
CustomerDocumentStream
|
null
}
>
Parameters
__namedParameters
:
{
customerId
:
string
;
fileName
:
string
;
type
:
"CUSTOM"
|
"LOGO"
|
"PRICING_SCHEDULE"
|
"TERMS"
;
}
Returns
Promise
<
{
ok
:
true
;
value
:
CustomerDocumentStream
|
null
}
>
search
search
(
__namedParameters
:
{
customerId
:
string
;
type
:
"CUSTOM"
|
"LOGO"
|
"PRICING_SCHEDULE"
|
"TERMS"
;
}
,
)
:
Promise
<
{
ok
:
true
;
value
:
CustomerDocument
[]
}
>
Parameters
__namedParameters
:
{
customerId
:
string
;
type
:
"CUSTOM"
|
"LOGO"
|
"PRICING_SCHEDULE"
|
"TERMS"
}
Returns
Promise
<
{
ok
:
true
;
value
:
CustomerDocument
[]
}
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
customer
Service
s3
Bucket
s3
Client
Methods
create
delete
get
get
Download
Url
get
Stream
search
@cfxlabsinc/b2b-services
Loading...
Manage customer documents stored in S3