Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B2B-1354: [update] add security details and cleanup #562

Merged
merged 47 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a161b3d
B2B-1354: [update] add security details and cleanup
bc-traciporter Oct 3, 2024
3243225
Update address.yaml
bc-traciporter Oct 3, 2024
d1272d5
Update channel.yaml
bc-traciporter Oct 3, 2024
4c35665
Update company.yaml
bc-traciporter Oct 3, 2024
d2393e6
Update invoice.yaml
bc-traciporter Oct 3, 2024
03d9272
Update payment.yaml
bc-traciporter Oct 3, 2024
b4f7af7
Update receipt.yaml
bc-traciporter Oct 3, 2024
27e3ab2
Update order.yaml
bc-traciporter Oct 3, 2024
25a5d18
Update payment.yaml
bc-traciporter Oct 3, 2024
c47da51
Update quote.yaml
bc-traciporter Oct 3, 2024
20d9dab
Update sales_staff.yaml
bc-traciporter Oct 3, 2024
704a8ed
Update shopping_list.yaml
bc-traciporter Oct 3, 2024
8d71998
Update super_admin.yaml
bc-traciporter Oct 3, 2024
61e9f52
Update task.yaml
bc-traciporter Oct 3, 2024
c5235d8
Update user.yaml
bc-traciporter Oct 3, 2024
1216e75
fixed merge conflict
bc-traciporter Oct 4, 2024
09539c1
Update address.yaml -more updates
bc-traciporter Oct 4, 2024
316f84a
Update authentication.yaml - more changes
bc-traciporter Oct 4, 2024
aa05e7d
Update channel.yaml- more changes
bc-traciporter Oct 4, 2024
2c0ff9b
Update company.yaml - more updates
bc-traciporter Oct 4, 2024
7200fbf
Update invoice.yaml - more updates
bc-traciporter Oct 4, 2024
ad273b3
Update channel.yaml -time stamp to timestamp
bc-traciporter Oct 4, 2024
4120bc5
Update order.yaml - more updates
bc-traciporter Oct 4, 2024
ffcc1a5
Update quote.yaml - more changes
bc-traciporter Oct 4, 2024
a4cff94
Update shopping_list.yaml - more changes
bc-traciporter Oct 4, 2024
2e416b4
Update super_admin.yaml - more updates
bc-traciporter Oct 4, 2024
9dbc2b5
Update task.yaml - more updates
bc-traciporter Oct 4, 2024
8e9b0d1
Update user.yaml - more updates
bc-traciporter Oct 4, 2024
5298e41
Update authToken description, fix typos, add contact info
bc-traciporter Oct 4, 2024
7303443
Update authentication.yaml - updated authToken desc
bc-traciporter Oct 4, 2024
6168fc5
Update channel.yaml- update authToken description
bc-traciporter Oct 4, 2024
afe7b26
Update address.yaml - authToken description, remove sentence
bc-traciporter Oct 4, 2024
345ffe1
change channel to Channel
bc-traciporter Oct 4, 2024
3fd519b
Update company.yaml- authToken desc, fixed typos, removed sentence
bc-traciporter Oct 4, 2024
bfe3f06
Update invoice.yaml - authToken desc, fix typos
bc-traciporter Oct 4, 2024
a4648f4
Update payment.yaml - update authToken desc
bc-traciporter Oct 4, 2024
97a98bd
Update receipt.yaml - authToken desc, fix typo
bc-traciporter Oct 4, 2024
ca4c265
Update order.yaml - update authToken desc, fix typos
bc-traciporter Oct 4, 2024
232948f
Update payment.yaml - update authToken desc
bc-traciporter Oct 4, 2024
26f4e07
Update quote.yaml - fixed typos, update authToken desc
bc-traciporter Oct 4, 2024
9a2e407
Update sales_staff.yaml - fixed typos, authToken desc
bc-traciporter Oct 4, 2024
d984f5b
Update shopping_list.yaml - update authToken, and resolve errors
bc-traciporter Oct 4, 2024
a0a4978
Update super_admin.yaml - authToken desc, typos, remove sentence
bc-traciporter Oct 4, 2024
7d9022c
Update task.yaml - authToken desc, remove sentence
bc-traciporter Oct 4, 2024
6c60a13
Update user.yaml - authToken desc, remove sentence, fix typos
bc-traciporter Oct 4, 2024
cfb07e7
Update user.yaml - entity to entities
bc-traciporter Oct 4, 2024
f4725db
Merge branch 'main' into b2b-1354-cleanup
bc-traciporter Oct 7, 2024
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
23 changes: 12 additions & 11 deletions docs/b2b-edition/specs/api-v3/address/address.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ paths:
meta:
message: Resource not found
operationId: get-addresses-countries-countryName-code
description: Get a country's info via its code/name
description: Get a country's info from its code/name.
parameters:
- schema:
type: string
Expand All @@ -117,7 +117,7 @@ paths:
example: '0'
in: query
name: searchType
description: 'The search type, 0: Get the country code via the input country name; 1: Get the country name via the input country code.'
description: 'The search type, 0: Get the country code from the input country name; 1: Get the country name from the input country code.'
required: true
- schema:
type: string
Expand Down Expand Up @@ -223,9 +223,9 @@ paths:
code: 404
data: []
meta:
message: Please enter a valid state name or state abbreviation for the country
message: Please enter a valid state name or state abbreviation for the country.
operationId: get-addresses-states-stateName-code
description: Get a state info via its code/name
description: Get a state's info from its code/name.
security:
- authToken: []
parameters:
Expand All @@ -238,7 +238,7 @@ paths:
example: '0'
in: query
name: searchType
description: 'The search type, 0: Get the state code via the input state name; 1: Get the state name via the input state code.'
description: 'The search type, 0: Get the state code from the input state name; 1: Get the state name from the input state code.'
required: true
- schema:
type: string
Expand All @@ -249,7 +249,7 @@ paths:
required: true
- schema:
type: string
example: 'US(the searchType should be 1),United States(the searchType should be 0)'
example: 'US(the searchType should be 1), United States(the searchType should be 0)'
default: US / United States
in: query
name: country
Expand Down Expand Up @@ -421,7 +421,7 @@ paths:
- '1'
in: query
name: isIncludeExtraFields
description: Is show extra fields in the response
description: Is show extra fields in the response.
- schema:
type: string
in: query
Expand Down Expand Up @@ -451,7 +451,7 @@ paths:
type: string
in: query
name: state
description: Address state filter
description: Address state filter
- schema:
type: string
in: query
Expand Down Expand Up @@ -975,7 +975,7 @@ paths:
- id: '42'
detail: ''
meta:
message: 'Some companies updated failed, you can see these in errors'
message: 'Some companies updated failed, you can see these in errors.'
'404':
description: The resource was not found.
content:
Expand Down Expand Up @@ -1046,7 +1046,7 @@ paths:
- id: '42'
detail: ''
meta:
message: 'There have some company resources not found, and the companyIds is in the errors'
message: 'Some company resources are not found, and the companyIds are in the errors.'
'409':
description: Address was in conflict with another address. This is the result of duplicate unique values.
content:
Expand Down Expand Up @@ -1109,7 +1109,7 @@ paths:
meta:
message: Company was in conflict with another company
'413':
description: 'Request Entity Too Large. In normal conditions, bulk create or update method support 10 entity in once request. Another case, some fields of entity over limit.'
description: 'Request Entity Too Large. In normal conditions, bulk create or update method support 10 entity in once request.'
content:
application/json:
schema:
Expand Down Expand Up @@ -1313,6 +1313,7 @@ components:
securitySchemes:
authToken:
name: authToken
description: Required to authenticate requests. Include the token in a header parameter called `authToken`.
type: apiKey
in: header
tags:
Expand Down
42 changes: 22 additions & 20 deletions docs/b2b-edition/specs/api-v3/authentication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: '3.0.0'
info:
title: authentication
version: '3.0'
description: Api auth manage
description: API auth manage
servers:
- url: 'https://api-b2b.bigcommerce.com/api/io'
tags:
Expand All @@ -12,7 +12,7 @@ paths:
/auth/backend:
parameters: []
post:
summary: Get Server to Server OpenAPI tokens
summary: Get Server to Server Tokens
operationId: post-auth-backend
tags:
- Auth
Expand Down Expand Up @@ -108,14 +108,14 @@ paths:
email:
type: string
minLength: 1
description: 'Backend user email, the credential you use to log in B2B Edition APP'
description: 'You can use the backend user email to log into the B2B Edition APP.'
password:
type: string
minLength: 1
description: 'Backend user password, the credential you use to log in B2B Edition APP'
description: 'You can use the backend user password to log into the B2B Edition APP.'
name:
type: string
description: The token name if you want specfiy
description: The token name, if you want to specify it.
required:
- storeHash
- email
Expand Down Expand Up @@ -153,10 +153,10 @@ paths:
email: [email protected]
password: 1mdsafu3nf9x
description: ''
description: Get Server to Server OpenAPI tokens
description: Get Server to Server tokens
security: []
delete:
summary: Delete Backend OpenAPI tokens
summary: Delete Backend API tokens
operationId: delete-auth-backend
responses:
'200':
Expand Down Expand Up @@ -212,7 +212,7 @@ paths:
errMsg: No matching token was found
meta:
message: Not Found Error
description: Delete backend OpenAPI tokens.
description: Delete backend API tokens.
security:
- authToken: []
requestBody:
Expand All @@ -224,7 +224,7 @@ paths:
email:
type: string
description: |
Backend user email, the credential you use to log in B2B Edition APP. Which will be used as a query parameter.
The backend user email is the credential you use to log into the B2B Edition APP, which will be used as a query parameter.
minLength: 1
name:
type: string
Expand Down Expand Up @@ -273,7 +273,7 @@ paths:
description: Token
eventChannel:
type: string
description: 'The channel that token created from app,admin or api.'
description: 'The channel of the token created from an app, admin or API.'
meta:
type: object
properties:
Expand Down Expand Up @@ -323,7 +323,7 @@ paths:
example-1:
value: {}
operationId: get-backend-tokens
description: Get all Server to Server OpenAPI tokens
description: Get all Server to Server tokens
parameters:
- schema:
type: integer
Expand All @@ -339,7 +339,7 @@ paths:
description: Pagination offset
/auth/storefront:
get:
summary: Get a StoreFront OpenAPI AuthToken
summary: Get a Storefront API AuthToken
tags:
- Auth
responses:
Expand Down Expand Up @@ -410,7 +410,7 @@ paths:
meta:
message: Invalid token header. No credentials provided.
operationId: get-auth-storefront
description: Get a storeFront openAPI authToken
description: Get a storefront API authToken
parameters:
- schema:
type: string
Expand All @@ -422,11 +422,11 @@ paths:
type: string
in: query
name: channelId
description: The BigCommerce channel id. Do not use this parameter if you do not have opened multi-storefront
description: The BigCommerce channel ID. Do not use this parameter if you do not have an opened multi-storefront.
security: []
/auth/customers:
post:
summary: Get StoreFront authToken with Credentials
summary: Get Storefront authToken with Credentials
operationId: post-auth-customer
responses:
'200':
Expand Down Expand Up @@ -512,11 +512,11 @@ paths:
description: BC customer password
channelId:
type: number
description: BigCommerce channel id
description: BigCommerce channel ID
name:
type: string
minLength: 1
description: The token name if you want to specfiy
description: The token name, if you want to specify it.
required:
- storeHash
- email
Expand All @@ -534,7 +534,7 @@ paths:
beginAt: 1000
endAt: 1721930486
description: ''
description: BC customer get a authentication token
description: BigCommerce customer gets an authentication token
tags:
- Auth
security: []
Expand Down Expand Up @@ -580,10 +580,10 @@ paths:
properties:
customerId:
type: integer
description: BigCommerce customer id.
description: BigCommerce customer ID
channelId:
type: integer
description: BigCommerce channel id
description: BigCommerce channel ID
required:
- customerId
examples:
Expand All @@ -598,6 +598,8 @@ components:
securitySchemes:
authToken:
name: authToken
description: |-
Required to authenticate requests. Include the token in a header parameter called `authToken`.
type: apiKey
in: header
security:
Expand Down
33 changes: 19 additions & 14 deletions docs/b2b-edition/specs/api-v3/channel/channel.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
openapi: 3.0.0
info:
title: channel
title: Channel
version: '1.0'
description: Related with BigCommerce store channels. Only support 'bigcommerce' paltform and 'storefront' type.
description: Related with BigCommerce store channels. Only support 'bigcommerce' platform and 'storefront' type.
contact:
name: BigCommerce
url: 'https://www.bigcommerce.com'
email: [email protected]
servers:
- url: 'https://api-b2b.bigcommerce.com/api/v3/io'
paths:
Expand Down Expand Up @@ -72,11 +76,11 @@ paths:
value:
code: 422
data:
errMsg: Multi storefront is not enabled
errMsg: Multi-storefront is not enabled
meta:
message: Multi storefront is not enabled
message: Multi-storefront is not enabled
operationId: get-channels
description: get store chennels
description: get store channels
security:
- authToken: []
'/channels/{channelId}':
Expand All @@ -86,7 +90,7 @@ paths:
name: channelId
in: path
required: true
description: BigCommerce channel id
description: BigCommerce channel ID
get:
summary: Get a store channel
tags:
Expand Down Expand Up @@ -127,7 +131,7 @@ paths:
meta:
message: SUCCESS
operationId: get-channels-channelId
description: Get a store chennel
description: Get a store channel
components:
schemas:
Channel:
Expand All @@ -148,28 +152,28 @@ components:
properties:
id:
type: number
description: B2B Edition channel id
description: B2B Edition channel ID
channelId:
type: number
description: BigCommerce channel id
description: BigCommerce channel ID
channelName:
type: string
minLength: 1
description: Channel name
createdAt:
type: number
description: The time stamp channel was created
description: The timestamp when you created the channel.
updatedAt:
type: number
description: The time stamp channel was updated
description: The timestamp when you updated the channel.
type:
type: string
minLength: 1
description: 'The channel type, only support "storefront" now.'
description: 'The channel type only supports "storefront" now.'
platform:
type: string
minLength: 1
description: 'The channel platform, only support "bigcommerce" now'
description: 'The channel platform only supports "bigcommerce" now.'
status:
type: string
minLength: 1
Expand All @@ -183,7 +187,7 @@ components:
site:
type: string
minLength: 1
description: ' The domain associated with a channel'
description: ' The domain associated with a channel.'
isVisible:
type: boolean
isEnabled:
Expand All @@ -204,6 +208,7 @@ components:
securitySchemes:
authToken:
name: authToken
description: Required to authenticate requests. Include the token in a header parameter called `authToken`.
type: apiKey
in: header
tags:
Expand Down
Loading
Loading