partner-center-broker 1.0.1 → 1.1.0
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.
- package/.editorconfig +12 -12
- package/.eslintignore +4 -3
- package/.eslintrc.json +54 -54
- package/.github/workflows/main.yml +30 -0
- package/.github/workflows/npm-publish.yml +58 -44
- package/.prettierignore +4 -3
- package/LICENSE +675 -674
- package/README.md +252 -135
- package/{dist → lib}/converters.d.ts +21 -17
- package/{dist → lib}/converters.js +62 -48
- package/lib/helpers.d.ts +5 -0
- package/lib/helpers.js +149 -0
- package/{dist → lib}/index.d.ts +18 -17
- package/{dist → lib}/index.js +361 -290
- package/{dist → lib}/interfaces.d.ts +221 -172
- package/{dist → lib}/interfaces.js +2 -2
- package/package.json +63 -57
package/lib/helpers.js
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Helpers = void 0;
|
|
4
|
+
class Helpers {
|
|
5
|
+
static CloneLastSubmissionData(original) {
|
|
6
|
+
const subData = {
|
|
7
|
+
applicationCategory: original.applicationCategory,
|
|
8
|
+
pricing: original.pricing,
|
|
9
|
+
visibility: original.visibility,
|
|
10
|
+
targetPublishMode: original.targetPublishMode,
|
|
11
|
+
targetPublishDate: original.targetPublishDate,
|
|
12
|
+
listings: original.listings,
|
|
13
|
+
hardwarePreferences: original.hardwarePreferences,
|
|
14
|
+
automaticBackupEnabled: original.automaticBackupEnabled,
|
|
15
|
+
canInstallOnRemovableMedia: original.canInstallOnRemovableMedia,
|
|
16
|
+
isGameDvrEnabled: original.isGameDvrEnabled,
|
|
17
|
+
gamingOptions: original.gamingOptions,
|
|
18
|
+
hasExternalInAppProducts: original.hasExternalInAppProducts,
|
|
19
|
+
meetAccessibilityGuidelines: original.meetAccessibilityGuidelines,
|
|
20
|
+
notesForCertification: original.notesForCertification,
|
|
21
|
+
applicationPackages: original.applicationPackages,
|
|
22
|
+
packageDeliveryOptions: original.packageDeliveryOptions,
|
|
23
|
+
enterpriseLicensing: original.enterpriseLicensing,
|
|
24
|
+
allowMicrosoftDecideAppAvailabilityToFutureDeviceFamilies: original.allowMicrosoftDecideAppAvailabilityToFutureDeviceFamilies,
|
|
25
|
+
allowTargetFutureDeviceFamilies: original.allowTargetFutureDeviceFamilies,
|
|
26
|
+
trailers: original.trailers
|
|
27
|
+
};
|
|
28
|
+
return subData;
|
|
29
|
+
}
|
|
30
|
+
static GenerateSampleSubmission() {
|
|
31
|
+
const ovrde = {
|
|
32
|
+
description: ''
|
|
33
|
+
};
|
|
34
|
+
const pltOverrides = {
|
|
35
|
+
Windows81: ovrde
|
|
36
|
+
};
|
|
37
|
+
const imgs = [
|
|
38
|
+
{
|
|
39
|
+
fileName: '',
|
|
40
|
+
fileStatus: '',
|
|
41
|
+
id: '',
|
|
42
|
+
imageType: ''
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
fileName: '',
|
|
46
|
+
fileStatus: '',
|
|
47
|
+
id: '',
|
|
48
|
+
imageType: ''
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
const bsListing = {
|
|
52
|
+
copyrightAndTrademarkInfo: '',
|
|
53
|
+
keywords: ['', ''],
|
|
54
|
+
licenseTerms: '',
|
|
55
|
+
privacyPolicy: '',
|
|
56
|
+
supportContact: '',
|
|
57
|
+
websiteUrl: '',
|
|
58
|
+
description: '',
|
|
59
|
+
features: ['', ''],
|
|
60
|
+
releaseNotes: '',
|
|
61
|
+
images: imgs,
|
|
62
|
+
recommendedHardware: [],
|
|
63
|
+
title: ''
|
|
64
|
+
};
|
|
65
|
+
const enusListing = {
|
|
66
|
+
baseListing: bsListing,
|
|
67
|
+
platformOverrides: pltOverrides
|
|
68
|
+
};
|
|
69
|
+
const listings = {
|
|
70
|
+
'en-us': enusListing
|
|
71
|
+
};
|
|
72
|
+
const dvFams = {
|
|
73
|
+
Desktop: true,
|
|
74
|
+
Mobile: true,
|
|
75
|
+
Holographic: true,
|
|
76
|
+
Xbox: true,
|
|
77
|
+
Team: true
|
|
78
|
+
};
|
|
79
|
+
const rllout = {
|
|
80
|
+
isPackageRollout: true,
|
|
81
|
+
packageRolloutPercentage: 100,
|
|
82
|
+
packageRolloutStatus: '',
|
|
83
|
+
fallbackSubmissionId: ''
|
|
84
|
+
};
|
|
85
|
+
const delivOptns = {
|
|
86
|
+
packageRollout: rllout,
|
|
87
|
+
isMandatoryUpdate: true,
|
|
88
|
+
mandatoryUpdateEffectiveDate: new Date(Date.now())
|
|
89
|
+
};
|
|
90
|
+
const pckgs = [
|
|
91
|
+
{
|
|
92
|
+
fileName: '',
|
|
93
|
+
fileStatus: '',
|
|
94
|
+
id: '',
|
|
95
|
+
version: '',
|
|
96
|
+
architecture: '',
|
|
97
|
+
languages: ['', ''],
|
|
98
|
+
capabilities: ['', ''],
|
|
99
|
+
minimumDirectXVersion: '',
|
|
100
|
+
minimumSystemRam: '',
|
|
101
|
+
targetDeviceFamilies: ['', '']
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
fileName: '',
|
|
105
|
+
fileStatus: '',
|
|
106
|
+
id: '',
|
|
107
|
+
version: '',
|
|
108
|
+
architecture: '',
|
|
109
|
+
languages: ['', ''],
|
|
110
|
+
capabilities: ['', ''],
|
|
111
|
+
minimumDirectXVersion: '',
|
|
112
|
+
minimumSystemRam: '',
|
|
113
|
+
targetDeviceFamilies: ['', '']
|
|
114
|
+
}
|
|
115
|
+
];
|
|
116
|
+
const msPcing = {};
|
|
117
|
+
const pcing = {
|
|
118
|
+
trialPeriod: '',
|
|
119
|
+
marketSpecificPricings: msPcing,
|
|
120
|
+
sales: [],
|
|
121
|
+
priceId: '',
|
|
122
|
+
isAdvancedPricingModel: false
|
|
123
|
+
};
|
|
124
|
+
const subData = {
|
|
125
|
+
applicationCategory: '',
|
|
126
|
+
pricing: pcing,
|
|
127
|
+
visibility: '',
|
|
128
|
+
targetPublishMode: '',
|
|
129
|
+
targetPublishDate: new Date(Date.now()),
|
|
130
|
+
listings: listings,
|
|
131
|
+
hardwarePreferences: ['', ''],
|
|
132
|
+
automaticBackupEnabled: true,
|
|
133
|
+
canInstallOnRemovableMedia: true,
|
|
134
|
+
isGameDvrEnabled: true,
|
|
135
|
+
gamingOptions: [],
|
|
136
|
+
hasExternalInAppProducts: false,
|
|
137
|
+
meetAccessibilityGuidelines: true,
|
|
138
|
+
notesForCertification: '',
|
|
139
|
+
applicationPackages: pckgs,
|
|
140
|
+
packageDeliveryOptions: delivOptns,
|
|
141
|
+
enterpriseLicensing: '',
|
|
142
|
+
allowMicrosoftDecideAppAvailabilityToFutureDeviceFamilies: true,
|
|
143
|
+
allowTargetFutureDeviceFamilies: dvFams,
|
|
144
|
+
trailers: []
|
|
145
|
+
};
|
|
146
|
+
return subData;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
exports.Helpers = Helpers;
|
package/{dist → lib}/index.d.ts
RENAMED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { GetSubmissionResult, SubmissionStatusResult, ServiceAuthenticationResult, CommitSubmissionResult, CreateAppSubmissionResult, AppResourceResult } from './interfaces';
|
|
2
|
-
declare class DevCenter {
|
|
3
|
-
tenantId: string;
|
|
4
|
-
clientId: string;
|
|
5
|
-
clientSecret: string;
|
|
6
|
-
authResult: ServiceAuthenticationResult | undefined;
|
|
7
|
-
constructor(_tenantId: string, _clientId: string, _clientSecret: string);
|
|
8
|
-
GetAppInfo(appId: string): Promise<AppResourceResult>;
|
|
9
|
-
CreateAppSubmission(appId: string): Promise<CreateAppSubmissionResult>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { GetSubmissionResult, SubmissionStatusResult, ServiceAuthenticationResult, CommitSubmissionResult, CreateAppSubmissionResult, AppResourceResult, UpdateSubmissionResult, SubmissionData } from './interfaces';
|
|
2
|
+
declare class DevCenter {
|
|
3
|
+
tenantId: string;
|
|
4
|
+
clientId: string;
|
|
5
|
+
clientSecret: string;
|
|
6
|
+
authResult: ServiceAuthenticationResult | undefined;
|
|
7
|
+
constructor(_tenantId: string, _clientId: string, _clientSecret: string);
|
|
8
|
+
GetAppInfo(appId: string): Promise<AppResourceResult>;
|
|
9
|
+
CreateAppSubmission(appId: string): Promise<CreateAppSubmissionResult>;
|
|
10
|
+
UpdateSubmission(appId: string, submissionId: string, data: SubmissionData): Promise<UpdateSubmissionResult>;
|
|
11
|
+
CommitSubmission(appId: string, submissionId: string): Promise<CommitSubmissionResult>;
|
|
12
|
+
GetSubmission(appId: string, submissionId: string): Promise<GetSubmissionResult>;
|
|
13
|
+
GetSubmissionStatus(appId: string, submissionId: string): Promise<SubmissionStatusResult>;
|
|
14
|
+
DeleteSubmission(appId: string, submissionId: string): Promise<boolean>;
|
|
15
|
+
authorize(): Promise<ServiceAuthenticationResult>;
|
|
16
|
+
private signin;
|
|
17
|
+
}
|
|
18
|
+
export = DevCenter;
|