@code.store/arcxp-sdk-ts 5.1.2 → 5.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ import { ArcProtoCenter } from './photo-center/index.js';
12
12
  import { ArcRedirect } from './redirect/index.js';
13
13
  import { ArcRetailEvents } from './retail-events/index.js';
14
14
  import { ArcDeveloperRetail } from './developer-retail/index.js';
15
- import { ArcSales } from './sales/index.js';
15
+ import { ArcSales, ArcSalesV2 } from './sales/index.js';
16
16
  import { ArcSigningService } from './signing-service/index.js';
17
17
  import { ArcSite } from './site/index.js';
18
18
  import { ArcTags } from './tags/index.js';
@@ -25,6 +25,7 @@ export declare const ArcAPI: (options: ArcAPIOptions) => {
25
25
  Redirect: ArcRedirect;
26
26
  MigrationCenter: ArcMigrationCenter;
27
27
  Sales: ArcSales;
28
+ SalesV2: ArcSalesV2;
28
29
  Site: ArcSite;
29
30
  Websked: ArcWebsked;
30
31
  Content: ArcContent;
@@ -1,6 +1,10 @@
1
1
  import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
2
- import type { MigrateBatchSubscriptionsParams, MigrateBatchSubscriptionsPayload, MigrateBatchSubscriptionsResponse } from './types.js';
2
+ import type { CreateEnterpriseGroupPayload, CreateEnterpriseGroupResponse, MigrateBatchSubscriptionsParams, MigrateBatchSubscriptionsPayload, MigrateBatchSubscriptionsResponse } from './types.js';
3
3
  export declare class ArcSales extends ArcAbstractAPI {
4
4
  constructor(options: ArcAPIOptions);
5
5
  migrate(params: MigrateBatchSubscriptionsParams, payload: MigrateBatchSubscriptionsPayload): Promise<MigrateBatchSubscriptionsResponse>;
6
6
  }
7
+ export declare class ArcSalesV2 extends ArcAbstractAPI {
8
+ constructor(options: ArcAPIOptions);
9
+ createEnterpriseGroup(payload: CreateEnterpriseGroupPayload): Promise<CreateEnterpriseGroupResponse>;
10
+ }
@@ -83,4 +83,14 @@ export type Refund = {
83
83
  tax: number;
84
84
  providerReference?: string;
85
85
  };
86
+ export type CreateEnterpriseGroupPayload = {
87
+ name: string;
88
+ sku: string;
89
+ };
90
+ export type CreateEnterpriseGroupResponse = {
91
+ name: string;
92
+ sku: string;
93
+ nonceExpirationInDays: number;
94
+ id: number;
95
+ };
86
96
  export {};
package/dist/index.cjs CHANGED
@@ -722,6 +722,15 @@ class ArcSales extends ArcAbstractAPI {
722
722
  return data;
723
723
  }
724
724
  }
725
+ class ArcSalesV2 extends ArcAbstractAPI {
726
+ constructor(options) {
727
+ super({ ...options, apiPath: 'sales/api/v2' });
728
+ }
729
+ async createEnterpriseGroup(payload) {
730
+ const { data } = await this.client.post('/subscriptions/enterprise', payload);
731
+ return data;
732
+ }
733
+ }
725
734
 
726
735
  class ArcSigningService extends ArcAbstractAPI {
727
736
  constructor(options) {
@@ -854,6 +863,7 @@ const ArcAPI = (options) => {
854
863
  Redirect: new ArcRedirect(options),
855
864
  MigrationCenter: new ArcMigrationCenter(options),
856
865
  Sales: new ArcSales(options),
866
+ SalesV2: new ArcSalesV2(options),
857
867
  Site: new ArcSite(options),
858
868
  Websked: new ArcWebsked(options),
859
869
  Content: new ArcContent(options),